Skip to content

SyntheticsClient#

Index > Synthetics > SyntheticsClient

Auto-generated documentation for Synthetics type annotations stubs module mypy-boto3-synthetics.

SyntheticsClient#

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

# SyntheticsClient usage example

from boto3.session import Session
from mypy_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.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 mypy_boto3_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 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: 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 boto3.client("synthetics").can_paginate method. boto3 documentation

# can_paginate method definition

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

close#

Closes underlying endpoint connections.

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

# close method definition

def close(
    self,
) -> None:
    ...

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)
    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
# create_canary method usage example with argument unpacking

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 boto3.client("synthetics").create_group method. boto3 documentation

# create_group method definition

def create_group(
    self,
    *,
    Name: str,
    Tags: Mapping[str, str] = ...,
) -> CreateGroupResponseTypeDef:  # (1)
    ...
  1. See CreateGroupResponseTypeDef
# create_group method usage example with argument unpacking

kwargs: CreateGroupRequestRequestTypeDef = {  # (1)
    "Name": ...,
}

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

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: DeleteCanaryRequestRequestTypeDef = {  # (1)
    "Name": ...,
}

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

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: 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 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)
    ...
  1. See DescribeCanariesResponseTypeDef
# describe_canaries method usage example with argument unpacking

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 boto3.client("synthetics").describe_canaries_last_run method.