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 the specified list of principals and list of resources to a resource share. Principals that already have access to this resource share immediately receive access to the added resources. Newly added principals immediately receive access to the resources shared in this resource share.
Synopsis
- data AssociateResourceShare = AssociateResourceShare' {
- clientToken :: Maybe Text
- principals :: Maybe [Text]
- resourceArns :: Maybe [Text]
- resourceShareArn :: Text
- newAssociateResourceShare :: Text -> AssociateResourceShare
- associateResourceShare_clientToken :: Lens' AssociateResourceShare (Maybe Text)
- associateResourceShare_principals :: Lens' AssociateResourceShare (Maybe [Text])
- associateResourceShare_resourceArns :: Lens' AssociateResourceShare (Maybe [Text])
- associateResourceShare_resourceShareArn :: Lens' AssociateResourceShare Text
- data AssociateResourceShareResponse = AssociateResourceShareResponse' {}
- newAssociateResourceShareResponse :: Int -> AssociateResourceShareResponse
- associateResourceShareResponse_clientToken :: Lens' AssociateResourceShareResponse (Maybe Text)
- associateResourceShareResponse_resourceShareAssociations :: Lens' AssociateResourceShareResponse (Maybe [ResourceShareAssociation])
- associateResourceShareResponse_httpStatus :: Lens' AssociateResourceShareResponse Int
Creating a Request
data AssociateResourceShare Source #
See: newAssociateResourceShare
smart constructor.
AssociateResourceShare' | |
|
Instances
newAssociateResourceShare Source #
Create a value of AssociateResourceShare
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:
AssociateResourceShare
, associateResourceShare_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:principals:AssociateResourceShare'
, associateResourceShare_principals
- Specifies a list of principals to whom you want to the resource share.
This can be null
if you want to add only resources.
What the principals can do with the resources in the share is determined by the RAM permissions that you associate with the resource share. See AssociateResourceSharePermission.
You can include the following values:
- An Amazon Web Services account ID, for example:
123456789012
- An
Amazon Resoure Name (ARN)
of an organization in Organizations, for example:
organizations::123456789012:organization/o-exampleorgid
- An ARN of an organizational unit (OU) in Organizations, for example:
organizations::123456789012:ou/o-exampleorgid/ou-examplerootid-exampleouid123
- An ARN of an IAM role, for example:
iam::123456789012:role/rolename
- An ARN of an IAM user, for example:
iam::123456789012user/username
Not all resource types can be shared with IAM roles and users. For more information, see Sharing with IAM roles and users in the Resource Access Manager User Guide.
$sel:resourceArns:AssociateResourceShare'
, associateResourceShare_resourceArns
- Specifies a list of
Amazon Resource Names (ARNs)
of the resources that you want to share. This can be null
if you want
to add only principals.
AssociateResourceShare
, associateResourceShare_resourceShareArn
- Specifies the
Amazon Resoure Name (ARN)
of the resource share that you want to add principals or resources to.
Request Lenses
associateResourceShare_clientToken :: Lens' AssociateResourceShare (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.
associateResourceShare_principals :: Lens' AssociateResourceShare (Maybe [Text]) Source #
Specifies a list of principals to whom you want to the resource share.
This can be null
if you want to add only resources.
What the principals can do with the resources in the share is determined by the RAM permissions that you associate with the resource share. See AssociateResourceSharePermission.
You can include the following values:
- An Amazon Web Services account ID, for example:
123456789012
- An
Amazon Resoure Name (ARN)
of an organization in Organizations, for example:
organizations::123456789012:organization/o-exampleorgid
- An ARN of an organizational unit (OU) in Organizations, for example:
organizations::123456789012:ou/o-exampleorgid/ou-examplerootid-exampleouid123
- An ARN of an IAM role, for example:
iam::123456789012:role/rolename
- An ARN of an IAM user, for example:
iam::123456789012user/username
Not all resource types can be shared with IAM roles and users. For more information, see Sharing with IAM roles and users in the Resource Access Manager User Guide.
associateResourceShare_resourceArns :: Lens' AssociateResourceShare (Maybe [Text]) Source #
Specifies a list of
Amazon Resource Names (ARNs)
of the resources that you want to share. This can be null
if you want
to add only principals.
associateResourceShare_resourceShareArn :: Lens' AssociateResourceShare Text Source #
Specifies the Amazon Resoure Name (ARN) of the resource share that you want to add principals or resources to.
Destructuring the Response
data AssociateResourceShareResponse Source #
See: newAssociateResourceShareResponse
smart constructor.
AssociateResourceShareResponse' | |
|
Instances
newAssociateResourceShareResponse Source #
Create a value of AssociateResourceShareResponse
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:
AssociateResourceShare
, associateResourceShareResponse_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.
AssociateResourceShareResponse
, associateResourceShareResponse_resourceShareAssociations
- An array of objects that contain information about the associations.
$sel:httpStatus:AssociateResourceShareResponse'
, associateResourceShareResponse_httpStatus
- The response's http status code.
Response Lenses
associateResourceShareResponse_clientToken :: Lens' AssociateResourceShareResponse (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.
associateResourceShareResponse_resourceShareAssociations :: Lens' AssociateResourceShareResponse (Maybe [ResourceShareAssociation]) Source #
An array of objects that contain information about the associations.
associateResourceShareResponse_httpStatus :: Lens' AssociateResourceShareResponse Int Source #
The response's http status code.