graphBetaResourceOperation

package
v0.14.1-alpha Latest Latest
Warning

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

Go to latest
Published: May 26, 2025 License: MPL-2.0 Imports: 21 Imported by: 0

Documentation

Overview

resource REF: https://learn.microsoft.com/en-us/graph/api/resources/intune-rbac-resourceoperation?view=graph-rest-beta

Index

Constants

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

Variables

This section is empty.

Functions

func NewResourceOperationResource

func NewResourceOperationResource() resource.Resource

Types

type ResourceOperationResource

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

func (*ResourceOperationResource) Configure

Configure sets the client for the resource.

func (*ResourceOperationResource) Create

Create handles the Create operation for Resource Operation 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
  • Sets initial state with planned values
  • Calls Read operation to fetch the latest state from the API with retry
  • Updates the final state with the fresh data from the API

func (*ResourceOperationResource) Delete

Delete handles the Delete operation for Resource Operation 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

func (*ResourceOperationResource) ImportState

ImportState imports the resource state.

func (*ResourceOperationResource) Metadata

Metadata returns the resource type name.

func (*ResourceOperationResource) ModifyPlan

ModifyPlan handles plan modification for resource operations

func (*ResourceOperationResource) Read

Read handles the Read operation for Resource Operation 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

func (*ResourceOperationResource) Schema

Schema returns the schema for the resource.

func (*ResourceOperationResource) Update

Update handles the Update operation for Resource Operation resources.

  • Retrieves the planned configuration from the update request
  • Retrieves the current state from the update request
  • Constructs the resource request body from the plan
  • Sends PATCH request to update the resource in the API
  • Calls Read operation to fetch the latest state from the API with retry
  • Updates the final state with the fresh data from the API

type ResourceOperationResourceModel

type ResourceOperationResourceModel struct {
	ID                        types.String   `tfsdk:"id"`
	Resource                  types.String   `tfsdk:"resource"`
	ResourceName              types.String   `tfsdk:"resource_name"`
	ActionName                types.String   `tfsdk:"action_name"`
	Description               types.String   `tfsdk:"description"`
	EnabledForScopeValidation types.Bool     `tfsdk:"enabled_for_scope_validation"`
	Timeouts                  timeouts.Value `tfsdk:"timeouts"`
}

func MapRemoteStateToTerraform

MapRemoteStateToTerraform maps a remote resource operation to the Terraform resource model

Jump to

Keyboard shortcuts

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