tag

package
v0.20241126.2320 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/tag Documentation

The tag SDK allows for interaction with Azure Resource Manager apimanagement (API Version 2023-05-01-preview).

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/2023-05-01-preview/tag"

Client Initialization

client := tag.NewTagClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: TagClient.CreateOrUpdate

ctx := context.TODO()
id := tag.NewTagID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceName", "tagId")

payload := tag.TagCreateUpdateParameters{
	// ...
}


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

Example Usage: TagClient.Delete

ctx := context.TODO()
id := tag.NewTagID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceName", "tagId")

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

Example Usage: TagClient.Get

ctx := context.TODO()
id := tag.NewTagID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceName", "tagId")

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

Example Usage: TagClient.GetEntityState

ctx := context.TODO()
id := tag.NewTagID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceName", "tagId")

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

Example Usage: TagClient.ListByService

ctx := context.TODO()
id := tag.NewServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceName")

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

Example Usage: TagClient.Update

ctx := context.TODO()
id := tag.NewTagID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceName", "tagId")

payload := tag.TagCreateUpdateParameters{
	// ...
}


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

Example Usage: TagClient.WorkspaceTagCreateOrUpdate

ctx := context.TODO()
id := tag.NewWorkspaceTagID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceName", "workspaceId", "tagId")

payload := tag.TagCreateUpdateParameters{
	// ...
}


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

Example Usage: TagClient.WorkspaceTagDelete

ctx := context.TODO()
id := tag.NewWorkspaceTagID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceName", "workspaceId", "tagId")

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

Example Usage: TagClient.WorkspaceTagGet

ctx := context.TODO()
id := tag.NewWorkspaceTagID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceName", "workspaceId", "tagId")

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

Example Usage: TagClient.WorkspaceTagGetEntityState

ctx := context.TODO()
id := tag.NewWorkspaceTagID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceName", "workspaceId", "tagId")

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

Example Usage: TagClient.WorkspaceTagListByService

ctx := context.TODO()
id := tag.NewWorkspaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceName", "workspaceId")

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

Example Usage: TagClient.WorkspaceTagUpdate

ctx := context.TODO()
id := tag.NewWorkspaceTagID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceName", "workspaceId", "tagId")

payload := tag.TagCreateUpdateParameters{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateServiceID

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

ValidateServiceID checks that 'input' can be parsed as a Service ID

func ValidateTagID

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

ValidateTagID checks that 'input' can be parsed as a Tag ID

func ValidateWorkspaceID

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

ValidateWorkspaceID checks that 'input' can be parsed as a Workspace ID

func ValidateWorkspaceTagID

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

ValidateWorkspaceTagID checks that 'input' can be parsed as a Workspace Tag ID

Types

type CreateOrUpdateOperationOptions

type CreateOrUpdateOperationOptions struct {
	IfMatch *string
}

func DefaultCreateOrUpdateOperationOptions

func DefaultCreateOrUpdateOperationOptions() CreateOrUpdateOperationOptions

func (CreateOrUpdateOperationOptions) ToHeaders

func (CreateOrUpdateOperationOptions) ToOData

func (CreateOrUpdateOperationOptions) ToQuery

type CreateOrUpdateOperationResponse

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

type DeleteOperationOptions

type DeleteOperationOptions struct {
	IfMatch *string
}

func DefaultDeleteOperationOptions

func DefaultDeleteOperationOptions() DeleteOperationOptions

func (DeleteOperationOptions) ToHeaders

func (o DeleteOperationOptions) ToHeaders() *client.Headers

func (DeleteOperationOptions) ToOData

func (o DeleteOperationOptions) ToOData() *odata.Query

func (DeleteOperationOptions) ToQuery

type DeleteOperationResponse

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

type GetEntityStateOperationResponse

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

type GetOperationResponse

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

type ListByServiceCompleteResult

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

type ListByServiceCustomPager

type ListByServiceCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListByServiceCustomPager) NextPageLink() *odata.Link

type ListByServiceOperationOptions

type ListByServiceOperationOptions struct {
	Filter *string
	Scope  *string
	Skip   *int64
	Top    *int64
}

func DefaultListByServiceOperationOptions

func DefaultListByServiceOperationOptions() ListByServiceOperationOptions

func (ListByServiceOperationOptions) ToHeaders

func (ListByServiceOperationOptions) ToOData

func (ListByServiceOperationOptions) ToQuery

