Struct aws_sdk_verifiedpermissions::operation::update_policy::builders::UpdatePolicyFluentBuilder
source · pub struct UpdatePolicyFluentBuilder { /* private fields */ }Expand description
Fluent builder constructing a request to UpdatePolicy.
Modifies a Cedar static policy in the specified policy store. You can change only certain elements of the UpdatePolicyDefinition parameter. You can directly update only static policies. To change a template-linked policy, you must update the template instead, using UpdatePolicyTemplate.
-
If policy validation is enabled in the policy store, then updating a static policy causes Verified Permissions to validate the policy against the schema in the policy store. If the updated static policy doesn't pass validation, the operation fails and the update isn't stored.
-
When you edit a static policy, You can change only certain elements of a static policy:
-
The action referenced by the policy.
-
A condition clause, such as when and unless.
You can't change these elements of a static policy:
-
Changing a policy from a static policy to a template-linked policy.
-
Changing the effect of a static policy from permit or forbid.
-
The principal referenced by a static policy.
-
The resource referenced by a static policy.
-
-
To update a template-linked policy, you must update the template instead.
Verified Permissions is eventually consistent . It can take a few seconds for a new or changed element to be propagate through the service and be visible in the results of other Verified Permissions operations.
Implementations§
source§impl UpdatePolicyFluentBuilder
impl UpdatePolicyFluentBuilder
sourcepub fn as_input(&self) -> &UpdatePolicyInputBuilder
pub fn as_input(&self) -> &UpdatePolicyInputBuilder
Access the UpdatePolicy as a reference.
sourcepub async fn send(
self
) -> Result<UpdatePolicyOutput, SdkError<UpdatePolicyError, HttpResponse>>
pub async fn send( self ) -> Result<UpdatePolicyOutput, SdkError<UpdatePolicyError, 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<UpdatePolicyOutput, UpdatePolicyError, Self>
pub fn customize( self ) -> CustomizableOperation<UpdatePolicyOutput, UpdatePolicyError, Self>
Consumes this builder, creating a customizable operation that can be modified before being sent.
sourcepub fn policy_store_id(self, input: impl Into<String>) -> Self
pub fn policy_store_id(self, input: impl Into<String>) -> Self
Specifies the ID of the policy store that contains the policy that you want to update.
sourcepub fn set_policy_store_id(self, input: Option<String>) -> Self
pub fn set_policy_store_id(self, input: Option<String>) -> Self
Specifies the ID of the policy store that contains the policy that you want to update.
sourcepub fn get_policy_store_id(&self) -> &Option<String>
pub fn get_policy_store_id(&self) -> &Option<String>
Specifies the ID of the policy store that contains the policy that you want to update.
sourcepub fn policy_id(self, input: impl Into<String>) -> Self
pub fn policy_id(self, input: impl Into<String>) -> Self
Specifies the ID of the policy that you want to update. To find this value, you can use ListPolicies.
sourcepub fn set_policy_id(self, input: Option<String>) -> Self
pub fn set_policy_id(self, input: Option<String>) -> Self
Specifies the ID of the policy that you want to update. To find this value, you can use ListPolicies.
sourcepub fn get_policy_id(&self) -> &Option<String>
pub fn get_policy_id(&self) -> &Option<String>
Specifies the ID of the policy that you want to update. To find this value, you can use ListPolicies.
sourcepub fn definition(self, input: UpdatePolicyDefinition) -> Self
pub fn definition(self, input: UpdatePolicyDefinition) -> Self
Specifies the updated policy content that you want to replace on the specified policy. The content must be valid Cedar policy language text.
You can change only the following elements from the policy definition:
-
The
actionreferenced by the policy. -
Any conditional clauses, such as
whenorunlessclauses.
You can't change the following elements:
-
Changing from
statictotemplateLinked. -
Changing the effect of the policy from
permitorforbid. -
The
principalreferenced by the policy. -
The
resourcereferenced by the policy.
sourcepub fn set_definition(self, input: Option<UpdatePolicyDefinition>) -> Self
pub fn set_definition(self, input: Option<UpdatePolicyDefinition>) -> Self
Specifies the updated policy content that you want to replace on the specified policy. The content must be valid Cedar policy language text.
You can change only the following elements from the policy definition:
-
The
actionreferenced by the policy. -
Any conditional clauses, such as
whenorunlessclauses.
You can't change the following elements:
-
Changing from
statictotemplateLinked. -
Changing the effect of the policy from
permitorforbid. -
The
principalreferenced by the policy. -
The
resourcereferenced by the policy.
sourcepub fn get_definition(&self) -> &Option<UpdatePolicyDefinition>
pub fn get_definition(&self) -> &Option<UpdatePolicyDefinition>
Specifies the updated policy content that you want to replace on the specified policy. The content must be valid Cedar policy language text.
You can change only the following elements from the policy definition:
-
The
actionreferenced by the policy. -
Any conditional clauses, such as
whenorunlessclauses.
You can't change the following elements:
-
Changing from
statictotemplateLinked. -
Changing the effect of the policy from
permitorforbid. -
The
principalreferenced by the policy. -
The
resourcereferenced by the policy.
Trait Implementations§
source§impl Clone for UpdatePolicyFluentBuilder
impl Clone for UpdatePolicyFluentBuilder
source§fn clone(&self) -> UpdatePolicyFluentBuilder
fn clone(&self) -> UpdatePolicyFluentBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more