SyntheticsClient#
Index > Synthetics > SyntheticsClient
Auto-generated documentation for Synthetics type annotations stubs module types-boto3-synthetics.
SyntheticsClient#
Type annotations and code completion for boto3.client("synthetics").
 boto3 documentation
# SyntheticsClient usage example
from boto3.session import Session
from types_boto3_synthetics.client import SyntheticsClient
def get_synthetics_client() -> SyntheticsClient:
    return Session().client("synthetics")Exceptions#
boto3 client exceptions are generated in runtime.
This class provides code completion for boto3.client("synthetics").exceptions structure.
# Exceptions.exceptions usage example
client = boto3.client("synthetics")
try:
    do_something(client)
except (
    client.exceptions.AccessDeniedException,
    client.exceptions.BadRequestException,
    client.exceptions.ClientError,
    client.exceptions.ConflictException,
    client.exceptions.InternalFailureException,
    client.exceptions.InternalServerException,
    client.exceptions.NotFoundException,
    client.exceptions.RequestEntityTooLargeException,
    client.exceptions.ResourceNotFoundException,
    client.exceptions.ServiceQuotaExceededException,
    client.exceptions.TooManyRequestsException,
    client.exceptions.ValidationException,
) as e:
    print(e)# Exceptions.exceptions type checking example
from types_boto3_synthetics.client import Exceptions
def handle_error(exc: Exceptions.AccessDeniedException) -> None:
    ...Methods#
can_paginate#
Type annotations and code completion for boto3.client("synthetics").can_paginate method.
 boto3 documentation
# can_paginate method definition
def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...generate_presigned_url#
Type annotations and code completion for boto3.client("synthetics").generate_presigned_url method.
 boto3 documentation
# generate_presigned_url method definition
def generate_presigned_url(
    self,
    ClientMethod: str,
    Params: Mapping[str, Any] = ...,
    ExpiresIn: int = 3600,
    HttpMethod: str = ...,
) -> str:
    ...associate_resource#
Associates a canary with a group.
Type annotations and code completion for boto3.client("synthetics").associate_resource method.
 boto3 documentation
# associate_resource method definition
def associate_resource(
    self,
    *,
    GroupIdentifier: str,
    ResourceArn: str,
) -> Dict[str, Any]:
    ...# associate_resource method usage example with argument unpacking
kwargs: AssociateResourceRequestTypeDef = {  # (1)
    "GroupIdentifier": ...,
    "ResourceArn": ...,
}
parent.associate_resource(**kwargs)create_canary#
Creates a canary.
Type annotations and code completion for boto3.client("synthetics").create_canary method.
 boto3 documentation
# create_canary method definition
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)
    ResourcesToReplicateTags: Sequence[ResourceToTagType] = ...,  # (5)
    ProvisionedResourceCleanup: ProvisionedResourceCleanupSettingType = ...,  # (6)
    BrowserConfigs: Sequence[BrowserConfigTypeDef] = ...,  # (7)
    Tags: Mapping[str, str] = ...,
    ArtifactConfig: ArtifactConfigInputTypeDef = ...,  # (8)
) -> CreateCanaryResponseTypeDef:  # (9)
    ...- See CanaryCodeInputTypeDef
- See CanaryScheduleInputTypeDef
- See CanaryRunConfigInputTypeDef
- See VpcConfigInputTypeDef
- See Sequence[Literal['lambda-function']]
- See ProvisionedResourceCleanupSettingType
- See Sequence[BrowserConfigTypeDef]
- See ArtifactConfigInputTypeDef
- See CreateCanaryResponseTypeDef
# create_canary method usage example with argument unpacking
kwargs: CreateCanaryRequestTypeDef = {  # (1)
    "Name": ...,
    "Code": ...,
    "ArtifactS3Location": ...,
    "ExecutionRoleArn": ...,
    "Schedule": ...,
    "RuntimeVersion": ...,
}
parent.create_canary(**kwargs)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 boto3.client("synthetics").create_group method.
 boto3 documentation
# create_group method definition
def create_group(
    self,
    *,
    Name: str,
    Tags: Mapping[str, str] = ...,
) -> CreateGroupResponseTypeDef:  # (1)
    ...# create_group method usage example with argument unpacking
