Struct aws_sdk_rbin::Client
source · [−]pub struct Client { /* private fields */ }
Expand description
Client for Amazon Recycle Bin
Client for invoking operations on Amazon Recycle Bin. Each operation on Amazon Recycle Bin 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_rbin::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_rbin::config::Builder::from(&shared_config)
.retry_config(RetryConfig::disabled())
.build();
let client = aws_sdk_rbin::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 create_rule(&self) -> CreateRule
pub fn create_rule(&self) -> CreateRule
Constructs a fluent builder for the CreateRule
operation.
- The fluent builder is configurable:
retention_period(RetentionPeriod)
/set_retention_period(Option<RetentionPeriod>)
:Information about the retention period for which the retention rule is to retain resources.
description(impl Into<String>)
/set_description(Option<String>)
:The retention rule description.
tags(Vec<Tag>)
/set_tags(Option<Vec<Tag>>)
:Information about the tags to assign to the retention rule.
resource_type(ResourceType)
/set_resource_type(Option<ResourceType>)
:The resource type to be retained by the retention rule. Currently, only Amazon EBS snapshots and EBS-backed AMIs are supported. To retain snapshots, specify
EBS_SNAPSHOT
. To retain EBS-backed AMIs, specifyEC2_IMAGE
.resource_tags(Vec<ResourceTag>)
/set_resource_tags(Option<Vec<ResourceTag>>)
:Specifies the resource tags to use to identify resources that are to be retained by a tag-level retention rule. For tag-level retention rules, only deleted resources, of the specified resource type, that have one or more of the specified tag key and value pairs are retained. If a resource is deleted, but it does not have any of the specified tag key and value pairs, it is immediately deleted without being retained by the retention rule.
You can add the same tag key and value pair to a maximum or five retention rules.
To create a Region-level retention rule, omit this parameter. A Region-level retention rule does not have any resource tags specified. It retains all deleted resources of the specified resource type in the Region in which the rule is created, even if the resources are not tagged.
- On success, responds with
CreateRuleOutput
with field(s):identifier(Option<String>)
:The unique ID of the retention rule.
retention_period(Option<RetentionPeriod>)
:Information about the retention period for which the retention rule is to retain resources.
description(Option<String>)
:The retention rule description.
tags(Option<Vec<Tag>>)
:Information about the tags assigned to the retention rule.
resource_type(Option<ResourceType>)
:The resource type retained by the retention rule.
resource_tags(Option<Vec<ResourceTag>>)
:Information about the resource tags used to identify resources that are retained by the retention rule.
status(Option<RuleStatus>)
:The state of the retention rule. Only retention rules that are in the
available
state retain resources.
- On failure, responds with
SdkError<CreateRuleError>
sourcepub fn delete_rule(&self) -> DeleteRule
pub fn delete_rule(&self) -> DeleteRule
Constructs a fluent builder for the DeleteRule
operation.
- The fluent builder is configurable:
identifier(impl Into<String>)
/set_identifier(Option<String>)
:The unique ID of the retention rule.
- On success, responds with
DeleteRuleOutput
- On failure, responds with
SdkError<DeleteRuleError>
sourcepub fn get_rule(&self) -> GetRule
pub fn get_rule(&self) -> GetRule
Constructs a fluent builder for the GetRule
operation.
- The fluent builder is configurable:
identifier(impl Into<String>)
/set_identifier(Option<String>)
:The unique ID of the retention rule.
- On success, responds with
GetRuleOutput
with field(s):identifier(Option<String>)
:The unique ID of the retention rule.
description(Option<String>)
:The retention rule description.
resource_type(Option<ResourceType>)
:The resource type retained by the retention rule.
retention_period(Option<RetentionPeriod>)
:Information about the retention period for which the retention rule is to retain resources.
resource_tags(Option<Vec<ResourceTag>>)
:Information about the resource tags used to identify resources that are retained by the retention rule.
status(Option<RuleStatus>)
:The state of the retention rule. Only retention rules that are in the
available
state retain resources.
- On failure, responds with
SdkError<GetRuleError>
sourcepub fn list_rules(&self) -> ListRules
pub fn list_rules(&self) -> ListRules
Constructs a fluent builder for the ListRules
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
max_results(i32)
/set_max_results(Option<i32>)
:The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned
NextToken
value.next_token(impl Into<String>)
/set_next_token(Option<String>)
:The token for the next page of results.
resource_type(ResourceType)
/set_resource_type(Option<ResourceType>)
:The resource type retained by the retention rule. Only retention rules that retain the specified resource type are listed. Currently, only Amazon EBS snapshots and EBS-backed AMIs are supported. To list retention rules that retain snapshots, specify
EBS_SNAPSHOT
. To list retention rules that retain EBS-backed AMIs, specifyEC2_IMAGE
.resource_tags(Vec<ResourceTag>)
/set_resource_tags(Option<Vec<ResourceTag>>)
:Information about the resource tags used to identify resources that are retained by the retention rule.
- On success, responds with
ListRulesOutput
with field(s):rules(Option<Vec<RuleSummary>>)
:Information about the retention rules.
next_token(Option<String>)
:The token to use to retrieve the next page of results. This value is
null
when there are no more results to return.
- On failure, responds with
SdkError<ListRulesError>
Constructs a fluent builder for the ListTagsForResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:The Amazon Resource Name (ARN) of the retention rule.
- On success, responds with
ListTagsForResourceOutput
with field(s):tags(Option<Vec<Tag>>)
:Information about the tags assigned to the retention rule.
- On failure, responds with
SdkError<ListTagsForResourceError>
sourcepub fn tag_resource(&self) -> TagResource
pub fn tag_resource(&self) -> TagResource
Constructs a fluent builder for the TagResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:The Amazon Resource Name (ARN) of the retention rule.
tags(Vec<Tag>)
/set_tags(Option<Vec<Tag>>)
:Information about the tags to assign to the retention rule.
- On success, responds with
TagResourceOutput
- On failure, responds with
SdkError<TagResourceError>
sourcepub fn untag_resource(&self) -> UntagResource
pub fn untag_resource(&self) -> UntagResource
Constructs a fluent builder for the UntagResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:The Amazon Resource Name (ARN) of the retention rule.
tag_keys(Vec<String>)
/set_tag_keys(Option<Vec<String>>)
:The tag keys of the tags to unassign. All tags that have the specified tag key are unassigned.
- On success, responds with
UntagResourceOutput
- On failure, responds with
SdkError<UntagResourceError>
sourcepub fn update_rule(&self) -> UpdateRule
pub fn update_rule(&self) -> UpdateRule
Constructs a fluent builder for the UpdateRule
operation.
- The fluent builder is configurable:
identifier(impl Into<String>)
/set_identifier(Option<String>)
:The unique ID of the retention rule.
retention_period(RetentionPeriod)
/set_retention_period(Option<RetentionPeriod>)
:Information about the retention period for which the retention rule is to retain resources.
description(impl Into<String>)
/set_description(Option<String>)
:The retention rule description.
resource_type(ResourceType)
/set_resource_type(Option<ResourceType>)
:The resource type to be retained by the retention rule. Currently, only Amazon EBS snapshots and EBS-backed AMIs are supported. To retain snapshots, specify
EBS_SNAPSHOT
. To retain EBS-backed AMIs, specifyEC2_IMAGE
.resource_tags(Vec<ResourceTag>)
/set_resource_tags(Option<Vec<ResourceTag>>)
:Specifies the resource tags to use to identify resources that are to be retained by a tag-level retention rule. For tag-level retention rules, only deleted resources, of the specified resource type, that have one or more of the specified tag key and value pairs are retained. If a resource is deleted, but it does not have any of the specified tag key and value pairs, it is immediately deleted without being retained by the retention rule.
You can add the same tag key and value pair to a maximum or five retention rules.
To create a Region-level retention rule, omit this parameter. A Region-level retention rule does not have any resource tags specified. It retains all deleted resources of the specified resource type in the Region in which the rule is created, even if the resources are not tagged.
- On success, responds with
UpdateRuleOutput
with field(s):identifier(Option<String>)
:The unique ID of the retention rule.
retention_period(Option<RetentionPeriod>)
:Information about the retention period for which the retention rule is to retain resources.
description(Option<String>)
:The retention rule description.
resource_type(Option<ResourceType>)
:The resource type retained by the retention rule.
resource_tags(Option<Vec<ResourceTag>>)
:Information about the resource tags used to identify resources that are retained by the retention rule.
status(Option<RuleStatus>)
:The state of the retention rule. Only retention rules that are in the
available
state retain resources.
- On failure, responds with
SdkError<UpdateRuleError>
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> 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