apitag

package
v0.20230227.1095030 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: MPL-2.0 Imports: 8 Imported by: 0

README

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

The apitag SDK allows for interaction with the Azure Resource Manager Service apimanagement (API Version 2021-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/2021-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.NewTagID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "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.NewTagID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "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.NewTagID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "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.NewTagID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "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 ValidateTagID

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

ValidateTagID checks that 'input' can be parsed as a 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) 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 autorest.Client
	// contains filtered or unexported fields
}

func NewApiTagClientWithBaseURI

func NewApiTagClientWithBaseURI(endpoint string) ApiTagClient

func (ApiTagClient) TagAssignToApi

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

TagAssignToApi ...

func (ApiTagClient) TagDetachFromApi

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

TagDetachFromApi ...

func (ApiTagClient) TagGetByApi

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

TagGetByApi ...

func (ApiTagClient) TagGetEntityStateByApi

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

TagGetEntityStateByApi ...

func (ApiTagClient) TagListByApi

TagListByApi ...

func (ApiTagClient) TagListByApiComplete

TagListByApiComplete retrieves all of the results into a single object

func (ApiTagClient) TagListByApiCompleteMatchingPredicate

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

TagListByApiCompleteMatchingPredicate retrieves all of the results and then applied the predicate

type TagAssignToApiOperationResponse

type TagAssignToApiOperationResponse struct {
	HttpResponse *http.Response
	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
}

type TagGetByApiOperationResponse

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

type TagGetEntityStateByApiOperationResponse

type TagGetEntityStateByApiOperationResponse struct {
	HttpResponse *http.Response
}

type TagId

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

TagId is a struct representing the Resource ID for a Tag

func NewTagID

func NewTagID(subscriptionId string, resourceGroupName string, serviceName string, tagId string) TagId

NewTagID returns a new TagId struct

func ParseTagID

func ParseTagID(input string) (*TagId, error)

ParseTagID parses 'input' into a TagId

func ParseTagIDInsensitively

func ParseTagIDInsensitively(input string) (*TagId, error)

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

func (TagId) ID

func (id TagId) ID() string

ID returns the formatted Tag ID

func (TagId) Segments

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

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

func (TagId) String

func (id TagId) String() string

String returns a human-readable description of this Tag ID

type TagListByApiCompleteResult

type TagListByApiCompleteResult struct {
	Items []TagContract
}

type TagListByApiOperationOptions

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

func DefaultTagListByApiOperationOptions

func DefaultTagListByApiOperationOptions() TagListByApiOperationOptions

type TagListByApiOperationResponse

type TagListByApiOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]TagContract
	// contains filtered or unexported fields
}

func (TagListByApiOperationResponse) HasMore

func (r TagListByApiOperationResponse) HasMore() bool

func (TagListByApiOperationResponse) LoadMore

Jump to

Keyboard shortcuts

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