Struct aws_sdk_amplify::Client
source · pub struct Client { /* private fields */ }Expand description
Client for AWS Amplify
Client for invoking operations on AWS Amplify. Each operation on AWS Amplify 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_amplify::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 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_amplify::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 CreateApp operation has
a Client::create_app, 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_app()
.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_app(&self) -> CreateAppFluentBuilder
pub fn create_app(&self) -> CreateAppFluentBuilder
Constructs a fluent builder for the CreateApp operation.
- The fluent builder is configurable:
name(impl Into<String>)/set_name(Option<String>):
required: trueThe name of the Amplify app.
description(impl Into<String>)/set_description(Option<String>):
required: falseThe description of the Amplify app.
repository(impl Into<String>)/set_repository(Option<String>):
required: falseThe Git repository for the Amplify app.
platform(Platform)/set_platform(Option<Platform>):
required: falseThe platform for the Amplify app. For a static app, set the platform type to
WEB. For a dynamic server-side rendered (SSR) app, set the platform type toWEB_COMPUTE. For an app requiring Amplify Hosting’s original SSR support only, set the platform type toWEB_DYNAMIC.iam_service_role_arn(impl Into<String>)/set_iam_service_role_arn(Option<String>):
required: falseThe AWS Identity and Access Management (IAM) service role for an Amplify app.
oauth_token(impl Into<String>)/set_oauth_token(Option<String>):
required: falseThe OAuth token for a third-party source control system for an Amplify app. The OAuth token is used to create a webhook and a read-only deploy key using SSH cloning. The OAuth token is not stored.
Use
oauthTokenfor repository providers other than GitHub, such as Bitbucket or CodeCommit. To authorize access to GitHub as your repository provider, useaccessToken.You must specify either
oauthTokenoraccessTokenwhen you create a new app.Existing Amplify apps deployed from a GitHub repository using OAuth continue to work with CI/CD. However, we strongly recommend that you migrate these apps to use the GitHub App. For more information, see Migrating an existing OAuth app to the Amplify GitHub App in the Amplify User Guide .
access_token(impl Into<String>)/set_access_token(Option<String>):
required: falseThe personal access token for a GitHub repository for an Amplify app. The personal access token is used to authorize access to a GitHub repository using the Amplify GitHub App. The token is not stored.
Use
accessTokenfor GitHub repositories only. To authorize access to a repository provider such as Bitbucket or CodeCommit, useoauthToken.You must specify either
accessTokenoroauthTokenwhen you create a new app.Existing Amplify apps deployed from a GitHub repository using OAuth continue to work with CI/CD. However, we strongly recommend that you migrate these apps to use the GitHub App. For more information, see Migrating an existing OAuth app to the Amplify GitHub App in the Amplify User Guide .
environment_variables(impl Into<String>, impl Into<String>)/set_environment_variables(Option<HashMap::<String, String>>):
required: falseThe environment variables map for an Amplify app.
For a list of the environment variables that are accessible to Amplify by default, see Amplify Environment variables in the Amplify Hosting User Guide.
enable_branch_auto_build(bool)/set_enable_branch_auto_build(Option<bool>):
required: falseEnables the auto building of branches for an Amplify app.
enable_branch_auto_deletion(bool)/set_enable_branch_auto_deletion(Option<bool>):
required: falseAutomatically disconnects a branch in the Amplify console when you delete a branch from your Git repository.
enable_basic_auth(bool)/set_enable_basic_auth(Option<bool>):
required: falseEnables basic authorization for an Amplify app. This will apply to all branches that are part of this app.
basic_auth_credentials(impl Into<String>)/set_basic_auth_credentials(Option<String>):
required: falseThe credentials for basic authorization for an Amplify app. You must base64-encode the authorization credentials and provide them in the format
user:password.custom_rules(CustomRule)/set_custom_rules(Option<Vec::<CustomRule>>):
required: falseThe custom rewrite and redirect rules for an Amplify app.
tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: falseThe tag for an Amplify app.
build_spec(impl Into<String>)/set_build_spec(Option<String>):
required: falseThe build specification (build spec) for an Amplify app.
custom_headers(impl Into<String>)/set_custom_headers(Option<String>):
required: falseThe custom HTTP headers for an Amplify app.
enable_auto_branch_creation(bool)/set_enable_auto_branch_creation(Option<bool>):
required: falseEnables automated branch creation for an Amplify app.
auto_branch_creation_patterns(impl Into<String>)/set_auto_branch_creation_patterns(Option<Vec::<String>>):
required: falseThe automated branch creation glob patterns for an Amplify app.
auto_branch_creation_config(AutoBranchCreationConfig)/set_auto_branch_creation_config(Option<AutoBranchCreationConfig>):
required: falseThe automated branch creation configuration for an Amplify app.
- On success, responds with
CreateAppOutputwith field(s):app(Option<App>):Represents the different branches of a repository for building, deploying, and hosting an Amplify app.
- On failure, responds with
SdkError<CreateAppError>
source§impl Client
impl Client
sourcepub fn create_backend_environment(
&self
) -> CreateBackendEnvironmentFluentBuilder
pub fn create_backend_environment( &self ) -> CreateBackendEnvironmentFluentBuilder
Constructs a fluent builder for the CreateBackendEnvironment operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: trueThe unique ID for an Amplify app.
environment_name(impl Into<String>)/set_environment_name(Option<String>):
required: trueThe name for the backend environment.
stack_name(impl Into<String>)/set_stack_name(Option<String>):
required: falseThe AWS CloudFormation stack name of a backend environment.
deployment_artifacts(impl Into<String>)/set_deployment_artifacts(Option<String>):
required: falseThe name of deployment artifacts.
- On success, responds with
CreateBackendEnvironmentOutputwith field(s):backend_environment(Option<BackendEnvironment>):Describes the backend environment for an Amplify app.
- On failure, responds with
SdkError<CreateBackendEnvironmentError>
source§impl Client
impl Client
sourcepub fn create_branch(&self) -> CreateBranchFluentBuilder
pub fn create_branch(&self) -> CreateBranchFluentBuilder
Constructs a fluent builder for the CreateBranch operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: trueThe unique ID for an Amplify app.
branch_name(impl Into<String>)/set_branch_name(Option<String>):
required: trueThe name for the branch.
description(impl Into<String>)/set_description(Option<String>):
required: falseThe description for the branch.
stage(Stage)/set_stage(Option<Stage>):
required: falseDescribes the current stage for the branch.
framework(impl Into<String>)/set_framework(Option<String>):
required: falseThe framework for the branch.
enable_notification(bool)/set_enable_notification(Option<bool>):
required: falseEnables notifications for the branch.
enable_auto_build(bool)/set_enable_auto_build(Option<bool>):
required: falseEnables auto building for the branch.
environment_variables(impl Into<String>, impl Into<String>)/set_environment_variables(Option<HashMap::<String, String>>):
required: falseThe environment variables for the branch.
basic_auth_credentials(impl Into<String>)/set_basic_auth_credentials(Option<String>):
required: falseThe basic authorization credentials for the branch. You must base64-encode the authorization credentials and provide them in the format
user:password.enable_basic_auth(bool)/set_enable_basic_auth(Option<bool>):
required: falseEnables basic authorization for the branch.
enable_performance_mode(bool)/set_enable_performance_mode(Option<bool>):
required: falseEnables performance mode for the branch.
Performance mode optimizes for faster hosting performance by keeping content cached at the edge for a longer interval. When performance mode is enabled, hosting configuration or code changes can take up to 10 minutes to roll out.
tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: falseThe tag for the branch.
build_spec(impl Into<String>)/set_build_spec(Option<String>):
required: falseThe build specification (build spec) for the branch.
ttl(impl Into<String>)/set_ttl(Option<String>):
required: falseThe content Time To Live (TTL) for the website in seconds.
display_name(impl Into<String>)/set_display_name(Option<String>):
required: falseThe display name for a branch. This is used as the default domain prefix.
enable_pull_request_preview(bool)/set_enable_pull_request_preview(Option<bool>):
required: falseEnables pull request previews for this branch.
pull_request_environment_name(impl Into<String>)/set_pull_request_environment_name(Option<String>):
required: falseThe Amplify environment name for the pull request.
backend_environment_arn(impl Into<String>)/set_backend_environment_arn(Option<String>):
required: falseThe Amazon Resource Name (ARN) for a backend environment that is part of an Amplify app.
backend(Backend)/set_backend(Option<Backend>):
required: falseThe backend for a
Branchof an Amplify app. Use for a backend created from an CloudFormation stack.
- On success, responds with
CreateBranchOutputwith field(s):branch(Option<Branch>):Describes the branch for an Amplify app, which maps to a third-party repository branch.
- On failure, responds with
SdkError<CreateBranchError>
source§impl Client
impl Client
sourcepub fn create_deployment(&self) -> CreateDeploymentFluentBuilder
pub fn create_deployment(&self) -> CreateDeploymentFluentBuilder
Constructs a fluent builder for the CreateDeployment operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: trueThe unique ID for an Amplify app.
branch_name(impl Into<String>)/set_branch_name(Option<String>):
required: trueThe name of the branch to use for the job.
file_map(impl Into<String>, impl Into<String>)/set_file_map(Option<HashMap::<String, String>>):
required: falseAn optional file map that contains the file name as the key and the file content md5 hash as the value. If this argument is provided, the service will generate a unique upload URL per file. Otherwise, the service will only generate a single upload URL for the zipped files.
- On success, responds with
CreateDeploymentOutputwith field(s):job_id(Option<String>):The job ID for this deployment. will supply to start deployment api.
file_upload_urls(HashMap::<String, String>):When the
fileMapargument is provided in the request,fileUploadUrlswill contain a map of file names to upload URLs.zip_upload_url(String):When the
fileMapargument is not provided in the request, thiszipUploadUrlis returned.
- On failure, responds with
SdkError<CreateDeploymentError>
source§impl Client
impl Client
sourcepub fn create_domain_association(&self) -> CreateDomainAssociationFluentBuilder
pub fn create_domain_association(&self) -> CreateDomainAssociationFluentBuilder
Constructs a fluent builder for the CreateDomainAssociation operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: trueThe unique ID for an Amplify app.
domain_name(impl Into<String>)/set_domain_name(Option<String>):
required: trueThe domain name for the domain association.
enable_auto_sub_domain(bool)/set_enable_auto_sub_domain(Option<bool>):
required: falseEnables the automated creation of subdomains for branches.
sub_domain_settings(SubDomainSetting)/set_sub_domain_settings(Option<Vec::<SubDomainSetting>>):
required: trueThe setting for the subdomain.
auto_sub_domain_creation_patterns(impl Into<String>)/set_auto_sub_domain_creation_patterns(Option<Vec::<String>>):
required: falseSets the branch patterns for automatic subdomain creation.
auto_sub_domain_iam_role(impl Into<String>)/set_auto_sub_domain_iam_role(Option<String>):
required: falseThe required AWS Identity and Access Management (IAM) service role for the Amazon Resource Name (ARN) for automatically creating subdomains.
- On success, responds with
CreateDomainAssociationOutputwith field(s):domain_association(Option<DomainAssociation>):Describes the structure of a domain association, which associates a custom domain with an Amplify app.
- On failure, responds with
SdkError<CreateDomainAssociationError>
source§impl Client
impl Client
sourcepub fn create_webhook(&self) -> CreateWebhookFluentBuilder
pub fn create_webhook(&self) -> CreateWebhookFluentBuilder
Constructs a fluent builder for the CreateWebhook operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: trueThe unique ID for an Amplify app.
branch_name(impl Into<String>)/set_branch_name(Option<String>):
required: trueThe name for a branch that is part of an Amplify app.
description(impl Into<String>)/set_description(Option<String>):
required: falseThe description for a webhook.
- On success, responds with
CreateWebhookOutputwith field(s):webhook(Option<Webhook>):Describes a webhook that connects repository events to an Amplify app.
- On failure, responds with
SdkError<CreateWebhookError>
source§impl Client
impl Client
sourcepub fn delete_app(&self) -> DeleteAppFluentBuilder
pub fn delete_app(&self) -> DeleteAppFluentBuilder
Constructs a fluent builder for the DeleteApp operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: trueThe unique ID for an Amplify app.
- On success, responds with
DeleteAppOutputwith field(s):app(Option<App>):Represents the different branches of a repository for building, deploying, and hosting an Amplify app.
- On failure, responds with
SdkError<DeleteAppError>
source§impl Client
impl Client
sourcepub fn delete_backend_environment(
&self
) -> DeleteBackendEnvironmentFluentBuilder
pub fn delete_backend_environment( &self ) -> DeleteBackendEnvironmentFluentBuilder
Constructs a fluent builder for the DeleteBackendEnvironment operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: trueThe unique ID of an Amplify app.
environment_name(impl Into<String>)/set_environment_name(Option<String>):
required: trueThe name of a backend environment of an Amplify app.
- On success, responds with
DeleteBackendEnvironmentOutputwith field(s):backend_environment(Option<BackendEnvironment>):Describes the backend environment for an Amplify app.
- On failure, responds with
SdkError<DeleteBackendEnvironmentError>
source§impl Client
impl Client
sourcepub fn delete_branch(&self) -> DeleteBranchFluentBuilder
pub fn delete_branch(&self) -> DeleteBranchFluentBuilder
Constructs a fluent builder for the DeleteBranch operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: trueThe unique ID for an Amplify app.
branch_name(impl Into<String>)/set_branch_name(Option<String>):
required: trueThe name of the branch.
- On success, responds with
DeleteBranchOutputwith field(s):branch(Option<Branch>):The branch for an Amplify app, which maps to a third-party repository branch.
- On failure, responds with
SdkError<DeleteBranchError>
source§impl Client
impl Client
sourcepub fn delete_domain_association(&self) -> DeleteDomainAssociationFluentBuilder
pub fn delete_domain_association(&self) -> DeleteDomainAssociationFluentBuilder
Constructs a fluent builder for the DeleteDomainAssociation operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: trueThe unique id for an Amplify app.
domain_name(impl Into<String>)/set_domain_name(Option<String>):
required: trueThe name of the domain.
- On success, responds with
DeleteDomainAssociationOutputwith field(s):domain_association(Option<DomainAssociation>):Describes a domain association that associates a custom domain with an Amplify app.
- On failure, responds with
SdkError<DeleteDomainAssociationError>
source§impl Client
impl Client
sourcepub fn delete_job(&self) -> DeleteJobFluentBuilder
pub fn delete_job(&self) -> DeleteJobFluentBuilder
Constructs a fluent builder for the DeleteJob operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: trueThe unique ID for an Amplify app.
branch_name(impl Into<String>)/set_branch_name(Option<String>):
required: trueThe name of the branch to use for the job.
job_id(impl Into<String>)/set_job_id(Option<String>):
required: trueThe unique ID for the job.
- On success, responds with
DeleteJobOutputwith field(s):job_summary(Option<JobSummary>):Describes the summary for an execution job for an Amplify app.
- On failure, responds with
SdkError<DeleteJobError>
source§impl Client
impl Client
sourcepub fn delete_webhook(&self) -> DeleteWebhookFluentBuilder
pub fn delete_webhook(&self) -> DeleteWebhookFluentBuilder
Constructs a fluent builder for the DeleteWebhook operation.
- The fluent builder is configurable:
webhook_id(impl Into<String>)/set_webhook_id(Option<String>):
required: trueThe unique ID for a webhook.
- On success, responds with
DeleteWebhookOutputwith field(s):webhook(Option<Webhook>):Describes a webhook that connects repository events to an Amplify app.
- On failure, responds with
SdkError<DeleteWebhookError>
source§impl Client
impl Client
sourcepub fn generate_access_logs(&self) -> GenerateAccessLogsFluentBuilder
pub fn generate_access_logs(&self) -> GenerateAccessLogsFluentBuilder
Constructs a fluent builder for the GenerateAccessLogs operation.
- The fluent builder is configurable:
start_time(DateTime)/set_start_time(Option<DateTime>):
required: falseThe time at which the logs should start. The time range specified is inclusive of the start time.
end_time(DateTime)/set_end_time(Option<DateTime>):
required: falseThe time at which the logs should end. The time range specified is inclusive of the end time.
domain_name(impl Into<String>)/set_domain_name(Option<String>):
required: trueThe name of the domain.
app_id(impl Into<String>)/set_app_id(Option<String>):
required: trueThe unique ID for an Amplify app.
- On success, responds with
GenerateAccessLogsOutputwith field(s):log_url(Option<String>):The pre-signed URL for the requested access logs.
- On failure, responds with
SdkError<GenerateAccessLogsError>
source§impl Client
impl Client
sourcepub fn get_app(&self) -> GetAppFluentBuilder
pub fn get_app(&self) -> GetAppFluentBuilder
Constructs a fluent builder for the GetApp operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: trueThe unique ID for an Amplify app.
- On success, responds with
GetAppOutputwith field(s):app(Option<App>):Represents the different branches of a repository for building, deploying, and hosting an Amplify app.
- On failure, responds with
SdkError<GetAppError>
source§impl Client
impl Client
sourcepub fn get_artifact_url(&self) -> GetArtifactUrlFluentBuilder
pub fn get_artifact_url(&self) -> GetArtifactUrlFluentBuilder
Constructs a fluent builder for the GetArtifactUrl operation.
- The fluent builder is configurable:
artifact_id(impl Into<String>)/set_artifact_id(Option<String>):
required: trueThe unique ID for an artifact.
- On success, responds with
GetArtifactUrlOutputwith field(s):artifact_id(String):The unique ID for an artifact.
artifact_url(String):The presigned URL for the artifact.
- On failure, responds with
SdkError<GetArtifactUrlError>
source§impl Client
impl Client
sourcepub fn get_backend_environment(&self) -> GetBackendEnvironmentFluentBuilder
pub fn get_backend_environment(&self) -> GetBackendEnvironmentFluentBuilder
Constructs a fluent builder for the GetBackendEnvironment operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: trueThe unique id for an Amplify app.
environment_name(impl Into<String>)/set_environment_name(Option<String>):
required: trueThe name for the backend environment.
- On success, responds with
GetBackendEnvironmentOutputwith field(s):backend_environment(Option<BackendEnvironment>):Describes the backend environment for an Amplify app.
- On failure, responds with
SdkError<GetBackendEnvironmentError>
source§impl Client
impl Client
sourcepub fn get_branch(&self) -> GetBranchFluentBuilder
pub fn get_branch(&self) -> GetBranchFluentBuilder
Constructs a fluent builder for the GetBranch operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: trueThe unique ID for an Amplify app.
branch_name(impl Into<String>)/set_branch_name(Option<String>):
required: trueThe name of the branch.
- On success, responds with
GetBranchOutputwith field(s):branch(Option<Branch>):The branch for an Amplify app, which maps to a third-party repository branch.
- On failure, responds with
SdkError<GetBranchError>
source§impl Client
impl Client
sourcepub fn get_domain_association(&self) -> GetDomainAssociationFluentBuilder
pub fn get_domain_association(&self) -> GetDomainAssociationFluentBuilder
Constructs a fluent builder for the GetDomainAssociation operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: trueThe unique id for an Amplify app.
domain_name(impl Into<String>)/set_domain_name(Option<String>):
required: trueThe name of the domain.
- On success, responds with
GetDomainAssociationOutputwith field(s):domain_association(Option<DomainAssociation>):Describes the structure of a domain association, which associates a custom domain with an Amplify app.
- On failure, responds with
SdkError<GetDomainAssociationError>
source§impl Client
impl Client
sourcepub fn get_job(&self) -> GetJobFluentBuilder
pub fn get_job(&self) -> GetJobFluentBuilder
Constructs a fluent builder for the GetJob operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: trueThe unique ID for an Amplify app.
branch_name(impl Into<String>)/set_branch_name(Option<String>):
required: trueThe name of the branch to use for the job.
job_id(impl Into<String>)/set_job_id(Option<String>):
required: trueThe unique ID for the job.
- On success, responds with
GetJobOutputwith field(s):job(Option<Job>):Describes an execution job for an Amplify app.
- On failure, responds with
SdkError<GetJobError>
source§impl Client
impl Client
sourcepub fn get_webhook(&self) -> GetWebhookFluentBuilder
pub fn get_webhook(&self) -> GetWebhookFluentBuilder
Constructs a fluent builder for the GetWebhook operation.
- The fluent builder is configurable:
webhook_id(impl Into<String>)/set_webhook_id(Option<String>):
required: trueThe unique ID for a webhook.
- On success, responds with
GetWebhookOutputwith field(s):webhook(Option<Webhook>):Describes the structure of a webhook.
- On failure, responds with
SdkError<GetWebhookError>
source§impl Client
impl Client
sourcepub fn list_apps(&self) -> ListAppsFluentBuilder
pub fn list_apps(&self) -> ListAppsFluentBuilder
Constructs a fluent builder for the ListApps operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseA pagination token. If non-null, the pagination token is returned in a result. Pass its value in another request to retrieve more entries.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of records to list in a single response.
- On success, responds with
ListAppsOutputwith field(s):apps(Vec::<App>):A list of Amplify apps.
next_token(Option<String>):A pagination token. Set to null to start listing apps from start. If non-null, the pagination token is returned in a result. Pass its value in here to list more projects.
- On failure, responds with
SdkError<ListAppsError>
source§impl Client
impl Client
sourcepub fn list_artifacts(&self) -> ListArtifactsFluentBuilder
pub fn list_artifacts(&self) -> ListArtifactsFluentBuilder
Constructs a fluent builder for the ListArtifacts operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: trueThe unique ID for an Amplify app.
branch_name(impl Into<String>)/set_branch_name(Option<String>):
required: trueThe name of a branch that is part of an Amplify app.
job_id(impl Into<String>)/set_job_id(Option<String>):
required: trueThe unique ID for a job.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseA pagination token. Set to null to start listing artifacts from start. If a non-null pagination token is returned in a result, pass its value in here to list more artifacts.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of records to list in a single response.
- On success, responds with
ListArtifactsOutputwith field(s):artifacts(Vec::<Artifact>):A list of artifacts.
next_token(Option<String>):A pagination token. If a non-null pagination token is returned in a result, pass its value in another request to retrieve more entries.
- On failure, responds with
SdkError<ListArtifactsError>
source§impl Client
impl Client
sourcepub fn list_backend_environments(&self) -> ListBackendEnvironmentsFluentBuilder
pub fn list_backend_environments(&self) -> ListBackendEnvironmentsFluentBuilder
Constructs a fluent builder for the ListBackendEnvironments operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: trueThe unique ID for an Amplify app.
environment_name(impl Into<String>)/set_environment_name(Option<String>):
required: falseThe name of the backend environment
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseA pagination token. Set to null to start listing backend environments from the start. If a non-null pagination token is returned in a result, pass its value in here to list more backend environments.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of records to list in a single response.
- On success, responds with
ListBackendEnvironmentsOutputwith field(s):backend_environments(Vec::<BackendEnvironment>):The list of backend environments for an Amplify app.
next_token(Option<String>):A pagination token. If a non-null pagination token is returned in a result, pass its value in another request to retrieve more entries.
- On failure, responds with
SdkError<ListBackendEnvironmentsError>
source§impl Client
impl Client
sourcepub fn list_branches(&self) -> ListBranchesFluentBuilder
pub fn list_branches(&self) -> ListBranchesFluentBuilder
Constructs a fluent builder for the ListBranches operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: trueThe unique ID for an Amplify app.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseA pagination token. Set to null to start listing branches from the start. If a non-null pagination token is returned in a result, pass its value in here to list more branches.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of records to list in a single response.
- On success, responds with
ListBranchesOutputwith field(s):branches(Vec::<Branch>):A list of branches for an Amplify app.
next_token(Option<String>):A pagination token. If a non-null pagination token is returned in a result, pass its value in another request to retrieve more entries.
- On failure, responds with
SdkError<ListBranchesError>
source§impl Client
impl Client
sourcepub fn list_domain_associations(&self) -> ListDomainAssociationsFluentBuilder
pub fn list_domain_associations(&self) -> ListDomainAssociationsFluentBuilder
Constructs a fluent builder for the ListDomainAssociations operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: trueThe unique ID for an Amplify app.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseA pagination token. Set to null to start listing apps from the start. If non-null, a pagination token is returned in a result. Pass its value in here to list more projects.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of records to list in a single response.
- On success, responds with
ListDomainAssociationsOutputwith field(s):domain_associations(Vec::<DomainAssociation>):A list of domain associations.
next_token(Option<String>):A pagination token. If non-null, a pagination token is returned in a result. Pass its value in another request to retrieve more entries.
- On failure, responds with
SdkError<ListDomainAssociationsError>
source§impl Client
impl Client
sourcepub fn list_jobs(&self) -> ListJobsFluentBuilder
pub fn list_jobs(&self) -> ListJobsFluentBuilder
Constructs a fluent builder for the ListJobs operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: trueThe unique ID for an Amplify app.
branch_name(impl Into<String>)/set_branch_name(Option<String>):
required: trueThe name of the branch to use for the request.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseA pagination token. Set to null to start listing steps from the start. If a non-null pagination token is returned in a result, pass its value in here to list more steps.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of records to list in a single response.
- On success, responds with
ListJobsOutputwith field(s):job_summaries(Vec::<JobSummary>):The result structure for the list job result request.
next_token(Option<String>):A pagination token. If non-null the pagination token is returned in a result. Pass its value in another request to retrieve more entries.
- On failure, responds with
SdkError<ListJobsError>
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) to use to list tags.
- On success, responds with
ListTagsForResourceOutputwith field(s):tags(Option<HashMap::<String, String>>):A list of tags for the specified The Amazon Resource Name (ARN).
- On failure, responds with
SdkError<ListTagsForResourceError>
source§impl Client
impl Client
sourcepub fn list_webhooks(&self) -> ListWebhooksFluentBuilder
pub fn list_webhooks(&self) -> ListWebhooksFluentBuilder
Constructs a fluent builder for the ListWebhooks operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: trueThe unique ID for an Amplify app.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseA pagination token. Set to null to start listing webhooks from the start. If non-null,the pagination token is returned in a result. Pass its value in here to list more webhooks.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of records to list in a single response.
- On success, responds with
ListWebhooksOutputwith field(s):webhooks(Vec::<Webhook>):A list of webhooks.
next_token(Option<String>):A pagination token. If non-null, the pagination token is returned in a result. Pass its value in another request to retrieve more entries.
- On failure, responds with
SdkError<ListWebhooksError>
source§impl Client
impl Client
sourcepub fn start_deployment(&self) -> StartDeploymentFluentBuilder
pub fn start_deployment(&self) -> StartDeploymentFluentBuilder
Constructs a fluent builder for the StartDeployment operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: trueThe unique ID for an Amplify app.
branch_name(impl Into<String>)/set_branch_name(Option<String>):
required: trueThe name of the branch to use for the job.
job_id(impl Into<String>)/set_job_id(Option<String>):
required: falseThe job ID for this deployment, generated by the create deployment request.
source_url(impl Into<String>)/set_source_url(Option<String>):
required: falseThe source URL for this deployment, used when calling start deployment without create deployment. The source URL can be any HTTP GET URL that is publicly accessible and downloads a single .zip file.
- On success, responds with
StartDeploymentOutputwith field(s):job_summary(Option<JobSummary>):The summary for the job.
- On failure, responds with
SdkError<StartDeploymentError>
source§impl Client
impl Client
sourcepub fn start_job(&self) -> StartJobFluentBuilder
pub fn start_job(&self) -> StartJobFluentBuilder
Constructs a fluent builder for the StartJob operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: trueThe unique ID for an Amplify app.
branch_name(impl Into<String>)/set_branch_name(Option<String>):
required: trueThe name of the branch to use for the job.
job_id(impl Into<String>)/set_job_id(Option<String>):
required: falseThe unique ID for an existing job. This is required if the value of
jobTypeisRETRY.job_type(JobType)/set_job_type(Option<JobType>):
required: trueDescribes the type for the job. The job type
RELEASEstarts a new job with the latest change from the specified branch. This value is available only for apps that are connected to a repository.The job type
RETRYretries an existing job. If the job type value isRETRY, thejobIdis also required.job_reason(impl Into<String>)/set_job_reason(Option<String>):
required: falseA descriptive reason for starting the job.
commit_id(impl Into<String>)/set_commit_id(Option<String>):
required: falseThe commit ID from a third-party repository provider for the job.
commit_message(impl Into<String>)/set_commit_message(Option<String>):
required: falseThe commit message from a third-party repository provider for the job.
commit_time(DateTime)/set_commit_time(Option<DateTime>):
required: falseThe commit date and time for the job.
- On success, responds with
StartJobOutputwith field(s):job_summary(Option<JobSummary>):The summary for the job.
- On failure, responds with
SdkError<StartJobError>
source§impl Client
impl Client
sourcepub fn stop_job(&self) -> StopJobFluentBuilder
pub fn stop_job(&self) -> StopJobFluentBuilder
Constructs a fluent builder for the StopJob operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: trueThe unique ID for an Amplify app.
branch_name(impl Into<String>)/set_branch_name(Option<String>):
required: trueThe name of the branch to use for the stop job request.
job_id(impl Into<String>)/set_job_id(Option<String>):
required: trueThe unique id for the job.
- On success, responds with
StopJobOutputwith field(s):job_summary(Option<JobSummary>):The summary for the job.
- On failure, responds with
SdkError<StopJobError>
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) to use to tag a resource.
tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: trueThe tags used to tag the resource.
- On success, responds with
TagResourceOutput - On failure, responds with
SdkError<TagResourceError>
source§impl Client
impl Client
sourcepub fn untag_resource(&self) -> UntagResourceFluentBuilder
pub fn untag_resource(&self) -> UntagResourceFluentBuilder
Constructs a fluent builder for the UntagResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) to use to untag a resource.
tag_keys(impl Into<String>)/set_tag_keys(Option<Vec::<String>>):
required: trueThe tag keys to use to untag a resource.
- On success, responds with
UntagResourceOutput - On failure, responds with
SdkError<UntagResourceError>
source§impl Client
impl Client
sourcepub fn update_app(&self) -> UpdateAppFluentBuilder
pub fn update_app(&self) -> UpdateAppFluentBuilder
Constructs a fluent builder for the UpdateApp operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: trueThe unique ID for an Amplify app.
name(impl Into<String>)/set_name(Option<String>):
required: falseThe name for an Amplify app.
description(impl Into<String>)/set_description(Option<String>):
required: falseThe description for an Amplify app.
platform(Platform)/set_platform(Option<Platform>):
required: falseThe platform for the Amplify app. For a static app, set the platform type to
WEB. For a dynamic server-side rendered (SSR) app, set the platform type toWEB_COMPUTE. For an app requiring Amplify Hosting’s original SSR support only, set the platform type toWEB_DYNAMIC.iam_service_role_arn(impl Into<String>)/set_iam_service_role_arn(Option<String>):
required: falseThe AWS Identity and Access Management (IAM) service role for an Amplify app.
environment_variables(impl Into<String>, impl Into<String>)/set_environment_variables(Option<HashMap::<String, String>>):
required: falseThe environment variables for an Amplify app.
enable_branch_auto_build(bool)/set_enable_branch_auto_build(Option<bool>):
required: falseEnables branch auto-building for an Amplify app.
enable_branch_auto_deletion(bool)/set_enable_branch_auto_deletion(Option<bool>):
required: falseAutomatically disconnects a branch in the Amplify console when you delete a branch from your Git repository.
enable_basic_auth(bool)/set_enable_basic_auth(Option<bool>):
required: falseEnables basic authorization for an Amplify app.
basic_auth_credentials(impl Into<String>)/set_basic_auth_credentials(Option<String>):
required: falseThe basic authorization credentials for an Amplify app. You must base64-encode the authorization credentials and provide them in the format
user:password.custom_rules(CustomRule)/set_custom_rules(Option<Vec::<CustomRule>>):
required: falseThe custom redirect and rewrite rules for an Amplify app.
build_spec(impl Into<String>)/set_build_spec(Option<String>):
required: falseThe build specification (build spec) for an Amplify app.
custom_headers(impl Into<String>)/set_custom_headers(Option<String>):
required: falseThe custom HTTP headers for an Amplify app.
enable_auto_branch_creation(bool)/set_enable_auto_branch_creation(Option<bool>):
required: falseEnables automated branch creation for an Amplify app.
auto_branch_creation_patterns(impl Into<String>)/set_auto_branch_creation_patterns(Option<Vec::<String>>):
required: falseDescribes the automated branch creation glob patterns for an Amplify app.
auto_branch_creation_config(AutoBranchCreationConfig)/set_auto_branch_creation_config(Option<AutoBranchCreationConfig>):
required: falseThe automated branch creation configuration for an Amplify app.
repository(impl Into<String>)/set_repository(Option<String>):
required: falseThe name of the Git repository for an Amplify app.
oauth_token(impl Into<String>)/set_oauth_token(Option<String>):
required: falseThe OAuth token for a third-party source control system for an Amplify app. The OAuth token is used to create a webhook and a read-only deploy key using SSH cloning. The OAuth token is not stored.
Use
oauthTokenfor repository providers other than GitHub, such as Bitbucket or CodeCommit.To authorize access to GitHub as your repository provider, use
accessToken.You must specify either
oauthTokenoraccessTokenwhen you update an app.Existing Amplify apps deployed from a GitHub repository using OAuth continue to work with CI/CD. However, we strongly recommend that you migrate these apps to use the GitHub App. For more information, see Migrating an existing OAuth app to the Amplify GitHub App in the Amplify User Guide .
access_token(impl Into<String>)/set_access_token(Option<String>):
required: falseThe personal access token for a GitHub repository for an Amplify app. The personal access token is used to authorize access to a GitHub repository using the Amplify GitHub App. The token is not stored.
Use
accessTokenfor GitHub repositories only. To authorize access to a repository provider such as Bitbucket or CodeCommit, useoauthToken.You must specify either
accessTokenoroauthTokenwhen you update an app.Existing Amplify apps deployed from a GitHub repository using OAuth continue to work with CI/CD. However, we strongly recommend that you migrate these apps to use the GitHub App. For more information, see Migrating an existing OAuth app to the Amplify GitHub App in the Amplify User Guide .
- On success, responds with
UpdateAppOutputwith field(s):app(Option<App>):Represents the updated Amplify app.
- On failure, responds with
SdkError<UpdateAppError>
source§impl Client
impl Client
sourcepub fn update_branch(&self) -> UpdateBranchFluentBuilder
pub fn update_branch(&self) -> UpdateBranchFluentBuilder
Constructs a fluent builder for the UpdateBranch operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: trueThe unique ID for an Amplify app.
branch_name(impl Into<String>)/set_branch_name(Option<String>):
required: trueThe name of the branch.
description(impl Into<String>)/set_description(Option<String>):
required: falseThe description for the branch.
framework(impl Into<String>)/set_framework(Option<String>):
required: falseThe framework for the branch.
stage(Stage)/set_stage(Option<Stage>):
required: falseDescribes the current stage for the branch.
enable_notification(bool)/set_enable_notification(Option<bool>):
required: falseEnables notifications for the branch.
enable_auto_build(bool)/set_enable_auto_build(Option<bool>):
required: falseEnables auto building for the branch.
environment_variables(impl Into<String>, impl Into<String>)/set_environment_variables(Option<HashMap::<String, String>>):
required: falseThe environment variables for the branch.
basic_auth_credentials(impl Into<String>)/set_basic_auth_credentials(Option<String>):
required: falseThe basic authorization credentials for the branch. You must base64-encode the authorization credentials and provide them in the format
user:password.enable_basic_auth(bool)/set_enable_basic_auth(Option<bool>):
required: falseEnables basic authorization for the branch.
enable_performance_mode(bool)/set_enable_performance_mode(Option<bool>):
required: falseEnables performance mode for the branch.
Performance mode optimizes for faster hosting performance by keeping content cached at the edge for a longer interval. When performance mode is enabled, hosting configuration or code changes can take up to 10 minutes to roll out.
build_spec(impl Into<String>)/set_build_spec(Option<String>):
required: falseThe build specification (build spec) for the branch.
ttl(impl Into<String>)/set_ttl(Option<String>):
required: falseThe content Time to Live (TTL) for the website in seconds.
display_name(impl Into<String>)/set_display_name(Option<String>):
required: falseThe display name for a branch. This is used as the default domain prefix.
enable_pull_request_preview(bool)/set_enable_pull_request_preview(Option<bool>):
required: falseEnables pull request previews for this branch.
pull_request_environment_name(impl Into<String>)/set_pull_request_environment_name(Option<String>):
required: falseThe Amplify environment name for the pull request.
backend_environment_arn(impl Into<String>)/set_backend_environment_arn(Option<String>):
required: falseThe Amazon Resource Name (ARN) for a backend environment that is part of an Amplify app.
backend(Backend)/set_backend(Option<Backend>):
required: falseThe backend for a
Branchof an Amplify app. Use for a backend created from an CloudFormation stack.
- On success, responds with
UpdateBranchOutputwith field(s):branch(Option<Branch>):The branch for an Amplify app, which maps to a third-party repository branch.
- On failure, responds with
SdkError<UpdateBranchError>
source§impl Client
impl Client
sourcepub fn update_domain_association(&self) -> UpdateDomainAssociationFluentBuilder
pub fn update_domain_association(&self) -> UpdateDomainAssociationFluentBuilder
Constructs a fluent builder for the UpdateDomainAssociation operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: trueThe unique ID for an Amplify app.
domain_name(impl Into<String>)/set_domain_name(Option<String>):
required: trueThe name of the domain.
enable_auto_sub_domain(bool)/set_enable_auto_sub_domain(Option<bool>):
required: falseEnables the automated creation of subdomains for branches.
sub_domain_settings(SubDomainSetting)/set_sub_domain_settings(Option<Vec::<SubDomainSetting>>):
required: falseDescribes the settings for the subdomain.
auto_sub_domain_creation_patterns(impl Into<String>)/set_auto_sub_domain_creation_patterns(Option<Vec::<String>>):
required: falseSets the branch patterns for automatic subdomain creation.
auto_sub_domain_iam_role(impl Into<String>)/set_auto_sub_domain_iam_role(Option<String>):
required: falseThe required AWS Identity and Access Management (IAM) service role for the Amazon Resource Name (ARN) for automatically creating subdomains.
- On success, responds with
UpdateDomainAssociationOutputwith field(s):domain_association(Option<DomainAssociation>):Describes a domain association, which associates a custom domain with an Amplify app.
- On failure, responds with
SdkError<UpdateDomainAssociationError>
source§impl Client
impl Client
sourcepub fn update_webhook(&self) -> UpdateWebhookFluentBuilder
pub fn update_webhook(&self) -> UpdateWebhookFluentBuilder
Constructs a fluent builder for the UpdateWebhook operation.
- The fluent builder is configurable:
webhook_id(impl Into<String>)/set_webhook_id(Option<String>):
required: trueThe unique ID for a webhook.
branch_name(impl Into<String>)/set_branch_name(Option<String>):
required: falseThe name for a branch that is part of an Amplify app.
description(impl Into<String>)/set_description(Option<String>):
required: falseThe description for a webhook.
- On success, responds with
UpdateWebhookOutputwith field(s):webhook(Option<Webhook>):Describes a webhook that connects repository events to an Amplify app.
- On failure, responds with
SdkError<UpdateWebhookError>
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.