kwargs: CreateGroupRequestTypeDef = {  # (1)
    "Name": ...,
}
parent.create_group(**kwargs)delete_canary#
Permanently deletes the specified canary.
Type annotations and code completion for boto3.client("synthetics").delete_canary method.
 boto3 documentation
# delete_canary method definition
def delete_canary(
    self,
    *,
    Name: str,
    DeleteLambda: bool = ...,
) -> Dict[str, Any]:
    ...# delete_canary method usage example with argument unpacking
kwargs: DeleteCanaryRequestTypeDef = {  # (1)
    "Name": ...,
}
parent.delete_canary(**kwargs)delete_group#
Deletes a group.
Type annotations and code completion for boto3.client("synthetics").delete_group method.
 boto3 documentation
# delete_group method definition
def delete_group(
    self,
    *,
    GroupIdentifier: str,
) -> Dict[str, Any]:
    ...# delete_group method usage example with argument unpacking
kwargs: DeleteGroupRequestTypeDef = {  # (1)
    "GroupIdentifier": ...,
}
parent.delete_group(**kwargs)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 boto3.client("synthetics").describe_canaries method.
 boto3 documentation
# describe_canaries method definition
def describe_canaries(
    self,
    *,
    NextToken: str = ...,
    MaxResults: int = ...,
    Names: Sequence[str] = ...,
) -> DescribeCanariesResponseTypeDef:  # (1)
    ...# describe_canaries method usage example with argument unpacking
kwargs: DescribeCanariesRequestTypeDef = {  # (1)
    "NextToken": ...,
}
parent.describe_canaries(**kwargs)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 boto3.client("synthetics").describe_canaries_last_run method.
 boto3 documentation
# describe_canaries_last_run method definition
def describe_canaries_last_run(
    self,
    *,
    NextToken: str = ...,
    MaxResults: int = ...,
    Names: Sequence[str] = ...,
    BrowserType: BrowserTypeType = ...,  # (1)
) -> DescribeCanariesLastRunResponseTypeDef:  # (2)
    ...# describe_canaries_last_run method usage example with argument unpacking
kwargs: DescribeCanariesLastRunRequestTypeDef = {  # (1)
    "NextToken": ...,
}
parent.describe_canaries_last_run(**kwargs)describe_runtime_versions#
Returns a list of Synthetics canary runtime versions.
Type annotations and code completion for boto3.client("synthetics").describe_runtime_versions method.
 boto3 documentation
