policysetdefinitions

package
v0.20230901.1104643 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: MPL-2.0 Imports: 12 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/resources/2021-06-01/policysetdefinitions Documentation

The policysetdefinitions SDK allows for interaction with the Azure Resource Manager Service resources (API Version 2021-06-01).

This readme covers example usages, but further information on using this SDK can be found in the project root.

Import Path

import "github.com/hashicorp/go-azure-sdk/resource-manager/resources/2021-06-01/policysetdefinitions"

Client Initialization

client := policysetdefinitions.NewPolicySetDefinitionsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: PolicySetDefinitionsClient.CreateOrUpdate

ctx := context.TODO()
id := policysetdefinitions.NewProviderPolicySetDefinitionID("12345678-1234-9876-4563-123456789012", "policySetDefinitionValue")

payload := policysetdefinitions.PolicySetDefinition{
	// ...
}


read, err := client.CreateOrUpdate(ctx, id, payload)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: PolicySetDefinitionsClient.CreateOrUpdateAtManagementGroup

ctx := context.TODO()
id := policysetdefinitions.NewProviders2PolicySetDefinitionID("managementGroupIdValue", "policySetDefinitionValue")

payload := policysetdefinitions.PolicySetDefinition{
	// ...
}


read, err := client.CreateOrUpdateAtManagementGroup(ctx, id, payload)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: PolicySetDefinitionsClient.Delete

ctx := context.TODO()
id := policysetdefinitions.NewProviderPolicySetDefinitionID("12345678-1234-9876-4563-123456789012", "policySetDefinitionValue")

read, err := client.Delete(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: PolicySetDefinitionsClient.DeleteAtManagementGroup

ctx := context.TODO()
id := policysetdefinitions.NewProviders2PolicySetDefinitionID("managementGroupIdValue", "policySetDefinitionValue")

read, err := client.DeleteAtManagementGroup(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: PolicySetDefinitionsClient.Get

ctx := context.TODO()
id := policysetdefinitions.NewProviderPolicySetDefinitionID("12345678-1234-9876-4563-123456789012", "policySetDefinitionValue")

read, err := client.Get(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: PolicySetDefinitionsClient.GetAtManagementGroup

ctx := context.TODO()
id := policysetdefinitions.NewProviders2PolicySetDefinitionID("managementGroupIdValue", "policySetDefinitionValue")

read, err := client.GetAtManagementGroup(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: PolicySetDefinitionsClient.GetBuiltIn

ctx := context.TODO()
id := policysetdefinitions.NewPolicySetDefinitionID("policySetDefinitionValue")

read, err := client.GetBuiltIn(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: PolicySetDefinitionsClient.List

ctx := context.TODO()
id := policysetdefinitions.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

// alternatively `client.List(ctx, id, policysetdefinitions.DefaultListOperationOptions())` can be used to do batched pagination
items, err := client.ListComplete(ctx, id, policysetdefinitions.DefaultListOperationOptions())
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: PolicySetDefinitionsClient.ListBuiltIn

ctx := context.TODO()


// alternatively `client.ListBuiltIn(ctx, policysetdefinitions.DefaultListBuiltInOperationOptions())` can be used to do batched pagination
items, err := client.ListBuiltInComplete(ctx, policysetdefinitions.DefaultListBuiltInOperationOptions())
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: PolicySetDefinitionsClient.ListByManagementGroup

ctx := context.TODO()
id := policysetdefinitions.NewManagementGroupID("groupIdValue")

// alternatively `client.ListByManagementGroup(ctx, id, policysetdefinitions.DefaultListByManagementGroupOperationOptions())` can be used to do batched pagination
items, err := client.ListByManagementGroupComplete(ctx, id, policysetdefinitions.DefaultListByManagementGroupOperationOptions())
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForParameterType

func PossibleValuesForParameterType() []string

func PossibleValuesForPolicyType

func PossibleValuesForPolicyType() []string

func ValidatePolicySetDefinitionID

func ValidatePolicySetDefinitionID(input interface{}, key string) (warnings []string, errors []error)

ValidatePolicySetDefinitionID checks that 'input' can be parsed as a Policy Set Definition ID

func ValidateProviderPolicySetDefinitionID

func ValidateProviderPolicySetDefinitionID(input interface{}, key string) (warnings []string, errors []error)

ValidateProviderPolicySetDefinitionID checks that 'input' can be parsed as a Provider Policy Set Definition ID

func ValidateProviders2PolicySetDefinitionID

func ValidateProviders2PolicySetDefinitionID(input interface{}, key string) (warnings []string, errors []error)

ValidateProviders2PolicySetDefinitionID checks that 'input' can be parsed as a Providers 2 Policy Set Definition ID

Types

type CreateOrUpdateAtManagementGroupOperationResponse

type CreateOrUpdateAtManagementGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *PolicySetDefinition
}

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *PolicySetDefinition
}

type DeleteAtManagementGroupOperationResponse

type DeleteAtManagementGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type GetAtManagementGroupOperationResponse

type GetAtManagementGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *PolicySetDefinition
}

type GetBuiltInOperationResponse

type GetBuiltInOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *PolicySetDefinition
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *PolicySetDefinition
}

type ListBuiltInCompleteResult

type ListBuiltInCompleteResult struct {
	Items []PolicySetDefinition
}

type ListBuiltInOperationOptions

type ListBuiltInOperationOptions struct {
	Filter *string
	Top    *int64
}

func DefaultListBuiltInOperationOptions

func DefaultListBuiltInOperationOptions() ListBuiltInOperationOptions

func (ListBuiltInOperationOptions) ToHeaders added in v0.20230509.1154719

func (ListBuiltInOperationOptions) ToOData added in v0.20230509.1154719

func (ListBuiltInOperationOptions) ToQuery added in v0.20230509.1154719

type ListBuiltInOperationResponse

type ListBuiltInOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]PolicySetDefinition
}

