We announced the upcoming end-of-support for AWS SDK for JavaScript v2.
We recommend that you migrate to AWS SDK for JavaScript v3. For dates, additional details, and information on how to migrate, please refer to the linked announcement.

Class: AWS.Amplify

Inherits:
AWS.Service show all
Identifier:
amplify
API Version:
2017-07-25
Defined in:
(unknown)

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Service Description

Amplify enables developers to develop and deploy cloud-powered mobile and web apps. Amplify Hosting provides a continuous delivery and hosting service for web applications. For more information, see the Amplify Hosting User Guide. The Amplify Framework is a comprehensive set of SDKs, libraries, tools, and documentation for client app development. For more information, see the Amplify Framework.

Sending a Request Using Amplify

var amplify = new AWS.Amplify();
amplify.createApp(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the Amplify object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var amplify = new AWS.Amplify({apiVersion: '2017-07-25'});

You can also set the API version globally in AWS.config.apiVersions using the amplify service identifier:

AWS.config.apiVersions = {
  amplify: '2017-07-25',
  // other service API versions
};

var amplify = new AWS.Amplify();

Version:

  • 2017-07-25

Constructor Summary collapse

Property Summary collapse

Properties inherited from AWS.Service

apiVersions

Method Summary collapse

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService

Constructor Details

new AWS.Amplify(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Examples:

Constructing a Amplify object

var amplify = new AWS.Amplify({apiVersion: '2017-07-25'});

Options Hash (options):

  • params (map)

    An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.

  • endpoint (String|AWS.Endpoint)

    The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like 'https://{service}.{region}.amazonaws.com' or an Endpoint object.

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

    the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.

  • credentialProvider (AWS.CredentialProviderChain)

    the provider chain used to resolve credentials if no static credentials property is set.

  • region (String)

    the region to send service requests to. See AWS.Amplify.region for more information.

  • maxRetries (Integer)

    the maximum amount of retries to attempt with a request. See AWS.Amplify.maxRetries for more information.

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.Amplify.maxRedirects for more information.

  • sslEnabled (Boolean)

    whether to enable SSL for requests.

  • paramValidation (Boolean|map)

    whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:

    • min [Boolean] — Validates that a value meets the min constraint. This is enabled by default when paramValidation is set to true.
    • max [Boolean] — Validates that a value meets the max constraint.
    • pattern [Boolean] — Validates that a string value matches a regular expression.
    • enum [Boolean] — Validates that a string value matches one of the allowable enum values.
  • computeChecksums (Boolean)

    whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)

  • convertResponseTypes (Boolean)

    whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to true.

  • correctClockSkew (Boolean)

    whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to false.

  • s3ForcePathStyle (Boolean)

    whether to force path style URLs for S3 objects.

  • s3BucketEndpoint (Boolean)

    whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an endpoint to be provided explicitly to the service constructor.

  • s3DisableBodySigning (Boolean)

    whether S3 body signing should be disabled when using signature version v4. Body signing can only be disabled when using https. Defaults to true.

  • s3UsEast1RegionalEndpoint ('legacy'|'regional')

    when region is set to 'us-east-1', whether to send s3 request to global endpoints or 'us-east-1' regional endpoints. This config is only applicable to S3 client. Defaults to legacy

  • s3UseArnRegion (Boolean)

    whether to override the request region with the region inferred from requested resource's ARN. Only available for S3 buckets Defaults to true

  • retryDelayOptions (map)

    A set of options to configure the retry delay on retryable errors. Currently supported options are:

    • base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
    • customBackoff [function] — A custom function that accepts a retry count and error and returns the amount of time to delay in milliseconds. If the result is a non-zero negative value, no further retry attempts will be made. The base option will be ignored if this option is supplied. The function is only called for retryable errors.
  • httpOptions (map)

    A set of options to pass to the low-level HTTP request. Currently supported options are:

    • proxy [String] — the URL to proxy requests through
    • agent [http.Agent, https.Agent] — the Agent object to perform HTTP requests with. Used for connection pooling. Defaults to the global agent (http.globalAgent) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment.
    • connectTimeout [Integer] — Sets the socket to timeout after failing to establish a connection with the server after connectTimeout milliseconds. This timeout has no effect once a socket connection has been established.
    • timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
    • xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
    • xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
  • apiVersion (String, Date)

    a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by apiVersions). Specify 'latest' to use the latest possible version.

  • apiVersions (map<String, String|Date>)

    a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.

  • logger (#write, #log)

    an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests

  • systemClockOffset (Number)

    an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global AWS.config object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds.

  • signatureVersion (String)

    the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.

  • signatureCache (Boolean)

    whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to true.

  • dynamoDbCrc32 (Boolean)

    whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default: true.

  • useAccelerateEndpoint (Boolean)

    Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default: false.

  • clientSideMonitoring (Boolean)

    whether to collect and publish this client's performance metrics of all its API requests.

  • endpointDiscoveryEnabled (Boolean|undefined)

    whether to call operations with endpoints given by service dynamically. Setting this

  • endpointCacheSize (Number)

    the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000

  • hostPrefixEnabled (Boolean)

    whether to marshal request parameters to the prefix of hostname. Defaults to true.

  • stsRegionalEndpoints ('legacy'|'regional')

    whether to send sts request to global endpoints or regional endpoints. Defaults to 'legacy'.

  • useFipsEndpoint (Boolean)

    Enables FIPS compatible endpoints. Defaults to false.

  • useDualstackEndpoint (Boolean)

    Enables IPv6 dualstack endpoint. Defaults to false.

Property Details

endpointAWS.Endpoint (readwrite)

Returns an Endpoint object representing the endpoint URL for service requests.

Returns:

  • (AWS.Endpoint)

    an Endpoint object representing the endpoint URL for service requests.

Method Details

createApp(params = {}, callback) ⇒ AWS.Request

Creates a new Amplify app.

Service Reference:

Examples:

Calling the createApp operation

var params = {
  name: 'STRING_VALUE', /* required */
  accessToken: 'STRING_VALUE',
  autoBranchCreationConfig: {
    basicAuthCredentials: 'STRING_VALUE',
    buildSpec: 'STRING_VALUE',
    enableAutoBuild: true || false,
    enableBasicAuth: true || false,
    enablePerformanceMode: true || false,
    enablePullRequestPreview: true || false,
    environmentVariables: {
      '<EnvKey>': 'STRING_VALUE',
      /* '<EnvKey>': ... */
    },
    framework: 'STRING_VALUE',
    pullRequestEnvironmentName: 'STRING_VALUE',
    stage: PRODUCTION | BETA | DEVELOPMENT | EXPERIMENTAL | PULL_REQUEST
  },
  autoBranchCreationPatterns: [
    'STRING_VALUE',
    /* more items */
  ],
  basicAuthCredentials: 'STRING_VALUE',
  buildSpec: 'STRING_VALUE',
  cacheConfig: {
    type: AMPLIFY_MANAGED | AMPLIFY_MANAGED_NO_COOKIES /* required */
  },
  customHeaders: 'STRING_VALUE',
  customRules: [
    {
      source: 'STRING_VALUE', /* required */
      target: 'STRING_VALUE', /* required */
      condition: 'STRING_VALUE',
      status: 'STRING_VALUE'
    },
    /* more items */
  ],
  description: 'STRING_VALUE',
  enableAutoBranchCreation: true || false,
  enableBasicAuth: true || false,
  enableBranchAutoBuild: true || false,
  enableBranchAutoDeletion: true || false,
  environmentVariables: {
    '<EnvKey>': 'STRING_VALUE',
    /* '<EnvKey>': ... */
  },
  iamServiceRoleArn: 'STRING_VALUE',
  oauthToken: 'STRING_VALUE',
  platform: WEB | WEB_DYNAMIC | WEB_COMPUTE,
  repository: 'STRING_VALUE',
  tags: {
    '<TagKey>': 'STRING_VALUE',
    /* '<TagKey>': ... */
  }
};
amplify.createApp(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • name — (String)

      The name of the Amplify app.

    • description — (String)

      The description of the Amplify app.

    • repository — (String)

      The Git repository for the Amplify app.

    • platform — (String)

      The 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 to WEB_COMPUTE. For an app requiring Amplify Hosting's original SSR support only, set the platform type to WEB_DYNAMIC.

      Possible values include:
      • "WEB"
      • "WEB_DYNAMIC"
      • "WEB_COMPUTE"
    • iamServiceRoleArn — (String)

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

    • oauthToken — (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 using SSH cloning. The OAuth token is not stored.

      Use oauthToken for 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 oauthToken or accessToken when 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 .

    • accessToken — (String)

      The 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 accessToken for GitHub repositories only. To authorize access to a repository provider such as Bitbucket or CodeCommit, use oauthToken.

      You must specify either accessToken or oauthToken when 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 .

    • environmentVariables — (map<String>)

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

    • enableBranchAutoBuild — (Boolean)

      Enables the auto building of branches for an Amplify app.

    • enableBranchAutoDeletion — (Boolean)

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

    • enableBasicAuth — (Boolean)

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

    • basicAuthCredentials — (String)

      The credentials for basic authorization for an Amplify app. You must base64-encode the authorization credentials and provide them in the format user:password.

    • customRules — (Array<map>)

      The custom rewrite and redirect rules for an Amplify app.

      • sourcerequired — (String)

        The source pattern for a URL rewrite or redirect rule.

      • targetrequired — (String)

        The target pattern for a URL rewrite or redirect rule.

      • status — (String)

        The status code for a URL rewrite or redirect rule.

        200

        Represents a 200 rewrite rule.

        301

        Represents a 301 (moved permanently) redirect rule. This and all future requests should be directed to the target URL.

        302

        Represents a 302 temporary redirect rule.

        404

        Represents a 404 redirect rule.

        404-200

        Represents a 404 rewrite rule.

      • condition — (String)

        The condition for a URL rewrite or redirect rule, such as a country code.

    • tags — (map<String>)

      The tag for an Amplify app.

    • buildSpec — (String)

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

    • customHeaders — (String)

      The custom HTTP headers for an Amplify app.

    • enableAutoBranchCreation — (Boolean)

      Enables automated branch creation for an Amplify app.

    • autoBranchCreationPatterns — (Array<String>)

      The automated branch creation glob patterns for an Amplify app.

    • autoBranchCreationConfig — (map)

      The automated branch creation configuration for an Amplify app.

      • stage — (String)

        Describes the current stage for the autocreated branch.

        Possible values include:
        • "PRODUCTION"
        • "BETA"
        • "DEVELOPMENT"
        • "EXPERIMENTAL"
        • "PULL_REQUEST"
      • framework — (String)

        The framework for the autocreated branch.

      • enableAutoBuild — (Boolean)

        Enables auto building for the autocreated branch.

      • environmentVariables — (map<String>)

        The environment variables for the autocreated branch.

      • basicAuthCredentials — (String)

        The basic authorization credentials for the autocreated branch. You must base64-encode the authorization credentials and provide them in the format user:password.

      • enableBasicAuth — (Boolean)

        Enables basic authorization for the autocreated branch.

      • enablePerformanceMode — (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.

      • buildSpec — (String)

        The build specification (build spec) for the autocreated branch.

      • enablePullRequestPreview — (Boolean)

        Enables pull request previews for the autocreated branch.

      • pullRequestEnvironmentName — (String)

        The Amplify environment name for the pull request.

    • cacheConfig — (map)

      The cache configuration for the Amplify app.

      • typerequired — (String)

        The type of cache configuration to use for an Amplify app.

        The AMPLIFY_MANAGED cache configuration automatically applies an optimized cache configuration for your app based on its platform, routing rules, and rewrite rules. This is the default setting.

        The AMPLIFY_MANAGED_NO_COOKIES cache configuration type is the same as AMPLIFY_MANAGED, except that it excludes all cookies from the cache key.

        Possible values include:
        • "AMPLIFY_MANAGED"
        • "AMPLIFY_MANAGED_NO_COOKIES"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • app — (map)

        Represents the different branches of a repository for building, deploying, and hosting an Amplify app.

        • appIdrequired — (String)

          The unique ID of the Amplify app.

        • appArnrequired — (String)

          The Amazon Resource Name (ARN) of the Amplify app.

        • namerequired — (String)

          The name for the Amplify app.

        • tags — (map<String>)

          The tag for the Amplify app.

        • descriptionrequired — (String)

          The description for the Amplify app.

        • repositoryrequired — (String)

          The Git repository for the Amplify app.

        • platformrequired — (String)

          The 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 to WEB_COMPUTE. For an app requiring Amplify Hosting's original SSR support only, set the platform type to WEB_DYNAMIC.

          Possible values include:
          • "WEB"
          • "WEB_DYNAMIC"
          • "WEB_COMPUTE"
        • createTimerequired — (Date)

          Creates a date and time for the Amplify app.

        • updateTimerequired — (Date)

          Updates the date and time for the Amplify app.

        • iamServiceRoleArn — (String)

          The AWS Identity and Access Management (IAM) service role for the Amazon Resource Name (ARN) of the Amplify app.

        • environmentVariablesrequired — (map<String>)

          The environment variables for the 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.

        • defaultDomainrequired — (String)

          The default domain for the Amplify app.

        • enableBranchAutoBuildrequired — (Boolean)

          Enables the auto-building of branches for the Amplify app.

        • enableBranchAutoDeletion — (Boolean)

          Automatically disconnect a branch in the Amplify console when you delete a branch from your Git repository.

        • enableBasicAuthrequired — (Boolean)

          Enables basic authorization for the Amplify app's branches.

        • basicAuthCredentials — (String)

          The basic authorization credentials for branches for the Amplify app. You must base64-encode the authorization credentials and provide them in the format user:password.

        • customRules — (Array<map>)

          Describes the custom redirect and rewrite rules for the Amplify app.

          • sourcerequired — (String)

            The source pattern for a URL rewrite or redirect rule.

          • targetrequired — (String)

            The target pattern for a URL rewrite or redirect rule.

          • status — (String)

            The status code for a URL rewrite or redirect rule.

            200

            Represents a 200 rewrite rule.

            301

            Represents a 301 (moved permanently) redirect rule. This and all future requests should be directed to the target URL.

            302

            Represents a 302 temporary redirect rule.

            404

            Represents a 404 redirect rule.

            404-200

            Represents a 404 rewrite rule.

          • condition — (String)

            The condition for a URL rewrite or redirect rule, such as a country code.

        • productionBranch — (map)

          Describes the information about a production branch of the Amplify app.

          • lastDeployTime — (Date)

            The last deploy time of the production branch.

          • status — (String)

            The status of the production branch.

          • thumbnailUrl — (String)

            The thumbnail URL for the production branch.

          • branchName — (String)

            The branch name for the production branch.

        • buildSpec — (String)

          Describes the content of the build specification (build spec) for the Amplify app.

        • customHeaders — (String)

          Describes the custom HTTP headers for the Amplify app.

        • enableAutoBranchCreation — (Boolean)

          Enables automated branch creation for the Amplify app.

        • autoBranchCreationPatterns — (Array<String>)

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

        • autoBranchCreationConfig — (map)

          Describes the automated branch creation configuration for the Amplify app.

          • stage — (String)

            Describes the current stage for the autocreated branch.

            Possible values include:
            • "PRODUCTION"
            • "BETA"
            • "DEVELOPMENT"
            • "EXPERIMENTAL"
            • "PULL_REQUEST"
          • framework — (String)

            The framework for the autocreated branch.

          • enableAutoBuild — (Boolean)

            Enables auto building for the autocreated branch.

          • environmentVariables — (map<String>)

            The environment variables for the autocreated branch.

          • basicAuthCredentials — (String)

            The basic authorization credentials for the autocreated branch. You must base64-encode the authorization credentials and provide them in the format user:password.

          • enableBasicAuth — (Boolean)

            Enables basic authorization for the autocreated branch.

          • enablePerformanceMode — (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.

          • buildSpec — (String)

            The build specification (build spec) for the autocreated branch.

          • enablePullRequestPreview — (Boolean)

            Enables pull request previews for the autocreated branch.

          • pullRequestEnvironmentName — (String)

            The Amplify environment name for the pull request.

        • repositoryCloneMethod — (String)
          Note: This is for internal use.

          The Amplify service uses this parameter to specify the authentication protocol to use to access the Git repository for an Amplify app. Amplify specifies TOKEN for a GitHub repository, SIGV4 for an Amazon Web Services CodeCommit repository, and SSH for GitLab and Bitbucket repositories.

          Possible values include:
          • "SSH"
          • "TOKEN"
          • "SIGV4"
        • cacheConfig — (map)

          The cache configuration for the Amplify app. If you don't specify the cache configuration type, Amplify uses the default AMPLIFY_MANAGED setting.

          • typerequired — (String)

            The type of cache configuration to use for an Amplify app.

            The AMPLIFY_MANAGED cache configuration automatically applies an optimized cache configuration for your app based on its platform, routing rules, and rewrite rules. This is the default setting.

            The AMPLIFY_MANAGED_NO_COOKIES cache configuration type is the same as AMPLIFY_MANAGED, except that it excludes all cookies from the cache key.

            Possible values include:
            • "AMPLIFY_MANAGED"
            • "AMPLIFY_MANAGED_NO_COOKIES"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createBackendEnvironment(params = {}, callback) ⇒ AWS.Request

Creates a new backend environment for an Amplify app.

This API is available only to Amplify Gen 1 applications where the backend is created using Amplify Studio or the Amplify command line interface (CLI). This API isnā€™t available to Amplify Gen 2 applications. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code.

Service Reference:

Examples:

Calling the createBackendEnvironment operation

var params = {
  appId: 'STRING_VALUE', /* required */
  environmentName: 'STRING_VALUE', /* required */
  deploymentArtifacts: 'STRING_VALUE',
  stackName: 'STRING_VALUE'
};
amplify.createBackendEnvironment(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • appId — (String)

      The unique ID for an Amplify app.

    • environmentName — (String)

      The name for the backend environment.

    • stackName — (String)

      The AWS CloudFormation stack name of a backend environment.

    • deploymentArtifacts — (String)

      The name of deployment artifacts.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • backendEnvironment — (map)

        Describes the backend environment for an Amplify app.

        • backendEnvironmentArnrequired — (String)

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

        • environmentNamerequired — (String)

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

        • stackName — (String)

          The AWS CloudFormation stack name of a backend environment.

        • deploymentArtifacts — (String)

          The name of deployment artifacts.

        • createTimerequired — (Date)

          The creation date and time for a backend environment that is part of an Amplify app.

        • updateTimerequired — (Date)

          The last updated date and time for a backend environment that is part of an Amplify app.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createBranch(params = {}, callback) ⇒ AWS.Request

Creates a new branch for an Amplify app.

Service Reference:

Examples:

Calling the createBranch operation

var params = {
  appId: 'STRING_VALUE', /* required */
  branchName: 'STRING_VALUE', /* required */
  backend: {
    stackArn: 'STRING_VALUE'
  },
  backendEnvironmentArn: 'STRING_VALUE',
  basicAuthCredentials: 'STRING_VALUE',
  buildSpec: 'STRING_VALUE',
  description: 'STRING_VALUE',
  displayName: 'STRING_VALUE',
  enableAutoBuild: true || false,
  enableBasicAuth: true || false,
  enableNotification: true || false,
  enablePerformanceMode: true || false,
  enablePullRequestPreview: true || false,
  environmentVariables: {
    '<EnvKey>': 'STRING_VALUE',
    /* '<EnvKey>': ... */
  },
  framework: 'STRING_VALUE',
  pullRequestEnvironmentName: 'STRING_VALUE',
  stage: PRODUCTION | BETA | DEVELOPMENT | EXPERIMENTAL | PULL_REQUEST,
  tags: {
    '<TagKey>': 'STRING_VALUE',
    /* '<TagKey>': ... */
  },
  ttl: 'STRING_VALUE'
};
amplify.createBranch(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • appId — (String)

      The unique ID for an Amplify app.

    • branchName — (String)

      The name for the branch.

    • description — (String)

      The description for the branch.

    • stage — (String)

      Describes the current stage for the branch.

      Possible values include:
      • "PRODUCTION"
      • "BETA"
      • "DEVELOPMENT"
      • "EXPERIMENTAL"
      • "PULL_REQUEST"
    • framework — (String)

      The framework for the branch.

    • enableNotification — (Boolean)

      Enables notifications for the branch.

    • enableAutoBuild — (Boolean)

      Enables auto building for the branch.

    • environmentVariables — (map<String>)

      The environment variables for the branch.

    • basicAuthCredentials — (String)

      The basic authorization credentials for the branch. You must base64-encode the authorization credentials and provide them in the format user:password.

    • enableBasicAuth — (Boolean)

      Enables basic authorization for the branch.

    • enablePerformanceMode — (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 — (map<String>)

      The tag for the branch.

    • buildSpec — (String)

      The build specification (build spec) for the branch.

    • ttl — (String)

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

    • displayName — (String)

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

    • enablePullRequestPreview — (Boolean)

      Enables pull request previews for this branch.

    • pullRequestEnvironmentName — (String)

      The Amplify environment name for the pull request.

    • backendEnvironmentArn — (String)

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

      This field is available to Amplify Gen 1 apps only where the backend is created using Amplify Studio or the Amplify command line interface (CLI).

    • backend — (map)

      The backend for a Branch of an Amplify app. Use for a backend created from an CloudFormation stack.

      This field is available to Amplify Gen 2 apps only. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code.

      • stackArn — (String)

        The Amazon Resource Name (ARN) for the CloudFormation stack.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • branch — (map)

        Describes the branch for an Amplify app, which maps to a third-party repository branch.

        • branchArnrequired — (String)

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

        • branchNamerequired — (String)

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

        • descriptionrequired — (String)

          The description for the branch that is part of an Amplify app.

        • tags — (map<String>)

          The tag for the branch of an Amplify app.

        • stagerequired — (String)

          The current stage for the branch that is part of an Amplify app.

          Possible values include:
          • "PRODUCTION"
          • "BETA"
          • "DEVELOPMENT"
          • "EXPERIMENTAL"
          • "PULL_REQUEST"
        • displayNamerequired — (String)

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

        • enableNotificationrequired — (Boolean)

          Enables notifications for a branch that is part of an Amplify app.

        • createTimerequired — (Date)

          The creation date and time for a branch that is part of an Amplify app.

        • updateTimerequired — (Date)

          The last updated date and time for a branch that is part of an Amplify app.

        • environmentVariablesrequired — (map<String>)

          The environment variables specific to a branch of an Amplify app.

        • enableAutoBuildrequired — (Boolean)

          Enables auto-building on push for a branch of an Amplify app.

        • customDomainsrequired — (Array<String>)

          The custom domains for a branch of an Amplify app.

        • frameworkrequired — (String)

          The framework for a branch of an Amplify app.

        • activeJobIdrequired — (String)

          The ID of the active job for a branch of an Amplify app.

        • totalNumberOfJobsrequired — (String)

          The total number of jobs that are part of an Amplify app.

        • enableBasicAuthrequired — (Boolean)

          Enables basic authorization for a branch of an Amplify app.

        • enablePerformanceMode — (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.

        • thumbnailUrl — (String)

          The thumbnail URL for the branch of an Amplify app.

        • basicAuthCredentials — (String)

          The basic authorization credentials for a branch of an Amplify app. You must base64-encode the authorization credentials and provide them in the format user:password.

        • buildSpec — (String)

          The build specification (build spec) content for the branch of an Amplify app.

        • ttlrequired — (String)

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

        • associatedResources — (Array<String>)

          A list of custom resources that are linked to this branch.

        • enablePullRequestPreviewrequired — (Boolean)

          Enables pull request previews for the branch.

        • pullRequestEnvironmentName — (String)

          The Amplify environment name for the pull request.

        • destinationBranch — (String)

          The destination branch if the branch is a pull request branch.

        • sourceBranch — (String)

          The source branch if the branch is a pull request branch.

        • backendEnvironmentArn — (String)

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

          This property is available to Amplify Gen 1 apps only. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code.

        • backend — (map)

          Describes the backend associated with an Amplify Branch.

          This property is available to Amplify Gen 2 apps only. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code.

          • stackArn — (String)

            The Amazon Resource Name (ARN) for the CloudFormation stack.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createDeployment(params = {}, callback) ⇒ AWS.Request

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

The maximum duration between the CreateDeployment call and the StartDeployment call cannot exceed 8 hours. If the duration exceeds 8 hours, the StartDeployment call and the associated Job will fail.

Service Reference:

Examples:

Calling the createDeployment operation

var params = {
  appId: 'STRING_VALUE', /* required */
  branchName: 'STRING_VALUE', /* required */
  fileMap: {
    '<FileName>': 'STRING_VALUE',
    /* '<FileName>': ... */
  }
};
amplify.createDeployment(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • appId — (String)

      The unique ID for an Amplify app.

    • branchName — (String)

      The name of the branch to use for the job.

    • fileMap — (map<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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • jobId — (String)

        The job ID for this deployment. will supply to start deployment api.

      • fileUploadUrls — (map<String>)

        When the fileMap argument is provided in the request, fileUploadUrls will contain a map of file names to upload URLs.

      • zipUploadUrl — (String)

        When the fileMap argument is not provided in the request, this zipUploadUrl is returned.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createDomainAssociation(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the createDomainAssociation operation

var params = {
  appId: 'STRING_VALUE', /* required */
  domainName: 'STRING_VALUE', /* required */
  subDomainSettings: [ /* required */
    {
      branchName: 'STRING_VALUE', /* required */
      prefix: 'STRING_VALUE' /* required */
    },
    /* more items */
  ],
  autoSubDomainCreationPatterns: [
    'STRING_VALUE',
    /* more items */
  ],
  autoSubDomainIAMRole: 'STRING_VALUE',
  certificateSettings: {
    type: AMPLIFY_MANAGED | CUSTOM, /* required */
    customCertificateArn: 'STRING_VALUE'
  },
  enableAutoSubDomain: true || false
};
amplify.createDomainAssociation(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • appId — (String)

      The unique ID for an Amplify app.

    • domainName — (String)

      The domain name for the domain association.

    • enableAutoSubDomain — (Boolean)

      Enables the automated creation of subdomains for branches.

    • subDomainSettings — (Array<map>)

      The setting for the subdomain.

      • prefixrequired — (String)

        The prefix setting for the subdomain.

      • branchNamerequired — (String)

        The branch name setting for the subdomain.

    • autoSubDomainCreationPatterns — (Array<String>)

      Sets the branch patterns for automatic subdomain creation.

    • autoSubDomainIAMRole — (String)

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

    • certificateSettings — (map)

      The type of SSL/TLS certificate to use for your custom domain. If you don't specify a certificate type, Amplify uses the default certificate that it provisions and manages for you.

      • typerequired — (String)

        The certificate type.

        Specify AMPLIFY_MANAGED to use the default certificate that Amplify provisions for you.

        Specify CUSTOM to use your own certificate that you have already added to Certificate Manager in your Amazon Web Services account. Make sure you request (or import) the certificate in the US East (N. Virginia) Region (us-east-1). For more information about using ACM, see Importing certificates into Certificate Manager in the ACM User guide.

        Possible values include:
        • "AMPLIFY_MANAGED"
        • "CUSTOM"
      • customCertificateArn — (String)

        The Amazon resource name (ARN) for the custom certificate that you have already added to Certificate Manager in your Amazon Web Services account.

        This field is required only when the certificate type is CUSTOM.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • domainAssociation — (map)

        Describes the structure of a domain association, which associates a custom domain with an Amplify app.

        • domainAssociationArnrequired — (String)

          The Amazon Resource Name (ARN) for the domain association.

        • domainNamerequired — (String)

          The name of the domain.

        • enableAutoSubDomainrequired — (Boolean)

          Enables the automated creation of subdomains for branches.

        • autoSubDomainCreationPatterns — (Array<String>)

          Sets branch patterns for automatic subdomain creation.

        • autoSubDomainIAMRole — (String)

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

        • domainStatusrequired — (String)

          The current status of the domain association.

          Possible values include:
          • "PENDING_VERIFICATION"
          • "IN_PROGRESS"
          • "AVAILABLE"
          • "IMPORTING_CUSTOM_CERTIFICATE"
          • "PENDING_DEPLOYMENT"
          • "AWAITING_APP_CNAME"
          • "FAILED"
          • "CREATING"
          • "REQUESTING_CERTIFICATE"
          • "UPDATING"
        • updateStatus — (String)

          The status of the domain update operation that is currently in progress. The following list describes the valid update states.

          REQUESTING_CERTIFICATE

          The certificate is in the process of being updated.

          PENDING_VERIFICATION

          Indicates that an Amplify managed certificate is in the process of being verified. This occurs during the creation of a custom domain or when a custom domain is updated to use a managed certificate.

          IMPORTING_CUSTOM_CERTIFICATE

          Indicates that an Amplify custom certificate is in the process of being imported. This occurs during the creation of a custom domain or when a custom domain is updated to use a custom certificate.

          PENDING_DEPLOYMENT

          Indicates that the subdomain or certificate changes are being propagated.

          AWAITING_APP_CNAME

          Amplify is waiting for CNAME records corresponding to subdomains to be propagated. If your custom domain is on RouteĀ 53, Amplify handles this for you automatically. For more information about custom domains, see Setting up custom domains in the Amplify Hosting User Guide.

          UPDATE_COMPLETE

          The certificate has been associated with a domain.

          UPDATE_FAILED

          The certificate has failed to be provisioned or associated, and there is no existing active certificate to roll back to.

          Possible values include:
          • "REQUESTING_CERTIFICATE"
          • "PENDING_VERIFICATION"
          • "IMPORTING_CUSTOM_CERTIFICATE"
          • "PENDING_DEPLOYMENT"
          • "AWAITING_APP_CNAME"
          • "UPDATE_COMPLETE"
          • "UPDATE_FAILED"
        • statusReasonrequired — (String)

          Additional information that describes why the domain association is in the current state.

        • certificateVerificationDNSRecord — (String)

          The DNS record for certificate verification.

        • subDomainsrequired — (Array<map>)

          The subdomains for the domain association.

          • subDomainSettingrequired — (map)

            Describes the settings for the subdomain.

            • prefixrequired — (String)

              The prefix setting for the subdomain.

            • branchNamerequired — (String)

              The branch name setting for the subdomain.

          • verifiedrequired — (Boolean)

            The verified status of the subdomain

          • dnsRecordrequired — (String)

            The DNS record for the subdomain.

        • certificate — (map)

          Describes the SSL/TLS certificate for the domain association. This can be your own custom certificate or the default certificate that Amplify provisions for you.

          If you are updating your domain to use a different certificate, certificate points to the new certificate that is being created instead of the current active certificate. Otherwise, certificate points to the current active certificate.

          • typerequired — (String)

            The type of SSL/TLS certificate that you want to use.

            Specify AMPLIFY_MANAGED to use the default certificate that Amplify provisions for you.

            Specify CUSTOM to use your own certificate that you have already added to Certificate Manager in your Amazon Web Services account. Make sure you request (or import) the certificate in the US East (N. Virginia) Region (us-east-1). For more information about using ACM, see Importing certificates into Certificate Manager in the ACM User guide.

            Possible values include:
            • "AMPLIFY_MANAGED"
            • "CUSTOM"
          • customCertificateArn — (String)

            The Amazon resource name (ARN) for a custom certificate that you have already added to Certificate Manager in your Amazon Web Services account.

            This field is required only when the certificate type is CUSTOM.

          • certificateVerificationDNSRecord — (String)

            The DNS record for certificate verification.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createWebhook(params = {}, callback) ⇒ AWS.Request

Creates a new webhook on an Amplify app.

Service Reference:

Examples:

Calling the createWebhook operation

var params = {
  appId: 'STRING_VALUE', /* required */
  branchName: 'STRING_VALUE', /* required */
  description: 'STRING_VALUE'
};
amplify.createWebhook(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • appId — (String)

      The unique ID for an Amplify app.

    • branchName — (String)

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

    • description — (String)

      The description for a webhook.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • webhook — (map)

        Describes a webhook that connects repository events to an Amplify app.

        • webhookArnrequired — (String)

          The Amazon Resource Name (ARN) for the webhook.

        • webhookIdrequired — (String)

          The ID of the webhook.

        • webhookUrlrequired — (String)

          The URL of the webhook.

        • branchNamerequired — (String)

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

        • descriptionrequired — (String)

          The description for a webhook.

        • createTimerequired — (Date)

          The create date and time for a webhook.

        • updateTimerequired — (Date)

          Updates the date and time for a webhook.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteApp(params = {}, callback) ⇒ AWS.Request

Deletes an existing Amplify app specified by an app ID.

Service Reference:

Examples:

Calling the deleteApp operation

var params = {
  appId: 'STRING_VALUE' /* required */
};
amplify.deleteApp(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • appId — (String)

      The unique ID for an Amplify app.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • app — (map)

        Represents the different branches of a repository for building, deploying, and hosting an Amplify app.

        • appIdrequired — (String)

          The unique ID of the Amplify app.

        • appArnrequired — (String)

          The Amazon Resource Name (ARN) of the Amplify app.

        • namerequired — (String)

          The name for the Amplify app.

        • tags — (map<String>)

          The tag for the Amplify app.

        • descriptionrequired — (String)

          The description for the Amplify app.

        • repositoryrequired — (String)

          The Git repository for the Amplify app.

        • platformrequired — (String)

          The 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 to WEB_COMPUTE. For an app requiring Amplify Hosting's original SSR support only, set the platform type to WEB_DYNAMIC.

          Possible values include:
          • "WEB"
          • "WEB_DYNAMIC"
          • "WEB_COMPUTE"
        • createTimerequired — (Date)

          Creates a date and time for the Amplify app.

        • updateTimerequired — (Date)

          Updates the date and time for the Amplify app.

        • iamServiceRoleArn — (String)

          The AWS Identity and Access Management (IAM) service role for the Amazon Resource Name (ARN) of the Amplify app.

        • environmentVariablesrequired — (map<String>)

          The environment variables for the 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.

        • defaultDomainrequired — (String)

          The default domain for the Amplify app.

        • enableBranchAutoBuildrequired — (Boolean)

          Enables the auto-building of branches for the Amplify app.

        • enableBranchAutoDeletion — (Boolean)

          Automatically disconnect a branch in the Amplify console when you delete a branch from your Git repository.

        • enableBasicAuthrequired — (Boolean)

          Enables basic authorization for the Amplify app's branches.

        • basicAuthCredentials — (String)

          The basic authorization credentials for branches for the Amplify app. You must base64-encode the authorization credentials and provide them in the format user:password.

        • customRules — (Array<map>)

          Describes the custom redirect and rewrite rules for the Amplify app.

          • sourcerequired — (String)

            The source pattern for a URL rewrite or redirect rule.

          • targetrequired — (String)

            The target pattern for a URL rewrite or redirect rule.

          • status — (String)

            The status code for a URL rewrite or redirect rule.

            200

            Represents a 200 rewrite rule.

            301

            Represents a 301 (moved permanently) redirect rule. This and all future requests should be directed to the target URL.

            302

            Represents a 302 temporary redirect rule.

            404

            Represents a 404 redirect rule.

            404-200

            Represents a 404 rewrite rule.

          • condition — (String)

            The condition for a URL rewrite or redirect rule, such as a country code.

        • productionBranch — (map)

          Describes the information about a production branch of the Amplify app.

          • lastDeployTime — (Date)

            The last deploy time of the production branch.

          • status — (String)

            The status of the production branch.

          • thumbnailUrl — (String)

            The thumbnail URL for the production branch.

          • branchName — (String)

            The branch name for the production branch.

        • buildSpec — (String)

          Describes the content of the build specification (build spec) for the Amplify app.

        • customHeaders — (String)

          Describes the custom HTTP headers for the Amplify app.

        • enableAutoBranchCreation — (Boolean)

          Enables automated branch creation for the Amplify app.

        • autoBranchCreationPatterns — (Array<String>)

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

        • autoBranchCreationConfig — (map)

          Describes the automated branch creation configuration for the Amplify app.

          • stage — (String)

            Describes the current stage for the autocreated branch.

            Possible values include:
            • "PRODUCTION"
            • "BETA"
            • "DEVELOPMENT"
            • "EXPERIMENTAL"
            • "PULL_REQUEST"
          • framework — (String)

            The framework for the autocreated branch.

          • enableAutoBuild — (Boolean)

            Enables auto building for the autocreated branch.

          • environmentVariables — (map<String>)

            The environment variables for the autocreated branch.

          • basicAuthCredentials — (String)

            The basic authorization credentials for the autocreated branch. You must base64-encode the authorization credentials and provide them in the format user:password.

          • enableBasicAuth — (Boolean)

            Enables basic authorization for the autocreated branch.

          • enablePerformanceMode — (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.

          • buildSpec — (String)

            The build specification (build spec) for the autocreated branch.

          • enablePullRequestPreview — (Boolean)

            Enables pull request previews for the autocreated branch.

          • pullRequestEnvironmentName — (String)

            The Amplify environment name for the pull request.

        • repositoryCloneMethod — (String)
          Note: This is for internal use.

          The Amplify service uses this parameter to specify the authentication protocol to use to access the Git repository for an Amplify app. Amplify specifies TOKEN for a GitHub repository, SIGV4 for an Amazon Web Services CodeCommit repository, and SSH for GitLab and Bitbucket repositories.

          Possible values include:
          • "SSH"
          • "TOKEN"
          • "SIGV4"
        • cacheConfig — (map)

          The cache configuration for the Amplify app. If you don't specify the cache configuration type, Amplify uses the default AMPLIFY_MANAGED setting.

          • typerequired — (String)

            The type of cache configuration to use for an Amplify app.

            The AMPLIFY_MANAGED cache configuration automatically applies an optimized cache configuration for your app based on its platform, routing rules, and rewrite rules. This is the default setting.

            The AMPLIFY_MANAGED_NO_COOKIES cache configuration type is the same as AMPLIFY_MANAGED, except that it excludes all cookies from the cache key.

            Possible values include:
            • "AMPLIFY_MANAGED"
            • "AMPLIFY_MANAGED_NO_COOKIES"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteBackendEnvironment(params = {}, callback) ⇒ AWS.Request

Deletes a backend environment for an Amplify app.

This API is available only to Amplify Gen 1 applications where the backend is created using Amplify Studio or the Amplify command line interface (CLI). This API isnā€™t available to Amplify Gen 2 applications. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code.

Service Reference:

Examples:

Calling the deleteBackendEnvironment operation

var params = {
  appId: 'STRING_VALUE', /* required */
  environmentName: 'STRING_VALUE' /* required */
};
amplify.deleteBackendEnvironment(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • appId — (String)

      The unique ID of an Amplify app.

    • environmentName — (String)

      The name of a backend environment of an Amplify app.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • backendEnvironment — (map)

        Describes the backend environment for an Amplify app.

        • backendEnvironmentArnrequired — (String)

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

        • environmentNamerequired — (String)

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

        • stackName — (String)

          The AWS CloudFormation stack name of a backend environment.

        • deploymentArtifacts — (String)

          The name of deployment artifacts.

        • createTimerequired — (Date)

          The creation date and time for a backend environment that is part of an Amplify app.

        • updateTimerequired — (Date)

          The last updated date and time for a backend environment that is part of an Amplify app.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteBranch(params = {}, callback) ⇒ AWS.Request

Deletes a branch for an Amplify app.

Service Reference:

Examples:

Calling the deleteBranch operation

var params = {
  appId: 'STRING_VALUE', /* required */
  branchName: 'STRING_VALUE' /* required */
};
amplify.deleteBranch(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • appId — (String)

      The unique ID for an Amplify app.

    • branchName — (String)

      The name of the branch.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • branch — (map)

        The branch for an Amplify app, which maps to a third-party repository branch.

        • branchArnrequired — (String)

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

        • branchNamerequired — (String)

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

        • descriptionrequired — (String)

          The description for the branch that is part of an Amplify app.

        • tags — (map<String>)

          The tag for the branch of an Amplify app.

        • stagerequired — (String)

          The current stage for the branch that is part of an Amplify app.

          Possible values include:
          • "PRODUCTION"
          • "BETA"
          • "DEVELOPMENT"
          • "EXPERIMENTAL"
          • "PULL_REQUEST"
        • displayNamerequired — (String)

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

        • enableNotificationrequired — (Boolean)

          Enables notifications for a branch that is part of an Amplify app.

        • createTimerequired — (Date)

          The creation date and time for a branch that is part of an Amplify app.

        • updateTimerequired — (Date)

          The last updated date and time for a branch that is part of an Amplify app.

        • environmentVariablesrequired — (map<String>)

          The environment variables specific to a branch of an Amplify app.

        • enableAutoBuildrequired — (Boolean)

          Enables auto-building on push for a branch of an Amplify app.

        • customDomainsrequired — (Array<String>)

          The custom domains for a branch of an Amplify app.

        • frameworkrequired — (String)

          The framework for a branch of an Amplify app.

        • activeJobIdrequired — (String)

          The ID of the active job for a branch of an Amplify app.

        • totalNumberOfJobsrequired — (String)

          The total number of jobs that are part of an Amplify app.

        • enableBasicAuthrequired — (Boolean)

          Enables basic authorization for a branch of an Amplify app.

        • enablePerformanceMode — (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.

        • thumbnailUrl — (String)

          The thumbnail URL for the branch of an Amplify app.

        • basicAuthCredentials — (String)

          The basic authorization credentials for a branch of an Amplify app. You must base64-encode the authorization credentials and provide them in the format user:password.

        • buildSpec — (String)

          The build specification (build spec) content for the branch of an Amplify app.

        • ttlrequired — (String)

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

        • associatedResources — (Array<String>)

          A list of custom resources that are linked to this branch.

        • enablePullRequestPreviewrequired — (Boolean)

          Enables pull request previews for the branch.

        • pullRequestEnvironmentName — (String)

          The Amplify environment name for the pull request.

        • destinationBranch — (String)

          The destination branch if the branch is a pull request branch.

        • sourceBranch — (String)

          The source branch if the branch is a pull request branch.

        • backendEnvironmentArn — (String)

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

          This property is available to Amplify Gen 1 apps only. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code.

        • backend — (map)

          Describes the backend associated with an Amplify Branch.

          This property is available to Amplify Gen 2 apps only. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code.

          • stackArn — (String)

            The Amazon Resource Name (ARN) for the CloudFormation stack.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteDomainAssociation(params = {}, callback) ⇒ AWS.Request

Deletes a domain association for an Amplify app.

Service Reference:

Examples:

Calling the deleteDomainAssociation operation

var params = {
  appId: 'STRING_VALUE', /* required */
  domainName: 'STRING_VALUE' /* required */
};
amplify.deleteDomainAssociation(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • appId — (String)

      The unique id for an Amplify app.

    • domainName — (String)

      The name of the domain.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • domainAssociation — (map)

        Describes the association between a custom domain and an Amplify app.

        • domainAssociationArnrequired — (String)

          The Amazon Resource Name (ARN) for the domain association.

        • domainNamerequired — (String)

          The name of the domain.

        • enableAutoSubDomainrequired — (Boolean)

          Enables the automated creation of subdomains for branches.

        • autoSubDomainCreationPatterns — (Array<String>)

          Sets branch patterns for automatic subdomain creation.

        • autoSubDomainIAMRole — (String)

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

        • domainStatusrequired — (String)

          The current status of the domain association.

          Possible values include:
          • "PENDING_VERIFICATION"
          • "IN_PROGRESS"
          • "AVAILABLE"
          • "IMPORTING_CUSTOM_CERTIFICATE"
          • "PENDING_DEPLOYMENT"
          • "AWAITING_APP_CNAME"
          • "FAILED"
          • "CREATING"
          • "REQUESTING_CERTIFICATE"
          • "UPDATING"
        • updateStatus — (String)

          The status of the domain update operation that is currently in progress. The following list describes the valid update states.

          REQUESTING_CERTIFICATE

          The certificate is in the process of being updated.

          PENDING_VERIFICATION

          Indicates that an Amplify managed certificate is in the process of being verified. This occurs during the creation of a custom domain or when a custom domain is updated to use a managed certificate.

          IMPORTING_CUSTOM_CERTIFICATE

          Indicates that an Amplify custom certificate is in the process of being imported. This occurs during the creation of a custom domain or when a custom domain is updated to use a custom certificate.

          PENDING_DEPLOYMENT

          Indicates that the subdomain or certificate changes are being propagated.

          AWAITING_APP_CNAME

          Amplify is waiting for CNAME records corresponding to subdomains to be propagated. If your custom domain is on RouteĀ 53, Amplify handles this for you automatically. For more information about custom domains, see Setting up custom domains in the Amplify Hosting User Guide.

          UPDATE_COMPLETE

          The certificate has been associated with a domain.

          UPDATE_FAILED

          The certificate has failed to be provisioned or associated, and there is no existing active certificate to roll back to.

          Possible values include:
          • "REQUESTING_CERTIFICATE"
          • "PENDING_VERIFICATION"
          • "IMPORTING_CUSTOM_CERTIFICATE"
          • "PENDING_DEPLOYMENT"
          • "AWAITING_APP_CNAME"
          • "UPDATE_COMPLETE"
          • "UPDATE_FAILED"
        • statusReasonrequired — (String)

          Additional information that describes why the domain association is in the current state.

        • certificateVerificationDNSRecord — (String)

          The DNS record for certificate verification.

        • subDomainsrequired — (Array<map>)

          The subdomains for the domain association.

          • subDomainSettingrequired — (map)

            Describes the settings for the subdomain.

            • prefixrequired — (String)

              The prefix setting for the subdomain.

            • branchNamerequired — (String)

              The branch name setting for the subdomain.

          • verifiedrequired — (Boolean)

            The verified status of the subdomain

          • dnsRecordrequired — (String)

            The DNS record for the subdomain.

        • certificate — (map)

          Describes the SSL/TLS certificate for the domain association. This can be your own custom certificate or the default certificate that Amplify provisions for you.

          If you are updating your domain to use a different certificate, certificate points to the new certificate that is being created instead of the current active certificate. Otherwise, certificate points to the current active certificate.

          • typerequired — (String)

            The type of SSL/TLS certificate that you want to use.

            Specify AMPLIFY_MANAGED to use the default certificate that Amplify provisions for you.

            Specify CUSTOM to use your own certificate that you have already added to Certificate Manager in your Amazon Web Services account. Make sure you request (or import) the certificate in the US East (N. Virginia) Region (us-east-1). For more information about using ACM, see Importing certificates into Certificate Manager in the ACM User guide.

            Possible values include:
            • "AMPLIFY_MANAGED"
            • "CUSTOM"
          • customCertificateArn — (String)

            The Amazon resource name (ARN) for a custom certificate that you have already added to Certificate Manager in your Amazon Web Services account.

            This field is required only when the certificate type is CUSTOM.

          • certificateVerificationDNSRecord — (String)

            The DNS record for certificate verification.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteJob(params = {}, callback) ⇒ AWS.Request

Deletes a job for a branch of an Amplify app.

Service Reference:

Examples:

Calling the deleteJob operation

var params = {
  appId: 'STRING_VALUE', /* required */
  branchName: 'STRING_VALUE', /* required */
  jobId: 'STRING_VALUE' /* required */
};
amplify.deleteJob(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • appId — (String)

      The unique ID for an Amplify app.

    • branchName — (String)

      The name of the branch to use for the job.

    • jobId — (String)

      The unique ID for the job.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • jobSummary — (map)

        Describes the summary for an execution job for an Amplify app.

        • jobArnrequired — (String)

          The Amazon Resource Name (ARN) for the job.

        • jobIdrequired — (String)

          The unique ID for the job.

        • commitIdrequired — (String)

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

        • commitMessagerequired — (String)

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

        • commitTimerequired — (Date)

          The commit date and time for the job.

        • startTimerequired — (Date)

          The start date and time for the job.

        • statusrequired — (String)

          The current status for the job.

          Possible values include:
          • "PENDING"
          • "PROVISIONING"
          • "RUNNING"
          • "FAILED"
          • "SUCCEED"
          • "CANCELLING"
          • "CANCELLED"
        • endTime — (Date)

          The end date and time for the job.

        • jobTyperequired — (String)

          The type for the job. If the value is RELEASE, the job was manually released from its source by using the StartJob API. If the value is RETRY, the job was manually retried using the StartJob API. If the value is WEB_HOOK, the job was automatically triggered by webhooks.

          Possible values include:
          • "RELEASE"
          • "RETRY"
          • "MANUAL"
          • "WEB_HOOK"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteWebhook(params = {}, callback) ⇒ AWS.Request

Deletes a webhook.

Service Reference:

Examples:

Calling the deleteWebhook operation

var params = {
  webhookId: 'STRING_VALUE' /* required */
};
amplify.deleteWebhook(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • webhookId — (String)

      The unique ID for a webhook.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • webhook — (map)

        Describes a webhook that connects repository events to an Amplify app.

        • webhookArnrequired — (String)

          The Amazon Resource Name (ARN) for the webhook.

        • webhookIdrequired — (String)

          The ID of the webhook.

        • webhookUrlrequired — (String)

          The URL of the webhook.

        • branchNamerequired — (String)

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

        • descriptionrequired — (String)

          The description for a webhook.

        • createTimerequired — (Date)

          The create date and time for a webhook.

        • updateTimerequired — (Date)

          Updates the date and time for a webhook.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

generateAccessLogs(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the generateAccessLogs operation

var params = {
  appId: 'STRING_VALUE', /* required */
  domainName: 'STRING_VALUE', /* required */
  endTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
  startTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789
};
amplify.generateAccessLogs(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • startTime — (Date)

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

    • endTime — (Date)

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

    • domainName — (String)

      The name of the domain.

    • appId — (String)

      The unique ID for an Amplify app.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • logUrl — (String)

        The pre-signed URL for the requested access logs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getApp(params = {}, callback) ⇒ AWS.Request

Returns an existing Amplify app specified by an app ID.

Service Reference:

Examples:

Calling the getApp operation

var params = {
  appId: 'STRING_VALUE' /* required */
};
amplify.getApp(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • appId — (String)

      The unique ID for an Amplify app.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • app — (map)

        Represents the different branches of a repository for building, deploying, and hosting an Amplify app.

        • appIdrequired — (String)

          The unique ID of the Amplify app.

        • appArnrequired — (String)

          The Amazon Resource Name (ARN) of the Amplify app.

        • namerequired — (String)

          The name for the Amplify app.

        • tags — (map<String>)

          The tag for the Amplify app.

        • descriptionrequired — (String)

          The description for the Amplify app.

        • repositoryrequired — (String)

          The Git repository for the Amplify app.

        • platformrequired — (String)

          The 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 to WEB_COMPUTE. For an app requiring Amplify Hosting's original SSR support only, set the platform type to WEB_DYNAMIC.

          Possible values include:
          • "WEB"
          • "WEB_DYNAMIC"
          • "WEB_COMPUTE"
        • createTimerequired — (Date)

          Creates a date and time for the Amplify app.

        • updateTimerequired — (Date)

          Updates the date and time for the Amplify app.

        • iamServiceRoleArn — (String)

          The AWS Identity and Access Management (IAM) service role for the Amazon Resource Name (ARN) of the Amplify app.

        • environmentVariablesrequired — (map<String>)

          The environment variables for the 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.

        • defaultDomainrequired — (String)

          The default domain for the Amplify app.

        • enableBranchAutoBuildrequired — (Boolean)

          Enables the auto-building of branches for the Amplify app.

        • enableBranchAutoDeletion — (Boolean)

          Automatically disconnect a branch in the Amplify console when you delete a branch from your Git repository.

        • enableBasicAuthrequired — (Boolean)

          Enables basic authorization for the Amplify app's branches.

        • basicAuthCredentials — (String)

          The basic authorization credentials for branches for the Amplify app. You must base64-encode the authorization credentials and provide them in the format user:password.

        • customRules — (Array<map>)

          Describes the custom redirect and rewrite rules for the Amplify app.

          • sourcerequired — (String)

            The source pattern for a URL rewrite or redirect rule.

          • targetrequired — (String)

            The target pattern for a URL rewrite or redirect rule.

          • status — (String)

            The status code for a URL rewrite or redirect rule.

            200

            Represents a 200 rewrite rule.

            301

            Represents a 301 (moved permanently) redirect rule. This and all future requests should be directed to the target URL.

            302

            Represents a 302 temporary redirect rule.

            404

            Represents a 404 redirect rule.

            404-200

            Represents a 404 rewrite rule.

          • condition — (String)

            The condition for a URL rewrite or redirect rule, such as a country code.

        • productionBranch — (map)

          Describes the information about a production branch of the Amplify app.

          • lastDeployTime — (Date)

            The last deploy time of the production branch.

          • status — (String)

            The status of the production branch.

          • thumbnailUrl — (String)

            The thumbnail URL for the production branch.

          • branchName — (String)

            The branch name for the production branch.

        • buildSpec — (String)

          Describes the content of the build specification (build spec) for the Amplify app.

        • customHeaders — (String)

          Describes the custom HTTP headers for the Amplify app.

        • enableAutoBranchCreation — (Boolean)

          Enables automated branch creation for the Amplify app.

        • autoBranchCreationPatterns — (Array<String>)

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

        • autoBranchCreationConfig — (map)

          Describes the automated branch creation configuration for the Amplify app.

          • stage — (String)

            Describes the current stage for the autocreated branch.

            Possible values include:
            • "PRODUCTION"
            • "BETA"
            • "DEVELOPMENT"
            • "EXPERIMENTAL"
            • "PULL_REQUEST"
          • framework — (String)

            The framework for the autocreated branch.

          • enableAutoBuild — (Boolean)

            Enables auto building for the autocreated branch.

          • environmentVariables — (map<String>)

            The environment variables for the autocreated branch.

          • basicAuthCredentials — (String)

            The basic authorization credentials for the autocreated branch. You must base64-encode the authorization credentials and provide them in the format user:password.

          • enableBasicAuth — (Boolean)

            Enables basic authorization for the autocreated branch.

          • enablePerformanceMode — (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.

          • buildSpec — (String)

            The build specification (build spec) for the autocreated branch.

          • enablePullRequestPreview — (Boolean)

            Enables pull request previews for the autocreated branch.

          • pullRequestEnvironmentName — (String)

            The Amplify environment name for the pull request.

        • repositoryCloneMethod — (String)
          Note: This is for internal use.

          The Amplify service uses this parameter to specify the authentication protocol to use to access the Git repository for an Amplify app. Amplify specifies TOKEN for a GitHub repository, SIGV4 for an Amazon Web Services CodeCommit repository, and SSH for GitLab and Bitbucket repositories.

          Possible values include:
          • "SSH"
          • "TOKEN"
          • "SIGV4"
        • cacheConfig — (map)

          The cache configuration for the Amplify app. If you don't specify the cache configuration type, Amplify uses the default AMPLIFY_MANAGED setting.

          • typerequired — (String)

            The type of cache configuration to use for an Amplify app.

            The AMPLIFY_MANAGED cache configuration automatically applies an optimized cache configuration for your app based on its platform, routing rules, and rewrite rules. This is the default setting.

            The AMPLIFY_MANAGED_NO_COOKIES cache configuration type is the same as AMPLIFY_MANAGED, except that it excludes all cookies from the cache key.

            Possible values include:
            • "AMPLIFY_MANAGED"
            • "AMPLIFY_MANAGED_NO_COOKIES"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getArtifactUrl(params = {}, callback) ⇒ AWS.Request

Returns the artifact info that corresponds to an artifact id.

Service Reference:

Examples:

Calling the getArtifactUrl operation

var params = {
  artifactId: 'STRING_VALUE' /* required */
};
amplify.getArtifactUrl(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • artifactId — (String)

      The unique ID for an artifact.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • artifactId — (String)

        The unique ID for an artifact.

      • artifactUrl — (String)

        The presigned URL for the artifact.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getBackendEnvironment(params = {}, callback) ⇒ AWS.Request

Returns a backend environment for an Amplify app.

This API is available only to Amplify Gen 1 applications where the backend is created using Amplify Studio or the Amplify command line interface (CLI). This API isnā€™t available to Amplify Gen 2 applications. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code.

Service Reference:

Examples:

Calling the getBackendEnvironment operation

var params = {
  appId: 'STRING_VALUE', /* required */
  environmentName: 'STRING_VALUE' /* required */
};
amplify.getBackendEnvironment(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • appId — (String)

      The unique id for an Amplify app.

    • environmentName — (String)

      The name for the backend environment.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • backendEnvironment — (map)

        Describes the backend environment for an Amplify app.

        • backendEnvironmentArnrequired — (String)

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

        • environmentNamerequired — (String)

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

        • stackName — (String)

          The AWS CloudFormation stack name of a backend environment.

        • deploymentArtifacts — (String)

          The name of deployment artifacts.

        • createTimerequired — (Date)

          The creation date and time for a backend environment that is part of an Amplify app.

        • updateTimerequired — (Date)

          The last updated date and time for a backend environment that is part of an Amplify app.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getBranch(params = {}, callback) ⇒ AWS.Request

Returns a branch for an Amplify app.

Service Reference:

Examples:

Calling the getBranch operation

var params = {
  appId: 'STRING_VALUE', /* required */
  branchName: 'STRING_VALUE' /* required */
};
amplify.getBranch(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • appId — (String)

      The unique ID for an Amplify app.

    • branchName — (String)

      The name of the branch.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • branch — (map)

        The branch for an Amplify app, which maps to a third-party repository branch.

        • branchArnrequired — (String)

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

        • branchNamerequired — (String)

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

        • descriptionrequired — (String)

          The description for the branch that is part of an Amplify app.

        • tags — (map<String>)

          The tag for the branch of an Amplify app.

        • stagerequired — (String)

          The current stage for the branch that is part of an Amplify app.

          Possible values include:
          • "PRODUCTION"
          • "BETA"
          • "DEVELOPMENT"
          • "EXPERIMENTAL"
          • "PULL_REQUEST"
        • displayNamerequired — (String)

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

        • enableNotificationrequired — (Boolean)

          Enables notifications for a branch that is part of an Amplify app.

        • createTimerequired — (Date)

          The creation date and time for a branch that is part of an Amplify app.

        • updateTimerequired — (Date)

          The last updated date and time for a branch that is part of an Amplify app.

        • environmentVariablesrequired — (map<String>)

          The environment variables specific to a branch of an Amplify app.

        • enableAutoBuildrequired — (Boolean)

          Enables auto-building on push for a branch of an Amplify app.

        • customDomainsrequired — (Array<String>)

          The custom domains for a branch of an Amplify app.

        • frameworkrequired — (String)

          The framework for a branch of an Amplify app.

        • activeJobIdrequired — (String)

          The ID of the active job for a branch of an Amplify app.

        • totalNumberOfJobsrequired — (String)

          The total number of jobs that are part of an Amplify app.

        • enableBasicAuthrequired — (Boolean)

          Enables basic authorization for a branch of an Amplify app.

        • enablePerformanceMode — (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.

        • thumbnailUrl — (String)

          The thumbnail URL for the branch of an Amplify app.

        • basicAuthCredentials — (String)

          The basic authorization credentials for a branch of an Amplify app. You must base64-encode the authorization credentials and provide them in the format user:password.

        • buildSpec — (String)

          The build specification (build spec) content for the branch of an Amplify app.

        • ttlrequired — (String)

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

        • associatedResources — (Array<String>)

          A list of custom resources that are linked to this branch.

        • enablePullRequestPreviewrequired — (Boolean)

          Enables pull request previews for the branch.

        • pullRequestEnvironmentName — (String)

          The Amplify environment name for the pull request.

        • destinationBranch — (String)

          The destination branch if the branch is a pull request branch.

        • sourceBranch — (String)

          The source branch if the branch is a pull request branch.

        • backendEnvironmentArn — (String)

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

          This property is available to Amplify Gen 1 apps only. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code.

        • backend — (map)

          Describes the backend associated with an Amplify Branch.

          This property is available to Amplify Gen 2 apps only. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code.

          • stackArn — (String)

            The Amazon Resource Name (ARN) for the CloudFormation stack.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getDomainAssociation(params = {}, callback) ⇒ AWS.Request

Returns the domain information for an Amplify app.

Service Reference:

Examples:

Calling the getDomainAssociation operation

var params = {
  appId: 'STRING_VALUE', /* required */
  domainName: 'STRING_VALUE' /* required */
};
amplify.getDomainAssociation(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • appId — (String)

      The unique id for an Amplify app.

    • domainName — (String)

      The name of the domain.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • domainAssociation — (map)

        Describes the structure of a domain association, which associates a custom domain with an Amplify app.

        • domainAssociationArnrequired — (String)

          The Amazon Resource Name (ARN) for the domain association.

        • domainNamerequired — (String)

          The name of the domain.

        • enableAutoSubDomainrequired — (Boolean)

          Enables the automated creation of subdomains for branches.

        • autoSubDomainCreationPatterns — (Array<String>)

          Sets branch patterns for automatic subdomain creation.

        • autoSubDomainIAMRole — (String)

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

        • domainStatusrequired — (String)

          The current status of the domain association.

          Possible values include:
          • "PENDING_VERIFICATION"
          • "IN_PROGRESS"
          • "AVAILABLE"
          • "IMPORTING_CUSTOM_CERTIFICATE"
          • "PENDING_DEPLOYMENT"
          • "AWAITING_APP_CNAME"
          • "FAILED"
          • "CREATING"
          • "REQUESTING_CERTIFICATE"
          • "UPDATING"
        • updateStatus — (String)

          The status of the domain update operation that is currently in progress. The following list describes the valid update states.

          REQUESTING_CERTIFICATE

          The certificate is in the process of being updated.

          PENDING_VERIFICATION

          Indicates that an Amplify managed certificate is in the process of being verified. This occurs during the creation of a custom domain or when a custom domain is updated to use a managed certificate.

          IMPORTING_CUSTOM_CERTIFICATE

          Indicates that an Amplify custom certificate is in the process of being imported. This occurs during the creation of a custom domain or when a custom domain is updated to use a custom certificate.

          PENDING_DEPLOYMENT

          Indicates that the subdomain or certificate changes are being propagated.

          AWAITING_APP_CNAME

          Amplify is waiting for CNAME records corresponding to subdomains to be propagated. If your custom domain is on RouteĀ 53, Amplify handles this for you automatically. For more information about custom domains, see Setting up custom domains in the Amplify Hosting User Guide.

          UPDATE_COMPLETE

          The certificate has been associated with a domain.

          UPDATE_FAILED

          The certificate has failed to be provisioned or associated, and there is no existing active certificate to roll back to.

          Possible values include:
          • "REQUESTING_CERTIFICATE"
          • "PENDING_VERIFICATION"
          • "IMPORTING_CUSTOM_CERTIFICATE"
          • "PENDING_DEPLOYMENT"
          • "AWAITING_APP_CNAME"
          • "UPDATE_COMPLETE"
          • "UPDATE_FAILED"
        • statusReasonrequired — (String)

          Additional information that describes why the domain association is in the current state.

        • certificateVerificationDNSRecord — (String)

          The DNS record for certificate verification.

        • subDomainsrequired — (Array<map>)

          The subdomains for the domain association.

          • subDomainSettingrequired — (map)

            Describes the settings for the subdomain.

            • prefixrequired — (String)

              The prefix setting for the subdomain.

            • branchNamerequired — (String)

              The branch name setting for the subdomain.

          • verifiedrequired — (Boolean)

            The verified status of the subdomain

          • dnsRecordrequired — (String)

            The DNS record for the subdomain.

        • certificate — (map)

          Describes the SSL/TLS certificate for the domain association. This can be your own custom certificate or the default certificate that Amplify provisions for you.

          If you are updating your domain to use a different certificate, certificate points to the new certificate that is being created instead of the current active certificate. Otherwise, certificate points to the current active certificate.

          • typerequired — (String)

            The type of SSL/TLS certificate that you want to use.

            Specify AMPLIFY_MANAGED to use the default certificate that Amplify provisions for you.

            Specify CUSTOM to use your own certificate that you have already added to Certificate Manager in your Amazon Web Services account. Make sure you request (or import) the certificate in the US East (N. Virginia) Region (us-east-1). For more information about using ACM, see Importing certificates into Certificate Manager in the ACM User guide.

            Possible values include:
            • "AMPLIFY_MANAGED"
            • "CUSTOM"
          • customCertificateArn — (String)

            The Amazon resource name (ARN) for a custom certificate that you have already added to Certificate Manager in your Amazon Web Services account.

            This field is required only when the certificate type is CUSTOM.

          • certificateVerificationDNSRecord — (String)

            The DNS record for certificate verification.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getJob(params = {}, callback) ⇒ AWS.Request

Returns a job for a branch of an Amplify app.

Service Reference:

Examples:

Calling the getJob operation

var params = {
  appId: 'STRING_VALUE', /* required */
  branchName: 'STRING_VALUE', /* required */
  jobId: 'STRING_VALUE' /* required */
};
amplify.getJob(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • appId — (String)

      The unique ID for an Amplify app.

    • branchName — (String)

      The name of the branch to use for the job.

    • jobId — (String)

      The unique ID for the job.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • job — (map)

        Describes an execution job for an Amplify app.

        • summaryrequired — (map)

          Describes the summary for an execution job for an Amplify app.

          • jobArnrequired — (String)

            The Amazon Resource Name (ARN) for the job.

          • jobIdrequired — (String)

            The unique ID for the job.

          • commitIdrequired — (String)

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

          • commitMessagerequired — (String)

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

          • commitTimerequired — (Date)

            The commit date and time for the job.

          • startTimerequired — (Date)

            The start date and time for the job.

          • statusrequired — (String)

            The current status for the job.

            Possible values include:
            • "PENDING"
            • "PROVISIONING"
            • "RUNNING"
            • "FAILED"
            • "SUCCEED"
            • "CANCELLING"
            • "CANCELLED"
          • endTime — (Date)

            The end date and time for the job.

          • jobTyperequired — (String)

            The type for the job. If the value is RELEASE, the job was manually released from its source by using the StartJob API. If the value is RETRY, the job was manually retried using the StartJob API. If the value is WEB_HOOK, the job was automatically triggered by webhooks.

            Possible values include:
            • "RELEASE"
            • "RETRY"
            • "MANUAL"
            • "WEB_HOOK"
        • stepsrequired — (Array<map>)

          The execution steps for an execution job, for an Amplify app.

          • stepNamerequired — (String)

            The name of the execution step.

          • startTimerequired — (Date)

            The start date and time of the execution step.

          • statusrequired — (String)

            The status of the execution step.

            Possible values include:
            • "PENDING"
            • "PROVISIONING"
            • "RUNNING"
            • "FAILED"
            • "SUCCEED"
            • "CANCELLING"
            • "CANCELLED"
          • endTimerequired — (Date)

            The end date and time of the execution step.

          • logUrl — (String)

            The URL to the logs for the execution step.

          • artifactsUrl — (String)

            The URL to the artifact for the execution step.

          • testArtifactsUrl — (String)

            The URL to the test artifact for the execution step.

          • testConfigUrl — (String)

            The URL to the test configuration for the execution step.

          • screenshots — (map<String>)

            The list of screenshot URLs for the execution step, if relevant.

          • statusReason — (String)

            The reason for the current step status.

          • context — (String)

            The context for the current step. Includes a build image if the step is build.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getWebhook(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the getWebhook operation

var params = {
  webhookId: 'STRING_VALUE' /* required */
};
amplify.getWebhook(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • webhookId — (String)

      The unique ID for a webhook.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • webhook — (map)

        Describes the structure of a webhook.

        • webhookArnrequired — (String)

          The Amazon Resource Name (ARN) for the webhook.

        • webhookIdrequired — (String)

          The ID of the webhook.

        • webhookUrlrequired — (String)

          The URL of the webhook.

        • branchNamerequired — (String)

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

        • descriptionrequired — (String)

          The description for a webhook.

        • createTimerequired — (Date)

          The create date and time for a webhook.

        • updateTimerequired — (Date)

          Updates the date and time for a webhook.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listApps(params = {}, callback) ⇒ AWS.Request

Returns a list of the existing Amplify apps.

Service Reference:

Examples:

Calling the listApps operation

var params = {
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
amplify.listApps(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • nextToken — (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.

    • maxResults — (Integer)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • apps — (Array<map>)

        A list of Amplify apps.

        • appIdrequired — (String)

          The unique ID of the Amplify app.

        • appArnrequired — (String)

          The Amazon Resource Name (ARN) of the Amplify app.

        • namerequired — (String)

          The name for the Amplify app.

        • tags — (map<String>)

          The tag for the Amplify app.

        • descriptionrequired — (String)

          The description for the Amplify app.

        • repositoryrequired — (String)

          The Git repository for the Amplify app.

        • platformrequired — (String)

          The 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 to WEB_COMPUTE. For an app requiring Amplify Hosting's original SSR support only, set the platform type to WEB_DYNAMIC.

          Possible values include:
          • "WEB"
          • "WEB_DYNAMIC"
          • "WEB_COMPUTE"
        • createTimerequired — (Date)

          Creates a date and time for the Amplify app.

        • updateTimerequired — (Date)

          Updates the date and time for the Amplify app.

        • iamServiceRoleArn — (String)

          The AWS Identity and Access Management (IAM) service role for the Amazon Resource Name (ARN) of the Amplify app.

        • environmentVariablesrequired — (map<String>)

          The environment variables for the 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.

        • defaultDomainrequired — (String)

          The default domain for the Amplify app.

        • enableBranchAutoBuildrequired — (Boolean)

          Enables the auto-building of branches for the Amplify app.

        • enableBranchAutoDeletion — (Boolean)

          Automatically disconnect a branch in the Amplify console when you delete a branch from your Git repository.

        • enableBasicAuthrequired — (Boolean)

          Enables basic authorization for the Amplify app's branches.

        • basicAuthCredentials — (String)

          The basic authorization credentials for branches for the Amplify app. You must base64-encode the authorization credentials and provide them in the format user:password.

        • customRules — (Array<map>)

          Describes the custom redirect and rewrite rules for the Amplify app.

          • sourcerequired — (String)

            The source pattern for a URL rewrite or redirect rule.

          • targetrequired — (String)

            The target pattern for a URL rewrite or redirect rule.

          • status — (String)

            The status code for a URL rewrite or redirect rule.

            200

            Represents a 200 rewrite rule.

            301

            Represents a 301 (moved permanently) redirect rule. This and all future requests should be directed to the target URL.

            302

            Represents a 302 temporary redirect rule.

            404

            Represents a 404 redirect rule.

            404-200

            Represents a 404 rewrite rule.

          • condition — (String)

            The condition for a URL rewrite or redirect rule, such as a country code.

        • productionBranch — (map)

          Describes the information about a production branch of the Amplify app.

          • lastDeployTime — (Date)

            The last deploy time of the production branch.

          • status — (String)

            The status of the production branch.

          • thumbnailUrl — (String)

            The thumbnail URL for the production branch.

          • branchName — (String)

            The branch name for the production branch.

        • buildSpec — (String)

          Describes the content of the build specification (build spec) for the Amplify app.

        • customHeaders — (String)

          Describes the custom HTTP headers for the Amplify app.

        • enableAutoBranchCreation — (Boolean)

          Enables automated branch creation for the Amplify app.

        • autoBranchCreationPatterns — (Array<String>)

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

        • autoBranchCreationConfig — (map)

          Describes the automated branch creation configuration for the Amplify app.

          • stage — (String)

            Describes the current stage for the autocreated branch.

            Possible values include:
            • "PRODUCTION"
            • "BETA"
            • "DEVELOPMENT"
            • "EXPERIMENTAL"
            • "PULL_REQUEST"
          • framework — (String)

            The framework for the autocreated branch.

          • enableAutoBuild — (Boolean)

            Enables auto building for the autocreated branch.

          • environmentVariables — (map<String>)

            The environment variables for the autocreated branch.

          • basicAuthCredentials — (String)

            The basic authorization credentials for the autocreated branch. You must base64-encode the authorization credentials and provide them in the format user:password.

          • enableBasicAuth — (Boolean)

            Enables basic authorization for the autocreated branch.

          • enablePerformanceMode — (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.

          • buildSpec — (String)

            The build specification (build spec) for the autocreated branch.

          • enablePullRequestPreview — (Boolean)

            Enables pull request previews for the autocreated branch.

          • pullRequestEnvironmentName — (String)

            The Amplify environment name for the pull request.

        • repositoryCloneMethod — (String)
          Note: This is for internal use.

          The Amplify service uses this parameter to specify the authentication protocol to use to access the Git repository for an Amplify app. Amplify specifies TOKEN for a GitHub repository, SIGV4 for an Amazon Web Services CodeCommit repository, and SSH for GitLab and Bitbucket repositories.

          Possible values include:
          • "SSH"
          • "TOKEN"
          • "SIGV4"
        • cacheConfig — (map)

          The cache configuration for the Amplify app. If you don't specify the cache configuration type, Amplify uses the default AMPLIFY_MANAGED setting.

          • typerequired — (String)

            The type of cache configuration to use for an Amplify app.

            The AMPLIFY_MANAGED cache configuration automatically applies an optimized cache configuration for your app based on its platform, routing rules, and rewrite rules. This is the default setting.

            The AMPLIFY_MANAGED_NO_COOKIES cache configuration type is the same as AMPLIFY_MANAGED, except that it excludes all cookies from the cache key.

            Possible values include:
            • "AMPLIFY_MANAGED"
            • "AMPLIFY_MANAGED_NO_COOKIES"
      • nextToken — (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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listArtifacts(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the listArtifacts operation

var params = {
  appId: 'STRING_VALUE', /* required */
  branchName: 'STRING_VALUE', /* required */
  jobId: 'STRING_VALUE', /* required */
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
amplify.listArtifacts(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • appId — (String)

      The unique ID for an Amplify app.

    • branchName — (String)

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

    • jobId — (String)

      The unique ID for a job.

    • nextToken — (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.

    • maxResults — (Integer)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • artifacts — (Array<map>)

        A list of artifacts.

        • artifactFileNamerequired — (String)

          The file name for the artifact.

        • artifactIdrequired — (String)

          The unique ID for the artifact.

      • nextToken — (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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listBackendEnvironments(params = {}, callback) ⇒ AWS.Request

Lists the backend environments for an Amplify app.

This API is available only to Amplify Gen 1 applications where the backend is created using Amplify Studio or the Amplify command line interface (CLI). This API isnā€™t available to Amplify Gen 2 applications. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code.

Service Reference:

Examples:

Calling the listBackendEnvironments operation

var params = {
  appId: 'STRING_VALUE', /* required */
  environmentName: 'STRING_VALUE',
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
amplify.listBackendEnvironments(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • appId — (String)

      The unique ID for an Amplify app.

    • environmentName — (String)

      The name of the backend environment

    • nextToken — (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.

    • maxResults — (Integer)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • backendEnvironments — (Array<map>)

        The list of backend environments for an Amplify app.

        • backendEnvironmentArnrequired — (String)

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

        • environmentNamerequired — (String)

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

        • stackName — (String)

          The AWS CloudFormation stack name of a backend environment.

        • deploymentArtifacts — (String)

          The name of deployment artifacts.

        • createTimerequired — (Date)

          The creation date and time for a backend environment that is part of an Amplify app.

        • updateTimerequired — (Date)

          The last updated date and time for a backend environment that is part of an Amplify app.

      • nextToken — (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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listBranches(params = {}, callback) ⇒ AWS.Request

Lists the branches of an Amplify app.

Service Reference:

Examples:

Calling the listBranches operation

var params = {
  appId: 'STRING_VALUE', /* required */
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
amplify.listBranches(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • appId — (String)

      The unique ID for an Amplify app.

    • nextToken — (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.

    • maxResults — (Integer)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • branches — (Array<map>)

        A list of branches for an Amplify app.

        • branchArnrequired — (String)

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

        • branchNamerequired — (String)

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

        • descriptionrequired — (String)

          The description for the branch that is part of an Amplify app.

        • tags — (map<String>)

          The tag for the branch of an Amplify app.

        • stagerequired — (String)

          The current stage for the branch that is part of an Amplify app.

          Possible values include:
          • "PRODUCTION"
          • "BETA"
          • "DEVELOPMENT"
          • "EXPERIMENTAL"
          • "PULL_REQUEST"
        • displayNamerequired — (String)

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

        • enableNotificationrequired — (Boolean)

          Enables notifications for a branch that is part of an Amplify app.

        • createTimerequired — (Date)

          The creation date and time for a branch that is part of an Amplify app.

        • updateTimerequired — (Date)

          The last updated date and time for a branch that is part of an Amplify app.

        • environmentVariablesrequired — (map<String>)

          The environment variables specific to a branch of an Amplify app.

        • enableAutoBuildrequired — (Boolean)

          Enables auto-building on push for a branch of an Amplify app.

        • customDomainsrequired — (Array<String>)

          The custom domains for a branch of an Amplify app.

        • frameworkrequired — (String)

          The framework for a branch of an Amplify app.

        • activeJobIdrequired — (String)

          The ID of the active job for a branch of an Amplify app.

        • totalNumberOfJobsrequired — (String)

          The total number of jobs that are part of an Amplify app.

        • enableBasicAuthrequired — (Boolean)

          Enables basic authorization for a branch of an Amplify app.

        • enablePerformanceMode — (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.

        • thumbnailUrl — (String)

          The thumbnail URL for the branch of an Amplify app.

        • basicAuthCredentials — (String)

          The basic authorization credentials for a branch of an Amplify app. You must base64-encode the authorization credentials and provide them in the format user:password.

        • buildSpec — (String)

          The build specification (build spec) content for the branch of an Amplify app.

        • ttlrequired — (String)

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

        • associatedResources — (Array<String>)

          A list of custom resources that are linked to this branch.

        • enablePullRequestPreviewrequired — (Boolean)

          Enables pull request previews for the branch.

        • pullRequestEnvironmentName — (String)

          The Amplify environment name for the pull request.

        • destinationBranch — (String)

          The destination branch if the branch is a pull request branch.

        • sourceBranch — (String)

          The source branch if the branch is a pull request branch.

        • backendEnvironmentArn — (String)

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

          This property is available to Amplify Gen 1 apps only. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code.

        • backend — (map)

          Describes the backend associated with an Amplify Branch.

          This property is available to Amplify Gen 2 apps only. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code.

          • stackArn — (String)

            The Amazon Resource Name (ARN) for the CloudFormation stack.

      • nextToken — (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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listDomainAssociations(params = {}, callback) ⇒ AWS.Request

Returns the domain associations for an Amplify app.

Service Reference:

Examples:

Calling the listDomainAssociations operation

var params = {
  appId: 'STRING_VALUE', /* required */
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
amplify.listDomainAssociations(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • appId — (String)

      The unique ID for an Amplify app.

    • nextToken — (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.

    • maxResults — (Integer)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • domainAssociations — (Array<map>)

        A list of domain associations.

        • domainAssociationArnrequired — (String)

          The Amazon Resource Name (ARN) for the domain association.

        • domainNamerequired — (String)

          The name of the domain.

        • enableAutoSubDomainrequired — (Boolean)

          Enables the automated creation of subdomains for branches.

        • autoSubDomainCreationPatterns — (Array<String>)

          Sets branch patterns for automatic subdomain creation.

        • autoSubDomainIAMRole — (String)

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

        • domainStatusrequired — (String)

          The current status of the domain association.

          Possible values include:
          • "PENDING_VERIFICATION"
          • "IN_PROGRESS"
          • "AVAILABLE"
          • "IMPORTING_CUSTOM_CERTIFICATE"
          • "PENDING_DEPLOYMENT"
          • "AWAITING_APP_CNAME"
          • "FAILED"
          • "CREATING"
          • "REQUESTING_CERTIFICATE"
          • "UPDATING"
        • updateStatus — (String)

          The status of the domain update operation that is currently in progress. The following list describes the valid update states.

          REQUESTING_CERTIFICATE

          The certificate is in the process of being updated.

          PENDING_VERIFICATION

          Indicates that an Amplify managed certificate is in the process of being verified. This occurs during the creation of a custom domain or when a custom domain is updated to use a managed certificate.

          IMPORTING_CUSTOM_CERTIFICATE

          Indicates that an Amplify custom certificate is in the process of being imported. This occurs during the creation of a custom domain or when a custom domain is updated to use a custom certificate.

          PENDING_DEPLOYMENT

          Indicates that the subdomain or certificate changes are being propagated.

          AWAITING_APP_CNAME

          Amplify is waiting for CNAME records corresponding to subdomains to be propagated. If your custom domain is on RouteĀ 53, Amplify handles this for you automatically. For more information about custom domains, see Setting up custom domains in the Amplify Hosting User Guide.

          UPDATE_COMPLETE

          The certificate has been associated with a domain.

          UPDATE_FAILED

          The certificate has failed to be provisioned or associated, and there is no existing active certificate to roll back to.

          Possible values include:
          • "REQUESTING_CERTIFICATE"
          • "PENDING_VERIFICATION"
          • "IMPORTING_CUSTOM_CERTIFICATE"
          • "PENDING_DEPLOYMENT"
          • "AWAITING_APP_CNAME"
          • "UPDATE_COMPLETE"
          • "UPDATE_FAILED"
        • statusReasonrequired — (String)

          Additional information that describes why the domain association is in the current state.

        • certificateVerificationDNSRecord — (String)

          The DNS record for certificate verification.

        • subDomainsrequired — (Array<map>)

          The subdomains for the domain association.

          • subDomainSettingrequired — (map)

            Describes the settings for the subdomain.

            • prefixrequired — (String)

              The prefix setting for the subdomain.

            • branchNamerequired — (String)

              The branch name setting for the subdomain.

          • verifiedrequired — (Boolean)

            The verified status of the subdomain

          • dnsRecordrequired — (String)

            The DNS record for the subdomain.

        • certificate — (map)

          Describes the SSL/TLS certificate for the domain association. This can be your own custom certificate or the default certificate that Amplify provisions for you.

          If you are updating your domain to use a different certificate, certificate points to the new certificate that is being created instead of the current active certificate. Otherwise, certificate points to the current active certificate.

          • typerequired — (String)

            The type of SSL/TLS certificate that you want to use.

            Specify AMPLIFY_MANAGED to use the default certificate that Amplify provisions for you.

            Specify CUSTOM to use your own certificate that you have already added to Certificate Manager in your Amazon Web Services account. Make sure you request (or import) the certificate in the US East (N. Virginia) Region (us-east-1). For more information about using ACM, see Importing certificates into Certificate Manager in the ACM User guide.

            Possible values include:
            • "AMPLIFY_MANAGED"
            • "CUSTOM"
          • customCertificateArn — (String)

            The Amazon resource name (ARN) for a custom certificate that you have already added to Certificate Manager in your Amazon Web Services account.

            This field is required only when the certificate type is CUSTOM.

          • certificateVerificationDNSRecord — (String)

            The DNS record for certificate verification.

      • nextToken — (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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listJobs(params = {}, callback) ⇒ AWS.Request

Lists the jobs for a branch of an Amplify app.

Service Reference:

Examples:

Calling the listJobs operation

var params = {
  appId: 'STRING_VALUE', /* required */
  branchName: 'STRING_VALUE', /* required */
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
amplify.listJobs(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • appId — (String)

      The unique ID for an Amplify app.

    • branchName — (String)

      The name of the branch to use for the request.

    • nextToken — (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.

    • maxResults — (Integer)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • jobSummaries — (Array<map>)

        The result structure for the list job result request.

        • jobArnrequired — (String)

          The Amazon Resource Name (ARN) for the job.

        • jobIdrequired — (String)

          The unique ID for the job.

        • commitIdrequired — (String)

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

        • commitMessagerequired — (String)

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

        • commitTimerequired — (Date)

          The commit date and time for the job.

        • startTimerequired — (Date)

          The start date and time for the job.

        • statusrequired — (String)

          The current status for the job.

          Possible values include:
          • "PENDING"
          • "PROVISIONING"
          • "RUNNING"
          • "FAILED"
          • "SUCCEED"
          • "CANCELLING"
          • "CANCELLED"
        • endTime — (Date)

          The end date and time for the job.

        • jobTyperequired — (String)

          The type for the job. If the value is RELEASE, the job was manually released from its source by using the StartJob API. If the value is RETRY, the job was manually retried using the StartJob API. If the value is WEB_HOOK, the job was automatically triggered by webhooks.

          Possible values include:
          • "RELEASE"
          • "RETRY"
          • "MANUAL"
          • "WEB_HOOK"
      • nextToken — (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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listTagsForResource(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the listTagsForResource operation

var params = {
  resourceArn: 'STRING_VALUE' /* required */
};
amplify.listTagsForResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • resourceArn — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • tags — (map<String>)

        A list of tags for the specified The Amazon Resource Name (ARN).

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listWebhooks(params = {}, callback) ⇒ AWS.Request

Returns a list of webhooks for an Amplify app.

Service Reference:

Examples:

Calling the listWebhooks operation

var params = {
  appId: 'STRING_VALUE', /* required */
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
amplify.listWebhooks(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • appId — (String)

      The unique ID for an Amplify app.

    • nextToken — (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.

    • maxResults — (Integer)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • webhooks — (Array<map>)

        A list of webhooks.

        • webhookArnrequired — (String)

          The Amazon Resource Name (ARN) for the webhook.

        • webhookIdrequired — (String)

          The ID of the webhook.

        • webhookUrlrequired — (String)

          The URL of the webhook.

        • branchNamerequired — (String)

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

        • descriptionrequired — (String)

          The description for a webhook.

        • createTimerequired — (Date)

          The create date and time for a webhook.

        • updateTimerequired — (Date)

          Updates the date and time for a webhook.

      • nextToken — (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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

startDeployment(params = {}, callback) ⇒ AWS.Request

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

The maximum duration between the CreateDeployment call and the StartDeployment call cannot exceed 8 hours. If the duration exceeds 8 hours, the StartDeployment call and the associated Job will fail.

Service Reference:

Examples:

Calling the startDeployment operation

var params = {
  appId: 'STRING_VALUE', /* required */
  branchName: 'STRING_VALUE', /* required */
  jobId: 'STRING_VALUE',
  sourceUrl: 'STRING_VALUE'
};
amplify.startDeployment(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • appId — (String)

      The unique ID for an Amplify app.

    • branchName — (String)

      The name of the branch to use for the job.

    • jobId — (String)

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

    • sourceUrl — (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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • jobSummary — (map)

        The summary for the job.

        • jobArnrequired — (String)

          The Amazon Resource Name (ARN) for the job.

        • jobIdrequired — (String)

          The unique ID for the job.

        • commitIdrequired — (String)

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

        • commitMessagerequired — (String)

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

        • commitTimerequired — (Date)

          The commit date and time for the job.

        • startTimerequired — (Date)

          The start date and time for the job.

        • statusrequired — (String)

          The current status for the job.

          Possible values include:
          • "PENDING"
          • "PROVISIONING"
          • "RUNNING"
          • "FAILED"
          • "SUCCEED"
          • "CANCELLING"
          • "CANCELLED"
        • endTime — (Date)

          The end date and time for the job.

        • jobTyperequired — (String)

          The type for the job. If the value is RELEASE, the job was manually released from its source by using the StartJob API. If the value is RETRY, the job was manually retried using the StartJob API. If the value is WEB_HOOK, the job was automatically triggered by webhooks.

          Possible values include:
          • "RELEASE"
          • "RETRY"
          • "MANUAL"
          • "WEB_HOOK"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

startJob(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the startJob operation

var params = {
  appId: 'STRING_VALUE', /* required */
  branchName: 'STRING_VALUE', /* required */
  jobType: RELEASE | RETRY | MANUAL | WEB_HOOK, /* required */
  commitId: 'STRING_VALUE',
  commitMessage: 'STRING_VALUE',
  commitTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
  jobId: 'STRING_VALUE',
  jobReason: 'STRING_VALUE'
};
amplify.startJob(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • appId — (String)

      The unique ID for an Amplify app.

    • branchName — (String)

      The name of the branch to use for the job.

    • jobId — (String)

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

    • jobType — (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.

      Possible values include:
      • "RELEASE"
      • "RETRY"
      • "MANUAL"
      • "WEB_HOOK"
    • jobReason — (String)

      A descriptive reason for starting the job.

    • commitId — (String)

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

    • commitMessage — (String)

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

    • commitTime — (Date)

      The commit date and time for the job.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • jobSummary — (map)

        The summary for the job.

        • jobArnrequired — (String)

          The Amazon Resource Name (ARN) for the job.

        • jobIdrequired — (String)

          The unique ID for the job.

        • commitIdrequired — (String)

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

        • commitMessagerequired — (String)

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

        • commitTimerequired — (Date)

          The commit date and time for the job.

        • startTimerequired — (Date)

          The start date and time for the job.

        • statusrequired — (String)

          The current status for the job.

          Possible values include:
          • "PENDING"
          • "PROVISIONING"
          • "RUNNING"
          • "FAILED"
          • "SUCCEED"
          • "CANCELLING"
          • "CANCELLED"
        • endTime — (Date)

          The end date and time for the job.

        • jobTyperequired — (String)

          The type for the job. If the value is RELEASE, the job was manually released from its source by using the StartJob API. If the value is RETRY, the job was manually retried using the StartJob API. If the value is WEB_HOOK, the job was automatically triggered by webhooks.

          Possible values include:
          • "RELEASE"
          • "RETRY"
          • "MANUAL"
          • "WEB_HOOK"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

stopJob(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the stopJob operation

var params = {
  appId: 'STRING_VALUE', /* required */
  branchName: 'STRING_VALUE', /* required */
  jobId: 'STRING_VALUE' /* required */
};
amplify.stopJob(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • appId — (String)

      The unique ID for an Amplify app.

    • branchName — (String)

      The name of the branch to use for the stop job request.

    • jobId — (String)

      The unique id for the job.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • jobSummary — (map)

        The summary for the job.

        • jobArnrequired — (String)

          The Amazon Resource Name (ARN) for the job.

        • jobIdrequired — (String)

          The unique ID for the job.

        • commitIdrequired — (String)

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

        • commitMessagerequired — (String)

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

        • commitTimerequired — (Date)

          The commit date and time for the job.

        • startTimerequired — (Date)

          The start date and time for the job.

        • statusrequired — (String)

          The current status for the job.

          Possible values include:
          • "PENDING"
          • "PROVISIONING"
          • "RUNNING"
          • "FAILED"
          • "SUCCEED"
          • "CANCELLING"
          • "CANCELLED"
        • endTime — (Date)

          The end date and time for the job.

        • jobTyperequired — (String)

          The type for the job. If the value is RELEASE, the job was manually released from its source by using the StartJob API. If the value is RETRY, the job was manually retried using the StartJob API. If the value is WEB_HOOK, the job was automatically triggered by webhooks.

          Possible values include:
          • "RELEASE"
          • "RETRY"
          • "MANUAL"
          • "WEB_HOOK"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

tagResource(params = {}, callback) ⇒ AWS.Request

Tags the resource with a tag key and value.

Service Reference:

Examples:

Calling the tagResource operation

var params = {
  resourceArn: 'STRING_VALUE', /* required */
  tags: { /* required */
    '<TagKey>': 'STRING_VALUE',
    /* '<TagKey>': ... */
  }
};
amplify.tagResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • resourceArn — (String)

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

    • tags — (map<String>)

      The tags used to tag the resource.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

untagResource(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the untagResource operation

var params = {
  resourceArn: 'STRING_VALUE', /* required */
  tagKeys: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
amplify.untagResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • resourceArn — (String)

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

    • tagKeys — (Array<String>)

      The tag keys to use to untag a resource.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateApp(params = {}, callback) ⇒ AWS.Request

Updates an existing Amplify app.

Service Reference:

Examples:

Calling the updateApp operation

var params = {
  appId: 'STRING_VALUE', /* required */
  accessToken: 'STRING_VALUE',
  autoBranchCreationConfig: {
    basicAuthCredentials: 'STRING_VALUE',
    buildSpec: 'STRING_VALUE',
    enableAutoBuild: true || false,
    enableBasicAuth: true || false,
    enablePerformanceMode: true || false,
    enablePullRequestPreview: true || false,
    environmentVariables: {
      '<EnvKey>': 'STRING_VALUE',
      /* '<EnvKey>': ... */
    },
    framework: 'STRING_VALUE',
    pullRequestEnvironmentName: 'STRING_VALUE',
    stage: PRODUCTION | BETA | DEVELOPMENT | EXPERIMENTAL | PULL_REQUEST
  },
  autoBranchCreationPatterns: [
    'STRING_VALUE',
    /* more items */
  ],
  basicAuthCredentials: 'STRING_VALUE',
  buildSpec: 'STRING_VALUE',
  cacheConfig: {
    type: AMPLIFY_MANAGED | AMPLIFY_MANAGED_NO_COOKIES /* required */
  },
  customHeaders: 'STRING_VALUE',
  customRules: [
    {
      source: 'STRING_VALUE', /* required */
      target: 'STRING_VALUE', /* required */
      condition: 'STRING_VALUE',
      status: 'STRING_VALUE'
    },
    /* more items */
  ],
  description: 'STRING_VALUE',
  enableAutoBranchCreation: true || false,
  enableBasicAuth: true || false,
  enableBranchAutoBuild: true || false,
  enableBranchAutoDeletion: true || false,
  environmentVariables: {
    '<EnvKey>': 'STRING_VALUE',
    /* '<EnvKey>': ... */
  },
  iamServiceRoleArn: 'STRING_VALUE',
  name: 'STRING_VALUE',
  oauthToken: 'STRING_VALUE',
  platform: WEB | WEB_DYNAMIC | WEB_COMPUTE,
  repository: 'STRING_VALUE'
};
amplify.updateApp(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • appId — (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 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 to WEB_COMPUTE. For an app requiring Amplify Hosting's original SSR support only, set the platform type to WEB_DYNAMIC.

      Possible values include:
      • "WEB"
      • "WEB_DYNAMIC"
      • "WEB_COMPUTE"
    • iamServiceRoleArn — (String)

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

    • environmentVariables — (map<String>)

      The environment variables for an Amplify app.

    • enableBranchAutoBuild — (Boolean)

      Enables branch auto-building for an Amplify app.

    • enableBranchAutoDeletion — (Boolean)

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

    • enableBasicAuth — (Boolean)

      Enables basic authorization for an Amplify app.

    • basicAuthCredentials — (String)

      The basic authorization credentials for an Amplify app. You must base64-encode the authorization credentials and provide them in the format user:password.

    • customRules — (Array<map>)

      The custom redirect and rewrite rules for an Amplify app.

      • sourcerequired — (String)

        The source pattern for a URL rewrite or redirect rule.

      • targetrequired — (String)

        The target pattern for a URL rewrite or redirect rule.

      • status — (String)

        The status code for a URL rewrite or redirect rule.

        200

        Represents a 200 rewrite rule.

        301

        Represents a 301 (moved permanently) redirect rule. This and all future requests should be directed to the target URL.

        302

        Represents a 302 temporary redirect rule.

        404

        Represents a 404 redirect rule.

        404-200

        Represents a 404 rewrite rule.

      • condition — (String)

        The condition for a URL rewrite or redirect rule, such as a country code.

    • buildSpec — (String)

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

    • customHeaders — (String)

      The custom HTTP headers for an Amplify app.

    • enableAutoBranchCreation — (Boolean)

      Enables automated branch creation for an Amplify app.

    • autoBranchCreationPatterns — (Array<String>)

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

    • autoBranchCreationConfig — (map)

      The automated branch creation configuration for an Amplify app.

      • stage — (String)

        Describes the current stage for the autocreated branch.

        Possible values include:
        • "PRODUCTION"
        • "BETA"
        • "DEVELOPMENT"
        • "EXPERIMENTAL"
        • "PULL_REQUEST"
      • framework — (String)

        The framework for the autocreated branch.

      • enableAutoBuild — (Boolean)

        Enables auto building for the autocreated branch.

      • environmentVariables — (map<String>)

        The environment variables for the autocreated branch.

      • basicAuthCredentials — (String)

        The basic authorization credentials for the autocreated branch. You must base64-encode the authorization credentials and provide them in the format user:password.

      • enableBasicAuth — (Boolean)

        Enables basic authorization for the autocreated branch.

      • enablePerformanceMode — (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.

      • buildSpec — (String)

        The build specification (build spec) for the autocreated branch.

      • enablePullRequestPreview — (Boolean)

        Enables pull request previews for the autocreated branch.

      • pullRequestEnvironmentName — (String)

        The Amplify environment name for the pull request.

    • repository — (String)

      The name of the Git repository for an Amplify app.

    • oauthToken — (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 using SSH cloning. The OAuth token is not stored.

      Use oauthToken for 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 oauthToken or accessToken when 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 .

    • accessToken — (String)

      The 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 accessToken for GitHub repositories only. To authorize access to a repository provider such as Bitbucket or CodeCommit, use oauthToken.

      You must specify either accessToken or oauthToken when 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 .

    • cacheConfig — (map)

      The cache configuration for the Amplify app.

      • typerequired — (String)

        The type of cache configuration to use for an Amplify app.

        The AMPLIFY_MANAGED cache configuration automatically applies an optimized cache configuration for your app based on its platform, routing rules, and rewrite rules. This is the default setting.

        The AMPLIFY_MANAGED_NO_COOKIES cache configuration type is the same as AMPLIFY_MANAGED, except that it excludes all cookies from the cache key.

        Possible values include:
        • "AMPLIFY_MANAGED"
        • "AMPLIFY_MANAGED_NO_COOKIES"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • app — (map)

        Represents the updated Amplify app.

        • appIdrequired — (String)

          The unique ID of the Amplify app.

        • appArnrequired — (String)

          The Amazon Resource Name (ARN) of the Amplify app.

        • namerequired — (String)

          The name for the Amplify app.

        • tags — (map<String>)

          The tag for the Amplify app.

        • descriptionrequired — (String)

          The description for the Amplify app.

        • repositoryrequired — (String)

          The Git repository for the Amplify app.

        • platformrequired — (String)

          The 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 to WEB_COMPUTE. For an app requiring Amplify Hosting's original SSR support only, set the platform type to WEB_DYNAMIC.

          Possible values include:
          • "WEB"
          • "WEB_DYNAMIC"
          • "WEB_COMPUTE"
        • createTimerequired — (Date)

          Creates a date and time for the Amplify app.

        • updateTimerequired — (Date)

          Updates the date and time for the Amplify app.

        • iamServiceRoleArn — (String)

          The AWS Identity and Access Management (IAM) service role for the Amazon Resource Name (ARN) of the Amplify app.

        • environmentVariablesrequired — (map<String>)

          The environment variables for the 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.

        • defaultDomainrequired — (String)

          The default domain for the Amplify app.

        • enableBranchAutoBuildrequired — (Boolean)

          Enables the auto-building of branches for the Amplify app.

        • enableBranchAutoDeletion — (Boolean)

          Automatically disconnect a branch in the Amplify console when you delete a branch from your Git repository.

        • enableBasicAuthrequired — (Boolean)

          Enables basic authorization for the Amplify app's branches.

        • basicAuthCredentials — (String)

          The basic authorization credentials for branches for the Amplify app. You must base64-encode the authorization credentials and provide them in the format user:password.

        • customRules — (Array<map>)

          Describes the custom redirect and rewrite rules for the Amplify app.

          • sourcerequired — (String)

            The source pattern for a URL rewrite or redirect rule.

          • targetrequired — (String)

            The target pattern for a URL rewrite or redirect rule.

          • status — (String)

            The status code for a URL rewrite or redirect rule.

            200

            Represents a 200 rewrite rule.

            301

            Represents a 301 (moved permanently) redirect rule. This and all future requests should be directed to the target URL.

            302

            Represents a 302 temporary redirect rule.

            404

            Represents a 404 redirect rule.

            404-200

            Represents a 404 rewrite rule.

          • condition — (String)

            The condition for a URL rewrite or redirect rule, such as a country code.

        • productionBranch — (map)

          Describes the information about a production branch of the Amplify app.

          • lastDeployTime — (Date)

            The last deploy time of the production branch.

          • status — (String)

            The status of the production branch.

          • thumbnailUrl — (String)

            The thumbnail URL for the production branch.

          • branchName — (String)

            The branch name for the production branch.

        • buildSpec — (String)

          Describes the content of the build specification (build spec) for the Amplify app.

        • customHeaders — (String)

          Describes the custom HTTP headers for the Amplify app.

        • enableAutoBranchCreation — (Boolean)

          Enables automated branch creation for the Amplify app.

        • autoBranchCreationPatterns — (Array<String>)

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

        • autoBranchCreationConfig — (map)

          Describes the automated branch creation configuration for the Amplify app.

          • stage — (String)

            Describes the current stage for the autocreated branch.

            Possible values include:
            • "PRODUCTION"
            • "BETA"
            • "DEVELOPMENT"
            • "EXPERIMENTAL"
            • "PULL_REQUEST"
          • framework — (String)

            The framework for the autocreated branch.

          • enableAutoBuild — (Boolean)

            Enables auto building for the autocreated branch.

          • environmentVariables — (map<String>)

            The environment variables for the autocreated branch.

          • basicAuthCredentials — (String)

            The basic authorization credentials for the autocreated branch. You must base64-encode the authorization credentials and provide them in the format user:password.

          • enableBasicAuth — (Boolean)

            Enables basic authorization for the autocreated branch.

          • enablePerformanceMode — (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.

          • buildSpec — (String)

            The build specification (build spec) for the autocreated branch.

          • enablePullRequestPreview — (Boolean)

            Enables pull request previews for the autocreated branch.

          • pullRequestEnvironmentName — (String)

            The Amplify environment name for the pull request.

        • repositoryCloneMethod — (String)
          Note: This is for internal use.

          The Amplify service uses this parameter to specify the authentication protocol to use to access the Git repository for an Amplify app. Amplify specifies TOKEN for a GitHub repository, SIGV4 for an Amazon Web Services CodeCommit repository, and SSH for GitLab and Bitbucket repositories.

          Possible values include:
          • "SSH"
          • "TOKEN"
          • "SIGV4"
        • cacheConfig — (map)

          The cache configuration for the Amplify app. If you don't specify the cache configuration type, Amplify uses the default AMPLIFY_MANAGED setting.

          • typerequired — (String)

            The type of cache configuration to use for an Amplify app.

            The AMPLIFY_MANAGED cache configuration automatically applies an optimized cache configuration for your app based on its platform, routing rules, and rewrite rules. This is the default setting.

            The AMPLIFY_MANAGED_NO_COOKIES cache configuration type is the same as AMPLIFY_MANAGED, except that it excludes all cookies from the cache key.

            Possible values include:
            • "AMPLIFY_MANAGED"
            • "AMPLIFY_MANAGED_NO_COOKIES"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateBranch(params = {}, callback) ⇒ AWS.Request

Updates a branch for an Amplify app.

Service Reference:

Examples:

Calling the updateBranch operation

var params = {
  appId: 'STRING_VALUE', /* required */
  branchName: 'STRING_VALUE', /* required */
  backend: {
    stackArn: 'STRING_VALUE'
  },
  backendEnvironmentArn: 'STRING_VALUE',
  basicAuthCredentials: 'STRING_VALUE',
  buildSpec: 'STRING_VALUE',
  description: 'STRING_VALUE',
  displayName: 'STRING_VALUE',
  enableAutoBuild: true || false,
  enableBasicAuth: true || false,
  enableNotification: true || false,
  enablePerformanceMode: true || false,
  enablePullRequestPreview: true || false,
  environmentVariables: {
    '<EnvKey>': 'STRING_VALUE',
    /* '<EnvKey>': ... */
  },
  framework: 'STRING_VALUE',
  pullRequestEnvironmentName: 'STRING_VALUE',
  stage: PRODUCTION | BETA | DEVELOPMENT | EXPERIMENTAL | PULL_REQUEST,
  ttl: 'STRING_VALUE'
};
amplify.updateBranch(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • appId — (String)

      The unique ID for an Amplify app.

    • branchName — (String)

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

      Possible values include:
      • "PRODUCTION"
      • "BETA"
      • "DEVELOPMENT"
      • "EXPERIMENTAL"
      • "PULL_REQUEST"
    • enableNotification — (Boolean)

      Enables notifications for the branch.

    • enableAutoBuild — (Boolean)

      Enables auto building for the branch.

    • environmentVariables — (map<String>)

      The environment variables for the branch.

    • basicAuthCredentials — (String)

      The basic authorization credentials for the branch. You must base64-encode the authorization credentials and provide them in the format user:password.

    • enableBasicAuth — (Boolean)

      Enables basic authorization for the branch.

    • enablePerformanceMode — (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.

    • buildSpec — (String)

      The build specification (build spec) for the branch.

    • ttl — (String)

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

    • displayName — (String)

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

    • enablePullRequestPreview — (Boolean)

      Enables pull request previews for this branch.

    • pullRequestEnvironmentName — (String)

      The Amplify environment name for the pull request.

    • backendEnvironmentArn — (String)

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

      This field is available to Amplify Gen 1 apps only where the backend is created using Amplify Studio or the Amplify command line interface (CLI).

    • backend — (map)

      The backend for a Branch of an Amplify app. Use for a backend created from an CloudFormation stack.

      This field is available to Amplify Gen 2 apps only. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code.

      • stackArn — (String)

        The Amazon Resource Name (ARN) for the CloudFormation stack.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • branch — (map)

        The branch for an Amplify app, which maps to a third-party repository branch.

        • branchArnrequired — (String)

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

        • branchNamerequired — (String)

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

        • descriptionrequired — (String)

          The description for the branch that is part of an Amplify app.

        • tags — (map<String>)

          The tag for the branch of an Amplify app.

        • stagerequired — (String)

          The current stage for the branch that is part of an Amplify app.

          Possible values include:
          • "PRODUCTION"
          • "BETA"
          • "DEVELOPMENT"
          • "EXPERIMENTAL"
          • "PULL_REQUEST"
        • displayNamerequired — (String)

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

        • enableNotificationrequired — (Boolean)

          Enables notifications for a branch that is part of an Amplify app.

        • createTimerequired — (Date)

          The creation date and time for a branch that is part of an Amplify app.

        • updateTimerequired — (Date)

          The last updated date and time for a branch that is part of an Amplify app.

        • environmentVariablesrequired — (map<String>)

          The environment variables specific to a branch of an Amplify app.

        • enableAutoBuildrequired — (Boolean)

          Enables auto-building on push for a branch of an Amplify app.

        • customDomainsrequired — (Array<String>)

          The custom domains for a branch of an Amplify app.

        • frameworkrequired — (String)

          The framework for a branch of an Amplify app.

        • activeJobIdrequired — (String)

          The ID of the active job for a branch of an Amplify app.

        • totalNumberOfJobsrequired — (String)

          The total number of jobs that are part of an Amplify app.

        • enableBasicAuthrequired — (Boolean)

          Enables basic authorization for a branch of an Amplify app.

        • enablePerformanceMode — (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.

        • thumbnailUrl — (String)

          The thumbnail URL for the branch of an Amplify app.

        • basicAuthCredentials — (String)

          The basic authorization credentials for a branch of an Amplify app. You must base64-encode the authorization credentials and provide them in the format user:password.

        • buildSpec — (String)

          The build specification (build spec) content for the branch of an Amplify app.

        • ttlrequired — (String)

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

        • associatedResources — (Array<String>)

          A list of custom resources that are linked to this branch.

        • enablePullRequestPreviewrequired — (Boolean)

          Enables pull request previews for the branch.

        • pullRequestEnvironmentName — (String)

          The Amplify environment name for the pull request.

        • destinationBranch — (String)

          The destination branch if the branch is a pull request branch.

        • sourceBranch — (String)

          The source branch if the branch is a pull request branch.

        • backendEnvironmentArn — (String)

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

          This property is available to Amplify Gen 1 apps only. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code.

        • backend — (map)

          Describes the backend associated with an Amplify Branch.

          This property is available to Amplify Gen 2 apps only. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code.

          • stackArn — (String)

            The Amazon Resource Name (ARN) for the CloudFormation stack.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateDomainAssociation(params = {}, callback) ⇒ AWS.Request

Creates a new domain association for an Amplify app.

Service Reference:

Examples:

Calling the updateDomainAssociation operation

var params = {
  appId: 'STRING_VALUE', /* required */
  domainName: 'STRING_VALUE', /* required */
  autoSubDomainCreationPatterns: [
    'STRING_VALUE',
    /* more items */
  ],
  autoSubDomainIAMRole: 'STRING_VALUE',
  certificateSettings: {
    type: AMPLIFY_MANAGED | CUSTOM, /* required */
    customCertificateArn: 'STRING_VALUE'
  },
  enableAutoSubDomain: true || false,
  subDomainSettings: [
    {
      branchName: 'STRING_VALUE', /* required */
      prefix: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
amplify.updateDomainAssociation(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • appId — (String)

      The unique ID for an Amplify app.

    • domainName — (String)

      The name of the domain.

    • enableAutoSubDomain — (Boolean)

      Enables the automated creation of subdomains for branches.

    • subDomainSettings — (Array<map>)

      Describes the settings for the subdomain.

      • prefixrequired — (String)

        The prefix setting for the subdomain.

      • branchNamerequired — (String)

        The branch name setting for the subdomain.

    • autoSubDomainCreationPatterns — (Array<String>)

      Sets the branch patterns for automatic subdomain creation.

    • autoSubDomainIAMRole — (String)

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

    • certificateSettings — (map)

      The type of SSL/TLS certificate to use for your custom domain.

      • typerequired — (String)

        The certificate type.

        Specify AMPLIFY_MANAGED to use the default certificate that Amplify provisions for you.

        Specify CUSTOM to use your own certificate that you have already added to Certificate Manager in your Amazon Web Services account. Make sure you request (or import) the certificate in the US East (N. Virginia) Region (us-east-1). For more information about using ACM, see Importing certificates into Certificate Manager in the ACM User guide.

        Possible values include:
        • "AMPLIFY_MANAGED"
        • "CUSTOM"
      • customCertificateArn — (String)

        The Amazon resource name (ARN) for the custom certificate that you have already added to Certificate Manager in your Amazon Web Services account.

        This field is required only when the certificate type is CUSTOM.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • domainAssociation — (map)

        Describes a domain association, which associates a custom domain with an Amplify app.

        • domainAssociationArnrequired — (String)

          The Amazon Resource Name (ARN) for the domain association.

        • domainNamerequired — (String)

          The name of the domain.

        • enableAutoSubDomainrequired — (Boolean)

          Enables the automated creation of subdomains for branches.

        • autoSubDomainCreationPatterns — (Array<String>)

          Sets branch patterns for automatic subdomain creation.

        • autoSubDomainIAMRole — (String)

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

        • domainStatusrequired — (String)

          The current status of the domain association.

          Possible values include:
          • "PENDING_VERIFICATION"
          • "IN_PROGRESS"
          • "AVAILABLE"
          • "IMPORTING_CUSTOM_CERTIFICATE"
          • "PENDING_DEPLOYMENT"
          • "AWAITING_APP_CNAME"
          • "FAILED"
          • "CREATING"
          • "REQUESTING_CERTIFICATE"
          • "UPDATING"
        • updateStatus — (String)

          The status of the domain update operation that is currently in progress. The following list describes the valid update states.

          REQUESTING_CERTIFICATE

          The certificate is in the process of being updated.

          PENDING_VERIFICATION

          Indicates that an Amplify managed certificate is in the process of being verified. This occurs during the creation of a custom domain or when a custom domain is updated to use a managed certificate.

          IMPORTING_CUSTOM_CERTIFICATE

          Indicates that an Amplify custom certificate is in the process of being imported. This occurs during the creation of a custom domain or when a custom domain is updated to use a custom certificate.

          PENDING_DEPLOYMENT

          Indicates that the subdomain or certificate changes are being propagated.

          AWAITING_APP_CNAME

          Amplify is waiting for CNAME records corresponding to subdomains to be propagated. If your custom domain is on RouteĀ 53, Amplify handles this for you automatically. For more information about custom domains, see Setting up custom domains in the Amplify Hosting User Guide.

          UPDATE_COMPLETE

          The certificate has been associated with a domain.

          UPDATE_FAILED

          The certificate has failed to be provisioned or associated, and there is no existing active certificate to roll back to.

          Possible values include:
          • "REQUESTING_CERTIFICATE"
          • "PENDING_VERIFICATION"
          • "IMPORTING_CUSTOM_CERTIFICATE"
          • "PENDING_DEPLOYMENT"
          • "AWAITING_APP_CNAME"
          • "UPDATE_COMPLETE"
          • "UPDATE_FAILED"
        • statusReasonrequired — (String)

          Additional information that describes why the domain association is in the current state.

        • certificateVerificationDNSRecord — (String)

          The DNS record for certificate verification.

        • subDomainsrequired — (Array<map>)

          The subdomains for the domain association.

          • subDomainSettingrequired — (map)

            Describes the settings for the subdomain.

            • prefixrequired — (String)

              The prefix setting for the subdomain.

            • branchNamerequired — (String)

              The branch name setting for the subdomain.

          • verifiedrequired — (Boolean)

            The verified status of the subdomain

          • dnsRecordrequired — (String)

            The DNS record for the subdomain.

        • certificate — (map)

          Describes the SSL/TLS certificate for the domain association. This can be your own custom certificate or the default certificate that Amplify provisions for you.

          If you are updating your domain to use a different certificate, certificate points to the new certificate that is being created instead of the current active certificate. Otherwise, certificate points to the current active certificate.

          • typerequired — (String)

            The type of SSL/TLS certificate that you want to use.

            Specify AMPLIFY_MANAGED to use the default certificate that Amplify provisions for you.

            Specify CUSTOM to use your own certificate that you have already added to Certificate Manager in your Amazon Web Services account. Make sure you request (or import) the certificate in the US East (N. Virginia) Region (us-east-1). For more information about using ACM, see Importing certificates into Certificate Manager in the ACM User guide.

            Possible values include:
            • "AMPLIFY_MANAGED"
            • "CUSTOM"
          • customCertificateArn — (String)

            The Amazon resource name (ARN) for a custom certificate that you have already added to Certificate Manager in your Amazon Web Services account.

            This field is required only when the certificate type is CUSTOM.

          • certificateVerificationDNSRecord — (String)

            The DNS record for certificate verification.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateWebhook(params = {}, callback) ⇒ AWS.Request

Updates a webhook.

Service Reference:

Examples:

Calling the updateWebhook operation

var params = {
  webhookId: 'STRING_VALUE', /* required */
  branchName: 'STRING_VALUE',
  description: 'STRING_VALUE'
};
amplify.updateWebhook(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • webhookId — (String)

      The unique ID for a webhook.

    • branchName — (String)

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

    • description — (String)

      The description for a webhook.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • webhook — (map)

        Describes a webhook that connects repository events to an Amplify app.

        • webhookArnrequired — (String)

          The Amazon Resource Name (ARN) for the webhook.

        • webhookIdrequired — (String)

          The ID of the webhook.

        • webhookUrlrequired — (String)

          The URL of the webhook.

        • branchNamerequired — (String)

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

        • descriptionrequired — (String)

          The description for a webhook.

        • createTimerequired — (Date)

          The create date and time for a webhook.

        • updateTimerequired — (Date)

          Updates the date and time for a webhook.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.