apioperationpolicy

package
v0.20240229.1102109 Latest Latest
Warning

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

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

README

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

The apioperationpolicy 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/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")

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

Example Usage: ApiOperationPolicyClient.WorkspaceApiOperationPolicyCreateOrUpdate

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

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


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

Example Usage: ApiOperationPolicyClient.WorkspaceApiOperationPolicyDelete

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

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

Example Usage: ApiOperationPolicyClient.WorkspaceApiOperationPolicyGet

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

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

Example Usage: ApiOperationPolicyClient.WorkspaceApiOperationPolicyGetEntityTag

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

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

Example Usage: ApiOperationPolicyClient.WorkspaceApiOperationPolicyListByOperation

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

// alternatively `client.WorkspaceApiOperationPolicyListByOperation(ctx, id)` can be used to do batched pagination
items, err := client.WorkspaceApiOperationPolicyListByOperationComplete(ctx, id)
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 PossibleValuesForPolicyContentFormat

func PossibleValuesForPolicyContentFormat() []string

func PossibleValuesForPolicyExportFormat

func PossibleValuesForPolicyExportFormat() []string

func ValidateApiOperationID

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

ValidateApiOperationID checks that 'input' can be parsed as a Api Operation ID

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 ApiOperationId

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

ApiOperationId is a struct representing the Resource ID for a Api Operation

func NewApiOperationID

func NewApiOperationID(subscriptionId string, resourceGroupName string, serviceName string, workspaceId string, apiId string, operationId string) ApiOperationId

NewApiOperationID returns a new ApiOperationId struct

func ParseApiOperationID

func ParseApiOperationID(input string) (*ApiOperationId, error)

ParseApiOperationID parses 'input' into a ApiOperationId

func ParseApiOperationIDInsensitively

func ParseApiOperationIDInsensitively(input string) (*ApiOperationId, error)

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

func (*ApiOperationId) FromParseResult

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

func (ApiOperationId) ID

func (id ApiOperationId) ID() string

ID returns the formatted Api Operation ID

func (ApiOperationId) Segments

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

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

func (ApiOperationId) String

func (id ApiOperationId) String() string

String returns a human-readable description of this Api Operation ID

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 ...

func (ApiOperationPolicyClient) ListByOperationComplete added in v0.20240226.1173038

ListByOperationComplete retrieves all the results into a single object

func (ApiOperationPolicyClient) ListByOperationCompleteMatchingPredicate added in v0.20240226.1173038

func (c ApiOperationPolicyClient) ListByOperationCompleteMatchingPredicate(ctx context.Context, id OperationId, predicate PolicyContractOperationPredicate) (result ListByOperationCompleteResult, err error)

ListByOperationCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ApiOperationPolicyClient) WorkspaceApiOperationPolicyCreateOrUpdate

WorkspaceApiOperationPolicyCreateOrUpdate ...

func (ApiOperationPolicyClient) WorkspaceApiOperationPolicyDelete

WorkspaceApiOperationPolicyDelete ...

func (ApiOperationPolicyClient) WorkspaceApiOperationPolicyGet

WorkspaceApiOperationPolicyGet ...

func (ApiOperationPolicyClient) WorkspaceApiOperationPolicyGetEntityTag

func (c ApiOperationPolicyClient) WorkspaceApiOperationPolicyGetEntityTag(ctx context.Context, id ApiOperationId) (result WorkspaceApiOperationPolicyGetEntityTagOperationResponse, err error)

WorkspaceApiOperationPolicyGetEntityTag ...

func (ApiOperationPolicyClient) WorkspaceApiOperationPolicyListByOperation

func (c ApiOperationPolicyClient) WorkspaceApiOperationPolicyListByOperation(ctx context.Context, id ApiOperationId) (result WorkspaceApiOperationPolicyListByOperationOperationResponse, err error)

WorkspaceApiOperationPolicyListByOperation ...

func (ApiOperationPolicyClient) WorkspaceApiOperationPolicyListByOperationComplete