type ListByServiceOperationResponse

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

type ServiceId

type ServiceId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
}

ServiceId is a struct representing the Resource ID for a Service

func NewServiceID

func NewServiceID(subscriptionId string, resourceGroupName string, serviceName string) ServiceId

NewServiceID returns a new ServiceId struct

func ParseServiceID

func ParseServiceID(input string) (*ServiceId, error)

ParseServiceID parses 'input' into a ServiceId

func ParseServiceIDInsensitively

func ParseServiceIDInsensitively(input string) (*ServiceId, error)

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

func (*ServiceId) FromParseResult

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

func (ServiceId) ID

func (id ServiceId) ID() string

ID returns the formatted Service ID

func (ServiceId) Segments

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

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

func (ServiceId) String

func (id ServiceId) String() string

String returns a human-readable description of this Service ID

type TagClient

type TagClient struct {
	Client *resourcemanager.Client
}

func NewTagClientWithBaseURI

func NewTagClientWithBaseURI(sdkApi sdkEnv.Api) (*TagClient, error)

func (TagClient) CreateOrUpdate

CreateOrUpdate ...

func (TagClient) Delete

func (c TagClient) Delete(ctx context.Context, id TagId, options DeleteOperationOptions) (result DeleteOperationResponse, err error)

Delete ...

func (TagClient) Get

func (c TagClient) Get(ctx context.Context, id TagId) (result GetOperationResponse, err error)

Get ...

func (TagClient) GetEntityState

func (c TagClient) GetEntityState(ctx context.Context, id TagId) (result GetEntityStateOperationResponse, err error)

GetEntityState ...

func (TagClient) ListByService

ListByService ...

func (TagClient) ListByServiceComplete

ListByServiceComplete retrieves all the results into a single object

func (TagClient) ListByServiceCompleteMatchingPredicate

func (c TagClient) ListByServiceCompleteMatchingPredicate(ctx context.Context, id ServiceId, options ListByServiceOperationOptions, predicate TagContractOperationPredicate) (result ListByServiceCompleteResult, err error)

ListByServiceCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (TagClient) Update

Update ...

func (TagClient) WorkspaceTagCreateOrUpdate

WorkspaceTagCreateOrUpdate ...

func (TagClient) WorkspaceTagDelete

WorkspaceTagDelete ...

func (TagClient) WorkspaceTagGet

func (c TagClient) WorkspaceTagGet(ctx context.Context, id WorkspaceTagId) (result WorkspaceTagGetOperationResponse, err error)

WorkspaceTagGet ...

func (TagClient) WorkspaceTagGetEntityState

func (c TagClient) WorkspaceTagGetEntityState(ctx context.Context, id WorkspaceTagId) (result WorkspaceTagGetEntityStateOperationResponse, err error)

WorkspaceTagGetEntityState ...

func (TagClient) WorkspaceTagListByService

WorkspaceTagListByService ...

func (TagClient) WorkspaceTagListByServiceComplete

WorkspaceTagListByServiceComplete retrieves all the results into a single object

func (TagClient) WorkspaceTagListByServiceCompleteMatchingPredicate

func (c TagClient) WorkspaceTagListByServiceCompleteMatchingPredicate(ctx context.Context, id WorkspaceId, options WorkspaceTagListByServiceOperationOptions, predicate TagContractOperationPredicate) (result WorkspaceTagListByServiceCompleteResult, err error)

WorkspaceTagListByServiceCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (TagClient) WorkspaceTagUpdate

WorkspaceTagUpdate ...

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 TagCreateUpdateParameters

type TagCreateUpdateParameters struct {
	Properties *TagContractProperties `json:"properties,omitempty"`
}

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) FromParseResult

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

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 UpdateOperationOptions

type UpdateOperationOptions struct {
	IfMatch *string
}

func DefaultUpdateOperationOptions

func DefaultUpdateOperationOptions() UpdateOperationOptions

func (UpdateOperationOptions) ToHeaders

func (o UpdateOperationOptions) ToHeaders() *client.Headers

func (UpdateOperationOptions) ToOData

func (o UpdateOperationOptions) ToOData() *odata.Query

func (UpdateOperationOptions) ToQuery

type UpdateOperationResponse

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

type WorkspaceId

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

WorkspaceId is a struct representing the Resource ID for a Workspace

func NewWorkspaceID

func NewWorkspaceID(subscriptionId string, resourceGroupName string, serviceName string, workspaceId string) WorkspaceId

