policyrestriction

package
v0.20240325.1135512 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/policyrestriction Documentation

The policyrestriction SDK allows for interaction with the Azure Resource Manager Service apimanagement (API Version 2023-05-01-preview).

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/apimanagement/2023-05-01-preview/policyrestriction"

Client Initialization

client := policyrestriction.NewPolicyRestrictionClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: PolicyRestrictionClient.CreateOrUpdate

ctx := context.TODO()
id := policyrestriction.NewPolicyRestrictionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "policyRestrictionIdValue")

payload := policyrestriction.PolicyRestrictionContract{
	// ...
}


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

Example Usage: PolicyRestrictionClient.Delete

ctx := context.TODO()
id := policyrestriction.NewPolicyRestrictionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "policyRestrictionIdValue")

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

Example Usage: PolicyRestrictionClient.Get

ctx := context.TODO()
id := policyrestriction.NewPolicyRestrictionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "policyRestrictionIdValue")

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: PolicyRestrictionClient.GetEntityTag

ctx := context.TODO()
id := policyrestriction.NewPolicyRestrictionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "policyRestrictionIdValue")

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

Example Usage: PolicyRestrictionClient.Update

ctx := context.TODO()
id := policyrestriction.NewPolicyRestrictionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "policyRestrictionIdValue")

payload := policyrestriction.PolicyRestrictionUpdateContract{
	// ...
}


read, err := client.Update(ctx, id, payload, policyrestriction.DefaultUpdateOperationOptions())
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 PossibleValuesForPolicyRestrictionRequireBase

func PossibleValuesForPolicyRestrictionRequireBase() []string

func ValidatePolicyRestrictionID

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

ValidatePolicyRestrictionID checks that 'input' can be parsed as a Policy Restriction ID

Types

type CreateOrUpdateOperationOptions

type CreateOrUpdateOperationOptions struct {
	IfMatch *string
}

func DefaultCreateOrUpdateOperationOptions

func DefaultCreateOrUpdateOperationOptions() CreateOrUpdateOperationOptions

func (CreateOrUpdateOperationOptions) ToHeaders

func (CreateOrUpdateOperationOptions) ToOData

func (CreateOrUpdateOperationOptions) ToQuery

type CreateOrUpdateOperationResponse

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

type DeleteOperationOptions

type DeleteOperationOptions struct {
	IfMatch *string
}

func DefaultDeleteOperationOptions

func DefaultDeleteOperationOptions() DeleteOperationOptions

func (DeleteOperationOptions) ToHeaders

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

func (DeleteOperationOptions) ToOData

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

func (DeleteOperationOptions) ToQuery

type DeleteOperationResponse

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

type GetEntityTagOperationResponse

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

type GetOperationResponse

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

type PolicyRestrictionClient

type PolicyRestrictionClient struct {
	Client *resourcemanager.Client
}

func NewPolicyRestrictionClientWithBaseURI

func NewPolicyRestrictionClientWithBaseURI(sdkApi sdkEnv.Api) (*PolicyRestrictionClient, error)

func (PolicyRestrictionClient) CreateOrUpdate

CreateOrUpdate ...

func (PolicyRestrictionClient) Delete

Delete ...

func (PolicyRestrictionClient) Get

Get ...

func (PolicyRestrictionClient) GetEntityTag

GetEntityTag ...

func (PolicyRestrictionClient) Update

Update ...

type PolicyRestrictionContract

type PolicyRestrictionContract struct {
	Id         *string                              `json:"id,omitempty"`
	Name       *string                              `json:"name,omitempty"`
	Properties *PolicyRestrictionContractProperties `json:"properties,omitempty"`
	Type       *string                              `json:"type,omitempty"`
}

type PolicyRestrictionContractProperties

type PolicyRestrictionContractProperties struct {
	RequireBase *PolicyRestrictionRequireBase `json:"requireBase,omitempty"`
	Scope       *string                       `json:"scope,omitempty"`
}

type PolicyRestrictionId

type PolicyRestrictionId struct {
	SubscriptionId      string
	ResourceGroupName   string
	ServiceName         string
	PolicyRestrictionId string
}

PolicyRestrictionId is a struct representing the Resource ID for a Policy Restriction

func NewPolicyRestrictionID

func NewPolicyRestrictionID(subscriptionId string, resourceGroupName string, serviceName string, policyRestrictionId string) PolicyRestrictionId

NewPolicyRestrictionID returns a new PolicyRestrictionId struct

func ParsePolicyRestrictionID

func ParsePolicyRestrictionID(input string) (*PolicyRestrictionId, error)

ParsePolicyRestrictionID parses 'input' into a PolicyRestrictionId

func ParsePolicyRestrictionIDInsensitively

func ParsePolicyRestrictionIDInsensitively(input string) (*PolicyRestrictionId, error)

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

func (*PolicyRestrictionId) FromParseResult

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

func (PolicyRestrictionId) ID

func (id PolicyRestrictionId) ID() string

ID returns the formatted Policy Restriction ID

func (PolicyRestrictionId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Policy Restriction ID

func (PolicyRestrictionId) String

func (id PolicyRestrictionId) String() string

String returns a human-readable description of this Policy Restriction ID

type PolicyRestrictionRequireBase

type PolicyRestrictionRequireBase string
const (
	PolicyRestrictionRequireBaseFalse PolicyRestrictionRequireBase = "false"
	PolicyRestrictionRequireBaseTrue  PolicyRestrictionRequireBase = "true"
)

func (*PolicyRestrictionRequireBase) UnmarshalJSON

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

type PolicyRestrictionUpdateContract

type PolicyRestrictionUpdateContract struct {
	Properties *PolicyRestrictionContractProperties `json:"properties,omitempty"`
}

type UpdateOperationOptions

type UpdateOperationOptions struct {
	IfMatch *string
}

func DefaultUpdateOperationOptions

func DefaultUpdateOperationOptions() UpdateOperationOptions

func (UpdateOperationOptions) ToHeaders

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

func (UpdateOperationOptions) ToOData

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

func (UpdateOperationOptions) ToQuery

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *PolicyRestrictionContract
}

Jump to

Keyboard shortcuts

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