AWS IoT

2021/12/08 - AWS IoT - 4 updated api methods

Changes  This release allows customer to enable caching of custom authorizer on HTTP protocol for clients that use persistent or Keep-Alive connection in order to reduce the number of Lambda invocations.

CreateAuthorizer (updated) Link ¶
Changes (request)
{'enableCachingForHttp': 'boolean'}

Creates an authorizer.

Requires permission to access the CreateAuthorizer action.

See also: AWS API Documentation

Request Syntax

client.create_authorizer(
    authorizerName='string',
    authorizerFunctionArn='string',
    tokenKeyName='string',
    tokenSigningPublicKeys={
        'string': 'string'
    },
    status='ACTIVE'|'INACTIVE',
    tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    signingDisabled=True|False,
    enableCachingForHttp=True|False
)
type authorizerName

string

param authorizerName

[REQUIRED]

The authorizer name.

type authorizerFunctionArn

string

param authorizerFunctionArn

[REQUIRED]

The ARN of the authorizer's Lambda function.

type tokenKeyName

string

param tokenKeyName

The name of the token key used to extract the token from the HTTP headers.

type tokenSigningPublicKeys

dict

param tokenSigningPublicKeys

The public keys used to verify the digital signature returned by your custom authentication service.

  • (string) --

    • (string) --

type status

string

param status

The status of the create authorizer request.

type tags

list

param tags

Metadata which can be used to manage the custom authorizer.

Note

For URI Request parameters use format: ...key1=value1&key2=value2...

For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..."

For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."

  • (dict) --

    A set of key/value pairs that are used to manage the resource.

    • Key (string) -- [REQUIRED]

      The tag's key.

    • Value (string) --

      The tag's value.

type signingDisabled

boolean

param signingDisabled

Specifies whether IoT validates the token signature in an authorization request.

type enableCachingForHttp

boolean

param enableCachingForHttp

When true , the result from the authorizer’s Lambda function is cached for clients that use persistent HTTP connections. The results are cached for the time specified by the Lambda function in refreshAfterInSeconds . This value does not affect authorization of clients that use MQTT connections.

The default value is false .

rtype

dict

returns

Response Syntax

{
    'authorizerName': 'string',
    'authorizerArn': 'string'
}

Response Structure

  • (dict) --

    • authorizerName (string) --

      The authorizer's name.

    • authorizerArn (string) --

      The authorizer ARN.

DescribeAuthorizer (updated) Link ¶
Changes (response)
{'authorizerDescription': {'enableCachingForHttp': 'boolean'}}

Describes an authorizer.

Requires permission to access the DescribeAuthorizer action.

See also: AWS API Documentation

Request Syntax

client.describe_authorizer(
    authorizerName='string'
)
type authorizerName

string

param authorizerName

[REQUIRED]

The name of the authorizer to describe.

rtype

dict

returns

Response Syntax

{
    'authorizerDescription': {
        'authorizerName': 'string',
        'authorizerArn': 'string',
        'authorizerFunctionArn': 'string',
        'tokenKeyName': 'string',
        'tokenSigningPublicKeys': {
            'string': 'string'
        },
        'status': 'ACTIVE'|'INACTIVE',
        'creationDate': datetime(2015, 1, 1),
        'lastModifiedDate': datetime(2015, 1, 1),
        'signingDisabled': True|False,
        'enableCachingForHttp': True|False
    }
}

Response Structure

  • (dict) --

    • authorizerDescription (dict) --

      The authorizer description.

      • authorizerName (string) --

        The authorizer name.

      • authorizerArn (string) --

        The authorizer ARN.

      • authorizerFunctionArn (string) --

        The authorizer's Lambda function ARN.

      • tokenKeyName (string) --

        The key used to extract the token from the HTTP headers.

      • tokenSigningPublicKeys (dict) --

        The public keys used to validate the token signature returned by your custom authentication service.

        • (string) --

          • (string) --

      • status (string) --

        The status of the authorizer.

      • creationDate (datetime) --

        The UNIX timestamp of when the authorizer was created.

      • lastModifiedDate (datetime) --

        The UNIX timestamp of when the authorizer was last updated.

      • signingDisabled (boolean) --

        Specifies whether IoT validates the token signature in an authorization request.

      • enableCachingForHttp (boolean) --

        When true , the result from the authorizer’s Lambda function is cached for the time specified in refreshAfterInSeconds . The cached result is used while the device reuses the same HTTP connection.

