aws_sdk_verifiedpermissions/client/
batch_is_authorized_with_token.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`BatchIsAuthorizedWithToken`](crate::operation::batch_is_authorized_with_token::builders::BatchIsAuthorizedWithTokenFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`policy_store_id(impl Into<String>)`](crate::operation::batch_is_authorized_with_token::builders::BatchIsAuthorizedWithTokenFluentBuilder::policy_store_id) / [`set_policy_store_id(Option<String>)`](crate::operation::batch_is_authorized_with_token::builders::BatchIsAuthorizedWithTokenFluentBuilder::set_policy_store_id):<br>required: **true**<br><p>Specifies the ID of the policy store. Policies in this policy store will be used to make an authorization decision for the input.</p><br>
    ///   - [`identity_token(impl Into<String>)`](crate::operation::batch_is_authorized_with_token::builders::BatchIsAuthorizedWithTokenFluentBuilder::identity_token) / [`set_identity_token(Option<String>)`](crate::operation::batch_is_authorized_with_token::builders::BatchIsAuthorizedWithTokenFluentBuilder::set_identity_token):<br>required: **false**<br><p>Specifies an identity (ID) token for the principal that you want to authorize in each request. This token is provided to you by the identity provider (IdP) associated with the specified identity source. You must specify either an <code>accessToken</code>, an <code>identityToken</code>, or both.</p> <p>Must be an ID token. Verified Permissions returns an error if the <code>token_use</code> claim in the submitted token isn't <code>id</code>.</p><br>
    ///   - [`access_token(impl Into<String>)`](crate::operation::batch_is_authorized_with_token::builders::BatchIsAuthorizedWithTokenFluentBuilder::access_token) / [`set_access_token(Option<String>)`](crate::operation::batch_is_authorized_with_token::builders::BatchIsAuthorizedWithTokenFluentBuilder::set_access_token):<br>required: **false**<br><p>Specifies an access token for the principal that you want to authorize in each request. This token is provided to you by the identity provider (IdP) associated with the specified identity source. You must specify either an <code>accessToken</code>, an <code>identityToken</code>, or both.</p> <p>Must be an access token. Verified Permissions returns an error if the <code>token_use</code> claim in the submitted token isn't <code>access</code>.</p><br>
    ///   - [`entities(EntitiesDefinition)`](crate::operation::batch_is_authorized_with_token::builders::BatchIsAuthorizedWithTokenFluentBuilder::entities) / [`set_entities(Option<EntitiesDefinition>)`](crate::operation::batch_is_authorized_with_token::builders::BatchIsAuthorizedWithTokenFluentBuilder::set_entities):<br>required: **false**<br><p>Specifies the list of resources and their associated attributes that Verified Permissions can examine when evaluating the policies.</p><important>  <p>You can't include principals in this parameter, only resource and action entities. This parameter can't include any entities of a type that matches the user or group entity types that you defined in your identity source.</p>  <ul>   <li>    <p>The <code>BatchIsAuthorizedWithToken</code> operation takes principal attributes from <b> <i>only</i> </b> the <code>identityToken</code> or <code>accessToken</code> passed to the operation.</p></li>   <li>    <p>For action entities, you can include only their <code>Identifier</code> and <code>EntityType</code>.</p></li>  </ul> </important><br>
    ///   - [`requests(BatchIsAuthorizedWithTokenInputItem)`](crate::operation::batch_is_authorized_with_token::builders::BatchIsAuthorizedWithTokenFluentBuilder::requests) / [`set_requests(Option<Vec::<BatchIsAuthorizedWithTokenInputItem>>)`](crate::operation::batch_is_authorized_with_token::builders::BatchIsAuthorizedWithTokenFluentBuilder::set_requests):<br>required: **true**<br><p>An array of up to 30 requests that you want Verified Permissions to evaluate.</p><br>
    /// - On success, responds with [`BatchIsAuthorizedWithTokenOutput`](crate::operation::batch_is_authorized_with_token::BatchIsAuthorizedWithTokenOutput) with field(s):
    ///   - [`principal(Option<EntityIdentifier>)`](crate::operation::batch_is_authorized_with_token::BatchIsAuthorizedWithTokenOutput::principal): <p>The identifier of the principal in the ID or access token.</p>
    ///   - [`results(Vec::<BatchIsAuthorizedWithTokenOutputItem>)`](crate::operation::batch_is_authorized_with_token::BatchIsAuthorizedWithTokenOutput::results): <p>A series of <code>Allow</code> or <code>Deny</code> decisions for each request, and the policies that produced them. These results are returned in the order they were requested.</p>
    /// - On failure, responds with [`SdkError<BatchIsAuthorizedWithTokenError>`](crate::operation::batch_is_authorized_with_token::BatchIsAuthorizedWithTokenError)
    pub fn batch_is_authorized_with_token(
        &self,
    ) -> crate::operation::batch_is_authorized_with_token::builders::BatchIsAuthorizedWithTokenFluentBuilder {
        crate::operation::batch_is_authorized_with_token::builders::BatchIsAuthorizedWithTokenFluentBuilder::new(self.handle.clone())
    }
}