create_authorizer
async
¶
create_authorizer(
authorizer_name: AuthorizerName,
authorizer_function_arn: AuthorizerFunctionArn,
*,
config_overrides: Optional[AsyncIoTClientConfig] = None,
token_key_name: Optional[TokenKeyName] = None,
token_signing_public_keys: Optional[PublicKeyMap] = None,
status: Optional[AuthorizerStatus] = None,
tags: Optional[TagList] = None,
signing_disabled: Optional[BooleanKey] = None,
enable_caching_for_http: Optional[EnableCachingForHttp] = None,
) -> CreateAuthorizerResponse
Creates an authorizer.
Requires permission to access the CreateAuthorizer action.
Parameters:
-
authorizer_name(AuthorizerName) –The authorizer name.
-
authorizer_function_arn(AuthorizerFunctionArn) –The ARN of the authorizer's Lambda function.
-
token_key_name(Optional[TokenKeyName], default:None) –The name of the token key used to extract the token from the HTTP headers.
-
token_signing_public_keys(Optional[PublicKeyMap], default:None) –The public keys used to verify the digital signature returned by your custom authentication service.
-
status(Optional[AuthorizerStatus], default:None) –The status of the create authorizer request.
-
tags(Optional[TagList], default:None) –Metadata which can be used to manage the custom authorizer.
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..."
-
signing_disabled(Optional[BooleanKey], default:None) –Specifies whether IoT validates the token signature in an authorization request.
-
enable_caching_for_http(Optional[EnableCachingForHttp], default:None) –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 inrefreshAfterInSeconds. This value does not affect authorization of clients that use MQTT connections.The default value is
false.
Raises:
-
InternalFailureException–An unexpected error has occurred.
-
InvalidRequestException–The request is not valid.
-
LimitExceededException–A limit has been exceeded.
-
ResourceAlreadyExistsException–The resource already exists.
-
ServiceUnavailableException–The service is temporarily unavailable.
-
ThrottlingException–The rate exceeds the limit.
-
UnauthorizedException–You are not authorized to perform this operation.
-
UnknownServiceError–The service returned an error code this client does not model.