AWS SDK for Go (PILOT)
API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see https://docs.aws.amazon.com/sdk-for-go/api/.

We welcome your feedback on this new version of the documentation. Send your comments to aws-sdkdocs-feedback@amazon.com.

ResourceGroupsTaggingAPI

import "github.com/aws/aws-sdk-go/service/resourcegroupstaggingapi"

type ResourceGroupsTaggingAPI struct { *client.Client }

ResourceGroupsTaggingAPI provides the API operation methods for making requests to AWS Resource Groups Tagging API. See this package's package overview docs for details on the service.

ResourceGroupsTaggingAPI methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.

Client

Type: *client.Client

Method

GetResources

func (c *ResourceGroupsTaggingAPI) GetResources(input *GetResourcesInput) (*GetResourcesOutput, error)

GetResources API operation for AWS Resource Groups Tagging API.

Returns all the tagged resources that are associated with the specified tags (keys and values) located in the specified region for the AWS account. The tags and the resource types that you specify in the request are known as filters. The response includes all tags that are associated with the requested resources. If no filter is provided, this action returns a paginated resource list with the associated tags.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Resource Groups Tagging API's API operation GetResources for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidParameterException "InvalidParameterException" A parameter is missing or a malformed string or invalid or out-of-range value was supplied for the request parameter.

  • ErrCodeThrottledException "ThrottledException" The request was denied to limit the frequency of submitted requests.

  • ErrCodeInternalServiceException "InternalServiceException" The request processing failed because of an unknown error, exception, or failure. You can retry the request.

  • ErrCodePaginationTokenExpiredException "PaginationTokenExpiredException" A PaginationToken is valid for a maximum of 15 minutes. Your request was denied because the specified PaginationToken has expired.

See also, https://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26/GetResources

GetResourcesPages

func (c *ResourceGroupsTaggingAPI) GetResourcesPages(input *GetResourcesInput, fn func(*GetResourcesOutput, bool) bool) error

GetResourcesPages iterates over the pages of a GetResources operation, calling the "fn" function with the response data for each page. To stop iterating, return false from the fn function.

See GetResources method for more information on how to use this operation.

Note: This operation can generate multiple requests to a service.

// Example iterating over at most 3 pages of a GetResources operation. pageNum := 0 err := client.GetResourcesPages(params, func(page *GetResourcesOutput, lastPage bool) bool { pageNum++ fmt.Println(page) return pageNum <= 3 })

See Also

For more information about using this API, see AWS API Documentation.

GetResourcesPagesWithContext

func (c *ResourceGroupsTaggingAPI) GetResourcesPagesWithContext(ctx aws.Context, input *GetResourcesInput, fn func(*GetResourcesOutput, bool) bool, opts ...request.Option) error

GetResourcesPagesWithContext same as GetResourcesPages except it takes a Context and allows setting request options on the pages.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetResourcesRequest

func (c *ResourceGroupsTaggingAPI) GetResourcesRequest(input *GetResourcesInput) (req *request.Request, output *GetResourcesOutput)

GetResourcesRequest generates a "aws/request.Request" representing the client's request for the GetResources operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetResources for more information on using the GetResources API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetResourcesRequest method. req, resp := client.GetResourcesRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26/GetResources

GetResourcesWithContext

func (c *ResourceGroupsTaggingAPI) GetResourcesWithContext(ctx aws.Context, input *GetResourcesInput, opts ...request.Option) (*GetResourcesOutput, error)

GetResourcesWithContext is the same as GetResources with the addition of the ability to pass a context and additional request options.

See GetResources for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetTagKeys

func (c *ResourceGroupsTaggingAPI) GetTagKeys(input *GetTagKeysInput) (*GetTagKeysOutput, error)

GetTagKeys API operation for AWS Resource Groups Tagging API.

Returns all tag keys in the specified region for the AWS account.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Resource Groups Tagging API's API operation GetTagKeys for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidParameterException "InvalidParameterException" A parameter is missing or a malformed string or invalid or out-of-range value was supplied for the request parameter.

  • ErrCodeThrottledException "ThrottledException" The request was denied to limit the frequency of submitted requests.

  • ErrCodeInternalServiceException "InternalServiceException" The request processing failed because of an unknown error, exception, or failure. You can retry the request.

  • ErrCodePaginationTokenExpiredException "PaginationTokenExpiredException" A PaginationToken is valid for a maximum of 15 minutes. Your request was denied because the specified PaginationToken has expired.

