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

Description

Lists the principals that you are sharing resources with or that are sharing resources with you.

This operation returns paginated results.

Synopsis

Creating a Request

data ListPrincipals Source #

See: newListPrincipals smart constructor.

Constructors

ListPrincipals' 

Fields

  • maxResults :: Maybe Natural

    Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the NextToken response element is returned with a value (not null). Include the specified value as the NextToken request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.

  • nextToken :: Maybe Text

    Specifies that you want to receive the next page of results. Valid only if you received a NextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's NextToken response to request the next page of results.

  • principals :: Maybe [Text]

    Specifies that you want to list information for only the listed principals.

    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.

  • resourceArn :: Maybe Text

    Specifies that you want to list principal information for the resource share with the specified Amazon Resoure Name (ARN).

  • resourceShareArns :: Maybe [Text]

    Specifies that you want to list information for only principals associated with the resource shares specified by a list the Amazon Resource Names (ARNs).

  • resourceType :: Maybe Text

    Specifies that you want to list information for only principals associated with resource shares that include the specified resource type.

    For a list of valid values, query the ListResourceTypes operation.

  • resourceOwner :: ResourceOwner

    Specifies that you want to list information for only resource shares that match the following:

    • SELF – principals that your account is sharing resources with
    • OTHER-ACCOUNTS – principals that are sharing resources with your account

Instances

Instances details
ToJSON ListPrincipals Source # 
Instance details

Defined in Amazonka.RAM.ListPrincipals

ToHeaders ListPrincipals Source # 
Instance details

Defined in Amazonka.RAM.ListPrincipals

ToPath ListPrincipals Source # 
Instance details

Defined in Amazonka.RAM.ListPrincipals

ToQuery ListPrincipals Source # 
Instance details

Defined in Amazonka.RAM.ListPrincipals

AWSPager ListPrincipals Source # 
Instance details

Defined in Amazonka.RAM.ListPrincipals

AWSRequest ListPrincipals Source # 
Instance details

Defined in Amazonka.RAM.ListPrincipals

Associated Types

type AWSResponse ListPrincipals #

Generic ListPrincipals Source # 
Instance details

Defined in Amazonka.RAM.ListPrincipals

Associated Types

type Rep ListPrincipals :: Type -> Type #

Read ListPrincipals Source # 
Instance details

Defined in Amazonka.RAM.ListPrincipals

Show ListPrincipals Source # 
Instance details

Defined in Amazonka.RAM.ListPrincipals

NFData ListPrincipals Source # 
Instance details

Defined in Amazonka.RAM.ListPrincipals

Methods

rnf :: ListPrincipals -> () #

Eq ListPrincipals Source # 
Instance details

Defined in Amazonka.RAM.ListPrincipals

Hashable ListPrincipals Source # 
Instance details

Defined in Amazonka.RAM.ListPrincipals

type AWSResponse ListPrincipals Source # 
Instance details

Defined in Amazonka.RAM.ListPrincipals

type Rep ListPrincipals Source # 
Instance details

Defined in Amazonka.RAM.ListPrincipals

newListPrincipals Source #

Create a value of ListPrincipals 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:maxResults:ListPrincipals', listPrincipals_maxResults - Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the NextToken response element is returned with a value (not null). Include the specified value as the NextToken request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.

ListPrincipals, listPrincipals_nextToken - Specifies that you want to receive the next page of results. Valid only if you received a NextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's NextToken response to request the next page of results.

ListPrincipals, listPrincipals_principals - Specifies that you want to list information for only the listed principals.

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:resourceArn:ListPrincipals', listPrincipals_resourceArn - Specifies that you want to list principal information for the resource share with the specified Amazon Resoure Name (ARN).

$sel:resourceShareArns:ListPrincipals', listPrincipals_resourceShareArns - Specifies that you want to list information for only principals associated with the resource shares specified by a list the Amazon Resource Names (ARNs).

ListPrincipals, listPrincipals_resourceType - Specifies that you want to list information for only principals associated with resource shares that include the specified resource type.

