policydefinitions

package
v0.20241009.1142232 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: MPL-2.0 Imports: 10 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/resources/2015-11-01/policydefinitions Documentation

The policydefinitions SDK allows for interaction with Azure Resource Manager resources (API Version 2015-11-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/2015-11-01/policydefinitions"

Client Initialization

client := policydefinitions.NewPolicyDefinitionsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: PolicyDefinitionsClient.CreateOrUpdate

ctx := context.TODO()
id := policydefinitions.NewPolicydefinitionID("12345678-1234-9876-4563-123456789012", "policydefinitionName")

payload := policydefinitions.PolicyDefinition{
	// ...
}


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: PolicyDefinitionsClient.Delete

ctx := context.TODO()
id := policydefinitions.NewPolicydefinitionID("12345678-1234-9876-4563-123456789012", "policydefinitionName")

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: PolicyDefinitionsClient.Get

ctx := context.TODO()
id := policydefinitions.NewPolicydefinitionID("12345678-1234-9876-4563-123456789012", "policydefinitionName")

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
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidatePolicydefinitionID

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

ValidatePolicydefinitionID checks that 'input' can be parsed as a Policydefinition ID

Types

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type GetOperationResponse

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

type PolicyDefinition

type PolicyDefinition struct {
	Name       *string                     `json:"name,omitempty"`
	Properties *PolicyDefinitionProperties `json:"properties,omitempty"`
}

type PolicyDefinitionProperties

type PolicyDefinitionProperties struct {
	Description *string      `json:"description,omitempty"`
	DisplayName *string      `json:"displayName,omitempty"`
	PolicyRule  *interface{} `json:"policyRule,omitempty"`
}

type PolicyDefinitionsClient

type PolicyDefinitionsClient struct {
	Client *resourcemanager.Client
}

func NewPolicyDefinitionsClientWithBaseURI

func NewPolicyDefinitionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PolicyDefinitionsClient, error)

func (PolicyDefinitionsClient) CreateOrUpdate

CreateOrUpdate ...

func (PolicyDefinitionsClient) Delete

Delete ...

func (PolicyDefinitionsClient) Get

Get ...

type PolicydefinitionId

type PolicydefinitionId struct {
	SubscriptionId       string
	PolicydefinitionName string
}

PolicydefinitionId is a struct representing the Resource ID for a Policydefinition

func NewPolicydefinitionID

func NewPolicydefinitionID(subscriptionId string, policydefinitionName string) PolicydefinitionId

NewPolicydefinitionID returns a new PolicydefinitionId struct

func ParsePolicydefinitionID

func ParsePolicydefinitionID(input string) (*PolicydefinitionId, error)

ParsePolicydefinitionID parses 'input' into a PolicydefinitionId

func ParsePolicydefinitionIDInsensitively

func ParsePolicydefinitionIDInsensitively(input string) (*PolicydefinitionId, error)

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

func (*PolicydefinitionId) FromParseResult

func (id *PolicydefinitionId) FromParseResult(input resourceids.ParseResult) error

func (PolicydefinitionId) ID

func (id PolicydefinitionId) ID() string

ID returns the formatted Policydefinition ID

func (PolicydefinitionId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Policydefinition ID

func (PolicydefinitionId) String

func (id PolicydefinitionId) String() string

String returns a human-readable description of this Policydefinition ID

Jump to

Keyboard shortcuts

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