pub struct Client { /* private fields */ }
Expand description
Client for Network Flow Monitor
Client for invoking operations on Network Flow Monitor. Each operation on Network Flow Monitor 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_networkflowmonitor::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_networkflowmonitor::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 CreateMonitor
operation has
a Client::create_monitor
, 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_monitor()
.monitor_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 create_monitor(&self) -> CreateMonitorFluentBuilder
pub fn create_monitor(&self) -> CreateMonitorFluentBuilder
Constructs a fluent builder for the CreateMonitor
operation.
- The fluent builder is configurable:
monitor_name(impl Into<String>)
/set_monitor_name(Option<String>)
:
required: trueThe name of the monitor.
local_resources(MonitorLocalResource)
/set_local_resources(Option<Vec::<MonitorLocalResource>>)
:
required: trueThe local resources to monitor. A local resource, in a bi-directional flow of a workload, is the host where the agent is installed. For example, if a workload consists of an interaction between a web service and a backend database (for example, Amazon Relational Database Service (RDS)), the EC2 instance hosting the web service, which also runs the agent, is the local resource.
remote_resources(MonitorRemoteResource)
/set_remote_resources(Option<Vec::<MonitorRemoteResource>>)
:
required: falseThe remote resources to monitor. A remote resource is the other endpoint in the bi-directional flow of a workload, with a local resource. For example, Amazon Relational Database Service (RDS) can be a remote resource.
scope_arn(impl Into<String>)
/set_scope_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the scope for the monitor.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA unique, case-sensitive string of up to 64 ASCII characters that you specify to make an idempotent API request. Don’t reuse the same client token for other API requests.
tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: falseThe tags for a monitor. You can add a maximum of 200 tags.
- On success, responds with
CreateMonitorOutput
with field(s):monitor_arn(String)
:The Amazon Resource Name (ARN) of the monitor.
monitor_name(String)
:The name of the monitor.
monitor_status(MonitorStatus)
:The status of a monitor. The status can be one of the following
-
PENDING
: The monitor is in the process of being created. -
ACTIVE
: The monitor is active. -
INACTIVE
: The monitor is inactive. -
ERROR
: Monitor creation failed due to an error. -
DELETING
: The monitor is in the process of being deleted.
-
local_resources(Vec::<MonitorLocalResource>)
:The local resources to monitor. A local resource, in a bi-directional flow of a workload, is the host where the agent is installed.
remote_resources(Vec::<MonitorRemoteResource>)
:The remote resources to monitor. A remote resource is the other endpoint in the bi-directional flow of a workload, with a local resource. For example, Amazon Relational Database Service (RDS) can be a remote resource. The remote resource is identified by its ARN or an identifier.
created_at(DateTime)
:The date and time when the monitor was created.
modified_at(DateTime)
:The last date and time that the monitor was modified.
tags(Option<HashMap::<String, String>>)
:The tags for a monitor.
- On failure, responds with
SdkError<CreateMonitorError>
Source§impl Client
impl Client
Sourcepub fn create_scope(&self) -> CreateScopeFluentBuilder
pub fn create_scope(&self) -> CreateScopeFluentBuilder
Constructs a fluent builder for the CreateScope
operation.
- The fluent builder is configurable:
targets(TargetResource)
/set_targets(Option<Vec::<TargetResource>>)
:
required: trueThe targets to define the scope to be monitored. Currently, a target is an Amazon Web Services account.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA unique, case-sensitive string of up to 64 ASCII characters that you specify to make an idempotent API request. Don’t reuse the same client token for other API requests.
tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: falseThe tags for a scope. You can add a maximum of 200 tags.
- On success, responds with
CreateScopeOutput
with field(s):scope_id(String)
:The identifier for the scope that includes the resources you want to get metrics for. A scope ID is an internally-generated identifier that includes all the resources for a specific root account.
status(ScopeStatus)
:The status for a call to create a scope. The status can be one of the following:
SUCCEEDED
,IN_PROGRESS
, orFAILED
.scope_arn(String)
:The Amazon Resource Name (ARN) of the scope.
tags(Option<HashMap::<String, String>>)
:The tags for a scope.
- On failure, responds with
SdkError<CreateScopeError>
Source§impl Client
impl Client
Sourcepub fn delete_monitor(&self) -> DeleteMonitorFluentBuilder
pub fn delete_monitor(&self) -> DeleteMonitorFluentBuilder
Constructs a fluent builder for the DeleteMonitor
operation.
- The fluent builder is configurable:
monitor_name(impl Into<String>)
/set_monitor_name(Option<String>)
:
required: trueThe name of the monitor to delete.
- On success, responds with
DeleteMonitorOutput
- On failure, responds with
SdkError<DeleteMonitorError>
Source§impl Client
impl Client
Sourcepub fn delete_scope(&self) -> DeleteScopeFluentBuilder
pub fn delete_scope(&self) -> DeleteScopeFluentBuilder
Constructs a fluent builder for the DeleteScope
operation.
- The fluent builder is configurable:
scope_id(impl Into<String>)
/set_scope_id(Option<String>)
:
required: trueThe identifier for the scope that includes the resources you want to get data results for. A scope ID is an internally-generated identifier that includes all the resources for a specific root account.
- On success, responds with
DeleteScopeOutput
- On failure, responds with
SdkError<DeleteScopeError>
Source§impl Client
impl Client
Sourcepub fn get_monitor(&self) -> GetMonitorFluentBuilder
pub fn get_monitor(&self) -> GetMonitorFluentBuilder
Constructs a fluent builder for the GetMonitor
operation.
- The fluent builder is configurable:
monitor_name(impl Into<String>)
/set_monitor_name(Option<String>)
:
required: trueThe name of the monitor.
- On success, responds with
GetMonitorOutput
with field(s):monitor_arn(String)
:The Amazon Resource Name (ARN) of the monitor.
monitor_name(String)
:The name of the monitor.
monitor_status(MonitorStatus)
:The status of a monitor. The status can be one of the following
-
PENDING
: The monitor is in the process of being created. -
ACTIVE
: The monitor is active. -
INACTIVE
: The monitor is inactive. -
ERROR
: Monitor creation failed due to an error. -
DELETING
: The monitor is in the process of being deleted.
-
local_resources(Vec::<MonitorLocalResource>)
:The local resources for this monitor.
remote_resources(Vec::<MonitorRemoteResource>)
:The remote resources for this monitor.
created_at(DateTime)
:The date and time when the monitor was created.
modified_at(DateTime)
:The date and time when the monitor was last modified.
tags(Option<HashMap::<String, String>>)
:The tags for a monitor.
- On failure, responds with
SdkError<GetMonitorError>
Source§impl Client
impl Client
Sourcepub fn get_query_results_monitor_top_contributors(
&self,
) -> GetQueryResultsMonitorTopContributorsFluentBuilder
pub fn get_query_results_monitor_top_contributors( &self, ) -> GetQueryResultsMonitorTopContributorsFluentBuilder
Constructs a fluent builder for the GetQueryResultsMonitorTopContributors
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
monitor_name(impl Into<String>)
/set_monitor_name(Option<String>)
:
required: trueThe name of the monitor.
query_id(impl Into<String>)
/set_query_id(Option<String>)
:
required: trueThe identifier for the query. A query ID is an internally-generated identifier for a specific query returned from an API call to start a query.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of results. You receive this token from a previous call.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe number of query results that you want to return with this call.
- On success, responds with
GetQueryResultsMonitorTopContributorsOutput
with field(s):unit(Option<MetricUnit>)
:The units for a metric returned by the query.
top_contributors(Option<Vec::<MonitorTopContributorsRow>>)
:The top contributor network flows overall for a specific metric type, for example, the number of retransmissions.
next_token(Option<String>)
:The token for the next set of results. You receive this token from a previous call.
- On failure, responds with
SdkError<GetQueryResultsMonitorTopContributorsError>
Source§impl Client
impl Client
Sourcepub fn get_query_results_workload_insights_top_contributors(
&self,
) -> GetQueryResultsWorkloadInsightsTopContributorsFluentBuilder
pub fn get_query_results_workload_insights_top_contributors( &self, ) -> GetQueryResultsWorkloadInsightsTopContributorsFluentBuilder
Constructs a fluent builder for the GetQueryResultsWorkloadInsightsTopContributors
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
scope_id(impl Into<String>)
/set_scope_id(Option<String>)
:
required: trueThe identifier for the scope that includes the resources you want to get data results for. A scope ID is an internally-generated identifier that includes all the resources for a specific root account.
query_id(impl Into<String>)
/set_query_id(Option<String>)
:
required: trueThe identifier for the query. A query ID is an internally-generated identifier for a specific query returned from an API call to start a query.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of results. You receive this token from a previous call.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe number of query results that you want to return with this call.
- On success, responds with
GetQueryResultsWorkloadInsightsTopContributorsOutput
with field(s):top_contributors(Option<Vec::<WorkloadInsightsTopContributorsRow>>)
:The top contributor network flows overall for a specific metric type, for example, the number of retransmissions.
next_token(Option<String>)
:The token for the next set of results. You receive this token from a previous call.
- On failure, responds with
SdkError<GetQueryResultsWorkloadInsightsTopContributorsError>
Source§impl Client
impl Client
Sourcepub fn get_query_results_workload_insights_top_contributors_data(
&self,
) -> GetQueryResultsWorkloadInsightsTopContributorsDataFluentBuilder
pub fn get_query_results_workload_insights_top_contributors_data( &self, ) -> GetQueryResultsWorkloadInsightsTopContributorsDataFluentBuilder
Constructs a fluent builder for the GetQueryResultsWorkloadInsightsTopContributorsData
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
scope_id(impl Into<String>)
/set_scope_id(Option<String>)
:
required: trueThe identifier for the scope that includes the resources you want to get data results for. A scope ID is an internally-generated identifier that includes all the resources for a specific root account.
query_id(impl Into<String>)
/set_query_id(Option<String>)
:
required: trueThe identifier for the query. A query ID is an internally-generated identifier for a specific query returned from an API call to start a query.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of results. You receive this token from a previous call.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe number of query results that you want to return with this call.
- On success, responds with
GetQueryResultsWorkloadInsightsTopContributorsDataOutput
with field(s):unit(MetricUnit)
:The units for a metric returned by the query.
datapoints(Vec::<WorkloadInsightsTopContributorsDataPoint>)
:The datapoints returned by the query.
next_token(Option<String>)
:The token for the next set of results. You receive this token from a previous call.
- On failure, responds with
SdkError<GetQueryResultsWorkloadInsightsTopContributorsDataError>
Source§impl Client
impl Client
Sourcepub fn get_query_status_monitor_top_contributors(
&self,
) -> GetQueryStatusMonitorTopContributorsFluentBuilder
pub fn get_query_status_monitor_top_contributors( &self, ) -> GetQueryStatusMonitorTopContributorsFluentBuilder
Constructs a fluent builder for the GetQueryStatusMonitorTopContributors
operation.
- The fluent builder is configurable:
monitor_name(impl Into<String>)
/set_monitor_name(Option<String>)
:
required: trueThe name of the monitor.
query_id(impl Into<String>)
/set_query_id(Option<String>)
:
required: trueThe identifier for the query. A query ID is an internally-generated identifier for a specific query returned from an API call to start a query.
- On success, responds with
GetQueryStatusMonitorTopContributorsOutput
with field(s):status(QueryStatus)
:When you run a query, use this call to check the status of the query to make sure that the query has
SUCCEEDED
before you review the results.-
QUEUED
: The query is scheduled to run. -
RUNNING
: The query is in progress but not complete. -
SUCCEEDED
: The query completed sucessfully. -
FAILED
: The query failed due to an error. -
CANCELED
: The query was canceled.
-
- On failure, responds with
SdkError<GetQueryStatusMonitorTopContributorsError>
Source§impl Client
impl Client
Sourcepub fn get_query_status_workload_insights_top_contributors(
&self,
) -> GetQueryStatusWorkloadInsightsTopContributorsFluentBuilder
pub fn get_query_status_workload_insights_top_contributors( &self, ) -> GetQueryStatusWorkloadInsightsTopContributorsFluentBuilder
Constructs a fluent builder for the GetQueryStatusWorkloadInsightsTopContributors
operation.
- The fluent builder is configurable:
scope_id(impl Into<String>)
/set_scope_id(Option<String>)
:
required: trueThe identifier for the scope that includes the resources you want to get data results for. A scope ID is an internally-generated identifier that includes all the resources for a specific root account.
query_id(impl Into<String>)
/set_query_id(Option<String>)
:
required: trueThe identifier for the query. A query ID is an internally-generated identifier for a specific query returned from an API call to start a query.
- On success, responds with
GetQueryStatusWorkloadInsightsTopContributorsOutput
with field(s):status(QueryStatus)
:When you run a query, use this call to check the status of the query to make sure that the query has
SUCCEEDED
before you review the results.-
QUEUED
: The query is scheduled to run. -
RUNNING
: The query is in progress but not complete. -
SUCCEEDED
: The query completed sucessfully. -
FAILED
: The query failed due to an error. -
CANCELED
: The query was canceled.
-
- On failure, responds with
SdkError<GetQueryStatusWorkloadInsightsTopContributorsError>
Source§impl Client
impl Client
Sourcepub fn get_query_status_workload_insights_top_contributors_data(
&self,
) -> GetQueryStatusWorkloadInsightsTopContributorsDataFluentBuilder
pub fn get_query_status_workload_insights_top_contributors_data( &self, ) -> GetQueryStatusWorkloadInsightsTopContributorsDataFluentBuilder
Constructs a fluent builder for the GetQueryStatusWorkloadInsightsTopContributorsData
operation.
- The fluent builder is configurable:
scope_id(impl Into<String>)
/set_scope_id(Option<String>)
:
required: trueThe identifier for the scope that includes the resources you want to get data results for. A scope ID is an internally-generated identifier that includes all the resources for a specific root account. A scope ID is returned from a
CreateScope
API call.query_id(impl Into<String>)
/set_query_id(Option<String>)
:
required: trueThe identifier for the query. A query ID is an internally-generated identifier for a specific query returned from an API call to start a query.
- On success, responds with
GetQueryStatusWorkloadInsightsTopContributorsDataOutput
with field(s):status(QueryStatus)
:The status of a query for top contributors data.
-
QUEUED
: The query is scheduled to run. -
RUNNING
: The query is in progress but not complete. -
SUCCEEDED
: The query completed sucessfully. -
FAILED
: The query failed due to an error. -
CANCELED
: The query was canceled.
-
- On failure, responds with
SdkError<GetQueryStatusWorkloadInsightsTopContributorsDataError>
Source§impl Client
impl Client
Sourcepub fn get_scope(&self) -> GetScopeFluentBuilder
pub fn get_scope(&self) -> GetScopeFluentBuilder
Constructs a fluent builder for the GetScope
operation.
- The fluent builder is configurable:
scope_id(impl Into<String>)
/set_scope_id(Option<String>)
:
required: trueThe identifier for the scope that includes the resources you want to get data results for. A scope ID is an internally-generated identifier that includes all the resources for a specific root account. A scope ID is returned from a
CreateScope
API call.
- On success, responds with
GetScopeOutput
with field(s):scope_id(String)
:The identifier for the scope that includes the resources you want to get data results for. A scope ID is an internally-generated identifier that includes all the resources for a specific root account. A scope ID is returned from a
CreateScope
API call.status(ScopeStatus)
:The status of a scope. The status can be one of the following:
SUCCEEDED
,IN_PROGRESS
, orFAILED
.scope_arn(String)
:The Amazon Resource Name (ARN) of the scope.
targets(Vec::<TargetResource>)
:The targets for a scope
tags(Option<HashMap::<String, String>>)
:The tags for a scope.
- On failure, responds with
SdkError<GetScopeError>
Source§impl Client
impl Client
Sourcepub fn list_monitors(&self) -> ListMonitorsFluentBuilder
pub fn list_monitors(&self) -> ListMonitorsFluentBuilder
Constructs a fluent builder for the ListMonitors
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of results. You receive this token from a previous call.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe number of query results that you want to return with this call.
monitor_status(MonitorStatus)
/set_monitor_status(Option<MonitorStatus>)
:
required: falseThe status of a monitor. The status can be one of the following
-
PENDING
: The monitor is in the process of being created. -
ACTIVE
: The monitor is active. -
INACTIVE
: The monitor is inactive. -
ERROR
: Monitor creation failed due to an error. -
DELETING
: The monitor is in the process of being deleted.
-
- On success, responds with
ListMonitorsOutput
with field(s):monitors(Vec::<MonitorSummary>)
:The monitors that are in an account.
next_token(Option<String>)
:The token for the next set of results. You receive this token from a previous call.
- On failure, responds with
SdkError<ListMonitorsError>
Source§impl Client
impl Client
Sourcepub fn list_scopes(&self) -> ListScopesFluentBuilder
pub fn list_scopes(&self) -> ListScopesFluentBuilder
Constructs a fluent builder for the ListScopes
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of results. You receive this token from a previous call.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe number of query results that you want to return with this call.
- On success, responds with
ListScopesOutput
with field(s):scopes(Vec::<ScopeSummary>)
:The scopes returned by the call.
next_token(Option<String>)
:The token for the next set of results. You receive this token from a previous call.
- On failure, responds with
SdkError<ListScopesError>
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 resource.
- On success, responds with
ListTagsForResourceOutput
with field(s):tags(Option<HashMap::<String, String>>)
:The tags for a resource.
- On failure, responds with
SdkError<ListTagsForResourceError>
Source§impl Client
impl Client
Sourcepub fn start_query_monitor_top_contributors(
&self,
) -> StartQueryMonitorTopContributorsFluentBuilder
pub fn start_query_monitor_top_contributors( &self, ) -> StartQueryMonitorTopContributorsFluentBuilder
Constructs a fluent builder for the StartQueryMonitorTopContributors
operation.
- The fluent builder is configurable:
monitor_name(impl Into<String>)
/set_monitor_name(Option<String>)
:
required: trueThe name of the monitor.
start_time(DateTime)
/set_start_time(Option<DateTime>)
:
required: trueThe timestamp that is the date and time beginning of the period that you want to retrieve results for with your query.
end_time(DateTime)
/set_end_time(Option<DateTime>)
:
required: trueThe timestamp that is the date and time end of the period that you want to retrieve results for with your query.
metric_name(MonitorMetric)
/set_metric_name(Option<MonitorMetric>)
:
required: trueThe metric that you want to query top contributors for. That is, you can specify this metric to return the top contributor network flows, for this type of metric, for a monitor and (optionally) within a specific category, such as network flows between Availability Zones.
destination_category(DestinationCategory)
/set_destination_category(Option<DestinationCategory>)
:
required: trueThe category that you want to query top contributors for, for a specific monitor. Destination categories can be one of the following:
-
INTRA_AZ
: Top contributor network flows within a single Availability Zone -
INTER_AZ
: Top contributor network flows between Availability Zones -
INTER_VPC
: Top contributor network flows between VPCs -
AMAZON_S3
: Top contributor network flows to or from Amazon S3 -
AMAZON_DYNAMODB
: Top contributor network flows to or from Amazon Dynamo DB -
UNCLASSIFIED
: Top contributor network flows that do not have a bucket classification
-
limit(i32)
/set_limit(Option<i32>)
:
required: falseThe maximum number of top contributors to return.
- On success, responds with
StartQueryMonitorTopContributorsOutput
with field(s):query_id(String)
:The identifier for the query. A query ID is an internally-generated identifier for a specific query returned from an API call to start a query.
- On failure, responds with
SdkError<StartQueryMonitorTopContributorsError>
Source§impl Client
impl Client
Sourcepub fn start_query_workload_insights_top_contributors(
&self,
) -> StartQueryWorkloadInsightsTopContributorsFluentBuilder
pub fn start_query_workload_insights_top_contributors( &self, ) -> StartQueryWorkloadInsightsTopContributorsFluentBuilder
Constructs a fluent builder for the StartQueryWorkloadInsightsTopContributors
operation.
- The fluent builder is configurable:
scope_id(impl Into<String>)
/set_scope_id(Option<String>)
:
required: trueThe identifier for the scope that includes the resources you want to get data results for. A scope ID is an internally-generated identifier that includes all the resources for a specific root account. A scope ID is returned from a
CreateScope
API call.start_time(DateTime)
/set_start_time(Option<DateTime>)
:
required: trueThe timestamp that is the date and time beginning of the period that you want to retrieve results for with your query.
end_time(DateTime)
/set_end_time(Option<DateTime>)
:
required: trueThe timestamp that is the date and time end of the period that you want to retrieve results for with your query.
metric_name(WorkloadInsightsMetric)
/set_metric_name(Option<WorkloadInsightsMetric>)
:
required: trueThe metric that you want to query top contributors for. That is, you can specify this metric to return the top contributor network flows, for this type of metric, for a monitor and (optionally) within a specific category, such as network flows between Availability Zones.
destination_category(DestinationCategory)
/set_destination_category(Option<DestinationCategory>)
:
required: trueThe destination category for a top contributors row. Destination categories can be one of the following:
-
INTRA_AZ
: Top contributor network flows within a single Availability Zone -
INTER_AZ
: Top contributor network flows between Availability Zones -
INTER_VPC
: Top contributor network flows between VPCs -
AWS_SERVICES
: Top contributor network flows to or from Amazon Web Services services -
UNCLASSIFIED
: Top contributor network flows that do not have a bucket classification
-
limit(i32)
/set_limit(Option<i32>)
:
required: falseThe maximum number of top contributors to return.
- On success, responds with
StartQueryWorkloadInsightsTopContributorsOutput
with field(s):query_id(String)
:The identifier for the query. A query ID is an internally-generated identifier for a specific query returned from an API call to start a query.
- On failure, responds with
SdkError<StartQueryWorkloadInsightsTopContributorsError>
Source§impl Client
impl Client
Sourcepub fn start_query_workload_insights_top_contributors_data(
&self,
) -> StartQueryWorkloadInsightsTopContributorsDataFluentBuilder
pub fn start_query_workload_insights_top_contributors_data( &self, ) -> StartQueryWorkloadInsightsTopContributorsDataFluentBuilder
Constructs a fluent builder for the StartQueryWorkloadInsightsTopContributorsData
operation.
- The fluent builder is configurable:
scope_id(impl Into<String>)
/set_scope_id(Option<String>)
:
required: trueThe identifier for the scope that includes the resources you want to get data results for. A scope ID is an internally-generated identifier that includes all the resources for a specific root account.
start_time(DateTime)
/set_start_time(Option<DateTime>)
:
required: trueThe timestamp that is the date and time beginning of the period that you want to retrieve results for with your query.
end_time(DateTime)
/set_end_time(Option<DateTime>)
:
required: trueThe timestamp that is the date and time end of the period that you want to retrieve results for with your query.
metric_name(WorkloadInsightsMetric)
/set_metric_name(Option<WorkloadInsightsMetric>)
:
required: trueThe metric that you want to query top contributors for. That is, you can specify this metric to return the top contributor network flows, for this type of metric, for a monitor and (optionally) within a specific category, such as network flows between Availability Zones.
destination_category(DestinationCategory)
/set_destination_category(Option<DestinationCategory>)
:
required: trueThe destination category for a top contributors. Destination categories can be one of the following:
-
INTRA_AZ
: Top contributor network flows within a single Availability Zone -
INTER_AZ
: Top contributor network flows between Availability Zones -
INTER_VPC
: Top contributor network flows between VPCs -
AWS_SERVICES
: Top contributor network flows to or from Amazon Web Services services -
UNCLASSIFIED
: Top contributor network flows that do not have a bucket classification
-
- On success, responds with
StartQueryWorkloadInsightsTopContributorsDataOutput
with field(s):query_id(String)
:The identifier for the query. A query ID is an internally-generated identifier for a specific query returned from an API call to start a query.
- On failure, responds with
SdkError<StartQueryWorkloadInsightsTopContributorsDataError>
Source§impl Client
impl Client
Sourcepub fn stop_query_monitor_top_contributors(
&self,
) -> StopQueryMonitorTopContributorsFluentBuilder
pub fn stop_query_monitor_top_contributors( &self, ) -> StopQueryMonitorTopContributorsFluentBuilder
Constructs a fluent builder for the StopQueryMonitorTopContributors
operation.
- The fluent builder is configurable:
monitor_name(impl Into<String>)
/set_monitor_name(Option<String>)
:
required: trueThe name of the monitor.
query_id(impl Into<String>)
/set_query_id(Option<String>)
:
required: trueThe identifier for the query. A query ID is an internally-generated identifier for a specific query returned from an API call to start a query.
- On success, responds with
StopQueryMonitorTopContributorsOutput
- On failure, responds with
SdkError<StopQueryMonitorTopContributorsError>
Source§impl Client
impl Client
Sourcepub fn stop_query_workload_insights_top_contributors(
&self,
) -> StopQueryWorkloadInsightsTopContributorsFluentBuilder
pub fn stop_query_workload_insights_top_contributors( &self, ) -> StopQueryWorkloadInsightsTopContributorsFluentBuilder
Constructs a fluent builder for the StopQueryWorkloadInsightsTopContributors
operation.
- The fluent builder is configurable:
scope_id(impl Into<String>)
/set_scope_id(Option<String>)
:
required: trueThe identifier for the scope that includes the resources you want to get data results for. A scope ID is an internally-generated identifier that includes all the resources for a specific root account.
query_id(impl Into<String>)
/set_query_id(Option<String>)
:
required: trueThe identifier for the query. A query ID is an internally-generated identifier for a specific query returned from an API call to start a query.
- On success, responds with
StopQueryWorkloadInsightsTopContributorsOutput
- On failure, responds with
SdkError<StopQueryWorkloadInsightsTopContributorsError>
Source§impl Client
impl Client
Sourcepub fn stop_query_workload_insights_top_contributors_data(
&self,
) -> StopQueryWorkloadInsightsTopContributorsDataFluentBuilder
pub fn stop_query_workload_insights_top_contributors_data( &self, ) -> StopQueryWorkloadInsightsTopContributorsDataFluentBuilder
Constructs a fluent builder for the StopQueryWorkloadInsightsTopContributorsData
operation.
- The fluent builder is configurable:
scope_id(impl Into<String>)
/set_scope_id(Option<String>)
:
required: trueThe identifier for the scope that includes the resources you want to get data results for. A scope ID is an internally-generated identifier that includes all the resources for a specific root account.
query_id(impl Into<String>)
/set_query_id(Option<String>)
:
required: trueThe identifier for the query. A query ID is an internally-generated identifier for a specific query returned from an API call to start a query.
- On success, responds with
StopQueryWorkloadInsightsTopContributorsDataOutput
- On failure, responds with
SdkError<StopQueryWorkloadInsightsTopContributorsDataError>
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 resource.
tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: trueThe tags for a resource.
- 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 resource.
tag_keys(impl Into<String>)
/set_tag_keys(Option<Vec::<String>>)
:
required: trueKeys that you specified when you tagged a resource.
- On success, responds with
UntagResourceOutput
- On failure, responds with
SdkError<UntagResourceError>
Source§impl Client
impl Client
Sourcepub fn update_monitor(&self) -> UpdateMonitorFluentBuilder
pub fn update_monitor(&self) -> UpdateMonitorFluentBuilder
Constructs a fluent builder for the UpdateMonitor
operation.
- The fluent builder is configurable:
monitor_name(impl Into<String>)
/set_monitor_name(Option<String>)
:
required: trueThe name of the monitor.
local_resources_to_add(MonitorLocalResource)
/set_local_resources_to_add(Option<Vec::<MonitorLocalResource>>)
:
required: falseThe local resources to add, as an array of resources with identifiers and types.
local_resources_to_remove(MonitorLocalResource)
/set_local_resources_to_remove(Option<Vec::<MonitorLocalResource>>)
:
required: falseThe local resources to remove, as an array of resources with identifiers and types.
remote_resources_to_add(MonitorRemoteResource)
/set_remote_resources_to_add(Option<Vec::<MonitorRemoteResource>>)
:
required: falseThe remove resources to add, as an array of resources with identifiers and types.
remote_resources_to_remove(MonitorRemoteResource)
/set_remote_resources_to_remove(Option<Vec::<MonitorRemoteResource>>)
:
required: falseThe remove resources to remove, as an array of resources with identifiers and types.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA unique, case-sensitive string of up to 64 ASCII characters that you specify to make an idempotent API request. Don’t reuse the same client token for other API requests.
- On success, responds with
UpdateMonitorOutput
with field(s):monitor_arn(String)
:The Amazon Resource Name (ARN) of the monitor.
monitor_name(String)
:The name of the monitor.
monitor_status(MonitorStatus)
:The status of a monitor. The status can be one of the following
-
PENDING
: The monitor is in the process of being created. -
ACTIVE
: The monitor is active. -
INACTIVE
: The monitor is inactive. -
ERROR
: Monitor creation failed due to an error. -
DELETING
: The monitor is in the process of being deleted.
-
local_resources(Vec::<MonitorLocalResource>)
:The local resources updated for a monitor, as an array of resources with identifiers and types.
remote_resources(Vec::<MonitorRemoteResource>)
:The remote resources updated for a monitor, as an array of resources with identifiers and types.
created_at(DateTime)
:The date and time when the monitor was created.
modified_at(DateTime)
:The last date and time that the monitor was modified.
tags(Option<HashMap::<String, String>>)
:The tags for a monitor.
- On failure, responds with
SdkError<UpdateMonitorError>
Source§impl Client
impl Client
Sourcepub fn update_scope(&self) -> UpdateScopeFluentBuilder
pub fn update_scope(&self) -> UpdateScopeFluentBuilder
Constructs a fluent builder for the UpdateScope
operation.
- The fluent builder is configurable:
scope_id(impl Into<String>)
/set_scope_id(Option<String>)
:
required: trueThe identifier for the scope that includes the resources you want to get data results for. A scope ID is an internally-generated identifier that includes all the resources for a specific root account.
resources_to_add(TargetResource)
/set_resources_to_add(Option<Vec::<TargetResource>>)
:
required: falseA list of resources to add to a scope.
resources_to_delete(TargetResource)
/set_resources_to_delete(Option<Vec::<TargetResource>>)
:
required: falseA list of resources to delete from a scope.
- On success, responds with
UpdateScopeOutput
with field(s):scope_id(String)
:The identifier for the scope that includes the resources you want to get data results for. A scope ID is an internally-generated identifier that includes all the resources for a specific root account.
status(ScopeStatus)
:The status for a call to update a scope. The status can be one of the following:
SUCCEEDED
,IN_PROGRESS
, orFAILED
.scope_arn(String)
:The Amazon Resource Name (ARN) of the scope.
tags(Option<HashMap::<String, String>>)
:The tags for a scope.
- On failure, responds with
SdkError<UpdateScopeError>
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);