Mobile

Table of Contents

Client

class Mobile.Client

A low-level client representing AWS Mobile:

import boto3

client = boto3.client('mobile')

These are the available methods:

can_paginate(operation_name)

Check if an operation can be paginated.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Returns
True if the operation can be paginated, False otherwise.
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
delete_project(**kwargs)

Delets a project in AWS Mobile Hub.

See also: AWS API Documentation

Request Syntax

response = client.delete_project(
    projectId='string'
)
Parameters
projectId (string) --

[REQUIRED]

Unique project identifier.

Return type
dict
Returns
Response Syntax
{
    'deletedResources': [
        {
            'type': 'string',
            'name': 'string',
            'arn': 'string',
            'feature': 'string',
            'attributes': {
                'string': 'string'
            }
        },
    ],
    'orphanedResources': [
        {
            'type': 'string',
            'name': 'string',
            'arn': 'string',
            'feature': 'string',
            'attributes': {
                'string': 'string'
            }
        },
    ]
}

Response Structure

  • (dict) --

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

    • deletedResources (list) --

      Resources which were deleted.

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

    • orphanedResources (list) --

      Resources which were not deleted, due to a risk of losing potentially important data or files.

      • (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.NotFoundException
describe_bundle(**kwargs)

Get the bundle details for the requested bundle id.

See also: AWS API Documentation

Request Syntax

response = client.describe_bundle(
    bundleId='string'
)
Parameters
bundleId (string) --

[REQUIRED]

Unique bundle identifier.

Return type
dict
Returns
Response Syntax
{
    'details': {
        'bundleId': 'string',
        'title': 'string',
        'version': 'string',
        'description': 'string',
        'iconUrl': 'string',
        'availablePlatforms': [
            'OSX'|'WINDOWS'|'LINUX'|'OBJC'|'SWIFT'|'ANDROID'|'JAVASCRIPT',
        ]
    }
}

Response Structure

  • (dict) --

    Result structure contains the details of the bundle.

    • details (dict) --

      The details of the bundle.

      • bundleId (string) --

        Unique bundle identifier.

      • title (string) --

        Title of the download bundle.

      • version (string) --

        Version of the download bundle.

      • description (string) --

        Description of the download bundle.

      • iconUrl (string) --

        Icon for the download bundle.

      • availablePlatforms (list) --

        Developer desktop or mobile app or website platforms.

        • (string) --

          Developer desktop or target mobile app or website platform.

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
describe_project(**kwargs)

Gets details about a project in AWS Mobile Hub.

See also: AWS API Documentation

Request Syntax

response = client.describe_project(
    projectId='string',
    syncFromResources=True|False
)
Parameters
  • projectId (string) --

    [REQUIRED]

    Unique project identifier.

  • syncFromResources (boolean) -- If set to true, causes AWS Mobile Hub to synchronize information from other services, e.g., update state of AWS CloudFormation stacks in the AWS Mobile Hub project.
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 for requests of project details.

    • details (dict) --

      Detailed information about an 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
export_bundle(**kwargs)

Generates customized software development kit (SDK) and or tool packages used to integrate mobile web or mobile app clients with backend AWS resources.

See also: AWS API Documentation

Request Syntax

response = client.export_bundle(
    bundleId='string',
    projectId='string',
    platform='OSX'|'WINDOWS'|'LINUX'|'OBJC'|'SWIFT'|'ANDROID'|'JAVASCRIPT'
)
Parameters
  • bundleId (string) --

    [REQUIRED]

    Unique bundle identifier.

  • projectId (string) -- Unique project identifier.
  • platform (string) -- Developer desktop or target application platform.
Return type

dict

Returns

Response Syntax

{
    'downloadUrl': 'string'
}

Response Structure

  • (dict) --

    Result structure which contains link to download custom-generated SDK and tool packages used to integrate mobile web or app clients with backed AWS resources.

    • downloadUrl (string) --

      URL which contains the custom-generated SDK and tool packages used to integrate the client mobile app or web app with the AWS resources created by the AWS Mobile Hub project.

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
export_project(**kwargs)

Exports project configuration to a snapshot which can be downloaded and shared. Note that mobile app push credentials are encrypted in exported projects, so they can only be shared successfully within the same AWS account.

See also: AWS API Documentation

Request Syntax

response = client.export_project(
    projectId='string'
)
Parameters
projectId (string) --

[REQUIRED]

Unique project identifier.

Return type
dict
Returns
Response Syntax
{
    'downloadUrl': 'string',
    'shareUrl': 'string',
    'snapshotId': 'string'
}

Response Structure

  • (dict) --

    Result structure used for requests to export project configuration details.

    • downloadUrl (string) --

      URL which can be used to download the exported project configuation file(s).

    • shareUrl (string) --

      URL which can be shared to allow other AWS users to create their own project in AWS Mobile Hub with the same configuration as the specified project. This URL pertains to a snapshot in time of the project configuration that is created when this API is called. If you want to share additional changes to your project configuration, then you will need to create and share a new snapshot by calling this method again.

    • snapshotId (string) --

      Unique identifier for the exported snapshot of the project configuration. This snapshot identifier is included in the share URL.

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
generate_presigned_url(ClientMethod, Params=None, ExpiresIn=3600, HttpMethod=None)

Generate a presigned url given a client, its method, and arguments

Parameters
  • ClientMethod (string) -- The client method to presign for
  • Params (dict) -- The parameters normally passed to ClientMethod.
  • ExpiresIn (int) -- The number of seconds the presigned url is valid for. By default it expires in an hour (3600 seconds)
  • HttpMethod (string) -- The http method to use on the generated url. By default, the http method is whatever is used in the method's model.
Returns

The presigned url

get_paginator(operation_name)

Create a paginator for an operation.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Raises OperationNotPageableError
Raised if the operation is not pageable. You can use the client.can_paginate method to check if an operation is pageable.
Return type
L{botocore.paginate.Paginator}
Returns
A paginator object.
get_waiter(waiter_name)

Returns an object that can wait for some condition.

Parameters
waiter_name (str) -- The name of the waiter to get. See the waiters section of the service docs for a list of available waiters.
Returns
The specified waiter object.
Return type
botocore.waiter.Waiter
list_bundles(**kwargs)

List all available bundles.

See also: AWS API Documentation

Request Syntax

response = client.list_bundles(
    maxResults=123,
    nextToken='string'
)
Parameters
  • maxResults (integer) -- Maximum number of records to list in a single response.
  • nextToken (string) -- Pagination token. Set to null to start listing bundles from start. If non-null pagination token is returned in a result, then pass its value in here in another request to list more bundles.
Return type

dict

Returns

Response Syntax

{
    'bundleList': [
        {
            'bundleId': 'string',
            'title': 'string',
            'version': 'string',
            'description': 'string',
            'iconUrl': 'string',
            'availablePlatforms': [
                'OSX'|'WINDOWS'|'LINUX'|'OBJC'|'SWIFT'|'ANDROID'|'JAVASCRIPT',
            ]
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    Result structure contains a list of all available bundles with details.

    • bundleList (list) --

      A list of bundles.

      • (dict) --

        The details of the bundle.

        • bundleId (string) --

          Unique bundle identifier.

        • title (string) --

          Title of the download bundle.

        • version (string) --

          Version of the download bundle.

        • description (string) --

          Description of the download bundle.

        • iconUrl (string) --

          Icon for the download bundle.

        • availablePlatforms (list) --

          Developer desktop or mobile app or website platforms.

          • (string) --

            Developer desktop or target mobile app or website platform.

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

Exceptions

  • Mobile.Client.exceptions.InternalFailureException
  • Mobile.Client.exceptions.ServiceUnavailableException
  • Mobile.Client.exceptions.UnauthorizedException
  • Mobile.Client.exceptions.TooManyRequestsException
  • Mobile.Client.exceptions.BadRequestException
list_projects(**kwargs)

Lists projects in AWS Mobile Hub.

See also: AWS API Documentation

Request Syntax

response = client.list_projects(
    maxResults=123,
    nextToken='string'
)
Parameters
  • maxResults (integer) -- Maximum number of records to list in a single response.
  • nextToken (string) -- Pagination token. Set to null to start listing projects from start. If non-null pagination token is returned in a result, then pass its value in here in another request to list more projects.
Return type

dict

Returns

Response Syntax

{
    'projects': [
        {
            'name': 'string',
            'projectId': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    Result structure used for requests to list projects in AWS Mobile Hub.

    • projects (list) --

      List of projects.

      • (dict) --

        Summary information about an AWS Mobile Hub project.

        • name (string) --

          Name of the project.

        • projectId (string) --

          Unique project identifier.

    • nextToken (string) --

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

Exceptions

  • Mobile.Client.exceptions.InternalFailureException
  • Mobile.Client.exceptions.ServiceUnavailableException
  • Mobile.Client.exceptions.UnauthorizedException
  • Mobile.Client.exceptions.TooManyRequestsException
  • Mobile.Client.exceptions.BadRequestException
update_project(**kwargs)

Update an existing project.

See also: AWS API Documentation

Request Syntax

response = client.update_project(
    contents=b'bytes'|file,
    projectId='string'
)
Parameters
  • contents (bytes or seekable file-like object) -- ZIP or YAML file which contains project configuration to be updated. This should be the contents of the file downloaded from the URL provided in an export project operation.
  • projectId (string) --

    [REQUIRED]

    Unique project identifier.

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 for requests to updated project configuration.

    • details (dict) --

      Detailed information about the updated 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.AccountActionRequiredException
  • Mobile.Client.exceptions.LimitExceededException

Paginators

The available paginators are:

class Mobile.Paginator.ListBundles
paginator = client.get_paginator('list_bundles')
paginate(**kwargs)

Creates an iterator that will paginate through responses from Mobile.Client.list_bundles().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
PaginationConfig (dict) --

A dictionary that provides parameters to control pagination.

  • MaxItems (integer) --

    The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

  • PageSize (integer) --

    The size of each page.

  • StartingToken (string) --

    A token to specify where to start paginating. This is the NextToken from a previous response.

Return type
dict
Returns
Response Syntax
{
    'bundleList': [
        {
            'bundleId': 'string',
            'title': 'string',
            'version': 'string',
            'description': 'string',
            'iconUrl': 'string',
            'availablePlatforms': [
                'OSX'|'WINDOWS'|'LINUX'|'OBJC'|'SWIFT'|'ANDROID'|'JAVASCRIPT',
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    Result structure contains a list of all available bundles with details.

    • bundleList (list) --

      A list of bundles.

      • (dict) --

        The details of the bundle.

        • bundleId (string) --

          Unique bundle identifier.

        • title (string) --

          Title of the download bundle.

        • version (string) --

          Version of the download bundle.

        • description (string) --

          Description of the download bundle.

        • iconUrl (string) --

          Icon for the download bundle.

        • availablePlatforms (list) --

          Developer desktop or mobile app or website platforms.

          • (string) --

            Developer desktop or target mobile app or website platform.

    • NextToken (string) --

      A token to resume pagination.

class Mobile.Paginator.ListProjects
paginator = client.get_paginator('list_projects')
paginate(**kwargs)

Creates an iterator that will paginate through responses from Mobile.Client.list_projects().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
PaginationConfig (dict) --

A dictionary that provides parameters to control pagination.

  • MaxItems (integer) --

    The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

  • PageSize (integer) --

    The size of each page.

  • StartingToken (string) --

    A token to specify where to start paginating. This is the NextToken from a previous response.

Return type
dict
Returns
Response Syntax
{
    'projects': [
        {
            'name': 'string',
            'projectId': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    Result structure used for requests to list projects in AWS Mobile Hub.

    • projects (list) --

      List of projects.

      • (dict) --

        Summary information about an AWS Mobile Hub project.

        • name (string) --

          Name of the project.

        • projectId (string) --

          Unique project identifier.

    • NextToken (string) --

      A token to resume pagination.