aws_sdk_xray/client/
put_resource_policy.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`PutResourcePolicy`](crate::operation::put_resource_policy::builders::PutResourcePolicyFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`policy_name(impl Into<String>)`](crate::operation::put_resource_policy::builders::PutResourcePolicyFluentBuilder::policy_name) / [`set_policy_name(Option<String>)`](crate::operation::put_resource_policy::builders::PutResourcePolicyFluentBuilder::set_policy_name):<br>required: **true**<br><p>The name of the resource policy. Must be unique within a specific Amazon Web Services account.</p><br>
    ///   - [`policy_document(impl Into<String>)`](crate::operation::put_resource_policy::builders::PutResourcePolicyFluentBuilder::policy_document) / [`set_policy_document(Option<String>)`](crate::operation::put_resource_policy::builders::PutResourcePolicyFluentBuilder::set_policy_document):<br>required: **true**<br><p>The resource policy document, which can be up to 5kb in size.</p><br>
    ///   - [`policy_revision_id(impl Into<String>)`](crate::operation::put_resource_policy::builders::PutResourcePolicyFluentBuilder::policy_revision_id) / [`set_policy_revision_id(Option<String>)`](crate::operation::put_resource_policy::builders::PutResourcePolicyFluentBuilder::set_policy_revision_id):<br>required: **false**<br><p>Specifies a specific policy revision, to ensure an atomic create operation. By default the resource policy is created if it does not exist, or updated with an incremented revision id. The revision id is unique to each policy in the account.</p> <p>If the policy revision id does not match the latest revision id, the operation will fail with an <code>InvalidPolicyRevisionIdException</code> exception. You can also provide a <code>PolicyRevisionId</code> of 0. In this case, the operation will fail with an <code>InvalidPolicyRevisionIdException</code> exception if a resource policy with the same name already exists.</p><br>
    ///   - [`bypass_policy_lockout_check(bool)`](crate::operation::put_resource_policy::builders::PutResourcePolicyFluentBuilder::bypass_policy_lockout_check) / [`set_bypass_policy_lockout_check(Option<bool>)`](crate::operation::put_resource_policy::builders::PutResourcePolicyFluentBuilder::set_bypass_policy_lockout_check):<br>required: **false**<br><p>A flag to indicate whether to bypass the resource policy lockout safety check.</p><important>  <p>Setting this value to true increases the risk that the policy becomes unmanageable. Do not set this value to true indiscriminately.</p> </important> <p>Use this parameter only when you include a policy in the request and you intend to prevent the principal that is making the request from making a subsequent <code>PutResourcePolicy</code> request.</p> <p>The default value is false.</p><br>
    /// - On success, responds with [`PutResourcePolicyOutput`](crate::operation::put_resource_policy::PutResourcePolicyOutput) with field(s):
    ///   - [`resource_policy(Option<ResourcePolicy>)`](crate::operation::put_resource_policy::PutResourcePolicyOutput::resource_policy): <p>The resource policy document, as provided in the <code>PutResourcePolicyRequest</code>.</p>
    /// - On failure, responds with [`SdkError<PutResourcePolicyError>`](crate::operation::put_resource_policy::PutResourcePolicyError)
    pub fn put_resource_policy(&self) -> crate::operation::put_resource_policy::builders::PutResourcePolicyFluentBuilder {
        crate::operation::put_resource_policy::builders::PutResourcePolicyFluentBuilder::new(self.handle.clone())
    }
}