Skip to main content

authorizers

Creates, updates, deletes or gets an authorizer resource or lists authorizers in a region

Overview

Nameauthorizers
TypeResource
DescriptionCreates an authorizer.
Idawscc.iot.authorizers

Fields

NameDatatypeDescription
authorizer_function_arnstring
arnstring
authorizer_namestring
signing_disabledboolean
statusstring
token_key_namestring
token_signing_public_keysobject
enable_caching_for_httpboolean
tagsarray
regionstringAWS region.

For more information, see AWS::IoT::Authorizer.

Methods

NameResourceAccessible byRequired Params
create_resourceauthorizersINSERTAuthorizerFunctionArn, region
delete_resourceauthorizersDELETEIdentifier, region
update_resourceauthorizersUPDATEIdentifier, PatchDocument, region
list_resourcesauthorizers_list_onlySELECTregion
get_resourceauthorizersSELECTIdentifier, region

SELECT examples

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 }}';

INSERT example

Use the following StackQL query and manifest file to create a new authorizer resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.iot.authorizers (
AuthorizerFunctionArn,
region
)
SELECT
'{{ authorizer_function_arn }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

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:

ParameterDescription
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:

iot:CreateAuthorizer,
iot:DescribeAuthorizer,
iot:TagResource,
iot:ListTagsForResource,
kms:Decrypt