Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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
- data AssociateResourceSharePermission = AssociateResourceSharePermission' {}
- newAssociateResourceSharePermission :: Text -> Text -> AssociateResourceSharePermission
- associateResourceSharePermission_clientToken :: Lens' AssociateResourceSharePermission (Maybe Text)
- associateResourceSharePermission_permissionVersion :: Lens' AssociateResourceSharePermission (Maybe Int)
- associateResourceSharePermission_replace :: Lens' AssociateResourceSharePermission (Maybe Bool)
- associateResourceSharePermission_resourceShareArn :: Lens' AssociateResourceSharePermission Text
- associateResourceSharePermission_permissionArn :: Lens' AssociateResourceSharePermission Text
- data AssociateResourceSharePermissionResponse = AssociateResourceSharePermissionResponse' {
- clientToken :: Maybe Text
- returnValue :: Maybe Bool
- httpStatus :: Int
- newAssociateResourceSharePermissionResponse :: Int -> AssociateResourceSharePermissionResponse
- associateResourceSharePermissionResponse_clientToken :: Lens' AssociateResourceSharePermissionResponse (Maybe Text)
- associateResourceSharePermissionResponse_returnValue :: Lens' AssociateResourceSharePermissionResponse (Maybe Bool)
- associateResourceSharePermissionResponse_httpStatus :: Lens' AssociateResourceSharePermissionResponse Int
Creating a Request
data AssociateResourceSharePermission Source #
See: newAssociateResourceSharePermission
smart constructor.
AssociateResourceSharePermission' | |
|
Instances
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 #
See: newAssociateResourceSharePermissionResponse
smart constructor.
AssociateResourceSharePermissionResponse' | |
|
Instances
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.
associateResourceSharePermissionResponse_httpStatus :: Lens' AssociateResourceSharePermissionResponse Int Source #
The response's http status code.