Skip to content

XRayClient#

Index > XRay > XRayClient

Auto-generated documentation for XRay type annotations stubs module mypy-boto3-xray.

XRayClient#

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

# XRayClient usage example

from boto3.session import Session
from mypy_boto3_xray.client import XRayClient

def get_xray_client() -> XRayClient:
    return Session().client("xray")

Exceptions#

boto3 client exceptions are generated in runtime. This class provides code completion for boto3.client("xray").exceptions structure.

# Exceptions.exceptions usage example

client = boto3.client("xray")

try:
    do_something(client)
except (
    client.exceptions.ClientError,
    client.exceptions.InvalidPolicyRevisionIdException,
    client.exceptions.InvalidRequestException,
    client.exceptions.LockoutPreventionException,
    client.exceptions.MalformedPolicyDocumentException,
    client.exceptions.PolicyCountLimitExceededException,
    client.exceptions.PolicySizeLimitExceededException,
    client.exceptions.ResourceNotFoundException,
    client.exceptions.RuleLimitExceededException,
    client.exceptions.ThrottledException,
    client.exceptions.TooManyTagsException,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from mypy_boto3_xray.client import Exceptions

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

Methods#

batch_get_traces#

Retrieves a list of traces specified by ID.

Type annotations and code completion for boto3.client("xray").batch_get_traces method. boto3 documentation

# batch_get_traces method definition

def batch_get_traces(
    self,
    *,
    TraceIds: Sequence[str],
    NextToken: str = ...,
) -> BatchGetTracesResultTypeDef:  # (1)
    ...
  1. See BatchGetTracesResultTypeDef
# batch_get_traces method usage example with argument unpacking

kwargs: BatchGetTracesRequestRequestTypeDef = {  # (1)
    "TraceIds": ...,
}

parent.batch_get_traces(**kwargs)
  1. See BatchGetTracesRequestRequestTypeDef

can_paginate#

Check if an operation can be paginated.

Type annotations and code completion for boto3.client("xray").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("xray").close method. boto3 documentation

# close method definition

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

create_group#

Creates a group resource with a name and a filter expression.

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

# create_group method definition

def create_group(
    self,
    *,
    GroupName: str,
    FilterExpression: str = ...,
    InsightsConfiguration: InsightsConfigurationTypeDef = ...,  # (1)
    Tags: Sequence[TagTypeDef] = ...,  # (2)
) -> CreateGroupResultTypeDef:  # (3)
    ...
  1. See InsightsConfigurationTypeDef
  2. See TagTypeDef
  3. See CreateGroupResultTypeDef
# create_group method usage example with argument unpacking

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

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

create_sampling_rule#

Creates a rule to control sampling behavior for instrumented applications.

Type annotations and code completion for boto3.client("xray").create_sampling_rule method. boto3 documentation

# create_sampling_rule method definition

def create_sampling_rule(
    self,
    *,
    SamplingRule: SamplingRuleTypeDef,  # (1)
    Tags: Sequence[TagTypeDef] = ...,  # (2)
) -> CreateSamplingRuleResultTypeDef:  # (3)
    ...
  1. See SamplingRuleTypeDef
  2. See TagTypeDef
  3. See CreateSamplingRuleResultTypeDef
# create_sampling_rule method usage example with argument unpacking

kwargs: CreateSamplingRuleRequestRequestTypeDef = {  # (1)
    "SamplingRule": ...,
}

parent.create_sampling_rule(**kwargs)
  1. See CreateSamplingRuleRequestRequestTypeDef

delete_group#

Deletes a group resource.

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

# delete_group method definition

def delete_group(
    self,
    *,
    GroupName: str = ...,
    GroupARN: str = ...,
) -> Dict[str, Any]:
    ...
# delete_group method usage example with argument unpacking

kwargs: DeleteGroupRequestRequestTypeDef = {  # (1)
    "GroupName": ...,
}

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

delete_resource_policy#

Deletes a resource policy from the target Amazon Web Services account.

Type annotations and code completion for boto3.client("xray").delete_resource_policy method. boto3 documentation

# delete_resource_policy method definition

def delete_resource_policy(
    self,
    *,
    PolicyName: str,
    PolicyRevisionId: str = ...,
) -> Dict[str, Any]:
    ...
# delete_resource_policy method usage example with argument unpacking

kwargs: DeleteResourcePolicyRequestRequestTypeDef = {  # (1)
    "PolicyName": ...,
}

parent.delete_resource_policy(**kwargs)
  1. See DeleteResourcePolicyRequestRequestTypeDef

delete_sampling_rule#

Deletes a sampling rule.

Type annotations and code completion for boto3.client("xray").delete_sampling_rule method. boto3 documentation

# delete_sampling_rule method definition

def delete_sampling_rule(
    self,
    *,
    RuleName: str = ...,
    RuleARN: str = ...,
) -> DeleteSamplingRuleResultTypeDef:  # (1)
    ...
  1. See DeleteSamplingRuleResultTypeDef
# delete_sampling_rule method usage example with argument unpacking

kwargs: DeleteSamplingRuleRequestRequestTypeDef = {  # (1)
    "RuleName": ...,
}

parent.delete_sampling_rule(**kwargs)
  1. See DeleteSamplingRuleRequestRequestTypeDef

generate_presigned_url#

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

Type annotations and code completion for boto3.client("xray").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:
    ...

get_encryption_config#

Retrieves the current encryption configuration for X-Ray data.

Type annotations and code completion for boto3.client("xray").get_encryption_config method. boto3 documentation

# get_encryption_config method definition

def get_encryption_config(
    self,
) -> GetEncryptionConfigResultTypeDef:  # (1)
    ...
  1. See GetEncryptionConfigResultTypeDef

get_group#

Retrieves group resource details.

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

# get_group method definition

def get_group(
    self,
    *,
    GroupName: str = ...,
    GroupARN: str = ...,
) -> GetGroupResultTypeDef:  # (1)
    ...
  1. See GetGroupResultTypeDef
# get_group method usage example with argument unpacking

kwargs: GetGroupRequestRequestTypeDef = {  # (1)
    "GroupName": ...,
}

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

get_groups#

Retrieves all active group details.

Type annotations and code completion for boto3.client("xray").get_groups method. boto3 documentation

# get_groups method definition

def get_groups(
    self,
    *,
    NextToken: str = ...,
) -> GetGroupsResultTypeDef:  # (1)
    ...
  1. See GetGroupsResultTypeDef
# get_groups method usage example with argument unpacking

kwargs: GetGroupsRequestRequestTypeDef = {  # (1)
    "NextToken": ...,
}

parent.get_groups(**kwargs)
  1. See GetGroupsRequestRequestTypeDef

get_insight#

Retrieves the summary information of an insight.

Type annotations and code completion for boto3.client("xray").get_insight method. boto3 documentation

# get_insight method definition

def get_insight(
    self,
    *,
    InsightId: str,
) -> GetInsightResultTypeDef:  # (1)
    ...
  1. See GetInsightResultTypeDef
# get_insight method usage example with argument unpacking

kwargs: GetInsightRequestRequestTypeDef = {  # (1)
    "InsightId": ...,
}

parent.get_insight(**kwargs)
  1. See GetInsightRequestRequestTypeDef

get_insight_events#

X-Ray reevaluates insights periodically until they're resolved, and records each intermediate state as an event.

Type annotations and code completion for boto3.client("xray").get_insight_events method. boto3 documentation

# get_insight_events method definition

def get_insight_events(
    self,
    *,
    InsightId: str,
    MaxResults: int = ...,
    NextToken: str = ...,
) -> GetInsightEventsResultTypeDef:  # (1)
    ...
  1. See GetInsightEventsResultTypeDef
# get_insight_events method usage example with argument unpacking

kwargs: GetInsightEventsRequestRequestTypeDef = {  # (1)
    "InsightId": ...,
}

parent.get_insight_events(**kwargs)
  1. See GetInsightEventsRequestRequestTypeDef

get_insight_impact_graph#

Retrieves a service graph structure filtered by the specified insight.

Type annotations and code completion for boto3.client("xray").get_insight_impact_graph method.