// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
/// Constructs a fluent builder for the [`AssociateResourceSharePermission`](crate::operation::associate_resource_share_permission::builders::AssociateResourceSharePermissionFluentBuilder) operation.
///
/// - The fluent builder is configurable:
/// - [`resource_share_arn(impl Into<String>)`](crate::operation::associate_resource_share_permission::builders::AssociateResourceSharePermissionFluentBuilder::resource_share_arn) / [`set_resource_share_arn(Option<String>)`](crate::operation::associate_resource_share_permission::builders::AssociateResourceSharePermissionFluentBuilder::set_resource_share_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 resource share to which you want to add or replace permissions.</p><br>
/// - [`permission_arn(impl Into<String>)`](crate::operation::associate_resource_share_permission::builders::AssociateResourceSharePermissionFluentBuilder::permission_arn) / [`set_permission_arn(Option<String>)`](crate::operation::associate_resource_share_permission::builders::AssociateResourceSharePermissionFluentBuilder::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 RAM permission to associate with the resource share. To find the ARN for a permission, use either the <code>ListPermissions</code> operation or go to the <a href="https://console.aws.amazon.com/ram/home#Permissions:">Permissions library</a> page in the RAM console and then choose the name of the permission. The ARN is displayed on the detail page.</p><br>
/// - [`replace(bool)`](crate::operation::associate_resource_share_permission::builders::AssociateResourceSharePermissionFluentBuilder::replace) / [`set_replace(Option<bool>)`](crate::operation::associate_resource_share_permission::builders::AssociateResourceSharePermissionFluentBuilder::set_replace):<br>required: **false**<br><p>Specifies whether the specified permission should replace the existing permission associated with the resource share. Use <code>true</code> to replace the current permissions. Use <code>false</code> to add the permission to a resource share that currently doesn't have a permission. The default value is <code>false</code>.</p> <note> <p>A resource share can have only one permission per resource type. If a resource share already has a permission for the specified resource type and you don't set <code>replace</code> to <code>true</code> then the operation returns an error. This helps prevent accidental overwriting of a permission.</p> </note><br>
/// - [`client_token(impl Into<String>)`](crate::operation::associate_resource_share_permission::builders::AssociateResourceSharePermissionFluentBuilder::client_token) / [`set_client_token(Option<String>)`](crate::operation::associate_resource_share_permission::builders::AssociateResourceSharePermissionFluentBuilder::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>
/// - [`permission_version(i32)`](crate::operation::associate_resource_share_permission::builders::AssociateResourceSharePermissionFluentBuilder::permission_version) / [`set_permission_version(Option<i32>)`](crate::operation::associate_resource_share_permission::builders::AssociateResourceSharePermissionFluentBuilder::set_permission_version):<br>required: **false**<br><p>Specifies the version of the RAM permission to associate with the resource share. You can specify <i>only</i> the version that is currently set as the default version for the permission. If you also set the <code>replace</code> pararameter to <code>true</code>, then this operation updates an outdated version of the permission to the current default version.</p> <note> <p>You don't need to specify this parameter because the default behavior is to use the version that is currently set as the default version for the permission. This parameter is supported for backwards compatibility.</p> </note><br>
/// - On success, responds with [`AssociateResourceSharePermissionOutput`](crate::operation::associate_resource_share_permission::AssociateResourceSharePermissionOutput) with field(s):
/// - [`return_value(Option<bool>)`](crate::operation::associate_resource_share_permission::AssociateResourceSharePermissionOutput::return_value): <p>A return value of <code>true</code> indicates that the request succeeded. A value of <code>false</code> indicates that the request failed.</p>
/// - [`client_token(Option<String>)`](crate::operation::associate_resource_share_permission::AssociateResourceSharePermissionOutput::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<AssociateResourceSharePermissionError>`](crate::operation::associate_resource_share_permission::AssociateResourceSharePermissionError)
pub fn associate_resource_share_permission(
&self,
) -> crate::operation::associate_resource_share_permission::builders::AssociateResourceSharePermissionFluentBuilder {
crate::operation::associate_resource_share_permission::builders::AssociateResourceSharePermissionFluentBuilder::new(self.handle.clone())
}
}