/** * 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 RAM { namespace Model { /** */ class CreatePermissionVersionRequest : public RAMRequest { public: AWS_RAM_API CreatePermissionVersionRequest(); // 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 "CreatePermissionVersion"; } AWS_RAM_API Aws::String SerializePayload() const override; /** *

Specifies the Amazon * Resource Name (ARN) of the customer managed permission you're creating a new * version for.

*/ inline const Aws::String& GetPermissionArn() const{ return m_permissionArn; } /** *

Specifies the Amazon * Resource Name (ARN) of the customer managed permission you're creating a new * version for.

*/ inline bool PermissionArnHasBeenSet() const { return m_permissionArnHasBeenSet; } /** *

Specifies the Amazon * Resource Name (ARN) of the customer managed permission you're creating a new * version for.

*/ inline void SetPermissionArn(const Aws::String& value) { m_permissionArnHasBeenSet = true; m_permissionArn = value; } /** *

Specifies the Amazon * Resource Name (ARN) of the customer managed permission you're creating a new * version for.

*/ inline void SetPermissionArn(Aws::String&& value) { m_permissionArnHasBeenSet = true; m_permissionArn = std::move(value); } /** *

Specifies the Amazon * Resource Name (ARN) of the customer managed permission you're creating a new * version for.

*/ inline void SetPermissionArn(const char* value) { m_permissionArnHasBeenSet = true; m_permissionArn.assign(value); } /** *

Specifies the Amazon * Resource Name (ARN) of the customer managed permission you're creating a new * version for.

*/ inline CreatePermissionVersionRequest& WithPermissionArn(const Aws::String& value) { SetPermissionArn(value); return *this;} /** *

Specifies the Amazon * Resource Name (ARN) of the customer managed permission you're creating a new * version for.

*/ inline CreatePermissionVersionRequest& WithPermissionArn(Aws::String&& value) { SetPermissionArn(std::move(value)); return *this;} /** *

Specifies the Amazon * Resource Name (ARN) of the customer managed permission you're creating a new * version for.

*/ inline CreatePermissionVersionRequest& WithPermissionArn(const char* value) { SetPermissionArn(value); return *this;} /** *

A string in JSON format string that contains the following elements of a * resource-based policy:

  • Effect: must be set to * ALLOW.

  • Action: specifies the actions that * are allowed by this customer managed permission. The list must contain only * actions that are supported by the specified resource type. For a list of all * actions supported by each resource type, see Actions, * resources, and condition keys for Amazon Web Services services in the * Identity and Access Management User Guide.

  • * Condition: (optional) specifies conditional parameters that must evaluate * to true when a user attempts an action for that action to be allowed. For more * information about the Condition element, see IAM * policies: Condition element in the Identity and Access Management User * Guide.

This template can't include either the * Resource or Principal elements. Those are both filled * in by RAM when it instantiates the resource-based policy on each resource shared * using this managed permission. The Resource comes from the ARN of * the specific resource that you are sharing. The Principal comes * from the list of identities added to the resource share.

*/ inline const Aws::String& GetPolicyTemplate() const{ return m_policyTemplate; } /** *

A string in JSON format string that contains the following elements of a * resource-based policy:

  • Effect: must be set to * ALLOW.

  • Action: specifies the actions that * are allowed by this customer managed permission. The list must contain only * actions that are supported by the specified resource type. For a list of all * actions supported by each resource type, see Actions, * resources, and condition keys for Amazon Web Services services in the * Identity and Access Management User Guide.

  • * Condition: (optional) specifies conditional parameters that must evaluate * to true when a user attempts an action for that action to be allowed. For more * information about the Condition element, see IAM * policies: Condition element in the Identity and Access Management User * Guide.

This template can't include either the * Resource or Principal elements. Those are both filled * in by RAM when it instantiates the resource-based policy on each resource shared * using this managed permission. The Resource comes from the ARN of * the specific resource that you are sharing. The Principal comes * from the list of identities added to the resource share.

*/ inline bool PolicyTemplateHasBeenSet() const { return m_policyTemplateHasBeenSet; } /** *

A string in JSON format string that contains the following elements of a * resource-based policy:

  • Effect: must be set to * ALLOW.

  • Action: specifies the actions that * are allowed by this customer managed permission. The list must contain only * actions that are supported by the specified resource type. For a list of all * actions supported by each resource type, see Actions, * resources, and condition keys for Amazon Web Services services in the * Identity and Access Management User Guide.

  • * Condition: (optional) specifies conditional parameters that must evaluate * to true when a user attempts an action for that action to be allowed. For more * information about the Condition element, see IAM * policies: Condition element in the Identity and Access Management User * Guide.

This template can't include either the * Resource or Principal elements. Those are both filled * in by RAM when it instantiates the resource-based policy on each resource shared * using this managed permission. The Resource comes from the ARN of * the specific resource that you are sharing. The Principal comes * from the list of identities added to the resource share.

*/ inline void SetPolicyTemplate(const Aws::String& value) { m_policyTemplateHasBeenSet = true; m_policyTemplate = value; } /** *

A string in JSON format string that contains the following elements of a * resource-based policy:

  • Effect: must be set to * ALLOW.

  • Action: specifies the actions that * are allowed by this customer managed permission. The list must contain only * actions that are supported by the specified resource type. For a list of all * actions supported by each resource type, see Actions, * resources, and condition keys for Amazon Web Services services in the * Identity and Access Management User Guide.

  • * Condition: (optional) specifies conditional parameters that must evaluate * to true when a user attempts an action for that action to be allowed. For more * information about the Condition element, see IAM * policies: Condition element in the Identity and Access Management User * Guide.

This template can't include either the * Resource or Principal elements. Those are both filled * in by RAM when it instantiates the resource-based policy on each resource shared * using this managed permission. The Resource comes from the ARN of * the specific resource that you are sharing. The Principal comes * from the list of identities added to the resource share.

*/ inline void SetPolicyTemplate(Aws::String&& value) { m_policyTemplateHasBeenSet = true; m_policyTemplate = std::move(value); } /** *

A string in JSON format string that contains the following elements of a * resource-based policy:

  • Effect: must be set to * ALLOW.

  • Action: specifies the actions that * are allowed by this customer managed permission. The list must contain only * actions that are supported by the specified resource type. For a list of all * actions supported by each resource type, see Actions, * resources, and condition keys for Amazon Web Services services in the * Identity and Access Management User Guide.

  • * Condition: (optional) specifies conditional parameters that must evaluate * to true when a user attempts an action for that action to be allowed. For more * information about the Condition element, see IAM * policies: Condition element in the Identity and Access Management User * Guide.

This template can't include either the * Resource or Principal elements. Those are both filled * in by RAM when it instantiates the resource-based policy on each resource shared * using this managed permission. The Resource comes from the ARN of * the specific resource that you are sharing. The Principal comes * from the list of identities added to the resource share.

*/ inline void SetPolicyTemplate(const char* value) { m_policyTemplateHasBeenSet = true; m_policyTemplate.assign(value); } /** *

A string in JSON format string that contains the following elements of a * resource-based policy:

  • Effect: must be set to * ALLOW.

  • Action: specifies the actions that * are allowed by this customer managed permission. The list must contain only * actions that are supported by the specified resource type. For a list of all * actions supported by each resource type, see Actions, * resources, and condition keys for Amazon Web Services services in the * Identity and Access Management User Guide.

  • * Condition: (optional) specifies conditional parameters that must evaluate * to true when a user attempts an action for that action to be allowed. For more * information about the Condition element, see IAM * policies: Condition element in the Identity and Access Management User * Guide.

This template can't include either the * Resource or Principal elements. Those are both filled * in by RAM when it instantiates the resource-based policy on each resource shared * using this managed permission. The Resource comes from the ARN of * the specific resource that you are sharing. The Principal comes * from the list of identities added to the resource share.

*/ inline CreatePermissionVersionRequest& WithPolicyTemplate(const Aws::String& value) { SetPolicyTemplate(value); return *this;} /** *

A string in JSON format string that contains the following elements of a * resource-based policy:

  • Effect: must be set to * ALLOW.

  • Action: specifies the actions that * are allowed by this customer managed permission. The list must contain only * actions that are supported by the specified resource type. For a list of all * actions supported by each resource type, see Actions, * resources, and condition keys for Amazon Web Services services in the * Identity and Access Management User Guide.

  • * Condition: (optional) specifies conditional parameters that must evaluate * to true when a user attempts an action for that action to be allowed. For more * information about the Condition element, see IAM * policies: Condition element in the Identity and Access Management User * Guide.

This template can't include either the * Resource or Principal elements. Those are both filled * in by RAM when it instantiates the resource-based policy on each resource shared * using this managed permission. The Resource comes from the ARN of * the specific resource that you are sharing. The Principal comes * from the list of identities added to the resource share.

*/ inline CreatePermissionVersionRequest& WithPolicyTemplate(Aws::String&& value) { SetPolicyTemplate(std::move(value)); return *this;} /** *

A string in JSON format string that contains the following elements of a * resource-based policy:

  • Effect: must be set to * ALLOW.

  • Action: specifies the actions that * are allowed by this customer managed permission. The list must contain only * actions that are supported by the specified resource type. For a list of all * actions supported by each resource type, see Actions, * resources, and condition keys for Amazon Web Services services in the * Identity and Access Management User Guide.

  • * Condition: (optional) specifies conditional parameters that must evaluate * to true when a user attempts an action for that action to be allowed. For more * information about the Condition element, see IAM * policies: Condition element in the Identity and Access Management User * Guide.

This template can't include either the * Resource or Principal elements. Those are both filled * in by RAM when it instantiates the resource-based policy on each resource shared * using this managed permission. The Resource comes from the ARN of * the specific resource that you are sharing. The Principal comes * from the list of identities added to the resource share.

*/ inline CreatePermissionVersionRequest& WithPolicyTemplate(const char* value) { SetPolicyTemplate(value); return *this;} /** *

Specifies a unique, case-sensitive identifier that you provide to ensure the * idempotency of the request. This lets you safely retry the request without * accidentally performing the same operation a second time. Passing the same value * to a later call to an operation requires that you also pass the same value for * all other parameters. We recommend that you use a UUID type of * value..

If you don't provide this value, then Amazon Web Services * generates a random one for you.

If you retry the operation with the same * ClientToken, but with different parameters, the retry fails with an * IdempotentParameterMismatch error.

*/ inline const Aws::String& GetClientToken() const{ return m_clientToken; } /** *

Specifies a unique, case-sensitive identifier that you provide to ensure the * idempotency of the request. This lets you safely retry the request without * accidentally performing the same operation a second time. Passing the same value * to a later call to an operation requires that you also pass the same value for * all other parameters. We recommend that you use a UUID type of * value..

If you don't provide this value, then Amazon Web Services * generates a random one for you.

If you retry the operation with the same * ClientToken, but with different parameters, the retry fails with an * IdempotentParameterMismatch error.

*/ inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; } /** *

Specifies a unique, case-sensitive identifier that you provide to ensure the * idempotency of the request. This lets you safely retry the request without * accidentally performing the same operation a second time. Passing the same value * to a later call to an operation requires that you also pass the same value for * all other parameters. We recommend that you use a UUID type of * value..

If you don't provide this value, then Amazon Web Services * generates a random one for you.

If you retry the operation with the same * ClientToken, but with different parameters, the retry fails with an * IdempotentParameterMismatch error.

*/ inline void SetClientToken(const Aws::String& value) { m_clientTokenHasBeenSet = true; m_clientToken = value; } /** *

Specifies a unique, case-sensitive identifier that you provide to ensure the * idempotency of the request. This lets you safely retry the request without * accidentally performing the same operation a second time. Passing the same value * to a later call to an operation requires that you also pass the same value for * all other parameters. We recommend that you use a UUID type of * value..

If you don't provide this value, then Amazon Web Services * generates a random one for you.

If you retry the operation with the same * ClientToken, but with different parameters, the retry fails with an * IdempotentParameterMismatch error.

*/ inline void SetClientToken(Aws::String&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::move(value); } /** *

Specifies a unique, case-sensitive identifier that you provide to ensure the * idempotency of the request. This lets you safely retry the request without * accidentally performing the same operation a second time. Passing the same value * to a later call to an operation requires that you also pass the same value for * all other parameters. We recommend that you use a UUID type of * value..

If you don't provide this value, then Amazon Web Services * generates a random one for you.

If you retry the operation with the same * ClientToken, but with different parameters, the retry fails with an * IdempotentParameterMismatch error.

*/ inline void SetClientToken(const char* value) { m_clientTokenHasBeenSet = true; m_clientToken.assign(value); } /** *

Specifies a unique, case-sensitive identifier that you provide to ensure the * idempotency of the request. This lets you safely retry the request without * accidentally performing the same operation a second time. Passing the same value * to a later call to an operation requires that you also pass the same value for * all other parameters. We recommend that you use a UUID type of * value..

If you don't provide this value, then Amazon Web Services * generates a random one for you.

If you retry the operation with the same * ClientToken, but with different parameters, the retry fails with an * IdempotentParameterMismatch error.

*/ inline CreatePermissionVersionRequest& WithClientToken(const Aws::String& value) { SetClientToken(value); return *this;} /** *

Specifies a unique, case-sensitive identifier that you provide to ensure the * idempotency of the request. This lets you safely retry the request without * accidentally performing the same operation a second time. Passing the same value * to a later call to an operation requires that you also pass the same value for * all other parameters. We recommend that you use a UUID type of * value..

If you don't provide this value, then Amazon Web Services * generates a random one for you.

If you retry the operation with the same * ClientToken, but with different parameters, the retry fails with an * IdempotentParameterMismatch error.

*/ inline CreatePermissionVersionRequest& WithClientToken(Aws::String&& value) { SetClientToken(std::move(value)); return *this;} /** *

Specifies a unique, case-sensitive identifier that you provide to ensure the * idempotency of the request. This lets you safely retry the request without * accidentally performing the same operation a second time. Passing the same value * to a later call to an operation requires that you also pass the same value for * all other parameters. We recommend that you use a UUID type of * value..

If you don't provide this value, then Amazon Web Services * generates a random one for you.

If you retry the operation with the same * ClientToken, but with different parameters, the retry fails with an * IdempotentParameterMismatch error.

*/ inline CreatePermissionVersionRequest& WithClientToken(const char* value) { SetClientToken(value); return *this;} private: Aws::String m_permissionArn; bool m_permissionArnHasBeenSet = false; Aws::String m_policyTemplate; bool m_policyTemplateHasBeenSet = false; Aws::String m_clientToken; bool m_clientTokenHasBeenSet = false; }; } // namespace Model } // namespace RAM } // namespace Aws