1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// 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:
    ///   - [`resource_arn(impl Into<String>)`](crate::operation::put_resource_policy::builders::PutResourcePolicyFluentBuilder::resource_arn) / [`set_resource_arn(Option<String>)`](crate::operation::put_resource_policy::builders::PutResourcePolicyFluentBuilder::set_resource_arn):<br>required: **true**<br><p>The Amazon Resource Name (ARN) of the CloudTrail channel attached to the resource-based policy. The following is the format of a resource ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel</code>.</p><br>
    ///   - [`resource_policy(impl Into<String>)`](crate::operation::put_resource_policy::builders::PutResourcePolicyFluentBuilder::resource_policy) / [`set_resource_policy(Option<String>)`](crate::operation::put_resource_policy::builders::PutResourcePolicyFluentBuilder::set_resource_policy):<br>required: **true**<br><p>A JSON-formatted string for an Amazon Web Services resource-based policy.</p> <p>The following are requirements for the resource policy:</p> <ul>  <li>   <p>Contains only one action: cloudtrail-data:PutAuditEvents</p></li>  <li>   <p>Contains at least one statement. The policy can have a maximum of 20 statements.</p></li>  <li>   <p>Each statement contains at least one principal. A statement can have a maximum of 50 principals.</p></li> </ul><br>
    /// - On success, responds with [`PutResourcePolicyOutput`](crate::operation::put_resource_policy::PutResourcePolicyOutput) with field(s):
    ///   - [`resource_arn(Option<String>)`](crate::operation::put_resource_policy::PutResourcePolicyOutput::resource_arn): <p>The Amazon Resource Name (ARN) of the CloudTrail channel attached to the resource-based policy.</p>
    ///   - [`resource_policy(Option<String>)`](crate::operation::put_resource_policy::PutResourcePolicyOutput::resource_policy): <p>The JSON-formatted string of the Amazon Web Services resource-based policy attached to the CloudTrail channel.</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())
    }
}