• 沒有找到結果。

Request Parameters

在文檔中 Resource Groups Tagging API (頁 27-35)

"PaginationToken": "string"

}

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters (p. 51).

The request accepts the following data in JSON format.

PaginationToken (p. 23)

Specifies a PaginationToken response value from a previous request to indicate that you want the next page of results. Leave this parameter empty in your initial request.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 2048.

Pattern: [\s\S]*

Required: No

Response Syntax

{

"PaginationToken": "string", "TagKeys": [ "string" ] }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

PaginationToken (p. 23)

A string that indicates that there is more data available than this response contains. To receive the next part of the response, specify this response value as the PaginationToken value in the request for the next page.

Errors

Type: String

Length Constraints: Minimum length of 0. Maximum length of 2048.

Pattern: [\s\S]*

TagKeys (p. 23)

A list of all tag keys in the AWS account.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: ^([\p{L}\p{Z}\p{N}_.:\/=+\-@]*)$

Errors

For information about the errors that are common to all actions, see Common Errors (p. 53).

InternalServiceException

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

HTTP Status Code: 500 InvalidParameterException

This error indicates one of the following:

• A parameter is missing.

• A malformed string was supplied for the request parameter.

• An out-of-range value was supplied for the request parameter.

• The target ID is invalid, unsupported, or doesn't exist.

• You can't access the Amazon S3 bucket for report storage. For more information, see Additional Requirements for Organization-wide Tag Compliance Reports in the AWS Organizations User Guide.

HTTP Status Code: 400

PaginationTokenExpiredException

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

HTTP Status Code: 400 ThrottledException

The request was denied to limit the frequency of submitted requests.

HTTP Status Code: 400

Examples

Example

This example illustrates one usage of GetTagKeys.

See Also

User-Agent: aws-cli/1.11.79 Python/2.7.9 Windows/7 botocore/1.5.42 Content-Type: application/x-amz-json-1.1

Date: Fri, 21 Apr 2017 21:41:27 GMT {

"PaginationToken": "", "TagKeys": [

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

GetTagValues

GetTagValues

Returns all tag values for the specified key that are used in the specified AWS Region for the calling account.

This operation supports pagination, where the response can be sent in multiple pages. You should check the PaginationToken response parameter to determine if there are additional results available to return. Repeat the query, passing the PaginationToken response parameter value as an input to the next request until you recieve a null value. A null value for PaginationToken indicates that there are no more results waiting to be returned.

Request Syntax

{ "Key": "string",

"PaginationToken": "string"

}

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters (p. 51).

The request accepts the following data in JSON format.

Key (p. 26)

Specifies the tag key for which you want to list all existing values that are currently used in the specified AWS Region for the calling account.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: [\s\S]*

Required: Yes PaginationToken (p. 26)

Specifies a PaginationToken response value from a previous request to indicate that you want the next page of results. Leave this parameter empty in your initial request.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 2048.

Pattern: [\s\S]*

Required: No

Response Syntax

{

"PaginationToken": "string", "TagValues": [ "string" ]

Response Elements

}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

PaginationToken (p. 26)

A string that indicates that there is more data available than this response contains. To receive the next part of the response, specify this response value as the PaginationToken value in the request for the next page.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 2048.

Pattern: [\s\S]*

TagValues (p. 26)

A list of all tag values for the specified key currently used in the specified AWS Region for the calling account.

Type: Array of strings

Length Constraints: Minimum length of 0. Maximum length of 256.

Pattern: ^([\p{L}\p{Z}\p{N}_.:\/=+\-@]*)$

Errors

For information about the errors that are common to all actions, see Common Errors (p. 53).

InternalServiceException

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

HTTP Status Code: 500 InvalidParameterException

This error indicates one of the following:

• A parameter is missing.

• A malformed string was supplied for the request parameter.

• An out-of-range value was supplied for the request parameter.

• The target ID is invalid, unsupported, or doesn't exist.

• You can't access the Amazon S3 bucket for report storage. For more information, see Additional Requirements for Organization-wide Tag Compliance Reports in the AWS Organizations User Guide.

HTTP Status Code: 400

PaginationTokenExpiredException

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

Examples

HTTP Status Code: 400 ThrottledException

The request was denied to limit the frequency of submitted requests.

HTTP Status Code: 400

Examples

Example

This example illustrates one usage of GetTagValues.

Sample Request

User-Agent: aws-cli/1.11.79 Python/2.7.9 Windows/7 botocore/1.5.42 Content-Type: application/x-amz-json-1.1

Authorization: AUTHPARAMS {

"Key": "Example_key"

}

Date: Fri, 21 Apr 2017 21:45:25 GMT { "PaginationToken": "",

"TagValues": [ "Example_value"

] }

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

See Also

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

StartReportCreation

StartReportCreation

Generates a report that lists all tagged resources in the accounts across your organization and tells whether each resource is compliant with the effective tag policy. Compliance data is refreshed daily. The report is generated asynchronously.

The generated report is saved to the following location:

s3://example-bucket/AwsTagPolicies/o-exampleorgid/YYYY-MM-ddTHH:mm:ssZ/

report.csv

You can call this operation only from the organization's management account and from the us-east-1 Region.

Request Syntax

{ "S3Bucket": "string"

}

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters (p. 51).

The request accepts the following data in JSON format.

S3Bucket (p. 30)

The name of the Amazon S3 bucket where the report will be stored; for example:

awsexamplebucket

For more information on S3 bucket requirements, including an example bucket policy, see the example S3 bucket policy on this page.

Type: String

Length Constraints: Minimum length of 3. Maximum length of 63.

Pattern: [a-z0-9.-]*

Required: Yes

Response Elements

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

Errors

For information about the errors that are common to all actions, see Common Errors (p. 53).

ConcurrentModificationException

The target of the operation is currently being modified by a different request. Try again later.

Examples

HTTP Status Code: 400 ConstraintViolationException

The request was denied because performing this operation violates a constraint.

Some of the reasons in the following list might not apply to this specific operation.

• You must meet the prerequisites for using tag policies. For information, see Prerequisites and Permissions for Using Tag Policies in the AWS Organizations User Guide.

• You must enable the tag policies service principal (tagpolicies.tag.amazonaws.com) to integrate with AWS Organizations For information, see EnableAWSServiceAccess.

• You must have a tag policy attached to the organization root, an OU, or an account.

HTTP Status Code: 400 InternalServiceException

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

HTTP Status Code: 500 InvalidParameterException

This error indicates one of the following:

• A parameter is missing.

• A malformed string was supplied for the request parameter.

• An out-of-range value was supplied for the request parameter.

• The target ID is invalid, unsupported, or doesn't exist.

• You can't access the Amazon S3 bucket for report storage. For more information, see Additional Requirements for Organization-wide Tag Compliance Reports in the AWS Organizations User Guide.

HTTP Status Code: 400 ThrottledException

The request was denied to limit the frequency of submitted requests.

HTTP Status Code: 400

Examples

在文檔中 Resource Groups Tagging API (頁 27-35)

相關文件