func (c ApiOperationPolicyClient) WorkspaceApiOperationPolicyListByOperationComplete(ctx context.Context, id ApiOperationId) (WorkspaceApiOperationPolicyListByOperationCompleteResult, error)

WorkspaceApiOperationPolicyListByOperationComplete retrieves all the results into a single object

func (ApiOperationPolicyClient) WorkspaceApiOperationPolicyListByOperationCompleteMatchingPredicate

func (c ApiOperationPolicyClient) WorkspaceApiOperationPolicyListByOperationCompleteMatchingPredicate(ctx context.Context, id ApiOperationId, predicate PolicyContractOperationPredicate) (result WorkspaceApiOperationPolicyListByOperationCompleteResult, err error)

WorkspaceApiOperationPolicyListByOperationCompleteMatchingPredicate retrieves all the results and then applies the predicate

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        *PolicyContract
}

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 GetOperationOptions

type GetOperationOptions struct {
	Format *PolicyExportFormat
}

func DefaultGetOperationOptions

func DefaultGetOperationOptions() GetOperationOptions

func (GetOperationOptions) ToHeaders

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

func (GetOperationOptions) ToOData

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

func (GetOperationOptions) ToQuery

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

type GetOperationResponse

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

type ListByOperationCompleteResult added in v0.20240226.1173038

type ListByOperationCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []PolicyContract
}

type ListByOperationOperationResponse

type ListByOperationOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]PolicyContract
}

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

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 PolicyContentFormat

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

func (*PolicyContentFormat) UnmarshalJSON

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 PolicyContractOperationPredicate

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

func (PolicyContractOperationPredicate) Matches

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

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

type WorkspaceApiOperationPolicyCreateOrUpdateOperationOptions

type WorkspaceApiOperationPolicyCreateOrUpdateOperationOptions struct {
	IfMatch *string
}

func (WorkspaceApiOperationPolicyCreateOrUpdateOperationOptions) ToHeaders

func (WorkspaceApiOperationPolicyCreateOrUpdateOperationOptions) ToOData

func (WorkspaceApiOperationPolicyCreateOrUpdateOperationOptions) ToQuery

type WorkspaceApiOperationPolicyCreateOrUpdateOperationResponse

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

type WorkspaceApiOperationPolicyDeleteOperationOptions

type WorkspaceApiOperationPolicyDeleteOperationOptions struct {
	IfMatch *string
}

func DefaultWorkspaceApiOperationPolicyDeleteOperationOptions

func DefaultWorkspaceApiOperationPolicyDeleteOperationOptions() WorkspaceApiOperationPolicyDeleteOperationOptions

func (WorkspaceApiOperationPolicyDeleteOperationOptions) ToHeaders

func (WorkspaceApiOperationPolicyDeleteOperationOptions) ToOData

func (WorkspaceApiOperationPolicyDeleteOperationOptions) ToQuery

type WorkspaceApiOperationPolicyDeleteOperationResponse

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

type WorkspaceApiOperationPolicyGetEntityTagOperationResponse

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

type WorkspaceApiOperationPolicyGetOperationOptions

type WorkspaceApiOperationPolicyGetOperationOptions struct {
	Format *PolicyExportFormat
}

func DefaultWorkspaceApiOperationPolicyGetOperationOptions

func DefaultWorkspaceApiOperationPolicyGetOperationOptions() WorkspaceApiOperationPolicyGetOperationOptions

func (WorkspaceApiOperationPolicyGetOperationOptions) ToHeaders

func (WorkspaceApiOperationPolicyGetOperationOptions) ToOData

func (WorkspaceApiOperationPolicyGetOperationOptions) ToQuery

type WorkspaceApiOperationPolicyGetOperationResponse

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

type WorkspaceApiOperationPolicyListByOperationCompleteResult

type WorkspaceApiOperationPolicyListByOperationCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []PolicyContract
}

type WorkspaceApiOperationPolicyListByOperationOperationResponse

type WorkspaceApiOperationPolicyListByOperationOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]PolicyContract
}

Jump to

Keyboard shortcuts

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