apioperationpolicy

package
v0.20231215.1092747 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: MPL-2.0 Imports: 10 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apioperationpolicy Documentation

The apioperationpolicy SDK allows for interaction with the Azure Resource Manager Service apimanagement (API Version 2022-08-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/apimanagement/2022-08-01/apioperationpolicy"

Client Initialization

client := apioperationpolicy.NewApiOperationPolicyClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ApiOperationPolicyClient.CreateOrUpdate

ctx := context.TODO()
id := apioperationpolicy.NewOperationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "apiIdValue", "operationIdValue")

payload := apioperationpolicy.PolicyContract{
	// ...
}


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

Example Usage: ApiOperationPolicyClient.Delete

ctx := context.TODO()
id := apioperationpolicy.NewOperationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "apiIdValue", "operationIdValue")

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

Example Usage: ApiOperationPolicyClient.Get

ctx := context.TODO()
id := apioperationpolicy.NewOperationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "apiIdValue", "operationIdValue")

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

Example Usage: ApiOperationPolicyClient.GetEntityTag

ctx := context.TODO()
id := apioperationpolicy.NewOperationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "apiIdValue", "operationIdValue")

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: ApiOperationPolicyClient.ListByOperation

ctx := context.TODO()
id := apioperationpolicy.NewOperationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "apiIdValue", "operationIdValue")

read, err := client.ListByOperation(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 PossibleValuesForPolicyContentFormat

func PossibleValuesForPolicyContentFormat() []string

func PossibleValuesForPolicyExportFormat

func PossibleValuesForPolicyExportFormat() []string

func ValidateOperationID

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

ValidateOperationID checks that 'input' can be parsed as a Operation ID

Types

type ApiOperationPolicyClient

type ApiOperationPolicyClient struct {
	Client *resourcemanager.Client
}

func NewApiOperationPolicyClientWithBaseURI

func NewApiOperationPolicyClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiOperationPolicyClient, error)

func (ApiOperationPolicyClient) CreateOrUpdate

CreateOrUpdate ...

func (ApiOperationPolicyClient) Delete

Delete ...

func (ApiOperationPolicyClient) Get

Get ...

func (ApiOperationPolicyClient) GetEntityTag

GetEntityTag ...

func (ApiOperationPolicyClient) ListByOperation

ListByOperation ...

type CreateOrUpdateOperationOptions

type CreateOrUpdateOperationOptions struct {
	IfMatch *string
}

func DefaultCreateOrUpdateOperationOptions

func DefaultCreateOrUpdateOperationOptions() CreateOrUpdateOperationOptions

func (CreateOrUpdateOperationOptions) ToHeaders added in v0.20230801.1071415

func (CreateOrUpdateOperationOptions) ToOData added in v0.20230801.1071415

func (CreateOrUpdateOperationOptions) ToQuery added in v0.20230801.1071415

type CreateOrUpdateOperationResponse

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

type DeleteOperationOptions

type DeleteOperationOptions struct {
	IfMatch *string
}

func DefaultDeleteOperationOptions

func DefaultDeleteOperationOptions() DeleteOperationOptions

func (DeleteOperationOptions) ToHeaders added in v0.20230801.1071415

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

func (DeleteOperationOptions) ToOData added in v0.20230801.1071415

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

func (DeleteOperationOptions) ToQuery added in v0.20230801.1071415

type DeleteOperationResponse

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

type GetEntityTagOperationResponse

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

type GetOperationOptions

type GetOperationOptions struct {
	Format *PolicyExportFormat
}

func DefaultGetOperationOptions

func DefaultGetOperationOptions() GetOperationOptions

func (GetOperationOptions) ToHeaders added in v0.20230801.1071415

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

func (GetOperationOptions) ToOData added in v0.20230801.1071415

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

func (GetOperationOptions) ToQuery added in v0.20230801.1071415

func (o GetOperationOptions) ToQuery() *client.QueryParams

type GetOperationResponse

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

type ListByOperationOperationResponse

type ListByOperationOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *PolicyCollection
}

type OperationId

type OperationId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
	ApiId             string
	OperationId       string
}

OperationId is a struct representing the Resource ID for a Operation

func NewOperationID

func NewOperationID(subscriptionId string, resourceGroupName string, serviceName string, apiId string, operationId string) OperationId

NewOperationID returns a new OperationId struct

func ParseOperationID

func ParseOperationID(input string) (*OperationId, error)

ParseOperationID parses 'input' into a OperationId

func ParseOperationIDInsensitively

func ParseOperationIDInsensitively(input string) (*OperationId, error)

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

func (*OperationId) FromParseResult added in v0.20231127.1171502

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

func (OperationId) ID

func (id OperationId) ID() string

ID returns the formatted Operation ID

func (OperationId) Segments

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

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

func (OperationId) String

func (id OperationId) String() string

String returns a human-readable description of this Operation ID

type PolicyCollection

type PolicyCollection struct {
	Count    *int64            `json:"count,omitempty"`
	NextLink *string           `json:"nextLink,omitempty"`
	Value    *[]PolicyContract `json:"value,omitempty"`
}

type PolicyContentFormat

type PolicyContentFormat string
const (
	PolicyContentFormatRawxml             PolicyContentFormat = "rawxml"
	PolicyContentFormatRawxmlNegativelink PolicyContentFormat = "rawxml-link"
	PolicyContentFormatXml                PolicyContentFormat = "xml"
	PolicyContentFormatXmlNegativelink    PolicyContentFormat = "xml-link"
)

func (*PolicyContentFormat) UnmarshalJSON added in v0.20230801.1071415

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

type PolicyContract

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

type PolicyContractProperties

type PolicyContractProperties struct {
	Format *PolicyContentFormat `json:"format,omitempty"`
	Value  string               `json:"value"`
}

type PolicyExportFormat

type PolicyExportFormat string
const (
	PolicyExportFormatRawxml PolicyExportFormat = "rawxml"
	PolicyExportFormatXml    PolicyExportFormat = "xml"
)

func (*PolicyExportFormat) UnmarshalJSON added in v0.20230801.1071415

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

Jump to

Keyboard shortcuts

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