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.AssociateResourceShare

Description

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

Creating a Request

data AssociateResourceShare Source #

See: newAssociateResourceShare smart constructor.

Constructors

AssociateResourceShare' 

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.

  • principals :: Maybe [Text]

    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.

  • resourceArns :: Maybe [Text]

    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.

  • resourceShareArn :: Text

    Specifies the Amazon Resoure Name (ARN) of the resource share that you want to add principals or resources to.

Instances

Instances details
ToJSON AssociateResourceShare Source # 
Instance details

Defined in Amazonka.RAM.AssociateResourceShare

ToHeaders AssociateResourceShare Source # 
Instance details

Defined in Amazonka.RAM.AssociateResourceShare

ToPath AssociateResourceShare Source # 
Instance details

Defined in Amazonka.RAM.AssociateResourceShare

ToQuery AssociateResourceShare Source # 
Instance details

Defined in Amazonka.RAM.AssociateResourceShare

AWSRequest AssociateResourceShare Source # 
Instance details

Defined in Amazonka.RAM.AssociateResourceShare

Associated Types

type AWSResponse AssociateResourceShare #

Generic AssociateResourceShare Source # 
Instance details

Defined in Amazonka.RAM.AssociateResourceShare

Associated Types

type Rep AssociateResourceShare :: Type -> Type #

Read AssociateResourceShare Source # 
Instance details

Defined in Amazonka.RAM.AssociateResourceShare

Show AssociateResourceShare Source # 
Instance details

Defined in Amazonka.RAM.AssociateResourceShare

NFData AssociateResourceShare Source # 
Instance details

Defined in Amazonka.RAM.AssociateResourceShare

Methods

rnf :: AssociateResourceShare -> () #

Eq AssociateResourceShare Source # 
Instance details

Defined in Amazonka.RAM.AssociateResourceShare

Hashable AssociateResourceShare Source # 
Instance details

Defined in Amazonka.RAM.AssociateResourceShare

type AWSResponse AssociateResourceShare Source # 
Instance details

Defined in Amazonka.RAM.AssociateResourceShare

type Rep AssociateResourceShare Source # 
Instance details

Defined in Amazonka.RAM.AssociateResourceShare

type Rep AssociateResourceShare = D1 ('MetaData "AssociateResourceShare" "Amazonka.RAM.AssociateResourceShare" "amazonka-ram-2.0-2ZD9k8USaHb58ZVl9MaFYL" 'False) (C1 ('MetaCons "AssociateResourceShare'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "clientToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "principals") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text]))) :*: (S1 ('MetaSel ('Just "resourceArns") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])) :*: S1 ('MetaSel ('Just "resourceShareArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))

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.

Constructors

AssociateResourceShareResponse' 

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.

  • resourceShareAssociations :: Maybe [ResourceShareAssociation]

    An array of objects that contain information about the associations.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Generic AssociateResourceShareResponse Source # 
Instance details

Defined in Amazonka.RAM.AssociateResourceShare

Associated Types

type Rep AssociateResourceShareResponse :: Type -> Type #

Read AssociateResourceShareResponse Source # 
Instance details

Defined in Amazonka.RAM.AssociateResourceShare

Show AssociateResourceShareResponse Source # 
Instance details

Defined in Amazonka.RAM.AssociateResourceShare

NFData AssociateResourceShareResponse Source # 
Instance details

Defined in Amazonka.RAM.AssociateResourceShare

Eq AssociateResourceShareResponse Source # 
Instance details

Defined in Amazonka.RAM.AssociateResourceShare

type Rep AssociateResourceShareResponse Source # 
Instance details

Defined in Amazonka.RAM.AssociateResourceShare

type Rep AssociateResourceShareResponse = D1 ('MetaData "AssociateResourceShareResponse" "Amazonka.RAM.AssociateResourceShare" "amazonka-ram-2.0-2ZD9k8USaHb58ZVl9MaFYL" 'False) (C1 ('MetaCons "AssociateResourceShareResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "clientToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "resourceShareAssociations") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [ResourceShareAssociation])) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

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.