policyfragment

package
v0.20240109.1111358 Latest Latest
Warning

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

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

README

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

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

Client Initialization

client := policyfragment.NewPolicyFragmentClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: PolicyFragmentClient.CreateOrUpdate

ctx := context.TODO()
id := policyfragment.NewPolicyFragmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "policyFragmentValue")

payload := policyfragment.PolicyFragmentContract{
	// ...
}


if err := client.CreateOrUpdateThenPoll(ctx, id, payload, policyfragment.DefaultCreateOrUpdateOperationOptions()); err != nil {
	// handle the error
}

Example Usage: PolicyFragmentClient.Delete

ctx := context.TODO()
id := policyfragment.NewPolicyFragmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "policyFragmentValue")

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

Example Usage: PolicyFragmentClient.Get

ctx := context.TODO()
id := policyfragment.NewPolicyFragmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "policyFragmentValue")

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

Example Usage: PolicyFragmentClient.GetEntityTag

ctx := context.TODO()
id := policyfragment.NewPolicyFragmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "policyFragmentValue")

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: PolicyFragmentClient.ListByService

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

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

Example Usage: PolicyFragmentClient.ListReferences

ctx := context.TODO()
id := policyfragment.NewPolicyFragmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "policyFragmentValue")

read, err := client.ListReferences(ctx, id, policyfragment.DefaultListReferencesOperationOptions())
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 PossibleValuesForPolicyFragmentContentFormat

func PossibleValuesForPolicyFragmentContentFormat() []string

func ValidatePolicyFragmentID

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

ValidatePolicyFragmentID checks that 'input' can be parsed as a Policy Fragment ID

func ValidateServiceID

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

ValidateServiceID checks that 'input' can be parsed as a Service ID

Types

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 {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

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

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

type ListByServiceOperationOptions

type ListByServiceOperationOptions struct {
	Filter  *string
	Orderby *string
	Skip    *int64
	Top     *int64
}

func DefaultListByServiceOperationOptions

func DefaultListByServiceOperationOptions() ListByServiceOperationOptions

func (ListByServiceOperationOptions) ToHeaders added in v0.20230801.1071415

func (ListByServiceOperationOptions) ToOData added in v0.20230801.1071415

func (ListByServiceOperationOptions) ToQuery added in v0.20230801.1071415

type ListByServiceOperationResponse

type ListByServiceOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *PolicyFragmentCollection
}

type ListReferencesOperationOptions

type ListReferencesOperationOptions struct {
	Skip *int64
	Top  *int64
}

func DefaultListReferencesOperationOptions

func DefaultListReferencesOperationOptions() ListReferencesOperationOptions

func (ListReferencesOperationOptions) ToHeaders added in v0.20230801.1071415

func (ListReferencesOperationOptions) ToOData added in v0.20230801.1071415

func (ListReferencesOperationOptions) ToQuery added in v0.20230801.1071415

type ListReferencesOperationResponse

type ListReferencesOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ResourceCollection
}

type PolicyFragmentClient

type PolicyFragmentClient struct {
	Client *resourcemanager.Client
}

func NewPolicyFragmentClientWithBaseURI

func NewPolicyFragmentClientWithBaseURI(sdkApi sdkEnv.Api) (*PolicyFragmentClient, error)

func (PolicyFragmentClient) CreateOrUpdate

CreateOrUpdate ...

func (PolicyFragmentClient) CreateOrUpdateThenPoll

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (PolicyFragmentClient) Delete

Delete ...

func (PolicyFragmentClient) Get

Get ...

func (PolicyFragmentClient) GetEntityTag

GetEntityTag ...

func (PolicyFragmentClient) ListByService

ListByService ...

func (PolicyFragmentClient) ListReferences

ListReferences ...

type PolicyFragmentCollection

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

type PolicyFragmentContentFormat

type PolicyFragmentContentFormat string
const (
	PolicyFragmentContentFormatRawxml PolicyFragmentContentFormat = "rawxml"
	PolicyFragmentContentFormatXml    PolicyFragmentContentFormat = "xml"
)

func (*PolicyFragmentContentFormat) UnmarshalJSON added in v0.20230801.1071415

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

type PolicyFragmentContract

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

type PolicyFragmentContractProperties

type PolicyFragmentContractProperties struct {
	Description *string                      `json:"description,omitempty"`
	Format      *PolicyFragmentContentFormat `json:"format,omitempty"`
	Value       string                       `json:"value"`
}

type PolicyFragmentId

type PolicyFragmentId struct {
	SubscriptionId     string
	ResourceGroupName  string
	ServiceName        string
	PolicyFragmentName string
}

PolicyFragmentId is a struct representing the Resource ID for a Policy Fragment

func NewPolicyFragmentID

func NewPolicyFragmentID(subscriptionId string, resourceGroupName string, serviceName string, policyFragmentName string) PolicyFragmentId

NewPolicyFragmentID returns a new PolicyFragmentId struct

func ParsePolicyFragmentID

func ParsePolicyFragmentID(input string) (*PolicyFragmentId, error)

ParsePolicyFragmentID parses 'input' into a PolicyFragmentId

func ParsePolicyFragmentIDInsensitively

func ParsePolicyFragmentIDInsensitively(input string) (*PolicyFragmentId, error)

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

func (*PolicyFragmentId) FromParseResult added in v0.20231127.1171502

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

func (PolicyFragmentId) ID

func (id PolicyFragmentId) ID() string

ID returns the formatted Policy Fragment ID

func (PolicyFragmentId) Segments

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

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

func (PolicyFragmentId) String

func (id PolicyFragmentId) String() string

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

type Resource

type Resource struct {
	Id   *string `json:"id,omitempty"`
	Name *string `json:"name,omitempty"`
	Type *string `json:"type,omitempty"`
}

type ResourceCollection

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

type ServiceId

type ServiceId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
}

ServiceId is a struct representing the Resource ID for a Service

func NewServiceID

func NewServiceID(subscriptionId string, resourceGroupName string, serviceName string) ServiceId

NewServiceID returns a new ServiceId struct

func ParseServiceID

func ParseServiceID(input string) (*ServiceId, error)

ParseServiceID parses 'input' into a ServiceId

func ParseServiceIDInsensitively

func ParseServiceIDInsensitively(input string) (*ServiceId, error)

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

func (*ServiceId) FromParseResult added in v0.20231127.1171502

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

func (ServiceId) ID

func (id ServiceId) ID() string

ID returns the formatted Service ID

func (ServiceId) Segments

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

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

func (ServiceId) String

func (id ServiceId) String() string

String returns a human-readable description of this Service ID

Jump to

Keyboard shortcuts

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