type ListByManagementGroupCompleteResult

type ListByManagementGroupCompleteResult struct {
	Items []PolicySetDefinition
}

type ListByManagementGroupOperationOptions

type ListByManagementGroupOperationOptions struct {
	Filter *string
	Top    *int64
}

func DefaultListByManagementGroupOperationOptions

func DefaultListByManagementGroupOperationOptions() ListByManagementGroupOperationOptions

func (ListByManagementGroupOperationOptions) ToHeaders added in v0.20230509.1154719

func (ListByManagementGroupOperationOptions) ToOData added in v0.20230509.1154719

func (ListByManagementGroupOperationOptions) ToQuery added in v0.20230509.1154719

type ListByManagementGroupOperationResponse

type ListByManagementGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]PolicySetDefinition
}

type ListCompleteResult

type ListCompleteResult struct {
	Items []PolicySetDefinition
}

type ListOperationOptions

type ListOperationOptions struct {
	Filter *string
	Top    *int64
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

func (ListOperationOptions) ToHeaders added in v0.20230509.1154719

func (o ListOperationOptions) ToHeaders() *client.Headers

func (ListOperationOptions) ToOData added in v0.20230509.1154719

func (o ListOperationOptions) ToOData() *odata.Query

func (ListOperationOptions) ToQuery added in v0.20230509.1154719

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]PolicySetDefinition
}

type ParameterDefinitionsValue

type ParameterDefinitionsValue struct {
	AllowedValues *[]interface{}                     `json:"allowedValues,omitempty"`
	DefaultValue  *interface{}                       `json:"defaultValue,omitempty"`
	Metadata      *ParameterDefinitionsValueMetadata `json:"metadata,omitempty"`
	Type          *ParameterType                     `json:"type,omitempty"`
}

type ParameterDefinitionsValueMetadata

type ParameterDefinitionsValueMetadata struct {
	AssignPermissions *bool   `json:"assignPermissions,omitempty"`
	Description       *string `json:"description,omitempty"`
	DisplayName       *string `json:"displayName,omitempty"`
	StrongType        *string `json:"strongType,omitempty"`
}

type ParameterType

type ParameterType string
const (
	ParameterTypeArray    ParameterType = "Array"
	ParameterTypeBoolean  ParameterType = "Boolean"
	ParameterTypeDateTime ParameterType = "DateTime"
	ParameterTypeFloat    ParameterType = "Float"
	ParameterTypeInteger  ParameterType = "Integer"
	ParameterTypeObject   ParameterType = "Object"
	ParameterTypeString   ParameterType = "String"
)

func (*ParameterType) UnmarshalJSON added in v0.20230509.1154719

func (s *ParameterType) UnmarshalJSON(bytes []byte) error

type ParameterValuesValue

type ParameterValuesValue struct {
	Value *interface{} `json:"value,omitempty"`
}

type PolicyDefinitionGroup

