1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 - | pub use crate::operation::put_key_policy::_put_key_policy_output::PutKeyPolicyOutputBuilder;
|
3 - |
|
4 2 | pub use crate::operation::put_key_policy::_put_key_policy_input::PutKeyPolicyInputBuilder;
|
5 3 |
|
4 + | pub use crate::operation::put_key_policy::_put_key_policy_output::PutKeyPolicyOutputBuilder;
|
5 + |
|
6 6 | impl crate::operation::put_key_policy::builders::PutKeyPolicyInputBuilder {
|
7 7 | /// Sends a request with this input using the given client.
|
8 8 | pub async fn send_with(
|
9 9 | self,
|
10 10 | client: &crate::Client,
|
11 11 | ) -> ::std::result::Result<
|
12 12 | crate::operation::put_key_policy::PutKeyPolicyOutput,
|
13 13 | ::aws_smithy_runtime_api::client::result::SdkError<
|
14 14 | crate::operation::put_key_policy::PutKeyPolicyError,
|
15 15 | ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
|
16 16 | >,
|
17 17 | > {
|
18 18 | let mut fluent_builder = client.put_key_policy();
|
19 19 | fluent_builder.inner = self;
|
20 20 | fluent_builder.send().await
|
21 21 | }
|
22 22 | }
|
23 23 | /// Fluent builder constructing a request to `PutKeyPolicy`.
|
24 24 | ///
|
25 25 | /// <p>Attaches a key policy to the specified KMS key.</p>
|
26 26 | /// <p>For more information about key policies, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html">Key Policies</a> in the <i>Key Management Service Developer Guide</i>. For help writing and formatting a JSON policy document, see the <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html">IAM JSON Policy Reference</a> in the <i> <i>Identity and Access Management User Guide</i> </i>. For examples of adding a key policy in multiple programming languages, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/example_kms_PutKeyPolicy_section.html">Use PutKeyPolicy with an Amazon Web Services SDK or CLI</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
27 27 | /// <p><b>Cross-account use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.</p>
|
28 28 | /// <p><b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:PutKeyPolicy</a> (key policy)</p>
|
29 29 | /// <p><b>Related operations</b>: <code>GetKeyPolicy</code></p>
|
30 30 | /// <p><b>Eventual consistency</b>: The KMS API follows an eventual consistency model. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency">KMS eventual consistency</a>.</p>
|
31 31 | #[derive(::std::clone::Clone, ::std::fmt::Debug)]
|
32 32 | pub struct PutKeyPolicyFluentBuilder {
|
33 33 | handle: ::std::sync::Arc<crate::client::Handle>,
|
34 34 | inner: crate::operation::put_key_policy::builders::PutKeyPolicyInputBuilder,
|
35 35 | config_override: ::std::option::Option<crate::config::Builder>,
|