Skip to content

SyntheticsClient

Index > Synthetics > SyntheticsClient

Auto-generated documentation for Synthetics type annotations stubs module types-aiobotocore-synthetics.

SyntheticsClient

Type annotations and code completion for session.client("synthetics") boto3 documentation

Usage example
from aioboto3.session import Session
from types_aiobotocore_synthetics.client import SyntheticsClient

session = Session()
async with session.client("synthetics") as client:
    client: SyntheticsClient

Exceptions

aioboto3 client exceptions are generated in runtime. This class provides code completion for session.client("synthetics").exceptions structure.

Usage example
async with session.client("synthetics") as client:
    try:
        do_something(client)
    except (
            client.BadRequestException,
        client.ClientError,
        client.ConflictException,
        client.InternalFailureException,
        client.InternalServerException,
        client.NotFoundException,
        client.RequestEntityTooLargeException,
        client.ResourceNotFoundException,
        client.ServiceQuotaExceededException,
        client.TooManyRequestsException,
        client.ValidationException,
    ) as e:
        print(e)
Type checking example
from types_aiobotocore_synthetics.client import Exceptions

def handle_error(exc: Exceptions.BadRequestException) -> None:
    ...

Methods

associate_resource

Associates a canary with a group.

Type annotations and code completion for session.client("synthetics").associate_resource method. boto3 documentation