See also, https://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26/GetTagKeys

GetTagKeysPages

func (c *ResourceGroupsTaggingAPI) GetTagKeysPages(input *GetTagKeysInput, fn func(*GetTagKeysOutput, bool) bool) error

GetTagKeysPages iterates over the pages of a GetTagKeys operation, calling the "fn" function with the response data for each page. To stop iterating, return false from the fn function.

See GetTagKeys method for more information on how to use this operation.

Note: This operation can generate multiple requests to a service.

// Example iterating over at most 3 pages of a GetTagKeys operation. pageNum := 0 err := client.GetTagKeysPages(params, func(page *GetTagKeysOutput, lastPage bool) bool { pageNum++ fmt.Println(page) return pageNum <= 3 })

See Also

For more information about using this API, see AWS API Documentation.

GetTagKeysPagesWithContext

func (c *ResourceGroupsTaggingAPI) GetTagKeysPagesWithContext(ctx aws.Context, input *GetTagKeysInput, fn func(*GetTagKeysOutput, bool) bool, opts ...request.Option) error

GetTagKeysPagesWithContext same as GetTagKeysPages except it takes a Context and allows setting request options on the pages.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetTagKeysRequest

func (c *ResourceGroupsTaggingAPI) GetTagKeysRequest(input *GetTagKeysInput) (req *request.Request, output *GetTagKeysOutput)

GetTagKeysRequest generates a "aws/request.Request" representing the client's request for the GetTagKeys operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetTagKeys for more information on using the GetTagKeys API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetTagKeysRequest method. req, resp := client.GetTagKeysRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26/GetTagKeys

GetTagKeysWithContext

func (c *ResourceGroupsTaggingAPI) GetTagKeysWithContext(ctx aws.Context, input *GetTagKeysInput, opts ...request.Option) (*GetTagKeysOutput, error)

GetTagKeysWithContext is the same as GetTagKeys with the addition of the ability to pass a context and additional request options.

See GetTagKeys for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetTagValues

func (c *ResourceGroupsTaggingAPI) GetTagValues(input *GetTagValuesInput) (*GetTagValuesOutput, error)

GetTagValues API operation for AWS Resource Groups Tagging API.

Returns all tag values for the specified key in the specified region for the AWS account.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Resource Groups Tagging API's API operation GetTagValues for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidParameterException "InvalidParameterException" A parameter is missing or a malformed string or invalid or out-of-range value was supplied for the request parameter.

  • ErrCodeThrottledException "ThrottledException" The request was denied to limit the frequency of submitted requests.

  • ErrCodeInternalServiceException "InternalServiceException" The request processing failed because of an unknown error, exception, or failure. You can retry the request.

  • ErrCodePaginationTokenExpiredException "PaginationTokenExpiredException" A PaginationToken is valid for a maximum of 15 minutes. Your request was denied because the specified PaginationToken has expired.

See also, https://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26/GetTagValues

GetTagValuesPages

func (c *ResourceGroupsTaggingAPI) GetTagValuesPages(input *GetTagValuesInput, fn func(*GetTagValuesOutput, bool) bool) error

GetTagValuesPages iterates over the pages of a GetTagValues operation, calling the "fn" function with the response data for each page. To stop iterating, return false from the fn function.

See GetTagValues method for more information on how to use this operation.

Note: This operation can generate multiple requests to a service.

// Example iterating over at most 3 pages of a GetTagValues operation. pageNum := 0 err := client.GetTagValuesPages(params, func(page *GetTagValuesOutput, lastPage bool) bool { pageNum++ fmt.Println(page) return pageNum <= 3 })

See Also

For more information about using this API, see AWS API Documentation.

GetTagValuesPagesWithContext

func (c *ResourceGroupsTaggingAPI) GetTagValuesPagesWithContext(ctx aws.Context, input *GetTagValuesInput, fn func(*GetTagValuesOutput, bool) bool, opts ...request.Option) error

