amazonka-ram-2.0: Amazon Resource Access Manager SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.RAM.AssociateResourceSharePermission

Description

Adds or replaces the RAM permission for a resource type included in a resource share. You can have exactly one permission associated with each resource type in the resource share. You can add a new RAM permission only if there are currently no resources of that resource type currently in the resource share.

Synopsis

Creating a Request

data AssociateResourceSharePermission Source #

See: newAssociateResourceSharePermission smart constructor.

Constructors

AssociateResourceSharePermission' 

Fields

  • clientToken :: Maybe Text

    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.

  • permissionVersion :: Maybe Int

    Specifies the version of the RAM permission to associate with the resource share. If you don't specify this parameter, the operation uses the version designated as the default. You can use the ListPermissionVersions operation to discover the available versions of a permission.

  • replace :: Maybe Bool

    Specifies whether the specified permission should replace or add to the existing permission associated with the resource share. Use true to replace the current permissions. Use false to add the permission to the current permission. The default value is false.

    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 replace to true then the operation returns an error. This helps prevent accidental overwriting of a permission.

  • resourceShareArn :: Text

    Specifies the Amazon Resoure Name (ARN) of the resource share to which you want to add or replace permissions.

  • permissionArn :: Text

    Specifies the Amazon Resoure Name (ARN) of the RAM permission to associate with the resource share. To find the ARN for a permission, use either the ListPermissions operation or go to the Permissions library page in the RAM console and then choose the name of the permission. The ARN is displayed on the detail page.

Instances

Instances details
ToJSON AssociateResourceSharePermission Source # 
Instance details

Defined in Amazonka.RAM.AssociateResourceSharePermission

ToHeaders AssociateResourceSharePermission Source # 
Instance details

Defined in Amazonka.RAM.AssociateResourceSharePermission

ToPath AssociateResourceSharePermission Source # 
Instance details

Defined in Amazonka.RAM.AssociateResourceSharePermission

ToQuery AssociateResourceSharePermission Source # 
Instance details

Defined in Amazonka.RAM.AssociateResourceSharePermission

AWSRequest AssociateResourceSharePermission Source # 
Instance details

Defined in Amazonka.RAM.AssociateResourceSharePermission

Generic AssociateResourceSharePermission Source # 
Instance details

Defined in Amazonka.RAM.AssociateResourceSharePermission

Associated Types

type Rep AssociateResourceSharePermission :: Type -> Type #

Read AssociateResourceSharePermission Source # 
Instance details

Defined in Amazonka.RAM.AssociateResourceSharePermission

Show AssociateResourceSharePermission Source # 
Instance details

Defined in Amazonka.RAM.AssociateResourceSharePermission

NFData AssociateResourceSharePermission Source # 
Instance details

Defined in Amazonka.RAM.AssociateResourceSharePermission

Eq AssociateResourceSharePermission Source # 
Instance details

Defined in Amazonka.RAM.AssociateResourceSharePermission

Hashable AssociateResourceSharePermission Source # 
Instance details

Defined in Amazonka.RAM.AssociateResourceSharePermission

type AWSResponse AssociateResourceSharePermission Source # 
Instance details

Defined in Amazonka.RAM.AssociateResourceSharePermission

type Rep AssociateResourceSharePermission Source # 
Instance details

Defined in Amazonka.RAM.AssociateResourceSharePermission