Method definition
await def associate_resource(
    self,
    *,
    GroupIdentifier: str,
    ResourceArn: str,
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: AssociateResourceRequestRequestTypeDef = {  # (1)
    "GroupIdentifier": ...,
    "ResourceArn": ...,
}

parent.associate_resource(**kwargs)
  1. See AssociateResourceRequestRequestTypeDef

can_paginate

Check if an operation can be paginated.

Type annotations and code completion for session.client("synthetics").can_paginate method. boto3 documentation

Method definition
def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

close

Closes underlying endpoint connections.

Type annotations and code completion for session.client("synthetics").close method. boto3 documentation

Method definition
await def close(
    self,
) -> None:
    ...

create_canary

Creates a canary.

Type annotations and code completion for session.client("synthetics").create_canary method. boto3 documentation

Method definition
await def create_canary(
    self,
    *,
    Name: str,
    Code: CanaryCodeInputTypeDef,  # (1)
    ArtifactS3Location: str,
    ExecutionRoleArn: str,
    Schedule: CanaryScheduleInputTypeDef,  # (2)
    RuntimeVersion: str,
    RunConfig: CanaryRunConfigInputTypeDef = ...,  # (3)
    SuccessRetentionPeriodInDays: int = ...,
    FailureRetentionPeriodInDays: int = ...,
    VpcConfig: VpcConfigInputTypeDef = ...,  # (4)
    Tags: Mapping[str, str] = ...,
    ArtifactConfig: ArtifactConfigInputTypeDef = ...,  # (5)
) -> CreateCanaryResponseTypeDef:  # (6)
    ...
  1. See CanaryCodeInputTypeDef
  2. See CanaryScheduleInputTypeDef
  3. See CanaryRunConfigInputTypeDef
  4. See VpcConfigInputTypeDef
  5. See ArtifactConfigInputTypeDef
  6. See CreateCanaryResponseTypeDef
Usage example with kwargs
kwargs: CreateCanaryRequestRequestTypeDef = {  # (1)
    "Name": ...,
    "Code": ...,
    "ArtifactS3Location": ...,
    "ExecutionRoleArn": ...,
    "Schedule": ...,
    "RuntimeVersion": ...,
}

parent.create_canary(**kwargs)
  1. See CreateCanaryRequestRequestTypeDef

create_group

Creates a group which you can use to associate canaries with each other, including cross-Region canaries.

Type annotations and code completion for session.client("synthetics").create_group method. boto3 documentation

Method definition
await def create_group(
    self,
    *,
    Name: str,
    Tags: Mapping[str, str] = ...,
) -> CreateGroupResponseTypeDef:  # (1)
    ...
  1. See CreateGroupResponseTypeDef
Usage example with kwargs
kwargs: CreateGroupRequestRequestTypeDef = {  # (1)
    "Name": ...,
}

parent.create_group(**kwargs)
  1. See CreateGroupRequestRequestTypeDef

delete_canary

Permanently deletes the specified canary.

Type annotations and code completion for session.client("synthetics").delete_canary method. boto3 documentation

Method definition
await def delete_canary(
    self,
    *,
    Name: str,
    DeleteLambda: bool = ...,
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: DeleteCanaryRequestRequestTypeDef = {  # (1)
    "Name": ...,
}

parent.delete_canary(**kwargs)
  1. See DeleteCanaryRequestRequestTypeDef

delete_group

Deletes a group.

Type annotations and code completion for session.client("synthetics").delete_group method. boto3 documentation

Method definition
await def delete_group(
    self,
    *,
    GroupIdentifier: str,
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: DeleteGroupRequestRequestTypeDef = {  # (1)
    "GroupIdentifier": ...,
}

parent.delete_group(**kwargs)
  1. See DeleteGroupRequestRequestTypeDef

describe_canaries

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

Type annotations and code completion for session.client("synthetics").describe_canaries method. boto3 documentation

Method definition
await def describe_canaries(
    self,
    *,
    NextToken: str = ...,
    MaxResults: int = ...,
    Names: Sequence[str] = ...,
) -> DescribeCanariesResponseTypeDef:  # (1)
    ...
  1. See DescribeCanariesResponseTypeDef
Usage example with kwargs
kwargs: DescribeCanariesRequestRequestTypeDef = {  # (1)
    "NextToken": ...,
}

parent.describe_canaries(**kwargs)
  1. See DescribeCanariesRequestRequestTypeDef

describe_canaries_last_run

Use this operation to see information from the most recent run of each canary that you have created.

Type annotations and code completion for session.client("synthetics").describe_canaries_last_run method. boto3 documentation

Method definition
await def describe_canaries_last_run(
    self,
    *,
    NextToken: str = ...,
    MaxResults: int = ...,
    Names: Sequence[str] = ...,
) -> DescribeCanariesLastRunResponseTypeDef:  # (1)
    ...
  1. See DescribeCanariesLastRunResponseTypeDef
Usage example with kwargs
kwargs: DescribeCanariesLastRunRequestRequestTypeDef = {  # (1)
    "NextToken": ...,
}

parent.describe_canaries_last_run(**kwargs)
  1. See DescribeCanariesLastRunRequestRequestTypeDef

describe_runtime_versions

Returns a list of Synthetics canary runtime versions.

Type annotations and code completion for session.client("synthetics").describe_runtime_versions method. boto3 documentation

Method definition
await def describe_runtime_versions(
    self,
    *,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> DescribeRuntimeVersionsResponseTypeDef:  # (1)
    ...
  1. See DescribeRuntimeVersionsResponseTypeDef
Usage example with kwargs
kwargs: DescribeRuntimeVersionsRequestRequestTypeDef = {  # (1)
    "NextToken": ...,
}

parent.describe_runtime_versions(**kwargs)
  1. See DescribeRuntimeVersionsRequestRequestTypeDef

disassociate_resource

Removes a canary from a group.

Type annotations and code completion for session.client("synthetics").disassociate_resource method. boto3 documentation

Method definition
await def disassociate_resource(
    self,
    *,
    GroupIdentifier: str,
    ResourceArn: str,
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: DisassociateResourceRequestRequestTypeDef = {  # (1)
    "GroupIdentifier": ...,
    "ResourceArn": ...,
}

parent.disassociate_resource(**kwargs)
  1. See DisassociateResourceRequestRequestTypeDef

generate_presigned_url

Generate a presigned url given a client, its method, and arguments.

Type annotations and code completion for session.client("synthetics").generate_presigned_url method. boto3 documentation

Method definition
await def generate_presigned_url(
    self,
    ClientMethod: str,
    Params: Mapping[str, Any] = ...,
    ExpiresIn: int = 3600,
    HttpMethod: str = ...,
) -> str:
    ...

get_canary

Retrieves complete information about one canary.

Type annotations and code completion for session.client("synthetics").get_canary method. boto3 documentation

Method definition
await def get_canary(
    self,
    *,
    Name: str,
) -> GetCanaryResponseTypeDef:  # (1)
    ...
  1. See GetCanaryResponseTypeDef
Usage example with kwargs
kwargs: GetCanaryRequestRequestTypeDef = {  # (1)
    "Name": ...,
}

parent.get_canary(**kwargs)
  1. See GetCanaryRequestRequestTypeDef

get_canary_runs

Retrieves a list of runs for a specified canary.

Type annotations and code completion for session.client("synthetics").get_canary_runs method. boto3 documentation

Method definition
await def get_canary_runs(
    self,
    *,
    Name: str,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> GetCanaryRunsResponseTypeDef:  # (1)
    ...
  1. See GetCanaryRunsResponseTypeDef
Usage example with kwargs
kwargs: GetCanaryRunsRequestRequestTypeDef = {  # (1)
    "Name": ...,
}

parent.get_canary_runs(**kwargs)
  1. See GetCanaryRunsRequestRequestTypeDef

get_group

Returns information about one group.

Type annotations and code completion for session.client("synthetics").get_group method. boto3 documentation

Method definition
await def get_group(
    self,
    *,
    GroupIdentifier: str,
) -> GetGroupResponseTypeDef:  # (1)
    ...
  1. See GetGroupResponseTypeDef
Usage example with kwargs
kwargs: GetGroupRequestRequestTypeDef = {  # (1)
    "GroupIdentifier": ...,
}

parent.get_group(**kwargs)
  1. See GetGroupRequestRequestTypeDef

list_associated_groups

Returns a list of the groups that the specified canary is associated with.

Type annotations and code completion for session.client("synthetics").list_associated_groups method. boto3 documentation

Method definition
await def list_associated_groups(
    self,
    *,
    ResourceArn: str,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListAssociatedGroupsResponseTypeDef:  # (1)
    ...
  1. See ListAssociatedGroupsResponseTypeDef
Usage example with kwargs
kwargs: ListAssociatedGroupsRequestRequestTypeDef = {  # (1)
    "ResourceArn": ...,
}

parent.list_associated_groups(**kwargs)
  1. See ListAssociatedGroupsRequestRequestTypeDef

list_group_resources

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

Type annotations and code completion for session.client("synthetics").list_group_resources method. boto3 documentation

Method definition
await def list_group_resources(
    self,
    *,
    GroupIdentifier: str,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListGroupResourcesResponseTypeDef:  # (1)
    ...
  1. See ListGroupResourcesResponseTypeDef
Usage example with kwargs
kwargs: ListGroupResourcesRequestRequestTypeDef = {  # (1)
    "GroupIdentifier": ...,
}

parent.list_group_resources(**kwargs)
  1. See ListGroupResourcesRequestRequestTypeDef

list_groups

Returns a list of all groups in the account, displaying their names, unique IDs, and ARNs.

Type annotations and code completion for session.client("synthetics").list_groups method. boto3 documentation

Method definition
await def list_groups(
    self,
    *,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListGroupsResponseTypeDef:  # (1)
    ...
  1. See ListGroupsResponseTypeDef
Usage example with kwargs
kwargs: ListGroupsRequestRequestTypeDef = {  # (1)
    "NextToken": ...,
}

parent.list_groups(**kwargs)
  1. See ListGroupsRequestRequestTypeDef

list_tags_for_resource

Displays the tags associated with a canary or group.

Type annotations and code completion for session.client("synthetics").list_tags_for_resource method. boto3 documentation

Method definition
await def list_tags_for_resource(
    self,
    *,
    ResourceArn: str,
) -> ListTagsForResourceResponseTypeDef:  # (1)
    ...
  1. See ListTagsForResourceResponseTypeDef
Usage example with kwargs
kwargs: ListTagsForResourceRequestRequestTypeDef = {  # (1)
    "ResourceArn": ...,
}

parent.list_tags_for_resource(**kwargs)
  1. See ListTagsForResourceRequestRequestTypeDef

start_canary

Use this operation to run a canary that has already been created.

Type annotations and code completion for session.client("synthetics").start_canary method. boto3 documentation

Method definition
await def start_canary(
    self,
    *,
    Name: str,
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: StartCanaryRequestRequestTypeDef = {  # (1)
    "Name": ...,
}

parent.start_canary(**kwargs)
  1. See StartCanaryRequestRequestTypeDef

stop_canary

Stops the canary to prevent all future runs.

Type annotations and code completion for session.client("synthetics").stop_canary method. boto3 documentation

Method definition
await def stop_canary(
    self,
    *,
    Name: str,
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: StopCanaryRequestRequestTypeDef = {  # (1)
    "Name": ...,
}

parent.stop_canary(**kwargs)
  1. See StopCanaryRequestRequestTypeDef

tag_resource

Assigns one or more tags (key-value pairs) to the specified canary or group.

Type annotations and code completion for session.client("synthetics").tag_resource method. boto3 documentation

Method definition
await def tag_resource(
    self,
    *,
    ResourceArn: str,
    Tags: Mapping[str, str],
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: TagResourceRequestRequestTypeDef = {  # (1)
    "ResourceArn": ...,
    "Tags": ...,
}

parent.tag_resource(**kwargs)
  1. See TagResourceRequestRequestTypeDef

untag_resource

Removes one or more tags from the specified resource.

Type annotations and code completion for session.client("synthetics").untag_resource method. boto3 documentation

Method definition
await def untag_resource(
    self,
    *,
    ResourceArn: str,
    TagKeys: Sequence[str],
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: UntagResourceRequestRequestTypeDef = {  # (1)
    "ResourceArn": ...,
    "TagKeys": ...,
}

parent.untag_resource(**kwargs)
  1. See UntagResourceRequestRequestTypeDef

update_canary

Updates the configuration of a canary that has already been created.

Type annotations and code completion for session.client("synthetics").update_canary method. boto3 documentation

Method definition
await def update_canary(
    self,
    *,
    Name: str,
    Code: CanaryCodeInputTypeDef = ...,  # (1)
    ExecutionRoleArn: str = ...,
    RuntimeVersion: str = ...,
    Schedule: CanaryScheduleInputTypeDef = ...,  # (2)
    RunConfig: CanaryRunConfigInputTypeDef = ...,  # (3)
    SuccessRetentionPeriodInDays: int = ...,
    FailureRetentionPeriodInDays: int = ...,
    VpcConfig: VpcConfigInputTypeDef = ...,  # (4)
    VisualReference: VisualReferenceInputTypeDef = ...,  # (5)
    ArtifactS3Location: str = ...,
    ArtifactConfig: ArtifactConfigInputTypeDef = ...,  # (6)
) -> Dict[str, Any]:
    ...
  1. See CanaryCodeInputTypeDef
  2. See CanaryScheduleInputTypeDef
  3. See CanaryRunConfigInputTypeDef
  4. See VpcConfigInputTypeDef
  5. See VisualReferenceInputTypeDef
  6. See ArtifactConfigInputTypeDef
Usage example with kwargs
kwargs: UpdateCanaryRequestRequestTypeDef = {  # (1)
    "Name": ...,
}

parent.update_canary(**kwargs)
  1. See UpdateCanaryRequestRequestTypeDef

__aenter__

Type annotations and code completion for session.client("synthetics").__aenter__ method. boto3 documentation

Method definition
await def __aenter__(
    self,
) -> SyntheticsClient:
    ...

__aexit__

Type annotations and code completion for session.client("synthetics").__aexit__ method. boto3 documentation

Method definition
await def __aexit__(
    self,
    exc_type: Any,
    exc_val: Any,
    exc_tb: Any,
) -> Any:
    ...