Synthetics

2022/07/06 - Synthetics - 8 new api methods

Changes  This release introduces Group feature, which enables users to group cross-region canaries.

DisassociateResource (new) Link ¶

Removes a canary from a group. You must run this operation in the Region where the canary exists.

See also: AWS API Documentation

Request Syntax

client.disassociate_resource(
    GroupIdentifier='string',
    ResourceArn='string'
)
type GroupIdentifier

string

param GroupIdentifier

[REQUIRED]

Specifies the group. You can specify the group name, the ARN, or the group ID as the GroupIdentifier .

type ResourceArn

string

param ResourceArn

[REQUIRED]

The ARN of the canary that you want to remove from the specified group.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

ListGroups (new) Link ¶

Returns a list of all groups in the account, displaying their names, unique IDs, and ARNs. The groups from all Regions are returned.

See also: AWS API Documentation

Request Syntax

client.list_groups(
    NextToken='string',
    MaxResults=123
)
type NextToken

string

param 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 MaxResults

integer

param MaxResults

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

rtype

dict

returns

Response Syntax

{
    'Groups': [
        {
            'Id': 'string',
            'Name': 'string',
            'Arn': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Groups (list) --

      An array of structures that each contain information about one group.

      • (dict) --

        A structure containing some information about a group.

        • Id (string) --

          The unique ID of the group.

        • Name (string) --

          The name of the group.

        • Arn (string) --

          The ARN of the group.

    • NextToken (string) --

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

CreateGroup (new) Link ¶

Creates a group which you can use to associate canaries with each other, including cross-Region canaries. Using groups can help you with managing and automating your canaries, and you can also view aggregated run results and statistics for all canaries in a group.

Groups are global resources. When you create a group, it is replicated across Amazon Web Services Regions, and you can view it and add canaries to it from any Region. Although the group ARN format reflects the Region name where it was created, a group is not constrained to any Region. This means that you can put canaries from multiple Regions into the same group, and then use that group to view and manage all of those canaries in a single view.

Groups are supported in all Regions except the Regions that are disabled by default. For more information about these Regions, see Enabling a Region.

Each group can contain as many as 10 canaries. You can have as many as 20 groups in your account. Any single canary can be a member of up to 10 groups.

See also: AWS API Documentation

Request Syntax

client.create_group(
    Name='string',
    Tags={
        'string': 'string'
    }
)
type Name

string

param Name

[REQUIRED]

The name for the group. It can include any Unicode characters.

The names for all groups in your account, across all Regions, must be unique.

type Tags

dict

param Tags

A list of key-value pairs to associate with the group. You can associate as many as 50 tags with a group.

Tags can help you organize and categorize your resources. You can also use them to scope user permissions, by granting a user permission to access or change only the resources that have certain tag values.

  • (string) --

    • (string) --

rtype

dict

returns

Response Syntax

{
    'Group': {
        'Id': 'string',
        'Name': 'string',
        'Arn': 'string',
        'Tags': {
            'string': 'string'
        },
        'CreatedTime': datetime(2015, 1, 1),
        'LastModifiedTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • Group (dict) --

      A structure that contains information about the group that was just created.

      • Id (string) --

        The unique ID of the group.

      • Name (string) --

        The name of the group.

      • Arn (string) --

        The ARN of the group.

      • Tags (dict) --

        The list of key-value pairs that are associated with the canary.

        • (string) --

          • (string) --

      • CreatedTime (datetime) --

        The date and time that the group was created.

      • LastModifiedTime (datetime) --

        The date and time that the group was most recently updated.

ListGroupResources (new) Link ¶

This operation returns a list of the ARNs of the canaries that are associated with the specified group.

See also: AWS API Documentation

Request Syntax

client.list_group_resources(
    NextToken='string',
    MaxResults=123,
    GroupIdentifier='string'
)
type NextToken

string

param 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 MaxResults

integer

param MaxResults

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

type GroupIdentifier

string

param GroupIdentifier

[REQUIRED]

Specifies the group to return information for. You can specify the group name, the ARN, or the group ID as the GroupIdentifier .

rtype

dict

returns

Response Syntax

{
    'Resources': [
        'string',
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Resources (list) --

      An array of ARNs. These ARNs are for the canaries that are associated with the group.

      • (string) --

    • NextToken (string) --

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

GetGroup (new) Link ¶

Returns information about one group. Groups are a global resource, so you can use this operation from any Region.

See also: AWS API Documentation

Request Syntax

client.get_group(
    GroupIdentifier='string'
)
type GroupIdentifier

string

param GroupIdentifier

[REQUIRED]

Specifies the group to return information for. You can specify the group name, the ARN, or the group ID as the GroupIdentifier .

rtype

dict

returns

Response Syntax

{
    'Group': {
        'Id': 'string',
        'Name': 'string',
        'Arn': 'string',
        'Tags': {
            'string': 'string'
        },
        'CreatedTime': datetime(2015, 1, 1),
        'LastModifiedTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • Group (dict) --

      A structure that contains information about the group.

      • Id (string) --

        The unique ID of the group.

      • Name (string) --

        The name of the group.

      • Arn (string) --

        The ARN of the group.

      • Tags (dict) --

        The list of key-value pairs that are associated with the canary.

        • (string) --

          • (string) --

      • CreatedTime (datetime) --

        The date and time that the group was created.

      • LastModifiedTime (datetime) --

        The date and time that the group was most recently updated.

DeleteGroup (new) Link ¶

Deletes a group. The group doesn't need to be empty to be deleted. If there are canaries in the group, they are not deleted when you delete the group.

Groups are a global resource that appear in all Regions, but the request to delete a group must be made from its home Region. You can find the home Region of a group within its ARN.

See also: AWS API Documentation

Request Syntax

client.delete_group(
    GroupIdentifier='string'
)
type GroupIdentifier

string

param GroupIdentifier

[REQUIRED]

Specifies which group to delete. You can specify the group name, the ARN, or the group ID as the GroupIdentifier .

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

ListAssociatedGroups (new) Link ¶

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

See also: AWS API Documentation

Request Syntax

client.list_associated_groups(
    NextToken='string',
    MaxResults=123,
    ResourceArn='string'
)
type NextToken

string

param 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 MaxResults

integer

param 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 ResourceArn

string

param ResourceArn

[REQUIRED]

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

rtype

dict

returns

Response Syntax

{
    'Groups': [
        {
            'Id': 'string',
            'Name': 'string',
            'Arn': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Groups (list) --

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

      • (dict) --

        A structure containing some information about a group.

        • Id (string) --

          The unique ID of the group.

        • Name (string) --

          The name of the group.

        • Arn (string) --

          The ARN of the group.

    • NextToken (string) --

      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.

AssociateResource (new) Link ¶

Associates a canary with a group. Using groups can help you with managing and automating your canaries, and you can also view aggregated run results and statistics for all canaries in a group.

You must run this operation in the Region where the canary exists.

See also: AWS API Documentation

Request Syntax

client.associate_resource(
    GroupIdentifier='string',
    ResourceArn='string'
)
type GroupIdentifier

string

param GroupIdentifier

[REQUIRED]

Specifies the group. You can specify the group name, the ARN, or the group ID as the GroupIdentifier .

type ResourceArn

string

param ResourceArn

[REQUIRED]

The ARN of the canary that you want to associate with the specified group.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --