/** * 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 Glue { namespace Model { /** */ class PutResourcePolicyRequest : public GlueRequest { public: AWS_GLUE_API PutResourcePolicyRequest(); // 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 "PutResourcePolicy"; } AWS_GLUE_API Aws::String SerializePayload() const override; AWS_GLUE_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

Contains the policy document to set, in JSON format.

*/ inline const Aws::String& GetPolicyInJson() const{ return m_policyInJson; } /** *

Contains the policy document to set, in JSON format.

*/ inline bool PolicyInJsonHasBeenSet() const { return m_policyInJsonHasBeenSet; } /** *

Contains the policy document to set, in JSON format.

*/ inline void SetPolicyInJson(const Aws::String& value) { m_policyInJsonHasBeenSet = true; m_policyInJson = value; } /** *

Contains the policy document to set, in JSON format.

*/ inline void SetPolicyInJson(Aws::String&& value) { m_policyInJsonHasBeenSet = true; m_policyInJson = std::move(value); } /** *

Contains the policy document to set, in JSON format.

*/ inline void SetPolicyInJson(const char* value) { m_policyInJsonHasBeenSet = true; m_policyInJson.assign(value); } /** *

Contains the policy document to set, in JSON format.

*/ inline PutResourcePolicyRequest& WithPolicyInJson(const Aws::String& value) { SetPolicyInJson(value); return *this;} /** *

Contains the policy document to set, in JSON format.

*/ inline PutResourcePolicyRequest& WithPolicyInJson(Aws::String&& value) { SetPolicyInJson(std::move(value)); return *this;} /** *

Contains the policy document to set, in JSON format.

*/ inline PutResourcePolicyRequest& WithPolicyInJson(const char* value) { SetPolicyInJson(value); return *this;} /** *

Do not use. For internal use only.

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

Do not use. For internal use only.

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

Do not use. For internal use only.

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

Do not use. For internal use only.

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

Do not use. For internal use only.

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

Do not use. For internal use only.

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

Do not use. For internal use only.

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

Do not use. For internal use only.

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

The hash value returned when the previous policy was set using * PutResourcePolicy. Its purpose is to prevent concurrent * modifications of a policy. Do not use this parameter if no previous policy has * been set.

*/ inline const Aws::String& GetPolicyHashCondition() const{ return m_policyHashCondition; } /** *

The hash value returned when the previous policy was set using * PutResourcePolicy. Its purpose is to prevent concurrent * modifications of a policy. Do not use this parameter if no previous policy has * been set.

*/ inline bool PolicyHashConditionHasBeenSet() const { return m_policyHashConditionHasBeenSet; } /** *

The hash value returned when the previous policy was set using * PutResourcePolicy. Its purpose is to prevent concurrent * modifications of a policy. Do not use this parameter if no previous policy has * been set.

*/ inline void SetPolicyHashCondition(const Aws::String& value) { m_policyHashConditionHasBeenSet = true; m_policyHashCondition = value; } /** *

The hash value returned when the previous policy was set using * PutResourcePolicy. Its purpose is to prevent concurrent * modifications of a policy. Do not use this parameter if no previous policy has * been set.

*/ inline void SetPolicyHashCondition(Aws::String&& value) { m_policyHashConditionHasBeenSet = true; m_policyHashCondition = std::move(value); } /** *

The hash value returned when the previous policy was set using * PutResourcePolicy. Its purpose is to prevent concurrent * modifications of a policy. Do not use this parameter if no previous policy has * been set.

*/ inline void SetPolicyHashCondition(const char* value) { m_policyHashConditionHasBeenSet = true; m_policyHashCondition.assign(value); } /** *

The hash value returned when the previous policy was set using * PutResourcePolicy. Its purpose is to prevent concurrent * modifications of a policy. Do not use this parameter if no previous policy has * been set.

*/ inline PutResourcePolicyRequest& WithPolicyHashCondition(const Aws::String& value) { SetPolicyHashCondition(value); return *this;} /** *

The hash value returned when the previous policy was set using * PutResourcePolicy. Its purpose is to prevent concurrent * modifications of a policy. Do not use this parameter if no previous policy has * been set.

*/ inline PutResourcePolicyRequest& WithPolicyHashCondition(Aws::String&& value) { SetPolicyHashCondition(std::move(value)); return *this;} /** *

The hash value returned when the previous policy was set using * PutResourcePolicy. Its purpose is to prevent concurrent * modifications of a policy. Do not use this parameter if no previous policy has * been set.

*/ inline PutResourcePolicyRequest& WithPolicyHashCondition(const char* value) { SetPolicyHashCondition(value); return *this;} /** *

A value of MUST_EXIST is used to update a policy. A value of * NOT_EXIST is used to create a new policy. If a value of * NONE or a null value is used, the call does not depend on the * existence of a policy.

*/ inline const ExistCondition& GetPolicyExistsCondition() const{ return m_policyExistsCondition; } /** *

A value of MUST_EXIST is used to update a policy. A value of * NOT_EXIST is used to create a new policy. If a value of * NONE or a null value is used, the call does not depend on the * existence of a policy.

*/ inline bool PolicyExistsConditionHasBeenSet() const { return m_policyExistsConditionHasBeenSet; } /** *

A value of MUST_EXIST is used to update a policy. A value of * NOT_EXIST is used to create a new policy. If a value of * NONE or a null value is used, the call does not depend on the * existence of a policy.

*/ inline void SetPolicyExistsCondition(const ExistCondition& value) { m_policyExistsConditionHasBeenSet = true; m_policyExistsCondition = value; } /** *

A value of MUST_EXIST is used to update a policy. A value of * NOT_EXIST is used to create a new policy. If a value of * NONE or a null value is used, the call does not depend on the * existence of a policy.

*/ inline void SetPolicyExistsCondition(ExistCondition&& value) { m_policyExistsConditionHasBeenSet = true; m_policyExistsCondition = std::move(value); } /** *

A value of MUST_EXIST is used to update a policy. A value of * NOT_EXIST is used to create a new policy. If a value of * NONE or a null value is used, the call does not depend on the * existence of a policy.

*/ inline PutResourcePolicyRequest& WithPolicyExistsCondition(const ExistCondition& value) { SetPolicyExistsCondition(value); return *this;} /** *

A value of MUST_EXIST is used to update a policy. A value of * NOT_EXIST is used to create a new policy. If a value of * NONE or a null value is used, the call does not depend on the * existence of a policy.

*/ inline PutResourcePolicyRequest& WithPolicyExistsCondition(ExistCondition&& value) { SetPolicyExistsCondition(std::move(value)); return *this;} /** *

If 'TRUE', indicates that you are using both methods to grant * cross-account access to Data Catalog resources:

  • By directly * updating the resource policy with PutResourePolicy

  • *

    By using the Grant permissions command on the Amazon Web Services * Management Console.

Must be set to 'TRUE' if you * have already used the Management Console to grant cross-account access, * otherwise the call fails. Default is 'FALSE'.

*/ inline const EnableHybridValues& GetEnableHybrid() const{ return m_enableHybrid; } /** *

If 'TRUE', indicates that you are using both methods to grant * cross-account access to Data Catalog resources:

  • By directly * updating the resource policy with PutResourePolicy

  • *

    By using the Grant permissions command on the Amazon Web Services * Management Console.

Must be set to 'TRUE' if you * have already used the Management Console to grant cross-account access, * otherwise the call fails. Default is 'FALSE'.

*/ inline bool EnableHybridHasBeenSet() const { return m_enableHybridHasBeenSet; } /** *

If 'TRUE', indicates that you are using both methods to grant * cross-account access to Data Catalog resources:

  • By directly * updating the resource policy with PutResourePolicy

  • *

    By using the Grant permissions command on the Amazon Web Services * Management Console.

Must be set to 'TRUE' if you * have already used the Management Console to grant cross-account access, * otherwise the call fails. Default is 'FALSE'.

*/ inline void SetEnableHybrid(const EnableHybridValues& value) { m_enableHybridHasBeenSet = true; m_enableHybrid = value; } /** *

If 'TRUE', indicates that you are using both methods to grant * cross-account access to Data Catalog resources:

  • By directly * updating the resource policy with PutResourePolicy

  • *

    By using the Grant permissions command on the Amazon Web Services * Management Console.

Must be set to 'TRUE' if you * have already used the Management Console to grant cross-account access, * otherwise the call fails. Default is 'FALSE'.

*/ inline void SetEnableHybrid(EnableHybridValues&& value) { m_enableHybridHasBeenSet = true; m_enableHybrid = std::move(value); } /** *

If 'TRUE', indicates that you are using both methods to grant * cross-account access to Data Catalog resources:

  • By directly * updating the resource policy with PutResourePolicy

  • *

    By using the Grant permissions command on the Amazon Web Services * Management Console.

Must be set to 'TRUE' if you * have already used the Management Console to grant cross-account access, * otherwise the call fails. Default is 'FALSE'.

*/ inline PutResourcePolicyRequest& WithEnableHybrid(const EnableHybridValues& value) { SetEnableHybrid(value); return *this;} /** *

If 'TRUE', indicates that you are using both methods to grant * cross-account access to Data Catalog resources:

  • By directly * updating the resource policy with PutResourePolicy

  • *

    By using the Grant permissions command on the Amazon Web Services * Management Console.

Must be set to 'TRUE' if you * have already used the Management Console to grant cross-account access, * otherwise the call fails. Default is 'FALSE'.

*/ inline PutResourcePolicyRequest& WithEnableHybrid(EnableHybridValues&& value) { SetEnableHybrid(std::move(value)); return *this;} private: Aws::String m_policyInJson; bool m_policyInJsonHasBeenSet = false; Aws::String m_resourceArn; bool m_resourceArnHasBeenSet = false; Aws::String m_policyHashCondition; bool m_policyHashConditionHasBeenSet = false; ExistCondition m_policyExistsCondition; bool m_policyExistsConditionHasBeenSet = false; EnableHybridValues m_enableHybrid; bool m_enableHybridHasBeenSet = false; }; } // namespace Model } // namespace Glue } // namespace Aws