/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include namespace Aws { namespace IoT { namespace Model { /** */ class CreateAuthorizerRequest : public IoTRequest { public: AWS_IOT_API CreateAuthorizerRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "CreateAuthorizer"; } AWS_IOT_API Aws::String SerializePayload() const override; /** *

The authorizer name.

*/ inline const Aws::String& GetAuthorizerName() const{ return m_authorizerName; } /** *

The authorizer name.

*/ inline bool AuthorizerNameHasBeenSet() const { return m_authorizerNameHasBeenSet; } /** *

The authorizer name.

*/ inline void SetAuthorizerName(const Aws::String& value) { m_authorizerNameHasBeenSet = true; m_authorizerName = value; } /** *

The authorizer name.

*/ inline void SetAuthorizerName(Aws::String&& value) { m_authorizerNameHasBeenSet = true; m_authorizerName = std::move(value); } /** *

The authorizer name.

*/ inline void SetAuthorizerName(const char* value) { m_authorizerNameHasBeenSet = true; m_authorizerName.assign(value); } /** *

The authorizer name.

*/ inline CreateAuthorizerRequest& WithAuthorizerName(const Aws::String& value) { SetAuthorizerName(value); return *this;} /** *

The authorizer name.

*/ inline CreateAuthorizerRequest& WithAuthorizerName(Aws::String&& value) { SetAuthorizerName(std::move(value)); return *this;} /** *

The authorizer name.

*/ inline CreateAuthorizerRequest& WithAuthorizerName(const char* value) { SetAuthorizerName(value); return *this;} /** *

The ARN of the authorizer's Lambda function.

*/ inline const Aws::String& GetAuthorizerFunctionArn() const{ return m_authorizerFunctionArn; } /** *

The ARN of the authorizer's Lambda function.

*/ inline bool AuthorizerFunctionArnHasBeenSet() const { return m_authorizerFunctionArnHasBeenSet; } /** *

The ARN of the authorizer's Lambda function.

*/ inline void SetAuthorizerFunctionArn(const Aws::String& value) { m_authorizerFunctionArnHasBeenSet = true; m_authorizerFunctionArn = value; } /** *

The ARN of the authorizer's Lambda function.

*/ inline void SetAuthorizerFunctionArn(Aws::String&& value) { m_authorizerFunctionArnHasBeenSet = true; m_authorizerFunctionArn = std::move(value); } /** *

The ARN of the authorizer's Lambda function.

*/ inline void SetAuthorizerFunctionArn(const char* value) { m_authorizerFunctionArnHasBeenSet = true; m_authorizerFunctionArn.assign(value); } /** *

The ARN of the authorizer's Lambda function.

*/ inline CreateAuthorizerRequest& WithAuthorizerFunctionArn(const Aws::String& value) { SetAuthorizerFunctionArn(value); return *this;} /** *

The ARN of the authorizer's Lambda function.

*/ inline CreateAuthorizerRequest& WithAuthorizerFunctionArn(Aws::String&& value) { SetAuthorizerFunctionArn(std::move(value)); return *this;} /** *

The ARN of the authorizer's Lambda function.

*/ inline CreateAuthorizerRequest& WithAuthorizerFunctionArn(const char* value) { SetAuthorizerFunctionArn(value); return *this;} /** *

The name of the token key used to extract the token from the HTTP * headers.

*/ inline const Aws::String& GetTokenKeyName() const{ return m_tokenKeyName; } /** *

The name of the token key used to extract the token from the HTTP * headers.

*/ inline bool TokenKeyNameHasBeenSet() const { return m_tokenKeyNameHasBeenSet; } /** *

The name of the token key used to extract the token from the HTTP * headers.

*/ inline void SetTokenKeyName(const Aws::String& value) { m_tokenKeyNameHasBeenSet = true; m_tokenKeyName = value; } /** *

The name of the token key used to extract the token from the HTTP * headers.

*/ inline void SetTokenKeyName(Aws::String&& value) { m_tokenKeyNameHasBeenSet = true; m_tokenKeyName = std::move(value); } /** *

The name of the token key used to extract the token from the HTTP * headers.

*/ inline void SetTokenKeyName(const char* value) { m_tokenKeyNameHasBeenSet = true; m_tokenKeyName.assign(value); } /** *

The name of the token key used to extract the token from the HTTP * headers.

*/ inline CreateAuthorizerRequest& WithTokenKeyName(const Aws::String& value) { SetTokenKeyName(value); return *this;} /** *

The name of the token key used to extract the token from the HTTP * headers.

*/ inline CreateAuthorizerRequest& WithTokenKeyName(Aws::String&& value) { SetTokenKeyName(std::move(value)); return *this;} /** *

The name of the token key used to extract the token from the HTTP * headers.

*/ inline CreateAuthorizerRequest& WithTokenKeyName(const char* value) { SetTokenKeyName(value); return *this;} /** *

The public keys used to verify the digital signature returned by your custom * authentication service.

*/ inline const Aws::Map& GetTokenSigningPublicKeys() const{ return m_tokenSigningPublicKeys; } /** *

The public keys used to verify the digital signature returned by your custom * authentication service.

*/ inline bool TokenSigningPublicKeysHasBeenSet() const { return m_tokenSigningPublicKeysHasBeenSet; } /** *

The public keys used to verify the digital signature returned by your custom * authentication service.

*/ inline void SetTokenSigningPublicKeys(const Aws::Map& value) { m_tokenSigningPublicKeysHasBeenSet = true; m_tokenSigningPublicKeys = value; } /** *

The public keys used to verify the digital signature returned by your custom * authentication service.

*/ inline void SetTokenSigningPublicKeys(Aws::Map&& value) { m_tokenSigningPublicKeysHasBeenSet = true; m_tokenSigningPublicKeys = std::move(value); } /** *

The public keys used to verify the digital signature returned by your custom * authentication service.

*/ inline CreateAuthorizerRequest& WithTokenSigningPublicKeys(const Aws::Map& value) { SetTokenSigningPublicKeys(value); return *this;} /** *

The public keys used to verify the digital signature returned by your custom * authentication service.

*/ inline CreateAuthorizerRequest& WithTokenSigningPublicKeys(Aws::Map&& value) { SetTokenSigningPublicKeys(std::move(value)); return *this;} /** *

The public keys used to verify the digital signature returned by your custom * authentication service.

*/ inline CreateAuthorizerRequest& AddTokenSigningPublicKeys(const Aws::String& key, const Aws::String& value) { m_tokenSigningPublicKeysHasBeenSet = true; m_tokenSigningPublicKeys.emplace(key, value); return *this; } /** *

The public keys used to verify the digital signature returned by your custom * authentication service.

*/ inline CreateAuthorizerRequest& AddTokenSigningPublicKeys(Aws::String&& key, const Aws::String& value) { m_tokenSigningPublicKeysHasBeenSet = true; m_tokenSigningPublicKeys.emplace(std::move(key), value); return *this; } /** *

The public keys used to verify the digital signature returned by your custom * authentication service.

*/ inline CreateAuthorizerRequest& AddTokenSigningPublicKeys(const Aws::String& key, Aws::String&& value) { m_tokenSigningPublicKeysHasBeenSet = true; m_tokenSigningPublicKeys.emplace(key, std::move(value)); return *this; } /** *

The public keys used to verify the digital signature returned by your custom * authentication service.

*/ inline CreateAuthorizerRequest& AddTokenSigningPublicKeys(Aws::String&& key, Aws::String&& value) { m_tokenSigningPublicKeysHasBeenSet = true; m_tokenSigningPublicKeys.emplace(std::move(key), std::move(value)); return *this; } /** *

The public keys used to verify the digital signature returned by your custom * authentication service.

*/ inline CreateAuthorizerRequest& AddTokenSigningPublicKeys(const char* key, Aws::String&& value) { m_tokenSigningPublicKeysHasBeenSet = true; m_tokenSigningPublicKeys.emplace(key, std::move(value)); return *this; } /** *

The public keys used to verify the digital signature returned by your custom * authentication service.

*/ inline CreateAuthorizerRequest& AddTokenSigningPublicKeys(Aws::String&& key, const char* value) { m_tokenSigningPublicKeysHasBeenSet = true; m_tokenSigningPublicKeys.emplace(std::move(key), value); return *this; } /** *

The public keys used to verify the digital signature returned by your custom * authentication service.

*/ inline CreateAuthorizerRequest& AddTokenSigningPublicKeys(const char* key, const char* value) { m_tokenSigningPublicKeysHasBeenSet = true; m_tokenSigningPublicKeys.emplace(key, value); return *this; } /** *

The status of the create authorizer request.

*/ inline const AuthorizerStatus& GetStatus() const{ return m_status; } /** *

The status of the create authorizer request.

*/ inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; } /** *

The status of the create authorizer request.

*/ inline void SetStatus(const AuthorizerStatus& value) { m_statusHasBeenSet = true; m_status = value; } /** *

The status of the create authorizer request.

*/ inline void SetStatus(AuthorizerStatus&& value) { m_statusHasBeenSet = true; m_status = std::move(value); } /** *

The status of the create authorizer request.

*/ inline CreateAuthorizerRequest& WithStatus(const AuthorizerStatus& value) { SetStatus(value); return *this;} /** *

The status of the create authorizer request.

*/ inline CreateAuthorizerRequest& WithStatus(AuthorizerStatus&& value) { SetStatus(std::move(value)); return *this;} /** *

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..."

*/ inline const Aws::Vector& GetTags() const{ return m_tags; } /** *

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..."

*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

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..."

*/ inline void SetTags(const Aws::Vector& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

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..."

*/ inline void SetTags(Aws::Vector&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

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..."

*/ inline CreateAuthorizerRequest& WithTags(const Aws::Vector& value) { SetTags(value); return *this;} /** *

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..."

*/ inline CreateAuthorizerRequest& WithTags(Aws::Vector&& value) { SetTags(std::move(value)); return *this;} /** *

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..."

*/ inline CreateAuthorizerRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } /** *

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..."

*/ inline CreateAuthorizerRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } /** *

Specifies whether IoT validates the token signature in an authorization * request.

*/ inline bool GetSigningDisabled() const{ return m_signingDisabled; } /** *

Specifies whether IoT validates the token signature in an authorization * request.

*/ inline bool SigningDisabledHasBeenSet() const { return m_signingDisabledHasBeenSet; } /** *

Specifies whether IoT validates the token signature in an authorization * request.

*/ inline void SetSigningDisabled(bool value) { m_signingDisabledHasBeenSet = true; m_signingDisabled = value; } /** *

Specifies whether IoT validates the token signature in an authorization * request.

*/ inline CreateAuthorizerRequest& WithSigningDisabled(bool value) { SetSigningDisabled(value); return *this;} /** *

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 in * refreshAfterInSeconds. This value does not affect authorization of * clients that use MQTT connections.

The default value is * false.

*/ inline bool GetEnableCachingForHttp() const{ return m_enableCachingForHttp; } /** *

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 in * refreshAfterInSeconds. This value does not affect authorization of * clients that use MQTT connections.

The default value is * false.

*/ inline bool EnableCachingForHttpHasBeenSet() const { return m_enableCachingForHttpHasBeenSet; } /** *

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 in * refreshAfterInSeconds. This value does not affect authorization of * clients that use MQTT connections.

The default value is * false.

*/ inline void SetEnableCachingForHttp(bool value) { m_enableCachingForHttpHasBeenSet = true; m_enableCachingForHttp = value; } /** *

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 in * refreshAfterInSeconds. This value does not affect authorization of * clients that use MQTT connections.

The default value is * false.

*/ inline CreateAuthorizerRequest& WithEnableCachingForHttp(bool value) { SetEnableCachingForHttp(value); return *this;} private: Aws::String m_authorizerName; bool m_authorizerNameHasBeenSet = false; Aws::String m_authorizerFunctionArn; bool m_authorizerFunctionArnHasBeenSet = false; Aws::String m_tokenKeyName; bool m_tokenKeyNameHasBeenSet = false; Aws::Map m_tokenSigningPublicKeys; bool m_tokenSigningPublicKeysHasBeenSet = false; AuthorizerStatus m_status; bool m_statusHasBeenSet = false; Aws::Vector m_tags; bool m_tagsHasBeenSet = false; bool m_signingDisabled; bool m_signingDisabledHasBeenSet = false; bool m_enableCachingForHttp; bool m_enableCachingForHttpHasBeenSet = false; }; } // namespace Model } // namespace IoT } // namespace Aws