package
0.20240715.1103416
Repository: https://github.com/hashicorp/go-azure-sdk.git
Documentation: pkg.go.dev

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

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

Example Usage: PolicyFragmentClient.ListReferences

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

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

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewPolicyFragmentID returns a new PolicyFragmentId struct.
NewServiceID returns a new ServiceId struct.
ParsePolicyFragmentID parses 'input' into a PolicyFragmentId.
ParsePolicyFragmentIDInsensitively parses 'input' case-insensitively into a PolicyFragmentId note: this method should only be used for API response data and not user input.
ParseServiceID parses 'input' into a ServiceId.
ParseServiceIDInsensitively parses 'input' case-insensitively into a ServiceId note: this method should only be used for API response data and not user input.
No description provided by the author
ValidatePolicyFragmentID checks that 'input' can be parsed as a Policy Fragment ID.
ValidateServiceID checks that 'input' can be parsed as a Service ID.

# Constants

No description provided by the author
No description provided by the author

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
PolicyFragmentId is a struct representing the Resource ID for a Policy Fragment.
No description provided by the author
No description provided by the author
ServiceId is a struct representing the Resource ID for a Service.

# Type aliases

No description provided by the author