Documentation
¶
Index ¶
- Constants
- func MapLicenseDetailsToTerraform(ctx context.Context, data *UserLicenseAssignmentResourceModel, ...)
- func MapRemoteResourceStateToTerraform(ctx context.Context, data *UserLicenseAssignmentResourceModel, ...)
- func NewUserLicenseAssignmentResource() resource.Resource
- type AssignedLicenseResourceModel
- type LicenseDetailsResourceModel
- type ServicePlanResourceModel
- type UserLicenseAssignmentResource
- func (r *UserLicenseAssignmentResource) Configure(ctx context.Context, req resource.ConfigureRequest, ...)
- func (r *UserLicenseAssignmentResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *UserLicenseAssignmentResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *UserLicenseAssignmentResource) FullTypeName() string
- func (r *UserLicenseAssignmentResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *UserLicenseAssignmentResource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r *UserLicenseAssignmentResource) ModifyPlan(ctx context.Context, req resource.ModifyPlanRequest, ...)
- func (r *UserLicenseAssignmentResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *UserLicenseAssignmentResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *UserLicenseAssignmentResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type UserLicenseAssignmentResourceModel
Constants ¶
const ( ResourceName = "graph_beta_users_user_license_assignment" CreateTimeout = 180 UpdateTimeout = 180 ReadTimeout = 180 DeleteTimeout = 180 )
Variables ¶
This section is empty.
Functions ¶
func MapLicenseDetailsToTerraform ¶
func MapLicenseDetailsToTerraform(ctx context.Context, data *UserLicenseAssignmentResourceModel, licenseDetailsResponse graphmodels.LicenseDetailsCollectionResponseable)
MapLicenseDetailsToTerraform maps the license details response to Terraform state.
func MapRemoteResourceStateToTerraform ¶
func MapRemoteResourceStateToTerraform(ctx context.Context, data *UserLicenseAssignmentResourceModel, remoteResource graphmodels.Userable)
MapRemoteResourceStateToTerraform maps the properties of a User to Terraform state for license assignment.
Types ¶
type AssignedLicenseResourceModel ¶
type AssignedLicenseResourceModel struct {
SkuId types.String `tfsdk:"sku_id"`
DisabledPlans types.Set `tfsdk:"disabled_plans"`
}
AssignedLicenseResourceModel represents a license to be assigned to the user
type LicenseDetailsResourceModel ¶
type LicenseDetailsResourceModel struct {
SkuId types.String `tfsdk:"sku_id"`
SkuPartNumber types.String `tfsdk:"sku_part_number"`
ServicePlans types.List `tfsdk:"service_plans"`
}
LicenseDetailsResourceModel represents the current license assignment state (read-only)
type ServicePlanResourceModel ¶
type ServicePlanResourceModel struct {
ServicePlanId types.String `tfsdk:"service_plan_id"`
ServicePlanName types.String `tfsdk:"service_plan_name"`
ProvisioningStatus types.String `tfsdk:"provisioning_status"`
AppliesTo types.String `tfsdk:"applies_to"`
}
ServicePlanResourceModel represents individual service plans within a license
type UserLicenseAssignmentResource ¶
type UserLicenseAssignmentResource struct {
ProviderTypeName string
TypeName string
ReadPermissions []string
WritePermissions []string
ResourcePath string
// contains filtered or unexported fields
}
func (*UserLicenseAssignmentResource) Configure ¶
func (r *UserLicenseAssignmentResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
Configure sets the client for the resource.
func (*UserLicenseAssignmentResource) Create ¶
func (r *UserLicenseAssignmentResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
Create handles the creation of a user license assignment.
func (*UserLicenseAssignmentResource) Delete ¶
func (r *UserLicenseAssignmentResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
Delete handles the deletion of a user license assignment (removes all managed licenses).
func (*UserLicenseAssignmentResource) FullTypeName ¶
func (r *UserLicenseAssignmentResource) FullTypeName() string
FullTypeName returns the full resource type name in the format "providername_resourcename".
func (*UserLicenseAssignmentResource) ImportState ¶
func (r *UserLicenseAssignmentResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
ImportState imports the resource state.
func (*UserLicenseAssignmentResource) Metadata ¶
func (r *UserLicenseAssignmentResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
Metadata returns the resource type name.
func (*UserLicenseAssignmentResource) ModifyPlan ¶
func (r *UserLicenseAssignmentResource) ModifyPlan(ctx context.Context, req resource.ModifyPlanRequest, resp *resource.ModifyPlanResponse)
ModifyPlan handles plan modification for device health script assignments
func (*UserLicenseAssignmentResource) Read ¶
func (r *UserLicenseAssignmentResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
Read retrieves the current state of a user's license assignments.
func (*UserLicenseAssignmentResource) Schema ¶
func (r *UserLicenseAssignmentResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
Schema returns the schema for the resource.
func (*UserLicenseAssignmentResource) Update ¶
func (r *UserLicenseAssignmentResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
Update handles updates to a user's license assignments.
type UserLicenseAssignmentResourceModel ¶
type UserLicenseAssignmentResourceModel struct {
ID types.String `tfsdk:"id"`
UserId types.String `tfsdk:"user_id"`
UserPrincipalName types.String `tfsdk:"user_principal_name"`
AddLicenses []AssignedLicenseResourceModel `tfsdk:"add_licenses"`
RemoveLicenses types.Set `tfsdk:"remove_licenses"`
AssignedLicenses types.List `tfsdk:"assigned_licenses"`
Timeouts timeouts.Value `tfsdk:"timeouts"`
}
UserLicenseAssignmentResourceModel represents the Terraform resource model for user license assignment