Struct aws_sdk_repostspace::Client 
source · pub struct Client { /* private fields */ }Expand description
Client for AWS re:Post Private
Client for invoking operations on AWS re:Post Private. Each operation on AWS re:Post Private 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_repostspace::Client::new(&config);Occasionally, SDKs may have additional service-specific that can be set on the Config that
is absent from SdkConfig, or slightly different settings for a specific client may be desired.
The Config 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_repostspace::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 CreateSpace operation has
a Client::create_space, 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_space()
    .name("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 create_space(&self) -> CreateSpaceFluentBuilder
 
pub fn create_space(&self) -> CreateSpaceFluentBuilder
Constructs a fluent builder for the CreateSpace operation.
- The fluent builder is configurable:
- name(impl Into<String>)/- set_name(Option<String>):
 required: true- The name for the private re:Post. This must be unique in your account. 
- subdomain(impl Into<String>)/- set_subdomain(Option<String>):
 required: true- The subdomain that you use to access your AWS re:Post Private private re:Post. All custom subdomains must be approved by AWS before use. In addition to your custom subdomain, all private re:Posts are issued an AWS generated subdomain for immediate use. 
- tier(TierLevel)/- set_tier(Option<TierLevel>):
 required: true- The pricing tier for the private re:Post. 
- description(impl Into<String>)/- set_description(Option<String>):
 required: false- A description for the private re:Post. This is used only to help you identify this private re:Post. 
- user_kms_key(impl Into<String>)/- set_user_kms_key(Option<String>):
 required: false- The AWS KMS key ARN that’s used for the AWS KMS encryption. If you don’t provide a key, your data is encrypted by default with a key that AWS owns and manages for you. 
- tags(impl Into<String>, impl Into<String>)/- set_tags(Option<HashMap::<String, String>>):
 required: false- The list of tags associated with the private re:Post. 
- role_arn(impl Into<String>)/- set_role_arn(Option<String>):
 required: false- The IAM role that grants permissions to the private re:Post to convert unanswered questions into AWS support tickets. 
 
- On success, responds with CreateSpaceOutputwith field(s):- space_id(String):- The unique ID of the private re:Post. 
 
- On failure, responds with SdkError<CreateSpaceError>
source§impl Client
 
impl Client
sourcepub fn delete_space(&self) -> DeleteSpaceFluentBuilder
 
pub fn delete_space(&self) -> DeleteSpaceFluentBuilder
Constructs a fluent builder for the DeleteSpace operation.
- The fluent builder is configurable:
- space_id(impl Into<String>)/- set_space_id(Option<String>):
 required: true- The unique ID of the private re:Post. 
 
- On success, responds with DeleteSpaceOutput
- On failure, responds with SdkError<DeleteSpaceError>
source§impl Client
 
impl Client
sourcepub fn deregister_admin(&self) -> DeregisterAdminFluentBuilder
 
pub fn deregister_admin(&self) -> DeregisterAdminFluentBuilder
Constructs a fluent builder for the DeregisterAdmin operation.
- The fluent builder is configurable:
- space_id(impl Into<String>)/- set_space_id(Option<String>):
 required: true- The ID of the private re:Post to remove the admin from. 
- admin_id(impl Into<String>)/- set_admin_id(Option<String>):
 required: true- The ID of the admin to remove. 
 
- On success, responds with DeregisterAdminOutput
- On failure, responds with SdkError<DeregisterAdminError>
source§impl Client
 
impl Client
sourcepub fn get_space(&self) -> GetSpaceFluentBuilder
 
pub fn get_space(&self) -> GetSpaceFluentBuilder
Constructs a fluent builder for the GetSpace operation.
- The fluent builder is configurable:
- space_id(impl Into<String>)/- set_space_id(Option<String>):
 required: true- The ID of the private re:Post. 
 
- On success, responds with GetSpaceOutputwith field(s):- space_id(String):- The unique ID of the private re:Post. 
- arn(String):- The ARN of the private re:Post. 
- name(String):- The name of the private re:Post. 
- status(String):- The creation or deletion status of the private re:Post. 
- configuration_status(ConfigurationStatus):- The configuration status of the private re:Post. 
- client_id(String):- The Identity Center identifier for the Application Instance. 
- description(Option<String>):- The description of the private re:Post. 
- vanity_domain_status(VanityDomainStatus):- The approval status of the custom subdomain. 
- vanity_domain(String):- The custom subdomain that you use to access your private re:Post. All custom subdomains must be approved by AWS before use. 
- random_domain(String):- The AWS generated subdomain of the private re:Post 
- customer_role_arn(Option<String>):- The IAM role that grants permissions to the private re:Post to convert unanswered questions into AWS support tickets. 
- create_date_time(DateTime):- The date when the private re:Post was created. 
- delete_date_time(Option<DateTime>):- The date when the private re:Post was deleted. 
- tier(TierLevel):- The pricing tier of the private re:Post. 
- storage_limit(i64):- The storage limit of the private re:Post. 
- user_admins(Option<Vec::<String>>):- The list of users that are administrators of the private re:Post. 
- group_admins(Option<Vec::<String>>):- The list of groups that are administrators of the private re:Post. 
- user_kms_key(Option<String>):- The custom AWS KMS key ARN that’s used for the AWS KMS encryption. 
- user_count(Option<i32>):- The number of users that have onboarded to the private re:Post. 
- content_size(Option<i64>):- The content size of the private re:Post. 
 
- On failure, responds with SdkError<GetSpaceError>
source§impl Client
 
impl Client
sourcepub fn list_spaces(&self) -> ListSpacesFluentBuilder
 
pub fn list_spaces(&self) -> ListSpacesFluentBuilder
Constructs a fluent builder for the ListSpaces operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
- next_token(impl Into<String>)/- set_next_token(Option<String>):
 required: false- The token for the next set of private re:Posts to return. You receive this token from a previous ListSpaces operation. 
- max_results(i32)/- set_max_results(Option<i32>):
 required: false- The maximum number of private re:Posts to include in the results. 
 
- On success, responds with ListSpacesOutputwith field(s):- spaces(Vec::<SpaceData>):- An array of structures that contain some information about the private re:Posts in the account. 
- next_token(Option<String>):- The token that you use when you request the next set of private re:Posts. 
 
- On failure, responds with SdkError<ListSpacesError>
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: true- The ARN of the resource that the tags are associated with. 
 
- On success, responds with ListTagsForResourceOutputwith field(s):- tags(Option<HashMap::<String, String>>):- The list of tags that are associated with the resource. 
 
- On failure, responds with SdkError<ListTagsForResourceError>
source§impl Client
 
impl Client
sourcepub fn register_admin(&self) -> RegisterAdminFluentBuilder
 
pub fn register_admin(&self) -> RegisterAdminFluentBuilder
Constructs a fluent builder for the RegisterAdmin operation.
- The fluent builder is configurable:
- space_id(impl Into<String>)/- set_space_id(Option<String>):
 required: true- The ID of the private re:Post. 
- admin_id(impl Into<String>)/- set_admin_id(Option<String>):
 required: true- The ID of the administrator. 
 
- On success, responds with RegisterAdminOutput
- On failure, responds with SdkError<RegisterAdminError>
source§impl Client
 
impl Client
sourcepub fn send_invites(&self) -> SendInvitesFluentBuilder
 
pub fn send_invites(&self) -> SendInvitesFluentBuilder
Constructs a fluent builder for the SendInvites operation.
- The fluent builder is configurable:
- space_id(impl Into<String>)/- set_space_id(Option<String>):
 required: true- The ID of the private re:Post. 
- accessor_ids(impl Into<String>)/- set_accessor_ids(Option<Vec::<String>>):
 required: true- The array of identifiers for the users and groups. 
- title(impl Into<String>)/- set_title(Option<String>):
 required: true- The title of the invite. 
- body(impl Into<String>)/- set_body(Option<String>):
 required: true- The body of the invite. 
 
- On success, responds with SendInvitesOutput
- On failure, responds with SdkError<SendInvitesError>
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: true- The ARN of the resource that the tag is associated with. 
- tags(impl Into<String>, impl Into<String>)/- set_tags(Option<HashMap::<String, String>>):
 required: true- The list of tag keys and values that must be associated with the resource. You can associate tag keys only, tags (key and values) only, or a combination of tag keys and tags. 
 
- 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: true- The ARN of the resource. 
- tag_keys(impl Into<String>)/- set_tag_keys(Option<Vec::<String>>):
 required: true- The key values of the tag. 
 
- On success, responds with UntagResourceOutput
- On failure, responds with SdkError<UntagResourceError>
source§impl Client
 
impl Client
sourcepub fn update_space(&self) -> UpdateSpaceFluentBuilder
 
pub fn update_space(&self) -> UpdateSpaceFluentBuilder
Constructs a fluent builder for the UpdateSpace operation.
- The fluent builder is configurable:
- space_id(impl Into<String>)/- set_space_id(Option<String>):
 required: true- The unique ID of this private re:Post. 
- description(impl Into<String>)/- set_description(Option<String>):
 required: false- A description for the private re:Post. This is used only to help you identify this private re:Post. 
- tier(TierLevel)/- set_tier(Option<TierLevel>):
 required: false- The pricing tier of this private re:Post. 
- role_arn(impl Into<String>)/- set_role_arn(Option<String>):
 required: false- The IAM role that grants permissions to the private re:Post to convert unanswered questions into AWS support tickets. 
 
- On success, responds with UpdateSpaceOutput
- On failure, responds with SdkError<UpdateSpaceError>
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_implconfigured.
- Identity caching is enabled without a sleep_implandtime_sourceconfigured.
- No behavior_versionis 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_configis missing an async sleep implementation. If you experience this panic, set thesleep_implon the Config passed into this function to fix it.
- This method will panic if the sdk_configis missing an HTTP connector. If you experience this panic, set thehttp_connectoron the Config passed into this function to fix it.
- This method will panic if no BehaviorVersionis provided. If you experience this panic, setbehavior_versionon the Config or enable thebehavior-version-latestCargo feature.