graphBetaEndpointPrivilegeManagement

package
v0.15.0-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 4, 2025 License: MPL-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ResourceName  = "graph_beta_device_management_endpoint_privilege_management"
	CreateTimeout = 180
	UpdateTimeout = 180
	ReadTimeout   = 180
	DeleteTimeout = 180
)

Variables

This section is empty.

Functions

func DeviceManagementConfigurationTechnologiesEnumBitmaskToTypeList

func DeviceManagementConfigurationTechnologiesEnumBitmaskToTypeList(technologies graphmodels.DeviceManagementConfigurationTechnologies) types.List

func MapRemoteResourceStateToTerraform

func MapRemoteResourceStateToTerraform(ctx context.Context, data *sharedmodels.SettingsCatalogProfileResourceModel, remoteResource graphmodels.DeviceManagementConfigurationPolicyable)

MapRemoteResourceStateToTerraform states the base properties of a EndpointPrivilegeManagementResourceModel to a Terraform state

func NewEndpointPrivilegeManagementResource

func NewEndpointPrivilegeManagementResource() resource.Resource

Types

type EndpointPrivilegeManagementResource

type EndpointPrivilegeManagementResource struct {
	ProviderTypeName string
	TypeName         string
	ReadPermissions  []string
	WritePermissions []string
	ResourcePath     string
	// contains filtered or unexported fields
}

func (*EndpointPrivilegeManagementResource) Configure

Configure sets the client for the resource.

func (*EndpointPrivilegeManagementResource) Create

Create handles the Create operation for Settings Catalog resources.

  • Retrieves the planned configuration from the create request
  • Constructs the resource request body from the plan
  • Sends POST request to create the base resource and settings
  • Captures the new resource ID from the response
  • Constructs and sends assignment configuration if specified
  • Sets initial state with planned values
  • Calls Read operation to fetch the latest state from the API
  • Updates the final state with the fresh data from the API

The function ensures that both the settings catalog profile and its assignments (if specified) are created properly. The settings must be defined during creation as they are required for a successful deployment, while assignments are optional.

func (*EndpointPrivilegeManagementResource) Delete

Delete handles the Delete operation for Settings Catalog resources.

  • Retrieves the current state from the delete request
  • Validates the state data and timeout configuration
  • Sends DELETE request to remove the resource from the API
  • Cleans up by removing the resource from Terraform state

All assignments and settings associated with the resource are automatically removed as part of the deletion.

func (*EndpointPrivilegeManagementResource) FullTypeName

func (r *EndpointPrivilegeManagementResource) FullTypeName() string

FullTypeName returns the full type name of the resource for logging purposes.

func (*EndpointPrivilegeManagementResource) ImportState

ImportState imports the resource state.

func (*EndpointPrivilegeManagementResource) Metadata

Metadata returns the resource type name.

func (*EndpointPrivilegeManagementResource) ModifyPlan

ModifyPlan handles plan modification for diff suppression

func (*EndpointPrivilegeManagementResource) Read

Read handles the Read operation for Settings Catalog resources.

  • Retrieves the current state from the read request
  • Gets the base resource details from the API
  • Maps the base resource details to Terraform state
  • Gets the settings configuration from the API
  • Maps the settings configuration to Terraform state
  • Gets the assignments configuration from the API
  • Maps the assignments configuration to Terraform state

The function ensures that all components (base resource, settings, and assignments) are properly read and mapped into the Terraform state, providing a complete view of the resource's current configuration on the server.

func (*EndpointPrivilegeManagementResource) Schema

Function to create the full device management win32 lob app schema

func (*EndpointPrivilegeManagementResource) Update

Update handles the Update operation for Settings Catalog resources.

  • Retrieves the planned changes from the update request
  • Constructs the resource request body from the plan
  • Sends PUT request to update the base resource and settings
  • Constructs the assignment request body from the plan
  • Sends POST request to update the assignments
  • Sets initial state with planned values
  • Calls Read operation to fetch the latest state from the API
  • Updates the final state with the fresh data from the API

The function ensures that both the settings and assignments are updated atomically, and the final state reflects the actual state of the resource on the server.

type PolicyTemplateConfig

type PolicyTemplateConfig struct {
	Platform     graphmodels.DeviceManagementConfigurationPlatforms
	Technologies graphmodels.DeviceManagementConfigurationTechnologies
	TemplateID   string
}

PolicyTemplateConfig is a struct that contains the platform, technologies, and template id for a device management policy.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL