Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Creates a resource share. You must provide a list of the Amazon Resource Names (ARNs) for the resources you want to share. You must also specify who you want to share the resources with, and the permissions that you grant them.
Sharing a resource makes it available for use by principals outside of the Amazon Web Services account that created the resource. Sharing doesn't change any permissions or quotas that apply to the resource in the account that created it.
Synopsis
- data CreateResourceShare = CreateResourceShare' {
- clientToken :: Maybe Text
- allowExternalPrincipals :: Maybe Bool
- principals :: Maybe [Text]
- resourceArns :: Maybe [Text]
- permissionArns :: Maybe [Text]
- tags :: Maybe [Tag]
- name :: Text
- newCreateResourceShare :: Text -> CreateResourceShare
- createResourceShare_clientToken :: Lens' CreateResourceShare (Maybe Text)
- createResourceShare_allowExternalPrincipals :: Lens' CreateResourceShare (Maybe Bool)
- createResourceShare_principals :: Lens' CreateResourceShare (Maybe [Text])
- createResourceShare_resourceArns :: Lens' CreateResourceShare (Maybe [Text])
- createResourceShare_permissionArns :: Lens' CreateResourceShare (Maybe [Text])
- createResourceShare_tags :: Lens' CreateResourceShare (Maybe [Tag])
- createResourceShare_name :: Lens' CreateResourceShare Text
- data CreateResourceShareResponse = CreateResourceShareResponse' {}
- newCreateResourceShareResponse :: Int -> CreateResourceShareResponse
- createResourceShareResponse_clientToken :: Lens' CreateResourceShareResponse (Maybe Text)
- createResourceShareResponse_resourceShare :: Lens' CreateResourceShareResponse (Maybe ResourceShare)
- createResourceShareResponse_httpStatus :: Lens' CreateResourceShareResponse Int
Creating a Request
data CreateResourceShare Source #
See: newCreateResourceShare
smart constructor.
CreateResourceShare' | |
|
Instances
newCreateResourceShare Source #
Create a value of CreateResourceShare
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:
$sel:clientToken:CreateResourceShare'
, createResourceShare_clientToken
- A unique, case-sensitive identifier that you provide to ensure the
idempotency of the request.
$sel:allowExternalPrincipals:CreateResourceShare'
, createResourceShare_allowExternalPrincipals
- Indicates whether principals outside your organization in Organizations
can be associated with a resource share.
$sel:principals:CreateResourceShare'
, createResourceShare_principals
- The principals to associate with the resource share. The possible values
are:
- An Amazon Web Services account ID
- An Amazon Resource Name (ARN) of an organization in Organizations
- An ARN of an organizational unit (OU) in Organizations
- An ARN of an IAM role
- An ARN of an IAM user
Not all resource types can be shared with IAM roles and IAM users. For more information, see Sharing with IAM roles and IAM users in the Resource Access Manager User Guide.
$sel:resourceArns:CreateResourceShare'
, createResourceShare_resourceArns
- The ARNs of the resources to associate with the resource share.
$sel:permissionArns:CreateResourceShare'
, createResourceShare_permissionArns
- The Amazon Resource Names (ARNs) of the permissions to associate with
the resource share. If you do not specify an ARN for the permission, RAM
automatically attaches the default version of the permission for each
resource type. Only one permission can be associated with each resource
type in a resource share.
$sel:tags:CreateResourceShare'
, createResourceShare_tags
- One or more tags.
$sel:name:CreateResourceShare'
, createResourceShare_name
- The name of the resource share.
Request Lenses
createResourceShare_clientToken :: Lens' CreateResourceShare (Maybe Text) Source #
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
createResourceShare_allowExternalPrincipals :: Lens' CreateResourceShare (Maybe Bool) Source #
Indicates whether principals outside your organization in Organizations can be associated with a resource share.
createResourceShare_principals :: Lens' CreateResourceShare (Maybe [Text]) Source #
The principals to associate with the resource share. The possible values are:
- An Amazon Web Services account ID
- An Amazon Resource Name (ARN) of an organization in Organizations
- An ARN of an organizational unit (OU) in Organizations
- An ARN of an IAM role
- An ARN of an IAM user
Not all resource types can be shared with IAM roles and IAM users. For more information, see Sharing with IAM roles and IAM users in the Resource Access Manager User Guide.
createResourceShare_resourceArns :: Lens' CreateResourceShare (Maybe [Text]) Source #
The ARNs of the resources to associate with the resource share.
createResourceShare_permissionArns :: Lens' CreateResourceShare (Maybe [Text]) Source #
The Amazon Resource Names (ARNs) of the permissions to associate with the resource share. If you do not specify an ARN for the permission, RAM automatically attaches the default version of the permission for each resource type. Only one permission can be associated with each resource type in a resource share.
createResourceShare_tags :: Lens' CreateResourceShare (Maybe [Tag]) Source #
One or more tags.
createResourceShare_name :: Lens' CreateResourceShare Text Source #
The name of the resource share.
Destructuring the Response
data CreateResourceShareResponse Source #
See: newCreateResourceShareResponse
smart constructor.
CreateResourceShareResponse' | |
|
Instances
newCreateResourceShareResponse Source #
Create a value of CreateResourceShareResponse
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:
$sel:clientToken:CreateResourceShare'
, createResourceShareResponse_clientToken
- A unique, case-sensitive identifier that you provide to ensure the
idempotency of the request.
$sel:resourceShare:CreateResourceShareResponse'
, createResourceShareResponse_resourceShare
- Information about the resource share.
$sel:httpStatus:CreateResourceShareResponse'
, createResourceShareResponse_httpStatus
- The response's http status code.
Response Lenses
createResourceShareResponse_clientToken :: Lens' CreateResourceShareResponse (Maybe Text) Source #
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
createResourceShareResponse_resourceShare :: Lens' CreateResourceShareResponse (Maybe ResourceShare) Source #
Information about the resource share.
createResourceShareResponse_httpStatus :: Lens' CreateResourceShareResponse Int Source #
The response's http status code.