AWS Amplify

2019/09/27 - AWS Amplify - 3 new11 updated api methods

Changes  Update amplify client to latest version

GetArtifactUrl (new) Link ¶

Retrieves artifact info that corresponds to a artifactId.

See also: AWS API Documentation

Request Syntax

client.get_artifact_url(
    artifactId='string'
)
type artifactId:

string

param artifactId:

[REQUIRED]

Unique Id for a artifact.

rtype:

dict

returns:

Response Syntax

{
    'artifactId': 'string',
    'artifactUrl': 'string'
}

Response Structure

  • (dict) --

    Result structure for the get artifact request.

    • artifactId (string) --

      Unique Id for a artifact.

    • artifactUrl (string) --

      Presigned url for the artifact.

GenerateAccessLogs (new) Link ¶

Retrieve website access logs for a specific time range via a pre-signed URL. Optionally, deliver the logs to a given S3 bucket.

See also: AWS API Documentation

Request Syntax

client.generate_access_logs(
    startTime=datetime(2015, 1, 1),
    endTime=datetime(2015, 1, 1),
    domainName='string',
    appId='string'
)
type startTime:

datetime

param startTime:

The time at which the logs should start, inclusive.

type endTime:

datetime

param endTime:

The time at which the logs should end, inclusive.

type domainName:

string

param domainName:

[REQUIRED]

Name of the domain.

type appId:

string

param appId:

[REQUIRED]

Unique Id for an Amplify App.

rtype:

dict

returns:

Response Syntax

{
    'logUrl': 'string'
}

Response Structure

  • (dict) --

    Result structure for the generate access logs request.

    • logUrl (string) --

      Pre-signed URL for the requested access logs.

ListArtifacts (new) Link ¶

List artifacts with an app, a branch, a job and an artifact type.

See also: AWS API Documentation

Request Syntax

client.list_artifacts(
    appId='string',
    branchName='string',
    jobId='string',
    artifactType='TEST',
    nextToken='string',
    maxResults=123
)
type appId:

string

param appId:

[REQUIRED]

Unique Id for an Amplify App.

type branchName:

string

param branchName:

[REQUIRED]

Name for a branch, part of an Amplify App.

type jobId:

string

param jobId:

[REQUIRED]

Unique Id for an Job.

type artifactType:

string

param artifactType:

Type for an artifact.

type nextToken:

string

param nextToken:

Pagination token. Set to null to start listing artifacts from start. If non-null pagination token is returned in a result, then pass its value in here to list more artifacts.

type maxResults:

integer

param maxResults:

Maximum number of records to list in a single response.

rtype:

dict

returns:

Response Syntax

