/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace IoT { namespace Model { /** */ class CreateRoleAliasRequest : public IoTRequest { public: AWS_IOT_API CreateRoleAliasRequest(); // 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 "CreateRoleAlias"; } AWS_IOT_API Aws::String SerializePayload() const override; /** *

The role alias that points to a role ARN. This allows you to change the role * without having to update the device.

*/ inline const Aws::String& GetRoleAlias() const{ return m_roleAlias; } /** *

The role alias that points to a role ARN. This allows you to change the role * without having to update the device.

*/ inline bool RoleAliasHasBeenSet() const { return m_roleAliasHasBeenSet; } /** *

The role alias that points to a role ARN. This allows you to change the role * without having to update the device.

*/ inline void SetRoleAlias(const Aws::String& value) { m_roleAliasHasBeenSet = true; m_roleAlias = value; } /** *

The role alias that points to a role ARN. This allows you to change the role * without having to update the device.

*/ inline void SetRoleAlias(Aws::String&& value) { m_roleAliasHasBeenSet = true; m_roleAlias = std::move(value); } /** *

The role alias that points to a role ARN. This allows you to change the role * without having to update the device.

*/ inline void SetRoleAlias(const char* value) { m_roleAliasHasBeenSet = true; m_roleAlias.assign(value); } /** *

The role alias that points to a role ARN. This allows you to change the role * without having to update the device.

*/ inline CreateRoleAliasRequest& WithRoleAlias(const Aws::String& value) { SetRoleAlias(value); return *this;} /** *

The role alias that points to a role ARN. This allows you to change the role * without having to update the device.

*/ inline CreateRoleAliasRequest& WithRoleAlias(Aws::String&& value) { SetRoleAlias(std::move(value)); return *this;} /** *

The role alias that points to a role ARN. This allows you to change the role * without having to update the device.

*/ inline CreateRoleAliasRequest& WithRoleAlias(const char* value) { SetRoleAlias(value); return *this;} /** *

The role ARN.

*/ inline const Aws::String& GetRoleArn() const{ return m_roleArn; } /** *

The role ARN.

*/ inline bool RoleArnHasBeenSet() const { return m_roleArnHasBeenSet; } /** *

The role ARN.

*/ inline void SetRoleArn(const Aws::String& value) { m_roleArnHasBeenSet = true; m_roleArn = value; } /** *

The role ARN.

*/ inline void SetRoleArn(Aws::String&& value) { m_roleArnHasBeenSet = true; m_roleArn = std::move(value); } /** *

The role ARN.

*/ inline void SetRoleArn(const char* value) { m_roleArnHasBeenSet = true; m_roleArn.assign(value); } /** *

The role ARN.

*/ inline CreateRoleAliasRequest& WithRoleArn(const Aws::String& value) { SetRoleArn(value); return *this;} /** *

The role ARN.

*/ inline CreateRoleAliasRequest& WithRoleArn(Aws::String&& value) { SetRoleArn(std::move(value)); return *this;} /** *

The role ARN.

*/ inline CreateRoleAliasRequest& WithRoleArn(const char* value) { SetRoleArn(value); return *this;} /** *

How long (in seconds) the credentials will be valid. The default value is * 3,600 seconds.

This value must be less than or equal to the maximum * session duration of the IAM role that the role alias references.

*/ inline int GetCredentialDurationSeconds() const{ return m_credentialDurationSeconds; } /** *

How long (in seconds) the credentials will be valid. The default value is * 3,600 seconds.

This value must be less than or equal to the maximum * session duration of the IAM role that the role alias references.

*/ inline bool CredentialDurationSecondsHasBeenSet() const { return m_credentialDurationSecondsHasBeenSet; } /** *

How long (in seconds) the credentials will be valid. The default value is * 3,600 seconds.

This value must be less than or equal to the maximum * session duration of the IAM role that the role alias references.

*/ inline void SetCredentialDurationSeconds(int value) { m_credentialDurationSecondsHasBeenSet = true; m_credentialDurationSeconds = value; } /** *

How long (in seconds) the credentials will be valid. The default value is * 3,600 seconds.

This value must be less than or equal to the maximum * session duration of the IAM role that the role alias references.

*/ inline CreateRoleAliasRequest& WithCredentialDurationSeconds(int value) { SetCredentialDurationSeconds(value); return *this;} /** *

Metadata which can be used to manage the role alias.

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 role alias.

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 role alias.

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 role alias.

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 role alias.

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 CreateRoleAliasRequest& WithTags(const Aws::Vector& value) { SetTags(value); return *this;} /** *

Metadata which can be used to manage the role alias.

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 CreateRoleAliasRequest& WithTags(Aws::Vector&& value) { SetTags(std::move(value)); return *this;} /** *

Metadata which can be used to manage the role alias.

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 CreateRoleAliasRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } /** *

Metadata which can be used to manage the role alias.

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 CreateRoleAliasRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } private: Aws::String m_roleAlias; bool m_roleAliasHasBeenSet = false; Aws::String m_roleArn; bool m_roleArnHasBeenSet = false; int m_credentialDurationSeconds; bool m_credentialDurationSecondsHasBeenSet = false; Aws::Vector m_tags; bool m_tagsHasBeenSet = false; }; } // namespace Model } // namespace IoT } // namespace Aws