aws_sdk_verifiedpermissions/client/update_policy.rs
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
/// Constructs a fluent builder for the [`UpdatePolicy`](crate::operation::update_policy::builders::UpdatePolicyFluentBuilder) operation.
///
/// - The fluent builder is configurable:
/// - [`policy_store_id(impl Into<String>)`](crate::operation::update_policy::builders::UpdatePolicyFluentBuilder::policy_store_id) / [`set_policy_store_id(Option<String>)`](crate::operation::update_policy::builders::UpdatePolicyFluentBuilder::set_policy_store_id):<br>required: **true**<br><p>Specifies the ID of the policy store that contains the policy that you want to update.</p><br>
/// - [`policy_id(impl Into<String>)`](crate::operation::update_policy::builders::UpdatePolicyFluentBuilder::policy_id) / [`set_policy_id(Option<String>)`](crate::operation::update_policy::builders::UpdatePolicyFluentBuilder::set_policy_id):<br>required: **true**<br><p>Specifies the ID of the policy that you want to update. To find this value, you can use <a href="https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_ListPolicies.html">ListPolicies</a>.</p><br>
/// - [`definition(UpdatePolicyDefinition)`](crate::operation::update_policy::builders::UpdatePolicyFluentBuilder::definition) / [`set_definition(Option<UpdatePolicyDefinition>)`](crate::operation::update_policy::builders::UpdatePolicyFluentBuilder::set_definition):<br>required: **true**<br><p>Specifies the updated policy content that you want to replace on the specified policy. The content must be valid Cedar policy language text.</p> <p>You can change only the following elements from the policy definition:</p> <ul> <li> <p>The <code>action</code> referenced by the policy.</p></li> <li> <p>Any conditional clauses, such as <code>when</code> or <code>unless</code> clauses.</p></li> </ul> <p>You <b>can't</b> change the following elements:</p> <ul> <li> <p>Changing from <code>static</code> to <code>templateLinked</code>.</p></li> <li> <p>Changing the effect of the policy from <code>permit</code> or <code>forbid</code>.</p></li> <li> <p>The <code>principal</code> referenced by the policy.</p></li> <li> <p>The <code>resource</code> referenced by the policy.</p></li> </ul><br>
/// - On success, responds with [`UpdatePolicyOutput`](crate::operation::update_policy::UpdatePolicyOutput) with field(s):
/// - [`policy_store_id(String)`](crate::operation::update_policy::UpdatePolicyOutput::policy_store_id): <p>The ID of the policy store that contains the policy that was updated.</p>
/// - [`policy_id(String)`](crate::operation::update_policy::UpdatePolicyOutput::policy_id): <p>The ID of the policy that was updated.</p>
/// - [`policy_type(PolicyType)`](crate::operation::update_policy::UpdatePolicyOutput::policy_type): <p>The type of the policy that was updated.</p>
/// - [`principal(Option<EntityIdentifier>)`](crate::operation::update_policy::UpdatePolicyOutput::principal): <p>The principal specified in the policy's scope. This element isn't included in the response when <code>Principal</code> isn't present in the policy content.</p>
/// - [`resource(Option<EntityIdentifier>)`](crate::operation::update_policy::UpdatePolicyOutput::resource): <p>The resource specified in the policy's scope. This element isn't included in the response when <code>Resource</code> isn't present in the policy content.</p>
/// - [`actions(Option<Vec::<ActionIdentifier>>)`](crate::operation::update_policy::UpdatePolicyOutput::actions): <p>The action that a policy permits or forbids. For example, <code>{"actions": \[{"actionId": "ViewPhoto", "actionType": "PhotoFlash::Action"}, {"entityID": "SharePhoto", "entityType": "PhotoFlash::Action"}\]}</code>.</p>
/// - [`created_date(DateTime)`](crate::operation::update_policy::UpdatePolicyOutput::created_date): <p>The date and time that the policy was originally created.</p>
/// - [`last_updated_date(DateTime)`](crate::operation::update_policy::UpdatePolicyOutput::last_updated_date): <p>The date and time that the policy was most recently updated.</p>
/// - [`effect(Option<PolicyEffect>)`](crate::operation::update_policy::UpdatePolicyOutput::effect): <p>The effect of the decision that a policy returns to an authorization request. For example, <code>"effect": "Permit"</code>.</p>
/// - On failure, responds with [`SdkError<UpdatePolicyError>`](crate::operation::update_policy::UpdatePolicyError)
pub fn update_policy(&self) -> crate::operation::update_policy::builders::UpdatePolicyFluentBuilder {
crate::operation::update_policy::builders::UpdatePolicyFluentBuilder::new(self.handle.clone())
}
}