选择您的 Cookie 首选项

我们使用必要 Cookie 和类似工具提供我们的网站和服务。我们使用性能 Cookie 收集匿名统计数据,以便我们可以了解客户如何使用我们的网站并进行改进。必要 Cookie 无法停用,但您可以单击“自定义”或“拒绝”来拒绝性能 Cookie。

如果您同意,AWS 和经批准的第三方还将使用 Cookie 提供有用的网站功能、记住您的首选项并显示相关内容,包括相关广告。要接受或拒绝所有非必要 Cookie,请单击“接受”或“拒绝”。要做出更详细的选择,请单击“自定义”。

DescribeCanaries - Amazon CloudWatch Synthetics
此页面尚未翻译为您的语言。 请求翻译

DescribeCanaries

This operation returns a list of the canaries in your account, along with full details about each canary.

This operation supports resource-level authorization using an IAM policy and the Names parameter. If you specify the Names parameter, the operation is successful only if you have authorization to view all the canaries that you specify in your request. If you do not have permission to view any of the canaries, the request fails with a 403 response.

You are required to use the Names parameter if you are logged on to a user or role that has an IAM policy that restricts which canaries that you are allowed to view. For more information, see Limiting a user to viewing specific canaries.

Request Syntax

POST /canaries HTTP/1.1 Content-type: application/json { "MaxResults": number, "Names": [ "string" ], "NextToken": "string" }

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

MaxResults

Specify this parameter to limit how many canaries are returned each time you use the DescribeCanaries operation. If you omit this parameter, the default of 20 is used.

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 20.

Required: No

Names

Use this parameter to return only canaries that match the names that you specify here. You can specify as many as five canary names.

If you specify this parameter, the operation is successful only if you have authorization to view all the canaries that you specify in your request. If you do not have permission to view any of the canaries, the request fails with a 403 response.

You are required to use this parameter if you are logged on to a user or role that has an IAM policy that restricts which canaries that you are allowed to view. For more information, see Limiting a user to viewing specific canaries.

Type: Array of strings

Array Members: Minimum number of 1 item. Maximum number of 5 items.

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

Pattern: ^[0-9a-z_\-]+$

Required: No

NextToken

A token that indicates that there is more data available. You can use this token in a subsequent operation to retrieve the next set of results.

Type: String

Length Constraints: Minimum length of 4. Maximum length of 252.

Required: No

Response Syntax

HTTP/1.1 200 Content-type: application/json { "Canaries": [ { "ArtifactConfig": { "S3Encryption": { "EncryptionMode": "string", "KmsKeyArn": "string" } }, "ArtifactS3Location": "string", "Code": { "Handler": "string", "SourceLocationArn": "string" }, "EngineArn": "string", "ExecutionRoleArn": "string", "FailureRetentionPeriodInDays": number, "Id": "string", "Name": "string", "ProvisionedResourceCleanup": "string", "RunConfig": { "ActiveTracing": boolean, "MemoryInMB": number, "TimeoutInSeconds": number }, "RuntimeVersion": "string", "Schedule": { "DurationInSeconds": number, "Expression": "string" }, "Status": { "State": "string", "StateReason": "string", "StateReasonCode": "string" }, "SuccessRetentionPeriodInDays": number, "Tags": { "string" : "string" }, "Timeline": { "Created": number, "LastModified": number, "LastStarted": number, "LastStopped": number }, "VisualReference": { "BaseCanaryRunId": "string", "BaseScreenshots": [ { "IgnoreCoordinates": [ "string" ], "ScreenshotName": "string" } ] }, "VpcConfig": { "Ipv6AllowedForDualStack": boolean, "SecurityGroupIds": [ "string" ], "SubnetIds": [ "string" ], "VpcId": "string" } } ], "NextToken": "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.

Canaries

Returns an array. Each item in the array contains the full information about one canary.

Type: Array of Canary objects

NextToken

A token that indicates that there is more data available. You can use this token in a subsequent DescribeCanaries operation to retrieve the next set of results.

Type: String

Length Constraints: Minimum length of 4. Maximum length of 252.

Errors

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

InternalServerException

An unknown internal error occurred.

HTTP Status Code: 500

ValidationException

A parameter could not be validated.

HTTP Status Code: 400

See Also

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

隐私网站条款Cookie 首选项
© 2025, Amazon Web Services, Inc. 或其附属公司。保留所有权利。