DescribeDefaultAuthorizer (updated) Link ¶
Changes (response)
{'authorizerDescription': {'enableCachingForHttp': 'boolean'}}

Describes the default authorizer.

Requires permission to access the DescribeDefaultAuthorizer action.

See also: AWS API Documentation

Request Syntax

client.describe_default_authorizer()
rtype

dict

returns

Response Syntax

{
    'authorizerDescription': {
        'authorizerName': 'string',
        'authorizerArn': 'string',
        'authorizerFunctionArn': 'string',
        'tokenKeyName': 'string',
        'tokenSigningPublicKeys': {
            'string': 'string'
        },
        'status': 'ACTIVE'|'INACTIVE',
        'creationDate': datetime(2015, 1, 1),
        'lastModifiedDate': datetime(2015, 1, 1),
        'signingDisabled': True|False,
        'enableCachingForHttp': True|False
    }
}

Response Structure

  • (dict) --

    • authorizerDescription (dict) --

      The default authorizer's description.

      • authorizerName (string) --

        The authorizer name.

      • authorizerArn (string) --

        The authorizer ARN.

      • authorizerFunctionArn (string) --

        The authorizer's Lambda function ARN.

      • tokenKeyName (string) --

        The key used to extract the token from the HTTP headers.

      • tokenSigningPublicKeys (dict) --

        The public keys used to validate the token signature returned by your custom authentication service.

        • (string) --

          • (string) --

      • status (string) --

        The status of the authorizer.

      • creationDate (datetime) --

        The UNIX timestamp of when the authorizer was created.

      • lastModifiedDate (datetime) --

        The UNIX timestamp of when the authorizer was last updated.

      • signingDisabled (boolean) --

        Specifies whether IoT validates the token signature in an authorization request.

      • enableCachingForHttp (boolean) --

        When true , the result from the authorizer’s Lambda function is cached for the time specified in refreshAfterInSeconds . The cached result is used while the device reuses the same HTTP connection.

UpdateAuthorizer (updated) Link ¶
Changes (request)
{'enableCachingForHttp': 'boolean'}

Updates an authorizer.

Requires permission to access the UpdateAuthorizer action.

See also: AWS API Documentation

Request Syntax

client.update_authorizer(
    authorizerName='string',
    authorizerFunctionArn='string',
    tokenKeyName='string',
    tokenSigningPublicKeys={
        'string': 'string'
    },
    status='ACTIVE'|'INACTIVE',
    enableCachingForHttp=True|False
)
type authorizerName

string

param authorizerName

[REQUIRED]

The authorizer name.

type authorizerFunctionArn

string

param authorizerFunctionArn

The ARN of the authorizer's Lambda function.

type tokenKeyName

string

param tokenKeyName

The key used to extract the token from the HTTP headers.

type tokenSigningPublicKeys

dict

param tokenSigningPublicKeys

The public keys used to verify the token signature.

  • (string) --

    • (string) --

type status

string

param status

The status of the update authorizer request.

type enableCachingForHttp

boolean

param enableCachingForHttp

When true , the result from the authorizer’s Lambda function is cached for the time specified in refreshAfterInSeconds . The cached result is used while the device reuses the same HTTP connection.

rtype

dict

returns

Response Syntax

{
    'authorizerName': 'string',
    'authorizerArn': 'string'
}

Response Structure

  • (dict) --

    • authorizerName (string) --

      The authorizer name.

    • authorizerArn (string) --

      The authorizer ARN.