pub struct Client { /* private fields */ }
Expand description
Client for AmplifyBackend
Client for invoking operations on AmplifyBackend. Each operation on AmplifyBackend 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_amplifybackend::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_amplifybackend::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 CloneBackend
operation has
a Client::clone_backend
, 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.clone_backend()
.app_id("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 clone_backend(&self) -> CloneBackendFluentBuilder
pub fn clone_backend(&self) -> CloneBackendFluentBuilder
Constructs a fluent builder for the CloneBackend
operation.
- The fluent builder is configurable:
app_id(impl Into<String>)
/set_app_id(Option<String>)
:
required: trueThe app ID.
backend_environment_name(impl Into<String>)
/set_backend_environment_name(Option<String>)
:
required: trueThe name of the backend environment.
target_environment_name(impl Into<String>)
/set_target_environment_name(Option<String>)
:
required: trueThe name of the destination backend environment to be created.
- On success, responds with
CloneBackendOutput
with field(s):app_id(Option<String>)
:The app ID.
backend_environment_name(Option<String>)
:The name of the backend environment.
error(Option<String>)
:If the request fails, this error is returned.
job_id(Option<String>)
:The ID for the job.
operation(Option<String>)
:The name of the operation.
status(Option<String>)
:The current status of the request.
- On failure, responds with
SdkError<CloneBackendError>
Source§impl Client
impl Client
Sourcepub fn create_backend(&self) -> CreateBackendFluentBuilder
pub fn create_backend(&self) -> CreateBackendFluentBuilder
Constructs a fluent builder for the CreateBackend
operation.
- The fluent builder is configurable:
app_id(impl Into<String>)
/set_app_id(Option<String>)
:
required: trueThe app ID.
app_name(impl Into<String>)
/set_app_name(Option<String>)
:
required: trueThe name of the app.
backend_environment_name(impl Into<String>)
/set_backend_environment_name(Option<String>)
:
required: trueThe name of the backend environment.
resource_config(ResourceConfig)
/set_resource_config(Option<ResourceConfig>)
:
required: falseThe resource configuration for creating a backend.
resource_name(impl Into<String>)
/set_resource_name(Option<String>)
:
required: falseThe name of the resource.
- On success, responds with
CreateBackendOutput
with field(s):app_id(Option<String>)
:The app ID.
backend_environment_name(Option<String>)
:The name of the backend environment.
error(Option<String>)
:If the request fails, this error is returned.
job_id(Option<String>)
:The ID for the job.
operation(Option<String>)
:The name of the operation.
status(Option<String>)
:The current status of the request.
- On failure, responds with
SdkError<CreateBackendError>
Source§impl Client
impl Client
Sourcepub fn create_backend_api(&self) -> CreateBackendAPIFluentBuilder
pub fn create_backend_api(&self) -> CreateBackendAPIFluentBuilder
Constructs a fluent builder for the CreateBackendAPI
operation.
- The fluent builder is configurable:
app_id(impl Into<String>)
/set_app_id(Option<String>)
:
required: trueThe app ID.
backend_environment_name(impl Into<String>)
/set_backend_environment_name(Option<String>)
:
required: trueThe name of the backend environment.
resource_config(BackendApiResourceConfig)
/set_resource_config(Option<BackendApiResourceConfig>)
:
required: trueThe resource configuration for this request.
resource_name(impl Into<String>)
/set_resource_name(Option<String>)
:
required: trueThe name of this resource.
- On success, responds with
CreateBackendApiOutput
with field(s):app_id(Option<String>)
:The app ID.
backend_environment_name(Option<String>)
:The name of the backend environment.
error(Option<String>)
:If the request fails, this error is returned.
job_id(Option<String>)
:The ID for the job.
operation(Option<String>)
:The name of the operation.
status(Option<String>)
:The current status of the request.
- On failure, responds with
SdkError<CreateBackendAPIError>
Source§impl Client
impl Client
Sourcepub fn create_backend_auth(&self) -> CreateBackendAuthFluentBuilder
pub fn create_backend_auth(&self) -> CreateBackendAuthFluentBuilder
Constructs a fluent builder for the CreateBackendAuth
operation.
- The fluent builder is configurable:
app_id(impl Into<String>)
/set_app_id(Option<String>)
:
required: trueThe app ID.
backend_environment_name(impl Into<String>)
/set_backend_environment_name(Option<String>)
:
required: trueThe name of the backend environment.
resource_config(CreateBackendAuthResourceConfig)
/set_resource_config(Option<CreateBackendAuthResourceConfig>)
:
required: trueThe resource configuration for this request object.
resource_name(impl Into<String>)
/set_resource_name(Option<String>)
:
required: trueThe name of this resource.
- On success, responds with
CreateBackendAuthOutput
with field(s):app_id(Option<String>)
:The app ID.
backend_environment_name(Option<String>)
:The name of the backend environment.
error(Option<String>)
:If the request fails, this error is returned.
job_id(Option<String>)
:The ID for the job.
operation(Option<String>)
:The name of the operation.
status(Option<String>)
:The current status of the request.
- On failure, responds with
SdkError<CreateBackendAuthError>
Source§impl Client
impl Client
Sourcepub fn create_backend_config(&self) -> CreateBackendConfigFluentBuilder
pub fn create_backend_config(&self) -> CreateBackendConfigFluentBuilder
Constructs a fluent builder for the CreateBackendConfig
operation.
- The fluent builder is configurable:
app_id(impl Into<String>)
/set_app_id(Option<String>)
:
required: trueThe app ID.
backend_manager_app_id(impl Into<String>)
/set_backend_manager_app_id(Option<String>)
:
required: falseThe app ID for the backend manager.
- On success, responds with
CreateBackendConfigOutput
with field(s):app_id(Option<String>)
:The app ID.
backend_environment_name(Option<String>)
:The name of the backend environment.
job_id(Option<String>)
:The ID for the job.
status(Option<String>)
:The current status of the request.
- On failure, responds with
SdkError<CreateBackendConfigError>
Source§impl Client
impl Client
Sourcepub fn create_backend_storage(&self) -> CreateBackendStorageFluentBuilder
pub fn create_backend_storage(&self) -> CreateBackendStorageFluentBuilder
Constructs a fluent builder for the CreateBackendStorage
operation.
- The fluent builder is configurable:
app_id(impl Into<String>)
/set_app_id(Option<String>)
:
required: trueThe app ID.
backend_environment_name(impl Into<String>)
/set_backend_environment_name(Option<String>)
:
required: trueThe name of the backend environment.
resource_config(CreateBackendStorageResourceConfig)
/set_resource_config(Option<CreateBackendStorageResourceConfig>)
:
required: trueThe resource configuration for creating backend storage.
resource_name(impl Into<String>)
/set_resource_name(Option<String>)
:
required: trueThe name of the storage resource.
- On success, responds with
CreateBackendStorageOutput
with field(s):app_id(Option<String>)
:The app ID.
backend_environment_name(Option<String>)
:The name of the backend environment.
job_id(Option<String>)
:The ID for the job.
status(Option<String>)
:The current status of the request.
- On failure, responds with
SdkError<CreateBackendStorageError>
Source§impl Client
impl Client
Sourcepub fn create_token(&self) -> CreateTokenFluentBuilder
pub fn create_token(&self) -> CreateTokenFluentBuilder
Constructs a fluent builder for the CreateToken
operation.
- The fluent builder is configurable:
app_id(impl Into<String>)
/set_app_id(Option<String>)
:
required: trueThe app ID.
- On success, responds with
CreateTokenOutput
with field(s):app_id(Option<String>)
:The app ID.
challenge_code(Option<String>)
:One-time challenge code for authenticating into the Amplify Admin UI.
session_id(Option<String>)
:A unique ID provided when creating a new challenge token.
ttl(Option<String>)
:The expiry time for the one-time generated token code.
- On failure, responds with
SdkError<CreateTokenError>
Source§impl Client
impl Client
Sourcepub fn delete_backend(&self) -> DeleteBackendFluentBuilder
pub fn delete_backend(&self) -> DeleteBackendFluentBuilder
Constructs a fluent builder for the DeleteBackend
operation.
- The fluent builder is configurable:
app_id(impl Into<String>)
/set_app_id(Option<String>)
:
required: trueThe app ID.
backend_environment_name(impl Into<String>)
/set_backend_environment_name(Option<String>)
:
required: trueThe name of the backend environment.
- On success, responds with
DeleteBackendOutput
with field(s):app_id(Option<String>)
:The app ID.
backend_environment_name(Option<String>)
:The name of the backend environment.
error(Option<String>)
:If the request fails, this error is returned.
job_id(Option<String>)
:The ID for the job.
operation(Option<String>)
:The name of the operation.
status(Option<String>)
:The current status of the request.
- On failure, responds with
SdkError<DeleteBackendError>
Source§impl Client
impl Client
Sourcepub fn delete_backend_api(&self) -> DeleteBackendAPIFluentBuilder
pub fn delete_backend_api(&self) -> DeleteBackendAPIFluentBuilder
Constructs a fluent builder for the DeleteBackendAPI
operation.
- The fluent builder is configurable:
app_id(impl Into<String>)
/set_app_id(Option<String>)
:
required: trueThe app ID.
backend_environment_name(impl Into<String>)
/set_backend_environment_name(Option<String>)
:
required: trueThe name of the backend environment.
resource_config(BackendApiResourceConfig)
/set_resource_config(Option<BackendApiResourceConfig>)
:
required: falseDefines the resource configuration for the data model in your Amplify project.
resource_name(impl Into<String>)
/set_resource_name(Option<String>)
:
required: trueThe name of this resource.
- On success, responds with
DeleteBackendApiOutput
with field(s):app_id(Option<String>)
:The app ID.
backend_environment_name(Option<String>)
:The name of the backend environment.
error(Option<String>)
:If the request fails, this error is returned.
job_id(Option<String>)
:The ID for the job.
operation(Option<String>)
:The name of the operation.
status(Option<String>)
:The current status of the request.
- On failure, responds with
SdkError<DeleteBackendAPIError>
Source§impl Client
impl Client
Sourcepub fn delete_backend_auth(&self) -> DeleteBackendAuthFluentBuilder
pub fn delete_backend_auth(&self) -> DeleteBackendAuthFluentBuilder
Constructs a fluent builder for the DeleteBackendAuth
operation.
- The fluent builder is configurable:
app_id(impl Into<String>)
/set_app_id(Option<String>)
:
required: trueThe app ID.
backend_environment_name(impl Into<String>)
/set_backend_environment_name(Option<String>)
:
required: trueThe name of the backend environment.
resource_name(impl Into<String>)
/set_resource_name(Option<String>)
:
required: trueThe name of this resource.
- On success, responds with
DeleteBackendAuthOutput
with field(s):app_id(Option<String>)
:The app ID.
backend_environment_name(Option<String>)
:The name of the backend environment.
error(Option<String>)
:If the request fails, this error is returned.
job_id(Option<String>)
:The ID for the job.
operation(Option<String>)
:The name of the operation.
status(Option<String>)
:The current status of the request.
- On failure, responds with
SdkError<DeleteBackendAuthError>
Source§impl Client
impl Client
Sourcepub fn delete_backend_storage(&self) -> DeleteBackendStorageFluentBuilder
pub fn delete_backend_storage(&self) -> DeleteBackendStorageFluentBuilder
Constructs a fluent builder for the DeleteBackendStorage
operation.
- The fluent builder is configurable:
app_id(impl Into<String>)
/set_app_id(Option<String>)
:
required: trueThe app ID.
backend_environment_name(impl Into<String>)
/set_backend_environment_name(Option<String>)
:
required: trueThe name of the backend environment.
resource_name(impl Into<String>)
/set_resource_name(Option<String>)
:
required: trueThe name of the storage resource.
service_name(ServiceName)
/set_service_name(Option<ServiceName>)
:
required: trueThe name of the storage service.
- On success, responds with
DeleteBackendStorageOutput
with field(s):app_id(Option<String>)
:The app ID.
backend_environment_name(Option<String>)
:The name of the backend environment.
job_id(Option<String>)
:The ID for the job.
status(Option<String>)
:The current status of the request.
- On failure, responds with
SdkError<DeleteBackendStorageError>
Source§impl Client
impl Client
Sourcepub fn delete_token(&self) -> DeleteTokenFluentBuilder
pub fn delete_token(&self) -> DeleteTokenFluentBuilder
Constructs a fluent builder for the DeleteToken
operation.
- The fluent builder is configurable:
app_id(impl Into<String>)
/set_app_id(Option<String>)
:
required: trueThe app ID.
session_id(impl Into<String>)
/set_session_id(Option<String>)
:
required: trueThe session ID.
- On success, responds with
DeleteTokenOutput
with field(s):is_success(Option<bool>)
:Indicates whether the request succeeded or failed.
- On failure, responds with
SdkError<DeleteTokenError>
Source§impl Client
impl Client
Sourcepub fn generate_backend_api_models(
&self,
) -> GenerateBackendAPIModelsFluentBuilder
pub fn generate_backend_api_models( &self, ) -> GenerateBackendAPIModelsFluentBuilder
Constructs a fluent builder for the GenerateBackendAPIModels
operation.
- The fluent builder is configurable:
app_id(impl Into<String>)
/set_app_id(Option<String>)
:
required: trueThe app ID.
backend_environment_name(impl Into<String>)
/set_backend_environment_name(Option<String>)
:
required: trueThe name of the backend environment.
resource_name(impl Into<String>)
/set_resource_name(Option<String>)
:
required: trueThe name of this resource.
- On success, responds with
GenerateBackendApiModelsOutput
with field(s):app_id(Option<String>)
:The app ID.
backend_environment_name(Option<String>)
:The name of the backend environment.
error(Option<String>)
:If the request fails, this error is returned.
job_id(Option<String>)
:The ID for the job.
operation(Option<String>)
:The name of the operation.
status(Option<String>)
:The current status of the request.
- On failure, responds with
SdkError<GenerateBackendAPIModelsError>
Source§impl Client
impl Client
Sourcepub fn get_backend(&self) -> GetBackendFluentBuilder
pub fn get_backend(&self) -> GetBackendFluentBuilder
Constructs a fluent builder for the GetBackend
operation.
- The fluent builder is configurable:
app_id(impl Into<String>)
/set_app_id(Option<String>)
:
required: trueThe app ID.
backend_environment_name(impl Into<String>)
/set_backend_environment_name(Option<String>)
:
required: falseThe name of the backend environment.
- On success, responds with
GetBackendOutput
with field(s):amplify_feature_flags(Option<String>)
:A stringified version of the cli.json file for your Amplify project.
amplify_meta_config(Option<String>)
:A stringified version of the current configs for your Amplify project.
app_id(Option<String>)
:The app ID.
app_name(Option<String>)
:The name of the app.
backend_environment_list(Option<Vec::<String>>)
:A list of backend environments in an array.
backend_environment_name(Option<String>)
:The name of the backend environment.
error(Option<String>)
:If the request failed, this is the returned error.
- On failure, responds with
SdkError<GetBackendError>
Source§impl Client
impl Client
Sourcepub fn get_backend_api(&self) -> GetBackendAPIFluentBuilder
pub fn get_backend_api(&self) -> GetBackendAPIFluentBuilder
Constructs a fluent builder for the GetBackendAPI
operation.
- The fluent builder is configurable:
app_id(impl Into<String>)
/set_app_id(Option<String>)
:
required: trueThe app ID.
backend_environment_name(impl Into<String>)
/set_backend_environment_name(Option<String>)
:
required: trueThe name of the backend environment.
resource_config(BackendApiResourceConfig)
/set_resource_config(Option<BackendApiResourceConfig>)
:
required: falseDefines the resource configuration for the data model in your Amplify project.
resource_name(impl Into<String>)
/set_resource_name(Option<String>)
:
required: trueThe name of this resource.
- On success, responds with
GetBackendApiOutput
with field(s):app_id(Option<String>)
:The app ID.
backend_environment_name(Option<String>)
:The name of the backend environment.
error(Option<String>)
:If the request fails, this error is returned.
resource_config(Option<BackendApiResourceConfig>)
:The resource configuration for this response object.
resource_name(Option<String>)
:The name of this resource.
- On failure, responds with
SdkError<GetBackendAPIError>
Source§impl Client
impl Client
Sourcepub fn get_backend_api_models(&self) -> GetBackendAPIModelsFluentBuilder
pub fn get_backend_api_models(&self) -> GetBackendAPIModelsFluentBuilder
Constructs a fluent builder for the GetBackendAPIModels
operation.
- The fluent builder is configurable:
app_id(impl Into<String>)
/set_app_id(Option<String>)
:
required: trueThe app ID.
backend_environment_name(impl Into<String>)
/set_backend_environment_name(Option<String>)
:
required: trueThe name of the backend environment.
resource_name(impl Into<String>)
/set_resource_name(Option<String>)
:
required: trueThe name of this resource.
- On success, responds with
GetBackendApiModelsOutput
with field(s):models(Option<String>)
:Stringified JSON of the datastore model.
status(Option<Status>)
:The current status of the request.
model_introspection_schema(Option<String>)
:Stringified JSON of the model introspection schema for an existing backend API resource.
- On failure, responds with
SdkError<GetBackendAPIModelsError>
Source§impl Client
impl Client
Sourcepub fn get_backend_auth(&self) -> GetBackendAuthFluentBuilder
pub fn get_backend_auth(&self) -> GetBackendAuthFluentBuilder
Constructs a fluent builder for the GetBackendAuth
operation.
- The fluent builder is configurable:
app_id(impl Into<String>)
/set_app_id(Option<String>)
:
required: trueThe app ID.
backend_environment_name(impl Into<String>)
/set_backend_environment_name(Option<String>)
:
required: trueThe name of the backend environment.
resource_name(impl Into<String>)
/set_resource_name(Option<String>)
:
required: trueThe name of this resource.
- On success, responds with
GetBackendAuthOutput
with field(s):app_id(Option<String>)
:The app ID.
backend_environment_name(Option<String>)
:The name of the backend environment.
error(Option<String>)
:If the request fails, this error is returned.
resource_config(Option<CreateBackendAuthResourceConfig>)
:The resource configuration for authorization requests to the backend of your Amplify project.
resource_name(Option<String>)
:The name of this resource.
- On failure, responds with
SdkError<GetBackendAuthError>
Source§impl Client
impl Client
Sourcepub fn get_backend_job(&self) -> GetBackendJobFluentBuilder
pub fn get_backend_job(&self) -> GetBackendJobFluentBuilder
Constructs a fluent builder for the GetBackendJob
operation.
- The fluent builder is configurable:
app_id(impl Into<String>)
/set_app_id(Option<String>)
:
required: trueThe app ID.
backend_environment_name(impl Into<String>)
/set_backend_environment_name(Option<String>)
:
required: trueThe name of the backend environment.
job_id(impl Into<String>)
/set_job_id(Option<String>)
:
required: trueThe ID for the job.
- On success, responds with
GetBackendJobOutput
with field(s):app_id(Option<String>)
:The app ID.
backend_environment_name(Option<String>)
:The name of the backend environment.
create_time(Option<String>)
:The time when the job was created.
error(Option<String>)
:If the request fails, this error is returned.
job_id(Option<String>)
:The ID for the job.
operation(Option<String>)
:The name of the operation.
status(Option<String>)
:The current status of the request.
update_time(Option<String>)
:The time when the job was last updated.
- On failure, responds with
SdkError<GetBackendJobError>
Source§impl Client
impl Client
Sourcepub fn get_backend_storage(&self) -> GetBackendStorageFluentBuilder
pub fn get_backend_storage(&self) -> GetBackendStorageFluentBuilder
Constructs a fluent builder for the GetBackendStorage
operation.
- The fluent builder is configurable:
app_id(impl Into<String>)
/set_app_id(Option<String>)
:
required: trueThe app ID.
backend_environment_name(impl Into<String>)
/set_backend_environment_name(Option<String>)
:
required: trueThe name of the backend environment.
resource_name(impl Into<String>)
/set_resource_name(Option<String>)
:
required: trueThe name of the storage resource.
- On success, responds with
GetBackendStorageOutput
with field(s):app_id(Option<String>)
:The app ID.
backend_environment_name(Option<String>)
:The name of the backend environment.
resource_config(Option<GetBackendStorageResourceConfig>)
:The resource configuration for the backend storage resource.
resource_name(Option<String>)
:The name of the storage resource.
- On failure, responds with
SdkError<GetBackendStorageError>
Source§impl Client
impl Client
Sourcepub fn get_token(&self) -> GetTokenFluentBuilder
pub fn get_token(&self) -> GetTokenFluentBuilder
Constructs a fluent builder for the GetToken
operation.
- The fluent builder is configurable:
app_id(impl Into<String>)
/set_app_id(Option<String>)
:
required: trueThe app ID.
session_id(impl Into<String>)
/set_session_id(Option<String>)
:
required: trueThe session ID.
- On success, responds with
GetTokenOutput
with field(s):app_id(Option<String>)
:The app ID.
challenge_code(Option<String>)
:The one-time challenge code for authenticating into the Amplify Admin UI.
session_id(Option<String>)
:A unique ID provided when creating a new challenge token.
ttl(Option<String>)
:The expiry time for the one-time generated token code.
- On failure, responds with
SdkError<GetTokenError>
Source§impl Client
impl Client
Sourcepub fn import_backend_auth(&self) -> ImportBackendAuthFluentBuilder
pub fn import_backend_auth(&self) -> ImportBackendAuthFluentBuilder
Constructs a fluent builder for the ImportBackendAuth
operation.
- The fluent builder is configurable:
app_id(impl Into<String>)
/set_app_id(Option<String>)
:
required: trueThe app ID.
backend_environment_name(impl Into<String>)
/set_backend_environment_name(Option<String>)
:
required: trueThe name of the backend environment.
identity_pool_id(impl Into<String>)
/set_identity_pool_id(Option<String>)
:
required: falseThe ID of the Amazon Cognito identity pool.
native_client_id(impl Into<String>)
/set_native_client_id(Option<String>)
:
required: trueThe ID of the Amazon Cognito native client.
user_pool_id(impl Into<String>)
/set_user_pool_id(Option<String>)
:
required: trueThe ID of the Amazon Cognito user pool.
web_client_id(impl Into<String>)
/set_web_client_id(Option<String>)
:
required: trueThe ID of the Amazon Cognito web client.
- On success, responds with
ImportBackendAuthOutput
with field(s):app_id(Option<String>)
:The app ID.
backend_environment_name(Option<String>)
:The name of the backend environment.
error(Option<String>)
:If the request fails, this error is returned.
job_id(Option<String>)
:The ID for the job.
operation(Option<String>)
:The name of the operation.
status(Option<String>)
:The current status of the request.
- On failure, responds with
SdkError<ImportBackendAuthError>
Source§impl Client
impl Client
Sourcepub fn import_backend_storage(&self) -> ImportBackendStorageFluentBuilder
pub fn import_backend_storage(&self) -> ImportBackendStorageFluentBuilder
Constructs a fluent builder for the ImportBackendStorage
operation.
- The fluent builder is configurable:
app_id(impl Into<String>)
/set_app_id(Option<String>)
:
required: trueThe app ID.
backend_environment_name(impl Into<String>)
/set_backend_environment_name(Option<String>)
:
required: trueThe name of the backend environment.
bucket_name(impl Into<String>)
/set_bucket_name(Option<String>)
:
required: falseThe name of the S3 bucket.
service_name(ServiceName)
/set_service_name(Option<ServiceName>)
:
required: trueThe name of the storage service.
- On success, responds with
ImportBackendStorageOutput
with field(s):app_id(Option<String>)
:The app ID.
backend_environment_name(Option<String>)
:The name of the backend environment.
job_id(Option<String>)
:The ID for the job.
status(Option<String>)
:The current status of the request.
- On failure, responds with
SdkError<ImportBackendStorageError>
Source§impl Client
impl Client
Sourcepub fn list_backend_jobs(&self) -> ListBackendJobsFluentBuilder
pub fn list_backend_jobs(&self) -> ListBackendJobsFluentBuilder
Constructs a fluent builder for the ListBackendJobs
operation.
- The fluent builder is configurable:
app_id(impl Into<String>)
/set_app_id(Option<String>)
:
required: trueThe app ID.
backend_environment_name(impl Into<String>)
/set_backend_environment_name(Option<String>)
:
required: trueThe name of the backend environment.
job_id(impl Into<String>)
/set_job_id(Option<String>)
:
required: falseThe ID for the job.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results that you want in the response.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of results.
operation(impl Into<String>)
/set_operation(Option<String>)
:
required: falseFilters the list of response objects to include only those with the specified operation name.
status(impl Into<String>)
/set_status(Option<String>)
:
required: falseFilters the list of response objects to include only those with the specified status.
- On success, responds with
ListBackendJobsOutput
with field(s):jobs(Option<Vec::<BackendJobRespObj>>)
:An array of jobs and their properties.
next_token(Option<String>)
:The token for the next set of results.
- On failure, responds with
SdkError<ListBackendJobsError>
Source§impl Client
impl Client
Sourcepub fn list_s3_buckets(&self) -> ListS3BucketsFluentBuilder
pub fn list_s3_buckets(&self) -> ListS3BucketsFluentBuilder
Constructs a fluent builder for the ListS3Buckets
operation.
- The fluent builder is configurable:
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseReserved for future use.
- On success, responds with
ListS3BucketsOutput
with field(s):buckets(Option<Vec::<S3BucketInfo>>)
:The list of S3 buckets.
next_token(Option<String>)
:Reserved for future use.
- On failure, responds with
SdkError<ListS3BucketsError>
Source§impl Client
impl Client
Sourcepub fn remove_all_backends(&self) -> RemoveAllBackendsFluentBuilder
pub fn remove_all_backends(&self) -> RemoveAllBackendsFluentBuilder
Constructs a fluent builder for the RemoveAllBackends
operation.
- The fluent builder is configurable:
app_id(impl Into<String>)
/set_app_id(Option<String>)
:
required: trueThe app ID.
clean_amplify_app(bool)
/set_clean_amplify_app(Option<bool>)
:
required: falseCleans up the Amplify Console app if this value is set to true.
- On success, responds with
RemoveAllBackendsOutput
with field(s):app_id(Option<String>)
:The app ID.
error(Option<String>)
:If the request fails, this error is returned.
job_id(Option<String>)
:The ID for the job.
operation(Option<String>)
:The name of the operation.
status(Option<String>)
:The current status of the request.
- On failure, responds with
SdkError<RemoveAllBackendsError>
Source§impl Client
impl Client
Sourcepub fn remove_backend_config(&self) -> RemoveBackendConfigFluentBuilder
pub fn remove_backend_config(&self) -> RemoveBackendConfigFluentBuilder
Constructs a fluent builder for the RemoveBackendConfig
operation.
- The fluent builder is configurable:
app_id(impl Into<String>)
/set_app_id(Option<String>)
:
required: trueThe app ID.
- On success, responds with
RemoveBackendConfigOutput
with field(s):error(Option<String>)
:If the request fails, this error is returned.
- On failure, responds with
SdkError<RemoveBackendConfigError>
Source§impl Client
impl Client
Sourcepub fn update_backend_api(&self) -> UpdateBackendAPIFluentBuilder
pub fn update_backend_api(&self) -> UpdateBackendAPIFluentBuilder
Constructs a fluent builder for the UpdateBackendAPI
operation.
- The fluent builder is configurable:
app_id(impl Into<String>)
/set_app_id(Option<String>)
:
required: trueThe app ID.
backend_environment_name(impl Into<String>)
/set_backend_environment_name(Option<String>)
:
required: trueThe name of the backend environment.
resource_config(BackendApiResourceConfig)
/set_resource_config(Option<BackendApiResourceConfig>)
:
required: falseDefines the resource configuration for the data model in your Amplify project.
resource_name(impl Into<String>)
/set_resource_name(Option<String>)
:
required: trueThe name of this resource.
- On success, responds with
UpdateBackendApiOutput
with field(s):app_id(Option<String>)
:The app ID.
backend_environment_name(Option<String>)
:The name of the backend environment.
error(Option<String>)
:If the request fails, this error is returned.
job_id(Option<String>)
:The ID for the job.
operation(Option<String>)
:The name of the operation.
status(Option<String>)
:The current status of the request.
- On failure, responds with
SdkError<UpdateBackendAPIError>
Source§impl Client
impl Client
Sourcepub fn update_backend_auth(&self) -> UpdateBackendAuthFluentBuilder
pub fn update_backend_auth(&self) -> UpdateBackendAuthFluentBuilder
Constructs a fluent builder for the UpdateBackendAuth
operation.
- The fluent builder is configurable:
app_id(impl Into<String>)
/set_app_id(Option<String>)
:
required: trueThe app ID.
backend_environment_name(impl Into<String>)
/set_backend_environment_name(Option<String>)
:
required: trueThe name of the backend environment.
resource_config(UpdateBackendAuthResourceConfig)
/set_resource_config(Option<UpdateBackendAuthResourceConfig>)
:
required: trueThe resource configuration for this request object.
resource_name(impl Into<String>)
/set_resource_name(Option<String>)
:
required: trueThe name of this resource.
- On success, responds with
UpdateBackendAuthOutput
with field(s):app_id(Option<String>)
:The app ID.
backend_environment_name(Option<String>)
:The name of the backend environment.
error(Option<String>)
:If the request fails, this error is returned.
job_id(Option<String>)
:The ID for the job.
operation(Option<String>)
:The name of the operation.
status(Option<String>)
:The current status of the request.
- On failure, responds with
SdkError<UpdateBackendAuthError>
Source§impl Client
impl Client
Sourcepub fn update_backend_config(&self) -> UpdateBackendConfigFluentBuilder
pub fn update_backend_config(&self) -> UpdateBackendConfigFluentBuilder
Constructs a fluent builder for the UpdateBackendConfig
operation.
- The fluent builder is configurable:
app_id(impl Into<String>)
/set_app_id(Option<String>)
:
required: trueThe app ID.
login_auth_config(LoginAuthConfigReqObj)
/set_login_auth_config(Option<LoginAuthConfigReqObj>)
:
required: falseDescribes the Amazon Cognito configuration for Admin UI access.
- On success, responds with
UpdateBackendConfigOutput
with field(s):app_id(Option<String>)
:The app ID.
backend_manager_app_id(Option<String>)
:The app ID for the backend manager.
error(Option<String>)
:If the request fails, this error is returned.
login_auth_config(Option<LoginAuthConfigReqObj>)
:Describes the Amazon Cognito configurations for the Admin UI auth resource to log in with.
- On failure, responds with
SdkError<UpdateBackendConfigError>
Source§impl Client
impl Client
Sourcepub fn update_backend_job(&self) -> UpdateBackendJobFluentBuilder
pub fn update_backend_job(&self) -> UpdateBackendJobFluentBuilder
Constructs a fluent builder for the UpdateBackendJob
operation.
- The fluent builder is configurable:
app_id(impl Into<String>)
/set_app_id(Option<String>)
:
required: trueThe app ID.
backend_environment_name(impl Into<String>)
/set_backend_environment_name(Option<String>)
:
required: trueThe name of the backend environment.
job_id(impl Into<String>)
/set_job_id(Option<String>)
:
required: trueThe ID for the job.
operation(impl Into<String>)
/set_operation(Option<String>)
:
required: falseFilters the list of response objects to include only those with the specified operation name.
status(impl Into<String>)
/set_status(Option<String>)
:
required: falseFilters the list of response objects to include only those with the specified status.
- On success, responds with
UpdateBackendJobOutput
with field(s):app_id(Option<String>)
:The app ID.
backend_environment_name(Option<String>)
:The name of the backend environment.
create_time(Option<String>)
:The time when the job was created.
error(Option<String>)
:If the request fails, this error is returned.
job_id(Option<String>)
:The ID for the job.
operation(Option<String>)
:The name of the operation.
status(Option<String>)
:The current status of the request.
update_time(Option<String>)
:The time when the job was last updated.
- On failure, responds with
SdkError<UpdateBackendJobError>
Source§impl Client
impl Client
Sourcepub fn update_backend_storage(&self) -> UpdateBackendStorageFluentBuilder
pub fn update_backend_storage(&self) -> UpdateBackendStorageFluentBuilder
Constructs a fluent builder for the UpdateBackendStorage
operation.
- The fluent builder is configurable:
app_id(impl Into<String>)
/set_app_id(Option<String>)
:
required: trueThe app ID.
backend_environment_name(impl Into<String>)
/set_backend_environment_name(Option<String>)
:
required: trueThe name of the backend environment.
resource_config(UpdateBackendStorageResourceConfig)
/set_resource_config(Option<UpdateBackendStorageResourceConfig>)
:
required: trueThe resource configuration for updating backend storage.
resource_name(impl Into<String>)
/set_resource_name(Option<String>)
:
required: trueThe name of the storage resource.
- On success, responds with
UpdateBackendStorageOutput
with field(s):app_id(Option<String>)
:The app ID.
backend_environment_name(Option<String>)
:The name of the backend environment.
job_id(Option<String>)
:The ID for the job.
status(Option<String>)
:The current status of the request.
- On failure, responds with
SdkError<UpdateBackendStorageError>
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);