Struct aws_sdk_health::Client
source · [−]pub struct Client { /* 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
sourceimpl Client
impl Client
sourcepub fn with_config(
client: Client<DynConnector, DynMiddleware<DynConnector>>,
conf: Config
) -> Self
pub fn with_config(
client: Client<DynConnector, DynMiddleware<DynConnector>>,
conf: Config
) -> Self
Creates a client with the given service configuration.
sourceimpl Client
impl Client
sourcepub fn describe_affected_accounts_for_organization(
&self
) -> DescribeAffectedAccountsForOrganization
pub fn describe_affected_accounts_for_organization(
&self
) -> DescribeAffectedAccountsForOrganization
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>
sourcepub fn describe_affected_entities(&self) -> DescribeAffectedEntities
pub fn describe_affected_entities(&self) -> DescribeAffectedEntities
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>
sourcepub fn describe_affected_entities_for_organization(
&self
) -> DescribeAffectedEntitiesForOrganization
pub fn describe_affected_entities_for_organization(
&self
) -> DescribeAffectedEntitiesForOrganization
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>
sourcepub fn describe_entity_aggregates(&self) -> DescribeEntityAggregates
pub fn describe_entity_aggregates(&self) -> DescribeEntityAggregates
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>
sourcepub fn describe_event_aggregates(&self) -> DescribeEventAggregates
pub fn describe_event_aggregates(&self) -> DescribeEventAggregates
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>
sourcepub fn describe_event_details(&self) -> DescribeEventDetails
pub fn describe_event_details(&self) -> DescribeEventDetails
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>
sourcepub fn describe_event_details_for_organization(
&self
) -> DescribeEventDetailsForOrganization
pub fn describe_event_details_for_organization(
&self
) -> DescribeEventDetailsForOrganization
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>
sourcepub fn describe_events(&self) -> DescribeEvents
pub fn describe_events(&self) -> DescribeEvents
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>
sourcepub fn describe_events_for_organization(&self) -> DescribeEventsForOrganization
pub fn describe_events_for_organization(&self) -> DescribeEventsForOrganization
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>
sourcepub fn describe_event_types(&self) -> DescribeEventTypes
pub fn describe_event_types(&self) -> DescribeEventTypes
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>
sourcepub fn describe_health_service_status_for_organization(
&self
) -> DescribeHealthServiceStatusForOrganization
pub fn describe_health_service_status_for_organization(
&self
) -> DescribeHealthServiceStatusForOrganization
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>
sourcepub fn disable_health_service_access_for_organization(
&self
) -> DisableHealthServiceAccessForOrganization
pub fn disable_health_service_access_for_organization(
&self
) -> DisableHealthServiceAccessForOrganization
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>
sourcepub fn enable_health_service_access_for_organization(
&self
) -> EnableHealthServiceAccessForOrganization
pub fn enable_health_service_access_for_organization(
&self
) -> EnableHealthServiceAccessForOrganization
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>
sourceimpl Client
impl Client
sourcepub fn from_conf_conn<C, E>(conf: Config, conn: C) -> Self where
C: SmithyConnector<Error = E> + Send + 'static,
E: Into<ConnectorError>,
pub fn from_conf_conn<C, E>(conf: Config, conn: C) -> Self where
C: SmithyConnector<Error = E> + Send + 'static,
E: Into<ConnectorError>,
Creates a client with the given service config and connector override.
Trait Implementations
sourceimpl From<Client<DynConnector, DynMiddleware<DynConnector>, Standard>> for Client
impl From<Client<DynConnector, DynMiddleware<DynConnector>, Standard>> for Client
sourcefn from(client: Client<DynConnector, DynMiddleware<DynConnector>>) -> Self
fn from(client: Client<DynConnector, DynMiddleware<DynConnector>>) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more