apitag

package
v0.20240524.1090207 Latest Latest
Warning

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

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

README

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

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

Client Initialization

client := apitag.NewApiTagClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ApiTagClient.TagAssignToApi

ctx := context.TODO()
id := apitag.NewApiTagID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "apiIdValue", "tagIdValue")

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

Example Usage: ApiTagClient.TagDetachFromApi

ctx := context.TODO()
id := apitag.NewApiTagID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "apiIdValue", "tagIdValue")

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

Example Usage: ApiTagClient.TagGetByApi

ctx := context.TODO()
id := apitag.NewApiTagID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "apiIdValue", "tagIdValue")

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

Example Usage: ApiTagClient.TagGetEntityStateByApi

ctx := context.TODO()
id := apitag.NewApiTagID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "apiIdValue", "tagIdValue")

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

Example Usage: ApiTagClient.TagListByApi

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

// alternatively `client.TagListByApi(ctx, id, apitag.DefaultTagListByApiOperationOptions())` can be used to do batched pagination
items, err := client.TagListByApiComplete(ctx, id, apitag.DefaultTagListByApiOperationOptions())
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 ValidateApiID

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

ValidateApiID checks that 'input' can be parsed as a Api ID

func ValidateApiTagID

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

ValidateApiTagID checks that 'input' can be parsed as a Api Tag ID

Types

type ApiId

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

ApiId is a struct representing the Resource ID for a Api

func NewApiID

func NewApiID(subscriptionId string, resourceGroupName string, serviceName string, apiId string) ApiId

NewApiID returns a new ApiId struct

func ParseApiID

func ParseApiID(input string) (*ApiId, error)

ParseApiID parses 'input' into a ApiId

func ParseApiIDInsensitively

func ParseApiIDInsensitively(input string) (*ApiId, error)

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

func (*ApiId) FromParseResult

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

func (ApiId) ID

func (id ApiId) ID() string

ID returns the formatted Api ID

func (ApiId) Segments

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

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

func (ApiId) String

func (id ApiId) String() string

String returns a human-readable description of this Api ID

type ApiTagClient

type ApiTagClient struct {
	Client *resourcemanager.Client
}

func NewApiTagClientWithBaseURI

func NewApiTagClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiTagClient, error)

func (ApiTagClient) TagAssignToApi

func (c ApiTagClient) TagAssignToApi(ctx context.Context, id ApiTagId) (result TagAssignToApiOperationResponse, err error)

TagAssignToApi ...

func (ApiTagClient) TagDetachFromApi

func (c ApiTagClient) TagDetachFromApi(ctx context.Context, id ApiTagId) (result TagDetachFromApiOperationResponse, err error)

TagDetachFromApi ...

func (ApiTagClient) TagGetByApi

func (c ApiTagClient) TagGetByApi(ctx context.Context, id ApiTagId) (result TagGetByApiOperationResponse, err error)

TagGetByApi ...

func (ApiTagClient) TagGetEntityStateByApi

func (c ApiTagClient) TagGetEntityStateByApi(ctx context.Context, id ApiTagId) (result TagGetEntityStateByApiOperationResponse, err error)

TagGetEntityStateByApi ...

func (ApiTagClient) TagListByApi

func (c ApiTagClient) TagListByApi(ctx context.Context, id ApiId, options TagListByApiOperationOptions) (result TagListByApiOperationResponse, err error)

TagListByApi ...

func (ApiTagClient) TagListByApiComplete

TagListByApiComplete retrieves all the results into a single object

func (ApiTagClient) TagListByApiCompleteMatchingPredicate

func (c ApiTagClient) TagListByApiCompleteMatchingPredicate(ctx context.Context, id ApiId, options TagListByApiOperationOptions, predicate TagContractOperationPredicate) (result TagListByApiCompleteResult, err error)

TagListByApiCompleteMatchingPredicate retrieves all the results and then applies the predicate

type ApiTagId

type ApiTagId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
	ApiId             string
	TagId             string
}

ApiTagId is a struct representing the Resource ID for a Api Tag

func NewApiTagID

func NewApiTagID(subscriptionId string, resourceGroupName string, serviceName string, apiId string, tagId string) ApiTagId

NewApiTagID returns a new ApiTagId struct

func ParseApiTagID

func ParseApiTagID(input string) (*ApiTagId, error)

ParseApiTagID parses 'input' into a ApiTagId

func ParseApiTagIDInsensitively

func ParseApiTagIDInsensitively(input string) (*ApiTagId, error)

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

func (*ApiTagId) FromParseResult

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

func (ApiTagId) ID

func (id ApiTagId) ID() string

ID returns the formatted Api Tag ID

func (ApiTagId) Segments

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

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

func (ApiTagId) String

func (id ApiTagId) String() string

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

type TagAssignToApiOperationResponse

type TagAssignToApiOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *TagContract
}

type TagContract

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

type TagContractOperationPredicate

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

func (TagContractOperationPredicate) Matches

type TagContractProperties

type TagContractProperties struct {
	DisplayName string `json:"displayName"`
}

type TagDetachFromApiOperationResponse

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

type TagGetByApiOperationResponse

type TagGetByApiOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *TagContract
}

type TagGetEntityStateByApiOperationResponse

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

type TagListByApiCompleteResult

type TagListByApiCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []TagContract
}

type TagListByApiOperationOptions

type TagListByApiOperationOptions struct {
	Filter *string
	Skip   *int64
	Top    *int64
}

func DefaultTagListByApiOperationOptions

func DefaultTagListByApiOperationOptions() TagListByApiOperationOptions

func (TagListByApiOperationOptions) ToHeaders

func (TagListByApiOperationOptions) ToOData

func (TagListByApiOperationOptions) ToQuery

type TagListByApiOperationResponse

type TagListByApiOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]TagContract
}

Jump to

Keyboard shortcuts

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