aws-sdk-ssm 1.112.0

AWS SDK for Amazon Simple Systems Manager (SSM)
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::update_ops_item::_update_ops_item_input::UpdateOpsItemInputBuilder;

pub use crate::operation::update_ops_item::_update_ops_item_output::UpdateOpsItemOutputBuilder;

impl crate::operation::update_ops_item::builders::UpdateOpsItemInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::update_ops_item::UpdateOpsItemOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_ops_item::UpdateOpsItemError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.update_ops_item();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `UpdateOpsItem`.
///
/// <p>Edit or change an OpsItem. You must have permission in Identity and Access Management (IAM) to update an OpsItem. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-setup.html">Set up OpsCenter</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
/// <p>Operations engineers and IT professionals use Amazon Web Services Systems Manager OpsCenter to view, investigate, and remediate operational issues impacting the performance and health of their Amazon Web Services resources. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter.html">Amazon Web Services Systems Manager OpsCenter</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct UpdateOpsItemFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::update_ops_item::builders::UpdateOpsItemInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::update_ops_item::UpdateOpsItemOutput,
        crate::operation::update_ops_item::UpdateOpsItemError,
    > for UpdateOpsItemFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::update_ops_item::UpdateOpsItemOutput,
            crate::operation::update_ops_item::UpdateOpsItemError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl UpdateOpsItemFluentBuilder {
    /// Creates a new `UpdateOpsItemFluentBuilder`.
    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 UpdateOpsItem as a reference.
    pub fn as_input(&self) -> &crate::operation::update_ops_item::builders::UpdateOpsItemInputBuilder {
        &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::update_ops_item::UpdateOpsItemOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_ops_item::UpdateOpsItemError,
            ::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::update_ops_item::UpdateOpsItem::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::update_ops_item::UpdateOpsItem::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::update_ops_item::UpdateOpsItemOutput,
        crate::operation::update_ops_item::UpdateOpsItemError,
        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>User-defined text that contains information about the OpsItem, in Markdown format.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.description(input.into());
        self
    }
    /// <p>User-defined text that contains information about the OpsItem, in Markdown format.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_description(input);
        self
    }
    /// <p>User-defined text that contains information about the OpsItem, in Markdown format.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_description()
    }
    ///
    /// Adds a key-value pair to `OperationalData`.
    ///
    /// To override the contents of this collection use [`set_operational_data`](Self::set_operational_data).
    ///
    /// <p>Add new keys or edit existing key-value pairs of the OperationalData map in the OpsItem object.</p>
    /// <p>Operational data is custom data that provides useful reference details about the OpsItem. For example, you can specify log files, error strings, license keys, troubleshooting tips, or other relevant data. You enter operational data as key-value pairs. The key has a maximum length of 128 characters. The value has a maximum size of 20 KB.</p><important>
    /// <p>Operational data keys <i>can't</i> begin with the following: <code>amazon</code>, <code>aws</code>, <code>amzn</code>, <code>ssm</code>, <code>/amazon</code>, <code>/aws</code>, <code>/amzn</code>, <code>/ssm</code>.</p>
    /// </important>
    /// <p>You can choose to make the data searchable by other users in the account or you can restrict search access. Searchable data means that all users with access to the OpsItem Overview page (as provided by the <code>DescribeOpsItems</code> API operation) can view and search on the specified data. Operational data that isn't searchable is only viewable by users who have access to the OpsItem (as provided by the <code>GetOpsItem</code> API operation).</p>
    /// <p>Use the <code>/aws/resources</code> key in OperationalData to specify a related resource in the request. Use the <code>/aws/automations</code> key in OperationalData to associate an Automation runbook with the OpsItem. To view Amazon Web Services CLI example commands that use these keys, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-manually-create-OpsItems.html">Creating OpsItems manually</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
    pub fn operational_data(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::OpsItemDataValue) -> Self {
        self.inner = self.inner.operational_data(k.into(), v);
        self
    }
    /// <p>Add new keys or edit existing key-value pairs of the OperationalData map in the OpsItem object.</p>
    /// <p>Operational data is custom data that provides useful reference details about the OpsItem. For example, you can specify log files, error strings, license keys, troubleshooting tips, or other relevant data. You enter operational data as key-value pairs. The key has a maximum length of 128 characters. The value has a maximum size of 20 KB.</p><important>
    /// <p>Operational data keys <i>can't</i> begin with the following: <code>amazon</code>, <code>aws</code>, <code>amzn</code>, <code>ssm</code>, <code>/amazon</code>, <code>/aws</code>, <code>/amzn</code>, <code>/ssm</code>.</p>
    /// </important>
    /// <p>You can choose to make the data searchable by other users in the account or you can restrict search access. Searchable data means that all users with access to the OpsItem Overview page (as provided by the <code>DescribeOpsItems</code> API operation) can view and search on the specified data. Operational data that isn't searchable is only viewable by users who have access to the OpsItem (as provided by the <code>GetOpsItem</code> API operation).</p>
    /// <p>Use the <code>/aws/resources</code> key in OperationalData to specify a related resource in the request. Use the <code>/aws/automations</code> key in OperationalData to associate an Automation runbook with the OpsItem. To view Amazon Web Services CLI example commands that use these keys, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-manually-create-OpsItems.html">Creating OpsItems manually</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
    pub fn set_operational_data(
        mut self,
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::OpsItemDataValue>>,
    ) -> Self {
        self.inner = self.inner.set_operational_data(input);
        self
    }
    /// <p>Add new keys or edit existing key-value pairs of the OperationalData map in the OpsItem object.</p>
    /// <p>Operational data is custom data that provides useful reference details about the OpsItem. For example, you can specify log files, error strings, license keys, troubleshooting tips, or other relevant data. You enter operational data as key-value pairs. The key has a maximum length of 128 characters. The value has a maximum size of 20 KB.</p><important>
    /// <p>Operational data keys <i>can't</i> begin with the following: <code>amazon</code>, <code>aws</code>, <code>amzn</code>, <code>ssm</code>, <code>/amazon</code>, <code>/aws</code>, <code>/amzn</code>, <code>/ssm</code>.</p>
    /// </important>
    /// <p>You can choose to make the data searchable by other users in the account or you can restrict search access. Searchable data means that all users with access to the OpsItem Overview page (as provided by the <code>DescribeOpsItems</code> API operation) can view and search on the specified data. Operational data that isn't searchable is only viewable by users who have access to the OpsItem (as provided by the <code>GetOpsItem</code> API operation).</p>
    /// <p>Use the <code>/aws/resources</code> key in OperationalData to specify a related resource in the request. Use the <code>/aws/automations</code> key in OperationalData to associate an Automation runbook with the OpsItem. To view Amazon Web Services CLI example commands that use these keys, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-manually-create-OpsItems.html">Creating OpsItems manually</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
    pub fn get_operational_data(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::OpsItemDataValue>> {
        self.inner.get_operational_data()
    }
    ///
    /// Appends an item to `OperationalDataToDelete`.
    ///
    /// To override the contents of this collection use [`set_operational_data_to_delete`](Self::set_operational_data_to_delete).
    ///
    /// <p>Keys that you want to remove from the OperationalData map.</p>
    pub fn operational_data_to_delete(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.operational_data_to_delete(input.into());
        self
    }
    /// <p>Keys that you want to remove from the OperationalData map.</p>
    pub fn set_operational_data_to_delete(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.inner = self.inner.set_operational_data_to_delete(input);
        self
    }
    /// <p>Keys that you want to remove from the OperationalData map.</p>
    pub fn get_operational_data_to_delete(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        self.inner.get_operational_data_to_delete()
    }
    ///
    /// Appends an item to `Notifications`.
    ///
    /// To override the contents of this collection use [`set_notifications`](Self::set_notifications).
    ///
    /// <p>The Amazon Resource Name (ARN) of an SNS topic where notifications are sent when this OpsItem is edited or changed.</p>
    pub fn notifications(mut self, input: crate::types::OpsItemNotification) -> Self {
        self.inner = self.inner.notifications(input);
        self
    }
    /// <p>The Amazon Resource Name (ARN) of an SNS topic where notifications are sent when this OpsItem is edited or changed.</p>
    pub fn set_notifications(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::OpsItemNotification>>) -> Self {
        self.inner = self.inner.set_notifications(input);
        self
    }
    /// <p>The Amazon Resource Name (ARN) of an SNS topic where notifications are sent when this OpsItem is edited or changed.</p>
    pub fn get_notifications(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::OpsItemNotification>> {
        self.inner.get_notifications()
    }
    /// <p>The importance of this OpsItem in relation to other OpsItems in the system.</p>
    pub fn priority(mut self, input: i32) -> Self {
        self.inner = self.inner.priority(input);
        self
    }
    /// <p>The importance of this OpsItem in relation to other OpsItems in the system.</p>
    pub fn set_priority(mut self, input: ::std::option::Option<i32>) -> Self {
        self.inner = self.inner.set_priority(input);
        self
    }
    /// <p>The importance of this OpsItem in relation to other OpsItems in the system.</p>
    pub fn get_priority(&self) -> &::std::option::Option<i32> {
        self.inner.get_priority()
    }
    ///
    /// Appends an item to `RelatedOpsItems`.
    ///
    /// To override the contents of this collection use [`set_related_ops_items`](Self::set_related_ops_items).
    ///
    /// <p>One or more OpsItems that share something in common with the current OpsItems. For example, related OpsItems can include OpsItems with similar error messages, impacted resources, or statuses for the impacted resource.</p>
    pub fn related_ops_items(mut self, input: crate::types::RelatedOpsItem) -> Self {
        self.inner = self.inner.related_ops_items(input);
        self
    }
    /// <p>One or more OpsItems that share something in common with the current OpsItems. For example, related OpsItems can include OpsItems with similar error messages, impacted resources, or statuses for the impacted resource.</p>
    pub fn set_related_ops_items(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::RelatedOpsItem>>) -> Self {
        self.inner = self.inner.set_related_ops_items(input);
        self
    }
    /// <p>One or more OpsItems that share something in common with the current OpsItems. For example, related OpsItems can include OpsItems with similar error messages, impacted resources, or statuses for the impacted resource.</p>
    pub fn get_related_ops_items(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::RelatedOpsItem>> {
        self.inner.get_related_ops_items()
    }
    /// <p>The OpsItem status. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-working-with-OpsItems-editing-details.html">Editing OpsItem details</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
    pub fn status(mut self, input: crate::types::OpsItemStatus) -> Self {
        self.inner = self.inner.status(input);
        self
    }
    /// <p>The OpsItem status. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-working-with-OpsItems-editing-details.html">Editing OpsItem details</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::OpsItemStatus>) -> Self {
        self.inner = self.inner.set_status(input);
        self
    }
    /// <p>The OpsItem status. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-working-with-OpsItems-editing-details.html">Editing OpsItem details</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::OpsItemStatus> {
        self.inner.get_status()
    }
    /// <p>The ID of the OpsItem.</p>
    pub fn ops_item_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.ops_item_id(input.into());
        self
    }
    /// <p>The ID of the OpsItem.</p>
    pub fn set_ops_item_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_ops_item_id(input);
        self
    }
    /// <p>The ID of the OpsItem.</p>
    pub fn get_ops_item_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_ops_item_id()
    }
    /// <p>A short heading that describes the nature of the OpsItem and the impacted resource.</p>
    pub fn title(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.title(input.into());
        self
    }
    /// <p>A short heading that describes the nature of the OpsItem and the impacted resource.</p>
    pub fn set_title(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_title(input);
        self
    }
    /// <p>A short heading that describes the nature of the OpsItem and the impacted resource.</p>
    pub fn get_title(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_title()
    }
    /// <p>Specify a new category for an OpsItem.</p>
    pub fn category(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.category(input.into());
        self
    }
    /// <p>Specify a new category for an OpsItem.</p>
    pub fn set_category(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_category(input);
        self
    }
    /// <p>Specify a new category for an OpsItem.</p>
    pub fn get_category(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_category()
    }
    /// <p>Specify a new severity for an OpsItem.</p>
    pub fn severity(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.severity(input.into());
        self
    }
    /// <p>Specify a new severity for an OpsItem.</p>
    pub fn set_severity(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_severity(input);
        self
    }
    /// <p>Specify a new severity for an OpsItem.</p>
    pub fn get_severity(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_severity()
    }
    /// <p>The time a runbook workflow started. Currently reported only for the OpsItem type <code>/aws/changerequest</code>.</p>
    pub fn actual_start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.inner = self.inner.actual_start_time(input);
        self
    }
    /// <p>The time a runbook workflow started. Currently reported only for the OpsItem type <code>/aws/changerequest</code>.</p>
    pub fn set_actual_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.inner = self.inner.set_actual_start_time(input);
        self
    }
    /// <p>The time a runbook workflow started. Currently reported only for the OpsItem type <code>/aws/changerequest</code>.</p>
    pub fn get_actual_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        self.inner.get_actual_start_time()
    }
    /// <p>The time a runbook workflow ended. Currently reported only for the OpsItem type <code>/aws/changerequest</code>.</p>
    pub fn actual_end_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.inner = self.inner.actual_end_time(input);
        self
    }
    /// <p>The time a runbook workflow ended. Currently reported only for the OpsItem type <code>/aws/changerequest</code>.</p>
    pub fn set_actual_end_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.inner = self.inner.set_actual_end_time(input);
        self
    }
    /// <p>The time a runbook workflow ended. Currently reported only for the OpsItem type <code>/aws/changerequest</code>.</p>
    pub fn get_actual_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        self.inner.get_actual_end_time()
    }
    /// <p>The time specified in a change request for a runbook workflow to start. Currently supported only for the OpsItem type <code>/aws/changerequest</code>.</p>
    pub fn planned_start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.inner = self.inner.planned_start_time(input);
        self
    }
    /// <p>The time specified in a change request for a runbook workflow to start. Currently supported only for the OpsItem type <code>/aws/changerequest</code>.</p>
    pub fn set_planned_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.inner = self.inner.set_planned_start_time(input);
        self
    }
    /// <p>The time specified in a change request for a runbook workflow to start. Currently supported only for the OpsItem type <code>/aws/changerequest</code>.</p>
    pub fn get_planned_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        self.inner.get_planned_start_time()
    }
    /// <p>The time specified in a change request for a runbook workflow to end. Currently supported only for the OpsItem type <code>/aws/changerequest</code>.</p>
    pub fn planned_end_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.inner = self.inner.planned_end_time(input);
        self
    }
    /// <p>The time specified in a change request for a runbook workflow to end. Currently supported only for the OpsItem type <code>/aws/changerequest</code>.</p>
    pub fn set_planned_end_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.inner = self.inner.set_planned_end_time(input);
        self
    }
    /// <p>The time specified in a change request for a runbook workflow to end. Currently supported only for the OpsItem type <code>/aws/changerequest</code>.</p>
    pub fn get_planned_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        self.inner.get_planned_end_time()
    }
    /// <p>The OpsItem Amazon Resource Name (ARN).</p>
    pub fn ops_item_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.ops_item_arn(input.into());
        self
    }
    /// <p>The OpsItem Amazon Resource Name (ARN).</p>
    pub fn set_ops_item_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_ops_item_arn(input);
        self
    }
    /// <p>The OpsItem Amazon Resource Name (ARN).</p>
    pub fn get_ops_item_arn(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_ops_item_arn()
    }
}