GetTagValuesPagesWithContext same as GetTagValuesPages except it takes a Context and allows setting request options on the pages.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetTagValuesRequest

func (c *ResourceGroupsTaggingAPI) GetTagValuesRequest(input *GetTagValuesInput) (req *request.Request, output *GetTagValuesOutput)

GetTagValuesRequest generates a "aws/request.Request" representing the client's request for the GetTagValues operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetTagValues for more information on using the GetTagValues API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetTagValuesRequest method. req, resp := client.GetTagValuesRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26/GetTagValues

GetTagValuesWithContext

func (c *ResourceGroupsTaggingAPI) GetTagValuesWithContext(ctx aws.Context, input *GetTagValuesInput, opts ...request.Option) (*GetTagValuesOutput, error)

GetTagValuesWithContext is the same as GetTagValues with the addition of the ability to pass a context and additional request options.

See GetTagValues for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

TagResources

func (c *ResourceGroupsTaggingAPI) TagResources(input *TagResourcesInput) (*TagResourcesOutput, error)

TagResources API operation for AWS Resource Groups Tagging API.

Applies one or more tags to the specified resources. Note the following:

  • Each resource can have up to 50 tags. For other limits, see Tag Restrictions

(http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#tag-restrictions) in the Amazon EC2 User Guide for Linux Instances.
  • You can only tag resources that are located in the specified region for the AWS account.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Resource Groups Tagging API's API operation TagResources for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidParameterException "InvalidParameterException" A parameter is missing or a malformed string or invalid or out-of-range value was supplied for the request parameter.

  • ErrCodeThrottledException "ThrottledException" The request was denied to limit the frequency of submitted requests.

  • ErrCodeInternalServiceException "InternalServiceException" The request processing failed because of an unknown error, exception, or failure. You can retry the request.

See also, https://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26/TagResources

TagResourcesRequest

func (c *ResourceGroupsTaggingAPI) TagResourcesRequest(input *TagResourcesInput) (req *request.Request, output *TagResourcesOutput)

TagResourcesRequest generates a "aws/request.Request" representing the client's request for the TagResources operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See TagResources for more information on using the TagResources API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the TagResourcesRequest method. req, resp := client.TagResourcesRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26/TagResources

TagResourcesWithContext

func (c *ResourceGroupsTaggingAPI) TagResourcesWithContext(ctx aws.Context, input *TagResourcesInput, opts ...request.Option) (*TagResourcesOutput, error)

TagResourcesWithContext is the same as TagResources with the addition of the ability to pass a context and additional request options.

See TagResources for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

UntagResources

func (c *ResourceGroupsTaggingAPI) UntagResources(input *UntagResourcesInput) (*UntagResourcesOutput, error)

UntagResources API operation for AWS Resource Groups Tagging API.

Removes the specified tags from the specified resources. When you specify a tag key, the action removes both that key and its associated value. The operation succeeds even if you attempt to remove tags from a resource that were already removed. Note the following:

  • You can only tag resources that are located in the specified region for the AWS account.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS Resource Groups Tagging API's API operation UntagResources for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidParameterException "InvalidParameterException" A parameter is missing or a malformed string or invalid or out-of-range value was supplied for the request parameter.

  • ErrCodeThrottledException "ThrottledException" The request was denied to limit the frequency of submitted requests.

  • ErrCodeInternalServiceException "InternalServiceException" The request processing failed because of an unknown error, exception, or failure. You can retry the request.

See also, https://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26/UntagResources

UntagResourcesRequest

func (c *ResourceGroupsTaggingAPI) UntagResourcesRequest(input *UntagResourcesInput) (req *request.Request, output *UntagResourcesOutput)

UntagResourcesRequest generates a "aws/request.Request" representing the client's request for the UntagResources operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See UntagResources for more information on using the UntagResources API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the UntagResourcesRequest method. req, resp := client.UntagResourcesRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26/UntagResources

UntagResourcesWithContext

func (c *ResourceGroupsTaggingAPI) UntagResourcesWithContext(ctx aws.Context, input *UntagResourcesInput, opts ...request.Option) (*UntagResourcesOutput, error)

UntagResourcesWithContext is the same as UntagResources with the addition of the ability to pass a context and additional request options.

See UntagResources for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

On this page: