SDK for PHP 3.x

Client: Aws\Mobile\MobileClient
Service ID: mobile
Version: 2017-07-01

This page describes the parameters and results for the operations of the AWS Mobile (2017-07-01), and shows how to use the Aws\Mobile\MobileClient object to call the described operations. This documentation is specific to the 2017-07-01 API version of the service.

Operation Summary

Each of the following operations can be created from a client using $client->getCommand('CommandName'), where "CommandName" is the name of one of the following operations. Note: a command is a value that encapsulates an operation and the parameters used to create an HTTP request.

You can also create and send a command immediately using the magic methods available on a client object: $client->commandName(/* parameters */). You can send the command asynchronously (returning a promise) by appending the word "Async" to the operation name: $client->commandNameAsync(/* parameters */).

CreateProject ( array $params = [] )
Creates an AWS Mobile Hub project.
DeleteProject ( array $params = [] )
Delets a project in AWS Mobile Hub.
DescribeBundle ( array $params = [] )
Get the bundle details for the requested bundle id.
DescribeProject ( array $params = [] )
Gets details about a project in AWS Mobile Hub.
ExportBundle ( array $params = [] )
Generates customized software development kit (SDK) and or tool packages used to integrate mobile web or mobile app clients with backend AWS resources.
ExportProject ( array $params = [] )
Exports project configuration to a snapshot which can be downloaded and shared.
ListBundles ( array $params = [] )
List all available bundles.
ListProjects ( array $params = [] )
Lists projects in AWS Mobile Hub.
UpdateProject ( array $params = [] )
Update an existing project.

Paginators

Paginators handle automatically iterating over paginated API results. Paginators are associated with specific API operations, and they accept the parameters that the corresponding API operation accepts. You can get a paginator from a client class using getPaginator($paginatorName, $operationParameters). This client supports the following paginators:

ListBundles
ListProjects

Operations

CreateProject

$result = $client->createProject([/* ... */]);
$promise = $client->createProjectAsync([/* ... */]);

Creates an AWS Mobile Hub project.

Parameter Syntax

$result = $client->createProject([
    'contents' => <string || resource || Psr\Http\Message\StreamInterface>,
    'name' => '<string>',
    'region' => '<string>',
    'snapshotId' => '<string>',
]);

Parameter Details

Members
contents
Type: blob (string|resource|Psr\Http\Message\StreamInterface)

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.

name
Type: string

Name of the project.

region
Type: string

Default region where project resources should be created.

snapshotId
Type: string

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

Result Syntax

[
    'details' => [
        'consoleUrl' => '<string>',
        'createdDate' => <DateTime>,
        'lastUpdatedDate' => <DateTime>,
        'name' => '<string>',
        'projectId' => '<string>',
        'region' => '<string>',
        'resources' => [
            [
                'arn' => '<string>',
                'attributes' => ['<string>', ...],
                'feature' => '<string>',
                'name' => '<string>',
                'type' => '<string>',
            ],
            // ...
        ],
        'state' => 'NORMAL|SYNCING|IMPORTING',
    ],
]

Result Details

Members
details
Type: ProjectDetails structure

Detailed information about the created AWS Mobile Hub project.

Errors

InternalFailureException:

The service has encountered an unexpected error condition which prevents it from servicing the request.

ServiceUnavailableException:

The service is temporarily unavailable. The request should be retried after some time delay.

UnauthorizedException:

Credentials of the caller are insufficient to authorize the request.

TooManyRequestsException:

Too many requests have been received for this AWS account in too short a time. The request should be retried after some time delay.

BadRequestException:

The request cannot be processed because some parameter is not valid or the project state prevents the operation from being performed.

NotFoundException:

No entity can be found with the specified identifier.

LimitExceededException:

There are too many AWS Mobile Hub projects in the account or the account has exceeded the maximum number of resources in some AWS service. You should create another sub-account using AWS Organizations or remove some resources and retry your request.

DeleteProject

$result = $client->deleteProject([/* ... */]);
$promise = $client->deleteProjectAsync([/* ... */]);

Delets a project in AWS Mobile Hub.

Parameter Syntax

$result = $client->deleteProject([
    'projectId' => '<string>', // REQUIRED
]);

Parameter Details

Members
projectId
Required: Yes
Type: string

Unique project identifier.

Result Syntax

