You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::Mobile::Client

Inherits:
Seahorse::Client::Base show all
Includes:
ClientStubs
Defined in:
gems/aws-sdk-mobile/lib/aws-sdk-mobile/client.rb

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from ClientStubs

#stub_data, #stub_responses

Methods inherited from Seahorse::Client::Base

add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(*args) ⇒ Client

Returns a new instance of Client

Parameters:

  • options (Hash)

    a customizable set of options



142
143
144
# File 'gems/aws-sdk-mobile/lib/aws-sdk-mobile/client.rb', line 142

def initialize(*args)
  super
end

Instance Method Details

#create_project(params = {}) ⇒ Types::CreateProjectResult

Creates an AWS Mobile Hub project.

Examples:

Request syntax with placeholder values


resp = client.create_project({
  name: "ProjectName",
  region: "ProjectRegion",
  contents: "data",
  snapshot_id: "SnapshotId",
})

Response structure


resp.details.name #=> String
resp.details.project_id #=> String
resp.details.region #=> String
resp.details.state #=> String, one of "NORMAL", "SYNCING", "IMPORTING"
resp.details.created_date #=> Time
resp.details.last_updated_date #=> Time
resp.details.console_url #=> String
resp.details.resources #=> Array
resp.details.resources[0].type #=> String
resp.details.resources[0].name #=> String
resp.details.resources[0].arn #=> String
resp.details.resources[0].feature #=> String
resp.details.resources[0].attributes #=> Hash
resp.details.resources[0].attributes["AttributeKey"] #=> <Hash,Array,String,Numeric,Boolean,IO,Set,nil>

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :name (String)

    Name of the project.

  • :region (String)

    Default region where project resources should be created.

  • :contents (String, IO)

    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.

  • :snapshot_id (String)

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

Returns:

See Also:



200
201
202
203
# File 'gems/aws-sdk-mobile/lib/aws-sdk-mobile/client.rb', line 200

def create_project(params = {}, options = {})
  req = build_request(:create_project, params)
  req.send_request(options)
end

#delete_project(params = {}) ⇒ Types::DeleteProjectResult

Delets a project in AWS Mobile Hub.

Examples:

Request syntax with placeholder values


resp = client.delete_project({
  project_id: "ProjectId", # required
})

Response structure


resp.deleted_resources #=> Array
resp.deleted_resources[0].type #=> String
resp.deleted_resources[0].name #=> String
resp.deleted_resources[0].arn #=> String
resp.deleted_resources[0].feature #=> String
resp.deleted_resources[0].attributes #=> Hash
resp.deleted_resources[0].attributes["AttributeKey"] #=> <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
resp.orphaned_resources #=> Array
resp.orphaned_resources[0].type #=> String
resp.orphaned_resources[0].name #=> String
resp.orphaned_resources[0].arn #=> String
resp.orphaned_resources[0].feature #=> String
resp.orphaned_resources[0].attributes #=> Hash
resp.orphaned_resources[0].attributes["AttributeKey"] #=> <Hash,Array,String,Numeric,Boolean,IO,Set,nil>

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :project_id (required, String)

    Unique project identifier.

Returns:

See Also:



242
243
244
245
# File 'gems/aws-sdk-mobile/lib/aws-sdk-mobile/client.rb', line 242

def delete_project(params = {}, options = {})
  req = build_request(:delete_project, params)
  req.send_request(options)
end

#describe_bundle(params = {}) ⇒ Types::DescribeBundleResult

Get the bundle details for the requested bundle id.

Examples:

Request syntax with placeholder values


resp = client.describe_bundle({
  bundle_id: "BundleId", # required
})

Response structure


resp.details.bundle_id #=> String
resp.details.title #=> String
resp.details.version #=> String
resp.details.description #=> String
resp.details.icon_url #=> String
resp.details.available_platforms #=> Array
resp.details.available_platforms[0] #=> String, one of "OSX", "WINDOWS", "LINUX", "OBJC", "SWIFT", "ANDROID", "JAVASCRIPT"

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :bundle_id (required, String)

    Unique bundle identifier.

Returns:

See Also:



276
277
278
279
# File 'gems/aws-sdk-mobile/lib/aws-sdk-mobile/client.rb', line 276

def describe_bundle(params = {}, options = {})
  req = build_request(:describe_bundle, params)
  req.send_request(options)
end

#describe_project(params = {}) ⇒ Types::DescribeProjectResult

Gets details about a project in AWS Mobile Hub.

Examples:

Request syntax with placeholder values


resp = client.describe_project({
  project_id: "ProjectId", # required
  sync_from_resources: false,
})

Response structure


