aws_sdk_ram/client/list_principals.rs
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
/// Constructs a fluent builder for the [`ListPrincipals`](crate::operation::list_principals::builders::ListPrincipalsFluentBuilder) operation.
/// This operation supports pagination; See [`into_paginator()`](crate::operation::list_principals::builders::ListPrincipalsFluentBuilder::into_paginator).
///
/// - The fluent builder is configurable:
/// - [`resource_owner(ResourceOwner)`](crate::operation::list_principals::builders::ListPrincipalsFluentBuilder::resource_owner) / [`set_resource_owner(Option<ResourceOwner>)`](crate::operation::list_principals::builders::ListPrincipalsFluentBuilder::set_resource_owner):<br>required: **true**<br><p>Specifies that you want to list information for only resource shares that match the following:</p> <ul> <li> <p><b> <code>SELF</code> </b> – principals that your account is sharing resources with</p></li> <li> <p><b> <code>OTHER-ACCOUNTS</code> </b> – principals that are sharing resources with your account</p></li> </ul><br>
/// - [`resource_arn(impl Into<String>)`](crate::operation::list_principals::builders::ListPrincipalsFluentBuilder::resource_arn) / [`set_resource_arn(Option<String>)`](crate::operation::list_principals::builders::ListPrincipalsFluentBuilder::set_resource_arn):<br>required: **false**<br><p>Specifies that you want to list principal information for the resource share with the specified <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Name (ARN)</a>.</p><br>
/// - [`principals(impl Into<String>)`](crate::operation::list_principals::builders::ListPrincipalsFluentBuilder::principals) / [`set_principals(Option<Vec::<String>>)`](crate::operation::list_principals::builders::ListPrincipalsFluentBuilder::set_principals):<br>required: **false**<br><p>Specifies that you want to list information for only the listed principals.</p> <p>You can include the following values:</p> <ul> <li> <p>An Amazon Web Services account ID, for example: <code>123456789012</code></p></li> <li> <p>An <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Name (ARN)</a> of an organization in Organizations, for example: <code>organizations::123456789012:organization/o-exampleorgid</code></p></li> <li> <p>An ARN of an organizational unit (OU) in Organizations, for example: <code>organizations::123456789012:ou/o-exampleorgid/ou-examplerootid-exampleouid123</code></p></li> <li> <p>An ARN of an IAM role, for example: <code>iam::123456789012:role/rolename</code></p></li> <li> <p>An ARN of an IAM user, for example: <code>iam::123456789012user/username</code></p></li> </ul><note> <p>Not all resource types can be shared with IAM roles and users. For more information, see <a href="https://docs.aws.amazon.com/ram/latest/userguide/permissions.html#permissions-rbp-supported-resource-types">Sharing with IAM roles and users</a> in the <i>Resource Access Manager User Guide</i>.</p> </note><br>
/// - [`resource_type(impl Into<String>)`](crate::operation::list_principals::builders::ListPrincipalsFluentBuilder::resource_type) / [`set_resource_type(Option<String>)`](crate::operation::list_principals::builders::ListPrincipalsFluentBuilder::set_resource_type):<br>required: **false**<br><p>Specifies that you want to list information for only principals associated with resource shares that include the specified resource type.</p> <p>For a list of valid values, query the <code>ListResourceTypes</code> operation.</p><br>
/// - [`resource_share_arns(impl Into<String>)`](crate::operation::list_principals::builders::ListPrincipalsFluentBuilder::resource_share_arns) / [`set_resource_share_arns(Option<Vec::<String>>)`](crate::operation::list_principals::builders::ListPrincipalsFluentBuilder::set_resource_share_arns):<br>required: **false**<br><p>Specifies that you want to list information for only principals associated with the resource shares specified by a list the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a>.</p><br>
/// - [`next_token(impl Into<String>)`](crate::operation::list_principals::builders::ListPrincipalsFluentBuilder::next_token) / [`set_next_token(Option<String>)`](crate::operation::list_principals::builders::ListPrincipalsFluentBuilder::set_next_token):<br>required: **false**<br><p>Specifies that you want to receive the next page of results. Valid only if you received a <code>NextToken</code> 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 <code>NextToken</code> response to request the next page of results.</p><br>
/// - [`max_results(i32)`](crate::operation::list_principals::builders::ListPrincipalsFluentBuilder::max_results) / [`set_max_results(Option<i32>)`](crate::operation::list_principals::builders::ListPrincipalsFluentBuilder::set_max_results):<br>required: **false**<br><p>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 <code>NextToken</code> response element is returned with a value (not null). Include the specified value as the <code>NextToken</code> 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 <code>NextToken</code> after every operation to ensure that you receive all of the results.</p><br>
/// - On success, responds with [`ListPrincipalsOutput`](crate::operation::list_principals::ListPrincipalsOutput) with field(s):
/// - [`principals(Option<Vec::<Principal>>)`](crate::operation::list_principals::ListPrincipalsOutput::principals): <p>An array of objects that contain the details about the principals.</p>
/// - [`next_token(Option<String>)`](crate::operation::list_principals::ListPrincipalsOutput::next_token): <p>If present, this value indicates that more output is available than is included in the current response. Use this value in the <code>NextToken</code> request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the <code>NextToken</code> response element comes back as <code>null</code>. This indicates that this is the last page of results.</p>
/// - On failure, responds with [`SdkError<ListPrincipalsError>`](crate::operation::list_principals::ListPrincipalsError)
pub fn list_principals(&self) -> crate::operation::list_principals::builders::ListPrincipalsFluentBuilder {
crate::operation::list_principals::builders::ListPrincipalsFluentBuilder::new(self.handle.clone())
}
}