Struct aws_sdk_kms::operation::list_grants::builders::ListGrantsFluentBuilder
source · pub struct ListGrantsFluentBuilder { /* private fields */ }
Expand description
Fluent builder constructing a request to ListGrants
.
Gets a list of all grants for the specified KMS key.
You must specify the KMS key in all requests. You can filter the grant list by grant ID or grantee principal.
For detailed information about grants, including grant terminology, see Grants in KMS in the Key Management Service Developer Guide . For examples of working with grants in several programming languages, see Programming grants.
The GranteePrincipal
field in the ListGrants
response usually contains the user or role designated as the grantee principal in the grant. However, when the grantee principal in the grant is an Amazon Web Services service, the GranteePrincipal
field contains the service principal, which might represent several different grantee principals.
Cross-account use: Yes. To perform this operation on a KMS key in a different Amazon Web Services account, specify the key ARN in the value of the KeyId
parameter.
Required permissions: kms:ListGrants (key policy)
Related operations:
-
CreateGrant
-
ListRetirableGrants
-
RetireGrant
-
RevokeGrant
Eventual consistency: The KMS API follows an eventual consistency model. For more information, see KMS eventual consistency.
Implementations§
source§impl ListGrantsFluentBuilder
impl ListGrantsFluentBuilder
sourcepub fn as_input(&self) -> &ListGrantsInputBuilder
pub fn as_input(&self) -> &ListGrantsInputBuilder
Access the ListGrants as a reference.
sourcepub async fn send(
self
) -> Result<ListGrantsOutput, SdkError<ListGrantsError, HttpResponse>>
pub async fn send( self ) -> Result<ListGrantsOutput, SdkError<ListGrantsError, HttpResponse>>
Sends the request and returns the response.
If an error occurs, an SdkError
will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub fn customize(
self
) -> CustomizableOperation<ListGrantsOutput, ListGrantsError, Self>
pub fn customize( self ) -> CustomizableOperation<ListGrantsOutput, ListGrantsError, Self>
Consumes this builder, creating a customizable operation that can be modified before being sent.
sourcepub fn into_paginator(self) -> ListGrantsPaginator
pub fn into_paginator(self) -> ListGrantsPaginator
Create a paginator for this request
Paginators are used by calling send().await
which returns a PaginationStream
.
sourcepub fn limit(self, input: i32) -> Self
pub fn limit(self, input: i32) -> Self
Use this parameter to specify the maximum number of items to return. When this value is present, KMS does not return more than the specified number of items, but it might return fewer.
This value is optional. If you include a value, it must be between 1 and 100, inclusive. If you do not include a value, it defaults to 50.
sourcepub fn set_limit(self, input: Option<i32>) -> Self
pub fn set_limit(self, input: Option<i32>) -> Self
Use this parameter to specify the maximum number of items to return. When this value is present, KMS does not return more than the specified number of items, but it might return fewer.
This value is optional. If you include a value, it must be between 1 and 100, inclusive. If you do not include a value, it defaults to 50.
sourcepub fn get_limit(&self) -> &Option<i32>
pub fn get_limit(&self) -> &Option<i32>
Use this parameter to specify the maximum number of items to return. When this value is present, KMS does not return more than the specified number of items, but it might return fewer.
This value is optional. If you include a value, it must be between 1 and 100, inclusive. If you do not include a value, it defaults to 50.
sourcepub fn marker(self, input: impl Into<String>) -> Self
pub fn marker(self, input: impl Into<String>) -> Self
Use this parameter in a subsequent request after you receive a response with truncated results. Set it to the value of NextMarker
from the truncated response you just received.
sourcepub fn set_marker(self, input: Option<String>) -> Self
pub fn set_marker(self, input: Option<String>) -> Self
Use this parameter in a subsequent request after you receive a response with truncated results. Set it to the value of NextMarker
from the truncated response you just received.
sourcepub fn get_marker(&self) -> &Option<String>
pub fn get_marker(&self) -> &Option<String>
Use this parameter in a subsequent request after you receive a response with truncated results. Set it to the value of NextMarker
from the truncated response you just received.
sourcepub fn key_id(self, input: impl Into<String>) -> Self
pub fn key_id(self, input: impl Into<String>) -> Self
Returns only grants for the specified KMS key. This parameter is required.
Specify the key ID or key ARN of the KMS key. To specify a KMS key in a different Amazon Web Services account, you must use the key ARN.
For example:
-
Key ID:
1234abcd-12ab-34cd-56ef-1234567890ab
-
Key ARN:
arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
To get the key ID and key ARN for a KMS key, use ListKeys
or DescribeKey
.
sourcepub fn set_key_id(self, input: Option<String>) -> Self
pub fn set_key_id(self, input: Option<String>) -> Self
Returns only grants for the specified KMS key. This parameter is required.
Specify the key ID or key ARN of the KMS key. To specify a KMS key in a different Amazon Web Services account, you must use the key ARN.
For example:
-
Key ID:
1234abcd-12ab-34cd-56ef-1234567890ab
-
Key ARN:
arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
To get the key ID and key ARN for a KMS key, use ListKeys
or DescribeKey
.
sourcepub fn get_key_id(&self) -> &Option<String>
pub fn get_key_id(&self) -> &Option<String>
Returns only grants for the specified KMS key. This parameter is required.
Specify the key ID or key ARN of the KMS key. To specify a KMS key in a different Amazon Web Services account, you must use the key ARN.
For example:
-
Key ID:
1234abcd-12ab-34cd-56ef-1234567890ab
-
Key ARN:
arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
To get the key ID and key ARN for a KMS key, use ListKeys
or DescribeKey
.
sourcepub fn grant_id(self, input: impl Into<String>) -> Self
pub fn grant_id(self, input: impl Into<String>) -> Self
Returns only the grant with the specified grant ID. The grant ID uniquely identifies the grant.
sourcepub fn set_grant_id(self, input: Option<String>) -> Self
pub fn set_grant_id(self, input: Option<String>) -> Self
Returns only the grant with the specified grant ID. The grant ID uniquely identifies the grant.
sourcepub fn get_grant_id(&self) -> &Option<String>
pub fn get_grant_id(&self) -> &Option<String>
Returns only the grant with the specified grant ID. The grant ID uniquely identifies the grant.
sourcepub fn grantee_principal(self, input: impl Into<String>) -> Self
pub fn grantee_principal(self, input: impl Into<String>) -> Self
Returns only grants where the specified principal is the grantee principal for the grant.
sourcepub fn set_grantee_principal(self, input: Option<String>) -> Self
pub fn set_grantee_principal(self, input: Option<String>) -> Self
Returns only grants where the specified principal is the grantee principal for the grant.
sourcepub fn get_grantee_principal(&self) -> &Option<String>
pub fn get_grantee_principal(&self) -> &Option<String>
Returns only grants where the specified principal is the grantee principal for the grant.
Trait Implementations§
source§impl Clone for ListGrantsFluentBuilder
impl Clone for ListGrantsFluentBuilder
source§fn clone(&self) -> ListGrantsFluentBuilder
fn clone(&self) -> ListGrantsFluentBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more