type PolicyDefinitionGroup struct {
	AdditionalMetadataId *string `json:"additionalMetadataId,omitempty"`
	Category             *string `json:"category,omitempty"`
	Description          *string `json:"description,omitempty"`
	DisplayName          *string `json:"displayName,omitempty"`
	Name                 string  `json:"name"`
}

type PolicyDefinitionReference

type PolicyDefinitionReference struct {
	GroupNames                  *[]string                        `json:"groupNames,omitempty"`
	Parameters                  *map[string]ParameterValuesValue `json:"parameters,omitempty"`
	PolicyDefinitionId          string                           `json:"policyDefinitionId"`
	PolicyDefinitionReferenceId *string                          `json:"policyDefinitionReferenceId,omitempty"`
}

type PolicySetDefinition

type PolicySetDefinition struct {
	Id         *string                        `json:"id,omitempty"`
	Name       *string                        `json:"name,omitempty"`
	Properties *PolicySetDefinitionProperties `json:"properties,omitempty"`
	SystemData *systemdata.SystemData         `json:"systemData,omitempty"`
	Type       *string                        `json:"type,omitempty"`
}

type PolicySetDefinitionId

type PolicySetDefinitionId struct {
	PolicySetDefinitionName string
}

PolicySetDefinitionId is a struct representing the Resource ID for a Policy Set Definition

func NewPolicySetDefinitionID

func NewPolicySetDefinitionID(policySetDefinitionName string) PolicySetDefinitionId

NewPolicySetDefinitionID returns a new PolicySetDefinitionId struct

func ParsePolicySetDefinitionID

func ParsePolicySetDefinitionID(input string) (*PolicySetDefinitionId, error)

ParsePolicySetDefinitionID parses 'input' into a PolicySetDefinitionId

func ParsePolicySetDefinitionIDInsensitively

func ParsePolicySetDefinitionIDInsensitively(input string) (*PolicySetDefinitionId, error)

ParsePolicySetDefinitionIDInsensitively parses 'input' case-insensitively into a PolicySetDefinitionId note: this method should only be used for API response data and not user input

func (PolicySetDefinitionId) ID

func (id PolicySetDefinitionId) ID() string

ID returns the formatted Policy Set Definition ID

func (PolicySetDefinitionId) Segments

func (id PolicySetDefinitionId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Policy Set Definition ID

func (PolicySetDefinitionId) String

func (id PolicySetDefinitionId) String() string

String returns a human-readable description of this Policy Set Definition ID

type PolicySetDefinitionOperationPredicate

type PolicySetDefinitionOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (PolicySetDefinitionOperationPredicate) Matches

type PolicySetDefinitionProperties

type PolicySetDefinitionProperties struct {
	Description            *string                               `json:"description,omitempty"`
	DisplayName            *string                               `json:"displayName,omitempty"`
	Metadata               *interface{}                          `json:"metadata,omitempty"`
	Parameters             *map[string]ParameterDefinitionsValue `json:"parameters,omitempty"`
	PolicyDefinitionGroups *[]PolicyDefinitionGroup              `json:"policyDefinitionGroups,omitempty"`
	PolicyDefinitions      []PolicyDefinitionReference           `json:"policyDefinitions"`
	PolicyType             *PolicyType                           `json:"policyType,omitempty"`
}

type PolicySetDefinitionsClient

type PolicySetDefinitionsClient struct {
	Client *resourcemanager.Client
}

func NewPolicySetDefinitionsClientWithBaseURI

func NewPolicySetDefinitionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PolicySetDefinitionsClient, error)

func (PolicySetDefinitionsClient) CreateOrUpdate

CreateOrUpdate ...

func (PolicySetDefinitionsClient) CreateOrUpdateAtManagementGroup

CreateOrUpdateAtManagementGroup ...

func (PolicySetDefinitionsClient) Delete

Delete ...

func (PolicySetDefinitionsClient) DeleteAtManagementGroup

DeleteAtManagementGroup ...

func (PolicySetDefinitionsClient) Get

Get ...

func (PolicySetDefinitionsClient) GetAtManagementGroup

GetAtManagementGroup ...

func (PolicySetDefinitionsClient) GetBuiltIn

GetBuiltIn ...

func (PolicySetDefinitionsClient) List

List ...

func (PolicySetDefinitionsClient) ListBuiltIn

ListBuiltIn ...

func (PolicySetDefinitionsClient) ListBuiltInComplete

ListBuiltInComplete retrieves all the results into a single object

func (PolicySetDefinitionsClient) ListBuiltInCompleteMatchingPredicate

