authorizers
Creates, updates, deletes or gets an authorizer resource or lists authorizers in a region
Overview
| Name | authorizers |
| Type | Resource |
| Description | Creates an authorizer. |
| Id | awscc.iot.authorizers |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
authorizer_function_arn | string | |
arn | string | |
authorizer_name | string | |
signing_disabled | boolean | |
status | string | |
token_key_name | string | |
token_signing_public_keys | object | |
enable_caching_for_http | boolean | |
tags | array | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
authorizer_name | string | |
region | string | AWS region. |
For more information, see AWS::IoT::Authorizer.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | authorizers | INSERT | AuthorizerFunctionArn, region |
delete_resource | authorizers | DELETE | Identifier, region |
update_resource | authorizers | UPDATE | Identifier, PatchDocument, region |
list_resources | authorizers_list_only | SELECT | region |
get_resource | authorizers | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual authorizer.
SELECT
region,
authorizer_function_arn,
arn,
authorizer_name,
signing_disabled,
status,
token_key_name,
token_signing_public_keys,
enable_caching_for_http,
tags
FROM awscc.iot.authorizers
WHERE
region = '{{ region }}' AND
Identifier = '{{ authorizer_name }}';
Lists all authorizers in a region.
SELECT
region,
authorizer_name
FROM awscc.iot.authorizers_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new authorizer resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.iot.authorizers (
AuthorizerFunctionArn,
region
)
SELECT
'{{ authorizer_function_arn }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.iot.authorizers (
AuthorizerFunctionArn,
AuthorizerName,
SigningDisabled,
Status,
TokenKeyName,
TokenSigningPublicKeys,
EnableCachingForHttp,
Tags,
region
)
SELECT
'{{ authorizer_function_arn }}',
'{{ authorizer_name }}',
'{{ signing_disabled }}',
'{{ status }}',
'{{ token_key_name }}',
'{{ token_signing_public_keys }}',
'{{ enable_caching_for_http }}',
'{{ tags }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: authorizer
props:
- name: authorizer_function_arn
value: '{{ authorizer_function_arn }}'
- name: authorizer_name
value: '{{ authorizer_name }}'
- name: signing_disabled
value: '{{ signing_disabled }}'
- name: status
value: '{{ status }}'
- name: token_key_name
value: '{{ token_key_name }}'
- name: token_signing_public_keys
value: {}
- name: enable_caching_for_http
value: '{{ enable_caching_for_http }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a authorizer resource, using stack-deploy.
/*+ update */
UPDATE awscc.iot.authorizers
SET PatchDocument = string('{{ {
"AuthorizerFunctionArn": authorizer_function_arn,
"Status": status,
"TokenKeyName": token_key_name,
"TokenSigningPublicKeys": token_signing_public_keys,
"EnableCachingForHttp": enable_caching_for_http,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ authorizer_name }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.iot.authorizers
WHERE
Identifier = '{{ authorizer_name }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
Permissions
To operate on the authorizers resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
iot:CreateAuthorizer,
iot:DescribeAuthorizer,
iot:TagResource,
iot:ListTagsForResource,
kms:Decrypt
iot:DescribeAuthorizer,
iot:ListTagsForResource,
kms:Decrypt
iot:UpdateAuthorizer,
iot:DescribeAuthorizer,
iot:TagResource,
iot:UntagResource,
iot:ListTagsForResource,
kms:Decrypt
iot:UpdateAuthorizer,
iot:DeleteAuthorizer,
iot:DescribeAuthorizer,
kms:Decrypt
iot:ListAuthorizers