aws-sdk-ec2 1.222.0

AWS SDK for Amazon Elastic Compute Cloud
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::create_mac_system_integrity_protection_modification_task::_create_mac_system_integrity_protection_modification_task_input::CreateMacSystemIntegrityProtectionModificationTaskInputBuilder;

pub use crate::operation::create_mac_system_integrity_protection_modification_task::_create_mac_system_integrity_protection_modification_task_output::CreateMacSystemIntegrityProtectionModificationTaskOutputBuilder;

impl crate::operation::create_mac_system_integrity_protection_modification_task::builders::CreateMacSystemIntegrityProtectionModificationTaskInputBuilder {
                    /// Sends a request with this input using the given client.
                    pub async fn send_with(self, client: &crate::Client) -> ::std::result::Result<
                        crate::operation::create_mac_system_integrity_protection_modification_task::CreateMacSystemIntegrityProtectionModificationTaskOutput,
                        ::aws_smithy_runtime_api::client::result::SdkError<
                            crate::operation::create_mac_system_integrity_protection_modification_task::CreateMacSystemIntegrityProtectionModificationTaskError,
                            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse
                        >
                    > {
                        let mut fluent_builder = client.create_mac_system_integrity_protection_modification_task();
                        fluent_builder.inner = self;
                        fluent_builder.send().await
                    }
                }
/// Fluent builder constructing a request to `CreateMacSystemIntegrityProtectionModificationTask`.
///
/// <p>Creates a System Integrity Protection (SIP) modification task to configure the SIP settings for an x86 Mac instance or Apple silicon Mac instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/mac-sip-settings.html#mac-sip-configure"> Configure SIP for Amazon EC2 instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
/// <p>When you configure the SIP settings for your instance, you can either enable or disable all SIP settings, or you can specify a custom SIP configuration that selectively enables or disables specific SIP settings.</p><note>
/// <p>If you implement a custom configuration, <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/mac-sip-settings.html#mac-sip-check-settings"> connect to the instance and verify the settings</a> to ensure that your requirements are properly implemented and functioning as intended.</p>
/// <p>SIP configurations might change with macOS updates. We recommend that you review custom SIP settings after any macOS version upgrade to ensure continued compatibility and proper functionality of your security configurations.</p>
/// </note>
/// <p>To enable or disable all SIP settings, use the <b>MacSystemIntegrityProtectionStatus</b> parameter only. For example, to enable all SIP settings, specify the following:</p>
/// <ul>
/// <li>
/// <p><code>MacSystemIntegrityProtectionStatus=enabled</code></p></li>
/// </ul>
/// <p>To specify a custom configuration that selectively enables or disables specific SIP settings, use the <b>MacSystemIntegrityProtectionStatus</b> parameter to enable or disable all SIP settings, and then use the <b>MacSystemIntegrityProtectionConfiguration</b> parameter to specify exceptions. In this case, the exceptions you specify for <b>MacSystemIntegrityProtectionConfiguration</b> override the value you specify for <b>MacSystemIntegrityProtectionStatus</b>. For example, to enable all SIP settings, except <code>NvramProtections</code>, specify the following:</p>
/// <ul>
/// <li>
/// <p><code>MacSystemIntegrityProtectionStatus=enabled</code></p></li>
/// <li>
/// <p><code>MacSystemIntegrityProtectionConfigurationRequest "NvramProtections=disabled"</code></p></li>
/// </ul>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct CreateMacSystemIntegrityProtectionModificationTaskFluentBuilder {
                handle: ::std::sync::Arc<crate::client::Handle>,
                inner: crate::operation::create_mac_system_integrity_protection_modification_task::builders::CreateMacSystemIntegrityProtectionModificationTaskInputBuilder,
