ListAssociatedGroups - Amazon CloudWatch Synthetics

ListAssociatedGroups

Returns a list of the groups that the specified canary is associated with. The canary that you specify must be in the current Region.

Request Syntax

POST /resource/resourceArn/groups HTTP/1.1 Content-type: application/json { "MaxResults": number, "NextToken": "string" }

URI Request Parameters

The request uses the following URI parameters.

resourceArn

The ARN of the canary that you want to view groups for.

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

Pattern: arn:(aws[a-zA-Z-]*)?:synthetics:[a-z]{2}((-gov)|(-iso(b?)))?-[a-z]+-\d{1}:\d{12}:canary:[0-9a-z_\-]{1,21}

Required: Yes

Request Body

The request accepts the following data in JSON format.

MaxResults

Specify this parameter to limit how many groups are returned each time you use the ListAssociatedGroups 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

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 1. Maximum length of 512.

Pattern: ^.+$

Required: No

Response Syntax

HTTP/1.1 200 Content-type: application/json { "Groups": [ { "Arn": "string", "Id": "string", "Name": "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.

Groups

An array of structures that contain information about the groups that this canary is associated with.

Type: Array of GroupSummary objects

NextToken

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

Type: String

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

Pattern: ^.+$

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

ResourceNotFoundException

One of the specified resources was not found.

HTTP Status Code: 404

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: