Mobile / Client / create_project

create_project#

Mobile.Client.create_project(**kwargs)#

Creates an AWS Mobile Hub project.

See also: AWS API Documentation

Request Syntax

response = client.create_project(
    name='string',
    region='string',
    contents=b'bytes'|file,
    snapshotId='string'
)
Parameters:
  • name (string) – Name of the project.

  • region (string) – Default region where project resources should be created.

  • contents (bytes or seekable file-like object) – ZIP or YAML file which contains configuration settings to be used when creating the project. This may be the contents of the file downloaded from the URL provided in an export project operation.

  • snapshotId (string) – Unique identifier for an exported snapshot of project configuration. This snapshot identifier is included in the share URL when a project is exported.

Return type:

dict

Returns:

Response Syntax

{
    'details': {
        'name': 'string',
        'projectId': 'string',
        'region': 'string',
        'state': 'NORMAL'|'SYNCING'|'IMPORTING',
        'createdDate': datetime(2015, 1, 1),
        'lastUpdatedDate': datetime(2015, 1, 1),
        'consoleUrl': 'string',
        'resources': [
            {
                'type': 'string',
                'name': 'string',
                'arn': 'string',
                'feature': 'string',
                'attributes': {
                    'string': 'string'
                }
            },
        ]
    }
}

Response Structure

  • (dict) –

    Result structure used in response to a request to create a project.

    • details (dict) –

      Detailed information about the created AWS Mobile Hub project.

      • name (string) –

        Name of the project.

      • projectId (string) –

        Unique project identifier.

      • region (string) –

        Default region to use for AWS resource creation in the AWS Mobile Hub project.

      • state (string) –

        Synchronization state for a project.

      • createdDate (datetime) –

        Date the project was created.

      • lastUpdatedDate (datetime) –

        Date of the last modification of the project.

      • consoleUrl (string) –

        Website URL for this project in the AWS Mobile Hub console.

      • resources (list) –

        List of AWS resources associated with a project.

        • (dict) –

          Information about an instance of an AWS resource associated with a project.

          • type (string) –

            Simplified name for type of AWS resource (e.g., bucket is an Amazon S3 bucket).

          • name (string) –

            Name of the AWS resource (e.g., for an Amazon S3 bucket this is the name of the bucket).

          • arn (string) –

            AWS resource name which uniquely identifies the resource in AWS systems.

          • feature (string) –

            Identifies which feature in AWS Mobile Hub is associated with this AWS resource.

          • attributes (dict) –

            Key-value attribute pairs.

            • (string) –

              Key part of key-value attribute pairs.

              • (string) –

                Value part of key-value attribute pairs.

Exceptions

  • Mobile.Client.exceptions.InternalFailureException

  • Mobile.Client.exceptions.ServiceUnavailableException

  • Mobile.Client.exceptions.UnauthorizedException

  • Mobile.Client.exceptions.TooManyRequestsException

  • Mobile.Client.exceptions.BadRequestException

  • Mobile.Client.exceptions.NotFoundException

  • Mobile.Client.exceptions.LimitExceededException