{
    'artifacts': [
        {
            'artifactFileName': 'string',
            'artifactId': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    Result structure for the list artifacts request.

    • artifacts (list) --

      List of artifacts.

      • (dict) --

        Structure for artifact.

        • artifactFileName (string) --

          File name for the artifact.

        • artifactId (string) --

          Unique Id for a artifact.

    • nextToken (string) --

      Pagination token. If non-null pagination token is returned in a result, then pass its value in another request to fetch more entries.

CreateApp (updated) Link ¶
Changes (request, response)
Request
{'autoBranchCreationConfig': {'enablePullRequestPreview': 'boolean',
                              'stage': {'PULL_REQUEST'}}}
Response
{'app': {'autoBranchCreationConfig': {'enablePullRequestPreview': 'boolean',
                                      'stage': {'PULL_REQUEST'}}}}

Creates a new Amplify App.

See also: AWS API Documentation

Request Syntax

client.create_app(
    name='string',
    description='string',
    repository='string',
    platform='WEB',
    iamServiceRoleArn='string',
    oauthToken='string',
    accessToken='string',
    environmentVariables={
        'string': 'string'
    },
    enableBranchAutoBuild=True|False,
    enableBasicAuth=True|False,
    basicAuthCredentials='string',
    customRules=[
        {
            'source': 'string',
            'target': 'string',
            'status': 'string',
            'condition': 'string'
        },
    ],
    tags={
        'string': 'string'
    },
    buildSpec='string',
    enableAutoBranchCreation=True|False,
    autoBranchCreationPatterns=[
        'string',
    ],
    autoBranchCreationConfig={
        'stage': 'PRODUCTION'|'BETA'|'DEVELOPMENT'|'EXPERIMENTAL'|'PULL_REQUEST',
        'framework': 'string',
        'enableAutoBuild': True|False,
        'environmentVariables': {
            'string': 'string'
        },
        'basicAuthCredentials': 'string',
        'enableBasicAuth': True|False,
        'buildSpec': 'string',
        'enablePullRequestPreview': True|False
    }
)
type name:

string

param name:

[REQUIRED]

Name for the Amplify App

type description:

string

param description:

Description for an Amplify App

type repository:

string

param repository:

Repository for an Amplify App

type platform:

string

param platform:

Platform / framework for an Amplify App

type iamServiceRoleArn:

string

param iamServiceRoleArn:

AWS IAM service role for an Amplify App

type oauthToken:

string

param oauthToken:

OAuth token for 3rd party source control system for an Amplify App, used to create webhook and read-only deploy key. OAuth token is not stored.

type accessToken:

string

param accessToken:

Personal Access token for 3rd party source control system for an Amplify App, used to create webhook and read-only deploy key. Token is not stored.

type environmentVariables:

dict

param environmentVariables:

Environment variables map for an Amplify App.

  • (string) --

    • (string) --

type enableBranchAutoBuild:

boolean

param enableBranchAutoBuild:

Enable the auto building of branches for an Amplify App.

type enableBasicAuth:

boolean

param enableBasicAuth:

Enable Basic Authorization for an Amplify App, this will apply to all branches part of this App.

type basicAuthCredentials:

string

param basicAuthCredentials:

Credentials for Basic Authorization for an Amplify App.

type customRules:

list

param customRules:

Custom rewrite / redirect rules for an Amplify App.

  • (dict) --

    Custom rewrite / redirect rule.

    • source (string) -- [REQUIRED]

      The source pattern for a URL rewrite or redirect rule.

    • target (string) -- [REQUIRED]

      The target pattern for a URL rewrite or redirect rule.

    • status (string) --

      The status code for a URL rewrite or redirect rule.

    • condition (string) --

      The condition for a URL rewrite or redirect rule, e.g. country code.

type tags:

dict

param tags:

Tag for an Amplify App

  • (string) --

    • (string) --

type buildSpec:

string

param buildSpec:

BuildSpec for an Amplify App

type enableAutoBranchCreation:

boolean

param enableAutoBranchCreation:

Enables automated branch creation for the Amplify App.

type autoBranchCreationPatterns:

list

param autoBranchCreationPatterns:

Automated branch creation glob patterns for the Amplify App.

  • (string) --

type autoBranchCreationConfig:

dict

param autoBranchCreationConfig:

Automated branch creation config for the Amplify App.

  • stage (string) --

    Stage for the auto created branch.

  • framework (string) --

    Framework for the auto created branch.

  • enableAutoBuild (boolean) --

    Enables auto building for the auto created branch.

  • environmentVariables (dict) --

    Environment Variables for the auto created branch.

    • (string) --

      • (string) --

  • basicAuthCredentials (string) --

    Basic Authorization credentials for the auto created branch.

  • enableBasicAuth (boolean) --

    Enables Basic Auth for the auto created branch.

  • buildSpec (string) --

    BuildSpec for the auto created branch.

  • enablePullRequestPreview (boolean) --

    Enables Pull Request Preview for auto created branch.

rtype:

dict

returns:

Response Syntax

{
    'app': {
        'appId': 'string',
        'appArn': 'string',
        'name': 'string',
        'tags': {
            'string': 'string'
        },
        'description': 'string',
        'repository': 'string',
        'platform': 'WEB',
        'createTime': datetime(2015, 1, 1),
        'updateTime': datetime(2015, 1, 1),
        'iamServiceRoleArn': 'string',
        'environmentVariables': {
            'string': 'string'
        },
        'defaultDomain': 'string',
        'enableBranchAutoBuild': True|False,
        'enableBasicAuth': True|False,
        'basicAuthCredentials': 'string',
        'customRules': [
            {
                'source': 'string',
                'target': 'string',
                'status': 'string',
                'condition': 'string'
            },
        ],
        'productionBranch': {
            'lastDeployTime': datetime(2015, 1, 1),
            'status': 'string',
            'thumbnailUrl': 'string',
            'branchName': 'string'
        },
        'buildSpec': 'string',
        'enableAutoBranchCreation': True|False,
        'autoBranchCreationPatterns': [
            'string',
        ],
        'autoBranchCreationConfig': {
            'stage': 'PRODUCTION'|'BETA'|'DEVELOPMENT'|'EXPERIMENTAL'|'PULL_REQUEST',
            'framework': 'string',
            'enableAutoBuild': True|False,
            'environmentVariables': {
                'string': 'string'
            },
            'basicAuthCredentials': 'string',
            'enableBasicAuth': True|False,
            'buildSpec': 'string',
            'enablePullRequestPreview': True|False
        }
    }
}

Response Structure

  • (dict) --

    • app (dict) --

      Amplify App represents different branches of a repository for building, deploying, and hosting.

      • appId (string) --

        Unique Id for the Amplify App.

      • appArn (string) --

        ARN for the Amplify App.

      • name (string) --

        Name for the Amplify App.

      • tags (dict) --

        Tag for Amplify App.

        • (string) --

          • (string) --

      • description (string) --

        Description for the Amplify App.

      • repository (string) --

        Repository for the Amplify App.

      • platform (string) --

        Platform for the Amplify App.

      • createTime (datetime) --

        Create date / time for the Amplify App.

      • updateTime (datetime) --

        Update date / time for the Amplify App.

      • iamServiceRoleArn (string) --

        IAM service role ARN for the Amplify App.

      • environmentVariables (dict) --

        Environment Variables for the Amplify App.

        • (string) --

          • (string) --

      • defaultDomain (string) --

        Default domain for the Amplify App.

      • enableBranchAutoBuild (boolean) --

        Enables auto-building of branches for the Amplify App.

      • enableBasicAuth (boolean) --

        Enables Basic Authorization for branches for the Amplify App.

      • basicAuthCredentials (string) --

        Basic Authorization credentials for branches for the Amplify App.

      • customRules (list) --

        Custom redirect / rewrite rules for the Amplify App.

        • (dict) --

          Custom rewrite / redirect rule.

          • source (string) --

            The source pattern for a URL rewrite or redirect rule.

          • target (string) --

            The target pattern for a URL rewrite or redirect rule.

          • status (string) --

            The status code for a URL rewrite or redirect rule.

          • condition (string) --

            The condition for a URL rewrite or redirect rule, e.g. country code.

      • productionBranch (dict) --

        Structure with Production Branch information.

        • lastDeployTime (datetime) --

          Last Deploy Time of Production Branch.

        • status (string) --

          Status of Production Branch.

        • thumbnailUrl (string) --

          Thumbnail URL for Production Branch.

        • branchName (string) --

          Branch Name for Production Branch.

      • buildSpec (string) --

        BuildSpec content for Amplify App.

      • enableAutoBranchCreation (boolean) --

        Enables automated branch creation for the Amplify App.

      • autoBranchCreationPatterns (list) --

        Automated branch creation glob patterns for the Amplify App.

        • (string) --

      • autoBranchCreationConfig (dict) --

        Automated branch creation config for the Amplify App.

        • stage (string) --

          Stage for the auto created branch.

        • framework (string) --

          Framework for the auto created branch.

        • enableAutoBuild (boolean) --

          Enables auto building for the auto created branch.

        • environmentVariables (dict) --

          Environment Variables for the auto created branch.

          • (string) --

            • (string) --

        • basicAuthCredentials (string) --

          Basic Authorization credentials for the auto created branch.

        • enableBasicAuth (boolean) --

          Enables Basic Auth for the auto created branch.

        • buildSpec (string) --

          BuildSpec for the auto created branch.

        • enablePullRequestPreview (boolean) --

          Enables Pull Request Preview for auto created branch.

CreateBranch (updated) Link ¶
Changes (request, response)
Request
{'enablePullRequestPreview': 'boolean', 'stage': {'PULL_REQUEST'}}
Response
{'branch': {'destinationBranch': 'string',
            'enablePullRequestPreview': 'boolean',
            'sourceBranch': 'string',
            'stage': {'PULL_REQUEST'}}}

Creates a new Branch for an Amplify App.

See also: AWS API Documentation

Request Syntax

client.create_branch(
    appId='string',
    branchName='string',
    description='string',
    stage='PRODUCTION'|'BETA'|'DEVELOPMENT'|'EXPERIMENTAL'|'PULL_REQUEST',
    framework='string',
    enableNotification=True|False,
    enableAutoBuild=True|False,
    environmentVariables={
        'string': 'string'
    },
    basicAuthCredentials='string',
    enableBasicAuth=True|False,
    tags={
        'string': 'string'
    },
    buildSpec='string',
    ttl='string',
    displayName='string',
    enablePullRequestPreview=True|False
)
type appId:

string

param appId:

[REQUIRED]

Unique Id for an Amplify App.

type branchName:

string

param branchName:

[REQUIRED]

Name for the branch.

type description:

string

param description:

Description for the branch.

type stage:

string

param stage:

Stage for the branch.

type framework:

string

param framework:

Framework for the branch.

type enableNotification:

boolean

param enableNotification:

Enables notifications for the branch.

type enableAutoBuild:

boolean

param enableAutoBuild:

Enables auto building for the branch.

type environmentVariables:

dict

param environmentVariables:

Environment Variables for the branch.

  • (string) --

    • (string) --

type basicAuthCredentials:

string

param basicAuthCredentials:

Basic Authorization credentials for the branch.

type enableBasicAuth:

boolean

param enableBasicAuth:

Enables Basic Auth for the branch.

type tags:

dict

param tags:

Tag for the branch.

  • (string) --

    • (string) --

type buildSpec:

string

param buildSpec:

BuildSpec for the branch.

type ttl:

string

param ttl:

The content TTL for the website in seconds.

type displayName:

string

param displayName:

Display name for a branch, will use as the default domain prefix.

type enablePullRequestPreview:

boolean

param enablePullRequestPreview:

Enables Pull Request Preview for this branch.

rtype:

dict

returns:

Response Syntax

{
    'branch': {
        'branchArn': 'string',
        'branchName': 'string',
        'description': 'string',
        'tags': {
            'string': 'string'
        },
        'stage': 'PRODUCTION'|'BETA'|'DEVELOPMENT'|'EXPERIMENTAL'|'PULL_REQUEST',
        'displayName': 'string',
        'enableNotification': True|False,
        'createTime': datetime(2015, 1, 1),
        'updateTime': datetime(2015, 1, 1),
        'environmentVariables': {
            'string': 'string'
        },
        'enableAutoBuild': True|False,
        'customDomains': [
            'string',
        ],
        'framework': 'string',
        'activeJobId': 'string',
        'totalNumberOfJobs': 'string',
        'enableBasicAuth': True|False,
        'thumbnailUrl': 'string',
        'basicAuthCredentials': 'string',
        'buildSpec': 'string',
        'ttl': 'string',
        'associatedResources': [
            'string',
        ],
        'enablePullRequestPreview': True|False,
        'destinationBranch': 'string',
        'sourceBranch': 'string'
    }
}

Response Structure

  • (dict) --

    Result structure for create branch request.

    • branch (dict) --

      Branch structure for an Amplify App.

      • branchArn (string) --

        ARN for a branch, part of an Amplify App.

      • branchName (string) --

        Name for a branch, part of an Amplify App.

      • description (string) --

        Description for a branch, part of an Amplify App.

      • tags (dict) --

        Tag for branch for Amplify App.

        • (string) --

          • (string) --

      • stage (string) --

        Stage for a branch, part of an Amplify App.

      • displayName (string) --

        Display name for a branch, will use as the default domain prefix.

      • enableNotification (boolean) --

        Enables notifications for a branch, part of an Amplify App.

      • createTime (datetime) --

        Creation date and time for a branch, part of an Amplify App.

      • updateTime (datetime) --

        Last updated date and time for a branch, part of an Amplify App.

      • environmentVariables (dict) --

        Environment Variables specific to a branch, part of an Amplify App.

        • (string) --

          • (string) --

      • enableAutoBuild (boolean) --

        Enables auto-building on push for a branch, part of an Amplify App.

      • customDomains (list) --

        Custom domains for a branch, part of an Amplify App.

        • (string) --

      • framework (string) --

        Framework for a branch, part of an Amplify App.

      • activeJobId (string) --

        Id of the active job for a branch, part of an Amplify App.

      • totalNumberOfJobs (string) --

        Total number of Jobs part of an Amplify App.

      • enableBasicAuth (boolean) --

        Enables Basic Authorization for a branch, part of an Amplify App.

      • thumbnailUrl (string) --

        Thumbnail URL for the branch.

      • basicAuthCredentials (string) --

        Basic Authorization credentials for a branch, part of an Amplify App.

      • buildSpec (string) --

        BuildSpec content for branch for Amplify App.

      • ttl (string) --

        The content TTL for the website in seconds.

      • associatedResources (list) --

        List of custom resources that are linked to this branch.

        • (string) --

      • enablePullRequestPreview (boolean) --

        Enables Pull Request Preview for this branch.

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

DeleteApp (updated) Link ¶
Changes (response)
{'app': {'autoBranchCreationConfig': {'enablePullRequestPreview': 'boolean',
                                      'stage': {'PULL_REQUEST'}}}}

Delete an existing Amplify App by appId.

See also: AWS API Documentation

Request Syntax

client.delete_app(
    appId='string'
)
type appId:

string

param appId:

[REQUIRED]

Unique Id for an Amplify App.

rtype:

dict

returns:

Response Syntax

{
    'app': {
        'appId': 'string',
        'appArn': 'string',
        'name': 'string',
        'tags': {
            'string': 'string'
        },
        'description': 'string',
        'repository': 'string',
        'platform': 'WEB',
        'createTime': datetime(2015, 1, 1),
        'updateTime': datetime(2015, 1, 1),
        'iamServiceRoleArn': 'string',
        'environmentVariables': {
            'string': 'string'
        },
        'defaultDomain': 'string',
        'enableBranchAutoBuild': True|False,
        'enableBasicAuth': True|False,
        'basicAuthCredentials': 'string',
        'customRules': [
            {
                'source': 'string',
                'target': 'string',
                'status': 'string',
                'condition': 'string'
            },
        ],
        'productionBranch': {
            'lastDeployTime': datetime(2015, 1, 1),
            'status': 'string',
            'thumbnailUrl': 'string',
            'branchName': 'string'
        },
        'buildSpec': 'string',
        'enableAutoBranchCreation': True|False,
        'autoBranchCreationPatterns': [
            'string',
        ],
        'autoBranchCreationConfig': {
            'stage': 'PRODUCTION'|'BETA'|'DEVELOPMENT'|'EXPERIMENTAL'|'PULL_REQUEST',
            'framework': 'string',
            'enableAutoBuild': True|False,
            'environmentVariables': {
                'string': 'string'
            },
            'basicAuthCredentials': 'string',
            'enableBasicAuth': True|False,
            'buildSpec': 'string',
            'enablePullRequestPreview': True|False
        }
    }
}

Response Structure

  • (dict) --

    Result structure for an Amplify App delete request.

    • app (dict) --

      Amplify App represents different branches of a repository for building, deploying, and hosting.

      • appId (string) --

        Unique Id for the Amplify App.

      • appArn (string) --

        ARN for the Amplify App.

      • name (string) --

        Name for the Amplify App.

      • tags (dict) --

        Tag for Amplify App.

        • (string) --

          • (string) --

      • description (string) --

        Description for the Amplify App.

      • repository (string) --

        Repository for the Amplify App.

      • platform (string) --

        Platform for the Amplify App.

      • createTime (datetime) --

        Create date / time for the Amplify App.

      • updateTime (datetime) --

        Update date / time for the Amplify App.

      • iamServiceRoleArn (string) --

        IAM service role ARN for the Amplify App.

      • environmentVariables (dict) --

        Environment Variables for the Amplify App.

        • (string) --

          • (string) --

      • defaultDomain (string) --

        Default domain for the Amplify App.

      • enableBranchAutoBuild (boolean) --

        Enables auto-building of branches for the Amplify App.

      • enableBasicAuth (boolean) --

        Enables Basic Authorization for branches for the Amplify App.

      • basicAuthCredentials (string) --

        Basic Authorization credentials for branches for the Amplify App.

      • customRules (list) --

        Custom redirect / rewrite rules for the Amplify App.

        • (dict) --

          Custom rewrite / redirect rule.

          • source (string) --

            The source pattern for a URL rewrite or redirect rule.

          • target (string) --

            The target pattern for a URL rewrite or redirect rule.

          • status (string) --

            The status code for a URL rewrite or redirect rule.

          • condition (string) --

            The condition for a URL rewrite or redirect rule, e.g. country code.

      • productionBranch (dict) --

        Structure with Production Branch information.

        • lastDeployTime (datetime) --

          Last Deploy Time of Production Branch.

        • status (string) --

          Status of Production Branch.

        • thumbnailUrl (string) --

          Thumbnail URL for Production Branch.

        • branchName (string) --

          Branch Name for Production Branch.

      • buildSpec (string) --

        BuildSpec content for Amplify App.

      • enableAutoBranchCreation (boolean) --

        Enables automated branch creation for the Amplify App.

      • autoBranchCreationPatterns (list) --

        Automated branch creation glob patterns for the Amplify App.

        • (string) --

      • autoBranchCreationConfig (dict) --

        Automated branch creation config for the Amplify App.

        • stage (string) --

          Stage for the auto created branch.

        • framework (string) --

          Framework for the auto created branch.

        • enableAutoBuild (boolean) --

          Enables auto building for the auto created branch.

        • environmentVariables (dict) --

          Environment Variables for the auto created branch.

          • (string) --

            • (string) --

        • basicAuthCredentials (string) --

          Basic Authorization credentials for the auto created branch.

        • enableBasicAuth (boolean) --

          Enables Basic Auth for the auto created branch.

        • buildSpec (string) --

          BuildSpec for the auto created branch.

        • enablePullRequestPreview (boolean) --

          Enables Pull Request Preview for auto created branch.

DeleteBranch (updated) Link ¶
Changes (response)
{'branch': {'destinationBranch': 'string',
            'enablePullRequestPreview': 'boolean',
            'sourceBranch': 'string',
            'stage': {'PULL_REQUEST'}}}

Deletes a branch for an Amplify App.

See also: AWS API Documentation

Request Syntax

client.delete_branch(
    appId='string',
    branchName='string'
)
type appId:

string

param appId:

[REQUIRED]

Unique Id for an Amplify App.

type branchName:

string

param branchName:

[REQUIRED]

Name for the branch.

rtype:

dict

returns:

Response Syntax

{
    'branch': {
        'branchArn': 'string',
        'branchName': 'string',
        'description': 'string',
        'tags': {
            'string': 'string'
        },
        'stage': 'PRODUCTION'|'BETA'|'DEVELOPMENT'|'EXPERIMENTAL'|'PULL_REQUEST',
        'displayName': 'string',
        'enableNotification': True|False,
        'createTime': datetime(2015, 1, 1),
        'updateTime': datetime(2015, 1, 1),
        'environmentVariables': {
            'string': 'string'
        },
        'enableAutoBuild': True|False,
        'customDomains': [
            'string',
        ],
        'framework': 'string',
        'activeJobId': 'string',
        'totalNumberOfJobs': 'string',
        'enableBasicAuth': True|False,
        'thumbnailUrl': 'string',
        'basicAuthCredentials': 'string',
        'buildSpec': 'string',
        'ttl': 'string',
        'associatedResources': [
            'string',
        ],
        'enablePullRequestPreview': True|False,
        'destinationBranch': 'string',
        'sourceBranch': 'string'
    }
}

Response Structure

  • (dict) --

    Result structure for delete branch request.

    • branch (dict) --

      Branch structure for an Amplify App.

      • branchArn (string) --

        ARN for a branch, part of an Amplify App.

      • branchName (string) --

        Name for a branch, part of an Amplify App.

      • description (string) --

        Description for a branch, part of an Amplify App.

      • tags (dict) --

        Tag for branch for Amplify App.

        • (string) --

          • (string) --

      • stage (string) --

        Stage for a branch, part of an Amplify App.

      • displayName (string) --

        Display name for a branch, will use as the default domain prefix.

      • enableNotification (boolean) --

        Enables notifications for a branch, part of an Amplify App.

      • createTime (datetime) --

        Creation date and time for a branch, part of an Amplify App.

      • updateTime (datetime) --

        Last updated date and time for a branch, part of an Amplify App.

      • environmentVariables (dict) --

        Environment Variables specific to a branch, part of an Amplify App.

        • (string) --

          • (string) --

      • enableAutoBuild (boolean) --

        Enables auto-building on push for a branch, part of an Amplify App.

      • customDomains (list) --

        Custom domains for a branch, part of an Amplify App.

        • (string) --

      • framework (string) --

        Framework for a branch, part of an Amplify App.

      • activeJobId (string) --

        Id of the active job for a branch, part of an Amplify App.

      • totalNumberOfJobs (string) --

        Total number of Jobs part of an Amplify App.

      • enableBasicAuth (boolean) --

        Enables Basic Authorization for a branch, part of an Amplify App.

      • thumbnailUrl (string) --

        Thumbnail URL for the branch.

      • basicAuthCredentials (string) --

        Basic Authorization credentials for a branch, part of an Amplify App.

      • buildSpec (string) --

        BuildSpec content for branch for Amplify App.

      • ttl (string) --

        The content TTL for the website in seconds.

      • associatedResources (list) --

        List of custom resources that are linked to this branch.

        • (string) --

      • enablePullRequestPreview (boolean) --

        Enables Pull Request Preview for this branch.

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

GetApp (updated) Link ¶
Changes (response)
{'app': {'autoBranchCreationConfig': {'enablePullRequestPreview': 'boolean',
                                      'stage': {'PULL_REQUEST'}}}}

Retrieves an existing Amplify App by appId.

See also: AWS API Documentation

Request Syntax

client.get_app(
    appId='string'
)
type appId:

string

param appId:

[REQUIRED]

Unique Id for an Amplify App.

rtype:

dict

returns:

Response Syntax

{
    'app': {
        'appId': 'string',
        'appArn': 'string',
        'name': 'string',
        'tags': {
            'string': 'string'
        },
        'description': 'string',
        'repository': 'string',
        'platform': 'WEB',
        'createTime': datetime(2015, 1, 1),
        'updateTime': datetime(2015, 1, 1),
        'iamServiceRoleArn': 'string',
        'environmentVariables': {
            'string': 'string'
        },
        'defaultDomain': 'string',
        'enableBranchAutoBuild': True|False,
        'enableBasicAuth': True|False,
        'basicAuthCredentials': 'string',
        'customRules': [
            {
                'source': 'string',
                'target': 'string',
                'status': 'string',
                'condition': 'string'
            },
        ],
        'productionBranch': {
            'lastDeployTime': datetime(2015, 1, 1),
            'status': 'string',
            'thumbnailUrl': 'string',
            'branchName': 'string'
        },
        'buildSpec': 'string',
        'enableAutoBranchCreation': True|False,
        'autoBranchCreationPatterns': [
            'string',
        ],
        'autoBranchCreationConfig': {
            'stage': 'PRODUCTION'|'BETA'|'DEVELOPMENT'|'EXPERIMENTAL'|'PULL_REQUEST',
            'framework': 'string',
            'enableAutoBuild': True|False,
            'environmentVariables': {
                'string': 'string'
            },
            'basicAuthCredentials': 'string',
            'enableBasicAuth': True|False,
            'buildSpec': 'string',
            'enablePullRequestPreview': True|False
        }
    }
}

Response Structure

  • (dict) --

    • app (dict) --

      Amplify App represents different branches of a repository for building, deploying, and hosting.

      • appId (string) --

        Unique Id for the Amplify App.

      • appArn (string) --

        ARN for the Amplify App.

      • name (string) --

        Name for the Amplify App.

      • tags (dict) --

        Tag for Amplify App.

        • (string) --

          • (string) --

      • description (string) --

        Description for the Amplify App.

      • repository (string) --

        Repository for the Amplify App.

      • platform (string) --

        Platform for the Amplify App.

      • createTime (datetime) --

        Create date / time for the Amplify App.

      • updateTime (datetime) --

        Update date / time for the Amplify App.

      • iamServiceRoleArn (string) --

        IAM service role ARN for the Amplify App.

      • environmentVariables (dict) --

        Environment Variables for the Amplify App.

        • (string) --

          • (string) --

      • defaultDomain (string) --

        Default domain for the Amplify App.

      • enableBranchAutoBuild (boolean) --

        Enables auto-building of branches for the Amplify App.

      • enableBasicAuth (boolean) --

        Enables Basic Authorization for branches for the Amplify App.

      • basicAuthCredentials (string) --

        Basic Authorization credentials for branches for the Amplify App.

      • customRules (list) --

        Custom redirect / rewrite rules for the Amplify App.

        • (dict) --

          Custom rewrite / redirect rule.

          • source (string) --

            The source pattern for a URL rewrite or redirect rule.

          • target (string) --

            The target pattern for a URL rewrite or redirect rule.

          • status (string) --

            The status code for a URL rewrite or redirect rule.

          • condition (string) --

            The condition for a URL rewrite or redirect rule, e.g. country code.

      • productionBranch (dict) --

        Structure with Production Branch information.

        • lastDeployTime (datetime) --

          Last Deploy Time of Production Branch.

        • status (string) --

          Status of Production Branch.

        • thumbnailUrl (string) --

          Thumbnail URL for Production Branch.

        • branchName (string) --

          Branch Name for Production Branch.

      • buildSpec (string) --

        BuildSpec content for Amplify App.

      • enableAutoBranchCreation (boolean) --

        Enables automated branch creation for the Amplify App.

      • autoBranchCreationPatterns (list) --

        Automated branch creation glob patterns for the Amplify App.

        • (string) --

      • autoBranchCreationConfig (dict) --

        Automated branch creation config for the Amplify App.

        • stage (string) --

          Stage for the auto created branch.

        • framework (string) --

          Framework for the auto created branch.

        • enableAutoBuild (boolean) --

          Enables auto building for the auto created branch.

        • environmentVariables (dict) --

          Environment Variables for the auto created branch.

          • (string) --

            • (string) --

        • basicAuthCredentials (string) --

          Basic Authorization credentials for the auto created branch.

        • enableBasicAuth (boolean) --

          Enables Basic Auth for the auto created branch.

        • buildSpec (string) --

          BuildSpec for the auto created branch.

        • enablePullRequestPreview (boolean) --

          Enables Pull Request Preview for auto created branch.

GetBranch (updated) Link ¶
Changes (response)
{'branch': {'destinationBranch': 'string',
            'enablePullRequestPreview': 'boolean',
            'sourceBranch': 'string',
            'stage': {'PULL_REQUEST'}}}

Retrieves a branch for an Amplify App.

See also: AWS API Documentation

Request Syntax

client.get_branch(
    appId='string',
    branchName='string'
)
type appId:

string

param appId:

[REQUIRED]

Unique Id for an Amplify App.

type branchName:

string

param branchName:

[REQUIRED]

Name for the branch.

rtype:

dict

returns:

Response Syntax

{
    'branch': {
        'branchArn': 'string',
        'branchName': 'string',
        'description': 'string',
        'tags': {
            'string': 'string'
        },
        'stage': 'PRODUCTION'|'BETA'|'DEVELOPMENT'|'EXPERIMENTAL'|'PULL_REQUEST',
        'displayName': 'string',
        'enableNotification': True|False,
        'createTime': datetime(2015, 1, 1),
        'updateTime': datetime(2015, 1, 1),
        'environmentVariables': {
            'string': 'string'
        },
        'enableAutoBuild': True|False,
        'customDomains': [
            'string',
        ],
        'framework': 'string',
        'activeJobId': 'string',
        'totalNumberOfJobs': 'string',
        'enableBasicAuth': True|False,
        'thumbnailUrl': 'string',
        'basicAuthCredentials': 'string',
        'buildSpec': 'string',
        'ttl': 'string',
        'associatedResources': [
            'string',
        ],
        'enablePullRequestPreview': True|False,
        'destinationBranch': 'string',
        'sourceBranch': 'string'
    }
}

Response Structure

  • (dict) --

    • branch (dict) --

      Branch for an Amplify App, which maps to a 3rd party repository branch.

      • branchArn (string) --

        ARN for a branch, part of an Amplify App.

      • branchName (string) --

        Name for a branch, part of an Amplify App.

      • description (string) --

        Description for a branch, part of an Amplify App.

      • tags (dict) --

        Tag for branch for Amplify App.

        • (string) --

          • (string) --

      • stage (string) --

        Stage for a branch, part of an Amplify App.

      • displayName (string) --

        Display name for a branch, will use as the default domain prefix.

      • enableNotification (boolean) --

        Enables notifications for a branch, part of an Amplify App.

      • createTime (datetime) --

        Creation date and time for a branch, part of an Amplify App.

      • updateTime (datetime) --

        Last updated date and time for a branch, part of an Amplify App.

      • environmentVariables (dict) --

        Environment Variables specific to a branch, part of an Amplify App.

        • (string) --

          • (string) --

      • enableAutoBuild (boolean) --

        Enables auto-building on push for a branch, part of an Amplify App.

      • customDomains (list) --

        Custom domains for a branch, part of an Amplify App.

        • (string) --

      • framework (string) --

        Framework for a branch, part of an Amplify App.

      • activeJobId (string) --

        Id of the active job for a branch, part of an Amplify App.

      • totalNumberOfJobs (string) --

        Total number of Jobs part of an Amplify App.

      • enableBasicAuth (boolean) --

        Enables Basic Authorization for a branch, part of an Amplify App.

      • thumbnailUrl (string) --

        Thumbnail URL for the branch.

      • basicAuthCredentials (string) --

        Basic Authorization credentials for a branch, part of an Amplify App.

      • buildSpec (string) --

        BuildSpec content for branch for Amplify App.

      • ttl (string) --

        The content TTL for the website in seconds.

      • associatedResources (list) --

        List of custom resources that are linked to this branch.

        • (string) --

      • enablePullRequestPreview (boolean) --

        Enables Pull Request Preview for this branch.

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

GetJob (updated) Link ¶
Changes (response)
{'job': {'steps': {'testArtifactsUrl': 'string', 'testConfigUrl': 'string'}}}

Get a job for a branch, part of an Amplify App.

See also: AWS API Documentation

Request Syntax

client.get_job(
    appId='string',
    branchName='string',
    jobId='string'
)
type appId:

string

param appId:

[REQUIRED]

Unique Id for an Amplify App.

type branchName:

string

param branchName:

[REQUIRED]

Name for the branch, for the Job.

type jobId:

string

param jobId:

[REQUIRED]

Unique Id for the Job.

rtype:

dict

returns:

Response Syntax

{
    'job': {
        'summary': {
            'jobArn': 'string',
            'jobId': 'string',
            'commitId': 'string',
            'commitMessage': 'string',
            'commitTime': datetime(2015, 1, 1),
            'startTime': datetime(2015, 1, 1),
            'status': 'PENDING'|'PROVISIONING'|'RUNNING'|'FAILED'|'SUCCEED'|'CANCELLING'|'CANCELLED',
            'endTime': datetime(2015, 1, 1),
            'jobType': 'RELEASE'|'RETRY'|'MANUAL'|'WEB_HOOK'
        },
        'steps': [
            {
                'stepName': 'string',
                'startTime': datetime(2015, 1, 1),
                'status': 'PENDING'|'PROVISIONING'|'RUNNING'|'FAILED'|'SUCCEED'|'CANCELLING'|'CANCELLED',
                'endTime': datetime(2015, 1, 1),
                'logUrl': 'string',
                'artifactsUrl': 'string',
                'testArtifactsUrl': 'string',
                'testConfigUrl': 'string',
                'screenshots': {
                    'string': 'string'
                },
                'statusReason': 'string',
                'context': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • job (dict) --

      Structure for an execution job for an Amplify App.

      • summary (dict) --

        Summary for an execution job for an Amplify App.

        • jobArn (string) --

          Arn for the Job.

        • jobId (string) --

          Unique Id for the Job.

        • commitId (string) --

          Commit Id from 3rd party repository provider for the Job.

        • commitMessage (string) --

          Commit message from 3rd party repository provider for the Job.

        • commitTime (datetime) --

          Commit date / time for the Job.

        • startTime (datetime) --

          Start date / time for the Job.

        • status (string) --

          Status for the Job.

        • endTime (datetime) --

          End date / time for the Job.

        • jobType (string) --

          Type for the Job. n "RELEASE": Manually released from source by using StartJob API. "RETRY": Manually retried by using StartJob API. "WEB_HOOK": Automatically triggered by WebHooks.

      • steps (list) --

        Execution steps for an execution job, for an Amplify App.

        • (dict) --

          Structure for an execution step for an execution job, for an Amplify App.

          • stepName (string) --

            Name of the execution step.

          • startTime (datetime) --

            Start date/ time of the execution step.

          • status (string) --

            Status of the execution step.

          • endTime (datetime) --

            End date/ time of the execution step.

          • logUrl (string) --

            URL to the logs for the execution step.

          • artifactsUrl (string) --

            URL to the artifact for the execution step.

          • testArtifactsUrl (string) --

            URL to the test artifact for the execution step.

          • testConfigUrl (string) --

            URL to the test config for the execution step.

          • screenshots (dict) --

            List of screenshot URLs for the execution step, if relevant.

            • (string) --

              • (string) --

          • statusReason (string) --

            The reason for current step status.

          • context (string) --

            The context for current step, will include build image if step is build.

ListApps (updated) Link ¶
Changes (response)
{'apps': {'autoBranchCreationConfig': {'enablePullRequestPreview': 'boolean',
                                       'stage': {'PULL_REQUEST'}}}}

Lists existing Amplify Apps.

See also: AWS API Documentation

Request Syntax

client.list_apps(
    nextToken='string',
    maxResults=123
)
type nextToken:

string

param nextToken:

Pagination token. If non-null pagination token is returned in a result, then pass its value in another request to fetch more entries.

type maxResults:

integer

param maxResults:

Maximum number of records to list in a single response.

rtype:

dict

returns:

Response Syntax

{
    'apps': [
        {
            'appId': 'string',
            'appArn': 'string',
            'name': 'string',
            'tags': {
                'string': 'string'
            },
            'description': 'string',
            'repository': 'string',
            'platform': 'WEB',
            'createTime': datetime(2015, 1, 1),
            'updateTime': datetime(2015, 1, 1),
            'iamServiceRoleArn': 'string',
            'environmentVariables': {
                'string': 'string'
            },
            'defaultDomain': 'string',
            'enableBranchAutoBuild': True|False,
            'enableBasicAuth': True|False,
            'basicAuthCredentials': 'string',
            'customRules': [
                {
                    'source': 'string',
                    'target': 'string',
                    'status': 'string',
                    'condition': 'string'
                },
            ],
            'productionBranch': {
                'lastDeployTime': datetime(2015, 1, 1),
                'status': 'string',
                'thumbnailUrl': 'string',
                'branchName': 'string'
            },
            'buildSpec': 'string',
            'enableAutoBranchCreation': True|False,
            'autoBranchCreationPatterns': [
                'string',
            ],
            'autoBranchCreationConfig': {
                'stage': 'PRODUCTION'|'BETA'|'DEVELOPMENT'|'EXPERIMENTAL'|'PULL_REQUEST',
                'framework': 'string',
                'enableAutoBuild': True|False,
                'environmentVariables': {
                    'string': 'string'
                },
                'basicAuthCredentials': 'string',
                'enableBasicAuth': True|False,
                'buildSpec': 'string',
                'enablePullRequestPreview': True|False
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    Result structure for an Amplify App list request.

    • apps (list) --

      List of Amplify Apps.

      • (dict) --

        Amplify App represents different branches of a repository for building, deploying, and hosting.

        • appId (string) --

          Unique Id for the Amplify App.

        • appArn (string) --

          ARN for the Amplify App.

        • name (string) --

          Name for the Amplify App.

        • tags (dict) --

          Tag for Amplify App.

          • (string) --

            • (string) --

        • description (string) --

          Description for the Amplify App.

        • repository (string) --

          Repository for the Amplify App.

        • platform (string) --

          Platform for the Amplify App.

        • createTime (datetime) --

          Create date / time for the Amplify App.

        • updateTime (datetime) --

          Update date / time for the Amplify App.

        • iamServiceRoleArn (string) --

          IAM service role ARN for the Amplify App.

        • environmentVariables (dict) --

          Environment Variables for the Amplify App.

          • (string) --

            • (string) --

        • defaultDomain (string) --

          Default domain for the Amplify App.

        • enableBranchAutoBuild (boolean) --

          Enables auto-building of branches for the Amplify App.

        • enableBasicAuth (boolean) --

          Enables Basic Authorization for branches for the Amplify App.

        • basicAuthCredentials (string) --

          Basic Authorization credentials for branches for the Amplify App.

        • customRules (list) --

          Custom redirect / rewrite rules for the Amplify App.

          • (dict) --

            Custom rewrite / redirect rule.

            • source (string) --

              The source pattern for a URL rewrite or redirect rule.

            • target (string) --

              The target pattern for a URL rewrite or redirect rule.

            • status (string) --

              The status code for a URL rewrite or redirect rule.

            • condition (string) --

              The condition for a URL rewrite or redirect rule, e.g. country code.

        • productionBranch (dict) --

          Structure with Production Branch information.

          • lastDeployTime (datetime) --

            Last Deploy Time of Production Branch.

          • status (string) --

            Status of Production Branch.

          • thumbnailUrl (string) --

            Thumbnail URL for Production Branch.

          • branchName (string) --

            Branch Name for Production Branch.

        • buildSpec (string) --

          BuildSpec content for Amplify App.

        • enableAutoBranchCreation (boolean) --

          Enables automated branch creation for the Amplify App.

        • autoBranchCreationPatterns (list) --

          Automated branch creation glob patterns for the Amplify App.

          • (string) --

        • autoBranchCreationConfig (dict) --

          Automated branch creation config for the Amplify App.

          • stage (string) --

            Stage for the auto created branch.

          • framework (string) --

            Framework for the auto created branch.

          • enableAutoBuild (boolean) --

            Enables auto building for the auto created branch.

          • environmentVariables (dict) --

            Environment Variables for the auto created branch.

            • (string) --

              • (string) --

          • basicAuthCredentials (string) --

            Basic Authorization credentials for the auto created branch.

          • enableBasicAuth (boolean) --

            Enables Basic Auth for the auto created branch.

          • buildSpec (string) --

            BuildSpec for the auto created branch.

          • enablePullRequestPreview (boolean) --

            Enables Pull Request Preview for auto created branch.

    • nextToken (string) --

      Pagination token. Set to null to start listing Apps from start. If non-null pagination token is returned in a result, then pass its value in here to list more projects.

ListBranches (updated) Link ¶
Changes (response)
{'branches': {'destinationBranch': 'string',
              'enablePullRequestPreview': 'boolean',
              'sourceBranch': 'string',
              'stage': {'PULL_REQUEST'}}}

Lists branches for an Amplify App.

See also: AWS API Documentation

Request Syntax

client.list_branches(
    appId='string',
    nextToken='string',
    maxResults=123
)
type appId:

string

param appId:

[REQUIRED]

Unique Id for an Amplify App.

type nextToken:

string

param nextToken:

Pagination token. Set to null to start listing branches from start. If a non-null pagination token is returned in a result, then pass its value in here to list more branches.

type maxResults:

integer

param maxResults:

Maximum number of records to list in a single response.

rtype:

dict

returns:

Response Syntax

{
    'branches': [
        {
            'branchArn': 'string',
            'branchName': 'string',
            'description': 'string',
            'tags': {
                'string': 'string'
            },
            'stage': 'PRODUCTION'|'BETA'|'DEVELOPMENT'|'EXPERIMENTAL'|'PULL_REQUEST',
            'displayName': 'string',
            'enableNotification': True|False,
            'createTime': datetime(2015, 1, 1),
            'updateTime': datetime(2015, 1, 1),
            'environmentVariables': {
                'string': 'string'
            },
            'enableAutoBuild': True|False,
            'customDomains': [
                'string',
            ],
            'framework': 'string',
            'activeJobId': 'string',
            'totalNumberOfJobs': 'string',
            'enableBasicAuth': True|False,
            'thumbnailUrl': 'string',
            'basicAuthCredentials': 'string',
            'buildSpec': 'string',
            'ttl': 'string',
            'associatedResources': [
                'string',
            ],
            'enablePullRequestPreview': True|False,
            'destinationBranch': 'string',
            'sourceBranch': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    Result structure for list branches request.

    • branches (list) --

      List of branches for an Amplify App.

      • (dict) --

        Branch for an Amplify App, which maps to a 3rd party repository branch.

        • branchArn (string) --

          ARN for a branch, part of an Amplify App.

        • branchName (string) --

          Name for a branch, part of an Amplify App.

        • description (string) --

          Description for a branch, part of an Amplify App.

        • tags (dict) --

          Tag for branch for Amplify App.

          • (string) --

            • (string) --

        • stage (string) --

          Stage for a branch, part of an Amplify App.

        • displayName (string) --

          Display name for a branch, will use as the default domain prefix.

        • enableNotification (boolean) --

          Enables notifications for a branch, part of an Amplify App.

        • createTime (datetime) --

          Creation date and time for a branch, part of an Amplify App.

        • updateTime (datetime) --

          Last updated date and time for a branch, part of an Amplify App.

        • environmentVariables (dict) --

          Environment Variables specific to a branch, part of an Amplify App.

          • (string) --

            • (string) --

        • enableAutoBuild (boolean) --

          Enables auto-building on push for a branch, part of an Amplify App.

        • customDomains (list) --

          Custom domains for a branch, part of an Amplify App.

          • (string) --

        • framework (string) --

          Framework for a branch, part of an Amplify App.

        • activeJobId (string) --

          Id of the active job for a branch, part of an Amplify App.

        • totalNumberOfJobs (string) --

          Total number of Jobs part of an Amplify App.

        • enableBasicAuth (boolean) --

          Enables Basic Authorization for a branch, part of an Amplify App.

        • thumbnailUrl (string) --

          Thumbnail URL for the branch.

        • basicAuthCredentials (string) --

          Basic Authorization credentials for a branch, part of an Amplify App.

        • buildSpec (string) --

          BuildSpec content for branch for Amplify App.

        • ttl (string) --

          The content TTL for the website in seconds.

        • associatedResources (list) --

          List of custom resources that are linked to this branch.

          • (string) --

        • enablePullRequestPreview (boolean) --

          Enables Pull Request Preview for this branch.

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

    • nextToken (string) --

      Pagination token. If non-null pagination token is returned in a result, then pass its value in another request to fetch more entries.

UpdateApp (updated) Link ¶
Changes (request, response)
Request
{'accessToken': 'string',
 'autoBranchCreationConfig': {'enablePullRequestPreview': 'boolean',
                              'stage': {'PULL_REQUEST'}},
 'oauthToken': 'string',
 'repository': 'string'}
Response
{'app': {'autoBranchCreationConfig': {'enablePullRequestPreview': 'boolean',
                                      'stage': {'PULL_REQUEST'}}}}

Updates an existing Amplify App.

See also: AWS API Documentation

Request Syntax

client.update_app(
    appId='string',
    name='string',
    description='string',
    platform='WEB',
    iamServiceRoleArn='string',
    environmentVariables={
        'string': 'string'
    },
    enableBranchAutoBuild=True|False,
    enableBasicAuth=True|False,
    basicAuthCredentials='string',
    customRules=[
        {
            'source': 'string',
            'target': 'string',
            'status': 'string',
            'condition': 'string'
        },
    ],
    buildSpec='string',
    enableAutoBranchCreation=True|False,
    autoBranchCreationPatterns=[
        'string',
    ],
    autoBranchCreationConfig={
        'stage': 'PRODUCTION'|'BETA'|'DEVELOPMENT'|'EXPERIMENTAL'|'PULL_REQUEST',
        'framework': 'string',
        'enableAutoBuild': True|False,
        'environmentVariables': {
            'string': 'string'
        },
        'basicAuthCredentials': 'string',
        'enableBasicAuth': True|False,
        'buildSpec': 'string',
        'enablePullRequestPreview': True|False
    },
    repository='string',
    oauthToken='string',
    accessToken='string'
)
type appId:

string

param appId:

[REQUIRED]

Unique Id for an Amplify App.

type name:

string

param name:

Name for an Amplify App.

type description:

string

param description:

Description for an Amplify App.

type platform:

string

param platform:

Platform for an Amplify App.

type iamServiceRoleArn:

string

param iamServiceRoleArn:

IAM service role for an Amplify App.

type environmentVariables:

dict

param environmentVariables:

Environment Variables for an Amplify App.

  • (string) --

    • (string) --

type enableBranchAutoBuild:

boolean

param enableBranchAutoBuild:

Enables branch auto-building for an Amplify App.

type enableBasicAuth:

boolean

param enableBasicAuth:

Enables Basic Authorization for an Amplify App.

type basicAuthCredentials:

string

param basicAuthCredentials:

Basic Authorization credentials for an Amplify App.

type customRules:

list

param customRules:

Custom redirect / rewrite rules for an Amplify App.

  • (dict) --

    Custom rewrite / redirect rule.

    • source (string) -- [REQUIRED]

      The source pattern for a URL rewrite or redirect rule.

    • target (string) -- [REQUIRED]

      The target pattern for a URL rewrite or redirect rule.

    • status (string) --

      The status code for a URL rewrite or redirect rule.

    • condition (string) --

      The condition for a URL rewrite or redirect rule, e.g. country code.

type buildSpec:

string

param buildSpec:

BuildSpec for an Amplify App.

type enableAutoBranchCreation:

boolean

param enableAutoBranchCreation:

Enables automated branch creation for the Amplify App.

type autoBranchCreationPatterns:

list

param autoBranchCreationPatterns:

Automated branch creation glob patterns for the Amplify App.

  • (string) --

type autoBranchCreationConfig:

dict

param autoBranchCreationConfig:

Automated branch creation branchConfig for the Amplify App.

  • stage (string) --

    Stage for the auto created branch.

  • framework (string) --

    Framework for the auto created branch.

  • enableAutoBuild (boolean) --

    Enables auto building for the auto created branch.

  • environmentVariables (dict) --

    Environment Variables for the auto created branch.

    • (string) --

      • (string) --

  • basicAuthCredentials (string) --

    Basic Authorization credentials for the auto created branch.

  • enableBasicAuth (boolean) --

    Enables Basic Auth for the auto created branch.

  • buildSpec (string) --

    BuildSpec for the auto created branch.

  • enablePullRequestPreview (boolean) --

    Enables Pull Request Preview for auto created branch.

type repository:

string

param repository:

Repository for an Amplify App

type oauthToken:

string

param oauthToken:

OAuth token for 3rd party source control system for an Amplify App, used to create webhook and read-only deploy key. OAuth token is not stored.

type accessToken:

string

param accessToken:

Personal Access token for 3rd party source control system for an Amplify App, used to create webhook and read-only deploy key. Token is not stored.

rtype:

dict

returns:

Response Syntax

{
    'app': {
        'appId': 'string',
        'appArn': 'string',
        'name': 'string',
        'tags': {
            'string': 'string'
        },
        'description': 'string',
        'repository': 'string',
        'platform': 'WEB',
        'createTime': datetime(2015, 1, 1),
        'updateTime': datetime(2015, 1, 1),
        'iamServiceRoleArn': 'string',
        'environmentVariables': {
            'string': 'string'
        },
        'defaultDomain': 'string',
        'enableBranchAutoBuild': True|False,
        'enableBasicAuth': True|False,
        'basicAuthCredentials': 'string',
        'customRules': [
            {
                'source': 'string',
                'target': 'string',
                'status': 'string',
                'condition': 'string'
            },
        ],
        'productionBranch': {
            'lastDeployTime': datetime(2015, 1, 1),
            'status': 'string',
            'thumbnailUrl': 'string',
            'branchName': 'string'
        },
        'buildSpec': 'string',
        'enableAutoBranchCreation': True|False,
        'autoBranchCreationPatterns': [
            'string',
        ],
        'autoBranchCreationConfig': {
            'stage': 'PRODUCTION'|'BETA'|'DEVELOPMENT'|'EXPERIMENTAL'|'PULL_REQUEST',
            'framework': 'string',
            'enableAutoBuild': True|False,
            'environmentVariables': {
                'string': 'string'
            },
            'basicAuthCredentials': 'string',
            'enableBasicAuth': True|False,
            'buildSpec': 'string',
            'enablePullRequestPreview': True|False
        }
    }
}

Response Structure

  • (dict) --

    Result structure for an Amplify App update request.

    • app (dict) --

      App structure for the updated App.

      • appId (string) --

        Unique Id for the Amplify App.

      • appArn (string) --

        ARN for the Amplify App.

      • name (string) --

        Name for the Amplify App.

      • tags (dict) --

        Tag for Amplify App.

        • (string) --

          • (string) --

      • description (string) --

        Description for the Amplify App.

      • repository (string) --

        Repository for the Amplify App.

      • platform (string) --

        Platform for the Amplify App.

      • createTime (datetime) --

        Create date / time for the Amplify App.

      • updateTime (datetime) --

        Update date / time for the Amplify App.

      • iamServiceRoleArn (string) --

        IAM service role ARN for the Amplify App.

      • environmentVariables (dict) --

        Environment Variables for the Amplify App.

        • (string) --

          • (string) --

      • defaultDomain (string) --

        Default domain for the Amplify App.

      • enableBranchAutoBuild (boolean) --

        Enables auto-building of branches for the Amplify App.

      • enableBasicAuth (boolean) --

        Enables Basic Authorization for branches for the Amplify App.

      • basicAuthCredentials (string) --

        Basic Authorization credentials for branches for the Amplify App.

      • customRules (list) --

        Custom redirect / rewrite rules for the Amplify App.

        • (dict) --

          Custom rewrite / redirect rule.

          • source (string) --

            The source pattern for a URL rewrite or redirect rule.

          • target (string) --

            The target pattern for a URL rewrite or redirect rule.

          • status (string) --

            The status code for a URL rewrite or redirect rule.

          • condition (string) --

            The condition for a URL rewrite or redirect rule, e.g. country code.

      • productionBranch (dict) --

        Structure with Production Branch information.

        • lastDeployTime (datetime) --

          Last Deploy Time of Production Branch.

        • status (string) --

          Status of Production Branch.

        • thumbnailUrl (string) --

          Thumbnail URL for Production Branch.

        • branchName (string) --

          Branch Name for Production Branch.

      • buildSpec (string) --

        BuildSpec content for Amplify App.

      • enableAutoBranchCreation (boolean) --

        Enables automated branch creation for the Amplify App.

      • autoBranchCreationPatterns (list) --

        Automated branch creation glob patterns for the Amplify App.

        • (string) --

      • autoBranchCreationConfig (dict) --

        Automated branch creation config for the Amplify App.

        • stage (string) --

          Stage for the auto created branch.

        • framework (string) --

          Framework for the auto created branch.

        • enableAutoBuild (boolean) --

          Enables auto building for the auto created branch.

        • environmentVariables (dict) --

          Environment Variables for the auto created branch.

          • (string) --

            • (string) --

        • basicAuthCredentials (string) --

          Basic Authorization credentials for the auto created branch.

        • enableBasicAuth (boolean) --

          Enables Basic Auth for the auto created branch.

        • buildSpec (string) --

          BuildSpec for the auto created branch.

        • enablePullRequestPreview (boolean) --

          Enables Pull Request Preview for auto created branch.

UpdateBranch (updated) Link ¶
Changes (request, response)
Request
{'enablePullRequestPreview': 'boolean', 'stage': {'PULL_REQUEST'}}
Response
{'branch': {'destinationBranch': 'string',
            'enablePullRequestPreview': 'boolean',
            'sourceBranch': 'string',
            'stage': {'PULL_REQUEST'}}}

Updates a branch for an Amplify App.

See also: AWS API Documentation

Request Syntax

client.update_branch(
    appId='string',
    branchName='string',
    description='string',
    framework='string',
    stage='PRODUCTION'|'BETA'|'DEVELOPMENT'|'EXPERIMENTAL'|'PULL_REQUEST',
    enableNotification=True|False,
    enableAutoBuild=True|False,
    environmentVariables={
        'string': 'string'
    },
    basicAuthCredentials='string',
    enableBasicAuth=True|False,
    buildSpec='string',
    ttl='string',
    displayName='string',
    enablePullRequestPreview=True|False
)
type appId:

string

param appId:

[REQUIRED]

Unique Id for an Amplify App.

type branchName:

string

param branchName:

[REQUIRED]

Name for the branch.

type description:

string

param description:

Description for the branch.

type framework:

string

param framework:

Framework for the branch.

type stage:

string

param stage:

Stage for the branch.

type enableNotification:

boolean

param enableNotification:

Enables notifications for the branch.

type enableAutoBuild:

boolean

param enableAutoBuild:

Enables auto building for the branch.

type environmentVariables:

dict

param environmentVariables:

Environment Variables for the branch.

  • (string) --

    • (string) --

type basicAuthCredentials:

string

param basicAuthCredentials:

Basic Authorization credentials for the branch.

type enableBasicAuth:

boolean

param enableBasicAuth:

Enables Basic Auth for the branch.

type buildSpec:

string

param buildSpec:

BuildSpec for the branch.

type ttl:

string

param ttl:

The content TTL for the website in seconds.

type displayName:

string

param displayName:

Display name for a branch, will use as the default domain prefix.

type enablePullRequestPreview:

boolean

param enablePullRequestPreview:

Enables Pull Request Preview for this branch.

rtype:

dict

returns:

Response Syntax

{
    'branch': {
        'branchArn': 'string',
        'branchName': 'string',
        'description': 'string',
        'tags': {
            'string': 'string'
        },
        'stage': 'PRODUCTION'|'BETA'|'DEVELOPMENT'|'EXPERIMENTAL'|'PULL_REQUEST',
        'displayName': 'string',
        'enableNotification': True|False,
        'createTime': datetime(2015, 1, 1),
        'updateTime': datetime(2015, 1, 1),
        'environmentVariables': {
            'string': 'string'
        },
        'enableAutoBuild': True|False,
        'customDomains': [
            'string',
        ],
        'framework': 'string',
        'activeJobId': 'string',
        'totalNumberOfJobs': 'string',
        'enableBasicAuth': True|False,
        'thumbnailUrl': 'string',
        'basicAuthCredentials': 'string',
        'buildSpec': 'string',
        'ttl': 'string',
        'associatedResources': [
            'string',
        ],
        'enablePullRequestPreview': True|False,
        'destinationBranch': 'string',
        'sourceBranch': 'string'
    }
}

Response Structure

  • (dict) --

    Result structure for update branch request.

    • branch (dict) --

      Branch structure for an Amplify App.

      • branchArn (string) --

        ARN for a branch, part of an Amplify App.

      • branchName (string) --

        Name for a branch, part of an Amplify App.

      • description (string) --

        Description for a branch, part of an Amplify App.

      • tags (dict) --

        Tag for branch for Amplify App.

        • (string) --

          • (string) --

      • stage (string) --

        Stage for a branch, part of an Amplify App.

      • displayName (string) --

        Display name for a branch, will use as the default domain prefix.

      • enableNotification (boolean) --

        Enables notifications for a branch, part of an Amplify App.

      • createTime (datetime) --

        Creation date and time for a branch, part of an Amplify App.

      • updateTime (datetime) --

        Last updated date and time for a branch, part of an Amplify App.

      • environmentVariables (dict) --

        Environment Variables specific to a branch, part of an Amplify App.

        • (string) --

          • (string) --

      • enableAutoBuild (boolean) --

        Enables auto-building on push for a branch, part of an Amplify App.

      • customDomains (list) --

        Custom domains for a branch, part of an Amplify App.

        • (string) --

      • framework (string) --

        Framework for a branch, part of an Amplify App.

      • activeJobId (string) --

        Id of the active job for a branch, part of an Amplify App.

      • totalNumberOfJobs (string) --

        Total number of Jobs part of an Amplify App.

      • enableBasicAuth (boolean) --

        Enables Basic Authorization for a branch, part of an Amplify App.

      • thumbnailUrl (string) --

        Thumbnail URL for the branch.

      • basicAuthCredentials (string) --

        Basic Authorization credentials for a branch, part of an Amplify App.

      • buildSpec (string) --

        BuildSpec content for branch for Amplify App.

      • ttl (string) --

        The content TTL for the website in seconds.

      • associatedResources (list) --

        List of custom resources that are linked to this branch.

        • (string) --

      • enablePullRequestPreview (boolean) --

        Enables Pull Request Preview for this branch.

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