policyfragment

package
v0.20230314.1132615 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2023 License: MPL-2.0 Imports: 8 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

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type DeleteOperationOptions

type DeleteOperationOptions struct {
	IfMatch *string
}

func DefaultDeleteOperationOptions

func DefaultDeleteOperationOptions() DeleteOperationOptions

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
}

type GetEntityTagOperationResponse

type GetEntityTagOperationResponse struct {
	HttpResponse *http.Response
}

type GetOperationOptions

type GetOperationOptions struct {
	Format *PolicyFragmentContentFormat
}

func DefaultGetOperationOptions

func DefaultGetOperationOptions() GetOperationOptions

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	Model        *PolicyFragmentContract
}

type ListByServiceOperationOptions

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

func DefaultListByServiceOperationOptions

func DefaultListByServiceOperationOptions() ListByServiceOperationOptions

type ListByServiceOperationResponse

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

type ListReferencesOperationOptions

type ListReferencesOperationOptions struct {
	Skip *int64
	Top  *int64
}

func DefaultListReferencesOperationOptions

func DefaultListReferencesOperationOptions() ListReferencesOperationOptions

type ListReferencesOperationResponse

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

type PolicyFragmentClient

type PolicyFragmentClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewPolicyFragmentClientWithBaseURI

func NewPolicyFragmentClientWithBaseURI(endpoint string) PolicyFragmentClient

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"
)

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