aws_sdk_verifiedpermissions/client/is_authorized_with_token.rs
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
/// Constructs a fluent builder for the [`IsAuthorizedWithToken`](crate::operation::is_authorized_with_token::builders::IsAuthorizedWithTokenFluentBuilder) operation.
///
/// - The fluent builder is configurable:
/// - [`policy_store_id(impl Into<String>)`](crate::operation::is_authorized_with_token::builders::IsAuthorizedWithTokenFluentBuilder::policy_store_id) / [`set_policy_store_id(Option<String>)`](crate::operation::is_authorized_with_token::builders::IsAuthorizedWithTokenFluentBuilder::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::is_authorized_with_token::builders::IsAuthorizedWithTokenFluentBuilder::identity_token) / [`set_identity_token(Option<String>)`](crate::operation::is_authorized_with_token::builders::IsAuthorizedWithTokenFluentBuilder::set_identity_token):<br>required: **false**<br><p>Specifies an identity token for the principal to be authorized. 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::is_authorized_with_token::builders::IsAuthorizedWithTokenFluentBuilder::access_token) / [`set_access_token(Option<String>)`](crate::operation::is_authorized_with_token::builders::IsAuthorizedWithTokenFluentBuilder::set_access_token):<br>required: **false**<br><p>Specifies an access token for the principal to be authorized. 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>
/// - [`action(ActionIdentifier)`](crate::operation::is_authorized_with_token::builders::IsAuthorizedWithTokenFluentBuilder::action) / [`set_action(Option<ActionIdentifier>)`](crate::operation::is_authorized_with_token::builders::IsAuthorizedWithTokenFluentBuilder::set_action):<br>required: **false**<br><p>Specifies the requested action to be authorized. Is the specified principal authorized to perform this action on the specified resource.</p><br>
/// - [`resource(EntityIdentifier)`](crate::operation::is_authorized_with_token::builders::IsAuthorizedWithTokenFluentBuilder::resource) / [`set_resource(Option<EntityIdentifier>)`](crate::operation::is_authorized_with_token::builders::IsAuthorizedWithTokenFluentBuilder::set_resource):<br>required: **false**<br><p>Specifies the resource for which the authorization decision is made. For example, is the principal allowed to perform the action on the resource?</p><br>
/// - [`context(ContextDefinition)`](crate::operation::is_authorized_with_token::builders::IsAuthorizedWithTokenFluentBuilder::context) / [`set_context(Option<ContextDefinition>)`](crate::operation::is_authorized_with_token::builders::IsAuthorizedWithTokenFluentBuilder::set_context):<br>required: **false**<br><p>Specifies additional context that can be used to make more granular authorization decisions.</p><br>
/// - [`entities(EntitiesDefinition)`](crate::operation::is_authorized_with_token::builders::IsAuthorizedWithTokenFluentBuilder::entities) / [`set_entities(Option<EntitiesDefinition>)`](crate::operation::is_authorized_with_token::builders::IsAuthorizedWithTokenFluentBuilder::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>IsAuthorizedWithToken</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>
/// - On success, responds with [`IsAuthorizedWithTokenOutput`](crate::operation::is_authorized_with_token::IsAuthorizedWithTokenOutput) with field(s):
/// - [`decision(Decision)`](crate::operation::is_authorized_with_token::IsAuthorizedWithTokenOutput::decision): <p>An authorization decision that indicates if the authorization request should be allowed or denied.</p>
/// - [`determining_policies(Vec::<DeterminingPolicyItem>)`](crate::operation::is_authorized_with_token::IsAuthorizedWithTokenOutput::determining_policies): <p>The list of determining policies used to make the authorization decision. For example, if there are multiple matching policies, where at least one is a forbid policy, then because forbid always overrides permit the forbid policies are the determining policies. If all matching policies are permit policies, then those policies are the determining policies. When no policies match and the response is the default DENY, there are no determining policies.</p>
/// - [`errors(Vec::<EvaluationErrorItem>)`](crate::operation::is_authorized_with_token::IsAuthorizedWithTokenOutput::errors): <p>Errors that occurred while making an authorization decision. For example, a policy references an entity or entity attribute that does not exist in the slice.</p>
/// - [`principal(Option<EntityIdentifier>)`](crate::operation::is_authorized_with_token::IsAuthorizedWithTokenOutput::principal): <p>The identifier of the principal in the ID or access token.</p>
/// - On failure, responds with [`SdkError<IsAuthorizedWithTokenError>`](crate::operation::is_authorized_with_token::IsAuthorizedWithTokenError)
pub fn is_authorized_with_token(&self) -> crate::operation::is_authorized_with_token::builders::IsAuthorizedWithTokenFluentBuilder {
crate::operation::is_authorized_with_token::builders::IsAuthorizedWithTokenFluentBuilder::new(self.handle.clone())
}
}