AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.

Class: Aws::Amplify::Client

Inherits:
Seahorse::Client::Base show all
Defined in:
(unknown)

Overview

An API client for AWS Amplify. To construct a client, you need to configure a :region and :credentials.

amplify = Aws::Amplify::Client.new(
  region: region_name,
  credentials: credentials,
  # ...
)

See #initialize for a full list of supported configuration options.

Region

You can configure a default region in the following locations:

  • ENV['AWS_REGION']
  • Aws.config[:region]

Go here for a list of supported regions.

Credentials

Default credentials are loaded automatically from the following locations:

  • ENV['AWS_ACCESS_KEY_ID'] and ENV['AWS_SECRET_ACCESS_KEY']
  • Aws.config[:credentials]
  • The shared credentials ini file at ~/.aws/credentials (more information)
  • From an instance profile when running on EC2

You can also construct a credentials object from one of the following classes:

Alternatively, you configure credentials with :access_key_id and :secret_access_key:

# load credentials from disk
creds = YAML.load(File.read('/path/to/secrets'))

Aws::Amplify::Client.new(
  access_key_id: creds['access_key_id'],
  secret_access_key: creds['secret_access_key']
)

Always load your credentials from outside your application. Avoid configuring credentials statically and never commit them to source control.

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

Constructor collapse

API Operations collapse

Instance Method Summary collapse

Methods inherited from Seahorse::Client::Base

add_plugin, api, #build_request, clear_plugins, define, new, #operation, #operation_names, plugins, remove_plugin, set_api, set_plugins

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(options = {}) ⇒ Aws::Amplify::Client

Constructs an API client.