func (c PolicySetDefinitionsClient) ListBuiltInCompleteMatchingPredicate(ctx context.Context, options ListBuiltInOperationOptions, predicate PolicySetDefinitionOperationPredicate) (result ListBuiltInCompleteResult, err error)

ListBuiltInCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (PolicySetDefinitionsClient) ListByManagementGroup

ListByManagementGroup ...

func (PolicySetDefinitionsClient) ListByManagementGroupComplete

ListByManagementGroupComplete retrieves all the results into a single object

func (PolicySetDefinitionsClient) ListByManagementGroupCompleteMatchingPredicate

ListByManagementGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (PolicySetDefinitionsClient) ListComplete

ListComplete retrieves all the results into a single object

func (PolicySetDefinitionsClient) ListCompleteMatchingPredicate

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

type PolicyType

type PolicyType string
const (
	PolicyTypeBuiltIn      PolicyType = "BuiltIn"
	PolicyTypeCustom       PolicyType = "Custom"
	PolicyTypeNotSpecified PolicyType = "NotSpecified"
	PolicyTypeStatic       PolicyType = "Static"
)

func (*PolicyType) UnmarshalJSON added in v0.20230509.1154719

func (s *PolicyType) UnmarshalJSON(bytes []byte) error

type ProviderPolicySetDefinitionId

type ProviderPolicySetDefinitionId struct {
	SubscriptionId          string
	PolicySetDefinitionName string
}

ProviderPolicySetDefinitionId is a struct representing the Resource ID for a Provider Policy Set Definition

func NewProviderPolicySetDefinitionID

func NewProviderPolicySetDefinitionID(subscriptionId string, policySetDefinitionName string) ProviderPolicySetDefinitionId

NewProviderPolicySetDefinitionID returns a new ProviderPolicySetDefinitionId struct

func ParseProviderPolicySetDefinitionID

func ParseProviderPolicySetDefinitionID(input string) (*ProviderPolicySetDefinitionId, error)

ParseProviderPolicySetDefinitionID parses 'input' into a ProviderPolicySetDefinitionId

func ParseProviderPolicySetDefinitionIDInsensitively

func ParseProviderPolicySetDefinitionIDInsensitively(input string) (*ProviderPolicySetDefinitionId, error)

ParseProviderPolicySetDefinitionIDInsensitively parses 'input' case-insensitively into a ProviderPolicySetDefinitionId note: this method should only be used for API response data and not user input

func (ProviderPolicySetDefinitionId) ID

ID returns the formatted Provider Policy Set Definition ID

func (ProviderPolicySetDefinitionId) Segments

Segments returns a slice of Resource ID Segments which comprise this Provider Policy Set Definition ID

func (ProviderPolicySetDefinitionId) String

String returns a human-readable description of this Provider Policy Set Definition ID

type Providers2PolicySetDefinitionId

type Providers2PolicySetDefinitionId struct {
	ManagementGroupId       string
	PolicySetDefinitionName string
}

Providers2PolicySetDefinitionId is a struct representing the Resource ID for a Providers 2 Policy Set Definition

func NewProviders2PolicySetDefinitionID

func NewProviders2PolicySetDefinitionID(managementGroupId string, policySetDefinitionName string) Providers2PolicySetDefinitionId

NewProviders2PolicySetDefinitionID returns a new Providers2PolicySetDefinitionId struct

func ParseProviders2PolicySetDefinitionID

func ParseProviders2PolicySetDefinitionID(input string) (*Providers2PolicySetDefinitionId, error)

ParseProviders2PolicySetDefinitionID parses 'input' into a Providers2PolicySetDefinitionId

func ParseProviders2PolicySetDefinitionIDInsensitively

func ParseProviders2PolicySetDefinitionIDInsensitively(input string) (*Providers2PolicySetDefinitionId, error)

ParseProviders2PolicySetDefinitionIDInsensitively parses 'input' case-insensitively into a Providers2PolicySetDefinitionId note: this method should only be used for API response data and not user input

func (Providers2PolicySetDefinitionId) ID

ID returns the formatted Providers 2 Policy Set Definition ID

func (Providers2PolicySetDefinitionId) Segments

Segments returns a slice of Resource ID Segments which comprise this Providers 2 Policy Set Definition ID

func (Providers2PolicySetDefinitionId) String

String returns a human-readable description of this Providers 2 Policy Set Definition ID

Jump to

Keyboard shortcuts

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