config_override: ::std::option::Option<crate::config::Builder>,
            }
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::create_mac_system_integrity_protection_modification_task::CreateMacSystemIntegrityProtectionModificationTaskOutput,
        crate::operation::create_mac_system_integrity_protection_modification_task::CreateMacSystemIntegrityProtectionModificationTaskError,
    > for CreateMacSystemIntegrityProtectionModificationTaskFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::create_mac_system_integrity_protection_modification_task::CreateMacSystemIntegrityProtectionModificationTaskOutput,
            crate::operation::create_mac_system_integrity_protection_modification_task::CreateMacSystemIntegrityProtectionModificationTaskError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl CreateMacSystemIntegrityProtectionModificationTaskFluentBuilder {
    /// Creates a new `CreateMacSystemIntegrityProtectionModificationTaskFluentBuilder`.
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
        Self {
            handle,
            inner: ::std::default::Default::default(),
            config_override: ::std::option::Option::None,
        }
    }
    /// Access the CreateMacSystemIntegrityProtectionModificationTask as a reference.
    pub fn as_input(&self) -> &crate::operation::create_mac_system_integrity_protection_modification_task::builders::CreateMacSystemIntegrityProtectionModificationTaskInputBuilder{
        &self.inner
    }
    /// 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](aws_smithy_types::retry::RetryConfig), which can be
    /// set when configuring the client.
    pub async fn send(
        self,
    ) -> ::std::result::Result<
        crate::operation::create_mac_system_integrity_protection_modification_task::CreateMacSystemIntegrityProtectionModificationTaskOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::create_mac_system_integrity_protection_modification_task::CreateMacSystemIntegrityProtectionModificationTaskError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let input = self
            .inner
            .build()
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
        let runtime_plugins = crate::operation::create_mac_system_integrity_protection_modification_task::CreateMacSystemIntegrityProtectionModificationTask::operation_runtime_plugins(
                            self.handle.runtime_plugins.clone(),
                            &self.handle.conf,
                            self.config_override,
                        );
        crate::operation::create_mac_system_integrity_protection_modification_task::CreateMacSystemIntegrityProtectionModificationTask::orchestrate(
            &runtime_plugins,
            input,
        )
        .await
    }

    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
    pub fn customize(
        self,
    ) -> crate::client::customize::CustomizableOperation<
        crate::operation::create_mac_system_integrity_protection_modification_task::CreateMacSystemIntegrityProtectionModificationTaskOutput,
        crate::operation::create_mac_system_integrity_protection_modification_task::CreateMacSystemIntegrityProtectionModificationTaskError,
        Self,
    > {
        crate::client::customize::CustomizableOperation::new(self)
    }
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
        self.set_config_override(::std::option::Option::Some(config_override.into()));
        self
    }

    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
        self.config_override = config_override;
        self
    }
    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring Idempotency</a>.</p>
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.client_token(input.into());
        self
    }
    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring Idempotency</a>.</p>
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_client_token(input);
        self
    }
    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring Idempotency</a>.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_client_token()
    }
    /// <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>
    pub fn dry_run(mut self, input: bool) -> Self {
        self.inner = self.inner.dry_run(input);
        self
    }
    /// <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>
    pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
        self.inner = self.inner.set_dry_run(input);
        self
    }
    /// <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>
    pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
        self.inner.get_dry_run()
    }
    /// <p>The ID of the Amazon EC2 Mac instance.</p>
    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.instance_id(input.into());
        self
    }
    /// <p>The ID of the Amazon EC2 Mac instance.</p>
    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_instance_id(input);
        self
    }
    /// <p>The ID of the Amazon EC2 Mac instance.</p>
    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_instance_id()
    }
    /// <p><b>\[Apple silicon Mac instances only\]</b> Specifies the following credentials:</p>
    /// <ul>
    /// <li>
    /// <p><b>Internal disk administrative user</b></p>
    /// <ul>
    /// <li>
    /// <p><b>Username</b> - Only the default administrative user (<code>aws-managed-user</code>) is supported and it is used by default. You can't specify a different administrative user.</p></li>
    /// <li>
    /// <p><b>Password</b> - If you did not change the default password for <code>aws-managed-user</code>, specify the default password, which is <i>blank</i>. Otherwise, specify your password.</p></li>
    /// </ul></li>
    /// <li>
    /// <p><b>Amazon EBS root volume administrative user</b></p>
    /// <ul>
    /// <li>
    /// <p><b>Username</b> - If you did not change the default administrative user, specify <code>ec2-user</code>. Otherwise, specify the username for your administrative user.</p></li>
    /// <li>
    /// <p><b>Password</b> - Specify the password for the administrative user.</p></li>
    /// </ul></li>
    /// </ul>
    /// <p>The credentials must be specified in the following JSON format:</p>
    /// <p><code>{ "internalDiskPassword":"<i>internal-disk-admin_password</i>", "rootVolumeUsername":"<i>root-volume-admin_username</i>", "rootVolumepassword":"<i>root-volume-admin_password</i>" }</code></p>
    pub fn mac_credentials(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.mac_credentials(input.into());
        self
    }
    /// <p><b>\[Apple silicon Mac instances only\]</b> Specifies the following credentials:</p>
    /// <ul>
    /// <li>
    /// <p><b>Internal disk administrative user</b></p>
    /// <ul>
    /// <li>
    /// <p><b>Username</b> - Only the default administrative user (<code>aws-managed-user</code>) is supported and it is used by default. You can't specify a different administrative user.</p></li>
    /// <li>
    /// <p><b>Password</b> - If you did not change the default password for <code>aws-managed-user</code>, specify the default password, which is <i>blank</i>. Otherwise, specify your password.</p></li>
    /// </ul></li>
    /// <li>
    /// <p><b>Amazon EBS root volume administrative user</b></p>
    /// <ul>
    /// <li>
    /// <p><b>Username</b> - If you did not change the default administrative user, specify <code>ec2-user</code>. Otherwise, specify the username for your administrative user.</p></li>
    /// <li>
    /// <p><b>Password</b> - Specify the password for the administrative user.</p></li>
    /// </ul></li>
    /// </ul>
    /// <p>The credentials must be specified in the following JSON format:</p>
    /// <p><code>{ "internalDiskPassword":"<i>internal-disk-admin_password</i>", "rootVolumeUsername":"<i>root-volume-admin_username</i>", "rootVolumepassword":"<i>root-volume-admin_password</i>" }</code></p>
    pub fn set_mac_credentials(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_mac_credentials(input);
        self
    }
    /// <p><b>\[Apple silicon Mac instances only\]</b> Specifies the following credentials:</p>
    /// <ul>
    /// <li>
    /// <p><b>Internal disk administrative user</b></p>
    /// <ul>
    /// <li>
    /// <p><b>Username</b> - Only the default administrative user (<code>aws-managed-user</code>) is supported and it is used by default. You can't specify a different administrative user.</p></li>
    /// <li>
    /// <p><b>Password</b> - If you did not change the default password for <code>aws-managed-user</code>, specify the default password, which is <i>blank</i>. Otherwise, specify your password.</p></li>
    /// </ul></li>
    /// <li>
    /// <p><b>Amazon EBS root volume administrative user</b></p>
    /// <ul>
    /// <li>
    /// <p><b>Username</b> - If you did not change the default administrative user, specify <code>ec2-user</code>. Otherwise, specify the username for your administrative user.</p></li>
    /// <li>
    /// <p><b>Password</b> - Specify the password for the administrative user.</p></li>
    /// </ul></li>
    /// </ul>
    /// <p>The credentials must be specified in the following JSON format:</p>
    /// <p><code>{ "internalDiskPassword":"<i>internal-disk-admin_password</i>", "rootVolumeUsername":"<i>root-volume-admin_username</i>", "rootVolumepassword":"<i>root-volume-admin_password</i>" }</code></p>
    pub fn get_mac_credentials(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_mac_credentials()
    }
    /// <p>Specifies the overrides to selectively enable or disable individual SIP settings. The individual settings you specify here override the overall SIP status you specify for <b>MacSystemIntegrityProtectionStatus</b>.</p>
    pub fn mac_system_integrity_protection_configuration(mut self, input: crate::types::MacSystemIntegrityProtectionConfigurationRequest) -> Self {
        self.inner = self.inner.mac_system_integrity_protection_configuration(input);
        self
    }
    /// <p>Specifies the overrides to selectively enable or disable individual SIP settings. The individual settings you specify here override the overall SIP status you specify for <b>MacSystemIntegrityProtectionStatus</b>.</p>
    pub fn set_mac_system_integrity_protection_configuration(
        mut self,
        input: ::std::option::Option<crate::types::MacSystemIntegrityProtectionConfigurationRequest>,
    ) -> Self {
        self.inner = self.inner.set_mac_system_integrity_protection_configuration(input);
        self
    }
    /// <p>Specifies the overrides to selectively enable or disable individual SIP settings. The individual settings you specify here override the overall SIP status you specify for <b>MacSystemIntegrityProtectionStatus</b>.</p>
    pub fn get_mac_system_integrity_protection_configuration(
        &self,
    ) -> &::std::option::Option<crate::types::MacSystemIntegrityProtectionConfigurationRequest> {
        self.inner.get_mac_system_integrity_protection_configuration()
    }
    /// <p>Specifies the overall SIP status for the instance. To enable all SIP settings, specify <code>enabled</code>. To disable all SIP settings, specify <code>disabled</code>.</p>
    pub fn mac_system_integrity_protection_status(mut self, input: crate::types::MacSystemIntegrityProtectionSettingStatus) -> Self {
        self.inner = self.inner.mac_system_integrity_protection_status(input);
        self
    }
    /// <p>Specifies the overall SIP status for the instance. To enable all SIP settings, specify <code>enabled</code>. To disable all SIP settings, specify <code>disabled</code>.</p>
    pub fn set_mac_system_integrity_protection_status(
        mut self,
        input: ::std::option::Option<crate::types::MacSystemIntegrityProtectionSettingStatus>,
    ) -> Self {
        self.inner = self.inner.set_mac_system_integrity_protection_status(input);
        self
    }
    /// <p>Specifies the overall SIP status for the instance. To enable all SIP settings, specify <code>enabled</code>. To disable all SIP settings, specify <code>disabled</code>.</p>
    pub fn get_mac_system_integrity_protection_status(&self) -> &::std::option::Option<crate::types::MacSystemIntegrityProtectionSettingStatus> {
        self.inner.get_mac_system_integrity_protection_status()
    }
    ///
    /// Appends an item to `TagSpecifications`.
    ///
    /// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
    ///
    /// <p>Specifies tags to apply to the SIP modification task.</p>
    pub fn tag_specifications(mut self, input: crate::types::TagSpecification) -> Self {
        self.inner = self.inner.tag_specifications(input);
        self
    }
    /// <p>Specifies tags to apply to the SIP modification task.</p>
    pub fn set_tag_specifications(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>>) -> Self {
        self.inner = self.inner.set_tag_specifications(input);
        self
    }
    /// <p>Specifies tags to apply to the SIP modification task.</p>
    pub fn get_tag_specifications(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>> {
        self.inner.get_tag_specifications()
    }
}