Options Hash (options):

  • :access_key_id (String)

    Used to set credentials statically. See Plugins::RequestSigner for more details.

  • :active_endpoint_cache (Boolean)

    When set to true, a thread polling for endpoints will be running in the background every 60 secs (default). Defaults to false. See Plugins::EndpointDiscovery for more details.

  • :convert_params (Boolean) — default: true

    When true, an attempt is made to coerce request parameters into the required types. See Plugins::ParamConverter for more details.

  • :credentials (required, Credentials)

    Your AWS credentials. The following locations will be searched in order for credentials:

    • :access_key_id, :secret_access_key, and :session_token options
    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
    • HOME/.aws/credentials shared credentials file
    • EC2 instance profile credentials See Plugins::RequestSigner for more details.
  • :disable_host_prefix_injection (Boolean)

    Set to true to disable SDK automatically adding host prefix to default service endpoint when available. See Plugins::EndpointPattern for more details.

  • :endpoint (String)

    A default endpoint is constructed from the :region. See Plugins::RegionalEndpoint for more details.

  • :endpoint_cache_max_entries (Integer)

    Used for the maximum size limit of the LRU cache storing endpoints data for endpoint discovery enabled operations. Defaults to 1000. See Plugins::EndpointDiscovery for more details.

  • :endpoint_cache_max_threads (Integer)

    Used for the maximum threads in use for polling endpoints to be cached, defaults to 10. See Plugins::EndpointDiscovery for more details.

  • :endpoint_cache_poll_interval (Integer)

    When :endpoint_discovery and :active_endpoint_cache is enabled, Use this option to config the time interval in seconds for making requests fetching endpoints information. Defaults to 60 sec. See Plugins::EndpointDiscovery for more details.

  • :endpoint_discovery (Boolean)

    When set to true, endpoint discovery will be enabled for operations when available. Defaults to false. See Plugins::EndpointDiscovery for more details.

  • :http_continue_timeout (Float) — default: 1

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_idle_timeout (Integer) — default: 5

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_open_timeout (Integer) — default: 15

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_proxy (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_read_timeout (Integer) — default: 60

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_wire_trace (Boolean) — default: false

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :log_level (Symbol) — default: :info

    The log level to send messages to the logger at. See Plugins::Logging for more details.

  • :log_formatter (Logging::LogFormatter)

    The log formatter. Defaults to Seahorse::Client::Logging::Formatter.default. See Plugins::Logging for more details.

  • :logger (Logger) — default: nil

    The Logger instance to send log messages to. If this option is not set, logging will be disabled. See Plugins::Logging for more details.

  • :profile (String)

    Used when loading credentials from the shared credentials file at HOME/.aws/credentials. When not specified, 'default' is used. See Plugins::RequestSigner for more details.

  • :raise_response_errors (Boolean) — default: true

    When true, response errors are raised. See Seahorse::Client::Plugins::RaiseResponseErrors for more details.

  • :region (required, String)

    The AWS region to connect to. The region is used to construct the client endpoint. Defaults to ENV['AWS_REGION']. Also checks AMAZON_REGION and AWS_DEFAULT_REGION. See Plugins::RegionalEndpoint for more details.

  • :retry_limit (Integer) — default: 3

    The maximum number of times to retry failed requests. Only ~ 500 level server errors and certain ~ 400 level client errors are retried. Generally, these are throttling errors, data checksum errors, networking errors, timeout errors and auth errors from expired credentials. See Plugins::RetryErrors for more details.

  • :secret_access_key (String)

    Used to set credentials statically. See Plugins::RequestSigner for more details.

  • :session_token (String)

    Used to set credentials statically. See Plugins::RequestSigner for more details.

  • :ssl_ca_bundle (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :ssl_ca_directory (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :ssl_ca_store (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :ssl_verify_peer (Boolean) — default: true

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :stub_responses (Boolean) — default: false

    Causes the client to return stubbed responses. By default fake responses are generated and returned. You can specify the response data to return or errors to raise by calling ClientStubs#stub_responses. See ClientStubs for more information.

    Please note When response stubbing is enabled, no HTTP requests are made, and retries are disabled. See Plugins::StubResponses for more details.

  • :validate_params (Boolean) — default: true

    When true, request parameters are validated before sending the request. See Plugins::ParamValidator for more details.

Instance Method Details

#create_app(options = {}) ⇒ Types::CreateAppResult

Creates a new Amplify app.

Examples:

Request syntax with placeholder values


resp = client.create_app({
  name: "Name", # required
  description: "Description",
  repository: "Repository",
  platform: "WEB", # accepts WEB
  iam_service_role_arn: "ServiceRoleArn",
  oauth_token: "OauthToken",
  access_token: "AccessToken",
  environment_variables: {
    "EnvKey" => "EnvValue",
  },
  enable_branch_auto_build: false,
  enable_branch_auto_deletion: false,
  enable_basic_auth: false,
  basic_auth_credentials: "BasicAuthCredentials",
  custom_rules: [
    {
      source: "Source", # required
      target: "Target", # required
      status: "Status",
      condition: "Condition",
    },
  ],
  tags: {
    "TagKey" => "TagValue",
  },
  build_spec: "BuildSpec",
  custom_headers: "CustomHeaders",
  enable_auto_branch_creation: false,
  auto_branch_creation_patterns: ["AutoBranchCreationPattern"],
  auto_branch_creation_config: {
    stage: "PRODUCTION", # accepts PRODUCTION, BETA, DEVELOPMENT, EXPERIMENTAL, PULL_REQUEST
    framework: "Framework",
    enable_auto_build: false,
    environment_variables: {
      "EnvKey" => "EnvValue",
    },
    basic_auth_credentials: "BasicAuthCredentials",
    enable_basic_auth: false,
    enable_performance_mode: false,
    build_spec: "BuildSpec",
    enable_pull_request_preview: false,
    pull_request_environment_name: "PullRequestEnvironmentName",
  },
})

Response structure


resp.app.app_id #=> String
resp.app.app_arn #=> String
resp.app.name #=> String
resp.app.tags #=> Hash
resp.app.tags["TagKey"] #=> String
resp.app.description #=> String
resp.app.repository #=> String
resp.app.platform #=> String, one of "WEB"
resp.app.create_time #=> Time
resp.app.update_time #=> Time
resp.app.iam_service_role_arn #=> String
resp.app.environment_variables #=> Hash
resp.app.environment_variables["EnvKey"] #=> String
resp.app.default_domain #=> String
resp.app.enable_branch_auto_build #=> true/false
resp.app.enable_branch_auto_deletion #=> true/false
resp.app.enable_basic_auth #=> true/false
resp.app.basic_auth_credentials #=> String
resp.app.custom_rules #=> Array
resp.app.custom_rules[0].source #=> String
resp.app.custom_rules[0].target #=> String
resp.app.custom_rules[0].status #=> String
resp.app.custom_rules[0].condition #=> String
resp.app.production_branch.last_deploy_time #=> Time
resp.app.production_branch.status #=> String
resp.app.production_branch.thumbnail_url #=> String
resp.app.production_branch.branch_name #=> String
resp.app.build_spec #=> String
resp.app.custom_headers #=> String
resp.app.enable_auto_branch_creation #=> true/false
resp.app.auto_branch_creation_patterns #=> Array
resp.app.auto_branch_creation_patterns[0] #=> String
resp.app.auto_branch_creation_config.stage #=> String, one of "PRODUCTION", "BETA", "DEVELOPMENT", "EXPERIMENTAL", "PULL_REQUEST"
resp.app.auto_branch_creation_config.framework #=> String
resp.app.auto_branch_creation_config.enable_auto_build #=> true/false
resp.app.auto_branch_creation_config.environment_variables #=> Hash
resp.app.auto_branch_creation_config.environment_variables["EnvKey"] #=> String
resp.app.auto_branch_creation_config.basic_auth_credentials #=> String
resp.app.auto_branch_creation_config.enable_basic_auth #=> true/false
resp.app.auto_branch_creation_config.enable_performance_mode #=> true/false
resp.app.auto_branch_creation_config.build_spec #=> String
resp.app.auto_branch_creation_config.enable_pull_request_preview #=> true/false
resp.app.auto_branch_creation_config.pull_request_environment_name #=> String

Options Hash (options):

  • :name (required, String)

    The name for an Amplify app.

  • :description (String)

    The description for an Amplify app.

  • :repository (String)

    The repository for an Amplify app.

  • :platform (String)

    The platform or framework for an Amplify app.

  • :iam_service_role_arn (String)

    The AWS Identity and Access Management (IAM) service role for an Amplify app.

  • :oauth_token (String)

    The 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. The OAuth token is not stored.

  • :access_token (String)

    The personal access token for a third-party source control system for an Amplify app. The personal access token is used to create a webhook and a read-only deploy key. The token is not stored.

  • :environment_variables (Hash<String,String>)

    The environment variables map for an Amplify app.

  • :enable_branch_auto_build (Boolean)

    Enables the auto building of branches for an Amplify app.

  • :enable_branch_auto_deletion (Boolean)

    Automatically disconnects a branch in the Amplify Console when you delete a branch from your Git repository.

  • :enable_basic_auth (Boolean)

    Enables basic authorization for an Amplify app. This will apply to all branches that are part of this app.

  • :basic_auth_credentials (String)

    The credentials for basic authorization for an Amplify app.

  • :custom_rules (Array<Types::CustomRule>)

    The custom rewrite and redirect rules for an Amplify app.

  • :tags (Hash<String,String>)

    The tag for an Amplify app.

  • :build_spec (String)

    The build specification (build spec) for an Amplify app.

  • :custom_headers (String)

    The custom HTTP headers for an Amplify app.

  • :enable_auto_branch_creation (Boolean)

    Enables automated branch creation for an Amplify app.

  • :auto_branch_creation_patterns (Array<String>)

    The automated branch creation glob patterns for an Amplify app.

  • :auto_branch_creation_config (Types::AutoBranchCreationConfig)

    The automated branch creation configuration for an Amplify app.

Returns:

See Also:

#create_backend_environment(options = {}) ⇒ Types::CreateBackendEnvironmentResult

Creates a new backend environment for an Amplify app.

Examples:

Request syntax with placeholder values


resp = client.create_backend_environment({
  app_id: "AppId", # required
  environment_name: "EnvironmentName", # required
  stack_name: "StackName",
  deployment_artifacts: "DeploymentArtifacts",
})

Response structure


resp.backend_environment.backend_environment_arn #=> String
resp.backend_environment.environment_name #=> String
resp.backend_environment.stack_name #=> String
resp.backend_environment.deployment_artifacts #=> String
resp.backend_environment.create_time #=> Time
resp.backend_environment.update_time #=> Time

Options Hash (options):

  • :app_id (required, String)

    The unique ID for an Amplify app.

  • :environment_name (required, String)

    The name for the backend environment.

  • :stack_name (String)

    The AWS CloudFormation stack name of a backend environment.

  • :deployment_artifacts (String)

    The name of deployment artifacts.

Returns:

See Also:

#create_branch(options = {}) ⇒ Types::CreateBranchResult

Creates a new branch for an Amplify app.

Examples:

Request syntax with placeholder values


resp = client.create_branch({
  app_id: "AppId", # required
  branch_name: "BranchName", # required
  description: "Description",
  stage: "PRODUCTION", # accepts PRODUCTION, BETA, DEVELOPMENT, EXPERIMENTAL, PULL_REQUEST
  framework: "Framework",
  enable_notification: false,
  enable_auto_build: false,
  environment_variables: {
    "EnvKey" => "EnvValue",
  },
  basic_auth_credentials: "BasicAuthCredentials",
  enable_basic_auth: false,
  enable_performance_mode: false,
  tags: {
    "TagKey" => "TagValue",
  },
  build_spec: "BuildSpec",
  ttl: "TTL",
  display_name: "DisplayName",
  enable_pull_request_preview: false,
  pull_request_environment_name: "PullRequestEnvironmentName",
  backend_environment_arn: "BackendEnvironmentArn",
})

Response structure


resp.branch.branch_arn #=> String
resp.branch.branch_name #=> String
resp.branch.description #=> String
resp.branch.tags #=> Hash
resp.branch.tags["TagKey"] #=> String
resp.branch.stage #=> String, one of "PRODUCTION", "BETA", "DEVELOPMENT", "EXPERIMENTAL", "PULL_REQUEST"
resp.branch.display_name #=> String
resp.branch.enable_notification #=> true/false
resp.branch.create_time #=> Time
resp.branch.update_time #=> Time
resp.branch.environment_variables #=> Hash
resp.branch.environment_variables["EnvKey"] #=> String
resp.branch.enable_auto_build #=> true/false
resp.branch.custom_domains #=> Array
resp.branch.custom_domains[0] #=> String
resp.branch.framework #=> String
resp.branch.active_job_id #=> String
resp.branch.total_number_of_jobs #=> String
resp.branch.enable_basic_auth #=> true/false
resp.branch.enable_performance_mode #=> true/false
resp.branch.thumbnail_url #=> String
resp.branch.basic_auth_credentials #=> String
resp.branch.build_spec #=> String
resp.branch.ttl #=> String
resp.branch.associated_resources #=> Array
resp.branch.associated_resources[0] #=> String
resp.branch.enable_pull_request_preview #=> true/false
resp.branch.pull_request_environment_name #=> String
resp.branch.destination_branch #=> String
resp.branch.source_branch #=> String
resp.branch.backend_environment_arn #=> String

Options Hash (options):

  • :app_id (required, String)

    The unique ID for an Amplify app.

  • :branch_name (required, String)

    The name for the branch.

  • :description (String)

    The description for the branch.

  • :stage (String)

    Describes the current stage for the branch.

  • :framework (String)

    The framework for the branch.

  • :enable_notification (Boolean)

    Enables notifications for the branch.

  • :enable_auto_build (Boolean)

    Enables auto building for the branch.

  • :environment_variables (Hash<String,String>)

    The environment variables for the branch.

  • :basic_auth_credentials (String)

    The basic authorization credentials for the branch.

  • :enable_basic_auth (Boolean)

    Enables basic authorization for the branch.

  • :enable_performance_mode (Boolean)

    Enables 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 (Hash<String,String>)

    The tag for the branch.

  • :build_spec (String)

    The build specification (build spec) for the branch.

  • :ttl (String)

    The content Time To Live (TTL) for the website in seconds.

  • :display_name (String)

    The display name for a branch. This is used as the default domain prefix.

  • :enable_pull_request_preview (Boolean)

    Enables pull request previews for this branch.

  • :pull_request_environment_name (String)

    The Amplify environment name for the pull request.

  • :backend_environment_arn (String)

    The Amazon Resource Name (ARN) for a backend environment that is part of an Amplify app.

Returns:

See Also:

#create_deployment(options = {}) ⇒ Types::CreateDeploymentResult

Creates a deployment for a manually deployed Amplify app. Manually deployed apps are not connected to a repository.

Examples:

Request syntax with placeholder values


resp = client.create_deployment({
  app_id: "AppId", # required
  branch_name: "BranchName", # required
  file_map: {
    "FileName" => "MD5Hash",
  },
})

Response structure


resp.job_id #=> String
resp.file_upload_urls #=> Hash
resp.file_upload_urls["FileName"] #=> String
resp.zip_upload_url #=> String

Options Hash (options):

  • :app_id (required, String)

    The unique ID for an Amplify app.

  • :branch_name (required, String)

    The name for the branch, for the job.

  • :file_map (Hash<String,String>)

    An 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.

Returns:

See Also:

#create_domain_association(options = {}) ⇒ Types::CreateDomainAssociationResult

Creates a new domain association for an Amplify app. This action associates a custom domain with the Amplify app

Examples:

Request syntax with placeholder values


resp = client.create_domain_association({
  app_id: "AppId", # required
  domain_name: "DomainName", # required
  enable_auto_sub_domain: false,
  sub_domain_settings: [ # required
    {
      prefix: "DomainPrefix", # required
      branch_name: "BranchName", # required
    },
  ],
  auto_sub_domain_creation_patterns: ["AutoSubDomainCreationPattern"],
  auto_sub_domain_iam_role: "AutoSubDomainIAMRole",
})

Response structure


resp.domain_association.domain_association_arn #=> String
resp.domain_association.domain_name #=> String
resp.domain_association.enable_auto_sub_domain #=> true/false
resp.domain_association.auto_sub_domain_creation_patterns #=> Array
resp.domain_association.auto_sub_domain_creation_patterns[0] #=> String
resp.domain_association.auto_sub_domain_iam_role #=> String
resp.domain_association.domain_status #=> String, one of "PENDING_VERIFICATION", "IN_PROGRESS", "AVAILABLE", "PENDING_DEPLOYMENT", "FAILED", "CREATING", "REQUESTING_CERTIFICATE", "UPDATING"
resp.domain_association.status_reason #=> String
resp.domain_association.certificate_verification_dns_record #=> String
resp.domain_association.sub_domains #=> Array
resp.domain_association.sub_domains[0].sub_domain_setting.prefix #=> String
resp.domain_association.sub_domains[0].sub_domain_setting.branch_name #=> String
resp.domain_association.sub_domains[0].verified #=> true/false
resp.domain_association.sub_domains[0].dns_record #=> String

Options Hash (options):

  • :app_id (required, String)

    The unique ID for an Amplify app.

  • :domain_name (required, String)

    The domain name for the domain association.

  • :enable_auto_sub_domain (Boolean)

    Enables the automated creation of subdomains for branches.

  • :sub_domain_settings (required, Array<Types::SubDomainSetting>)

    The setting for the subdomain.

  • :auto_sub_domain_creation_patterns (Array<String>)

    Sets the branch patterns for automatic subdomain creation.

  • :auto_sub_domain_iam_role (String)

    The required AWS Identity and Access Management (IAM) service role for the Amazon Resource Name (ARN) for automatically creating subdomains.

Returns:

See Also:

#create_webhook(options = {}) ⇒ Types::CreateWebhookResult

Creates a new webhook on an Amplify app.

Examples:

Request syntax with placeholder values


resp = client.create_webhook({
  app_id: "AppId", # required
  branch_name: "BranchName", # required
  description: "Description",
})

Response structure


resp.webhook.webhook_arn #=> String
resp.webhook.webhook_id #=> String
resp.webhook.webhook_url #=> String
resp.webhook.branch_name #=> String
resp.webhook.description #=> String
resp.webhook.create_time #=> Time
resp.webhook.update_time #=> Time

Options Hash (options):

  • :app_id (required, String)

    The unique ID for an Amplify app.

  • :branch_name (required, String)

    The name for a branch that is part of an Amplify app.

  • :description (String)

    The description for a webhook.

Returns:

See Also:

#delete_app(options = {}) ⇒ Types::DeleteAppResult

Deletes an existing Amplify app specified by an app ID.

Examples:

Request syntax with placeholder values


resp = client.delete_app({
  app_id: "AppId", # required
})

Response structure


resp.app.app_id #=> String
resp.app.app_arn #=> String
resp.app.name #=> String
resp.app.tags #=> Hash
resp.app.tags["TagKey"] #=> String
resp.app.description #=> String
resp.app.repository #=> String
resp.app.platform #=> String, one of "WEB"
resp.app.create_time #=> Time
resp.app.update_time #=> Time
resp.app.iam_service_role_arn #=> String
resp.app.environment_variables #=> Hash
resp.app.environment_variables["EnvKey"] #=> String
resp.app.default_domain #=> String
resp.app.enable_branch_auto_build #=> true/false
resp.app.enable_branch_auto_deletion #=> true/false
resp.app.enable_basic_auth #=> true/false
resp.app.basic_auth_credentials #=> String
resp.app.custom_rules #=> Array
resp.app.custom_rules[0].source #=> String
resp.app.custom_rules[0].target #=> String
resp.app.custom_rules[0].status #=> String
resp.app.custom_rules[0].condition #=> String
resp.app.production_branch.last_deploy_time #=> Time
resp.app.production_branch.status #=> String
resp.app.production_branch.thumbnail_url #=> String
resp.app.production_branch.branch_name #=> String
resp.app.build_spec #=> String
resp.app.custom_headers #=> String
resp.app.enable_auto_branch_creation #=> true/false
resp.app.auto_branch_creation_patterns #=> Array
resp.app.auto_branch_creation_patterns[0] #=> String
resp.app.auto_branch_creation_config.stage #=> String, one of "PRODUCTION", "BETA", "DEVELOPMENT", "EXPERIMENTAL", "PULL_REQUEST"
resp.app.auto_branch_creation_config.framework #=> String
resp.app.auto_branch_creation_config.enable_auto_build #=> true/false
resp.app.auto_branch_creation_config.environment_variables #=> Hash
resp.app.auto_branch_creation_config.environment_variables["EnvKey"] #=> String
resp.app.auto_branch_creation_config.basic_auth_credentials #=> String
resp.app.auto_branch_creation_config.enable_basic_auth #=> true/false
resp.app.auto_branch_creation_config.enable_performance_mode #=> true/false
resp.app.auto_branch_creation_config.build_spec #=> String
resp.app.auto_branch_creation_config.enable_pull_request_preview #=> true/false
resp.app.auto_branch_creation_config.pull_request_environment_name #=> String

Options Hash (options):

  • :app_id (required, String)

    The unique ID for an Amplify app.

Returns:

See Also:

#delete_backend_environment(options = {}) ⇒ Types::DeleteBackendEnvironmentResult

Deletes a backend environment for an Amplify app.

Examples:

Request syntax with placeholder values


resp = client.delete_backend_environment({
  app_id: "AppId", # required
  environment_name: "EnvironmentName", # required
})

Response structure


resp.backend_environment.backend_environment_arn #=> String
resp.backend_environment.environment_name #=> String
resp.backend_environment.stack_name #=> String
resp.backend_environment.deployment_artifacts #=> String
resp.backend_environment.create_time #=> Time
resp.backend_environment.update_time #=> Time

Options Hash (options):

  • :app_id (required, String)

    The unique ID of an Amplify app.

  • :environment_name (required, String)

    The name of a backend environment of an Amplify app.

Returns:

See Also:

#delete_branch(options = {}) ⇒ Types::DeleteBranchResult

Deletes a branch for an Amplify app.

Examples:

Request syntax with placeholder values


resp = client.delete_branch({
  app_id: "AppId", # required
  branch_name: "BranchName", # required
})

Response structure


resp.branch.branch_arn #=> String
resp.branch.branch_name #=> String
resp.branch.description #=> String
resp.branch.tags #=> Hash
resp.branch.tags["TagKey"] #=> String
resp.branch.stage #=> String, one of "PRODUCTION", "BETA", "DEVELOPMENT", "EXPERIMENTAL", "PULL_REQUEST"
resp.branch.display_name #=> String
resp.branch.enable_notification #=> true/false
resp.branch.create_time #=> Time
resp.branch.update_time #=> Time
resp.branch.environment_variables #=> Hash
resp.branch.environment_variables["EnvKey"] #=> String
resp.branch.enable_auto_build #=> true/false
resp.branch.custom_domains #=> Array
resp.branch.custom_domains[0] #=> String
resp.branch.framework #=> String
resp.branch.active_job_id #=> String
resp.branch.total_number_of_jobs #=> String
resp.branch.enable_basic_auth #=> true/false
resp.branch.enable_performance_mode #=> true/false
resp.branch.thumbnail_url #=> String
resp.branch.basic_auth_credentials #=> String
resp.branch.build_spec #=> String
resp.branch.ttl #=> String
resp.branch.associated_resources #=> Array
resp.branch.associated_resources[0] #=> String
resp.branch.enable_pull_request_preview #=> true/false
resp.branch.pull_request_environment_name #=> String
resp.branch.destination_branch #=> String
resp.branch.source_branch #=> String
resp.branch.backend_environment_arn #=> String

Options Hash (options):

  • :app_id (required, String)

    The unique ID for an Amplify app.

  • :branch_name (required, String)

    The name for the branch.

Returns:

See Also:

#delete_domain_association(options = {}) ⇒ Types::DeleteDomainAssociationResult

Deletes a domain association for an Amplify app.

Examples:

Request syntax with placeholder values


resp = client.delete_domain_association({
  app_id: "AppId", # required
  domain_name: "DomainName", # required
})

Response structure


resp.domain_association.domain_association_arn #=> String
resp.domain_association.domain_name #=> String
resp.domain_association.enable_auto_sub_domain #=> true/false
resp.domain_association.auto_sub_domain_creation_patterns #=> Array
resp.domain_association.auto_sub_domain_creation_patterns[0] #=> String
resp.domain_association.auto_sub_domain_iam_role #=> String
resp.domain_association.domain_status #=> String, one of "PENDING_VERIFICATION", "IN_PROGRESS", "AVAILABLE", "PENDING_DEPLOYMENT", "FAILED", "CREATING", "REQUESTING_CERTIFICATE", "UPDATING"
resp.domain_association.status_reason #=> String
resp.domain_association.certificate_verification_dns_record #=> String
resp.domain_association.sub_domains #=> Array
resp.domain_association.sub_domains[0].sub_domain_setting.prefix #=> String
resp.domain_association.sub_domains[0].sub_domain_setting.branch_name #=> String
resp.domain_association.sub_domains[0].verified #=> true/false
resp.domain_association.sub_domains[0].dns_record #=> String

Options Hash (options):

  • :app_id (required, String)

    The unique id for an Amplify app.

  • :domain_name (required, String)

    The name of the domain.

Returns:

See Also:

#delete_job(options = {}) ⇒ Types::DeleteJobResult

Deletes a job for a branch of an Amplify app.

Examples:

Request syntax with placeholder values


resp = client.delete_job({
  app_id: "AppId", # required
  branch_name: "BranchName", # required
  job_id: "JobId", # required
})

Response structure


resp.job_summary.job_arn #=> String
resp.job_summary.job_id #=> String
resp.job_summary.commit_id #=> String
resp.job_summary.commit_message #=> String
resp.job_summary.commit_time #=> Time
resp.job_summary.start_time #=> Time
resp.job_summary.status #=> String, one of "PENDING", "PROVISIONING", "RUNNING", "FAILED", "SUCCEED", "CANCELLING", "CANCELLED"
resp.job_summary.end_time #=> Time
resp.job_summary.job_type #=> String, one of "RELEASE", "RETRY", "MANUAL", "WEB_HOOK"

Options Hash (options):

  • :app_id (required, String)

    The unique ID for an Amplify app.

  • :branch_name (required, String)

    The name for the branch, for the job.

  • :job_id (required, String)

    The unique ID for the job.

Returns:

See Also:

#delete_webhook(options = {}) ⇒ Types::DeleteWebhookResult

Deletes a webhook.

Examples:

Request syntax with placeholder values


resp = client.delete_webhook({
  webhook_id: "WebhookId", # required
})

Response structure


resp.webhook.webhook_arn #=> String
resp.webhook.webhook_id #=> String
resp.webhook.webhook_url #=> String
resp.webhook.branch_name #=> String
resp.webhook.description #=> String
resp.webhook.create_time #=> Time
resp.webhook.update_time #=> Time

Options Hash (options):

  • :webhook_id (required, String)

    The unique ID for a webhook.

Returns:

See Also:

#generate_access_logs(options = {}) ⇒ Types::GenerateAccessLogsResult

Returns the website access logs for a specific time range using a presigned URL.

Examples:

Request syntax with placeholder values


resp = client.generate_access_logs({
  start_time: Time.now,
  end_time: Time.now,
  domain_name: "DomainName", # required
  app_id: "AppId", # required
})

Response structure


resp.log_url #=> String

Options Hash (options):

  • :start_time (Time)

    The time at which the logs should start. The time range specified is inclusive of the start time.

  • :end_time (Time)

    The time at which the logs should end. The time range specified is inclusive of the end time.

  • :domain_name (required, String)

    The name of the domain.

  • :app_id (required, String)

    The unique ID for an Amplify app.

Returns:

See Also:

#get_app(options = {}) ⇒ Types::GetAppResult

Returns an existing Amplify app by appID.

Examples:

Request syntax with placeholder values


resp = client.get_app({
  app_id: "AppId", # required
})

Response structure


resp.app.app_id #=> String
resp.app.app_arn #=> String
resp.app.name #=> String
resp.app.tags #=> Hash
resp.app.tags["TagKey"] #=> String
resp.app.description #=> String
resp.app.repository #=> String
resp.app.platform #=> String, one of "WEB"
resp.app.create_time #=> Time
resp.app.update_time #=> Time
resp.app.iam_service_role_arn #=> String
resp.app.environment_variables #=> Hash
resp.app.environment_variables["EnvKey"] #=> String
resp.app.default_domain #=> String
resp.app.enable_branch_auto_build #=> true/false
resp.app.enable_branch_auto_deletion #=> true/false
resp.app.enable_basic_auth #=> true/false
resp.app.basic_auth_credentials #=> String
resp.app.custom_rules #=> Array
resp.app.custom_rules[0].source #=> String
resp.app.custom_rules[0].target #=> String
resp.app.custom_rules[0].status #=> String
resp.app.custom_rules[0].condition #=> String
resp.app.production_branch.last_deploy_time #=> Time
resp.app.production_branch.status #=> String
resp.app.production_branch.thumbnail_url #=> String
resp.app.production_branch.branch_name #=> String
resp.app.build_spec #=> String
resp.app.custom_headers #=> String
resp.app.enable_auto_branch_creation #=> true/false
resp.app.auto_branch_creation_patterns #=> Array
resp.app.auto_branch_creation_patterns[0] #=> String
resp.app.auto_branch_creation_config.stage #=> String, one of "PRODUCTION", "BETA", "DEVELOPMENT", "EXPERIMENTAL", "PULL_REQUEST"
resp.app.auto_branch_creation_config.framework #=> String
resp.app.auto_branch_creation_config.enable_auto_build #=> true/false
resp.app.auto_branch_creation_config.environment_variables #=> Hash
resp.app.auto_branch_creation_config.environment_variables["EnvKey"] #=> String
resp.app.auto_branch_creation_config.basic_auth_credentials #=> String
resp.app.auto_branch_creation_config.enable_basic_auth #=> true/false
resp.app.auto_branch_creation_config.enable_performance_mode #=> true/false
resp.app.auto_branch_creation_config.build_spec #=> String
resp.app.auto_branch_creation_config.enable_pull_request_preview #=> true/false
resp.app.auto_branch_creation_config.pull_request_environment_name #=> String

Options Hash (options):

  • :app_id (required, String)

    The unique ID for an Amplify app.

Returns:

See Also:

#get_artifact_url(options = {}) ⇒ Types::GetArtifactUrlResult

Returns the artifact info that corresponds to an artifact id.

Examples:

Request syntax with placeholder values


resp = client.get_artifact_url({
  artifact_id: "ArtifactId", # required
})

Response structure


resp.artifact_id #=> String
resp.artifact_url #=> String

Options Hash (options):

  • :artifact_id (required, String)

    The unique ID for an artifact.

Returns:

See Also:

#get_backend_environment(options = {}) ⇒ Types::GetBackendEnvironmentResult

Returns a backend environment for an Amplify app.

Examples:

Request syntax with placeholder values


resp = client.get_backend_environment({
  app_id: "AppId", # required
  environment_name: "EnvironmentName", # required
})

Response structure


resp.backend_environment.backend_environment_arn #=> String
resp.backend_environment.environment_name #=> String
resp.backend_environment.stack_name #=> String
resp.backend_environment.deployment_artifacts #=> String
resp.backend_environment.create_time #=> Time
resp.backend_environment.update_time #=> Time

Options Hash (options):

  • :app_id (required, String)

    The unique id for an Amplify app.

  • :environment_name (required, String)

    The name for the backend environment.

Returns:

See Also:

#get_branch(options = {}) ⇒ Types::GetBranchResult

Returns a branch for an Amplify app.

Examples:

Request syntax with placeholder values


resp = client.get_branch({
  app_id: "AppId", # required
  branch_name: "BranchName", # required
})

Response structure


resp.branch.branch_arn #=> String
resp.branch.branch_name #=> String
resp.branch.description #=> String
resp.branch.tags #=> Hash
resp.branch.tags["TagKey"] #=> String
resp.branch.stage #=> String, one of "PRODUCTION", "BETA", "DEVELOPMENT", "EXPERIMENTAL", "PULL_REQUEST"
resp.branch.display_name #=> String
resp.branch.enable_notification #=> true/false
resp.branch.create_time #=> Time
resp.branch.update_time #=> Time
resp.branch.environment_variables #=> Hash
resp.branch.environment_variables["EnvKey"] #=> String
resp.branch.enable_auto_build #=> true/false
resp.branch.custom_domains #=> Array
resp.branch.custom_domains[0] #=> String
resp.branch.framework #=> String
resp.branch.active_job_id #=> String
resp.branch.total_number_of_jobs #=> String
resp.branch.enable_basic_auth #=> true/false
resp.branch.enable_performance_mode #=> true/false
resp.branch.thumbnail_url #=> String
resp.branch.basic_auth_credentials #=> String
resp.branch.build_spec #=> String
resp.branch.ttl #=> String
resp.branch.associated_resources #=> Array
resp.branch.associated_resources[0] #=> String
resp.branch.enable_pull_request_preview #=> true/false
resp.branch.pull_request_environment_name #=> String
resp.branch.destination_branch #=> String
resp.branch.source_branch #=> String
resp.branch.backend_environment_arn #=> String

Options Hash (options):

  • :app_id (required, String)

    The unique ID for an Amplify app.

  • :branch_name (required, String)

    The name for the branch.

Returns:

See Also:

#get_domain_association(options = {}) ⇒ Types::GetDomainAssociationResult

Returns the domain information for an Amplify app.

Examples:

Request syntax with placeholder values


resp = client.get_domain_association({
  app_id: "AppId", # required
  domain_name: "DomainName", # required
})

Response structure


resp.domain_association.domain_association_arn #=> String
resp.domain_association.domain_name #=> String
resp.domain_association.enable_auto_sub_domain #=> true/false
resp.domain_association.auto_sub_domain_creation_patterns #=> Array
resp.domain_association.auto_sub_domain_creation_patterns[0] #=> String
resp.domain_association.auto_sub_domain_iam_role #=> String
resp.domain_association.domain_status #=> String, one of "PENDING_VERIFICATION", "IN_PROGRESS", "AVAILABLE", "PENDING_DEPLOYMENT", "FAILED", "CREATING", "REQUESTING_CERTIFICATE", "UPDATING"
resp.domain_association.status_reason #=> String
resp.domain_association.certificate_verification_dns_record #=> String
resp.domain_association.sub_domains #=> Array
resp.domain_association.sub_domains[0].sub_domain_setting.prefix #=> String
resp.domain_association.sub_domains[0].sub_domain_setting.branch_name #=> String
resp.domain_association.sub_domains[0].verified #=> true/false
resp.domain_association.sub_domains[0].dns_record #=> String

Options Hash (options):

  • :app_id (required, String)

    The unique id for an Amplify app.

  • :domain_name (required, String)

    The name of the domain.

Returns:

See Also:

#get_job(options = {}) ⇒ Types::GetJobResult

Returns a job for a branch of an Amplify app.

Examples:

Request syntax with placeholder values


resp = client.get_job({
  app_id: "AppId", # required
  branch_name: "BranchName", # required
  job_id: "JobId", # required
})

Response structure


resp.job.summary.job_arn #=> String
resp.job.summary.job_id #=> String
resp.job.summary.commit_id #=> String
resp.job.summary.commit_message #=> String
resp.job.summary.commit_time #=> Time
resp.job.summary.start_time #=> Time
resp.job.summary.status #=> String, one of "PENDING", "PROVISIONING", "RUNNING", "FAILED", "SUCCEED", "CANCELLING", "CANCELLED"
resp.job.summary.end_time #=> Time
resp.job.summary.job_type #=> String, one of "RELEASE", "RETRY", "MANUAL", "WEB_HOOK"
resp.job.steps #=> Array
resp.job.steps[0].step_name #=> String
resp.job.steps[0].start_time #=> Time
resp.job.steps[0].status #=> String, one of "PENDING", "PROVISIONING", "RUNNING", "FAILED", "SUCCEED", "CANCELLING", "CANCELLED"
resp.job.steps[0].end_time #=> Time
resp.job.steps[0].log_url #=> String
resp.job.steps[0].artifacts_url #=> String
resp.job.steps[0].test_artifacts_url #=> String
resp.job.steps[0].test_config_url #=> String
resp.job.steps[0].screenshots #=> Hash
resp.job.steps[0].screenshots["ThumbnailName"] #=> String
resp.job.steps[0].status_reason #=> String
resp.job.steps[0].context #=> String

Options Hash (options):

  • :app_id (required, String)

    The unique ID for an Amplify app.

  • :branch_name (required, String)

    The branch name for the job.

  • :job_id (required, String)

    The unique ID for the job.

Returns:

See Also:

#get_webhook(options = {}) ⇒ Types::GetWebhookResult

Returns the webhook information that corresponds to a specified webhook ID.

Examples:

Request syntax with placeholder values


resp = client.get_webhook({
  webhook_id: "WebhookId", # required
})

Response structure


resp.webhook.webhook_arn #=> String
resp.webhook.webhook_id #=> String
resp.webhook.webhook_url #=> String
resp.webhook.branch_name #=> String
resp.webhook.description #=> String
resp.webhook.create_time #=> Time
resp.webhook.update_time #=> Time

Options Hash (options):

  • :webhook_id (required, String)

    The unique ID for a webhook.

Returns:

See Also:

#list_apps(options = {}) ⇒ Types::ListAppsResult

Returns a list of the existing Amplify apps.

Examples:

Request syntax with placeholder values


resp = client.list_apps({
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.apps #=> Array
resp.apps[0].app_id #=> String
resp.apps[0].app_arn #=> String
resp.apps[0].name #=> String
resp.apps[0].tags #=> Hash
resp.apps[0].tags["TagKey"] #=> String
resp.apps[0].description #=> String
resp.apps[0].repository #=> String
resp.apps[0].platform #=> String, one of "WEB"
resp.apps[0].create_time #=> Time
resp.apps[0].update_time #=> Time
resp.apps[0].iam_service_role_arn #=> String
resp.apps[0].environment_variables #=> Hash
resp.apps[0].environment_variables["EnvKey"] #=> String
resp.apps[0].default_domain #=> String
resp.apps[0].enable_branch_auto_build #=> true/false
resp.apps[0].enable_branch_auto_deletion #=> true/false
resp.apps[0].enable_basic_auth #=> true/false
resp.apps[0].basic_auth_credentials #=> String
resp.apps[0].custom_rules #=> Array
resp.apps[0].custom_rules[0].source #=> String
resp.apps[0].custom_rules[0].target #=> String
resp.apps[0].custom_rules[0].status #=> String
resp.apps[0].custom_rules[0].condition #=> String
resp.apps[0].production_branch.last_deploy_time #=> Time
resp.apps[0].production_branch.status #=> String
resp.apps[0].production_branch.thumbnail_url #=> String
resp.apps[0].production_branch.branch_name #=> String
resp.apps[0].build_spec #=> String
resp.apps[0].custom_headers #=> String
resp.apps[0].enable_auto_branch_creation #=> true/false
resp.apps[0].auto_branch_creation_patterns #=> Array
resp.apps[0].auto_branch_creation_patterns[0] #=> String
resp.apps[0].auto_branch_creation_config.stage #=> String, one of "PRODUCTION", "BETA", "DEVELOPMENT", "EXPERIMENTAL", "PULL_REQUEST"
resp.apps[0].auto_branch_creation_config.framework #=> String
resp.apps[0].auto_branch_creation_config.enable_auto_build #=> true/false
resp.apps[0].auto_branch_creation_config.environment_variables #=> Hash
resp.apps[0].auto_branch_creation_config.environment_variables["EnvKey"] #=> String
resp.apps[0].auto_branch_creation_config.basic_auth_credentials #=> String
resp.apps[0].auto_branch_creation_config.enable_basic_auth #=> true/false
resp.apps[0].auto_branch_creation_config.enable_performance_mode #=> true/false
resp.apps[0].auto_branch_creation_config.build_spec #=> String
resp.apps[0].auto_branch_creation_config.enable_pull_request_preview #=> true/false
resp.apps[0].auto_branch_creation_config.pull_request_environment_name #=> String
resp.next_token #=> String

Options Hash (options):

  • :next_token (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.

  • :max_results (Integer)

    The maximum number of records to list in a single response.

Returns:

See Also:

#list_artifacts(options = {}) ⇒ Types::ListArtifactsResult

Returns a list of artifacts for a specified app, branch, and job.

Examples:

Request syntax with placeholder values


resp = client.list_artifacts({
  app_id: "AppId", # required
  branch_name: "BranchName", # required
  job_id: "JobId", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.artifacts #=> Array
resp.artifacts[0].artifact_file_name #=> String
resp.artifacts[0].artifact_id #=> String
resp.next_token #=> String

Options Hash (options):

  • :app_id (required, String)

    The unique ID for an Amplify app.

  • :branch_name (required, String)

    The name of a branch that is part of an Amplify app.

  • :job_id (required, String)

    The unique ID for a job.

  • :next_token (String)

    A 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 (Integer)

    The maximum number of records to list in a single response.

Returns:

See Also:

#list_backend_environments(options = {}) ⇒ Types::ListBackendEnvironmentsResult

Lists the backend environments for an Amplify app.

Examples:

Request syntax with placeholder values


resp = client.list_backend_environments({
  app_id: "AppId", # required
  environment_name: "EnvironmentName",
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.backend_environments #=> Array
resp.backend_environments[0].backend_environment_arn #=> String
resp.backend_environments[0].environment_name #=> String
resp.backend_environments[0].stack_name #=> String
resp.backend_environments[0].deployment_artifacts #=> String
resp.backend_environments[0].create_time #=> Time
resp.backend_environments[0].update_time #=> Time
resp.next_token #=> String

Options Hash (options):

  • :app_id (required, String)

    The unique ID for an Amplify app.

  • :environment_name (String)

    The name of the backend environment

  • :next_token (String)

    A 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 (Integer)

    The maximum number of records to list in a single response.

Returns:

See Also:

#list_branches(options = {}) ⇒ Types::ListBranchesResult

Lists the branches of an Amplify app.

Examples:

Request syntax with placeholder values


resp = client.list_branches({
  app_id: "AppId", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.branches #=> Array
resp.branches[0].branch_arn #=> String
resp.branches[0].branch_name #=> String
resp.branches[0].description #=> String
resp.branches[0].tags #=> Hash
resp.branches[0].tags["TagKey"] #=> String
resp.branches[0].stage #=> String, one of "PRODUCTION", "BETA", "DEVELOPMENT", "EXPERIMENTAL", "PULL_REQUEST"
resp.branches[0].display_name #=> String
resp.branches[0].enable_notification #=> true/false
resp.branches[0].create_time #=> Time
resp.branches[0].update_time #=> Time
resp.branches[0].environment_variables #=> Hash
resp.branches[0].environment_variables["EnvKey"] #=> String
resp.branches[0].enable_auto_build #=> true/false
resp.branches[0].custom_domains #=> Array
resp.branches[0].custom_domains[0] #=> String
resp.branches[0].framework #=> String
resp.branches[0].active_job_id #=> String
resp.branches[0].total_number_of_jobs #=> String
resp.branches[0].enable_basic_auth #=> true/false
resp.branches[0].enable_performance_mode #=> true/false
resp.branches[0].thumbnail_url #=> String
resp.branches[0].basic_auth_credentials #=> String
resp.branches[0].build_spec #=> String
resp.branches[0].ttl #=> String
resp.branches[0].associated_resources #=> Array
resp.branches[0].associated_resources[0] #=> String
resp.branches[0].enable_pull_request_preview #=> true/false
resp.branches[0].pull_request_environment_name #=> String
resp.branches[0].destination_branch #=> String
resp.branches[0].source_branch #=> String
resp.branches[0].backend_environment_arn #=> String
resp.next_token #=> String

Options Hash (options):

  • :app_id (required, String)

    The unique ID for an Amplify app.

  • :next_token (String)

    A 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 (Integer)

    The maximum number of records to list in a single response.

Returns:

See Also:

#list_domain_associations(options = {}) ⇒ Types::ListDomainAssociationsResult

Returns the domain associations for an Amplify app.

Examples:

Request syntax with placeholder values


resp = client.list_domain_associations({
  app_id: "AppId", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.domain_associations #=> Array
resp.domain_associations[0].domain_association_arn #=> String
resp.domain_associations[0].domain_name #=> String
resp.domain_associations[0].enable_auto_sub_domain #=> true/false
resp.domain_associations[0].auto_sub_domain_creation_patterns #=> Array
resp.domain_associations[0].auto_sub_domain_creation_patterns[0] #=> String
resp.domain_associations[0].auto_sub_domain_iam_role #=> String
resp.domain_associations[0].domain_status #=> String, one of "PENDING_VERIFICATION", "IN_PROGRESS", "AVAILABLE", "PENDING_DEPLOYMENT", "FAILED", "CREATING", "REQUESTING_CERTIFICATE", "UPDATING"
resp.domain_associations[0].status_reason #=> String
resp.domain_associations[0].certificate_verification_dns_record #=> String
resp.domain_associations[0].sub_domains #=> Array
resp.domain_associations[0].sub_domains[0].sub_domain_setting.prefix #=> String
resp.domain_associations[0].sub_domains[0].sub_domain_setting.branch_name #=> String
resp.domain_associations[0].sub_domains[0].verified #=> true/false
resp.domain_associations[0].sub_domains[0].dns_record #=> String
resp.next_token #=> String

Options Hash (options):

  • :app_id (required, String)

    The unique ID for an Amplify app.

  • :next_token (String)

    A 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 (Integer)

    The maximum number of records to list in a single response.

Returns:

See Also:

#list_jobs(options = {}) ⇒ Types::ListJobsResult

Lists the jobs for a branch of an Amplify app.

Examples:

Request syntax with placeholder values


resp = client.list_jobs({
  app_id: "AppId", # required
  branch_name: "BranchName", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.job_summaries #=> Array
resp.job_summaries[0].job_arn #=> String
resp.job_summaries[0].job_id #=> String
resp.job_summaries[0].commit_id #=> String
resp.job_summaries[0].commit_message #=> String
resp.job_summaries[0].commit_time #=> Time
resp.job_summaries[0].start_time #=> Time
resp.job_summaries[0].status #=> String, one of "PENDING", "PROVISIONING", "RUNNING", "FAILED", "SUCCEED", "CANCELLING", "CANCELLED"
resp.job_summaries[0].end_time #=> Time
resp.job_summaries[0].job_type #=> String, one of "RELEASE", "RETRY", "MANUAL", "WEB_HOOK"
resp.next_token #=> String

Options Hash (options):

  • :app_id (required, String)

    The unique ID for an Amplify app.

  • :branch_name (required, String)

    The name for a branch.

  • :next_token (String)

    A 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 (Integer)

    The maximum number of records to list in a single response.

Returns:

See Also:

#list_tags_for_resource(options = {}) ⇒ Types::ListTagsForResourceResponse

Returns a list of tags for a specified Amazon Resource Name (ARN).

Examples:

Request syntax with placeholder values


resp = client.list_tags_for_resource({
  resource_arn: "ResourceArn", # required
})

Response structure


resp.tags #=> Hash
resp.tags["TagKey"] #=> String

Options Hash (options):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) to use to list tags.

Returns:

See Also:

#list_webhooks(options = {}) ⇒ Types::ListWebhooksResult

Returns a list of webhooks for an Amplify app.

Examples:

Request syntax with placeholder values


resp = client.list_webhooks({
  app_id: "AppId", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.webhooks #=> Array
resp.webhooks[0].webhook_arn #=> String
resp.webhooks[0].webhook_id #=> String
resp.webhooks[0].webhook_url #=> String
resp.webhooks[0].branch_name #=> String
resp.webhooks[0].description #=> String
resp.webhooks[0].create_time #=> Time
resp.webhooks[0].update_time #=> Time
resp.next_token #=> String

Options Hash (options):

  • :app_id (required, String)

    The unique ID for an Amplify app.

  • :next_token (String)

    A 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 (Integer)

    The maximum number of records to list in a single response.

Returns:

See Also:

#start_deployment(options = {}) ⇒ Types::StartDeploymentResult

Starts a deployment for a manually deployed app. Manually deployed apps are not connected to a repository.

Examples:

Request syntax with placeholder values


resp = client.start_deployment({
  app_id: "AppId", # required
  branch_name: "BranchName", # required
  job_id: "JobId",
  source_url: "SourceUrl",
})

Response structure


resp.job_summary.job_arn #=> String
resp.job_summary.job_id #=> String
resp.job_summary.commit_id #=> String
resp.job_summary.commit_message #=> String
resp.job_summary.commit_time #=> Time
resp.job_summary.start_time #=> Time
resp.job_summary.status #=> String, one of "PENDING", "PROVISIONING", "RUNNING", "FAILED", "SUCCEED", "CANCELLING", "CANCELLED"
resp.job_summary.end_time #=> Time
resp.job_summary.job_type #=> String, one of "RELEASE", "RETRY", "MANUAL", "WEB_HOOK"

Options Hash (options):

  • :app_id (required, String)

    The unique ID for an Amplify app.

  • :branch_name (required, String)

    The name for the branch, for the job.

  • :job_id (String)

    The job ID for this deployment, generated by the create deployment request.

  • :source_url (String)

    The 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.

Returns:

See Also:

#start_job(options = {}) ⇒ Types::StartJobResult

Starts a new job for a branch of an Amplify app.

Examples:

Request syntax with placeholder values


resp = client.start_job({
  app_id: "AppId", # required
  branch_name: "BranchName", # required
  job_id: "JobId",
  job_type: "RELEASE", # required, accepts RELEASE, RETRY, MANUAL, WEB_HOOK
  job_reason: "JobReason",
  commit_id: "CommitId",
  commit_message: "CommitMessage",
  commit_time: Time.now,
})

Response structure


resp.job_summary.job_arn #=> String
resp.job_summary.job_id #=> String
resp.job_summary.commit_id #=> String
resp.job_summary.commit_message #=> String
resp.job_summary.commit_time #=> Time
resp.job_summary.start_time #=> Time
resp.job_summary.status #=> String, one of "PENDING", "PROVISIONING", "RUNNING", "FAILED", "SUCCEED", "CANCELLING", "CANCELLED"
resp.job_summary.end_time #=> Time
resp.job_summary.job_type #=> String, one of "RELEASE", "RETRY", "MANUAL", "WEB_HOOK"

Options Hash (options):

  • :app_id (required, String)

    The unique ID for an Amplify app.

  • :branch_name (required, String)

    The branch name for the job.

  • :job_id (String)

    The unique ID for an existing job. This is required if the value of jobType is RETRY.

  • :job_type (required, String)

    Describes the type for the job. The job type RELEASE starts 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 RETRY retries an existing job. If the job type value is RETRY, the jobId is also required.

  • :job_reason (String)

    A descriptive reason for starting this job.

  • :commit_id (String)

    The commit ID from a third-party repository provider for the job.

  • :commit_message (String)

    The commit message from a third-party repository provider for the job.

  • :commit_time (Time)

    The commit date and time for the job.

Returns:

See Also:

#stop_job(options = {}) ⇒ Types::StopJobResult

Stops a job that is in progress for a branch of an Amplify app.

Examples:

Request syntax with placeholder values


resp = client.stop_job({
  app_id: "AppId", # required
  branch_name: "BranchName", # required
  job_id: "JobId", # required
})

Response structure


resp.job_summary.job_arn #=> String
resp.job_summary.job_id #=> String
resp.job_summary.commit_id #=> String
resp.job_summary.commit_message #=> String
resp.job_summary.commit_time #=> Time
resp.job_summary.start_time #=> Time
resp.job_summary.status #=> String, one of "PENDING", "PROVISIONING", "RUNNING", "FAILED", "SUCCEED", "CANCELLING", "CANCELLED"
resp.job_summary.end_time #=> Time
resp.job_summary.job_type #=> String, one of "RELEASE", "RETRY", "MANUAL", "WEB_HOOK"

Options Hash (options):

  • :app_id (required, String)

    The unique ID for an Amplify app.

  • :branch_name (required, String)

    The name for the branch, for the job.

  • :job_id (required, String)

    The unique id for the job.

Returns:

See Also:

#tag_resource(options = {}) ⇒ Struct

Tags the resource with a tag key and value.

Examples:

Request syntax with placeholder values


resp = client.tag_resource({
  resource_arn: "ResourceArn", # required
  tags: { # required
    "TagKey" => "TagValue",
  },
})

Options Hash (options):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) to use to tag a resource.

  • :tags (required, Hash<String,String>)

    The tags used to tag the resource.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#untag_resource(options = {}) ⇒ Struct

Untags a resource with a specified Amazon Resource Name (ARN).

Examples:

Request syntax with placeholder values


resp = client.untag_resource({
  resource_arn: "ResourceArn", # required
  tag_keys: ["TagKey"], # required
})

Options Hash (options):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) to use to untag a resource.

  • :tag_keys (required, Array<String>)

    The tag keys to use to untag a resource.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_app(options = {}) ⇒ Types::UpdateAppResult

Updates an existing Amplify app.

Examples:

Request syntax with placeholder values


resp = client.update_app({
  app_id: "AppId", # required
  name: "Name",
  description: "Description",
  platform: "WEB", # accepts WEB
  iam_service_role_arn: "ServiceRoleArn",
  environment_variables: {
    "EnvKey" => "EnvValue",
  },
  enable_branch_auto_build: false,
  enable_branch_auto_deletion: false,
  enable_basic_auth: false,
  basic_auth_credentials: "BasicAuthCredentials",
  custom_rules: [
    {
      source: "Source", # required
      target: "Target", # required
      status: "Status",
      condition: "Condition",
    },
  ],
  build_spec: "BuildSpec",
  custom_headers: "CustomHeaders",
  enable_auto_branch_creation: false,
  auto_branch_creation_patterns: ["AutoBranchCreationPattern"],
  auto_branch_creation_config: {
    stage: "PRODUCTION", # accepts PRODUCTION, BETA, DEVELOPMENT, EXPERIMENTAL, PULL_REQUEST
    framework: "Framework",
    enable_auto_build: false,
    environment_variables: {
      "EnvKey" => "EnvValue",
    },
    basic_auth_credentials: "BasicAuthCredentials",
    enable_basic_auth: false,
    enable_performance_mode: false,
    build_spec: "BuildSpec",
    enable_pull_request_preview: false,
    pull_request_environment_name: "PullRequestEnvironmentName",
  },
  repository: "Repository",
  oauth_token: "OauthToken",
  access_token: "AccessToken",
})

Response structure


resp.app.app_id #=> String
resp.app.app_arn #=> String
resp.app.name #=> String
resp.app.tags #=> Hash
resp.app.tags["TagKey"] #=> String
resp.app.description #=> String
resp.app.repository #=> String
resp.app.platform #=> String, one of "WEB"
resp.app.create_time #=> Time
resp.app.update_time #=> Time
resp.app.iam_service_role_arn #=> String
resp.app.environment_variables #=> Hash
resp.app.environment_variables["EnvKey"] #=> String
resp.app.default_domain #=> String
resp.app.enable_branch_auto_build #=> true/false
resp.app.enable_branch_auto_deletion #=> true/false
resp.app.enable_basic_auth #=> true/false
resp.app.basic_auth_credentials #=> String
resp.app.custom_rules #=> Array
resp.app.custom_rules[0].source #=> String
resp.app.custom_rules[0].target #=> String
resp.app.custom_rules[0].status #=> String
resp.app.custom_rules[0].condition #=> String
resp.app.production_branch.last_deploy_time #=> Time
resp.app.production_branch.status #=> String
resp.app.production_branch.thumbnail_url #=> String
resp.app.production_branch.branch_name #=> String
resp.app.build_spec #=> String
resp.app.custom_headers #=> String
resp.app.enable_auto_branch_creation #=> true/false
resp.app.auto_branch_creation_patterns #=> Array
resp.app.auto_branch_creation_patterns[0] #=> String
resp.app.auto_branch_creation_config.stage #=> String, one of "PRODUCTION", "BETA", "DEVELOPMENT", "EXPERIMENTAL", "PULL_REQUEST"
resp.app.auto_branch_creation_config.framework #=> String
resp.app.auto_branch_creation_config.enable_auto_build #=> true/false
resp.app.auto_branch_creation_config.environment_variables #=> Hash
resp.app.auto_branch_creation_config.environment_variables["EnvKey"] #=> String
resp.app.auto_branch_creation_config.basic_auth_credentials #=> String
resp.app.auto_branch_creation_config.enable_basic_auth #=> true/false
resp.app.auto_branch_creation_config.enable_performance_mode #=> true/false
resp.app.auto_branch_creation_config.build_spec #=> String
resp.app.auto_branch_creation_config.enable_pull_request_preview #=> true/false
resp.app.auto_branch_creation_config.pull_request_environment_name #=> String

Options Hash (options):

  • :app_id (required, String)

    The unique ID for an Amplify app.

  • :name (String)

    The name for an Amplify app.

  • :description (String)

    The description for an Amplify app.

  • :platform (String)

    The platform for an Amplify app.

  • :iam_service_role_arn (String)

    The AWS Identity and Access Management (IAM) service role for an Amplify app.

  • :environment_variables (Hash<String,String>)

    The environment variables for an Amplify app.

  • :enable_branch_auto_build (Boolean)

    Enables branch auto-building for an Amplify app.

  • :enable_branch_auto_deletion (Boolean)

    Automatically disconnects a branch in the Amplify Console when you delete a branch from your Git repository.

  • :enable_basic_auth (Boolean)

    Enables basic authorization for an Amplify app.

  • :basic_auth_credentials (String)

    The basic authorization credentials for an Amplify app.

  • :custom_rules (Array<Types::CustomRule>)

    The custom redirect and rewrite rules for an Amplify app.

  • :build_spec (String)

    The build specification (build spec) for an Amplify app.

  • :custom_headers (String)

    The custom HTTP headers for an Amplify app.

  • :enable_auto_branch_creation (Boolean)

    Enables automated branch creation for an Amplify app.

  • :auto_branch_creation_patterns (Array<String>)

    Describes the automated branch creation glob patterns for an Amplify app.

  • :auto_branch_creation_config (Types::AutoBranchCreationConfig)

    The automated branch creation configuration for an Amplify app.

  • :repository (String)

    The name of the repository for an Amplify app

  • :oauth_token (String)

    The OAuth token for a third-party source control system for an Amplify app. The token is used to create a webhook and a read-only deploy key. The OAuth token is not stored.

  • :access_token (String)

    The personal access token for a third-party source control system for an Amplify app. The token is used to create webhook and a read-only deploy key. The token is not stored.

Returns:

See Also:

#update_branch(options = {}) ⇒ Types::UpdateBranchResult

Updates a branch for an Amplify app.

Examples:

Request syntax with placeholder values


resp = client.update_branch({
  app_id: "AppId", # required
  branch_name: "BranchName", # required
  description: "Description",
  framework: "Framework",
  stage: "PRODUCTION", # accepts PRODUCTION, BETA, DEVELOPMENT, EXPERIMENTAL, PULL_REQUEST
  enable_notification: false,
  enable_auto_build: false,
  environment_variables: {
    "EnvKey" => "EnvValue",
  },
  basic_auth_credentials: "BasicAuthCredentials",
  enable_basic_auth: false,
  enable_performance_mode: false,
  build_spec: "BuildSpec",
  ttl: "TTL",
  display_name: "DisplayName",
  enable_pull_request_preview: false,
  pull_request_environment_name: "PullRequestEnvironmentName",
  backend_environment_arn: "BackendEnvironmentArn",
})

Response structure


resp.branch.branch_arn #=> String
resp.branch.branch_name #=> String
resp.branch.description #=> String
resp.branch.tags #=> Hash
resp.branch.tags["TagKey"] #=> String
resp.branch.stage #=> String, one of "PRODUCTION", "BETA", "DEVELOPMENT", "EXPERIMENTAL", "PULL_REQUEST"
resp.branch.display_name #=> String
resp.branch.enable_notification #=> true/false
resp.branch.create_time #=> Time
resp.branch.update_time #=> Time
resp.branch.environment_variables #=> Hash
resp.branch.environment_variables["EnvKey"] #=> String
resp.branch.enable_auto_build #=> true/false
resp.branch.custom_domains #=> Array
resp.branch.custom_domains[0] #=> String
resp.branch.framework #=> String
resp.branch.active_job_id #=> String
resp.branch.total_number_of_jobs #=> String
resp.branch.enable_basic_auth #=> true/false
resp.branch.enable_performance_mode #=> true/false
resp.branch.thumbnail_url #=> String
resp.branch.basic_auth_credentials #=> String
resp.branch.build_spec #=> String
resp.branch.ttl #=> String
resp.branch.associated_resources #=> Array
resp.branch.associated_resources[0] #=> String
resp.branch.enable_pull_request_preview #=> true/false
resp.branch.pull_request_environment_name #=> String
resp.branch.destination_branch #=> String
resp.branch.source_branch #=> String
resp.branch.backend_environment_arn #=> String

Options Hash (options):

  • :app_id (required, String)

    The unique ID for an Amplify app.

  • :branch_name (required, String)

    The name for the branch.

  • :description (String)

    The description for the branch.

  • :framework (String)

    The framework for the branch.

  • :stage (String)

    Describes the current stage for the branch.

  • :enable_notification (Boolean)

    Enables notifications for the branch.

  • :enable_auto_build (Boolean)

    Enables auto building for the branch.

  • :environment_variables (Hash<String,String>)

    The environment variables for the branch.

  • :basic_auth_credentials (String)

    The basic authorization credentials for the branch.

  • :enable_basic_auth (Boolean)

    Enables basic authorization for the branch.

  • :enable_performance_mode (Boolean)

    Enables 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 (String)

    The build specification (build spec) for the branch.

  • :ttl (String)

    The content Time to Live (TTL) for the website in seconds.

  • :display_name (String)

    The display name for a branch. This is used as the default domain prefix.

  • :enable_pull_request_preview (Boolean)

    Enables pull request previews for this branch.

  • :pull_request_environment_name (String)

    The Amplify environment name for the pull request.

  • :backend_environment_arn (String)

    The Amazon Resource Name (ARN) for a backend environment that is part of an Amplify app.

Returns:

See Also:

#update_domain_association(options = {}) ⇒ Types::UpdateDomainAssociationResult

Creates a new domain association for an Amplify app.

Examples:

Request syntax with placeholder values


resp = client.update_domain_association({
  app_id: "AppId", # required
  domain_name: "DomainName", # required
  enable_auto_sub_domain: false,
  sub_domain_settings: [ # required
    {
      prefix: "DomainPrefix", # required
      branch_name: "BranchName", # required
    },
  ],
  auto_sub_domain_creation_patterns: ["AutoSubDomainCreationPattern"],
  auto_sub_domain_iam_role: "AutoSubDomainIAMRole",
})

Response structure


resp.domain_association.domain_association_arn #=> String
resp.domain_association.domain_name #=> String
resp.domain_association.enable_auto_sub_domain #=> true/false
resp.domain_association.auto_sub_domain_creation_patterns #=> Array
resp.domain_association.auto_sub_domain_creation_patterns[0] #=> String
resp.domain_association.auto_sub_domain_iam_role #=> String
resp.domain_association.domain_status #=> String, one of "PENDING_VERIFICATION", "IN_PROGRESS", "AVAILABLE", "PENDING_DEPLOYMENT", "FAILED", "CREATING", "REQUESTING_CERTIFICATE", "UPDATING"
resp.domain_association.status_reason #=> String
resp.domain_association.certificate_verification_dns_record #=> String
resp.domain_association.sub_domains #=> Array
resp.domain_association.sub_domains[0].sub_domain_setting.prefix #=> String
resp.domain_association.sub_domains[0].sub_domain_setting.branch_name #=> String
resp.domain_association.sub_domains[0].verified #=> true/false
resp.domain_association.sub_domains[0].dns_record #=> String

Options Hash (options):

  • :app_id (required, String)

    The unique ID for an Amplify app.

  • :domain_name (required, String)

    The name of the domain.

  • :enable_auto_sub_domain (Boolean)

    Enables the automated creation of subdomains for branches.

  • :sub_domain_settings (required, Array<Types::SubDomainSetting>)

    Describes the settings for the subdomain.

  • :auto_sub_domain_creation_patterns (Array<String>)

    Sets the branch patterns for automatic subdomain creation.

  • :auto_sub_domain_iam_role (String)

    The required AWS Identity and Access Management (IAM) service role for the Amazon Resource Name (ARN) for automatically creating subdomains.

Returns:

See Also:

#update_webhook(options = {}) ⇒ Types::UpdateWebhookResult

Updates a webhook.

Examples:

Request syntax with placeholder values


resp = client.update_webhook({
  webhook_id: "WebhookId", # required
  branch_name: "BranchName",
  description: "Description",
})

Response structure


resp.webhook.webhook_arn #=> String
resp.webhook.webhook_id #=> String
resp.webhook.webhook_url #=> String
resp.webhook.branch_name #=> String
resp.webhook.description #=> String
resp.webhook.create_time #=> Time
resp.webhook.update_time #=> Time

Options Hash (options):

  • :webhook_id (required, String)

    The unique ID for a webhook.

  • :branch_name (String)

    The name for a branch that is part of an Amplify app.

  • :description (String)

    The description for a webhook.

Returns:

See Also:

#wait_until(waiter_name, params = {}) {|waiter| ... } ⇒ Boolean

Waiters polls an API operation until a resource enters a desired state.

Basic Usage

Waiters will poll until they are succesful, they fail by entering a terminal state, or until a maximum number of attempts are made.

# polls in a loop, sleeping between attempts client.waiter_until(waiter_name, params)

Configuration

You can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. You configure waiters by passing a block to #wait_until:

# poll for ~25 seconds
client.wait_until(...) do |w|
  w.max_attempts = 5
  w.delay = 5
end

Callbacks

You can be notified before each polling attempt and before each delay. If you throw :success or :failure from these callbacks, it will terminate the waiter.

started_at = Time.now
client.wait_until(...) do |w|

  # disable max attempts
  w.max_attempts = nil

  # poll for 1 hour, instead of a number of attempts
  w.before_wait do |attempts, response|
    throw :failure if Time.now - started_at > 3600
  end

end

Handling Errors

When a waiter is successful, it returns true. When a waiter fails, it raises an error. All errors raised extend from Waiters::Errors::WaiterFailed.

begin
  client.wait_until(...)
rescue Aws::Waiters::Errors::WaiterFailed
  # resource did not enter the desired state in time
end

Parameters:

  • waiter_name (Symbol)

    The name of the waiter. See #waiter_names for a full list of supported waiters.

  • params (Hash) (defaults to: {})

    Additional request parameters. See the #waiter_names for a list of supported waiters and what request they call. The called request determines the list of accepted parameters.

Yield Parameters:

Returns:

  • (Boolean)

    Returns true if the waiter was successful.

Raises:

  • (Errors::FailureStateError)

    Raised when the waiter terminates because the waiter has entered a state that it will not transition out of, preventing success.

  • (Errors::TooManyAttemptsError)

    Raised when the configured maximum number of attempts have been made, and the waiter is not yet successful.

  • (Errors::UnexpectedError)

    Raised when an error is encounted while polling for a resource that is not expected.

  • (Errors::NoSuchWaiterError)

    Raised when you request to wait for an unknown state.

#waiter_namesArray<Symbol>

Returns the list of supported waiters. The following table lists the supported waiters and the client method they call:

Waiter NameClient MethodDefault Delay:Default Max Attempts:

Returns:

  • (Array<Symbol>)

    the list of supported waiters.