graphqlapiresolverpolicy

package
v0.20240131.1085516 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: MPL-2.0 Imports: 10 Imported by: 1

README

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

The graphqlapiresolverpolicy 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/graphqlapiresolverpolicy"

Client Initialization

client := graphqlapiresolverpolicy.NewGraphQLApiResolverPolicyClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: GraphQLApiResolverPolicyClient.CreateOrUpdate

ctx := context.TODO()
id := graphqlapiresolverpolicy.NewResolverID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "apiIdValue", "resolverIdValue")

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


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

Example Usage: GraphQLApiResolverPolicyClient.Delete

ctx := context.TODO()
id := graphqlapiresolverpolicy.NewResolverID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "apiIdValue", "resolverIdValue")

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

Example Usage: GraphQLApiResolverPolicyClient.Get

ctx := context.TODO()
id := graphqlapiresolverpolicy.NewResolverID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "apiIdValue", "resolverIdValue")

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

Example Usage: GraphQLApiResolverPolicyClient.GetEntityTag

ctx := context.TODO()
id := graphqlapiresolverpolicy.NewResolverID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "apiIdValue", "resolverIdValue")

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: GraphQLApiResolverPolicyClient.ListByResolver

ctx := context.TODO()
id := graphqlapiresolverpolicy.NewResolverID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "apiIdValue", "resolverIdValue")

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

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

ValidateResolverID checks that 'input' can be parsed as a Resolver 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        *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 GraphQLApiResolverPolicyClient

type GraphQLApiResolverPolicyClient struct {
	Client *resourcemanager.Client
}

func NewGraphQLApiResolverPolicyClientWithBaseURI

func NewGraphQLApiResolverPolicyClientWithBaseURI(sdkApi sdkEnv.Api) (*GraphQLApiResolverPolicyClient, error)

func (GraphQLApiResolverPolicyClient) CreateOrUpdate

CreateOrUpdate ...

func (GraphQLApiResolverPolicyClient) Delete

Delete ...

func (GraphQLApiResolverPolicyClient) Get

Get ...

func (GraphQLApiResolverPolicyClient) GetEntityTag

GetEntityTag ...

func (GraphQLApiResolverPolicyClient) ListByResolver

ListByResolver ...

func (GraphQLApiResolverPolicyClient) ListByResolverComplete

ListByResolverComplete retrieves all the results into a single object

func (GraphQLApiResolverPolicyClient) ListByResolverCompleteMatchingPredicate

func (c GraphQLApiResolverPolicyClient) ListByResolverCompleteMatchingPredicate(ctx context.Context, id ResolverId, predicate PolicyContractOperationPredicate) (result ListByResolverCompleteResult, err error)

ListByResolverCompleteMatchingPredicate retrieves all the results and then applies the predicate

type ListByResolverCompleteResult

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

type ListByResolverOperationResponse

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

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 ResolverId

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

ResolverId is a struct representing the Resource ID for a Resolver

func NewResolverID

func NewResolverID(subscriptionId string, resourceGroupName string, serviceName string, apiId string, resolverId string) ResolverId

NewResolverID returns a new ResolverId struct

func ParseResolverID

func ParseResolverID(input string) (*ResolverId, error)

ParseResolverID parses 'input' into a ResolverId

func ParseResolverIDInsensitively

func ParseResolverIDInsensitively(input string) (*ResolverId, error)

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

func (*ResolverId) FromParseResult

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

func (ResolverId) ID

func (id ResolverId) ID() string

ID returns the formatted Resolver ID

func (ResolverId) Segments

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

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

func (ResolverId) String

func (id ResolverId) String() string

String returns a human-readable description of this Resolver ID

Jump to

Keyboard shortcuts

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