IoTFleetHub

Client

class IoTFleetHub.Client

A low-level client representing AWS IoT Fleet Hub

With Fleet Hub for AWS IoT Device Management you can build stand-alone web applications for monitoring the health of your device fleets.

Note

Fleet Hub for AWS IoT Device Management is in public preview and is subject to change.

client = session.create_client('iotfleethub')

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

Creates a Fleet Hub for AWS IoT Device Management web application.

Note

Fleet Hub for AWS IoT Device Management is in public preview and is subject to change.

See also: AWS API Documentation

Request Syntax

response = client.create_application(
    applicationName='string',
    applicationDescription='string',
    clientToken='string',
    roleArn='string',
    tags={
        'string': 'string'
    }
)
Parameters
  • applicationName (string) --

    [REQUIRED]

    The name of the web application.

  • applicationDescription (string) -- An optional description of the web application.
  • clientToken (string) --

    A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.

    This field is autopopulated if not provided.

  • roleArn (string) --

    [REQUIRED]

    The ARN of the role that the web application assumes when it interacts with AWS IoT Core.

    Note

    The name of the role must be in the form ``AWSIotFleetHub_*random_string* `` .

  • tags (dict) --

    A set of key/value pairs that you can use to manage the web application resource.

    • (string) --
      • (string) --
Return type

dict

Returns

Response Syntax

{
    'applicationId': 'string',
    'applicationArn': 'string'
}

Response Structure

  • (dict) --

    • applicationId (string) --

      The unique Id of the web application.

    • applicationArn (string) --

      The ARN of the web application.

Exceptions

delete_application(**kwargs)

Deletes a Fleet Hub for AWS IoT Device Management web application.

Note

Fleet Hub for AWS IoT Device Management is in public preview and is subject to change.

See also: AWS API Documentation

Request Syntax

response = client.delete_application(
    applicationId='string',
    clientToken='string'
)
Parameters
  • applicationId (string) --

    [REQUIRED]

    The unique Id of the web application.

  • clientToken (string) --

    A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.

    This field is autopopulated if not provided.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

describe_application(**kwargs)

Gets information about a Fleet Hub for AWS IoT Device Management web application.

Note

Fleet Hub for AWS IoT Device Management is in public preview and is subject to change.

See also: AWS API Documentation

Request Syntax

response = client.describe_application(
    applicationId='string'
)
Parameters
applicationId (string) --

[REQUIRED]

The unique Id of the web application.

