pub struct Client { /* private fields */ }
Expand description
Client for Amazon CloudWatch Application Signals
Client for invoking operations on Amazon CloudWatch Application Signals. Each operation on Amazon CloudWatch Application Signals is a method on this
this struct. .send()
MUST be invoked on the generated operations to dispatch the request to the service.
§Constructing a Client
A Config
is required to construct a client. For most use cases, the aws-config
crate should be used to automatically resolve this config using
aws_config::load_from_env()
, since this will resolve an SdkConfig
which can be shared
across multiple different AWS SDK clients. This config resolution process can be customized
by calling aws_config::from_env()
instead, which returns a ConfigLoader
that uses
the builder pattern to customize the default config.
In the simplest case, creating a client looks as follows:
let config = aws_config::load_from_env().await;
let client = aws_sdk_applicationsignals::Client::new(&config);
Occasionally, SDKs may have additional service-specific values that can be set on the Config
that
is absent from SdkConfig
, or slightly different settings for a specific client may be desired.
The Builder
struct implements From<&SdkConfig>
, so setting these specific settings can be
done as follows:
let sdk_config = ::aws_config::load_from_env().await;
let config = aws_sdk_applicationsignals::config::Builder::from(&sdk_config)
.some_service_specific_setting("value")
.build();
See the aws-config
docs and Config
for more information on customizing configuration.
Note: Client construction is expensive due to connection thread pool initialization, and should be done once at application start-up.
§Using the Client
A client has a function for every operation that can be performed by the service.
For example, the CreateServiceLevelObjective
operation has
a Client::create_service_level_objective
, function which returns a builder for that operation.
The fluent builder ultimately has a send()
function that returns an async future that
returns a result, as illustrated below:
let result = client.create_service_level_objective()
.name("example")
.send()
.await;
The underlying HTTP requests that get made by this can be modified with the customize_operation
function on the fluent builder. See the customize
module for more
information.
Implementations§
Source§impl Client
impl Client
Sourcepub fn batch_get_service_level_objective_budget_report(
&self,
) -> BatchGetServiceLevelObjectiveBudgetReportFluentBuilder
pub fn batch_get_service_level_objective_budget_report( &self, ) -> BatchGetServiceLevelObjectiveBudgetReportFluentBuilder
Constructs a fluent builder for the BatchGetServiceLevelObjectiveBudgetReport
operation.
- The fluent builder is configurable:
timestamp(DateTime)
/set_timestamp(Option<DateTime>)
:
required: trueThe date and time that you want the report to be for. It is expressed as the number of milliseconds since Jan 1, 1970 00:00:00 UTC.
slo_ids(impl Into<String>)
/set_slo_ids(Option<Vec::<String>>)
:
required: trueAn array containing the IDs of the service level objectives that you want to include in the report.
- On success, responds with
BatchGetServiceLevelObjectiveBudgetReportOutput
with field(s):timestamp(DateTime)
:The date and time that the report is for. It is expressed as the number of milliseconds since Jan 1, 1970 00:00:00 UTC.
reports(Vec::<ServiceLevelObjectiveBudgetReport>)
:An array of structures, where each structure is one budget report.
errors(Vec::<ServiceLevelObjectiveBudgetReportError>)
:An array of structures, where each structure includes an error indicating that one of the requests in the array was not valid.
- On failure, responds with
SdkError<BatchGetServiceLevelObjectiveBudgetReportError>
Source§impl Client
impl Client
Sourcepub fn batch_update_exclusion_windows(
&self,
) -> BatchUpdateExclusionWindowsFluentBuilder
pub fn batch_update_exclusion_windows( &self, ) -> BatchUpdateExclusionWindowsFluentBuilder
Constructs a fluent builder for the BatchUpdateExclusionWindows
operation.
- The fluent builder is configurable:
slo_ids(impl Into<String>)
/set_slo_ids(Option<Vec::<String>>)
:
required: trueThe list of SLO IDs to add or remove exclusion windows from.
add_exclusion_windows(ExclusionWindow)
/set_add_exclusion_windows(Option<Vec::<ExclusionWindow>>)
:
required: falseA list of exclusion windows to add to the specified SLOs. You can add up to 10 exclusion windows per SLO.
remove_exclusion_windows(ExclusionWindow)
/set_remove_exclusion_windows(Option<Vec::<ExclusionWindow>>)
:
required: falseA list of exclusion windows to remove from the specified SLOs. The window configuration must match an existing exclusion window.
- On success, responds with
BatchUpdateExclusionWindowsOutput
with field(s):slo_ids(Vec::<String>)
:The list of SLO IDs that were successfully processed.
errors(Vec::<BatchUpdateExclusionWindowsError>)
:A list of errors that occurred while processing the request.
- On failure, responds with
SdkError<BatchUpdateExclusionWindowsError>
Source§impl Client
impl Client
Sourcepub fn create_service_level_objective(
&self,
) -> CreateServiceLevelObjectiveFluentBuilder
pub fn create_service_level_objective( &self, ) -> CreateServiceLevelObjectiveFluentBuilder
Constructs a fluent builder for the CreateServiceLevelObjective
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueA name for this SLO.
description(impl Into<String>)
/set_description(Option<String>)
:
required: falseAn optional description for this SLO.
sli_config(ServiceLevelIndicatorConfig)
/set_sli_config(Option<ServiceLevelIndicatorConfig>)
:
required: falseIf this SLO is a period-based SLO, this structure defines the information about what performance metric this SLO will monitor.
You can’t specify both
RequestBasedSliConfig
andSliConfig
in the same operation.request_based_sli_config(RequestBasedServiceLevelIndicatorConfig)
/set_request_based_sli_config(Option<RequestBasedServiceLevelIndicatorConfig>)
:
required: falseIf this SLO is a request-based SLO, this structure defines the information about what performance metric this SLO will monitor.
You can’t specify both
RequestBasedSliConfig
andSliConfig
in the same operation.goal(Goal)
/set_goal(Option<Goal>)
:
required: falseThis structure contains the attributes that determine the goal of the SLO.
tags(Tag)
/set_tags(Option<Vec::<Tag>>)
:
required: falseA list of key-value pairs to associate with the SLO. You can associate as many as 50 tags with an SLO. To be able to associate tags with the SLO when you create the SLO, you must have the
cloudwatch:TagResource
permission.Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.
burn_rate_configurations(BurnRateConfiguration)
/set_burn_rate_configurations(Option<Vec::<BurnRateConfiguration>>)
:
required: falseUse this array to create burn rates for this SLO. Each burn rate is a metric that indicates how fast the service is consuming the error budget, relative to the attainment goal of the SLO.
- On success, responds with
CreateServiceLevelObjectiveOutput
with field(s):slo(Option<ServiceLevelObjective>)
:A structure that contains information about the SLO that you just created.
- On failure, responds with
SdkError<CreateServiceLevelObjectiveError>
Source§impl Client
impl Client
Sourcepub fn delete_service_level_objective(
&self,
) -> DeleteServiceLevelObjectiveFluentBuilder
pub fn delete_service_level_objective( &self, ) -> DeleteServiceLevelObjectiveFluentBuilder
Constructs a fluent builder for the DeleteServiceLevelObjective
operation.
- The fluent builder is configurable:
id(impl Into<String>)
/set_id(Option<String>)
:
required: trueThe ARN or name of the service level objective to delete.
- On success, responds with
DeleteServiceLevelObjectiveOutput
- On failure, responds with
SdkError<DeleteServiceLevelObjectiveError>
Source§impl Client
impl Client
Sourcepub fn get_service(&self) -> GetServiceFluentBuilder
pub fn get_service(&self) -> GetServiceFluentBuilder
Constructs a fluent builder for the GetService
operation.
- The fluent builder is configurable:
start_time(DateTime)
/set_start_time(Option<DateTime>)
:
required: trueThe start of the time period to retrieve information about. When used in a raw HTTP Query API, it is formatted as be epoch time in seconds. For example:
1698778057
Your requested start time will be rounded to the nearest hour.
end_time(DateTime)
/set_end_time(Option<DateTime>)
:
required: trueThe end of the time period to retrieve information about. When used in a raw HTTP Query API, it is formatted as be epoch time in seconds. For example:
1698778057
Your requested start time will be rounded to the nearest hour.
key_attributes(impl Into<String>, impl Into<String>)
/set_key_attributes(Option<HashMap::<String, String>>)
:
required: trueUse this field to specify which service you want to retrieve information for. You must specify at least the
Type
,Name
, andEnvironment
attributes.This is a string-to-string map. It can include the following fields.
-
Type
designates the type of object this is. -
ResourceType
specifies the type of the resource. This field is used only when the value of theType
field isResource
orAWS::Resource
. -
Name
specifies the name of the object. This is used only if the value of theType
field isService
,RemoteService
, orAWS::Service
. -
Identifier
identifies the resource objects of this resource. This is used only if the value of theType
field isResource
orAWS::Resource
. -
Environment
specifies the location where this object is hosted, or what it belongs to.
-
- On success, responds with
GetServiceOutput
with field(s):service(Option<Service>)
:A structure containing information about the service.
start_time(DateTime)
:The start time of the data included in the response. In a raw HTTP Query API, it is formatted as be epoch time in seconds. For example:
1698778057
.This displays the time that Application Signals used for the request. It might not match your request exactly, because it was rounded to the nearest hour.
end_time(DateTime)
:The end time of the data included in the response. In a raw HTTP Query API, it is formatted as be epoch time in seconds. For example:
1698778057
.This displays the time that Application Signals used for the request. It might not match your request exactly, because it was rounded to the nearest hour.
log_group_references(Option<Vec::<HashMap::<String, String>>>)
:An array of string-to-string maps that each contain information about one log group associated with this service. Each string-to-string map includes the following fields:
-
“Type”: “AWS::Resource”
-
“ResourceType”: “AWS::Logs::LogGroup”
-
“Identifier”: “name-of-log-group”
-
- On failure, responds with
SdkError<GetServiceError>
Source§impl Client
impl Client
Sourcepub fn get_service_level_objective(
&self,
) -> GetServiceLevelObjectiveFluentBuilder
pub fn get_service_level_objective( &self, ) -> GetServiceLevelObjectiveFluentBuilder
Constructs a fluent builder for the GetServiceLevelObjective
operation.
- The fluent builder is configurable:
id(impl Into<String>)
/set_id(Option<String>)
:
required: trueThe ARN or name of the SLO that you want to retrieve information about. You can find the ARNs of SLOs by using the ListServiceLevelObjectives operation.
- On success, responds with
GetServiceLevelObjectiveOutput
with field(s):slo(Option<ServiceLevelObjective>)
:A structure containing the information about the SLO.
- On failure, responds with
SdkError<GetServiceLevelObjectiveError>
Source§impl Client
impl Client
Sourcepub fn list_service_dependencies(&self) -> ListServiceDependenciesFluentBuilder
pub fn list_service_dependencies(&self) -> ListServiceDependenciesFluentBuilder
Constructs a fluent builder for the ListServiceDependencies
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
start_time(DateTime)
/set_start_time(Option<DateTime>)
:
required: trueThe start of the time period to retrieve information about. When used in a raw HTTP Query API, it is formatted as be epoch time in seconds. For example:
1698778057
Your requested start time will be rounded to the nearest hour.
end_time(DateTime)
/set_end_time(Option<DateTime>)
:
required: trueThe end of the time period to retrieve information about. When used in a raw HTTP Query API, it is formatted as be epoch time in seconds. For example:
1698778057
Your requested end time will be rounded to the nearest hour.
key_attributes(impl Into<String>, impl Into<String>)
/set_key_attributes(Option<HashMap::<String, String>>)
:
required: trueUse this field to specify which service you want to retrieve information for. You must specify at least the
Type
,Name
, andEnvironment
attributes.This is a string-to-string map. It can include the following fields.
-
Type
designates the type of object this is. -
ResourceType
specifies the type of the resource. This field is used only when the value of theType
field isResource
orAWS::Resource
. -
Name
specifies the name of the object. This is used only if the value of theType
field isService
,RemoteService
, orAWS::Service
. -
Identifier
identifies the resource objects of this resource. This is used only if the value of theType
field isResource
orAWS::Resource
. -
Environment
specifies the location where this object is hosted, or what it belongs to.
-
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results to return in one operation. If you omit this parameter, the default of 50 is used.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseInclude this value, if it was returned by the previous operation, to get the next set of service dependencies.
- On success, responds with
ListServiceDependenciesOutput
with field(s):start_time(DateTime)
:The start of the time period that the returned information applies to. When used in a raw HTTP Query API, it is formatted as be epoch time in seconds. For example:
1698778057
This displays the time that Application Signals used for the request. It might not match your request exactly, because it was rounded to the nearest hour.
end_time(DateTime)
:The end of the time period that the returned information applies to. When used in a raw HTTP Query API, it is formatted as be epoch time in seconds. For example:
1698778057
This displays the time that Application Signals used for the request. It might not match your request exactly, because it was rounded to the nearest hour.
service_dependencies(Vec::<ServiceDependency>)
:An array, where each object in the array contains information about one of the dependencies of this service.
next_token(Option<String>)
:Include this value in your next use of this API to get next set of service dependencies.
- On failure, responds with
SdkError<ListServiceDependenciesError>
Source§impl Client
impl Client
Sourcepub fn list_service_dependents(&self) -> ListServiceDependentsFluentBuilder
pub fn list_service_dependents(&self) -> ListServiceDependentsFluentBuilder
Constructs a fluent builder for the ListServiceDependents
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
start_time(DateTime)
/set_start_time(Option<DateTime>)
:
required: trueThe start of the time period to retrieve information about. When used in a raw HTTP Query API, it is formatted as be epoch time in seconds. For example:
1698778057
Your requested start time will be rounded to the nearest hour.
end_time(DateTime)
/set_end_time(Option<DateTime>)
:
required: trueThe end of the time period to retrieve information about. When used in a raw HTTP Query API, it is formatted as be epoch time in seconds. For example:
1698778057
Your requested start time will be rounded to the nearest hour.
key_attributes(impl Into<String>, impl Into<String>)
/set_key_attributes(Option<HashMap::<String, String>>)
:
required: trueUse this field to specify which service you want to retrieve information for. You must specify at least the
Type
,Name
, andEnvironment
attributes.This is a string-to-string map. It can include the following fields.
-
Type
designates the type of object this is. -
ResourceType
specifies the type of the resource. This field is used only when the value of theType
field isResource
orAWS::Resource
. -
Name
specifies the name of the object. This is used only if the value of theType
field isService
,RemoteService
, orAWS::Service
. -
Identifier
identifies the resource objects of this resource. This is used only if the value of theType
field isResource
orAWS::Resource
. -
Environment
specifies the location where this object is hosted, or what it belongs to.
-
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results to return in one operation. If you omit this parameter, the default of 50 is used.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseInclude this value, if it was returned by the previous operation, to get the next set of service dependents.
- On success, responds with
ListServiceDependentsOutput
with field(s):start_time(DateTime)
:The start of the time period that the returned information applies to. When used in a raw HTTP Query API, it is formatted as be epoch time in seconds. For example:
1698778057
This displays the time that Application Signals used for the request. It might not match your request exactly, because it was rounded to the nearest hour.
end_time(DateTime)
:The end of the time period that the returned information applies to. When used in a raw HTTP Query API, it is formatted as be epoch time in seconds. For example:
1698778057
This displays the time that Application Signals used for the request. It might not match your request exactly, because it was rounded to the nearest hour.
service_dependents(Vec::<ServiceDependent>)
:An array, where each object in the array contains information about one of the dependents of this service.
next_token(Option<String>)
:Include this value in your next use of this API to get next set of service dependents.
- On failure, responds with
SdkError<ListServiceDependentsError>
Source§impl Client
impl Client
Sourcepub fn list_service_level_objective_exclusion_windows(
&self,
) -> ListServiceLevelObjectiveExclusionWindowsFluentBuilder
pub fn list_service_level_objective_exclusion_windows( &self, ) -> ListServiceLevelObjectiveExclusionWindowsFluentBuilder
Constructs a fluent builder for the ListServiceLevelObjectiveExclusionWindows
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
id(impl Into<String>)
/set_id(Option<String>)
:
required: trueThe ID of the SLO to list exclusion windows for.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results to return in one operation. If you omit this parameter, the default of 50 is used.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseInclude this value, if it was returned by the previous operation, to get the next set of service level objectives.
- On success, responds with
ListServiceLevelObjectiveExclusionWindowsOutput
with field(s):exclusion_windows(Vec::<ExclusionWindow>)
:A list of exclusion windows configured for the SLO.
next_token(Option<String>)
:Include this value, if it was returned by the previous operation, to get the next set of service level objectives.
- On failure, responds with
SdkError<ListServiceLevelObjectiveExclusionWindowsError>
Source§impl Client
impl Client
Sourcepub fn list_service_level_objectives(
&self,
) -> ListServiceLevelObjectivesFluentBuilder
pub fn list_service_level_objectives( &self, ) -> ListServiceLevelObjectivesFluentBuilder
Constructs a fluent builder for the ListServiceLevelObjectives
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
key_attributes(impl Into<String>, impl Into<String>)
/set_key_attributes(Option<HashMap::<String, String>>)
:
required: falseYou can use this optional field to specify which services you want to retrieve SLO information for.
This is a string-to-string map. It can include the following fields.
-
Type
designates the type of object this is. -
ResourceType
specifies the type of the resource. This field is used only when the value of theType
field isResource
orAWS::Resource
. -
Name
specifies the name of the object. This is used only if the value of theType
field isService
,RemoteService
, orAWS::Service
. -
Identifier
identifies the resource objects of this resource. This is used only if the value of theType
field isResource
orAWS::Resource
. -
Environment
specifies the location where this object is hosted, or what it belongs to.
-
operation_name(impl Into<String>)
/set_operation_name(Option<String>)
:
required: falseThe name of the operation that this SLO is associated with.
dependency_config(DependencyConfig)
/set_dependency_config(Option<DependencyConfig>)
:
required: falseIdentifies the dependency using the
DependencyKeyAttributes
andDependencyOperationName
.max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results to return in one operation. If you omit this parameter, the default of 50 is used.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseInclude this value, if it was returned by the previous operation, to get the next set of service level objectives.
metric_source_types(MetricSourceType)
/set_metric_source_types(Option<Vec::<MetricSourceType>>)
:
required: falseUse this optional field to only include SLOs with the specified metric source types in the output. Supported types are:
-
Service operation
-
Service dependency
-
CloudWatch metric
-
include_linked_accounts(bool)
/set_include_linked_accounts(Option<bool>)
:
required: falseIf you are using this operation in a monitoring account, specify
true
to include SLO from source accounts in the returned data.When you are monitoring an account, you can use Amazon Web Services account ID in
KeyAttribute
filter for service source account andSloOwnerawsaccountID
for SLO source account withIncludeLinkedAccounts
to filter the returned data to only a single source account.slo_owner_aws_account_id(impl Into<String>)
/set_slo_owner_aws_account_id(Option<String>)
:
required: falseSLO’s Amazon Web Services account ID.
- On success, responds with
ListServiceLevelObjectivesOutput
with field(s):slo_summaries(Option<Vec::<ServiceLevelObjectiveSummary>>)
:An array of structures, where each structure contains information about one SLO.
next_token(Option<String>)
:Include this value in your next use of this API to get next set of service level objectives.
- On failure, responds with
SdkError<ListServiceLevelObjectivesError>
Source§impl Client
impl Client
Sourcepub fn list_service_operations(&self) -> ListServiceOperationsFluentBuilder
pub fn list_service_operations(&self) -> ListServiceOperationsFluentBuilder
Constructs a fluent builder for the ListServiceOperations
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
start_time(DateTime)
/set_start_time(Option<DateTime>)
:
required: trueThe start of the time period to retrieve information about. When used in a raw HTTP Query API, it is formatted as be epoch time in seconds. For example:
1698778057
Your requested start time will be rounded to the nearest hour.
end_time(DateTime)
/set_end_time(Option<DateTime>)
:
required: trueThe end of the time period to retrieve information about. When used in a raw HTTP Query API, it is formatted as be epoch time in seconds. For example:
1698778057
Your requested end time will be rounded to the nearest hour.
key_attributes(impl Into<String>, impl Into<String>)
/set_key_attributes(Option<HashMap::<String, String>>)
:
required: trueUse this field to specify which service you want to retrieve information for. You must specify at least the
Type
,Name
, andEnvironment
attributes.This is a string-to-string map. It can include the following fields.
-
Type
designates the type of object this is. -
ResourceType
specifies the type of the resource. This field is used only when the value of theType
field isResource
orAWS::Resource
. -
Name
specifies the name of the object. This is used only if the value of theType
field isService
,RemoteService
, orAWS::Service
. -
Identifier
identifies the resource objects of this resource. This is used only if the value of theType
field isResource
orAWS::Resource
. -
Environment
specifies the location where this object is hosted, or what it belongs to.
-
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results to return in one operation. If you omit this parameter, the default of 50 is used.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseInclude this value, if it was returned by the previous operation, to get the next set of service operations.
- On success, responds with
ListServiceOperationsOutput
with field(s):start_time(DateTime)
:The start of the time period that the returned information applies to. When used in a raw HTTP Query API, it is formatted as be epoch time in seconds. For example:
1698778057
This displays the time that Application Signals used for the request. It might not match your request exactly, because it was rounded to the nearest hour.
end_time(DateTime)
:The end of the time period that the returned information applies to. When used in a raw HTTP Query API, it is formatted as be epoch time in seconds. For example:
1698778057
This displays the time that Application Signals used for the request. It might not match your request exactly, because it was rounded to the nearest hour.
service_operations(Vec::<ServiceOperation>)
:An array of structures that each contain information about one operation of this service.
next_token(Option<String>)
:Include this value in your next use of this API to get next set of service operations.
- On failure, responds with
SdkError<ListServiceOperationsError>
Source§impl Client
impl Client
Sourcepub fn list_services(&self) -> ListServicesFluentBuilder
pub fn list_services(&self) -> ListServicesFluentBuilder
Constructs a fluent builder for the ListServices
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
start_time(DateTime)
/set_start_time(Option<DateTime>)
:
required: trueThe start of the time period to retrieve information about. When used in a raw HTTP Query API, it is formatted as be epoch time in seconds. For example:
1698778057
Your requested start time will be rounded to the nearest hour.
end_time(DateTime)
/set_end_time(Option<DateTime>)
:
required: trueThe end of the time period to retrieve information about. When used in a raw HTTP Query API, it is formatted as be epoch time in seconds. For example:
1698778057
Your requested start time will be rounded to the nearest hour.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results to return in one operation. If you omit this parameter, the default of 50 is used.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseInclude this value, if it was returned by the previous operation, to get the next set of services.
include_linked_accounts(bool)
/set_include_linked_accounts(Option<bool>)
:
required: falseIf you are using this operation in a monitoring account, specify
true
to include services from source accounts in the returned data.aws_account_id(impl Into<String>)
/set_aws_account_id(Option<String>)
:
required: falseAmazon Web Services Account ID.
- On success, responds with
ListServicesOutput
with field(s):start_time(DateTime)
:The start of the time period that the returned information applies to. When used in a raw HTTP Query API, it is formatted as be epoch time in seconds. For example:
1698778057
This displays the time that Application Signals used for the request. It might not match your request exactly, because it was rounded to the nearest hour.
end_time(DateTime)
:The end of the time period that the returned information applies to. When used in a raw HTTP Query API, it is formatted as be epoch time in seconds. For example:
1698778057
This displays the time that Application Signals used for the request. It might not match your request exactly, because it was rounded to the nearest hour.
service_summaries(Vec::<ServiceSummary>)
:An array of structures, where each structure contains some information about a service. To get complete information about a service, use GetService.
next_token(Option<String>)
:Include this value in your next use of this API to get next set of services.
- On failure, responds with
SdkError<ListServicesError>
Source§impl Client
impl Client
Constructs a fluent builder for the ListTagsForResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the CloudWatch resource that you want to view tags for.
The ARN format of an Application Signals SLO is
arn:aws:cloudwatch:Region:account-id:slo:slo-name
For more information about ARN format, see Resource Types Defined by Amazon CloudWatch in the Amazon Web Services General Reference.
- On success, responds with
ListTagsForResourceOutput
with field(s):tags(Option<Vec::<Tag>>)
:The list of tag keys and values associated with the resource you specified.
- On failure, responds with
SdkError<ListTagsForResourceError>
Source§impl Client
impl Client
Sourcepub fn start_discovery(&self) -> StartDiscoveryFluentBuilder
pub fn start_discovery(&self) -> StartDiscoveryFluentBuilder
Constructs a fluent builder for the StartDiscovery
operation.
- The fluent builder takes no input, just
send
it. - On success, responds with
StartDiscoveryOutput
- On failure, responds with
SdkError<StartDiscoveryError>
Source§impl Client
impl Client
Sourcepub fn tag_resource(&self) -> TagResourceFluentBuilder
pub fn tag_resource(&self) -> TagResourceFluentBuilder
Constructs a fluent builder for the TagResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the CloudWatch resource that you want to set tags for.
The ARN format of an Application Signals SLO is
arn:aws:cloudwatch:Region:account-id:slo:slo-name
For more information about ARN format, see Resource Types Defined by Amazon CloudWatch in the Amazon Web Services General Reference.
tags(Tag)
/set_tags(Option<Vec::<Tag>>)
:
required: trueThe list of key-value pairs to associate with the alarm.
- On success, responds with
TagResourceOutput
- On failure, responds with
SdkError<TagResourceError>
Source§impl Client
impl Client
Sourcepub fn untag_resource(&self) -> UntagResourceFluentBuilder
pub fn untag_resource(&self) -> UntagResourceFluentBuilder
Constructs a fluent builder for the UntagResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the CloudWatch resource that you want to delete tags from.
The ARN format of an Application Signals SLO is
arn:aws:cloudwatch:Region:account-id:slo:slo-name
For more information about ARN format, see Resource Types Defined by Amazon CloudWatch in the Amazon Web Services General Reference.
tag_keys(impl Into<String>)
/set_tag_keys(Option<Vec::<String>>)
:
required: trueThe list of tag keys to remove from the resource.
- On success, responds with
UntagResourceOutput
- On failure, responds with
SdkError<UntagResourceError>
Source§impl Client
impl Client
Sourcepub fn update_service_level_objective(
&self,
) -> UpdateServiceLevelObjectiveFluentBuilder
pub fn update_service_level_objective( &self, ) -> UpdateServiceLevelObjectiveFluentBuilder
Constructs a fluent builder for the UpdateServiceLevelObjective
operation.
- The fluent builder is configurable:
id(impl Into<String>)
/set_id(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) or name of the service level objective that you want to update.
description(impl Into<String>)
/set_description(Option<String>)
:
required: falseAn optional description for the SLO.
sli_config(ServiceLevelIndicatorConfig)
/set_sli_config(Option<ServiceLevelIndicatorConfig>)
:
required: falseIf this SLO is a period-based SLO, this structure defines the information about what performance metric this SLO will monitor.
request_based_sli_config(RequestBasedServiceLevelIndicatorConfig)
/set_request_based_sli_config(Option<RequestBasedServiceLevelIndicatorConfig>)
:
required: falseIf this SLO is a request-based SLO, this structure defines the information about what performance metric this SLO will monitor.
You can’t specify both
SliConfig
andRequestBasedSliConfig
in the same operation.goal(Goal)
/set_goal(Option<Goal>)
:
required: falseA structure that contains the attributes that determine the goal of the SLO. This includes the time period for evaluation and the attainment threshold.
burn_rate_configurations(BurnRateConfiguration)
/set_burn_rate_configurations(Option<Vec::<BurnRateConfiguration>>)
:
required: falseUse this array to create burn rates for this SLO. Each burn rate is a metric that indicates how fast the service is consuming the error budget, relative to the attainment goal of the SLO.
- On success, responds with
UpdateServiceLevelObjectiveOutput
with field(s):slo(Option<ServiceLevelObjective>)
:A structure that contains information about the SLO that you just updated.
- On failure, responds with
SdkError<UpdateServiceLevelObjectiveError>
Source§impl Client
impl Client
Sourcepub fn from_conf(conf: Config) -> Self
pub fn from_conf(conf: Config) -> Self
Creates a new client from the service Config
.
§Panics
This method will panic in the following cases:
- Retries or timeouts are enabled without a
sleep_impl
configured. - Identity caching is enabled without a
sleep_impl
andtime_source
configured. - No
behavior_version
is provided.
The panic message for each of these will have instructions on how to resolve them.
Source§impl Client
impl Client
Sourcepub fn new(sdk_config: &SdkConfig) -> Self
pub fn new(sdk_config: &SdkConfig) -> Self
Creates a new client from an SDK Config.
§Panics
- This method will panic if the
sdk_config
is missing an async sleep implementation. If you experience this panic, set thesleep_impl
on the Config passed into this function to fix it. - This method will panic if the
sdk_config
is missing an HTTP connector. If you experience this panic, set thehttp_connector
on the Config passed into this function to fix it. - This method will panic if no
BehaviorVersion
is provided. If you experience this panic, setbehavior_version
on the Config or enable thebehavior-version-latest
Cargo feature.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the foreground set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red()
and
green()
, which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg()
:
use yansi::{Paint, Color};
painted.fg(Color::White);
Set foreground color to white using white()
.
use yansi::Paint;
painted.white();
Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the background set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red()
and
on_green()
, which have the same functionality but
are pithier.
§Example
Set background color to red using fg()
:
use yansi::{Paint, Color};
painted.bg(Color::Red);
Set background color to red using on_red()
.
use yansi::Paint;
painted.on_red();
Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute
value
.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold()
and
underline()
, which have the same functionality
but are pithier.
§Example
Make text bold using attr()
:
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);
Make text bold using using bold()
.
use yansi::Paint;
painted.bold();
Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi
Quirk
value
.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask()
and
wrap()
, which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk()
:
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);
Enable wrapping using wrap()
.
use yansi::Paint;
painted.wrap();
Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition
value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted
only when both stdout
and stderr
are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);