producttag

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/producttag Documentation

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

Client Initialization

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

Example Usage: ProductTagClient.TagAssignToProduct

ctx := context.TODO()
id := producttag.NewProductTagID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "productIdValue", "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.NewProductTagID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "productIdValue", "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.NewProductTagID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "productIdValue", "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.NewProductTagID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "productIdValue", "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 ValidateProductTagID

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

ValidateProductTagID checks that 'input' can be parsed as a Product 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) FromParseResult

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

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 *resourcemanager.Client
}

func NewProductTagClientWithBaseURI

func NewProductTagClientWithBaseURI(sdkApi sdkEnv.Api) (*ProductTagClient, error)

func (ProductTagClient) TagAssignToProduct

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

TagAssignToProduct ...

func (ProductTagClient) TagDetachFromProduct

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

TagDetachFromProduct ...

func (ProductTagClient) TagGetByProduct

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

TagGetByProduct ...

func (ProductTagClient) TagGetEntityStateByProduct

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

TagGetEntityStateByProduct ...

func (ProductTagClient) TagListByProduct

TagListByProduct ...

func (ProductTagClient) TagListByProductComplete

TagListByProductComplete retrieves all the results into a single object

func (ProductTagClient) TagListByProductCompleteMatchingPredicate

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

TagListByProductCompleteMatchingPredicate retrieves all the results and then applies the predicate

type ProductTagId

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

ProductTagId is a struct representing the Resource ID for a Product Tag

func NewProductTagID

func NewProductTagID(subscriptionId string, resourceGroupName string, serviceName string, productId string, tagId string) ProductTagId

NewProductTagID returns a new ProductTagId struct

func ParseProductTagID

func ParseProductTagID(input string) (*ProductTagId, error)

ParseProductTagID parses 'input' into a ProductTagId

func ParseProductTagIDInsensitively

func ParseProductTagIDInsensitively(input string) (*ProductTagId, error)

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

func (*ProductTagId) FromParseResult

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

func (ProductTagId) ID

func (id ProductTagId) ID() string

ID returns the formatted Product Tag ID

func (ProductTagId) Segments

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

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

func (ProductTagId) String

func (id ProductTagId) String() string

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

type TagAssignToProductOperationResponse

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

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

type TagGetByProductOperationResponse

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

type TagGetEntityStateByProductOperationResponse

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

type TagListByProductCompleteResult

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

type TagListByProductOperationOptions

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

func DefaultTagListByProductOperationOptions

func DefaultTagListByProductOperationOptions() TagListByProductOperationOptions

func (TagListByProductOperationOptions) ToHeaders

func (TagListByProductOperationOptions) ToOData

func (TagListByProductOperationOptions) ToQuery

type TagListByProductOperationResponse

type TagListByProductOperationResponse 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