/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace CloudWatchEvents { namespace Model { /** */ class PutPermissionRequest : public CloudWatchEventsRequest { public: AWS_CLOUDWATCHEVENTS_API PutPermissionRequest(); // 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 "PutPermission"; } AWS_CLOUDWATCHEVENTS_API Aws::String SerializePayload() const override; AWS_CLOUDWATCHEVENTS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The name of the event bus associated with the rule. If you omit this, the * default event bus is used.

*/ inline const Aws::String& GetEventBusName() const{ return m_eventBusName; } /** *

The name of the event bus associated with the rule. If you omit this, the * default event bus is used.

*/ inline bool EventBusNameHasBeenSet() const { return m_eventBusNameHasBeenSet; } /** *

The name of the event bus associated with the rule. If you omit this, the * default event bus is used.

*/ inline void SetEventBusName(const Aws::String& value) { m_eventBusNameHasBeenSet = true; m_eventBusName = value; } /** *

The name of the event bus associated with the rule. If you omit this, the * default event bus is used.

*/ inline void SetEventBusName(Aws::String&& value) { m_eventBusNameHasBeenSet = true; m_eventBusName = std::move(value); } /** *

The name of the event bus associated with the rule. If you omit this, the * default event bus is used.

*/ inline void SetEventBusName(const char* value) { m_eventBusNameHasBeenSet = true; m_eventBusName.assign(value); } /** *

The name of the event bus associated with the rule. If you omit this, the * default event bus is used.

*/ inline PutPermissionRequest& WithEventBusName(const Aws::String& value) { SetEventBusName(value); return *this;} /** *

The name of the event bus associated with the rule. If you omit this, the * default event bus is used.

*/ inline PutPermissionRequest& WithEventBusName(Aws::String&& value) { SetEventBusName(std::move(value)); return *this;} /** *

The name of the event bus associated with the rule. If you omit this, the * default event bus is used.

*/ inline PutPermissionRequest& WithEventBusName(const char* value) { SetEventBusName(value); return *this;} /** *

The action that you are enabling the other account to perform.

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

The action that you are enabling the other account to perform.

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

The action that you are enabling the other account to perform.

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

The action that you are enabling the other account to perform.

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

The action that you are enabling the other account to perform.

*/ inline void SetAction(const char* value) { m_actionHasBeenSet = true; m_action.assign(value); } /** *

The action that you are enabling the other account to perform.

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

The action that you are enabling the other account to perform.

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

The action that you are enabling the other account to perform.

*/ inline PutPermissionRequest& WithAction(const char* value) { SetAction(value); return *this;} /** *

The 12-digit Amazon Web Services account ID that you are permitting to put * events to your default event bus. Specify "*" to permit any account to put * events to your default event bus.

If you specify "*" without specifying * Condition, avoid creating rules that may match undesirable events. * To create more secure rules, make sure that the event pattern for each rule * contains an account field with a specific account ID from which to * receive events. Rules with an account field do not match any events sent from * other accounts.

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

The 12-digit Amazon Web Services account ID that you are permitting to put * events to your default event bus. Specify "*" to permit any account to put * events to your default event bus.

If you specify "*" without specifying * Condition, avoid creating rules that may match undesirable events. * To create more secure rules, make sure that the event pattern for each rule * contains an account field with a specific account ID from which to * receive events. Rules with an account field do not match any events sent from * other accounts.

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

The 12-digit Amazon Web Services account ID that you are permitting to put * events to your default event bus. Specify "*" to permit any account to put * events to your default event bus.

If you specify "*" without specifying * Condition, avoid creating rules that may match undesirable events. * To create more secure rules, make sure that the event pattern for each rule * contains an account field with a specific account ID from which to * receive events. Rules with an account field do not match any events sent from * other accounts.

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

The 12-digit Amazon Web Services account ID that you are permitting to put * events to your default event bus. Specify "*" to permit any account to put * events to your default event bus.

If you specify "*" without specifying * Condition, avoid creating rules that may match undesirable events. * To create more secure rules, make sure that the event pattern for each rule * contains an account field with a specific account ID from which to * receive events. Rules with an account field do not match any events sent from * other accounts.

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

The 12-digit Amazon Web Services account ID that you are permitting to put * events to your default event bus. Specify "*" to permit any account to put * events to your default event bus.

If you specify "*" without specifying * Condition, avoid creating rules that may match undesirable events. * To create more secure rules, make sure that the event pattern for each rule * contains an account field with a specific account ID from which to * receive events. Rules with an account field do not match any events sent from * other accounts.

*/ inline void SetPrincipal(const char* value) { m_principalHasBeenSet = true; m_principal.assign(value); } /** *

The 12-digit Amazon Web Services account ID that you are permitting to put * events to your default event bus. Specify "*" to permit any account to put * events to your default event bus.

If you specify "*" without specifying * Condition, avoid creating rules that may match undesirable events. * To create more secure rules, make sure that the event pattern for each rule * contains an account field with a specific account ID from which to * receive events. Rules with an account field do not match any events sent from * other accounts.

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

The 12-digit Amazon Web Services account ID that you are permitting to put * events to your default event bus. Specify "*" to permit any account to put * events to your default event bus.

If you specify "*" without specifying * Condition, avoid creating rules that may match undesirable events. * To create more secure rules, make sure that the event pattern for each rule * contains an account field with a specific account ID from which to * receive events. Rules with an account field do not match any events sent from * other accounts.

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

The 12-digit Amazon Web Services account ID that you are permitting to put * events to your default event bus. Specify "*" to permit any account to put * events to your default event bus.

If you specify "*" without specifying * Condition, avoid creating rules that may match undesirable events. * To create more secure rules, make sure that the event pattern for each rule * contains an account field with a specific account ID from which to * receive events. Rules with an account field do not match any events sent from * other accounts.

*/ inline PutPermissionRequest& WithPrincipal(const char* value) { SetPrincipal(value); return *this;} /** *

An identifier string for the external account that you are granting * permissions to. If you later want to revoke the permission for this external * account, specify this StatementId when you run RemovePermission.

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

An identifier string for the external account that you are granting * permissions to. If you later want to revoke the permission for this external * account, specify this StatementId when you run RemovePermission.

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

An identifier string for the external account that you are granting * permissions to. If you later want to revoke the permission for this external * account, specify this StatementId when you run RemovePermission.

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

An identifier string for the external account that you are granting * permissions to. If you later want to revoke the permission for this external * account, specify this StatementId when you run RemovePermission.

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

An identifier string for the external account that you are granting * permissions to. If you later want to revoke the permission for this external * account, specify this StatementId when you run RemovePermission.

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

An identifier string for the external account that you are granting * permissions to. If you later want to revoke the permission for this external * account, specify this StatementId when you run RemovePermission.

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

An identifier string for the external account that you are granting * permissions to. If you later want to revoke the permission for this external * account, specify this StatementId when you run RemovePermission.

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

An identifier string for the external account that you are granting * permissions to. If you later want to revoke the permission for this external * account, specify this StatementId when you run RemovePermission.

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

This parameter enables you to limit the permission to accounts that fulfill a * certain condition, such as being a member of a certain Amazon Web Services * organization. For more information about Amazon Web Services Organizations, see * What * Is Amazon Web Services Organizations in the Amazon Web Services * Organizations User Guide.

If you specify Condition with * an Amazon Web Services organization ID, and specify "*" as the value for * Principal, you grant permission to all the accounts in the named * organization.

The Condition is a JSON string which must * contain Type, Key, and Value fields.

*/ inline const Condition& GetCondition() const{ return m_condition; } /** *

This parameter enables you to limit the permission to accounts that fulfill a * certain condition, such as being a member of a certain Amazon Web Services * organization. For more information about Amazon Web Services Organizations, see * What * Is Amazon Web Services Organizations in the Amazon Web Services * Organizations User Guide.

If you specify Condition with * an Amazon Web Services organization ID, and specify "*" as the value for * Principal, you grant permission to all the accounts in the named * organization.

The Condition is a JSON string which must * contain Type, Key, and Value fields.

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

This parameter enables you to limit the permission to accounts that fulfill a * certain condition, such as being a member of a certain Amazon Web Services * organization. For more information about Amazon Web Services Organizations, see * What * Is Amazon Web Services Organizations in the Amazon Web Services * Organizations User Guide.

If you specify Condition with * an Amazon Web Services organization ID, and specify "*" as the value for * Principal, you grant permission to all the accounts in the named * organization.

The Condition is a JSON string which must * contain Type, Key, and Value fields.

*/ inline void SetCondition(const Condition& value) { m_conditionHasBeenSet = true; m_condition = value; } /** *

This parameter enables you to limit the permission to accounts that fulfill a * certain condition, such as being a member of a certain Amazon Web Services * organization. For more information about Amazon Web Services Organizations, see * What * Is Amazon Web Services Organizations in the Amazon Web Services * Organizations User Guide.

If you specify Condition with * an Amazon Web Services organization ID, and specify "*" as the value for * Principal, you grant permission to all the accounts in the named * organization.

The Condition is a JSON string which must * contain Type, Key, and Value fields.

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

This parameter enables you to limit the permission to accounts that fulfill a * certain condition, such as being a member of a certain Amazon Web Services * organization. For more information about Amazon Web Services Organizations, see * What * Is Amazon Web Services Organizations in the Amazon Web Services * Organizations User Guide.

If you specify Condition with * an Amazon Web Services organization ID, and specify "*" as the value for * Principal, you grant permission to all the accounts in the named * organization.

The Condition is a JSON string which must * contain Type, Key, and Value fields.

*/ inline PutPermissionRequest& WithCondition(const Condition& value) { SetCondition(value); return *this;} /** *

This parameter enables you to limit the permission to accounts that fulfill a * certain condition, such as being a member of a certain Amazon Web Services * organization. For more information about Amazon Web Services Organizations, see * What * Is Amazon Web Services Organizations in the Amazon Web Services * Organizations User Guide.

If you specify Condition with * an Amazon Web Services organization ID, and specify "*" as the value for * Principal, you grant permission to all the accounts in the named * organization.

The Condition is a JSON string which must * contain Type, Key, and Value fields.

*/ inline PutPermissionRequest& WithCondition(Condition&& value) { SetCondition(std::move(value)); return *this;} /** *

A JSON string that describes the permission policy statement. You can include * a Policy parameter in the request instead of using the * StatementId, Action, Principal, or * Condition parameters.

*/ inline const Aws::String& GetPolicy() const{ return m_policy; } /** *

A JSON string that describes the permission policy statement. You can include * a Policy parameter in the request instead of using the * StatementId, Action, Principal, or * Condition parameters.

*/ inline bool PolicyHasBeenSet() const { return m_policyHasBeenSet; } /** *

A JSON string that describes the permission policy statement. You can include * a Policy parameter in the request instead of using the * StatementId, Action, Principal, or * Condition parameters.

*/ inline void SetPolicy(const Aws::String& value) { m_policyHasBeenSet = true; m_policy = value; } /** *

A JSON string that describes the permission policy statement. You can include * a Policy parameter in the request instead of using the * StatementId, Action, Principal, or * Condition parameters.

*/ inline void SetPolicy(Aws::String&& value) { m_policyHasBeenSet = true; m_policy = std::move(value); } /** *

A JSON string that describes the permission policy statement. You can include * a Policy parameter in the request instead of using the * StatementId, Action, Principal, or * Condition parameters.

*/ inline void SetPolicy(const char* value) { m_policyHasBeenSet = true; m_policy.assign(value); } /** *

A JSON string that describes the permission policy statement. You can include * a Policy parameter in the request instead of using the * StatementId, Action, Principal, or * Condition parameters.

*/ inline PutPermissionRequest& WithPolicy(const Aws::String& value) { SetPolicy(value); return *this;} /** *

A JSON string that describes the permission policy statement. You can include * a Policy parameter in the request instead of using the * StatementId, Action, Principal, or * Condition parameters.

*/ inline PutPermissionRequest& WithPolicy(Aws::String&& value) { SetPolicy(std::move(value)); return *this;} /** *

A JSON string that describes the permission policy statement. You can include * a Policy parameter in the request instead of using the * StatementId, Action, Principal, or * Condition parameters.

*/ inline PutPermissionRequest& WithPolicy(const char* value) { SetPolicy(value); return *this;} private: Aws::String m_eventBusName; bool m_eventBusNameHasBeenSet = false; Aws::String m_action; bool m_actionHasBeenSet = false; Aws::String m_principal; bool m_principalHasBeenSet = false; Aws::String m_statementId; bool m_statementIdHasBeenSet = false; Condition m_condition; bool m_conditionHasBeenSet = false; Aws::String m_policy; bool m_policyHasBeenSet = false; }; } // namespace Model } // namespace CloudWatchEvents } // namespace Aws