For a list of valid values, query the ListResourceTypes operation.

$sel:resourceOwner:ListPrincipals', listPrincipals_resourceOwner - Specifies that you want to list information for only resource shares that match the following:

  • SELF – principals that your account is sharing resources with
  • OTHER-ACCOUNTS – principals that are sharing resources with your account

Request Lenses

listPrincipals_maxResults :: Lens' ListPrincipals (Maybe Natural) Source #

Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the NextToken response element is returned with a value (not null). Include the specified value as the NextToken request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.

listPrincipals_nextToken :: Lens' ListPrincipals (Maybe Text) Source #

Specifies that you want to receive the next page of results. Valid only if you received a NextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's NextToken response to request the next page of results.

listPrincipals_principals :: Lens' ListPrincipals (Maybe [Text]) Source #

Specifies that you want to list information for only the listed principals.

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.

listPrincipals_resourceArn :: Lens' ListPrincipals (Maybe Text) Source #

Specifies that you want to list principal information for the resource share with the specified Amazon Resoure Name (ARN).

listPrincipals_resourceShareArns :: Lens' ListPrincipals (Maybe [Text]) Source #

Specifies that you want to list information for only principals associated with the resource shares specified by a list the Amazon Resource Names (ARNs).

listPrincipals_resourceType :: Lens' ListPrincipals (Maybe Text) Source #

Specifies that you want to list information for only principals associated with resource shares that include the specified resource type.

For a list of valid values, query the ListResourceTypes operation.

listPrincipals_resourceOwner :: Lens' ListPrincipals ResourceOwner Source #

Specifies that you want to list information for only resource shares that match the following:

  • SELF – principals that your account is sharing resources with
  • OTHER-ACCOUNTS – principals that are sharing resources with your account

Destructuring the Response

data ListPrincipalsResponse Source #

See: newListPrincipalsResponse smart constructor.

Constructors

ListPrincipalsResponse' 

Fields

  • nextToken :: Maybe Text

    If present, this value indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null. This indicates that this is the last page of results.

  • principals :: Maybe [Principal]

    An array of objects that contain the details about the principals.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Generic ListPrincipalsResponse Source # 
Instance details

Defined in Amazonka.RAM.ListPrincipals

Associated Types

type Rep ListPrincipalsResponse :: Type -> Type #

Read ListPrincipalsResponse Source # 
Instance details

Defined in Amazonka.RAM.ListPrincipals

Show ListPrincipalsResponse Source # 
Instance details

Defined in Amazonka.RAM.ListPrincipals

NFData ListPrincipalsResponse Source # 
Instance details

Defined in Amazonka.RAM.ListPrincipals

Methods

rnf :: ListPrincipalsResponse -> () #

Eq ListPrincipalsResponse Source # 
Instance details

Defined in Amazonka.RAM.ListPrincipals

type Rep ListPrincipalsResponse Source # 
Instance details

Defined in Amazonka.RAM.ListPrincipals

type Rep ListPrincipalsResponse = D1 ('MetaData "ListPrincipalsResponse" "Amazonka.RAM.ListPrincipals" "amazonka-ram-2.0-2ZD9k8USaHb58ZVl9MaFYL" 'False) (C1 ('MetaCons "ListPrincipalsResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "principals") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Principal])) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newListPrincipalsResponse Source #

Create a value of ListPrincipalsResponse 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:

ListPrincipals, listPrincipalsResponse_nextToken - If present, this value indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null. This indicates that this is the last page of results.

ListPrincipals, listPrincipalsResponse_principals - An array of objects that contain the details about the principals.

$sel:httpStatus:ListPrincipalsResponse', listPrincipalsResponse_httpStatus - The response's http status code.

Response Lenses

listPrincipalsResponse_nextToken :: Lens' ListPrincipalsResponse (Maybe Text) Source #

If present, this value indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null. This indicates that this is the last page of results.

listPrincipalsResponse_principals :: Lens' ListPrincipalsResponse (Maybe [Principal]) Source #

An array of objects that contain the details about the principals.