resp.details.name #=> String
resp.details.project_id #=> String
resp.details.region #=> String
resp.details.state #=> String, one of "NORMAL", "SYNCING", "IMPORTING"
resp.details.created_date #=> Time
resp.details.last_updated_date #=> Time
resp.details.console_url #=> String
resp.details.resources #=> Array
resp.details.resources[0].type #=> String
resp.details.resources[0].name #=> String
resp.details.resources[0].arn #=> String
resp.details.resources[0].feature #=> String
resp.details.resources[0].attributes #=> Hash
resp.details.resources[0].attributes["AttributeKey"] #=> <Hash,Array,String,Numeric,Boolean,IO,Set,nil>

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :project_id (required, String)

    Unique project identifier.

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

Returns:

See Also:



323
324
325
326
# File 'gems/aws-sdk-mobile/lib/aws-sdk-mobile/client.rb', line 323

def describe_project(params = {}, options = {})
  req = build_request(:describe_project, params)
  req.send_request(options)
end

#export_bundle(params = {}) ⇒ Types::ExportBundleResult

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

Examples:

Request syntax with placeholder values


resp = client.export_bundle({
  bundle_id: "BundleId", # required
  project_id: "ProjectId",
  platform: "OSX", # accepts OSX, WINDOWS, LINUX, OBJC, SWIFT, ANDROID, JAVASCRIPT
})

Response structure


resp.download_url #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :bundle_id (required, String)

    Unique bundle identifier.

  • :project_id (String)

    Unique project identifier.

  • :platform (String)

    Developer desktop or target application platform.

Returns:

See Also:



361
362
363
364
# File 'gems/aws-sdk-mobile/lib/aws-sdk-mobile/client.rb', line 361

def export_bundle(params = {}, options = {})
  req = build_request(:export_bundle, params)
  req.send_request(options)
end

#export_project(params = {}) ⇒ Types::ExportProjectResult

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.

Examples:

Request syntax with placeholder values


resp = client.export_project({
  project_id: "ProjectId", # required
})

Response structure


resp.download_url #=> String
resp.share_url #=> String
resp.snapshot_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :project_id (required, String)

    Unique project identifier.

Returns:

See Also:



396
397
398
399
# File 'gems/aws-sdk-mobile/lib/aws-sdk-mobile/client.rb', line 396

def export_project(params = {}, options = {})
  req = build_request(:export_project, params)
  req.send_request(options)
end

#list_bundles(params = {}) ⇒ Types::ListBundlesResult

List all available bundles.

Examples:

Request syntax with placeholder values


resp = client.list_bundles({
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.bundle_list #=> Array
resp.bundle_list[0].bundle_id #=> String
resp.bundle_list[0].title #=> String
resp.bundle_list[0].version #=> String
resp.bundle_list[0].description #=> String
resp.bundle_list[0].icon_url #=> String
resp.bundle_list[0].available_platforms #=> Array
resp.bundle_list[0].available_platforms[0] #=> String, one of "OSX", "WINDOWS", "LINUX", "OBJC", "SWIFT", "ANDROID", "JAVASCRIPT"
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :max_results (Integer)

    Maximum number of records to list in a single response.

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

Returns:

See Also:



439
440
441
442
# File 'gems/aws-sdk-mobile/lib/aws-sdk-mobile/client.rb', line 439

def list_bundles(params = {}, options = {})
  req = build_request(:list_bundles, params)
  req.send_request(options)
end

#list_projects(params = {}) ⇒ Types::ListProjectsResult

Lists projects in AWS Mobile Hub.

Examples:

Request syntax with placeholder values


resp = client.list_projects({
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.projects #=> Array
resp.projects[0].name #=> String
resp.projects[0].project_id #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :max_results (Integer)

    Maximum number of records to list in a single response.

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

Returns:

See Also:



477
478
479
480
# File 'gems/aws-sdk-mobile/lib/aws-sdk-mobile/client.rb', line 477

def list_projects(params = {}, options = {})
  req = build_request(:list_projects, params)
  req.send_request(options)
end

#update_project(params = {}) ⇒ Types::UpdateProjectResult

Update an existing project.

Examples:

Request syntax with placeholder values


resp = client.update_project({
  contents: "data",
  project_id: "ProjectId", # required
})

Response structure


resp.details.name #=> String
resp.details.project_id #=> String
resp.details.region #=> String
resp.details.state #=> String, one of "NORMAL", "SYNCING", "IMPORTING"
resp.details.created_date #=> Time
resp.details.last_updated_date #=> Time
resp.details.console_url #=> String
resp.details.resources #=> Array
resp.details.resources[0].type #=> String
resp.details.resources[0].name #=> String
resp.details.resources[0].arn #=> String
resp.details.resources[0].feature #=> String
resp.details.resources[0].attributes #=> Hash
resp.details.resources[0].attributes["AttributeKey"] #=> <Hash,Array,String,Numeric,Boolean,IO,Set,nil>

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :contents (String, IO)

    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.

  • :project_id (required, String)

    Unique project identifier.

Returns:

See Also:



524
525
526
527
# File 'gems/aws-sdk-mobile/lib/aws-sdk-mobile/client.rb', line 524

def update_project(params = {}, options = {})
  req = build_request(:update_project, params)
  req.send_request(options)
end