aws_sdk_ec2/client/enable_snapshot_block_public_access.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3 /// Constructs a fluent builder for the [`EnableSnapshotBlockPublicAccess`](crate::operation::enable_snapshot_block_public_access::builders::EnableSnapshotBlockPublicAccessFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`state(SnapshotBlockPublicAccessState)`](crate::operation::enable_snapshot_block_public_access::builders::EnableSnapshotBlockPublicAccessFluentBuilder::state) / [`set_state(Option<SnapshotBlockPublicAccessState>)`](crate::operation::enable_snapshot_block_public_access::builders::EnableSnapshotBlockPublicAccessFluentBuilder::set_state):<br>required: **true**<br><p>The mode in which to enable block public access for snapshots for the Region. Specify one of the following values:</p> <ul> <li> <p><code>block-all-sharing</code> - Prevents all public sharing of snapshots in the Region. Users in the account will no longer be able to request new public sharing. Additionally, snapshots that are already publicly shared are treated as private and they are no longer publicly available.</p></li> <li> <p><code>block-new-sharing</code> - Prevents only new public sharing of snapshots in the Region. Users in the account will no longer be able to request new public sharing. However, snapshots that are already publicly shared, remain publicly available.</p></li> </ul> <p><code>unblocked</code> is not a valid value for <b>EnableSnapshotBlockPublicAccess</b>.</p><br>
7 /// - [`dry_run(bool)`](crate::operation::enable_snapshot_block_public_access::builders::EnableSnapshotBlockPublicAccessFluentBuilder::dry_run) / [`set_dry_run(Option<bool>)`](crate::operation::enable_snapshot_block_public_access::builders::EnableSnapshotBlockPublicAccessFluentBuilder::set_dry_run):<br>required: **false**<br><p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p><br>
8 /// - On success, responds with [`EnableSnapshotBlockPublicAccessOutput`](crate::operation::enable_snapshot_block_public_access::EnableSnapshotBlockPublicAccessOutput) with field(s):
9 /// - [`state(Option<SnapshotBlockPublicAccessState>)`](crate::operation::enable_snapshot_block_public_access::EnableSnapshotBlockPublicAccessOutput::state): <p>The state of block public access for snapshots for the account and Region. Returns either <code>block-all-sharing</code> or <code>block-new-sharing</code> if the request succeeds.</p>
10 /// - On failure, responds with [`SdkError<EnableSnapshotBlockPublicAccessError>`](crate::operation::enable_snapshot_block_public_access::EnableSnapshotBlockPublicAccessError)
11 pub fn enable_snapshot_block_public_access(
12 &self,
13 ) -> crate::operation::enable_snapshot_block_public_access::builders::EnableSnapshotBlockPublicAccessFluentBuilder {
14 crate::operation::enable_snapshot_block_public_access::builders::EnableSnapshotBlockPublicAccessFluentBuilder::new(self.handle.clone())
15 }
16}