default_authorizers
Creates, updates, deletes, gets or lists a default_authorizers resource.
Overview
| Name | default_authorizers |
| Type | Resource |
| Id | aws.iot.default_authorizers |
Fields
The following fields are returned by SELECT queries:
- describe_default_authorizer
| Name | Datatype | Description |
|---|---|---|
authorizer_arn | string | The authorizer ARN. |
authorizer_function_arn | string | The authorizer's Lambda function ARN. (pattern: <code>[\s\S]*</code>) |
authorizer_name | string | The authorizer name. (pattern: <code>[\w=,@-]+</code>) |
creation_date | string (date-time) | The UNIX timestamp of when the authorizer was created. |
enable_caching_for_http | 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. |
last_modified_date | string (date-time) | The UNIX timestamp of when the authorizer was last updated. |
signing_disabled | boolean | Specifies whether IoT validates the token signature in an authorization request. |
status | string | The status of the authorizer. (ACTIVE, INACTIVE) |
token_key_name | string | The key used to extract the token from the HTTP headers. (pattern: <code>[a-zA-Z0-9_-]+</code>) |
token_signing_public_keys | object | The public keys used to validate the token signature returned by your custom authentication service. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_default_authorizer | select | region | Describes the default authorizer. Requires permission to access the DescribeDefaultAuthorizer action. | |
set_default_authorizer | update | region, authorizerName | Sets the default authorizer. This will be used if a websocket connection is made without specifying an authorizer. Requires permission to access the SetDefaultAuthorizer action. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_default_authorizer
Describes the default authorizer. Requires permission to access the DescribeDefaultAuthorizer action.
SELECT
authorizer_arn,
authorizer_function_arn,
authorizer_name,
creation_date,
enable_caching_for_http,
last_modified_date,
signing_disabled,
status,
token_key_name,
token_signing_public_keys
FROM aws.iot.default_authorizers
WHERE region = '{{ region }}' -- required
;
UPDATE examples
- set_default_authorizer
Sets the default authorizer. This will be used if a websocket connection is made without specifying an authorizer. Requires permission to access the SetDefaultAuthorizer action.
UPDATE aws.iot.default_authorizers
SET
authorizerName = '{{ authorizerName }}'
WHERE
region = '{{ region }}' --required
AND authorizerName = '{{ authorizerName }}' --required
RETURNING
authorizer_arn,
authorizer_name;