/** * 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 Http { class URI; } //namespace Http namespace LexModelsV2 { namespace Model { /** */ class CreateResourcePolicyStatementRequest : public LexModelsV2Request { public: AWS_LEXMODELSV2_API CreateResourcePolicyStatementRequest(); // 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 "CreateResourcePolicyStatement"; } AWS_LEXMODELSV2_API Aws::String SerializePayload() const override; AWS_LEXMODELSV2_API void AddQueryStringParameters(Aws::Http::URI& uri) const override; /** *

The Amazon Resource Name (ARN) of the bot or bot alias that the resource * policy is attached to.

*/ inline const Aws::String& GetResourceArn() const{ return m_resourceArn; } /** *

The Amazon Resource Name (ARN) of the bot or bot alias that the resource * policy is attached to.

*/ inline bool ResourceArnHasBeenSet() const { return m_resourceArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the bot or bot alias that the resource * policy is attached to.

*/ inline void SetResourceArn(const Aws::String& value) { m_resourceArnHasBeenSet = true; m_resourceArn = value; } /** *

The Amazon Resource Name (ARN) of the bot or bot alias that the resource * policy is attached to.

*/ inline void SetResourceArn(Aws::String&& value) { m_resourceArnHasBeenSet = true; m_resourceArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the bot or bot alias that the resource * policy is attached to.

*/ inline void SetResourceArn(const char* value) { m_resourceArnHasBeenSet = true; m_resourceArn.assign(value); } /** *

The Amazon Resource Name (ARN) of the bot or bot alias that the resource * policy is attached to.

*/ inline CreateResourcePolicyStatementRequest& WithResourceArn(const Aws::String& value) { SetResourceArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the bot or bot alias that the resource * policy is attached to.

*/ inline CreateResourcePolicyStatementRequest& WithResourceArn(Aws::String&& value) { SetResourceArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the bot or bot alias that the resource * policy is attached to.

*/ inline CreateResourcePolicyStatementRequest& WithResourceArn(const char* value) { SetResourceArn(value); return *this;} /** *

The name of the statement. The ID is the same as the Sid IAM * property. The statement name must be unique within the policy. For more * information, see IAM * JSON policy elements: Sid.

*/ inline const Aws::String& GetStatementId() const{ return m_statementId; } /** *

The name of the statement. The ID is the same as the Sid IAM * property. The statement name must be unique within the policy. For more * information, see IAM * JSON policy elements: Sid.

*/ inline bool StatementIdHasBeenSet() const { return m_statementIdHasBeenSet; } /** *

The name of the statement. The ID is the same as the Sid IAM * property. The statement name must be unique within the policy. For more * information, see IAM * JSON policy elements: Sid.

*/ inline void SetStatementId(const Aws::String& value) { m_statementIdHasBeenSet = true; m_statementId = value; } /** *

The name of the statement. The ID is the same as the Sid IAM * property. The statement name must be unique within the policy. For more * information, see IAM * JSON policy elements: Sid.

*/ inline void SetStatementId(Aws::String&& value) { m_statementIdHasBeenSet = true; m_statementId = std::move(value); } /** *

The name of the statement. The ID is the same as the Sid IAM * property. The statement name must be unique within the policy. For more * information, see IAM * JSON policy elements: Sid.

*/ inline void SetStatementId(const char* value) { m_statementIdHasBeenSet = true; m_statementId.assign(value); } /** *

The name of the statement. The ID is the same as the Sid IAM * property. The statement name must be unique within the policy. For more * information, see IAM * JSON policy elements: Sid.

*/ inline CreateResourcePolicyStatementRequest& WithStatementId(const Aws::String& value) { SetStatementId(value); return *this;} /** *

The name of the statement. The ID is the same as the Sid IAM * property. The statement name must be unique within the policy. For more * information, see IAM * JSON policy elements: Sid.

*/ inline CreateResourcePolicyStatementRequest& WithStatementId(Aws::String&& value) { SetStatementId(std::move(value)); return *this;} /** *

The name of the statement. The ID is the same as the Sid IAM * property. The statement name must be unique within the policy. For more * information, see IAM * JSON policy elements: Sid.

*/ inline CreateResourcePolicyStatementRequest& WithStatementId(const char* value) { SetStatementId(value); return *this;} /** *

Determines whether the statement allows or denies access to the resource.

*/ inline const Effect& GetEffect() const{ return m_effect; } /** *

Determines whether the statement allows or denies access to the resource.

*/ inline bool EffectHasBeenSet() const { return m_effectHasBeenSet; } /** *

Determines whether the statement allows or denies access to the resource.

*/ inline void SetEffect(const Effect& value) { m_effectHasBeenSet = true; m_effect = value; } /** *

Determines whether the statement allows or denies access to the resource.

*/ inline void SetEffect(Effect&& value) { m_effectHasBeenSet = true; m_effect = std::move(value); } /** *

Determines whether the statement allows or denies access to the resource.

*/ inline CreateResourcePolicyStatementRequest& WithEffect(const Effect& value) { SetEffect(value); return *this;} /** *

Determines whether the statement allows or denies access to the resource.

*/ inline CreateResourcePolicyStatementRequest& WithEffect(Effect&& value) { SetEffect(std::move(value)); return *this;} /** *

An IAM principal, such as an IAM user, IAM role, or Amazon Web Services * services that is allowed or denied access to a resource. For more information, * see Amazon * Web Services JSON policy elements: Principal.

*/ inline const Aws::Vector& GetPrincipal() const{ return m_principal; } /** *

An IAM principal, such as an IAM user, IAM role, or Amazon Web Services * services that is allowed or denied access to a resource. For more information, * see Amazon * Web Services JSON policy elements: Principal.

*/ inline bool PrincipalHasBeenSet() const { return m_principalHasBeenSet; } /** *

An IAM principal, such as an IAM user, IAM role, or Amazon Web Services * services that is allowed or denied access to a resource. For more information, * see Amazon * Web Services JSON policy elements: Principal.

*/ inline void SetPrincipal(const Aws::Vector& value) { m_principalHasBeenSet = true; m_principal = value; } /** *

An IAM principal, such as an IAM user, IAM role, or Amazon Web Services * services that is allowed or denied access to a resource. For more information, * see Amazon * Web Services JSON policy elements: Principal.

*/ inline void SetPrincipal(Aws::Vector&& value) { m_principalHasBeenSet = true; m_principal = std::move(value); } /** *

An IAM principal, such as an IAM user, IAM role, or Amazon Web Services * services that is allowed or denied access to a resource. For more information, * see Amazon * Web Services JSON policy elements: Principal.

*/ inline CreateResourcePolicyStatementRequest& WithPrincipal(const Aws::Vector& value) { SetPrincipal(value); return *this;} /** *

An IAM principal, such as an IAM user, IAM role, or Amazon Web Services * services that is allowed or denied access to a resource. For more information, * see Amazon * Web Services JSON policy elements: Principal.

*/ inline CreateResourcePolicyStatementRequest& WithPrincipal(Aws::Vector&& value) { SetPrincipal(std::move(value)); return *this;} /** *

An IAM principal, such as an IAM user, IAM role, or Amazon Web Services * services that is allowed or denied access to a resource. For more information, * see Amazon * Web Services JSON policy elements: Principal.

*/ inline CreateResourcePolicyStatementRequest& AddPrincipal(const Principal& value) { m_principalHasBeenSet = true; m_principal.push_back(value); return *this; } /** *

An IAM principal, such as an IAM user, IAM role, or Amazon Web Services * services that is allowed or denied access to a resource. For more information, * see Amazon * Web Services JSON policy elements: Principal.

*/ inline CreateResourcePolicyStatementRequest& AddPrincipal(Principal&& value) { m_principalHasBeenSet = true; m_principal.push_back(std::move(value)); return *this; } /** *

The Amazon Lex action that this policy either allows or denies. The action * must apply to the resource type of the specified ARN. For more information, see * * Actions, resources, and condition keys for Amazon Lex V2.

*/ inline const Aws::Vector& GetAction() const{ return m_action; } /** *

The Amazon Lex action that this policy either allows or denies. The action * must apply to the resource type of the specified ARN. For more information, see * * Actions, resources, and condition keys for Amazon Lex V2.

*/ inline bool ActionHasBeenSet() const { return m_actionHasBeenSet; } /** *

The Amazon Lex action that this policy either allows or denies. The action * must apply to the resource type of the specified ARN. For more information, see * * Actions, resources, and condition keys for Amazon Lex V2.

*/ inline void SetAction(const Aws::Vector& value) { m_actionHasBeenSet = true; m_action = value; } /** *

The Amazon Lex action that this policy either allows or denies. The action * must apply to the resource type of the specified ARN. For more information, see * * Actions, resources, and condition keys for Amazon Lex V2.

*/ inline void SetAction(Aws::Vector&& value) { m_actionHasBeenSet = true; m_action = std::move(value); } /** *

The Amazon Lex action that this policy either allows or denies. The action * must apply to the resource type of the specified ARN. For more information, see * * Actions, resources, and condition keys for Amazon Lex V2.

*/ inline CreateResourcePolicyStatementRequest& WithAction(const Aws::Vector& value) { SetAction(value); return *this;} /** *

The Amazon Lex action that this policy either allows or denies. The action * must apply to the resource type of the specified ARN. For more information, see * * Actions, resources, and condition keys for Amazon Lex V2.

*/ inline CreateResourcePolicyStatementRequest& WithAction(Aws::Vector&& value) { SetAction(std::move(value)); return *this;} /** *

The Amazon Lex action that this policy either allows or denies. The action * must apply to the resource type of the specified ARN. For more information, see * * Actions, resources, and condition keys for Amazon Lex V2.

*/ inline CreateResourcePolicyStatementRequest& AddAction(const Aws::String& value) { m_actionHasBeenSet = true; m_action.push_back(value); return *this; } /** *

The Amazon Lex action that this policy either allows or denies. The action * must apply to the resource type of the specified ARN. For more information, see * * Actions, resources, and condition keys for Amazon Lex V2.

*/ inline CreateResourcePolicyStatementRequest& AddAction(Aws::String&& value) { m_actionHasBeenSet = true; m_action.push_back(std::move(value)); return *this; } /** *

The Amazon Lex action that this policy either allows or denies. The action * must apply to the resource type of the specified ARN. For more information, see * * Actions, resources, and condition keys for Amazon Lex V2.

*/ inline CreateResourcePolicyStatementRequest& AddAction(const char* value) { m_actionHasBeenSet = true; m_action.push_back(value); return *this; } /** *

Specifies a condition when the policy is in effect. If the principal of the * policy is a service principal, you must provide two condition blocks, one with a * SourceAccount global condition key and one with a SourceArn global condition * key.

For more information, see IAM * JSON policy elements: Condition .

*/ inline const Aws::Map>& GetCondition() const{ return m_condition; } /** *

Specifies a condition when the policy is in effect. If the principal of the * policy is a service principal, you must provide two condition blocks, one with a * SourceAccount global condition key and one with a SourceArn global condition * key.

For more information, see IAM * JSON policy elements: Condition .

*/ inline bool ConditionHasBeenSet() const { return m_conditionHasBeenSet; } /** *

Specifies a condition when the policy is in effect. If the principal of the * policy is a service principal, you must provide two condition blocks, one with a * SourceAccount global condition key and one with a SourceArn global condition * key.

For more information, see IAM * JSON policy elements: Condition .

*/ inline void SetCondition(const Aws::Map>& value) { m_conditionHasBeenSet = true; m_condition = value; } /** *

Specifies a condition when the policy is in effect. If the principal of the * policy is a service principal, you must provide two condition blocks, one with a * SourceAccount global condition key and one with a SourceArn global condition * key.

For more information, see IAM * JSON policy elements: Condition .

*/ inline void SetCondition(Aws::Map>&& value) { m_conditionHasBeenSet = true; m_condition = std::move(value); } /** *

Specifies a condition when the policy is in effect. If the principal of the * policy is a service principal, you must provide two condition blocks, one with a * SourceAccount global condition key and one with a SourceArn global condition * key.

For more information, see IAM * JSON policy elements: Condition .

*/ inline CreateResourcePolicyStatementRequest& WithCondition(const Aws::Map>& value) { SetCondition(value); return *this;} /** *

Specifies a condition when the policy is in effect. If the principal of the * policy is a service principal, you must provide two condition blocks, one with a * SourceAccount global condition key and one with a SourceArn global condition * key.

For more information, see IAM * JSON policy elements: Condition .

*/ inline CreateResourcePolicyStatementRequest& WithCondition(Aws::Map>&& value) { SetCondition(std::move(value)); return *this;} /** *

Specifies a condition when the policy is in effect. If the principal of the * policy is a service principal, you must provide two condition blocks, one with a * SourceAccount global condition key and one with a SourceArn global condition * key.

For more information, see IAM * JSON policy elements: Condition .

*/ inline CreateResourcePolicyStatementRequest& AddCondition(const Aws::String& key, const Aws::Map& value) { m_conditionHasBeenSet = true; m_condition.emplace(key, value); return *this; } /** *

Specifies a condition when the policy is in effect. If the principal of the * policy is a service principal, you must provide two condition blocks, one with a * SourceAccount global condition key and one with a SourceArn global condition * key.

For more information, see IAM * JSON policy elements: Condition .

*/ inline CreateResourcePolicyStatementRequest& AddCondition(Aws::String&& key, const Aws::Map& value) { m_conditionHasBeenSet = true; m_condition.emplace(std::move(key), value); return *this; } /** *

Specifies a condition when the policy is in effect. If the principal of the * policy is a service principal, you must provide two condition blocks, one with a * SourceAccount global condition key and one with a SourceArn global condition * key.

For more information, see IAM * JSON policy elements: Condition .

*/ inline CreateResourcePolicyStatementRequest& AddCondition(const Aws::String& key, Aws::Map&& value) { m_conditionHasBeenSet = true; m_condition.emplace(key, std::move(value)); return *this; } /** *

Specifies a condition when the policy is in effect. If the principal of the * policy is a service principal, you must provide two condition blocks, one with a * SourceAccount global condition key and one with a SourceArn global condition * key.

For more information, see IAM * JSON policy elements: Condition .

*/ inline CreateResourcePolicyStatementRequest& AddCondition(Aws::String&& key, Aws::Map&& value) { m_conditionHasBeenSet = true; m_condition.emplace(std::move(key), std::move(value)); return *this; } /** *

Specifies a condition when the policy is in effect. If the principal of the * policy is a service principal, you must provide two condition blocks, one with a * SourceAccount global condition key and one with a SourceArn global condition * key.

For more information, see IAM * JSON policy elements: Condition .

*/ inline CreateResourcePolicyStatementRequest& AddCondition(const char* key, Aws::Map&& value) { m_conditionHasBeenSet = true; m_condition.emplace(key, std::move(value)); return *this; } /** *

Specifies a condition when the policy is in effect. If the principal of the * policy is a service principal, you must provide two condition blocks, one with a * SourceAccount global condition key and one with a SourceArn global condition * key.

For more information, see IAM * JSON policy elements: Condition .

*/ inline CreateResourcePolicyStatementRequest& AddCondition(const char* key, const Aws::Map& value) { m_conditionHasBeenSet = true; m_condition.emplace(key, value); return *this; } /** *

The identifier of the revision of the policy to edit. If this revision ID * doesn't match the current revision ID, Amazon Lex throws an exception.

If * you don't specify a revision, Amazon Lex overwrites the contents of the policy * with the new values.

*/ inline const Aws::String& GetExpectedRevisionId() const{ return m_expectedRevisionId; } /** *

The identifier of the revision of the policy to edit. If this revision ID * doesn't match the current revision ID, Amazon Lex throws an exception.

If * you don't specify a revision, Amazon Lex overwrites the contents of the policy * with the new values.

*/ inline bool ExpectedRevisionIdHasBeenSet() const { return m_expectedRevisionIdHasBeenSet; } /** *

The identifier of the revision of the policy to edit. If this revision ID * doesn't match the current revision ID, Amazon Lex throws an exception.

If * you don't specify a revision, Amazon Lex overwrites the contents of the policy * with the new values.

*/ inline void SetExpectedRevisionId(const Aws::String& value) { m_expectedRevisionIdHasBeenSet = true; m_expectedRevisionId = value; } /** *

The identifier of the revision of the policy to edit. If this revision ID * doesn't match the current revision ID, Amazon Lex throws an exception.

If * you don't specify a revision, Amazon Lex overwrites the contents of the policy * with the new values.

*/ inline void SetExpectedRevisionId(Aws::String&& value) { m_expectedRevisionIdHasBeenSet = true; m_expectedRevisionId = std::move(value); } /** *

The identifier of the revision of the policy to edit. If this revision ID * doesn't match the current revision ID, Amazon Lex throws an exception.

If * you don't specify a revision, Amazon Lex overwrites the contents of the policy * with the new values.

*/ inline void SetExpectedRevisionId(const char* value) { m_expectedRevisionIdHasBeenSet = true; m_expectedRevisionId.assign(value); } /** *

The identifier of the revision of the policy to edit. If this revision ID * doesn't match the current revision ID, Amazon Lex throws an exception.

If * you don't specify a revision, Amazon Lex overwrites the contents of the policy * with the new values.

*/ inline CreateResourcePolicyStatementRequest& WithExpectedRevisionId(const Aws::String& value) { SetExpectedRevisionId(value); return *this;} /** *

The identifier of the revision of the policy to edit. If this revision ID * doesn't match the current revision ID, Amazon Lex throws an exception.

If * you don't specify a revision, Amazon Lex overwrites the contents of the policy * with the new values.

*/ inline CreateResourcePolicyStatementRequest& WithExpectedRevisionId(Aws::String&& value) { SetExpectedRevisionId(std::move(value)); return *this;} /** *

The identifier of the revision of the policy to edit. If this revision ID * doesn't match the current revision ID, Amazon Lex throws an exception.

If * you don't specify a revision, Amazon Lex overwrites the contents of the policy * with the new values.

*/ inline CreateResourcePolicyStatementRequest& WithExpectedRevisionId(const char* value) { SetExpectedRevisionId(value); return *this;} private: Aws::String m_resourceArn; bool m_resourceArnHasBeenSet = false; Aws::String m_statementId; bool m_statementIdHasBeenSet = false; Effect m_effect; bool m_effectHasBeenSet = false; Aws::Vector m_principal; bool m_principalHasBeenSet = false; Aws::Vector m_action; bool m_actionHasBeenSet = false; Aws::Map> m_condition; bool m_conditionHasBeenSet = false; Aws::String m_expectedRevisionId; bool m_expectedRevisionIdHasBeenSet = false; }; } // namespace Model } // namespace LexModelsV2 } // namespace Aws