NewWorkspaceID returns a new WorkspaceId struct

func ParseWorkspaceID

func ParseWorkspaceID(input string) (*WorkspaceId, error)

ParseWorkspaceID parses 'input' into a WorkspaceId

func ParseWorkspaceIDInsensitively

func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error)

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

func (*WorkspaceId) FromParseResult

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

func (WorkspaceId) ID

func (id WorkspaceId) ID() string

ID returns the formatted Workspace ID

func (WorkspaceId) Segments

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

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

func (WorkspaceId) String

func (id WorkspaceId) String() string

String returns a human-readable description of this Workspace ID

type WorkspaceTagCreateOrUpdateOperationOptions

type WorkspaceTagCreateOrUpdateOperationOptions struct {
	IfMatch *string
}

func DefaultWorkspaceTagCreateOrUpdateOperationOptions

func DefaultWorkspaceTagCreateOrUpdateOperationOptions() WorkspaceTagCreateOrUpdateOperationOptions

func (WorkspaceTagCreateOrUpdateOperationOptions) ToHeaders

func (WorkspaceTagCreateOrUpdateOperationOptions) ToOData

func (WorkspaceTagCreateOrUpdateOperationOptions) ToQuery

type WorkspaceTagCreateOrUpdateOperationResponse

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

type WorkspaceTagDeleteOperationOptions

type WorkspaceTagDeleteOperationOptions struct {
	IfMatch *string
}

func DefaultWorkspaceTagDeleteOperationOptions

func DefaultWorkspaceTagDeleteOperationOptions() WorkspaceTagDeleteOperationOptions

func (WorkspaceTagDeleteOperationOptions) ToHeaders

func (WorkspaceTagDeleteOperationOptions) ToOData

func (WorkspaceTagDeleteOperationOptions) ToQuery

type WorkspaceTagDeleteOperationResponse

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

type WorkspaceTagGetEntityStateOperationResponse

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

type WorkspaceTagGetOperationResponse

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

type WorkspaceTagId

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

WorkspaceTagId is a struct representing the Resource ID for a Workspace Tag

func NewWorkspaceTagID

func NewWorkspaceTagID(subscriptionId string, resourceGroupName string, serviceName string, workspaceId string, tagId string) WorkspaceTagId

NewWorkspaceTagID returns a new WorkspaceTagId struct

func ParseWorkspaceTagID

func ParseWorkspaceTagID(input string) (*WorkspaceTagId, error)

ParseWorkspaceTagID parses 'input' into a WorkspaceTagId

func ParseWorkspaceTagIDInsensitively

func ParseWorkspaceTagIDInsensitively(input string) (*WorkspaceTagId, error)

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

func (*WorkspaceTagId) FromParseResult

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

func (WorkspaceTagId) ID

func (id WorkspaceTagId) ID() string

ID returns the formatted Workspace Tag ID

func (WorkspaceTagId) Segments

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

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

func (WorkspaceTagId) String

func (id WorkspaceTagId) String() string

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

type WorkspaceTagListByServiceCompleteResult

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

type WorkspaceTagListByServiceCustomPager

type WorkspaceTagListByServiceCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *WorkspaceTagListByServiceCustomPager) NextPageLink() *odata.Link

type WorkspaceTagListByServiceOperationOptions

type WorkspaceTagListByServiceOperationOptions struct {
	Filter *string
	Scope  *string
	Skip   *int64
	Top    *int64
}

func DefaultWorkspaceTagListByServiceOperationOptions

func DefaultWorkspaceTagListByServiceOperationOptions() WorkspaceTagListByServiceOperationOptions

func (WorkspaceTagListByServiceOperationOptions) ToHeaders

func (WorkspaceTagListByServiceOperationOptions) ToOData

func (WorkspaceTagListByServiceOperationOptions) ToQuery

type WorkspaceTagListByServiceOperationResponse

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

type WorkspaceTagUpdateOperationOptions

type WorkspaceTagUpdateOperationOptions struct {
	IfMatch *string
}

func DefaultWorkspaceTagUpdateOperationOptions

func DefaultWorkspaceTagUpdateOperationOptions() WorkspaceTagUpdateOperationOptions

func (WorkspaceTagUpdateOperationOptions) ToHeaders

func (WorkspaceTagUpdateOperationOptions) ToOData

func (WorkspaceTagUpdateOperationOptions) ToQuery

type WorkspaceTagUpdateOperationResponse

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