Struct aws_sdk_rbin::client::Client
source · [−]pub struct Client<C = DynConnector, M = DefaultMiddleware, R = Standard> { /* 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
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,
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>)
:A brief description for the retention rule.
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 are supported.
resource_tags(Vec<ResourceTag>)
/set_resource_tags(Option<Vec<ResourceTag>>)
:Information about the resource tags to use to identify resources that are to be retained by the retention rule. The retention rule retains only deleted snapshots that have one or more of the specified tag key and value pairs. If a snapshot 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.
- On success, responds with
CreateRuleOutput
with field(s):identifier(Option<String>)
:The unique identifier of the retention rule.
retention_period(Option<RetentionPeriod>)
:Information about the retention period for which a retention rule is to retain resources.
description(Option<String>)
:The retention rule description.
tags(Option<Vec<Tag>>)
: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 snapshots.
- On failure, responds with
SdkError<CreateRuleError>
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 to delete.
- On success, responds with
DeleteRuleOutput
- On failure, responds with
SdkError<DeleteRuleError>
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 description assigned to the retention rule.
resource_type(Option<ResourceType>)
:The resource type retained by the retention rule. Currently, only Amazon EBS snapshots are supported.
retention_period(Option<RetentionPeriod>)
:Information about the period for which the retention rule retains resources.
resource_tags(Option<Vec<ResourceTag>>)
:The resource tags used to identify resources that are to be retained by the retention rule.
status(Option<RuleStatus>)
:The state of the retention rule. Only retention rules that are in the
available
state retain snapshots.
- On failure, responds with
SdkError<GetRuleError>
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 for the request in a single page. The remaining results can be seen by sending another request with the returned
nextToken
value. This value can be between 5 and 500. IfmaxResults
is given a larger value than 500, you receive an error.next_token(impl Into<String>)
/set_next_token(Option<String>)
:The token to use to retrieve 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.
resource_tags(Vec<ResourceTag>)
/set_resource_tags(Option<Vec<ResourceTag>>)
:The tags used to identify resources that are to be 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 resource for which to list the tags.
- On success, responds with
ListTagsForResourceOutput
with field(s):tags(Option<Vec<Tag>>)
:Information about the tags assigned to the resource.
- On failure, responds with
SdkError<ListTagsForResourceError>
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 resource to which to assign the tags.
tags(Vec<Tag>)
/set_tags(Option<Vec<Tag>>)
:Information about the tags to assign to the resource.
- On success, responds with
TagResourceOutput
- On failure, responds with
SdkError<TagResourceError>
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 resource from which to unassign the tags.
tag_keys(Vec<String>)
/set_tag_keys(Option<Vec<String>>)
:Information about the tags to unassign from the resource.
- On success, responds with
UntagResourceOutput
- On failure, responds with
SdkError<UntagResourceError>
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 to update.
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 are supported.
resource_tags(Vec<ResourceTag>)
/set_resource_tags(Option<Vec<ResourceTag>>)
:Information about the resource tags to use to identify resources that are to be retained by the retention rule. The retention rule retains only deleted snapshots that have one or more of the specified tag key and value pairs. If a snapshot 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.
- 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 a 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 snapshots.
- On failure, responds with
SdkError<UpdateRuleError>
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