type Rep AssociateResourceSharePermission = D1 ('MetaData "AssociateResourceSharePermission" "Amazonka.RAM.AssociateResourceSharePermission" "amazonka-ram-2.0-2ZD9k8USaHb58ZVl9MaFYL" 'False) (C1 ('MetaCons "AssociateResourceSharePermission'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "clientToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "permissionVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int))) :*: (S1 ('MetaSel ('Just "replace") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: (S1 ('MetaSel ('Just "resourceShareArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "permissionArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))

newAssociateResourceSharePermission Source #

Create a value of AssociateResourceSharePermission with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

AssociateResourceSharePermission, associateResourceSharePermission_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.

$sel:permissionVersion:AssociateResourceSharePermission', associateResourceSharePermission_permissionVersion - Specifies the version of the RAM permission to associate with the resource share. If you don't specify this parameter, the operation uses the version designated as the default. You can use the ListPermissionVersions operation to discover the available versions of a permission.

$sel:replace:AssociateResourceSharePermission', associateResourceSharePermission_replace - Specifies whether the specified permission should replace or add to the existing permission associated with the resource share. Use true to replace the current permissions. Use false to add the permission to the current permission. The default value is false.

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 replace to true then the operation returns an error. This helps prevent accidental overwriting of a permission.

AssociateResourceSharePermission, associateResourceSharePermission_resourceShareArn - Specifies the Amazon Resoure Name (ARN) of the resource share to which you want to add or replace permissions.

$sel:permissionArn:AssociateResourceSharePermission', associateResourceSharePermission_permissionArn - Specifies the Amazon Resoure Name (ARN) of the RAM permission to associate with the resource share. To find the ARN for a permission, use either the ListPermissions operation or go to the Permissions library page in the RAM console and then choose the name of the permission. The ARN is displayed on the detail page.

Request Lenses

associateResourceSharePermission_clientToken :: Lens' AssociateResourceSharePermission (Maybe Text) Source #

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.

associateResourceSharePermission_permissionVersion :: Lens' AssociateResourceSharePermission (Maybe Int) Source #

Specifies the version of the RAM permission to associate with the resource share. If you don't specify this parameter, the operation uses the version designated as the default. You can use the ListPermissionVersions operation to discover the available versions of a permission.

associateResourceSharePermission_replace :: Lens' AssociateResourceSharePermission (Maybe Bool) Source #

Specifies whether the specified permission should replace or add to the existing permission associated with the resource share. Use true to replace the current permissions. Use false to add the permission to the current permission. The default value is false.

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 replace to true then the operation returns an error. This helps prevent accidental overwriting of a permission.

associateResourceSharePermission_resourceShareArn :: Lens' AssociateResourceSharePermission Text Source #

Specifies the Amazon Resoure Name (ARN) of the resource share to which you want to add or replace permissions.

associateResourceSharePermission_permissionArn :: Lens' AssociateResourceSharePermission Text Source #

Specifies the Amazon Resoure Name (ARN) of the RAM permission to associate with the resource share. To find the ARN for a permission, use either the ListPermissions operation or go to the Permissions library page in the RAM console and then choose the name of the permission. The ARN is displayed on the detail page.

Destructuring the Response

data AssociateResourceSharePermissionResponse Source #

Constructors

AssociateResourceSharePermissionResponse' 

Fields

  • clientToken :: Maybe Text

    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 clientToken request parameter of that later call. All other parameters must also have the same values that you used in the first call.

  • returnValue :: Maybe Bool

    A return value of true indicates that the request succeeded. A value of false indicates that the request failed.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Generic AssociateResourceSharePermissionResponse Source # 
Instance details

Defined in Amazonka.RAM.AssociateResourceSharePermission

Read AssociateResourceSharePermissionResponse Source # 
Instance details

Defined in Amazonka.RAM.AssociateResourceSharePermission

Show AssociateResourceSharePermissionResponse Source # 
Instance details

Defined in Amazonka.RAM.AssociateResourceSharePermission

NFData AssociateResourceSharePermissionResponse Source # 
Instance details

Defined in Amazonka.RAM.AssociateResourceSharePermission

Eq AssociateResourceSharePermissionResponse Source # 
Instance details

Defined in Amazonka.RAM.AssociateResourceSharePermission

type Rep AssociateResourceSharePermissionResponse Source # 
Instance details

Defined in Amazonka.RAM.AssociateResourceSharePermission

type Rep AssociateResourceSharePermissionResponse = D1 ('MetaData "AssociateResourceSharePermissionResponse" "Amazonka.RAM.AssociateResourceSharePermission" "amazonka-ram-2.0-2ZD9k8USaHb58ZVl9MaFYL" 'False) (C1 ('MetaCons "AssociateResourceSharePermissionResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "clientToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "returnValue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newAssociateResourceSharePermissionResponse Source #

Create a value of AssociateResourceSharePermissionResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

AssociateResourceSharePermission, associateResourceSharePermissionResponse_clientToken - 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 clientToken request parameter of that later call. All other parameters must also have the same values that you used in the first call.

$sel:returnValue:AssociateResourceSharePermissionResponse', associateResourceSharePermissionResponse_returnValue - A return value of true indicates that the request succeeded. A value of false indicates that the request failed.

$sel:httpStatus:AssociateResourceSharePermissionResponse', associateResourceSharePermissionResponse_httpStatus - The response's http status code.

Response Lenses

associateResourceSharePermissionResponse_clientToken :: Lens' AssociateResourceSharePermissionResponse (Maybe Text) Source #

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 clientToken request parameter of that later call. All other parameters must also have the same values that you used in the first call.

associateResourceSharePermissionResponse_returnValue :: Lens' AssociateResourceSharePermissionResponse (Maybe Bool) Source #

A return value of true indicates that the request succeeded. A value of false indicates that the request failed.