Struct aws_sdk_health::client::Client
source · [−]pub struct Client<C = DynConnector, M = DefaultMiddleware, R = Standard> { /* private fields */ }
Expand description
Client for AWS Health APIs and Notifications
Client for invoking operations on AWS Health APIs and Notifications. Each operation on AWS Health APIs and Notifications is a method on this
this struct. .send()
MUST be invoked on the generated operations to dispatch the request to the service.
Examples
Constructing a client and invoking an operation
// create a shared configuration. This can be used & shared between multiple service clients.
let shared_config = aws_config::load_from_env().await;
let client = aws_sdk_health::Client::new(&shared_config);
// invoke an operation
/* let rsp = client
.<operation_name>().
.<param>("some value")
.send().await; */
Constructing a client with custom configuration
use aws_config::RetryConfig;
let shared_config = aws_config::load_from_env().await;
let config = aws_sdk_health::config::Builder::from(&shared_config)
.retry_config(RetryConfig::disabled())
.build();
let client = aws_sdk_health::Client::from_conf(config);
Implementations
impl<C, M, R> Client<C, M, R> where
C: SmithyConnector,
M: SmithyMiddleware<C>,
R: NewRequestPolicy,
impl<C, M, R> Client<C, M, R> where
C: SmithyConnector,
M: SmithyMiddleware<C>,
R: NewRequestPolicy,
pub fn describe_affected_accounts_for_organization(
&self
) -> DescribeAffectedAccountsForOrganization<C, M, R>
pub fn describe_affected_accounts_for_organization(
&self
) -> DescribeAffectedAccountsForOrganization<C, M, R>
Constructs a fluent builder for the DescribeAffectedAccountsForOrganization
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
event_arn(impl Into<String>)
/set_event_arn(Option<String>)
:The unique identifier for the event. The event ARN has the
arn:aws:health:event-region::event/SERVICE/EVENT_TYPE_CODE/EVENT_TYPE_PLUS_ID
format.For example, an event ARN might look like the following:
arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456
next_token(impl Into<String>)
/set_next_token(Option<String>)
:If the results of a search are large, only a portion of the results are returned, and a
nextToken
pagination token is returned in the response. To retrieve the next batch of results, reissue the search request and include the returned token. When all results have been returned, the response does not contain a pagination token value.max_results(i32)
/set_max_results(Option<i32>)
:The maximum number of items to return in one batch, between 10 and 100, inclusive.
- On success, responds with
DescribeAffectedAccountsForOrganizationOutput
with field(s):affected_accounts(Option<Vec<String>>)
:A JSON set of elements of the affected accounts.
event_scope_code(Option<EventScopeCode>)
:This parameter specifies if the Health event is a public Amazon Web Services service event or an account-specific event.
-
If the
eventScopeCode
value isPUBLIC
, then theaffectedAccounts
value is always empty. -
If the
eventScopeCode
value isACCOUNT_SPECIFIC
, then theaffectedAccounts
value lists the affected Amazon Web Services accounts in your organization. For example, if an event affects a service such as Amazon Elastic Compute Cloud and you have Amazon Web Services accounts that use that service, those account IDs appear in the response. -
If the
eventScopeCode
value isNONE
, then theeventArn
that you specified in the request is invalid or doesn’t exist.
-
next_token(Option<String>)
:If the results of a search are large, only a portion of the results are returned, and a
nextToken
pagination token is returned in the response. To retrieve the next batch of results, reissue the search request and include the returned token. When all results have been returned, the response does not contain a pagination token value.
- On failure, responds with
SdkError<DescribeAffectedAccountsForOrganizationError>
Constructs a fluent builder for the DescribeAffectedEntities
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
filter(EntityFilter)
/set_filter(Option<EntityFilter>)
:Values to narrow the results returned. At least one event ARN is required.
locale(impl Into<String>)
/set_locale(Option<String>)
:The locale (language) to return information in. English (en) is the default and the only supported value at this time.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:If the results of a search are large, only a portion of the results are returned, and a
nextToken
pagination token is returned in the response. To retrieve the next batch of results, reissue the search request and include the returned token. When all results have been returned, the response does not contain a pagination token value.max_results(i32)
/set_max_results(Option<i32>)
:The maximum number of items to return in one batch, between 10 and 100, inclusive.
- On success, responds with
DescribeAffectedEntitiesOutput
with field(s):entities(Option<Vec<AffectedEntity>>)
:The entities that match the filter criteria.
next_token(Option<String>)
:If the results of a search are large, only a portion of the results are returned, and a
nextToken
pagination token is returned in the response. To retrieve the next batch of results, reissue the search request and include the returned token. When all results have been returned, the response does not contain a pagination token value.
- On failure, responds with
SdkError<DescribeAffectedEntitiesError>
pub fn describe_affected_entities_for_organization(
&self
) -> DescribeAffectedEntitiesForOrganization<C, M, R>
pub fn describe_affected_entities_for_organization(
&self
) -> DescribeAffectedEntitiesForOrganization<C, M, R>
Constructs a fluent builder for the DescribeAffectedEntitiesForOrganization
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
organization_entity_filters(Vec<EventAccountFilter>)
/set_organization_entity_filters(Option<Vec<EventAccountFilter>>)
:A JSON set of elements including the
awsAccountId
and theeventArn
.locale(impl Into<String>)
/set_locale(Option<String>)
:The locale (language) to return information in. English (en) is the default and the only supported value at this time.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:If the results of a search are large, only a portion of the results are returned, and a
nextToken
pagination token is returned in the response. To retrieve the next batch of results, reissue the search request and include the returned token. When all results have been returned, the response does not contain a pagination token value.max_results(i32)
/set_max_results(Option<i32>)
:The maximum number of items to return in one batch, between 10 and 100, inclusive.
- On success, responds with
DescribeAffectedEntitiesForOrganizationOutput
with field(s):entities(Option<Vec<AffectedEntity>>)
:A JSON set of elements including the
awsAccountId
and itsentityArn
,entityValue
and itsentityArn
,lastUpdatedTime
, andstatusCode
.failed_set(Option<Vec<OrganizationAffectedEntitiesErrorItem>>)
:A JSON set of elements of the failed response, including the
awsAccountId
,errorMessage
,errorName
, andeventArn
.next_token(Option<String>)
:If the results of a search are large, only a portion of the results are returned, and a
nextToken
pagination token is returned in the response. To retrieve the next batch of results, reissue the search request and include the returned token. When all results have been returned, the response does not contain a pagination token value.
- On failure, responds with
SdkError<DescribeAffectedEntitiesForOrganizationError>
Constructs a fluent builder for the DescribeEntityAggregates
operation.
- The fluent builder is configurable:
event_arns(Vec<String>)
/set_event_arns(Option<Vec<String>>)
:A list of event ARNs (unique identifiers). For example:
“arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-CDE456”, “arn:aws:health:us-west-1::event/EBS/AWS_EBS_LOST_VOLUME/AWS_EBS_LOST_VOLUME_CHI789_JKL101”
- On success, responds with
DescribeEntityAggregatesOutput
with field(s):entity_aggregates(Option<Vec<EntityAggregate>>)
:The number of entities that are affected by each of the specified events.
- On failure, responds with
SdkError<DescribeEntityAggregatesError>
Constructs a fluent builder for the DescribeEventAggregates
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
filter(EventFilter)
/set_filter(Option<EventFilter>)
:Values to narrow the results returned.
aggregate_field(EventAggregateField)
/set_aggregate_field(Option<EventAggregateField>)
:The only currently supported value is
eventTypeCategory
.max_results(i32)
/set_max_results(Option<i32>)
:The maximum number of items to return in one batch, between 10 and 100, inclusive.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:If the results of a search are large, only a portion of the results are returned, and a
nextToken
pagination token is returned in the response. To retrieve the next batch of results, reissue the search request and include the returned token. When all results have been returned, the response does not contain a pagination token value.
- On success, responds with
DescribeEventAggregatesOutput
with field(s):event_aggregates(Option<Vec<EventAggregate>>)
:The number of events in each category that meet the optional filter criteria.
next_token(Option<String>)
:If the results of a search are large, only a portion of the results are returned, and a
nextToken
pagination token is returned in the response. To retrieve the next batch of results, reissue the search request and include the returned token. When all results have been returned, the response does not contain a pagination token value.
- On failure, responds with
SdkError<DescribeEventAggregatesError>
Constructs a fluent builder for the DescribeEventDetails
operation.
- The fluent builder is configurable:
event_arns(Vec<String>)
/set_event_arns(Option<Vec<String>>)
:A list of event ARNs (unique identifiers). For example:
“arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-CDE456”, “arn:aws:health:us-west-1::event/EBS/AWS_EBS_LOST_VOLUME/AWS_EBS_LOST_VOLUME_CHI789_JKL101”
locale(impl Into<String>)
/set_locale(Option<String>)
:The locale (language) to return information in. English (en) is the default and the only supported value at this time.
- On success, responds with
DescribeEventDetailsOutput
with field(s):successful_set(Option<Vec<EventDetails>>)
:Information about the events that could be retrieved.
failed_set(Option<Vec<EventDetailsErrorItem>>)
:Error messages for any events that could not be retrieved.
- On failure, responds with
SdkError<DescribeEventDetailsError>
pub fn describe_event_details_for_organization(
&self
) -> DescribeEventDetailsForOrganization<C, M, R>
pub fn describe_event_details_for_organization(
&self
) -> DescribeEventDetailsForOrganization<C, M, R>
Constructs a fluent builder for the DescribeEventDetailsForOrganization
operation.
- The fluent builder is configurable:
organization_event_detail_filters(Vec<EventAccountFilter>)
/set_organization_event_detail_filters(Option<Vec<EventAccountFilter>>)
:A set of JSON elements that includes the
awsAccountId
and theeventArn
.locale(impl Into<String>)
/set_locale(Option<String>)
:The locale (language) to return information in. English (en) is the default and the only supported value at this time.
- On success, responds with
DescribeEventDetailsForOrganizationOutput
with field(s):successful_set(Option<Vec<OrganizationEventDetails>>)
:Information about the events that could be retrieved.
failed_set(Option<Vec<OrganizationEventDetailsErrorItem>>)
:Error messages for any events that could not be retrieved.
- On failure, responds with
SdkError<DescribeEventDetailsForOrganizationError>
Constructs a fluent builder for the DescribeEvents
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
filter(EventFilter)
/set_filter(Option<EventFilter>)
:Values to narrow the results returned.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:If the results of a search are large, only a portion of the results are returned, and a
nextToken
pagination token is returned in the response. To retrieve the next batch of results, reissue the search request and include the returned token. When all results have been returned, the response does not contain a pagination token value.max_results(i32)
/set_max_results(Option<i32>)
:The maximum number of items to return in one batch, between 10 and 100, inclusive.
locale(impl Into<String>)
/set_locale(Option<String>)
:The locale (language) to return information in. English (en) is the default and the only supported value at this time.
- On success, responds with
DescribeEventsOutput
with field(s):events(Option<Vec<Event>>)
:The events that match the specified filter criteria.
next_token(Option<String>)
:If the results of a search are large, only a portion of the results are returned, and a
nextToken
pagination token is returned in the response. To retrieve the next batch of results, reissue the search request and include the returned token. When all results have been returned, the response does not contain a pagination token value.
- On failure, responds with
SdkError<DescribeEventsError>
Constructs a fluent builder for the DescribeEventsForOrganization
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
filter(OrganizationEventFilter)
/set_filter(Option<OrganizationEventFilter>)
:Values to narrow the results returned.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:If the results of a search are large, only a portion of the results are returned, and a
nextToken
pagination token is returned in the response. To retrieve the next batch of results, reissue the search request and include the returned token. When all results have been returned, the response does not contain a pagination token value.max_results(i32)
/set_max_results(Option<i32>)
:The maximum number of items to return in one batch, between 10 and 100, inclusive.
locale(impl Into<String>)
/set_locale(Option<String>)
:The locale (language) to return information in. English (en) is the default and the only supported value at this time.
- On success, responds with
DescribeEventsForOrganizationOutput
with field(s):events(Option<Vec<OrganizationEvent>>)
:The events that match the specified filter criteria.
next_token(Option<String>)
:If the results of a search are large, only a portion of the results are returned, and a
nextToken
pagination token is returned in the response. To retrieve the next batch of results, reissue the search request and include the returned token. When all results have been returned, the response does not contain a pagination token value.
- On failure, responds with
SdkError<DescribeEventsForOrganizationError>
Constructs a fluent builder for the DescribeEventTypes
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
filter(EventTypeFilter)
/set_filter(Option<EventTypeFilter>)
:Values to narrow the results returned.
locale(impl Into<String>)
/set_locale(Option<String>)
:The locale (language) to return information in. English (en) is the default and the only supported value at this time.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:If the results of a search are large, only a portion of the results are returned, and a
nextToken
pagination token is returned in the response. To retrieve the next batch of results, reissue the search request and include the returned token. When all results have been returned, the response does not contain a pagination token value.max_results(i32)
/set_max_results(Option<i32>)
:The maximum number of items to return in one batch, between 10 and 100, inclusive.
- On success, responds with
DescribeEventTypesOutput
with field(s):event_types(Option<Vec<EventType>>)
:A list of event types that match the filter criteria. Event types have a category (
issue
,accountNotification
, orscheduledChange
), a service (for example,EC2
,RDS
,DATAPIPELINE
,BILLING
), and a code (in the formatAWS_SERVICE_DESCRIPTION
; for example,AWS_EC2_SYSTEM_MAINTENANCE_EVENT
).next_token(Option<String>)
:If the results of a search are large, only a portion of the results are returned, and a
nextToken
pagination token is returned in the response. To retrieve the next batch of results, reissue the search request and include the returned token. When all results have been returned, the response does not contain a pagination token value.
- On failure, responds with
SdkError<DescribeEventTypesError>
pub fn describe_health_service_status_for_organization(
&self
) -> DescribeHealthServiceStatusForOrganization<C, M, R>
pub fn describe_health_service_status_for_organization(
&self
) -> DescribeHealthServiceStatusForOrganization<C, M, R>
Constructs a fluent builder for the DescribeHealthServiceStatusForOrganization
operation.
- The fluent builder takes no input, just
send
it. - On success, responds with
DescribeHealthServiceStatusForOrganizationOutput
with field(s):health_service_access_status_for_organization(Option<String>)
:Information about the status of enabling or disabling the Health organizational view feature in your organization.
Valid values are
ENABLED | DISABLED | PENDING
.
- On failure, responds with
SdkError<DescribeHealthServiceStatusForOrganizationError>
pub fn disable_health_service_access_for_organization(
&self
) -> DisableHealthServiceAccessForOrganization<C, M, R>
pub fn disable_health_service_access_for_organization(
&self
) -> DisableHealthServiceAccessForOrganization<C, M, R>
Constructs a fluent builder for the DisableHealthServiceAccessForOrganization
operation.
- The fluent builder takes no input, just
send
it. - On success, responds with
DisableHealthServiceAccessForOrganizationOutput
- On failure, responds with
SdkError<DisableHealthServiceAccessForOrganizationError>
pub fn enable_health_service_access_for_organization(
&self
) -> EnableHealthServiceAccessForOrganization<C, M, R>
pub fn enable_health_service_access_for_organization(
&self
) -> EnableHealthServiceAccessForOrganization<C, M, R>
Constructs a fluent builder for the EnableHealthServiceAccessForOrganization
operation.
- The fluent builder takes no input, just
send
it. - On success, responds with
EnableHealthServiceAccessForOrganizationOutput
- On failure, responds with
SdkError<EnableHealthServiceAccessForOrganizationError>
Creates a client with the given service config and connector override.
Trait Implementations
Auto Trait Implementations
impl<C = DynConnector, M = DefaultMiddleware, R = Standard> !RefUnwindSafe for Client<C, M, R>
impl<C = DynConnector, M = DefaultMiddleware, R = Standard> !UnwindSafe for Client<C, M, R>
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more