[
    'deletedResources' => [
        [
            'arn' => '<string>',
            'attributes' => ['<string>', ...],
            'feature' => '<string>',
            'name' => '<string>',
            'type' => '<string>',
        ],
        // ...
    ],
    'orphanedResources' => [
        [
            'arn' => '<string>',
            'attributes' => ['<string>', ...],
            'feature' => '<string>',
            'name' => '<string>',
            'type' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
deletedResources
Type: Array of Resource structures

Resources which were deleted.

orphanedResources
Type: Array of Resource structures

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

Errors

InternalFailureException:

The service has encountered an unexpected error condition which prevents it from servicing the request.

ServiceUnavailableException:

The service is temporarily unavailable. The request should be retried after some time delay.

UnauthorizedException:

Credentials of the caller are insufficient to authorize the request.

TooManyRequestsException:

Too many requests have been received for this AWS account in too short a time. The request should be retried after some time delay.

NotFoundException:

No entity can be found with the specified identifier.

DescribeBundle

$result = $client->describeBundle([/* ... */]);
$promise = $client->describeBundleAsync([/* ... */]);

Get the bundle details for the requested bundle id.

Parameter Syntax

$result = $client->describeBundle([
    'bundleId' => '<string>', // REQUIRED
]);

Parameter Details

Members
bundleId
Required: Yes
Type: string

Unique bundle identifier.

Result Syntax

[
    'details' => [
        'availablePlatforms' => ['<string>', ...],
        'bundleId' => '<string>',
        'description' => '<string>',
        'iconUrl' => '<string>',
        'title' => '<string>',
        'version' => '<string>',
    ],
]

Result Details

Members
details
Type: BundleDetails structure

The details of the bundle.

Errors

InternalFailureException:

The service has encountered an unexpected error condition which prevents it from servicing the request.

ServiceUnavailableException:

The service is temporarily unavailable. The request should be retried after some time delay.

UnauthorizedException:

Credentials of the caller are insufficient to authorize the request.

TooManyRequestsException:

Too many requests have been received for this AWS account in too short a time. The request should be retried after some time delay.

BadRequestException:

The request cannot be processed because some parameter is not valid or the project state prevents the operation from being performed.

NotFoundException:

No entity can be found with the specified identifier.

DescribeProject

$result = $client->describeProject([/* ... */]);
$promise = $client->describeProjectAsync([/* ... */]);

Gets details about a project in AWS Mobile Hub.

Parameter Syntax

$result = $client->describeProject([
    'projectId' => '<string>', // REQUIRED
    'syncFromResources' => true || false,
]);

Parameter Details

Members
projectId
Required: Yes
Type: string

Unique project identifier.

syncFromResources
Type: 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.

Result Syntax

[
    'details' => [
        'consoleUrl' => '<string>',
        'createdDate' => <DateTime>,
        'lastUpdatedDate' => <DateTime>,
        'name' => '<string>',
        'projectId' => '<string>',
        'region' => '<string>',
        'resources' => [
            [
                'arn' => '<string>',
                'attributes' => ['<string>', ...],
                'feature' => '<string>',
                'name' => '<string>',
                'type' => '<string>',
            ],
            // ...
        ],
        'state' => 'NORMAL|SYNCING|IMPORTING',
    ],
]

Result Details

Members
details
Type: ProjectDetails structure

Detailed information about an AWS Mobile Hub project.

Errors

InternalFailureException:

The service has encountered an unexpected error condition which prevents it from servicing the request.

ServiceUnavailableException:

The service is temporarily unavailable. The request should be retried after some time delay.

UnauthorizedException:

Credentials of the caller are insufficient to authorize the request.

TooManyRequestsException:

Too many requests have been received for this AWS account in too short a time. The request should be retried after some time delay.

BadRequestException:

The request cannot be processed because some parameter is not valid or the project state prevents the operation from being performed.

NotFoundException:

No entity can be found with the specified identifier.

ExportBundle

$result = $client->exportBundle([/* ... */]);
$promise = $client->exportBundleAsync([/* ... */]);

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

Parameter Syntax

$result = $client->exportBundle([
    'bundleId' => '<string>', // REQUIRED
    'platform' => 'OSX|WINDOWS|LINUX|OBJC|SWIFT|ANDROID|JAVASCRIPT',
    'projectId' => '<string>',
]);

Parameter Details

Members
bundleId
Required: Yes
Type: string

Unique bundle identifier.

platform
Type: string

Developer desktop or target application platform.

projectId
Type: string

Unique project identifier.

Result Syntax

[
    'downloadUrl' => '<string>',
]

Result Details

Members
downloadUrl
Type: 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.

Errors

InternalFailureException:

The service has encountered an unexpected error condition which prevents it from servicing the request.

ServiceUnavailableException:

The service is temporarily unavailable. The request should be retried after some time delay.

UnauthorizedException:

Credentials of the caller are insufficient to authorize the request.

TooManyRequestsException:

Too many requests have been received for this AWS account in too short a time. The request should be retried after some time delay.

BadRequestException:

The request cannot be processed because some parameter is not valid or the project state prevents the operation from being performed.

NotFoundException:

No entity can be found with the specified identifier.

ExportProject

$result = $client->exportProject([/* ... */]);
$promise = $client->exportProjectAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->exportProject([
    'projectId' => '<string>', // REQUIRED
]);

Parameter Details

Members
projectId
Required: Yes
Type: string

Unique project identifier.

Result Syntax

[
    'downloadUrl' => '<string>',
    'shareUrl' => '<string>',
    'snapshotId' => '<string>',
]

Result Details

Members
downloadUrl
Type: string

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

shareUrl
Type: 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
Type: string

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

Errors

InternalFailureException:

The service has encountered an unexpected error condition which prevents it from servicing the request.

ServiceUnavailableException:

The service is temporarily unavailable. The request should be retried after some time delay.

UnauthorizedException:

Credentials of the caller are insufficient to authorize the request.

TooManyRequestsException:

Too many requests have been received for this AWS account in too short a time. The request should be retried after some time delay.

BadRequestException:

The request cannot be processed because some parameter is not valid or the project state prevents the operation from being performed.

NotFoundException:

No entity can be found with the specified identifier.

ListBundles

$result = $client->listBundles([/* ... */]);
$promise = $client->listBundlesAsync([/* ... */]);

List all available bundles.

Parameter Syntax

$result = $client->listBundles([
    'maxResults' => <integer>,
    'nextToken' => '<string>',
]);

Parameter Details

Members
maxResults
Type: int

Maximum number of records to list in a single response.

nextToken
Type: 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.

Result Syntax

[
    'bundleList' => [
        [
            'availablePlatforms' => ['<string>', ...],
            'bundleId' => '<string>',
            'description' => '<string>',
            'iconUrl' => '<string>',
            'title' => '<string>',
            'version' => '<string>',
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
bundleList
Type: Array of BundleDetails structures

A list of bundles.

nextToken
Type: string

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

Errors

InternalFailureException:

The service has encountered an unexpected error condition which prevents it from servicing the request.

ServiceUnavailableException:

The service is temporarily unavailable. The request should be retried after some time delay.

UnauthorizedException:

Credentials of the caller are insufficient to authorize the request.

TooManyRequestsException:

Too many requests have been received for this AWS account in too short a time. The request should be retried after some time delay.

BadRequestException:

The request cannot be processed because some parameter is not valid or the project state prevents the operation from being performed.

ListProjects

$result = $client->listProjects([/* ... */]);
$promise = $client->listProjectsAsync([/* ... */]);

Lists projects in AWS Mobile Hub.

Parameter Syntax

$result = $client->listProjects([
    'maxResults' => <integer>,
    'nextToken' => '<string>',
]);

Parameter Details

Members
maxResults
Type: int

Maximum number of records to list in a single response.

nextToken
Type: 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.

Result Syntax

[
    'nextToken' => '<string>',
    'projects' => [
        [
            'name' => '<string>',
            'projectId' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
nextToken
Type: 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.

projects
Type: Array of ProjectSummary structures

List of projects.

Errors

InternalFailureException:

The service has encountered an unexpected error condition which prevents it from servicing the request.

ServiceUnavailableException:

The service is temporarily unavailable. The request should be retried after some time delay.

UnauthorizedException:

Credentials of the caller are insufficient to authorize the request.

TooManyRequestsException:

Too many requests have been received for this AWS account in too short a time. The request should be retried after some time delay.

BadRequestException:

The request cannot be processed because some parameter is not valid or the project state prevents the operation from being performed.

UpdateProject

$result = $client->updateProject([/* ... */]);
$promise = $client->updateProjectAsync([/* ... */]);

Update an existing project.

Parameter Syntax

$result = $client->updateProject([
    'contents' => <string || resource || Psr\Http\Message\StreamInterface>,
    'projectId' => '<string>', // REQUIRED
]);

Parameter Details

Members
contents
Type: blob (string|resource|Psr\Http\Message\StreamInterface)

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
Required: Yes
Type: string

Unique project identifier.

Result Syntax

[
    'details' => [
        'consoleUrl' => '<string>',
        'createdDate' => <DateTime>,
        'lastUpdatedDate' => <DateTime>,
        'name' => '<string>',
        'projectId' => '<string>',
        'region' => '<string>',
        'resources' => [
            [
                'arn' => '<string>',
                'attributes' => ['<string>', ...],
                'feature' => '<string>',
                'name' => '<string>',
                'type' => '<string>',
            ],
            // ...
        ],
        'state' => 'NORMAL|SYNCING|IMPORTING',
    ],
]

Result Details

Members
details
Type: ProjectDetails structure

Detailed information about the updated AWS Mobile Hub project.

Errors

InternalFailureException:

The service has encountered an unexpected error condition which prevents it from servicing the request.

ServiceUnavailableException:

The service is temporarily unavailable. The request should be retried after some time delay.

UnauthorizedException:

Credentials of the caller are insufficient to authorize the request.

TooManyRequestsException:

Too many requests have been received for this AWS account in too short a time. The request should be retried after some time delay.

BadRequestException:

The request cannot be processed because some parameter is not valid or the project state prevents the operation from being performed.

NotFoundException:

No entity can be found with the specified identifier.

AccountActionRequiredException:

Account Action is required in order to continue the request.

LimitExceededException:

There are too many AWS Mobile Hub projects in the account or the account has exceeded the maximum number of resources in some AWS service. You should create another sub-account using AWS Organizations or remove some resources and retry your request.

Shapes

AccountActionRequiredException

Description

Account Action is required in order to continue the request.

Members
message
Type: string

The Exception Error Message.

BadRequestException

Description

The request cannot be processed because some parameter is not valid or the project state prevents the operation from being performed.

Members
message
Type: string

The Exception Error Message.

BundleDetails

Description

The details of the bundle.

Members
availablePlatforms
Type: Array of strings

Developer desktop or mobile app or website platforms.

bundleId
Type: string

Unique bundle identifier.

description
Type: string

Description of the download bundle.

iconUrl
Type: string

Icon for the download bundle.

title
Type: string

Title of the download bundle.

version
Type: string

Version of the download bundle.

InternalFailureException

Description

The service has encountered an unexpected error condition which prevents it from servicing the request.

Members
message
Type: string

The Exception Error Message.

LimitExceededException

Description

There are too many AWS Mobile Hub projects in the account or the account has exceeded the maximum number of resources in some AWS service. You should create another sub-account using AWS Organizations or remove some resources and retry your request.

Members
message
Type: string

The Exception Error Message.

retryAfterSeconds
Type: string

The Exception Error Message.

NotFoundException

Description

No entity can be found with the specified identifier.

Members
message
Type: string

The Exception Error Message.

ProjectDetails

Description

Detailed information about an AWS Mobile Hub project.

Members
consoleUrl
Type: string

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

createdDate
Type: timestamp (string|DateTime or anything parsable by strtotime)

Date the project was created.

lastUpdatedDate
Type: timestamp (string|DateTime or anything parsable by strtotime)

Date of the last modification of the project.

name
Type: string

Name of the project.

projectId
Type: string

Unique project identifier.

region
Type: string

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

resources
Type: Array of Resource structures

List of AWS resources associated with a project.

state
Type: string

Synchronization state for a project.

ProjectSummary

Description

Summary information about an AWS Mobile Hub project.

Members
name
Type: string

Name of the project.

projectId
Type: string

Unique project identifier.

Resource

Description

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

Members
arn
Type: string

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

attributes
Type: Associative array of custom strings keys (AttributeKey) to strings

Key-value attribute pairs.

feature
Type: string

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

name
Type: string

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

type
Type: string

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

ServiceUnavailableException

Description

The service is temporarily unavailable. The request should be retried after some time delay.

Members
message
Type: string

The Exception Error Message.

retryAfterSeconds
Type: string

The Exception Error Message.

TooManyRequestsException

Description

Too many requests have been received for this AWS account in too short a time. The request should be retried after some time delay.

Members
message
Type: string

The Exception Error Message.

retryAfterSeconds
Type: string

The Exception Error Message.

UnauthorizedException

Description

Credentials of the caller are insufficient to authorize the request.

Members
message
Type: string

The Exception Error Message.