pub struct Client { /* private fields */ }
Expand description
Client for AWS Multi-party Approval
Client for invoking operations on AWS Multi-party Approval. Each operation on AWS Multi-party Approval 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_mpa::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_mpa::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 CancelSession
operation has
a Client::cancel_session
, 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.cancel_session()
.session_arn("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 cancel_session(&self) -> CancelSessionFluentBuilder
pub fn cancel_session(&self) -> CancelSessionFluentBuilder
Constructs a fluent builder for the CancelSession
operation.
- The fluent builder is configurable:
session_arn(impl Into<String>)
/set_session_arn(Option<String>)
:
required: trueAmazon Resource Name (ARN) for the session.
- On success, responds with
CancelSessionOutput
- On failure, responds with
SdkError<CancelSessionError>
Source§impl Client
impl Client
Sourcepub fn create_approval_team(&self) -> CreateApprovalTeamFluentBuilder
pub fn create_approval_team(&self) -> CreateApprovalTeamFluentBuilder
Constructs a fluent builder for the CreateApprovalTeam
operation.
- The fluent builder is configurable:
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseUnique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services populates this field.
What is idempotency?
When you make a mutating API request, the request typically returns a result before the operation’s asynchronous workflows have completed. Operations might also time out or encounter other server issues before they complete, even though the request has already returned a result. This could make it difficult to determine whether the request succeeded or not, and could lead to multiple retries to ensure that the operation completes successfully. However, if the original request and the subsequent retries are successful, the operation is completed multiple times. This means that you might create more resources than you intended.
Idempotency ensures that an API request completes no more than one time. With an idempotent request, if the original request completes successfully, any subsequent retries complete successfully without performing any further actions.
approval_strategy(ApprovalStrategy)
/set_approval_strategy(Option<ApprovalStrategy>)
:
required: trueAn
ApprovalStrategy
object. Contains details for how the team grants approval.approvers(ApprovalTeamRequestApprover)
/set_approvers(Option<Vec::<ApprovalTeamRequestApprover>>)
:
required: trueAn array of
ApprovalTeamRequesterApprovers
objects. Contains details for the approvers in the team.description(impl Into<String>)
/set_description(Option<String>)
:
required: trueDescription for the team.
policies(PolicyReference)
/set_policies(Option<Vec::<PolicyReference>>)
:
required: trueAn array of
PolicyReference
objects. Contains a list of policies that define the permissions for team resources.The protected operation for a service integration might require specific permissions. For more information, see How other services work with Multi-party approval in the Multi-party approval User Guide.
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueName of the team.
tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: falseTags you want to attach to the team.
- On success, responds with
CreateApprovalTeamOutput
with field(s):creation_time(Option<DateTime>)
:Timestamp when the team was created.
arn(Option<String>)
:Amazon Resource Name (ARN) for the team that was created.
name(Option<String>)
:Name of the team that was created.
version_id(Option<String>)
:Version ID for the team that was created. When a team is updated, the version ID changes.
- On failure, responds with
SdkError<CreateApprovalTeamError>
Source§impl Client
impl Client
Sourcepub fn create_identity_source(&self) -> CreateIdentitySourceFluentBuilder
pub fn create_identity_source(&self) -> CreateIdentitySourceFluentBuilder
Constructs a fluent builder for the CreateIdentitySource
operation.
- The fluent builder is configurable:
identity_source_parameters(IdentitySourceParameters)
/set_identity_source_parameters(Option<IdentitySourceParameters>)
:
required: trueA
IdentitySourceParameters
object. Contains details for the resource that provides identities to the identity source. For example, an IAM Identity Center instance.client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseUnique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services populates this field.
What is idempotency?
When you make a mutating API request, the request typically returns a result before the operation’s asynchronous workflows have completed. Operations might also time out or encounter other server issues before they complete, even though the request has already returned a result. This could make it difficult to determine whether the request succeeded or not, and could lead to multiple retries to ensure that the operation completes successfully. However, if the original request and the subsequent retries are successful, the operation is completed multiple times. This means that you might create more resources than you intended.
Idempotency ensures that an API request completes no more than one time. With an idempotent request, if the original request completes successfully, any subsequent retries complete successfully without performing any further actions.
tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: falseTag you want to attach to the identity source.
- On success, responds with
CreateIdentitySourceOutput
with field(s):identity_source_type(Option<IdentitySourceType>)
:The type of resource that provided identities to the identity source. For example, an IAM Identity Center instance.
identity_source_arn(Option<String>)
:Amazon Resource Name (ARN) for the identity source that was created.
creation_time(Option<DateTime>)
:Timestamp when the identity source was created.
- On failure, responds with
SdkError<CreateIdentitySourceError>
Source§impl Client
impl Client
Sourcepub fn delete_identity_source(&self) -> DeleteIdentitySourceFluentBuilder
pub fn delete_identity_source(&self) -> DeleteIdentitySourceFluentBuilder
Constructs a fluent builder for the DeleteIdentitySource
operation.
- The fluent builder is configurable:
identity_source_arn(impl Into<String>)
/set_identity_source_arn(Option<String>)
:
required: trueAmazon Resource Name (ARN) for identity source.
- On success, responds with
DeleteIdentitySourceOutput
- On failure, responds with
SdkError<DeleteIdentitySourceError>
Source§impl Client
impl Client
Sourcepub fn delete_inactive_approval_team_version(
&self,
) -> DeleteInactiveApprovalTeamVersionFluentBuilder
pub fn delete_inactive_approval_team_version( &self, ) -> DeleteInactiveApprovalTeamVersionFluentBuilder
Constructs a fluent builder for the DeleteInactiveApprovalTeamVersion
operation.
- The fluent builder is configurable:
arn(impl Into<String>)
/set_arn(Option<String>)
:
required: trueAmaazon Resource Name (ARN) for the team.
version_id(impl Into<String>)
/set_version_id(Option<String>)
:
required: trueVersion ID for the team.
- On success, responds with
DeleteInactiveApprovalTeamVersionOutput
- On failure, responds with
SdkError<DeleteInactiveApprovalTeamVersionError>
Source§impl Client
impl Client
Sourcepub fn get_approval_team(&self) -> GetApprovalTeamFluentBuilder
pub fn get_approval_team(&self) -> GetApprovalTeamFluentBuilder
Constructs a fluent builder for the GetApprovalTeam
operation.
- The fluent builder is configurable:
arn(impl Into<String>)
/set_arn(Option<String>)
:
required: trueAmazon Resource Name (ARN) for the team.
- On success, responds with
GetApprovalTeamOutput
with field(s):creation_time(Option<DateTime>)
:Timestamp when the team was created.
approval_strategy(Option<ApprovalStrategyResponse>)
:An
ApprovalStrategyResponse
object. Contains details for how the team grants approval.number_of_approvers(Option<i32>)
:Total number of approvers in the team.
approvers(Option<Vec::<GetApprovalTeamResponseApprover>>)
:An array of
GetApprovalTeamResponseApprover
objects. Contains details for the approvers in the team.arn(Option<String>)
:Amazon Resource Name (ARN) for the team.
description(Option<String>)
:Description for the team.
name(Option<String>)
:Name of the approval team.
status(Option<ApprovalTeamStatus>)
:Status for the team. For more information, see Team health in the Multi-party approval User Guide.
status_code(Option<ApprovalTeamStatusCode>)
:Status code for the approval team. For more information, see Team health in the Multi-party approval User Guide.
status_message(Option<String>)
:Message describing the status for the team.
update_session_arn(Option<String>)
:Amazon Resource Name (ARN) for the session.
version_id(Option<String>)
:Version ID for the team.
policies(Option<Vec::<PolicyReference>>)
:An array of
PolicyReference
objects. Contains a list of policies that define the permissions for team resources.The protected operation for a service integration might require specific permissions. For more information, see How other services work with Multi-party approval in the Multi-party approval User Guide.
last_update_time(Option<DateTime>)
:Timestamp when the team was last updated.
pending_update(Option<PendingUpdate>)
:A
PendingUpdate
object. Contains details for the pending updates for the team, if applicable.
- On failure, responds with
SdkError<GetApprovalTeamError>
Source§impl Client
impl Client
Sourcepub fn get_identity_source(&self) -> GetIdentitySourceFluentBuilder
pub fn get_identity_source(&self) -> GetIdentitySourceFluentBuilder
Constructs a fluent builder for the GetIdentitySource
operation.
- The fluent builder is configurable:
identity_source_arn(impl Into<String>)
/set_identity_source_arn(Option<String>)
:
required: trueAmazon Resource Name (ARN) for the identity source.
- On success, responds with
GetIdentitySourceOutput
with field(s):identity_source_type(Option<IdentitySourceType>)
:The type of resource that provided identities to the identity source. For example, an IAM Identity Center instance.
identity_source_parameters(Option<IdentitySourceParametersForGet>)
:A
IdentitySourceParameters
object. Contains details for the resource that provides identities to the identity source. For example, an IAM Identity Center instance.identity_source_arn(Option<String>)
:Amazon Resource Name (ARN) for the identity source.
creation_time(Option<DateTime>)
:Timestamp when the identity source was created.
status(Option<IdentitySourceStatus>)
:Status for the identity source. For example, if the identity source is
ACTIVE
.status_code(Option<IdentitySourceStatusCode>)
:Status code of the identity source.
status_message(Option<String>)
:Message describing the status for the identity source.
- On failure, responds with
SdkError<GetIdentitySourceError>
Source§impl Client
impl Client
Sourcepub fn get_policy_version(&self) -> GetPolicyVersionFluentBuilder
pub fn get_policy_version(&self) -> GetPolicyVersionFluentBuilder
Constructs a fluent builder for the GetPolicyVersion
operation.
- The fluent builder is configurable:
policy_version_arn(impl Into<String>)
/set_policy_version_arn(Option<String>)
:
required: trueAmazon Resource Name (ARN) for the policy.
- On success, responds with
GetPolicyVersionOutput
with field(s):policy_version(Option<PolicyVersion>)
:A
PolicyVersion
object. Contains details for the version of the policy. Policies define the permissions for team resources.The protected operation for a service integration might require specific permissions. For more information, see How other services work with Multi-party approval in the Multi-party approval User Guide.
- On failure, responds with
SdkError<GetPolicyVersionError>
Source§impl Client
impl Client
Sourcepub fn get_resource_policy(&self) -> GetResourcePolicyFluentBuilder
pub fn get_resource_policy(&self) -> GetResourcePolicyFluentBuilder
Constructs a fluent builder for the GetResourcePolicy
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:
required: trueAmazon Resource Name (ARN) for the resource.
policy_name(impl Into<String>)
/set_policy_name(Option<String>)
:
required: trueName of the policy.
policy_type(PolicyType)
/set_policy_type(Option<PolicyType>)
:
required: trueThe type of policy.
- On success, responds with
GetResourcePolicyOutput
with field(s):resource_arn(String)
:Amazon Resource Name (ARN) for the resource.
policy_type(PolicyType)
:The type of policy
policy_version_arn(Option<String>)
:Amazon Resource Name (ARN) for the policy version.
policy_name(String)
:Name of the policy.
policy_document(String)
:Document that contains the contents for the policy.
- On failure, responds with
SdkError<GetResourcePolicyError>
Source§impl Client
impl Client
Sourcepub fn get_session(&self) -> GetSessionFluentBuilder
pub fn get_session(&self) -> GetSessionFluentBuilder
Constructs a fluent builder for the GetSession
operation.
- The fluent builder is configurable:
session_arn(impl Into<String>)
/set_session_arn(Option<String>)
:
required: trueAmazon Resource Name (ARN) for the session.
- On success, responds with
GetSessionOutput
with field(s):session_arn(Option<String>)
:Amazon Resource Name (ARN) for the session.
approval_team_arn(Option<String>)
:Amazon Resource Name (ARN) for the approval team.
approval_team_name(Option<String>)
:Name of the approval team.
protected_resource_arn(Option<String>)
:Amazon Resource Name (ARN) for the protected operation.
approval_strategy(Option<ApprovalStrategyResponse>)
:An
ApprovalStrategyResponse
object. Contains details for how the team grants approvalnumber_of_approvers(Option<i32>)
:Total number of approvers in the session.
initiation_time(Option<DateTime>)
:Timestamp when the session was initiated.
expiration_time(Option<DateTime>)
:Timestamp when the session will expire.
completion_time(Option<DateTime>)
:Timestamp when the session completed.
description(Option<String>)
:Description for the session.
metadata(Option<HashMap::<String, String>>)
:Metadata for the session.
status(Option<SessionStatus>)
:Status for the session. For example, if the team has approved the requested operation.
status_code(Option<SessionStatusCode>)
:Status code of the session.
status_message(Option<String>)
:Message describing the status for session.
execution_status(Option<SessionExecutionStatus>)
:Status for the protected operation. For example, if the operation is
PENDING
.action_name(Option<String>)
:Name of the protected operation.
requester_service_principal(Option<String>)
:Service principal for the service associated with the protected operation.
requester_principal_arn(Option<String>)
:IAM principal that made the operation request.
requester_account_id(Option<String>)
:ID for the account that made the operation request.
requester_region(Option<String>)
:Amazon Web Services Region where the operation request originated.
requester_comment(Option<String>)
:Message from the account that made the operation request
action_completion_strategy(Option<ActionCompletionStrategy>)
:Strategy for executing the protected operation.
AUTO_COMPLETION_UPON_APPROVAL
means the operation is automatically executed using the requester’s permissions, if approved.approver_responses(Option<Vec::<GetSessionResponseApproverResponse>>)
:An array of
GetSessionResponseApproverResponse
objects. Contains details for approver responses in the session.
- On failure, responds with
SdkError<GetSessionError>
Source§impl Client
impl Client
Sourcepub fn list_approval_teams(&self) -> ListApprovalTeamsFluentBuilder
pub fn list_approval_teams(&self) -> ListApprovalTeamsFluentBuilder
Constructs a fluent builder for the ListApprovalTeams
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of items to return in the response. If more results exist than the specified
MaxResults
value, a token is included in the response so that you can retrieve the remaining results.next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseIf present, indicates that more output is available than is included in the current response. Use this value in the
NextToken
request parameter in a next call to the operation to get more output. You can repeat this until theNextToken
response element returnsnull
.
- On success, responds with
ListApprovalTeamsOutput
with field(s):next_token(Option<String>)
:If present, indicates that more output is available than is included in the current response. Use this value in the
NextToken
request parameter in a next call to the operation to get more output. You can repeat this until theNextToken
response element returnsnull
.approval_teams(Option<Vec::<ListApprovalTeamsResponseApprovalTeam>>)
:An array of
ListApprovalTeamsResponseApprovalTeam
objects. Contains details for approval teams.
- On failure, responds with
SdkError<ListApprovalTeamsError>
Source§impl Client
impl Client
Sourcepub fn list_identity_sources(&self) -> ListIdentitySourcesFluentBuilder
pub fn list_identity_sources(&self) -> ListIdentitySourcesFluentBuilder
Constructs a fluent builder for the ListIdentitySources
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of items to return in the response. If more results exist than the specified
MaxResults
value, a token is included in the response so that you can retrieve the remaining results.next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseIf present, indicates that more output is available than is included in the current response. Use this value in the
NextToken
request parameter in a next call to the operation to get more output. You can repeat this until theNextToken
response element returnsnull
.
- On success, responds with
ListIdentitySourcesOutput
with field(s):next_token(Option<String>)
:If present, indicates that more output is available than is included in the current response. Use this value in the
NextToken
request parameter in a next call to the operation to get more output. You can repeat this until theNextToken
response element returnsnull
.identity_sources(Option<Vec::<IdentitySourceForList>>)
:A
IdentitySources
. Contains details for identity sources.
- On failure, responds with
SdkError<ListIdentitySourcesError>
Source§impl Client
impl Client
Sourcepub fn list_policies(&self) -> ListPoliciesFluentBuilder
pub fn list_policies(&self) -> ListPoliciesFluentBuilder
Constructs a fluent builder for the ListPolicies
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of items to return in the response. If more results exist than the specified
MaxResults
value, a token is included in the response so that you can retrieve the remaining results.next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseIf present, indicates that more output is available than is included in the current response. Use this value in the
NextToken
request parameter in a next call to the operation to get more output. You can repeat this until theNextToken
response element returnsnull
.
- On success, responds with
ListPoliciesOutput
with field(s):next_token(Option<String>)
:If present, indicates that more output is available than is included in the current response. Use this value in the
NextToken
request parameter in a next call to the operation to get more output. You can repeat this until theNextToken
response element returnsnull
.policies(Option<Vec::<Policy>>)
:An array of
Policy
objects. Contains a list of policies that define the permissions for team resources.The protected operation for a service integration might require specific permissions. For more information, see How other services work with Multi-party approval in the Multi-party approval User Guide.
- On failure, responds with
SdkError<ListPoliciesError>
Source§impl Client
impl Client
Sourcepub fn list_policy_versions(&self) -> ListPolicyVersionsFluentBuilder
pub fn list_policy_versions(&self) -> ListPolicyVersionsFluentBuilder
Constructs a fluent builder for the ListPolicyVersions
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of items to return in the response. If more results exist than the specified
MaxResults
value, a token is included in the response so that you can retrieve the remaining results.next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseIf present, indicates that more output is available than is included in the current response. Use this value in the
NextToken
request parameter in a next call to the operation to get more output. You can repeat this until theNextToken
response element returnsnull
.policy_arn(impl Into<String>)
/set_policy_arn(Option<String>)
:
required: trueAmazon Resource Name (ARN) for the policy.
- On success, responds with
ListPolicyVersionsOutput
with field(s):next_token(Option<String>)
:If present, indicates that more output is available than is included in the current response. Use this value in the
NextToken
request parameter in a next call to the operation to get more output. You can repeat this until theNextToken
response element returnsnull
.policy_versions(Option<Vec::<PolicyVersionSummary>>)
:An array of
PolicyVersionSummary
objects. Contains details for the version of the policies that define the permissions for team resources.The protected operation for a service integration might require specific permissions. For more information, see How other services work with Multi-party approval in the Multi-party approval User Guide.
- On failure, responds with
SdkError<ListPolicyVersionsError>
Source§impl Client
impl Client
Sourcepub fn list_resource_policies(&self) -> ListResourcePoliciesFluentBuilder
pub fn list_resource_policies(&self) -> ListResourcePoliciesFluentBuilder
Constructs a fluent builder for the ListResourcePolicies
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:
required: trueAmazon Resource Name (ARN) for the resource.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of items to return in the response. If more results exist than the specified
MaxResults
value, a token is included in the response so that you can retrieve the remaining results.next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseIf present, indicates that more output is available than is included in the current response. Use this value in the
NextToken
request parameter in a next call to the operation to get more output. You can repeat this until theNextToken
response element returnsnull
.
- On success, responds with
ListResourcePoliciesOutput
with field(s):next_token(Option<String>)
:If present, indicates that more output is available than is included in the current response. Use this value in the
NextToken
request parameter in a next call to the operation to get more output. You can repeat this until theNextToken
response element returnsnull
.resource_policies(Option<Vec::<ListResourcePoliciesResponseResourcePolicy>>)
:An array of
ListResourcePoliciesResponseResourcePolicy
objects. Contains details about the policy for the resource.
- On failure, responds with
SdkError<ListResourcePoliciesError>
Source§impl Client
impl Client
Sourcepub fn list_sessions(&self) -> ListSessionsFluentBuilder
pub fn list_sessions(&self) -> ListSessionsFluentBuilder
Constructs a fluent builder for the ListSessions
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
approval_team_arn(impl Into<String>)
/set_approval_team_arn(Option<String>)
:
required: trueAmazon Resource Name (ARN) for the approval team.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of items to return in the response. If more results exist than the specified
MaxResults
value, a token is included in the response so that you can retrieve the remaining results.next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseIf present, indicates that more output is available than is included in the current response. Use this value in the
NextToken
request parameter in a next call to the operation to get more output. You can repeat this until theNextToken
response element returnsnull
.filters(Filter)
/set_filters(Option<Vec::<Filter>>)
:
required: falseAn array of
Filter
objects. Contains the filter to apply when listing sessions.
- On success, responds with
ListSessionsOutput
with field(s):next_token(Option<String>)
:If present, indicates that more output is available than is included in the current response. Use this value in the
NextToken
request parameter in a next call to the operation to get more output. You can repeat this until theNextToken
response element returnsnull
.sessions(Option<Vec::<ListSessionsResponseSession>>)
:An array of
ListSessionsResponseSession
objects. Contains details for the sessions.
- On failure, responds with
SdkError<ListSessionsError>
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: trueAmazon Resource Name (ARN) for the resource.
- On success, responds with
ListTagsForResourceOutput
with field(s):tags(Option<HashMap::<String, String>>)
:Tags attached to the resource.
- On failure, responds with
SdkError<ListTagsForResourceError>
Source§impl Client
impl Client
Sourcepub fn start_active_approval_team_deletion(
&self,
) -> StartActiveApprovalTeamDeletionFluentBuilder
pub fn start_active_approval_team_deletion( &self, ) -> StartActiveApprovalTeamDeletionFluentBuilder
Constructs a fluent builder for the StartActiveApprovalTeamDeletion
operation.
- The fluent builder is configurable:
pending_window_days(i32)
/set_pending_window_days(Option<i32>)
:
required: falseNumber of days between when the team approves the delete request and when the team is deleted.
arn(impl Into<String>)
/set_arn(Option<String>)
:
required: trueAmazon Resource Name (ARN) for the team.
- On success, responds with
StartActiveApprovalTeamDeletionOutput
with field(s):deletion_completion_time(Option<DateTime>)
:Timestamp when the deletion process is scheduled to complete.
deletion_start_time(Option<DateTime>)
:Timestamp when the deletion process was initiated.
- On failure, responds with
SdkError<StartActiveApprovalTeamDeletionError>
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: trueAmazon Resource Name (ARN) for the resource you want to tag.
tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: trueTags that you have added to the specified 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: trueAmazon Resource Name (ARN) for the resource you want to untag.
tag_keys(impl Into<String>)
/set_tag_keys(Option<Vec::<String>>)
:
required: trueArray of tag key-value pairs that you want to untag.
- On success, responds with
UntagResourceOutput
- On failure, responds with
SdkError<UntagResourceError>
Source§impl Client
impl Client
Sourcepub fn update_approval_team(&self) -> UpdateApprovalTeamFluentBuilder
pub fn update_approval_team(&self) -> UpdateApprovalTeamFluentBuilder
Constructs a fluent builder for the UpdateApprovalTeam
operation.
- The fluent builder is configurable:
approval_strategy(ApprovalStrategy)
/set_approval_strategy(Option<ApprovalStrategy>)
:
required: falseAn
ApprovalStrategy
object. Contains details for how the team grants approval.approvers(ApprovalTeamRequestApprover)
/set_approvers(Option<Vec::<ApprovalTeamRequestApprover>>)
:
required: falseAn array of
ApprovalTeamRequestApprover
objects. Contains details for the approvers in the team.description(impl Into<String>)
/set_description(Option<String>)
:
required: falseDescription for the team.
arn(impl Into<String>)
/set_arn(Option<String>)
:
required: trueAmazon Resource Name (ARN) for the team.
- On success, responds with
UpdateApprovalTeamOutput
with field(s):version_id(Option<String>)
:Version ID for the team that was created. When an approval team is updated, the version ID changes.
- On failure, responds with
SdkError<UpdateApprovalTeamError>
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);