pub struct Client { /* private fields */ }
Expand description
Client for OpenSearch Service Serverless
Client for invoking operations on OpenSearch Service Serverless. Each operation on OpenSearch Service Serverless 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_opensearchserverless::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_opensearchserverless::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 CreateAccessPolicy
operation has
a Client::create_access_policy
, 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.create_access_policy()
.r#type("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 batch_get_collection(&self) -> BatchGetCollectionFluentBuilder
pub fn batch_get_collection(&self) -> BatchGetCollectionFluentBuilder
Constructs a fluent builder for the BatchGetCollection
operation.
- The fluent builder is configurable:
ids(impl Into<String>)
/set_ids(Option<Vec::<String>>)
:
required: falseA list of collection IDs. You can’t provide names and IDs in the same request. The ID is part of the collection endpoint. You can also retrieve it using the ListCollections API.
names(impl Into<String>)
/set_names(Option<Vec::<String>>)
:
required: falseA list of collection names. You can’t provide names and IDs in the same request.
- On success, responds with
BatchGetCollectionOutput
with field(s):collection_details(Option<Vec::<CollectionDetail>>)
:Details about each collection.
collection_error_details(Option<Vec::<CollectionErrorDetail>>)
:Error information for the request.
- On failure, responds with
SdkError<BatchGetCollectionError>
Source§impl Client
impl Client
Sourcepub fn batch_get_effective_lifecycle_policy(
&self,
) -> BatchGetEffectiveLifecyclePolicyFluentBuilder
pub fn batch_get_effective_lifecycle_policy( &self, ) -> BatchGetEffectiveLifecyclePolicyFluentBuilder
Constructs a fluent builder for the BatchGetEffectiveLifecyclePolicy
operation.
- The fluent builder is configurable:
resource_identifiers(LifecyclePolicyResourceIdentifier)
/set_resource_identifiers(Option<Vec::<LifecyclePolicyResourceIdentifier>>)
:
required: trueThe unique identifiers of policy types and resource names.
- On success, responds with
BatchGetEffectiveLifecyclePolicyOutput
with field(s):effective_lifecycle_policy_details(Option<Vec::<EffectiveLifecyclePolicyDetail>>)
:A list of lifecycle policies applied to the OpenSearch Serverless indexes.
effective_lifecycle_policy_error_details(Option<Vec::<EffectiveLifecyclePolicyErrorDetail>>)
:A list of resources for which retrieval failed.
- On failure, responds with
SdkError<BatchGetEffectiveLifecyclePolicyError>
Source§impl Client
impl Client
Sourcepub fn batch_get_lifecycle_policy(&self) -> BatchGetLifecyclePolicyFluentBuilder
pub fn batch_get_lifecycle_policy(&self) -> BatchGetLifecyclePolicyFluentBuilder
Constructs a fluent builder for the BatchGetLifecyclePolicy
operation.
- The fluent builder is configurable:
identifiers(LifecyclePolicyIdentifier)
/set_identifiers(Option<Vec::<LifecyclePolicyIdentifier>>)
:
required: trueThe unique identifiers of policy types and policy names.
- On success, responds with
BatchGetLifecyclePolicyOutput
with field(s):lifecycle_policy_details(Option<Vec::<LifecyclePolicyDetail>>)
:A list of lifecycle policies matched to the input policy name and policy type.
lifecycle_policy_error_details(Option<Vec::<LifecyclePolicyErrorDetail>>)
:A list of lifecycle policy names and policy types for which retrieval failed.
- On failure, responds with
SdkError<BatchGetLifecyclePolicyError>
Source§impl Client
impl Client
Sourcepub fn batch_get_vpc_endpoint(&self) -> BatchGetVpcEndpointFluentBuilder
pub fn batch_get_vpc_endpoint(&self) -> BatchGetVpcEndpointFluentBuilder
Constructs a fluent builder for the BatchGetVpcEndpoint
operation.
- The fluent builder is configurable:
ids(impl Into<String>)
/set_ids(Option<Vec::<String>>)
:
required: trueA list of VPC endpoint identifiers.
- On success, responds with
BatchGetVpcEndpointOutput
with field(s):vpc_endpoint_details(Option<Vec::<VpcEndpointDetail>>)
:Details about the specified VPC endpoint.
vpc_endpoint_error_details(Option<Vec::<VpcEndpointErrorDetail>>)
:Error information for a failed request.
- On failure, responds with
SdkError<BatchGetVpcEndpointError>
Source§impl Client
impl Client
Sourcepub fn create_access_policy(&self) -> CreateAccessPolicyFluentBuilder
pub fn create_access_policy(&self) -> CreateAccessPolicyFluentBuilder
Constructs a fluent builder for the CreateAccessPolicy
operation.
- The fluent builder is configurable:
r#type(AccessPolicyType)
/set_type(Option<AccessPolicyType>)
:
required: trueThe type of policy.
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the policy.
description(impl Into<String>)
/set_description(Option<String>)
:
required: falseA description of the policy. Typically used to store information about the permissions defined in the policy.
policy(impl Into<String>)
/set_policy(Option<String>)
:
required: trueThe JSON policy document to use as the content for the policy.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseUnique, case-sensitive identifier to ensure idempotency of the request.
- On success, responds with
CreateAccessPolicyOutput
with field(s):access_policy_detail(Option<AccessPolicyDetail>)
:Details about the created access policy.
- On failure, responds with
SdkError<CreateAccessPolicyError>
Source§impl Client
impl Client
Sourcepub fn create_collection(&self) -> CreateCollectionFluentBuilder
pub fn create_collection(&self) -> CreateCollectionFluentBuilder
Constructs a fluent builder for the CreateCollection
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueName of the collection.
r#type(CollectionType)
/set_type(Option<CollectionType>)
:
required: falseThe type of collection.
description(impl Into<String>)
/set_description(Option<String>)
:
required: falseDescription of the collection.
tags(Tag)
/set_tags(Option<Vec::<Tag>>)
:
required: falseAn arbitrary set of tags (key–value pairs) to associate with the OpenSearch Serverless collection.
standby_replicas(StandbyReplicas)
/set_standby_replicas(Option<StandbyReplicas>)
:
required: falseIndicates whether standby replicas should be used for a collection.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseUnique, case-sensitive identifier to ensure idempotency of the request.
- On success, responds with
CreateCollectionOutput
with field(s):create_collection_detail(Option<CreateCollectionDetail>)
:Details about the collection.
- On failure, responds with
SdkError<CreateCollectionError>
Source§impl Client
impl Client
Sourcepub fn create_lifecycle_policy(&self) -> CreateLifecyclePolicyFluentBuilder
pub fn create_lifecycle_policy(&self) -> CreateLifecyclePolicyFluentBuilder
Constructs a fluent builder for the CreateLifecyclePolicy
operation.
- The fluent builder is configurable:
r#type(LifecyclePolicyType)
/set_type(Option<LifecyclePolicyType>)
:
required: trueThe type of lifecycle policy.
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the lifecycle policy.
description(impl Into<String>)
/set_description(Option<String>)
:
required: falseA description of the lifecycle policy.
policy(impl Into<String>)
/set_policy(Option<String>)
:
required: trueThe JSON policy document to use as the content for the lifecycle policy.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA unique, case-sensitive identifier to ensure idempotency of the request.
- On success, responds with
CreateLifecyclePolicyOutput
with field(s):lifecycle_policy_detail(Option<LifecyclePolicyDetail>)
:Details about the created lifecycle policy.
- On failure, responds with
SdkError<CreateLifecyclePolicyError>
Source§impl Client
impl Client
Sourcepub fn create_security_config(&self) -> CreateSecurityConfigFluentBuilder
pub fn create_security_config(&self) -> CreateSecurityConfigFluentBuilder
Constructs a fluent builder for the CreateSecurityConfig
operation.
- The fluent builder is configurable:
r#type(SecurityConfigType)
/set_type(Option<SecurityConfigType>)
:
required: trueThe type of security configuration.
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the security configuration.
description(impl Into<String>)
/set_description(Option<String>)
:
required: falseA description of the security configuration.
saml_options(SamlConfigOptions)
/set_saml_options(Option<SamlConfigOptions>)
:
required: falseDescribes SAML options in in the form of a key-value map. This field is required if you specify
saml
for thetype
parameter.iam_identity_center_options(CreateIamIdentityCenterConfigOptions)
/set_iam_identity_center_options(Option<CreateIamIdentityCenterConfigOptions>)
:
required: falseDescribes IAM Identity Center options in the form of a key-value map. This field is required if you specify iamidentitycenter for the type parameter.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseUnique, case-sensitive identifier to ensure idempotency of the request.
- On success, responds with
CreateSecurityConfigOutput
with field(s):security_config_detail(Option<SecurityConfigDetail>)
:Details about the created security configuration.
- On failure, responds with
SdkError<CreateSecurityConfigError>
Source§impl Client
impl Client
Sourcepub fn create_security_policy(&self) -> CreateSecurityPolicyFluentBuilder
pub fn create_security_policy(&self) -> CreateSecurityPolicyFluentBuilder
Constructs a fluent builder for the CreateSecurityPolicy
operation.
- The fluent builder is configurable:
r#type(SecurityPolicyType)
/set_type(Option<SecurityPolicyType>)
:
required: trueThe type of security policy.
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the policy.
description(impl Into<String>)
/set_description(Option<String>)
:
required: falseA description of the policy. Typically used to store information about the permissions defined in the policy.
policy(impl Into<String>)
/set_policy(Option<String>)
:
required: trueThe JSON policy document to use as the content for the new policy.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseUnique, case-sensitive identifier to ensure idempotency of the request.
- On success, responds with
CreateSecurityPolicyOutput
with field(s):security_policy_detail(Option<SecurityPolicyDetail>)
:Details about the created security policy.
- On failure, responds with
SdkError<CreateSecurityPolicyError>
Source§impl Client
impl Client
Sourcepub fn create_vpc_endpoint(&self) -> CreateVpcEndpointFluentBuilder
pub fn create_vpc_endpoint(&self) -> CreateVpcEndpointFluentBuilder
Constructs a fluent builder for the CreateVpcEndpoint
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the interface endpoint.
vpc_id(impl Into<String>)
/set_vpc_id(Option<String>)
:
required: trueThe ID of the VPC from which you’ll access OpenSearch Serverless.
subnet_ids(impl Into<String>)
/set_subnet_ids(Option<Vec::<String>>)
:
required: trueThe ID of one or more subnets from which you’ll access OpenSearch Serverless.
security_group_ids(impl Into<String>)
/set_security_group_ids(Option<Vec::<String>>)
:
required: falseThe unique identifiers of the security groups that define the ports, protocols, and sources for inbound traffic that you are authorizing into your endpoint.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseUnique, case-sensitive identifier to ensure idempotency of the request.
- On success, responds with
CreateVpcEndpointOutput
with field(s):create_vpc_endpoint_detail(Option<CreateVpcEndpointDetail>)
:Details about the created interface VPC endpoint.
- On failure, responds with
SdkError<CreateVpcEndpointError>
Source§impl Client
impl Client
Sourcepub fn delete_access_policy(&self) -> DeleteAccessPolicyFluentBuilder
pub fn delete_access_policy(&self) -> DeleteAccessPolicyFluentBuilder
Constructs a fluent builder for the DeleteAccessPolicy
operation.
- The fluent builder is configurable:
r#type(AccessPolicyType)
/set_type(Option<AccessPolicyType>)
:
required: trueThe type of policy.
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the policy to delete.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseUnique, case-sensitive identifier to ensure idempotency of the request.
- On success, responds with
DeleteAccessPolicyOutput
- On failure, responds with
SdkError<DeleteAccessPolicyError>
Source§impl Client
impl Client
Sourcepub fn delete_collection(&self) -> DeleteCollectionFluentBuilder
pub fn delete_collection(&self) -> DeleteCollectionFluentBuilder
Constructs a fluent builder for the DeleteCollection
operation.
- The fluent builder is configurable:
id(impl Into<String>)
/set_id(Option<String>)
:
required: trueThe unique identifier of the collection. For example,
1iu5usc406kd
. The ID is part of the collection endpoint. You can also retrieve it using the ListCollections API.client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA unique, case-sensitive identifier to ensure idempotency of the request.
- On success, responds with
DeleteCollectionOutput
with field(s):delete_collection_detail(Option<DeleteCollectionDetail>)
:Details of the deleted collection.
- On failure, responds with
SdkError<DeleteCollectionError>
Source§impl Client
impl Client
Sourcepub fn delete_lifecycle_policy(&self) -> DeleteLifecyclePolicyFluentBuilder
pub fn delete_lifecycle_policy(&self) -> DeleteLifecyclePolicyFluentBuilder
Constructs a fluent builder for the DeleteLifecyclePolicy
operation.
- The fluent builder is configurable:
r#type(LifecyclePolicyType)
/set_type(Option<LifecyclePolicyType>)
:
required: trueThe type of lifecycle policy.
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the policy to delete.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseUnique, case-sensitive identifier to ensure idempotency of the request.
- On success, responds with
DeleteLifecyclePolicyOutput
- On failure, responds with
SdkError<DeleteLifecyclePolicyError>
Source§impl Client
impl Client
Sourcepub fn delete_security_config(&self) -> DeleteSecurityConfigFluentBuilder
pub fn delete_security_config(&self) -> DeleteSecurityConfigFluentBuilder
Constructs a fluent builder for the DeleteSecurityConfig
operation.
- The fluent builder is configurable:
id(impl Into<String>)
/set_id(Option<String>)
:
required: trueThe security configuration identifier. For SAML the ID will be
saml/<accountId>/<idpProviderName>
. For example,saml/123456789123/OKTADev
.client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseUnique, case-sensitive identifier to ensure idempotency of the request.
- On success, responds with
DeleteSecurityConfigOutput
- On failure, responds with
SdkError<DeleteSecurityConfigError>
Source§impl Client
impl Client
Sourcepub fn delete_security_policy(&self) -> DeleteSecurityPolicyFluentBuilder
pub fn delete_security_policy(&self) -> DeleteSecurityPolicyFluentBuilder
Constructs a fluent builder for the DeleteSecurityPolicy
operation.
- The fluent builder is configurable:
r#type(SecurityPolicyType)
/set_type(Option<SecurityPolicyType>)
:
required: trueThe type of policy.
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the policy to delete.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseUnique, case-sensitive identifier to ensure idempotency of the request.
- On success, responds with
DeleteSecurityPolicyOutput
- On failure, responds with
SdkError<DeleteSecurityPolicyError>
Source§impl Client
impl Client
Sourcepub fn delete_vpc_endpoint(&self) -> DeleteVpcEndpointFluentBuilder
pub fn delete_vpc_endpoint(&self) -> DeleteVpcEndpointFluentBuilder
Constructs a fluent builder for the DeleteVpcEndpoint
operation.
- The fluent builder is configurable:
id(impl Into<String>)
/set_id(Option<String>)
:
required: trueThe VPC endpoint identifier.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseUnique, case-sensitive identifier to ensure idempotency of the request.
- On success, responds with
DeleteVpcEndpointOutput
with field(s):delete_vpc_endpoint_detail(Option<DeleteVpcEndpointDetail>)
:Details about the deleted endpoint.
- On failure, responds with
SdkError<DeleteVpcEndpointError>
Source§impl Client
impl Client
Sourcepub fn get_access_policy(&self) -> GetAccessPolicyFluentBuilder
pub fn get_access_policy(&self) -> GetAccessPolicyFluentBuilder
Constructs a fluent builder for the GetAccessPolicy
operation.
- The fluent builder is configurable:
r#type(AccessPolicyType)
/set_type(Option<AccessPolicyType>)
:
required: trueTye type of policy. Currently, the only supported value is
data
.name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the access policy.
- On success, responds with
GetAccessPolicyOutput
with field(s):access_policy_detail(Option<AccessPolicyDetail>)
:Details about the requested access policy.
- On failure, responds with
SdkError<GetAccessPolicyError>
Source§impl Client
impl Client
Sourcepub fn get_account_settings(&self) -> GetAccountSettingsFluentBuilder
pub fn get_account_settings(&self) -> GetAccountSettingsFluentBuilder
Constructs a fluent builder for the GetAccountSettings
operation.
- The fluent builder takes no input, just
send
it. - On success, responds with
GetAccountSettingsOutput
with field(s):account_settings_detail(Option<AccountSettingsDetail>)
:OpenSearch Serverless-related details for the current account.
- On failure, responds with
SdkError<GetAccountSettingsError>
Source§impl Client
impl Client
Sourcepub fn get_policies_stats(&self) -> GetPoliciesStatsFluentBuilder
pub fn get_policies_stats(&self) -> GetPoliciesStatsFluentBuilder
Constructs a fluent builder for the GetPoliciesStats
operation.
- The fluent builder takes no input, just
send
it. - On success, responds with
GetPoliciesStatsOutput
with field(s):access_policy_stats(Option<AccessPolicyStats>)
:Information about the data access policies in your account.
security_policy_stats(Option<SecurityPolicyStats>)
:Information about the security policies in your account.
security_config_stats(Option<SecurityConfigStats>)
:Information about the security configurations in your account.
lifecycle_policy_stats(Option<LifecyclePolicyStats>)
:Information about the lifecycle policies in your account.
total_policy_count(Option<i64>)
:The total number of OpenSearch Serverless security policies and configurations in your account.
- On failure, responds with
SdkError<GetPoliciesStatsError>
Source§impl Client
impl Client
Sourcepub fn get_security_config(&self) -> GetSecurityConfigFluentBuilder
pub fn get_security_config(&self) -> GetSecurityConfigFluentBuilder
Constructs a fluent builder for the GetSecurityConfig
operation.
- The fluent builder is configurable:
id(impl Into<String>)
/set_id(Option<String>)
:
required: trueThe unique identifier of the security configuration.
- On success, responds with
GetSecurityConfigOutput
with field(s):security_config_detail(Option<SecurityConfigDetail>)
:Details of the requested security configuration.
- On failure, responds with
SdkError<GetSecurityConfigError>
Source§impl Client
impl Client
Sourcepub fn get_security_policy(&self) -> GetSecurityPolicyFluentBuilder
pub fn get_security_policy(&self) -> GetSecurityPolicyFluentBuilder
Constructs a fluent builder for the GetSecurityPolicy
operation.
- The fluent builder is configurable:
r#type(SecurityPolicyType)
/set_type(Option<SecurityPolicyType>)
:
required: trueThe type of security policy.
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the security policy.
- On success, responds with
GetSecurityPolicyOutput
with field(s):security_policy_detail(Option<SecurityPolicyDetail>)
:Details about the requested security policy.
- On failure, responds with
SdkError<GetSecurityPolicyError>
Source§impl Client
impl Client
Sourcepub fn list_access_policies(&self) -> ListAccessPoliciesFluentBuilder
pub fn list_access_policies(&self) -> ListAccessPoliciesFluentBuilder
Constructs a fluent builder for the ListAccessPolicies
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
r#type(AccessPolicyType)
/set_type(Option<AccessPolicyType>)
:
required: trueThe type of access policy.
resource(impl Into<String>)
/set_resource(Option<Vec::<String>>)
:
required: falseResource filters (can be collections or indexes) that policies can apply to.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseIf your initial
ListAccessPolicies
operation returns anextToken
, you can include the returnednextToken
in subsequentListAccessPolicies
operations, which returns results in the next page.max_results(i32)
/set_max_results(Option<i32>)
:
required: falseAn optional parameter that specifies the maximum number of results to return. You can use
nextToken
to get the next page of results. The default is 20.
- On success, responds with
ListAccessPoliciesOutput
with field(s):access_policy_summaries(Option<Vec::<AccessPolicySummary>>)
:Details about the requested access policies.
next_token(Option<String>)
:When
nextToken
is returned, there are more results available. The value ofnextToken
is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page.
- On failure, responds with
SdkError<ListAccessPoliciesError>
Source§impl Client
impl Client
Sourcepub fn list_collections(&self) -> ListCollectionsFluentBuilder
pub fn list_collections(&self) -> ListCollectionsFluentBuilder
Constructs a fluent builder for the ListCollections
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
collection_filters(CollectionFilters)
/set_collection_filters(Option<CollectionFilters>)
:
required: falseA list of filter names and values that you can use for requests.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseIf your initial
ListCollections
operation returns anextToken
, you can include the returnednextToken
in subsequentListCollections
operations, which returns results in the next page.max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results to return. Default is 20. You can use
nextToken
to get the next page of results.
- On success, responds with
ListCollectionsOutput
with field(s):collection_summaries(Option<Vec::<CollectionSummary>>)
:Details about each collection.
next_token(Option<String>)
:When
nextToken
is returned, there are more results available. The value ofnextToken
is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page.
- On failure, responds with
SdkError<ListCollectionsError>
Source§impl Client
impl Client
Sourcepub fn list_lifecycle_policies(&self) -> ListLifecyclePoliciesFluentBuilder
pub fn list_lifecycle_policies(&self) -> ListLifecyclePoliciesFluentBuilder
Constructs a fluent builder for the ListLifecyclePolicies
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
r#type(LifecyclePolicyType)
/set_type(Option<LifecyclePolicyType>)
:
required: trueThe type of lifecycle policy.
resources(impl Into<String>)
/set_resources(Option<Vec::<String>>)
:
required: falseResource filters that policies can apply to. Currently, the only supported resource type is
index
.next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseIf your initial
ListLifecyclePolicies
operation returns anextToken
, you can include the returnednextToken
in subsequentListLifecyclePolicies
operations, which returns results in the next page.max_results(i32)
/set_max_results(Option<i32>)
:
required: falseAn optional parameter that specifies the maximum number of results to return. You can use use
nextToken
to get the next page of results. The default is 10.
- On success, responds with
ListLifecyclePoliciesOutput
with field(s):lifecycle_policy_summaries(Option<Vec::<LifecyclePolicySummary>>)
:Details about the requested lifecycle policies.
next_token(Option<String>)
:When
nextToken
is returned, there are more results available. The value ofnextToken
is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page.
- On failure, responds with
SdkError<ListLifecyclePoliciesError>
Source§impl Client
impl Client
Sourcepub fn list_security_configs(&self) -> ListSecurityConfigsFluentBuilder
pub fn list_security_configs(&self) -> ListSecurityConfigsFluentBuilder
Constructs a fluent builder for the ListSecurityConfigs
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
r#type(SecurityConfigType)
/set_type(Option<SecurityConfigType>)
:
required: trueThe type of security configuration.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseIf your initial
ListSecurityConfigs
operation returns anextToken
, you can include the returnednextToken
in subsequentListSecurityConfigs
operations, which returns results in the next page.max_results(i32)
/set_max_results(Option<i32>)
:
required: falseAn optional parameter that specifies the maximum number of results to return. You can use
nextToken
to get the next page of results. The default is 20.
- On success, responds with
ListSecurityConfigsOutput
with field(s):security_config_summaries(Option<Vec::<SecurityConfigSummary>>)
:Details about the security configurations in your account.
next_token(Option<String>)
:When
nextToken
is returned, there are more results available. The value ofnextToken
is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page.
- On failure, responds with
SdkError<ListSecurityConfigsError>
Source§impl Client
impl Client
Sourcepub fn list_security_policies(&self) -> ListSecurityPoliciesFluentBuilder
pub fn list_security_policies(&self) -> ListSecurityPoliciesFluentBuilder
Constructs a fluent builder for the ListSecurityPolicies
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
r#type(SecurityPolicyType)
/set_type(Option<SecurityPolicyType>)
:
required: trueThe type of policy.
resource(impl Into<String>)
/set_resource(Option<Vec::<String>>)
:
required: falseResource filters (can be collection or indexes) that policies can apply to.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseIf your initial
ListSecurityPolicies
operation returns anextToken
, you can include the returnednextToken
in subsequentListSecurityPolicies
operations, which returns results in the next page.max_results(i32)
/set_max_results(Option<i32>)
:
required: falseAn optional parameter that specifies the maximum number of results to return. You can use
nextToken
to get the next page of results. The default is 20.
- On success, responds with
ListSecurityPoliciesOutput
with field(s):security_policy_summaries(Option<Vec::<SecurityPolicySummary>>)
:Details about the security policies in your account.
next_token(Option<String>)
:When
nextToken
is returned, there are more results available. The value ofnextToken
is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page.
- On failure, responds with
SdkError<ListSecurityPoliciesError>
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: trueThe Amazon Resource Name (ARN) of the resource. The resource must be active (not in the
DELETING
state), and must be owned by the account ID included in the request.
- On success, responds with
ListTagsForResourceOutput
with field(s):tags(Option<Vec::<Tag>>)
:The tags associated with the resource.
- On failure, responds with
SdkError<ListTagsForResourceError>
Source§impl Client
impl Client
Sourcepub fn list_vpc_endpoints(&self) -> ListVpcEndpointsFluentBuilder
pub fn list_vpc_endpoints(&self) -> ListVpcEndpointsFluentBuilder
Constructs a fluent builder for the ListVpcEndpoints
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
vpc_endpoint_filters(VpcEndpointFilters)
/set_vpc_endpoint_filters(Option<VpcEndpointFilters>)
:
required: falseFilter the results according to the current status of the VPC endpoint. Possible statuses are
CREATING
,DELETING
,UPDATING
,ACTIVE
, andFAILED
.next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseIf your initial
ListVpcEndpoints
operation returns anextToken
, you can include the returnednextToken
in subsequentListVpcEndpoints
operations, which returns results in the next page.max_results(i32)
/set_max_results(Option<i32>)
:
required: falseAn optional parameter that specifies the maximum number of results to return. You can use
nextToken
to get the next page of results. The default is 20.
- On success, responds with
ListVpcEndpointsOutput
with field(s):vpc_endpoint_summaries(Option<Vec::<VpcEndpointSummary>>)
:Details about each VPC endpoint, including the name and current status.
next_token(Option<String>)
:When
nextToken
is returned, there are more results available. The value ofnextToken
is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page.
- On failure, responds with
SdkError<ListVpcEndpointsError>
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: trueThe Amazon Resource Name (ARN) of the resource. The resource must be active (not in the
DELETING
state), and must be owned by the account ID included in the request.tags(Tag)
/set_tags(Option<Vec::<Tag>>)
:
required: trueA list of tags (key-value pairs) to add to the resource. All tag keys in the request must be unique.
- 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: trueThe Amazon Resource Name (ARN) of the resource to remove tags from. The resource must be active (not in the
DELETING
state), and must be owned by the account ID included in the request.tag_keys(impl Into<String>)
/set_tag_keys(Option<Vec::<String>>)
:
required: trueThe tag or set of tags to remove from the resource. All tag keys in the request must be unique.
- On success, responds with
UntagResourceOutput
- On failure, responds with
SdkError<UntagResourceError>
Source§impl Client
impl Client
Sourcepub fn update_access_policy(&self) -> UpdateAccessPolicyFluentBuilder
pub fn update_access_policy(&self) -> UpdateAccessPolicyFluentBuilder
Constructs a fluent builder for the UpdateAccessPolicy
operation.
- The fluent builder is configurable:
r#type(AccessPolicyType)
/set_type(Option<AccessPolicyType>)
:
required: trueThe type of policy.
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the policy.
policy_version(impl Into<String>)
/set_policy_version(Option<String>)
:
required: trueThe version of the policy being updated.
description(impl Into<String>)
/set_description(Option<String>)
:
required: falseA description of the policy. Typically used to store information about the permissions defined in the policy.
policy(impl Into<String>)
/set_policy(Option<String>)
:
required: falseThe JSON policy document to use as the content for the policy.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseUnique, case-sensitive identifier to ensure idempotency of the request.
- On success, responds with
UpdateAccessPolicyOutput
with field(s):access_policy_detail(Option<AccessPolicyDetail>)
:Details about the updated access policy.
- On failure, responds with
SdkError<UpdateAccessPolicyError>
Source§impl Client
impl Client
Sourcepub fn update_account_settings(&self) -> UpdateAccountSettingsFluentBuilder
pub fn update_account_settings(&self) -> UpdateAccountSettingsFluentBuilder
Constructs a fluent builder for the UpdateAccountSettings
operation.
- The fluent builder is configurable:
capacity_limits(CapacityLimits)
/set_capacity_limits(Option<CapacityLimits>)
:
required: falseThe maximum capacity limits for all OpenSearch Serverless collections, in OpenSearch Compute Units (OCUs). These limits are used to scale your collections based on the current workload. For more information, see Managing capacity limits for Amazon OpenSearch Serverless.
- On success, responds with
UpdateAccountSettingsOutput
with field(s):account_settings_detail(Option<AccountSettingsDetail>)
:OpenSearch Serverless-related settings for the current Amazon Web Services account.
- On failure, responds with
SdkError<UpdateAccountSettingsError>
Source§impl Client
impl Client
Sourcepub fn update_collection(&self) -> UpdateCollectionFluentBuilder
pub fn update_collection(&self) -> UpdateCollectionFluentBuilder
Constructs a fluent builder for the UpdateCollection
operation.
- The fluent builder is configurable:
id(impl Into<String>)
/set_id(Option<String>)
:
required: trueThe unique identifier of the collection.
description(impl Into<String>)
/set_description(Option<String>)
:
required: falseA description of the collection.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseUnique, case-sensitive identifier to ensure idempotency of the request.
- On success, responds with
UpdateCollectionOutput
with field(s):update_collection_detail(Option<UpdateCollectionDetail>)
:Details about the updated collection.
- On failure, responds with
SdkError<UpdateCollectionError>
Source§impl Client
impl Client
Sourcepub fn update_lifecycle_policy(&self) -> UpdateLifecyclePolicyFluentBuilder
pub fn update_lifecycle_policy(&self) -> UpdateLifecyclePolicyFluentBuilder
Constructs a fluent builder for the UpdateLifecyclePolicy
operation.
- The fluent builder is configurable:
r#type(LifecyclePolicyType)
/set_type(Option<LifecyclePolicyType>)
:
required: trueThe type of lifecycle policy.
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the policy.
policy_version(impl Into<String>)
/set_policy_version(Option<String>)
:
required: trueThe version of the policy being updated.
description(impl Into<String>)
/set_description(Option<String>)
:
required: falseA description of the lifecycle policy.
policy(impl Into<String>)
/set_policy(Option<String>)
:
required: falseThe JSON policy document to use as the content for the lifecycle policy.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA unique, case-sensitive identifier to ensure idempotency of the request.
- On success, responds with
UpdateLifecyclePolicyOutput
with field(s):lifecycle_policy_detail(Option<LifecyclePolicyDetail>)
:Details about the updated lifecycle policy.
- On failure, responds with
SdkError<UpdateLifecyclePolicyError>
Source§impl Client
impl Client
Sourcepub fn update_security_config(&self) -> UpdateSecurityConfigFluentBuilder
pub fn update_security_config(&self) -> UpdateSecurityConfigFluentBuilder
Constructs a fluent builder for the UpdateSecurityConfig
operation.
- The fluent builder is configurable:
id(impl Into<String>)
/set_id(Option<String>)
:
required: trueThe security configuration identifier. For SAML the ID will be
saml/<accountId>/<idpProviderName>
. For example,saml/123456789123/OKTADev
.config_version(impl Into<String>)
/set_config_version(Option<String>)
:
required: trueThe version of the security configuration to be updated. You can find the most recent version of a security configuration using the
GetSecurityPolicy
command.description(impl Into<String>)
/set_description(Option<String>)
:
required: falseA description of the security configuration.
saml_options(SamlConfigOptions)
/set_saml_options(Option<SamlConfigOptions>)
:
required: falseSAML options in in the form of a key-value map.
iam_identity_center_options_updates(UpdateIamIdentityCenterConfigOptions)
/set_iam_identity_center_options_updates(Option<UpdateIamIdentityCenterConfigOptions>)
:
required: falseDescribes IAM Identity Center options in the form of a key-value map.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseUnique, case-sensitive identifier to ensure idempotency of the request.
- On success, responds with
UpdateSecurityConfigOutput
with field(s):security_config_detail(Option<SecurityConfigDetail>)
:Details about the updated security configuration.
- On failure, responds with
SdkError<UpdateSecurityConfigError>
Source§impl Client
impl Client
Sourcepub fn update_security_policy(&self) -> UpdateSecurityPolicyFluentBuilder
pub fn update_security_policy(&self) -> UpdateSecurityPolicyFluentBuilder
Constructs a fluent builder for the UpdateSecurityPolicy
operation.
- The fluent builder is configurable:
r#type(SecurityPolicyType)
/set_type(Option<SecurityPolicyType>)
:
required: trueThe type of access policy.
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the policy.
policy_version(impl Into<String>)
/set_policy_version(Option<String>)
:
required: trueThe version of the policy being updated.
description(impl Into<String>)
/set_description(Option<String>)
:
required: falseA description of the policy. Typically used to store information about the permissions defined in the policy.
policy(impl Into<String>)
/set_policy(Option<String>)
:
required: falseThe JSON policy document to use as the content for the new policy.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseUnique, case-sensitive identifier to ensure idempotency of the request.
- On success, responds with
UpdateSecurityPolicyOutput
with field(s):security_policy_detail(Option<SecurityPolicyDetail>)
:Details about the updated security policy.
- On failure, responds with
SdkError<UpdateSecurityPolicyError>
Source§impl Client
impl Client
Sourcepub fn update_vpc_endpoint(&self) -> UpdateVpcEndpointFluentBuilder
pub fn update_vpc_endpoint(&self) -> UpdateVpcEndpointFluentBuilder
Constructs a fluent builder for the UpdateVpcEndpoint
operation.
- The fluent builder is configurable:
id(impl Into<String>)
/set_id(Option<String>)
:
required: trueThe unique identifier of the interface endpoint to update.
add_subnet_ids(impl Into<String>)
/set_add_subnet_ids(Option<Vec::<String>>)
:
required: falseThe ID of one or more subnets to add to the endpoint.
remove_subnet_ids(impl Into<String>)
/set_remove_subnet_ids(Option<Vec::<String>>)
:
required: falseThe unique identifiers of the subnets to remove from the endpoint.
add_security_group_ids(impl Into<String>)
/set_add_security_group_ids(Option<Vec::<String>>)
:
required: falseThe unique identifiers of the security groups to add to the endpoint. Security groups define the ports, protocols, and sources for inbound traffic that you are authorizing into your endpoint.
remove_security_group_ids(impl Into<String>)
/set_remove_security_group_ids(Option<Vec::<String>>)
:
required: falseThe unique identifiers of the security groups to remove from the endpoint.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseUnique, case-sensitive identifier to ensure idempotency of the request.
- On success, responds with
UpdateVpcEndpointOutput
with field(s):update_vpc_endpoint_detail(Option<UpdateVpcEndpointDetail>)
:Details about the updated VPC endpoint.
- On failure, responds with
SdkError<UpdateVpcEndpointError>
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);