View a markdown version of this page

GetDataset - Amazon CloudWatch
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

GetDataset

Returns information about the specified dataset. This includes its identifier, Amazon Resource Name (ARN), and any customer managed Amazon Key Management Service (Amazon KMS) key that is currently associated with it.

Only the default dataset is supported. The default dataset is implicit for every account in every Region — you can call GetDataset for it without first creating it. If no customer managed KMS key has been associated with the dataset, the response omits the KmsKeyArn field, indicating that data is encrypted at rest using an Amazon owned key managed by Amazon CloudWatch.

To associate a customer managed KMS key with a dataset, use AssociateDatasetKmsKey. To remove the association, use DisassociateDatasetKmsKey.

Request Parameters

DatasetIdentifier

Specifies the identifier of the dataset to retrieve. For the default dataset, you can specify either default or the full dataset Amazon Resource Name (ARN) in the format arn:aws:cloudwatch:Region:account-id:dataset/default.

Type: String

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

Pattern: (default|arn:[a-zA-Z0-9-]+:cloudwatch:[a-zA-Z0-9-]*:\d{12}:dataset/default)

Required: Yes

Response Elements

The following elements are returned by the service.

Arn

Returns the Amazon Resource Name (ARN) of the dataset, in the format arn:aws:cloudwatch:Region:account-id:dataset/dataset-id .

Type: String

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

Pattern: arn:[a-zA-Z0-9-]+:cloudwatch:[a-zA-Z0-9-]*:\d{12}:dataset/default

DatasetId

Returns the identifier of the dataset.

Type: String

Length Constraints: Fixed length of 7.

Pattern: default

KmsKeyArn

Returns the Amazon Resource Name (ARN) of the customer managed Amazon KMS key that is currently associated with the dataset, if any. If the dataset is not associated with a customer managed KMS key, this field is not included in the response and the dataset is encrypted at rest using an Amazon owned key.

Type: String

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

Pattern: arn:[a-zA-Z0-9-]+:kms:[a-zA-Z0-9-]+:\d{12}:key/[a-f0-9-]+

Errors

For information about the errors that are common to all actions, see Common Error Types.

ResourceNotFoundException

The named resource does not exist.

HTTP Status Code: 404

See Also

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