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

The JSON policy text to apply to your registry. The policy text follows the * same format as IAM policy text. For more information, see Registry * permissions in the Amazon Elastic Container Registry User Guide.

*/ inline const Aws::String& GetPolicyText() const{ return m_policyText; } /** *

The JSON policy text to apply to your registry. The policy text follows the * same format as IAM policy text. For more information, see Registry * permissions in the Amazon Elastic Container Registry User Guide.

*/ inline bool PolicyTextHasBeenSet() const { return m_policyTextHasBeenSet; } /** *

The JSON policy text to apply to your registry. The policy text follows the * same format as IAM policy text. For more information, see Registry * permissions in the Amazon Elastic Container Registry User Guide.

*/ inline void SetPolicyText(const Aws::String& value) { m_policyTextHasBeenSet = true; m_policyText = value; } /** *

The JSON policy text to apply to your registry. The policy text follows the * same format as IAM policy text. For more information, see Registry * permissions in the Amazon Elastic Container Registry User Guide.

*/ inline void SetPolicyText(Aws::String&& value) { m_policyTextHasBeenSet = true; m_policyText = std::move(value); } /** *

The JSON policy text to apply to your registry. The policy text follows the * same format as IAM policy text. For more information, see Registry * permissions in the Amazon Elastic Container Registry User Guide.

*/ inline void SetPolicyText(const char* value) { m_policyTextHasBeenSet = true; m_policyText.assign(value); } /** *

The JSON policy text to apply to your registry. The policy text follows the * same format as IAM policy text. For more information, see Registry * permissions in the Amazon Elastic Container Registry User Guide.

*/ inline PutRegistryPolicyRequest& WithPolicyText(const Aws::String& value) { SetPolicyText(value); return *this;} /** *

The JSON policy text to apply to your registry. The policy text follows the * same format as IAM policy text. For more information, see Registry * permissions in the Amazon Elastic Container Registry User Guide.

*/ inline PutRegistryPolicyRequest& WithPolicyText(Aws::String&& value) { SetPolicyText(std::move(value)); return *this;} /** *

The JSON policy text to apply to your registry. The policy text follows the * same format as IAM policy text. For more information, see Registry * permissions in the Amazon Elastic Container Registry User Guide.

*/ inline PutRegistryPolicyRequest& WithPolicyText(const char* value) { SetPolicyText(value); return *this;} private: Aws::String m_policyText; bool m_policyTextHasBeenSet = false; }; } // namespace Model } // namespace ECR } // namespace Aws