aws_sdk_cloudhsmv2/operation/initialize_cluster/_initialize_cluster_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 InitializeClusterInput {
6 /// <p>The identifier (ID) of the cluster that you are claiming. To find the cluster ID, use <code>DescribeClusters</code>.</p>
7 pub cluster_id: ::std::option::Option<::std::string::String>,
8 /// <p>The cluster certificate issued (signed) by your issuing certificate authority (CA). The certificate must be in PEM format and can contain a maximum of 5000 characters.</p>
9 pub signed_cert: ::std::option::Option<::std::string::String>,
10 /// <p>The issuing certificate of the issuing certificate authority (CA) that issued (signed) the cluster certificate. You must use a self-signed certificate. The certificate used to sign the HSM CSR must be directly available, and thus must be the root certificate. The certificate must be in PEM format and can contain a maximum of 5000 characters.</p>
11 pub trust_anchor: ::std::option::Option<::std::string::String>,
12}
13impl InitializeClusterInput {
14 /// <p>The identifier (ID) of the cluster that you are claiming. To find the cluster ID, use <code>DescribeClusters</code>.</p>
15 pub fn cluster_id(&self) -> ::std::option::Option<&str> {
16 self.cluster_id.as_deref()
17 }
18 /// <p>The cluster certificate issued (signed) by your issuing certificate authority (CA). The certificate must be in PEM format and can contain a maximum of 5000 characters.</p>
19 pub fn signed_cert(&self) -> ::std::option::Option<&str> {
20 self.signed_cert.as_deref()
21 }
22 /// <p>The issuing certificate of the issuing certificate authority (CA) that issued (signed) the cluster certificate. You must use a self-signed certificate. The certificate used to sign the HSM CSR must be directly available, and thus must be the root certificate. The certificate must be in PEM format and can contain a maximum of 5000 characters.</p>
23 pub fn trust_anchor(&self) -> ::std::option::Option<&str> {
24 self.trust_anchor.as_deref()
25 }
26}
27impl InitializeClusterInput {
28 /// Creates a new builder-style object to manufacture [`InitializeClusterInput`](crate::operation::initialize_cluster::InitializeClusterInput).
29 pub fn builder() -> crate::operation::initialize_cluster::builders::InitializeClusterInputBuilder {
30 crate::operation::initialize_cluster::builders::InitializeClusterInputBuilder::default()
31 }
32}
33
34/// A builder for [`InitializeClusterInput`](crate::operation::initialize_cluster::InitializeClusterInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct InitializeClusterInputBuilder {
38 pub(crate) cluster_id: ::std::option::Option<::std::string::String>,
39 pub(crate) signed_cert: ::std::option::Option<::std::string::String>,
40 pub(crate) trust_anchor: ::std::option::Option<::std::string::String>,
41}
42impl InitializeClusterInputBuilder {
43 /// <p>The identifier (ID) of the cluster that you are claiming. To find the cluster ID, use <code>DescribeClusters</code>.</p>
44 /// This field is required.
45 pub fn cluster_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46 self.cluster_id = ::std::option::Option::Some(input.into());
47 self
48 }
49 /// <p>The identifier (ID) of the cluster that you are claiming. To find the cluster ID, use <code>DescribeClusters</code>.</p>
50 pub fn set_cluster_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51 self.cluster_id = input;
52 self
53 }
54 /// <p>The identifier (ID) of the cluster that you are claiming. To find the cluster ID, use <code>DescribeClusters</code>.</p>
55 pub fn get_cluster_id(&self) -> &::std::option::Option<::std::string::String> {
56 &self.cluster_id
57 }
58 /// <p>The cluster certificate issued (signed) by your issuing certificate authority (CA). The certificate must be in PEM format and can contain a maximum of 5000 characters.</p>
59 /// This field is required.
60 pub fn signed_cert(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61 self.signed_cert = ::std::option::Option::Some(input.into());
62 self
63 }
64 /// <p>The cluster certificate issued (signed) by your issuing certificate authority (CA). The certificate must be in PEM format and can contain a maximum of 5000 characters.</p>
65 pub fn set_signed_cert(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66 self.signed_cert = input;
67 self
68 }
69 /// <p>The cluster certificate issued (signed) by your issuing certificate authority (CA). The certificate must be in PEM format and can contain a maximum of 5000 characters.</p>
70 pub fn get_signed_cert(&self) -> &::std::option::Option<::std::string::String> {
71 &self.signed_cert
72 }
73 /// <p>The issuing certificate of the issuing certificate authority (CA) that issued (signed) the cluster certificate. You must use a self-signed certificate. The certificate used to sign the HSM CSR must be directly available, and thus must be the root certificate. The certificate must be in PEM format and can contain a maximum of 5000 characters.</p>
74 /// This field is required.
75 pub fn trust_anchor(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
76 self.trust_anchor = ::std::option::Option::Some(input.into());
77 self
78 }
79 /// <p>The issuing certificate of the issuing certificate authority (CA) that issued (signed) the cluster certificate. You must use a self-signed certificate. The certificate used to sign the HSM CSR must be directly available, and thus must be the root certificate. The certificate must be in PEM format and can contain a maximum of 5000 characters.</p>
80 pub fn set_trust_anchor(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
81 self.trust_anchor = input;
82 self
83 }
84 /// <p>The issuing certificate of the issuing certificate authority (CA) that issued (signed) the cluster certificate. You must use a self-signed certificate. The certificate used to sign the HSM CSR must be directly available, and thus must be the root certificate. The certificate must be in PEM format and can contain a maximum of 5000 characters.</p>
85 pub fn get_trust_anchor(&self) -> &::std::option::Option<::std::string::String> {
86 &self.trust_anchor
87 }
88 /// Consumes the builder and constructs a [`InitializeClusterInput`](crate::operation::initialize_cluster::InitializeClusterInput).
89 pub fn build(
90 self,
91 ) -> ::std::result::Result<crate::operation::initialize_cluster::InitializeClusterInput, ::aws_smithy_types::error::operation::BuildError> {
92 ::std::result::Result::Ok(crate::operation::initialize_cluster::InitializeClusterInput {
93 cluster_id: self.cluster_id,
94 signed_cert: self.signed_cert,
95 trust_anchor: self.trust_anchor,
96 })
97 }
98}