graphBetaReuseablePolicySettings

package
v0.11.0-alpha Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ResourceName = "graph_beta_device_and_app_management_reuseable_policy_setting"
	ReadTimeout  = 180
)

Variables

This section is empty.

Functions

func NewReuseablePolicySettingsDataSource

func NewReuseablePolicySettingsDataSource() datasource.DataSource

Types

type ReuseablePolicySettingsDataSource

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

func (*ReuseablePolicySettingsDataSource) Configure

func (*ReuseablePolicySettingsDataSource) Metadata

Metadata returns the resource type name.

func (*ReuseablePolicySettingsDataSource) Read

Read handles the Read operation for Windows Platform Script data sources.

The function supports two methods of looking up a Windows Platform Script: 1. By ID - Uses a direct API call to fetch the specific script 2. By DisplayName - Lists all scripts and finds the matching one

The function ensures that: - Either ID or DisplayName is provided (but not both) - The lookup method is optimized based on the provided identifier - The remote state is properly mapped to the Terraform state

The function will:

  1. Extract and validate the configuration
  2. Verify that exactly one identifier (ID or DisplayName) is provided
  3. Perform the appropriate API call based on the provided identifier
  4. Map the remote state to the Terraform state
  5. Handle any errors and return appropriate diagnostics

If using ID:

  • Makes a direct GET request to the specific resource endpoint
  • Returns error if the ID is not found

If using DisplayName:

  • Retrieves all scripts and searches for matching display name
  • Returns error if no matching script is found

func (*ReuseablePolicySettingsDataSource) Schema

Jump to

Keyboard shortcuts

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