# describe_runtime_versions method definition
def describe_runtime_versions(
    self,
    *,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> DescribeRuntimeVersionsResponseTypeDef:  # (1)
    ...# describe_runtime_versions method usage example with argument unpacking
kwargs: DescribeRuntimeVersionsRequestTypeDef = {  # (1)
    "NextToken": ...,
}
parent.describe_runtime_versions(**kwargs)disassociate_resource#
Removes a canary from a group.
Type annotations and code completion for boto3.client("synthetics").disassociate_resource method.
 boto3 documentation
# disassociate_resource method definition
def disassociate_resource(
    self,
    *,
    GroupIdentifier: str,
    ResourceArn: str,
) -> Dict[str, Any]:
    ...# disassociate_resource method usage example with argument unpacking
kwargs: DisassociateResourceRequestTypeDef = {  # (1)
    "GroupIdentifier": ...,
    "ResourceArn": ...,
}
parent.disassociate_resource(**kwargs)get_canary#
Retrieves complete information about one canary.
Type annotations and code completion for boto3.client("synthetics").get_canary method.
 boto3 documentation
# get_canary method definition
def get_canary(
    self,
    *,
    Name: str,
    DryRunId: str = ...,
) -> GetCanaryResponseTypeDef:  # (1)
    ...# get_canary method usage example with argument unpacking
kwargs: GetCanaryRequestTypeDef = {  # (1)
    "Name": ...,
}
parent.get_canary(**kwargs)get_canary_runs#
Retrieves a list of runs for a specified canary.
Type annotations and code completion for boto3.client("synthetics").get_canary_runs method.
 boto3 documentation
# get_canary_runs method definition
def get_canary_runs(
    self,
    *,
    Name: str,
    NextToken: str = ...,
    MaxResults: int = ...,
    DryRunId: str = ...,
    RunType: RunTypeType = ...,  # (1)
) -> GetCanaryRunsResponseTypeDef:  # (2)
    ...# get_canary_runs method usage example with argument unpacking
kwargs: GetCanaryRunsRequestTypeDef = {  # (1)
    "Name": ...,
}
parent.get_canary_runs(**kwargs)get_group#
Returns information about one group.
Type annotations and code completion for boto3.client("synthetics").get_group method.
 boto3 documentation
# get_group method definition
def get_group(
    self,
    *,
    GroupIdentifier: str,
) -> GetGroupResponseTypeDef:  # (1)
    ...# get_group method usage example with argument unpacking
kwargs: GetGroupRequestTypeDef = {  # (1)
    "GroupIdentifier": ...,
}
parent.get_group(**kwargs)list_associated_groups#
Returns a list of the groups that the specified canary is associated with.
Type annotations and code completion for boto3.client("synthetics").list_associated_groups method.
 boto3 documentation
# list_associated_groups method definition
def list_associated_groups(
    self,
    *,
    ResourceArn: str,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListAssociatedGroupsResponseTypeDef:  # (1)
    ...# list_associated_groups method usage example with argument unpacking
kwargs: ListAssociatedGroupsRequestTypeDef = {  # (1)
    "ResourceArn": ...,
}
parent.list_associated_groups(**kwargs)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 boto3.client("synthetics").list_group_resources method.
 boto3 documentation
# list_group_resources method definition
def list_group_resources(
    self,
    *,
    GroupIdentifier: str,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListGroupResourcesResponseTypeDef:  # (1)
    ...# list_group_resources method usage example with argument unpacking
kwargs: ListGroupResourcesRequestTypeDef = {  # (1)
    "GroupIdentifier": ...,
}
parent.list_group_resources(**kwargs)list_groups#
Returns a list of all groups in the account, displaying their names, unique IDs, and ARNs.
Type annotations and code completion for boto3.client("synthetics").list_groups method.
 boto3 documentation
# list_groups method definition
def list_groups(
    self,
    *,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListGroupsResponseTypeDef:  # (1)
    ...# list_groups method usage example with argument unpacking
kwargs: ListGroupsRequestTypeDef = {  # (1)
    "NextToken": ...,
}
parent.list_groups(**kwargs)list_tags_for_resource#
Displays the tags associated with a canary or group.
Type annotations and code completion for boto3.client("synthetics").list_tags_for_resource method.
 boto3 documentation
# list_tags_for_resource method definition
def list_tags_for_resource(
    self,
    *,
    ResourceArn: str,
) -> ListTagsForResourceResponseTypeDef:  # (1)
    ...# list_tags_for_resource method usage example with argument unpacking
kwargs: ListTagsForResourceRequestTypeDef = {  # (1)
    "ResourceArn": ...,
}
parent.list_tags_for_resource(**kwargs)start_canary#
Use this operation to run a canary that has already been created.
Type annotations and code completion for boto3.client("synthetics").start_canary method.
 boto3 documentation
# start_canary method definition
def start_canary(
    self,
    *,
    Name: str,
) -> Dict[str, Any]:
    ...# start_canary method usage example with argument unpacking
kwargs: StartCanaryRequestTypeDef = {  # (1)
    "Name": ...,
}
parent.start_canary(**kwargs)start_canary_dry_run#
Use this operation to start a dry run for a canary that has already been created.
Type annotations and code completion for boto3.client("synthetics").start_canary_dry_run method.
 boto3 documentation
# start_canary_dry_run method definition
def start_canary_dry_run(
    self,
    *,
    Name: str,
    Code: CanaryCodeInputTypeDef = ...,  # (1)
    RuntimeVersion: str = ...,
    RunConfig: CanaryRunConfigInputTypeDef = ...,  # (2)
    VpcConfig: VpcConfigInputTypeDef = ...,  # (3)
    ExecutionRoleArn: str = ...,
    SuccessRetentionPeriodInDays: int = ...,
    FailureRetentionPeriodInDays: int = ...,
    VisualReference: VisualReferenceInputTypeDef = ...,  # (4)
    ArtifactS3Location: str = ...,
    ArtifactConfig: ArtifactConfigInputTypeDef = ...,  # (5)
    ProvisionedResourceCleanup: ProvisionedResourceCleanupSettingType = ...,  # (6)
    BrowserConfigs: Sequence[BrowserConfigTypeDef] = ...,  # (7)
    VisualReferences: Sequence[VisualReferenceInputTypeDef] = ...,  # (8)
) -> StartCanaryDryRunResponseTypeDef:  # (9)
    ...- See CanaryCodeInputTypeDef
- See CanaryRunConfigInputTypeDef
- See VpcConfigInputTypeDef
- See VisualReferenceInputTypeDef
- See ArtifactConfigInputTypeDef
- See ProvisionedResourceCleanupSettingType
- See Sequence[BrowserConfigTypeDef]
- See Sequence[VisualReferenceInputTypeDef]
- See StartCanaryDryRunResponseTypeDef
# start_canary_dry_run method usage example with argument unpacking
kwargs: StartCanaryDryRunRequestTypeDef = {  # (1)
    "Name": ...,
}
parent.start_canary_dry_run(**kwargs)stop_canary#
Stops the canary to prevent all future runs.
Type annotations and code completion for boto3.client("synthetics").stop_canary method.
 boto3 documentation
# stop_canary method definition
def stop_canary(
    self,
    *,
    Name: str,
) -> Dict[str, Any]:
    ...# stop_canary method usage example with argument unpacking
kwargs: StopCanaryRequestTypeDef = {  # (1)
    "Name": ...,
}
parent.stop_canary(**kwargs)tag_resource#
Assigns one or more tags (key-value pairs) to the specified canary or group.
Type annotations and code completion for boto3.client("synthetics").tag_resource method.
 boto3 documentation
# tag_resource method definition
def tag_resource(
    self,
    *,
    ResourceArn: str,
    Tags: Mapping[str, str],
) -> Dict[str, Any]:
    ...# tag_resource method usage example with argument unpacking
kwargs: TagResourceRequestTypeDef = {  # (1)
    "ResourceArn": ...,
    "Tags": ...,
}
parent.tag_resource(**kwargs)untag_resource#
Removes one or more tags from the specified resource.
Type annotations and code completion for boto3.client("synthetics").untag_resource method.
 boto3 documentation
# untag_resource method definition
def untag_resource(
    self,
    *,
    ResourceArn: str,
    TagKeys: Sequence[str],
) -> Dict[str, Any]:
    ...# untag_resource method usage example with argument unpacking
kwargs: UntagResourceRequestTypeDef = {  # (1)
    "ResourceArn": ...,
    "TagKeys": ...,
}
parent.untag_resource(**kwargs)update_canary#
Updates the configuration of a canary that has already been created.
Type annotations and code completion for boto3.client("synthetics").update_canary method.
 boto3 documentation
# update_canary method definition
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)
    ProvisionedResourceCleanup: ProvisionedResourceCleanupSettingType = ...,  # (7)
    DryRunId: str = ...,
    VisualReferences: Sequence[VisualReferenceInputTypeDef] = ...,  # (8)
    BrowserConfigs: Sequence[BrowserConfigTypeDef] = ...,  # (9)
) -> Dict[str, Any]:
    ...- See CanaryCodeInputTypeDef
- See CanaryScheduleInputTypeDef
- See CanaryRunConfigInputTypeDef
- See VpcConfigInputTypeDef
- See VisualReferenceInputTypeDef
- See ArtifactConfigInputTypeDef
- See ProvisionedResourceCleanupSettingType
- See Sequence[VisualReferenceInputTypeDef]
- See Sequence[BrowserConfigTypeDef]
# update_canary method usage example with argument unpacking
kwargs: UpdateCanaryRequestTypeDef = {  # (1)
    "Name": ...,
}
parent.update_canary(**kwargs)