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 |
Lists the principals that you are sharing resources with or that are sharing resources with you.
This operation returns paginated results.
Synopsis
- data ListPrincipals = ListPrincipals' {
- maxResults :: Maybe Natural
- nextToken :: Maybe Text
- principals :: Maybe [Text]
- resourceArn :: Maybe Text
- resourceShareArns :: Maybe [Text]
- resourceType :: Maybe Text
- resourceOwner :: ResourceOwner
- newListPrincipals :: ResourceOwner -> ListPrincipals
- listPrincipals_maxResults :: Lens' ListPrincipals (Maybe Natural)
- listPrincipals_nextToken :: Lens' ListPrincipals (Maybe Text)
- listPrincipals_principals :: Lens' ListPrincipals (Maybe [Text])
- listPrincipals_resourceArn :: Lens' ListPrincipals (Maybe Text)
- listPrincipals_resourceShareArns :: Lens' ListPrincipals (Maybe [Text])
- listPrincipals_resourceType :: Lens' ListPrincipals (Maybe Text)
- listPrincipals_resourceOwner :: Lens' ListPrincipals ResourceOwner
- data ListPrincipalsResponse = ListPrincipalsResponse' {
- nextToken :: Maybe Text
- principals :: Maybe [Principal]
- httpStatus :: Int
- newListPrincipalsResponse :: Int -> ListPrincipalsResponse
- listPrincipalsResponse_nextToken :: Lens' ListPrincipalsResponse (Maybe Text)
- listPrincipalsResponse_principals :: Lens' ListPrincipalsResponse (Maybe [Principal])
- listPrincipalsResponse_httpStatus :: Lens' ListPrincipalsResponse Int
Creating a Request
data ListPrincipals Source #
See: newListPrincipals
smart constructor.
ListPrincipals' | |
|
Instances
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 withOTHER-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 withOTHER-ACCOUNTS
– principals that are sharing resources with your account
Destructuring the Response
data ListPrincipalsResponse Source #
See: newListPrincipalsResponse
smart constructor.
ListPrincipalsResponse' | |
|
Instances
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.
listPrincipalsResponse_httpStatus :: Lens' ListPrincipalsResponse Int Source #
The response's http status code.