producttag

package
v0.20230418.1121253 Latest Latest
Warning

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

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

README

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

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

Client Initialization

client := producttag.NewProductTagClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ProductTagClient.TagAssignToProduct

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

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

Example Usage: ProductTagClient.TagDetachFromProduct

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

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

Example Usage: ProductTagClient.TagGetByProduct

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

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

Example Usage: ProductTagClient.TagGetEntityStateByProduct

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

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

Example Usage: ProductTagClient.TagListByProduct

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

// alternatively `client.TagListByProduct(ctx, id, producttag.DefaultTagListByProductOperationOptions())` can be used to do batched pagination
items, err := client.TagListByProductComplete(ctx, id, producttag.DefaultTagListByProductOperationOptions())
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 ValidateProductID

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

ValidateProductID checks that 'input' can be parsed as a Product 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 ProductId

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

ProductId is a struct representing the Resource ID for a Product

func NewProductID

func NewProductID(subscriptionId string, resourceGroupName string, serviceName string, productId string) ProductId

NewProductID returns a new ProductId struct

func ParseProductID

func ParseProductID(input string) (*ProductId, error)

ParseProductID parses 'input' into a ProductId

func ParseProductIDInsensitively

func ParseProductIDInsensitively(input string) (*ProductId, error)

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

func (ProductId) ID

func (id ProductId) ID() string

ID returns the formatted Product ID

func (ProductId) Segments

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

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

func (ProductId) String

func (id ProductId) String() string

String returns a human-readable description of this Product ID

type ProductTagClient

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

func NewProductTagClientWithBaseURI

func NewProductTagClientWithBaseURI(endpoint string) ProductTagClient

func (ProductTagClient) TagAssignToProduct

func (c ProductTagClient) TagAssignToProduct(ctx context.Context, id TagId) (result TagAssignToProductOperationResponse, err error)

TagAssignToProduct ...

func (ProductTagClient) TagDetachFromProduct

func (c ProductTagClient) TagDetachFromProduct(ctx context.Context, id TagId) (result TagDetachFromProductOperationResponse, err error)

TagDetachFromProduct ...

func (ProductTagClient) TagGetByProduct

func (c ProductTagClient) TagGetByProduct(ctx context.Context, id TagId) (result TagGetByProductOperationResponse, err error)

TagGetByProduct ...

func (ProductTagClient) TagGetEntityStateByProduct

func (c ProductTagClient) TagGetEntityStateByProduct(ctx context.Context, id TagId) (result TagGetEntityStateByProductOperationResponse, err error)

TagGetEntityStateByProduct ...

func (ProductTagClient) TagListByProduct

TagListByProduct ...

func (ProductTagClient) TagListByProductComplete

TagListByProductComplete retrieves all of the results into a single object

func (ProductTagClient) TagListByProductCompleteMatchingPredicate

func (c ProductTagClient) TagListByProductCompleteMatchingPredicate(ctx context.Context, id ProductId, options TagListByProductOperationOptions, predicate TagContractOperationPredicate) (resp TagListByProductCompleteResult, err error)

TagListByProductCompleteMatchingPredicate retrieves all of the results and then applied the predicate

type TagAssignToProductOperationResponse

type TagAssignToProductOperationResponse 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 TagDetachFromProductOperationResponse

type TagDetachFromProductOperationResponse struct {
	HttpResponse *http.Response
}

type TagGetByProductOperationResponse

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

type TagGetEntityStateByProductOperationResponse

type TagGetEntityStateByProductOperationResponse 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 TagListByProductCompleteResult

type TagListByProductCompleteResult struct {
	Items []TagContract
}

type TagListByProductOperationOptions

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

func DefaultTagListByProductOperationOptions

func DefaultTagListByProductOperationOptions() TagListByProductOperationOptions

type TagListByProductOperationResponse

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

func (TagListByProductOperationResponse) HasMore

func (TagListByProductOperationResponse) LoadMore

Jump to

Keyboard shortcuts

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