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)
...
# batch_get_traces method usage example with argument unpacking
kwargs: BatchGetTracesRequestRequestTypeDef = { # (1)
"TraceIds": ...,
}
parent.batch_get_traces(**kwargs)
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)
...
# create_group method usage example with argument unpacking
kwargs: CreateGroupRequestRequestTypeDef = { # (1)
"GroupName": ...,
}
parent.create_group(**kwargs)
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)
...
# create_sampling_rule method usage example with argument unpacking
kwargs: CreateSamplingRuleRequestRequestTypeDef = { # (1)
"SamplingRule": ...,
}
parent.create_sampling_rule(**kwargs)
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)
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)
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)
...
# delete_sampling_rule method usage example with argument unpacking
kwargs: DeleteSamplingRuleRequestRequestTypeDef = { # (1)
"RuleName": ...,
}
parent.delete_sampling_rule(**kwargs)
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)
...
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)
...
# get_group method usage example with argument unpacking
kwargs: GetGroupRequestRequestTypeDef = { # (1)
"GroupName": ...,
}
parent.get_group(**kwargs)
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)
...
# get_groups method usage example with argument unpacking
kwargs: GetGroupsRequestRequestTypeDef = { # (1)
"NextToken": ...,
}
parent.get_groups(**kwargs)
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)
...
# get_insight method usage example with argument unpacking
kwargs: GetInsightRequestRequestTypeDef = { # (1)
"InsightId": ...,
}
parent.get_insight(**kwargs)
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)
...
# get_insight_events method usage example with argument unpacking
kwargs: GetInsightEventsRequestRequestTypeDef = { # (1)
"InsightId": ...,
}
parent.get_insight_events(**kwargs)
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.
boto3 documentation
# get_insight_impact_graph method definition
def get_insight_impact_graph(
self,
*,
InsightId: str,
StartTime: Union[datetime, str],
EndTime: Union[datetime, str],
NextToken: str = ...,
) -> GetInsightImpactGraphResultTypeDef: # (1)
...
# get_insight_impact_graph method usage example with argument unpacking
kwargs: GetInsightImpactGraphRequestRequestTypeDef = { # (1)
"InsightId": ...,
"StartTime": ...,
"EndTime": ...,
}
parent.get_insight_impact_graph(**kwargs)
get_insight_summaries#
Retrieves the summaries of all insights in the specified group matching the provided filter values.
Type annotations and code completion for boto3.client("xray").get_insight_summaries
method.
boto3 documentation
# get_insight_summaries method definition
def get_insight_summaries(
self,
*,
StartTime: Union[datetime, str],
EndTime: Union[datetime, str],
States: Sequence[InsightStateType] = ..., # (1)
GroupARN: str = ...,
GroupName: str = ...,
MaxResults: int = ...,
NextToken: str = ...,
) -> GetInsightSummariesResultTypeDef: # (2)
...
# get_insight_summaries method usage example with argument unpacking
kwargs: GetInsightSummariesRequestRequestTypeDef = { # (1)
"StartTime": ...,
"EndTime": ...,
}
parent.get_insight_summaries(**kwargs)
get_sampling_rules#
Retrieves all sampling rules.
Type annotations and code completion for boto3.client("xray").get_sampling_rules
method.
boto3 documentation
# get_sampling_rules method definition
def get_sampling_rules(
self,
*,
NextToken: str = ...,
) -> GetSamplingRulesResultTypeDef: # (1)
...
# get_sampling_rules method usage example with argument unpacking
kwargs: GetSamplingRulesRequestRequestTypeDef = { # (1)
"NextToken": ...,
}
parent.get_sampling_rules(**kwargs)
get_sampling_statistic_summaries#
Retrieves information about recent sampling results for all sampling rules.
Type annotations and code completion for boto3.client("xray").get_sampling_statistic_summaries
method.
boto3 documentation
# get_sampling_statistic_summaries method definition
def get_sampling_statistic_summaries(
self,
*,
NextToken: str = ...,
) -> GetSamplingStatisticSummariesResultTypeDef: # (1)
...
# get_sampling_statistic_summaries method usage example with argument unpacking
kwargs: GetSamplingStatisticSummariesRequestRequestTypeDef = { # (1)
"NextToken": ...,
}
parent.get_sampling_statistic_summaries(**kwargs)
get_sampling_targets#
Requests a sampling quota for rules that the service is using to sample requests.
Type annotations and code completion for boto3.client("xray").get_sampling_targets
method.
boto3 documentation
# get_sampling_targets method definition
def get_sampling_targets(
self,
*,
SamplingStatisticsDocuments: Sequence[SamplingStatisticsDocumentTypeDef], # (1)
) -> GetSamplingTargetsResultTypeDef: # (2)
...
# get_sampling_targets method usage example with argument unpacking
kwargs: GetSamplingTargetsRequestRequestTypeDef = { # (1)
"SamplingStatisticsDocuments": ...,
}
parent.get_sampling_targets(**kwargs)