// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
/// Constructs a fluent builder for the [`CreatePermissionVersion`](crate::operation::create_permission_version::builders::CreatePermissionVersionFluentBuilder) operation.
///
/// - The fluent builder is configurable:
/// - [`permission_arn(impl Into<String>)`](crate::operation::create_permission_version::builders::CreatePermissionVersionFluentBuilder::permission_arn) / [`set_permission_arn(Option<String>)`](crate::operation::create_permission_version::builders::CreatePermissionVersionFluentBuilder::set_permission_arn):<br>required: **true**<br><p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Name (ARN)</a> of the customer managed permission you're creating a new version for.</p><br>
/// - [`policy_template(impl Into<String>)`](crate::operation::create_permission_version::builders::CreatePermissionVersionFluentBuilder::policy_template) / [`set_policy_template(Option<String>)`](crate::operation::create_permission_version::builders::CreatePermissionVersionFluentBuilder::set_policy_template):<br>required: **true**<br><p>A string in JSON format string that contains the following elements of a resource-based policy:</p> <ul> <li> <p> <b>Effect</b>: must be set to <code>ALLOW</code>.</p> </li> <li> <p> <b>Action</b>: 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 <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/reference_policies_actions-resources-contextkeys.html">Actions, resources, and condition keys for Amazon Web Services services</a> in the <i>Identity and Access Management User Guide</i>.</p> </li> <li> <p> <b>Condition</b>: (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 <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition.html">IAM policies: Condition element</a> in the <i>Identity and Access Management User Guide</i>.</p> </li> </ul> <p>This template can't include either the <code>Resource</code> or <code>Principal</code> elements. Those are both filled in by RAM when it instantiates the resource-based policy on each resource shared using this managed permission. The <code>Resource</code> comes from the ARN of the specific resource that you are sharing. The <code>Principal</code> comes from the list of identities added to the resource share.</p><br>
/// - [`client_token(impl Into<String>)`](crate::operation::create_permission_version::builders::CreatePermissionVersionFluentBuilder::client_token) / [`set_client_token(Option<String>)`](crate::operation::create_permission_version::builders::CreatePermissionVersionFluentBuilder::set_client_token):<br>required: **false**<br><p>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 <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID type of value.</a>.</p> <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p> <p>If you retry the operation with the same <code>ClientToken</code>, but with different parameters, the retry fails with an <code>IdempotentParameterMismatch</code> error.</p><br>
/// - On success, responds with [`CreatePermissionVersionOutput`](crate::operation::create_permission_version::CreatePermissionVersionOutput) with field(s):
/// - [`permission(Option<ResourceSharePermissionDetail>)`](crate::operation::create_permission_version::CreatePermissionVersionOutput::permission): <p>Information about a RAM managed permission.</p>
/// - [`client_token(Option<String>)`](crate::operation::create_permission_version::CreatePermissionVersionOutput::client_token): <p>The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the <code>clientToken</code> request parameter of that later call. All other parameters must also have the same values that you used in the first call.</p>
/// - On failure, responds with [`SdkError<CreatePermissionVersionError>`](crate::operation::create_permission_version::CreatePermissionVersionError)
pub fn create_permission_version(&self) -> crate::operation::create_permission_version::builders::CreatePermissionVersionFluentBuilder {
crate::operation::create_permission_version::builders::CreatePermissionVersionFluentBuilder::new(self.handle.clone())
}
}