libZSservicesZSamazonka-ramZSamazonka-ram
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.RAM.CreateResourceShare

Description

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

Creating a Request

data CreateResourceShare Source #

See: newCreateResourceShare smart constructor.

Constructors

CreateResourceShare' 

Fields

  • clientToken :: Maybe Text

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

  • allowExternalPrincipals :: Maybe Bool

    Indicates whether principals outside your organization in Organizations can be associated with a resource share.

  • principals :: Maybe [Text]

    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.

  • resourceArns :: Maybe [Text]

    The ARNs of the resources to associate with the resource share.

  • permissionArns :: Maybe [Text]

    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.

  • tags :: Maybe [Tag]

    One or more tags.

  • name :: Text

    The name of the resource share.

Instances

Instances details
Eq CreateResourceShare Source # 
Instance details

Defined in Amazonka.RAM.CreateResourceShare

Read CreateResourceShare Source # 
Instance details

Defined in Amazonka.RAM.CreateResourceShare

Show CreateResourceShare Source # 
Instance details

Defined in Amazonka.RAM.CreateResourceShare

Generic CreateResourceShare Source # 
Instance details

Defined in Amazonka.RAM.CreateResourceShare

Associated Types

type Rep CreateResourceShare :: Type -> Type #

NFData CreateResourceShare Source # 
Instance details

Defined in Amazonka.RAM.CreateResourceShare

Methods

rnf :: CreateResourceShare -> () #

Hashable CreateResourceShare Source # 
Instance details

Defined in Amazonka.RAM.CreateResourceShare

ToJSON CreateResourceShare Source # 
Instance details

Defined in Amazonka.RAM.CreateResourceShare

AWSRequest CreateResourceShare Source # 
Instance details

Defined in Amazonka.RAM.CreateResourceShare

Associated Types

type AWSResponse CreateResourceShare #

ToHeaders CreateResourceShare Source # 
Instance details

Defined in Amazonka.RAM.CreateResourceShare

ToPath CreateResourceShare Source # 
Instance details

Defined in Amazonka.RAM.CreateResourceShare

ToQuery CreateResourceShare Source # 
Instance details

Defined in Amazonka.RAM.CreateResourceShare

type Rep CreateResourceShare Source # 
Instance details

Defined in Amazonka.RAM.CreateResourceShare

type Rep CreateResourceShare = D1 ('MetaData "CreateResourceShare" "Amazonka.RAM.CreateResourceShare" "libZSservicesZSamazonka-ramZSamazonka-ram" 'False) (C1 ('MetaCons "CreateResourceShare'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "clientToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "allowExternalPrincipals") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "principals") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])))) :*: ((S1 ('MetaSel ('Just "resourceArns") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])) :*: S1 ('MetaSel ('Just "permissionArns") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text]))) :*: (S1 ('MetaSel ('Just "tags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Tag])) :*: S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))
type AWSResponse CreateResourceShare Source # 
Instance details

Defined in Amazonka.RAM.CreateResourceShare

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.

Destructuring the Response

data CreateResourceShareResponse Source #

See: newCreateResourceShareResponse smart constructor.

Constructors

CreateResourceShareResponse' 

Fields

Instances

Instances details
Eq CreateResourceShareResponse Source # 
Instance details

Defined in Amazonka.RAM.CreateResourceShare

Read CreateResourceShareResponse Source # 
Instance details

Defined in Amazonka.RAM.CreateResourceShare

Show CreateResourceShareResponse Source # 
Instance details

Defined in Amazonka.RAM.CreateResourceShare

Generic CreateResourceShareResponse Source # 
Instance details

Defined in Amazonka.RAM.CreateResourceShare

Associated Types

type Rep CreateResourceShareResponse :: Type -> Type #

NFData CreateResourceShareResponse Source # 
Instance details

Defined in Amazonka.RAM.CreateResourceShare

type Rep CreateResourceShareResponse Source # 
Instance details

Defined in Amazonka.RAM.CreateResourceShare

type Rep CreateResourceShareResponse = D1 ('MetaData "CreateResourceShareResponse" "Amazonka.RAM.CreateResourceShare" "libZSservicesZSamazonka-ramZSamazonka-ram" 'False) (C1 ('MetaCons "CreateResourceShareResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "clientToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "resourceShare") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ResourceShare)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

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.