aws_sdk_ssm/operation/delete_association/
_delete_association_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DeleteAssociationInput {
6    /// <p>The name of the SSM document.</p>
7    pub name: ::std::option::Option<::std::string::String>,
8    /// <p>The managed node ID.</p><note>
9    /// <p><code>InstanceId</code> has been deprecated. To specify a managed node ID for an association, use the <code>Targets</code> parameter. Requests that include the parameter <code>InstanceID</code> with Systems Manager documents (SSM documents) that use schema version 2.0 or later will fail. In addition, if you use the parameter <code>InstanceId</code>, you can't use the parameters <code>AssociationName</code>, <code>DocumentVersion</code>, <code>MaxErrors</code>, <code>MaxConcurrency</code>, <code>OutputLocation</code>, or <code>ScheduleExpression</code>. To use these parameters, you must use the <code>Targets</code> parameter.</p>
10    /// </note>
11    pub instance_id: ::std::option::Option<::std::string::String>,
12    /// <p>The association ID that you want to delete.</p>
13    pub association_id: ::std::option::Option<::std::string::String>,
14}
15impl DeleteAssociationInput {
16    /// <p>The name of the SSM document.</p>
17    pub fn name(&self) -> ::std::option::Option<&str> {
18        self.name.as_deref()
19    }
20    /// <p>The managed node ID.</p><note>
21    /// <p><code>InstanceId</code> has been deprecated. To specify a managed node ID for an association, use the <code>Targets</code> parameter. Requests that include the parameter <code>InstanceID</code> with Systems Manager documents (SSM documents) that use schema version 2.0 or later will fail. In addition, if you use the parameter <code>InstanceId</code>, you can't use the parameters <code>AssociationName</code>, <code>DocumentVersion</code>, <code>MaxErrors</code>, <code>MaxConcurrency</code>, <code>OutputLocation</code>, or <code>ScheduleExpression</code>. To use these parameters, you must use the <code>Targets</code> parameter.</p>
22    /// </note>
23    pub fn instance_id(&self) -> ::std::option::Option<&str> {
24        self.instance_id.as_deref()
25    }
26    /// <p>The association ID that you want to delete.</p>
27    pub fn association_id(&self) -> ::std::option::Option<&str> {
28        self.association_id.as_deref()
29    }
30}
31impl DeleteAssociationInput {
32    /// Creates a new builder-style object to manufacture [`DeleteAssociationInput`](crate::operation::delete_association::DeleteAssociationInput).
33    pub fn builder() -> crate::operation::delete_association::builders::DeleteAssociationInputBuilder {
34        crate::operation::delete_association::builders::DeleteAssociationInputBuilder::default()
35    }
36}
37
38/// A builder for [`DeleteAssociationInput`](crate::operation::delete_association::DeleteAssociationInput).
39#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
40#[non_exhaustive]
41pub struct DeleteAssociationInputBuilder {
42    pub(crate) name: ::std::option::Option<::std::string::String>,
43    pub(crate) instance_id: ::std::option::Option<::std::string::String>,
44    pub(crate) association_id: ::std::option::Option<::std::string::String>,
45}
46impl DeleteAssociationInputBuilder {
47    /// <p>The name of the SSM document.</p>
48    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
49        self.name = ::std::option::Option::Some(input.into());
50        self
51    }
52    /// <p>The name of the SSM document.</p>
53    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
54        self.name = input;
55        self
56    }
57    /// <p>The name of the SSM document.</p>
58    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
59        &self.name
60    }
61    /// <p>The managed node ID.</p><note>
62    /// <p><code>InstanceId</code> has been deprecated. To specify a managed node ID for an association, use the <code>Targets</code> parameter. Requests that include the parameter <code>InstanceID</code> with Systems Manager documents (SSM documents) that use schema version 2.0 or later will fail. In addition, if you use the parameter <code>InstanceId</code>, you can't use the parameters <code>AssociationName</code>, <code>DocumentVersion</code>, <code>MaxErrors</code>, <code>MaxConcurrency</code>, <code>OutputLocation</code>, or <code>ScheduleExpression</code>. To use these parameters, you must use the <code>Targets</code> parameter.</p>
63    /// </note>
64    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
65        self.instance_id = ::std::option::Option::Some(input.into());
66        self
67    }
68    /// <p>The managed node ID.</p><note>
69    /// <p><code>InstanceId</code> has been deprecated. To specify a managed node ID for an association, use the <code>Targets</code> parameter. Requests that include the parameter <code>InstanceID</code> with Systems Manager documents (SSM documents) that use schema version 2.0 or later will fail. In addition, if you use the parameter <code>InstanceId</code>, you can't use the parameters <code>AssociationName</code>, <code>DocumentVersion</code>, <code>MaxErrors</code>, <code>MaxConcurrency</code>, <code>OutputLocation</code>, or <code>ScheduleExpression</code>. To use these parameters, you must use the <code>Targets</code> parameter.</p>
70    /// </note>
71    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72        self.instance_id = input;
73        self
74    }
75    /// <p>The managed node ID.</p><note>
76    /// <p><code>InstanceId</code> has been deprecated. To specify a managed node ID for an association, use the <code>Targets</code> parameter. Requests that include the parameter <code>InstanceID</code> with Systems Manager documents (SSM documents) that use schema version 2.0 or later will fail. In addition, if you use the parameter <code>InstanceId</code>, you can't use the parameters <code>AssociationName</code>, <code>DocumentVersion</code>, <code>MaxErrors</code>, <code>MaxConcurrency</code>, <code>OutputLocation</code>, or <code>ScheduleExpression</code>. To use these parameters, you must use the <code>Targets</code> parameter.</p>
77    /// </note>
78    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
79        &self.instance_id
80    }
81    /// <p>The association ID that you want to delete.</p>
82    pub fn association_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
83        self.association_id = ::std::option::Option::Some(input.into());
84        self
85    }
86    /// <p>The association ID that you want to delete.</p>
87    pub fn set_association_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
88        self.association_id = input;
89        self
90    }
91    /// <p>The association ID that you want to delete.</p>
92    pub fn get_association_id(&self) -> &::std::option::Option<::std::string::String> {
93        &self.association_id
94    }
95    /// Consumes the builder and constructs a [`DeleteAssociationInput`](crate::operation::delete_association::DeleteAssociationInput).
96    pub fn build(
97        self,
98    ) -> ::std::result::Result<crate::operation::delete_association::DeleteAssociationInput, ::aws_smithy_types::error::operation::BuildError> {
99        ::std::result::Result::Ok(crate::operation::delete_association::DeleteAssociationInput {
100            name: self.name,
101            instance_id: self.instance_id,
102            association_id: self.association_id,
103        })
104    }
105}