Return type
dict
Returns
Response Syntax
{
    'applicationId': 'string',
    'applicationArn': 'string',
    'applicationName': 'string',
    'applicationDescription': 'string',
    'applicationUrl': 'string',
    'applicationState': 'CREATING'|'DELETING'|'ACTIVE'|'CREATE_FAILED'|'DELETE_FAILED',
    'applicationCreationDate': 123,
    'applicationLastUpdateDate': 123,
    'roleArn': 'string',
    'ssoClientId': 'string',
    'errorMessage': 'string',
    'tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --
    • applicationId (string) --

      The unique Id of the web application.

    • applicationArn (string) --

      The ARN of the web application.

    • applicationName (string) --

      The name of the web application.

    • applicationDescription (string) --

      An optional description of the web application.

    • applicationUrl (string) --

      The URL of the web application.

    • applicationState (string) --

      The current state of the web application.

    • applicationCreationDate (integer) --

      The date (in Unix epoch time) when the application was created.

    • applicationLastUpdateDate (integer) --

      The date (in Unix epoch time) when the application was last updated.

    • roleArn (string) --

      The ARN of the role that the web application assumes when it interacts with AWS IoT Core.

    • ssoClientId (string) --

      The Id of the single sign-on client that you use to authenticate and authorize users on the web application.

    • errorMessage (string) --

      A message indicating why the DescribeApplication API failed.

    • tags (dict) --

      A set of key/value pairs that you can use to manage the web application resource.

      • (string) --
        • (string) --

Exceptions

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

Gets a list of Fleet Hub for AWS IoT Device Management web applications for the current account.

Note

Fleet Hub for AWS IoT Device Management is in public preview and is subject to change.

See also: AWS API Documentation

Request Syntax

response = client.list_applications(
    nextToken='string'
)
Parameters
nextToken (string) -- A token used to get the next set of results.
Return type
dict
Returns
Response Syntax
{
    'applicationSummaries': [
        {
            'applicationId': 'string',
            'applicationName': 'string',
            'applicationDescription': 'string',
            'applicationUrl': 'string',
            'applicationCreationDate': 123,
            'applicationLastUpdateDate': 123,
            'applicationState': 'CREATING'|'DELETING'|'ACTIVE'|'CREATE_FAILED'|'DELETE_FAILED'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --
    • applicationSummaries (list) --

      An array of objects that provide summaries of information about the web applications in the list.

      • (dict) --

        A summary of information about a AWS IoT Device Management web application.

        Note

        Fleet Hub for AWS IoT Device Management is in public preview and is subject to change.

        • applicationId (string) --

          The unique Id of the web application.

        • applicationName (string) --

          The name of the web application.

        • applicationDescription (string) --

          An optional description of the web application.

        • applicationUrl (string) --

          The URL of the web application.

        • applicationCreationDate (integer) --

          The date (in Unix epoch time) when the web application was created.

        • applicationLastUpdateDate (integer) --

          The date (in Unix epoch time) when the web application was last updated.

        • applicationState (string) --

          The current state of the web application.

    • nextToken (string) --

      A token used to get the next set of results.

Exceptions

list_tags_for_resource(**kwargs)

Lists the tags for the specified resource.

Note

Fleet Hub for AWS IoT Device Management is in public preview and is subject to change.

See also: AWS API Documentation

Request Syntax

response = client.list_tags_for_resource(
    resourceArn='string'
)
Parameters
resourceArn (string) --

[REQUIRED]

The ARN of the resource.

Return type
dict
Returns
Response Syntax
{
    'tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --
    • tags (dict) --

      The list of tags assigned to the resource.

      • (string) --
        • (string) --

Exceptions

tag_resource(**kwargs)

Adds to or modifies the tags of the specified resource. Tags are metadata which can be used to manage a resource.

Note

Fleet Hub for AWS IoT Device Management is in public preview and is subject to change.

See also: AWS API Documentation

Request Syntax

response = client.tag_resource(
    resourceArn='string',
    tags={
        'string': 'string'
    }
)
Parameters
  • resourceArn (string) --

    [REQUIRED]

    The ARN of the resource.

  • tags (dict) --

    [REQUIRED]

    The new or modified tags for the resource.

    • (string) --
      • (string) --
Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

untag_resource(**kwargs)

Removes the specified tags (metadata) from the resource.

Note

Fleet Hub for AWS IoT Device Management is in public preview and is subject to change.

See also: AWS API Documentation

Request Syntax

response = client.untag_resource(
    resourceArn='string',
    tagKeys=[
        'string',
    ]
)
Parameters
  • resourceArn (string) --

    [REQUIRED]

    The ARN of the resource.

  • tagKeys (list) --

    [REQUIRED]

    A list of the keys of the tags to be removed from the resource.

    • (string) --
Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

update_application(**kwargs)

Updates information about a Fleet Hub for a AWS IoT Device Management web application.

Note

Fleet Hub for AWS IoT Device Management is in public preview and is subject to change.

See also: AWS API Documentation

Request Syntax

response = client.update_application(
    applicationId='string',
    applicationName='string',
    applicationDescription='string',
    clientToken='string'
)
Parameters
  • applicationId (string) --

    [REQUIRED]

    The unique Id of the web application.

  • applicationName (string) -- The name of the web application.
  • applicationDescription (string) -- An optional description of the web application.
  • clientToken (string) --

    A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.

    This field is autopopulated if not provided.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

Client Exceptions

Client exceptions are available on a client instance via the exceptions property. For more detailed instructions and examples on the exact usage of client exceptions, see the error handling user guide.

The available client exceptions are:

class IoTFleetHub.Client.exceptions.ConflictException

The request conflicts with the current state of the resource.

Example

try:
  ...
except client.exceptions.ConflictException as e:
  print(e.response)
response

The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.

Syntax

{
    'message': 'string',
    'Error': {
        'Code': 'string',
        'Message': 'string'
    }
}

Structure

  • (dict) --

    The request conflicts with the current state of the resource.

    • message (string) --
    • Error (dict) -- Normalized access to common exception attributes.
      • Code (string) -- An identifier specifying the exception type.
      • Message (string) -- A descriptive message explaining why the exception occured.
class IoTFleetHub.Client.exceptions.InternalFailureException

An unexpected error has occurred.

Example

try:
  ...
except client.exceptions.InternalFailureException as e:
  print(e.response)
response

The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.

Syntax

{
    'message': 'string',
    'Error': {
        'Code': 'string',
        'Message': 'string'
    }
}

Structure

  • (dict) --

    An unexpected error has occurred.

    • message (string) --
    • Error (dict) -- Normalized access to common exception attributes.
      • Code (string) -- An identifier specifying the exception type.
      • Message (string) -- A descriptive message explaining why the exception occured.
class IoTFleetHub.Client.exceptions.InvalidRequestException

The request is not valid.

Example

try:
  ...
except client.exceptions.InvalidRequestException as e:
  print(e.response)
response

The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.

Syntax

{
    'message': 'string',
    'Error': {
        'Code': 'string',
        'Message': 'string'
    }
}

Structure

  • (dict) --

    The request is not valid.

    • message (string) --
    • Error (dict) -- Normalized access to common exception attributes.
      • Code (string) -- An identifier specifying the exception type.
      • Message (string) -- A descriptive message explaining why the exception occured.
class IoTFleetHub.Client.exceptions.LimitExceededException

A limit has been exceeded.

Example

try:
  ...
except client.exceptions.LimitExceededException as e:
  print(e.response)
response

The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.

Syntax

{
    'message': 'string',
    'Error': {
        'Code': 'string',
        'Message': 'string'
    }
}

Structure

  • (dict) --

    A limit has been exceeded.

    • message (string) --
    • Error (dict) -- Normalized access to common exception attributes.
      • Code (string) -- An identifier specifying the exception type.
      • Message (string) -- A descriptive message explaining why the exception occured.
class IoTFleetHub.Client.exceptions.ResourceNotFoundException

The specified resource does not exist.

Example

try:
  ...
except client.exceptions.ResourceNotFoundException as e:
  print(e.response)
response

The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.

Syntax

{
    'message': 'string',
    'Error': {
        'Code': 'string',
        'Message': 'string'
    }
}

Structure

  • (dict) --

    The specified resource does not exist.

    • message (string) --
    • Error (dict) -- Normalized access to common exception attributes.
      • Code (string) -- An identifier specifying the exception type.
      • Message (string) -- A descriptive message explaining why the exception occured.
class IoTFleetHub.Client.exceptions.ThrottlingException

The rate exceeds the limit.

Example

try:
  ...
except client.exceptions.ThrottlingException as e:
  print(e.response)
response

The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.

Syntax

{
    'message': 'string',
    'Error': {
        'Code': 'string',
        'Message': 'string'
    }
}

Structure

  • (dict) --

    The rate exceeds the limit.

    • message (string) --
    • Error (dict) -- Normalized access to common exception attributes.
      • Code (string) -- An identifier specifying the exception type.
      • Message (string) -- A descriptive message explaining why the exception occured.

Paginators

The available paginators are:

class IoTFleetHub.Paginator.ListApplications
paginator = client.get_paginator('list_applications')
paginate(**kwargs)

Creates an iterator that will paginate through responses from IoTFleetHub.Client.list_applications().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    PaginationConfig={
        'MaxItems': 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.

  • StartingToken (string) --

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

Return type
dict
Returns
Response Syntax
{
    'applicationSummaries': [
        {
            'applicationId': 'string',
            'applicationName': 'string',
            'applicationDescription': 'string',
            'applicationUrl': 'string',
            'applicationCreationDate': 123,
            'applicationLastUpdateDate': 123,
            'applicationState': 'CREATING'|'DELETING'|'ACTIVE'|'CREATE_FAILED'|'DELETE_FAILED'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --
    • applicationSummaries (list) --

      An array of objects that provide summaries of information about the web applications in the list.

      • (dict) --

        A summary of information about a AWS IoT Device Management web application.

        Note

        Fleet Hub for AWS IoT Device Management is in public preview and is subject to change.

        • applicationId (string) --

          The unique Id of the web application.

        • applicationName (string) --

          The name of the web application.

        • applicationDescription (string) --

          An optional description of the web application.

        • applicationUrl (string) --

          The URL of the web application.

        • applicationCreationDate (integer) --

          The date (in Unix epoch time) when the web application was created.

        • applicationLastUpdateDate (integer) --

          The date (in Unix epoch time) when the web application was last updated.

        • applicationState (string) --

          The current state of the web application.

    • NextToken (string) --

      A token to resume pagination.