/** * 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 VerifiedPermissions { namespace Model { /** */ class UpdatePolicyRequest : public VerifiedPermissionsRequest { public: AWS_VERIFIEDPERMISSIONS_API UpdatePolicyRequest(); // 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 "UpdatePolicy"; } AWS_VERIFIEDPERMISSIONS_API Aws::String SerializePayload() const override; AWS_VERIFIEDPERMISSIONS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

Specifies the ID of the policy store that contains the policy that you want * to update.

*/ inline const Aws::String& GetPolicyStoreId() const{ return m_policyStoreId; } /** *

Specifies the ID of the policy store that contains the policy that you want * to update.

*/ inline bool PolicyStoreIdHasBeenSet() const { return m_policyStoreIdHasBeenSet; } /** *

Specifies the ID of the policy store that contains the policy that you want * to update.

*/ inline void SetPolicyStoreId(const Aws::String& value) { m_policyStoreIdHasBeenSet = true; m_policyStoreId = value; } /** *

Specifies the ID of the policy store that contains the policy that you want * to update.

*/ inline void SetPolicyStoreId(Aws::String&& value) { m_policyStoreIdHasBeenSet = true; m_policyStoreId = std::move(value); } /** *

Specifies the ID of the policy store that contains the policy that you want * to update.

*/ inline void SetPolicyStoreId(const char* value) { m_policyStoreIdHasBeenSet = true; m_policyStoreId.assign(value); } /** *

Specifies the ID of the policy store that contains the policy that you want * to update.

*/ inline UpdatePolicyRequest& WithPolicyStoreId(const Aws::String& value) { SetPolicyStoreId(value); return *this;} /** *

Specifies the ID of the policy store that contains the policy that you want * to update.

*/ inline UpdatePolicyRequest& WithPolicyStoreId(Aws::String&& value) { SetPolicyStoreId(std::move(value)); return *this;} /** *

Specifies the ID of the policy store that contains the policy that you want * to update.

*/ inline UpdatePolicyRequest& WithPolicyStoreId(const char* value) { SetPolicyStoreId(value); return *this;} /** *

Specifies the ID of the policy that you want to update. To find this value, * you can use ListPolicies.

*/ inline const Aws::String& GetPolicyId() const{ return m_policyId; } /** *

Specifies the ID of the policy that you want to update. To find this value, * you can use ListPolicies.

*/ inline bool PolicyIdHasBeenSet() const { return m_policyIdHasBeenSet; } /** *

Specifies the ID of the policy that you want to update. To find this value, * you can use ListPolicies.

*/ inline void SetPolicyId(const Aws::String& value) { m_policyIdHasBeenSet = true; m_policyId = value; } /** *

Specifies the ID of the policy that you want to update. To find this value, * you can use ListPolicies.

*/ inline void SetPolicyId(Aws::String&& value) { m_policyIdHasBeenSet = true; m_policyId = std::move(value); } /** *

Specifies the ID of the policy that you want to update. To find this value, * you can use ListPolicies.

*/ inline void SetPolicyId(const char* value) { m_policyIdHasBeenSet = true; m_policyId.assign(value); } /** *

Specifies the ID of the policy that you want to update. To find this value, * you can use ListPolicies.

*/ inline UpdatePolicyRequest& WithPolicyId(const Aws::String& value) { SetPolicyId(value); return *this;} /** *

Specifies the ID of the policy that you want to update. To find this value, * you can use ListPolicies.

*/ inline UpdatePolicyRequest& WithPolicyId(Aws::String&& value) { SetPolicyId(std::move(value)); return *this;} /** *

Specifies the ID of the policy that you want to update. To find this value, * you can use ListPolicies.

*/ inline UpdatePolicyRequest& WithPolicyId(const char* value) { SetPolicyId(value); return *this;} /** *

Specifies the updated policy content that you want to replace on the * specified policy. The content must be valid Cedar policy language text.

*

You can change only the following elements from the policy definition:

*
  • The action referenced by the policy.

  • *

    Any conditional clauses, such as when or unless * clauses.

You can't change the following elements:

*
  • Changing from static to * templateLinked.

  • Changing the effect of the policy * from permit or forbid.

  • The * principal referenced by the policy.

  • The * resource referenced by the policy.

*/ inline const UpdatePolicyDefinition& GetDefinition() const{ return m_definition; } /** *

Specifies the updated policy content that you want to replace on the * specified policy. The content must be valid Cedar policy language text.

*

You can change only the following elements from the policy definition:

*
  • The action referenced by the policy.

  • *

    Any conditional clauses, such as when or unless * clauses.

You can't change the following elements:

*
  • Changing from static to * templateLinked.

  • Changing the effect of the policy * from permit or forbid.

  • The * principal referenced by the policy.

  • The * resource referenced by the policy.

*/ inline bool DefinitionHasBeenSet() const { return m_definitionHasBeenSet; } /** *

Specifies the updated policy content that you want to replace on the * specified policy. The content must be valid Cedar policy language text.

*

You can change only the following elements from the policy definition:

*
  • The action referenced by the policy.

  • *

    Any conditional clauses, such as when or unless * clauses.

You can't change the following elements:

*
  • Changing from static to * templateLinked.

  • Changing the effect of the policy * from permit or forbid.

  • The * principal referenced by the policy.

  • The * resource referenced by the policy.

*/ inline void SetDefinition(const UpdatePolicyDefinition& value) { m_definitionHasBeenSet = true; m_definition = value; } /** *

Specifies the updated policy content that you want to replace on the * specified policy. The content must be valid Cedar policy language text.

*

You can change only the following elements from the policy definition:

*
  • The action referenced by the policy.

  • *

    Any conditional clauses, such as when or unless * clauses.

You can't change the following elements:

*
  • Changing from static to * templateLinked.

  • Changing the effect of the policy * from permit or forbid.

  • The * principal referenced by the policy.

  • The * resource referenced by the policy.

*/ inline void SetDefinition(UpdatePolicyDefinition&& value) { m_definitionHasBeenSet = true; m_definition = std::move(value); } /** *

Specifies the updated policy content that you want to replace on the * specified policy. The content must be valid Cedar policy language text.

*

You can change only the following elements from the policy definition:

*
  • The action referenced by the policy.

  • *

    Any conditional clauses, such as when or unless * clauses.

You can't change the following elements:

*
  • Changing from static to * templateLinked.

  • Changing the effect of the policy * from permit or forbid.

  • The * principal referenced by the policy.

  • The * resource referenced by the policy.

*/ inline UpdatePolicyRequest& WithDefinition(const UpdatePolicyDefinition& value) { SetDefinition(value); return *this;} /** *

Specifies the updated policy content that you want to replace on the * specified policy. The content must be valid Cedar policy language text.

*

You can change only the following elements from the policy definition:

*
  • The action referenced by the policy.

  • *

    Any conditional clauses, such as when or unless * clauses.

You can't change the following elements:

*
  • Changing from static to * templateLinked.

  • Changing the effect of the policy * from permit or forbid.

  • The * principal referenced by the policy.

  • The * resource referenced by the policy.

*/ inline UpdatePolicyRequest& WithDefinition(UpdatePolicyDefinition&& value) { SetDefinition(std::move(value)); return *this;} private: Aws::String m_policyStoreId; bool m_policyStoreIdHasBeenSet = false; Aws::String m_policyId; bool m_policyIdHasBeenSet = false; UpdatePolicyDefinition m_definition; bool m_definitionHasBeenSet = false; }; } // namespace Model } // namespace VerifiedPermissions } // namespace Aws