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 = 'us-east-1' AND
Identifier = '{{ authorizer_name }}';
Lists all authorizers in a region.
SELECT
region,
authorizer_name
FROM awscc.iot.authorizers_list_only
WHERE
region = 'us-east-1';
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 }}';
/*+ 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 }}';
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 }}';
DELETE example
/*+ delete */
DELETE FROM awscc.iot.authorizers
WHERE
Identifier = '{{ authorizer_name }}' AND
region = 'us-east-1';
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