aws_sdk_acmpca/operation/delete_permission/_delete_permission_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 DeletePermissionInput {
6 /// <p>The Amazon Resource Number (ARN) of the private CA that issued the permissions. You can find the CA's ARN by calling the <a href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_ListCertificateAuthorities.html">ListCertificateAuthorities</a> action. This must have the following form:</p>
7 /// <p><code>arn:aws:acm-pca:<i>region</i>:<i>account</i>:certificate-authority/<i>12345678-1234-1234-1234-123456789012</i> </code>.</p>
8 pub certificate_authority_arn: ::std::option::Option<::std::string::String>,
9 /// <p>The Amazon Web Services service or identity that will have its CA permissions revoked. At this time, the only valid service principal is <code>acm.amazonaws.com</code></p>
10 pub principal: ::std::option::Option<::std::string::String>,
11 /// <p>The Amazon Web Services account that calls this action.</p>
12 pub source_account: ::std::option::Option<::std::string::String>,
13}
14impl DeletePermissionInput {
15 /// <p>The Amazon Resource Number (ARN) of the private CA that issued the permissions. You can find the CA's ARN by calling the <a href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_ListCertificateAuthorities.html">ListCertificateAuthorities</a> action. This must have the following form:</p>
16 /// <p><code>arn:aws:acm-pca:<i>region</i>:<i>account</i>:certificate-authority/<i>12345678-1234-1234-1234-123456789012</i> </code>.</p>
17 pub fn certificate_authority_arn(&self) -> ::std::option::Option<&str> {
18 self.certificate_authority_arn.as_deref()
19 }
20 /// <p>The Amazon Web Services service or identity that will have its CA permissions revoked. At this time, the only valid service principal is <code>acm.amazonaws.com</code></p>
21 pub fn principal(&self) -> ::std::option::Option<&str> {
22 self.principal.as_deref()
23 }
24 /// <p>The Amazon Web Services account that calls this action.</p>
25 pub fn source_account(&self) -> ::std::option::Option<&str> {
26 self.source_account.as_deref()
27 }
28}
29impl DeletePermissionInput {
30 /// Creates a new builder-style object to manufacture [`DeletePermissionInput`](crate::operation::delete_permission::DeletePermissionInput).
31 pub fn builder() -> crate::operation::delete_permission::builders::DeletePermissionInputBuilder {
32 crate::operation::delete_permission::builders::DeletePermissionInputBuilder::default()
33 }
34}
35
36/// A builder for [`DeletePermissionInput`](crate::operation::delete_permission::DeletePermissionInput).
37#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
38#[non_exhaustive]
39pub struct DeletePermissionInputBuilder {
40 pub(crate) certificate_authority_arn: ::std::option::Option<::std::string::String>,
41 pub(crate) principal: ::std::option::Option<::std::string::String>,
42 pub(crate) source_account: ::std::option::Option<::std::string::String>,
43}
44impl DeletePermissionInputBuilder {
45 /// <p>The Amazon Resource Number (ARN) of the private CA that issued the permissions. You can find the CA's ARN by calling the <a href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_ListCertificateAuthorities.html">ListCertificateAuthorities</a> action. This must have the following form:</p>
46 /// <p><code>arn:aws:acm-pca:<i>region</i>:<i>account</i>:certificate-authority/<i>12345678-1234-1234-1234-123456789012</i> </code>.</p>
47 /// This field is required.
48 pub fn certificate_authority_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
49 self.certificate_authority_arn = ::std::option::Option::Some(input.into());
50 self
51 }
52 /// <p>The Amazon Resource Number (ARN) of the private CA that issued the permissions. You can find the CA's ARN by calling the <a href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_ListCertificateAuthorities.html">ListCertificateAuthorities</a> action. This must have the following form:</p>
53 /// <p><code>arn:aws:acm-pca:<i>region</i>:<i>account</i>:certificate-authority/<i>12345678-1234-1234-1234-123456789012</i> </code>.</p>
54 pub fn set_certificate_authority_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
55 self.certificate_authority_arn = input;
56 self
57 }
58 /// <p>The Amazon Resource Number (ARN) of the private CA that issued the permissions. You can find the CA's ARN by calling the <a href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_ListCertificateAuthorities.html">ListCertificateAuthorities</a> action. This must have the following form:</p>
59 /// <p><code>arn:aws:acm-pca:<i>region</i>:<i>account</i>:certificate-authority/<i>12345678-1234-1234-1234-123456789012</i> </code>.</p>
60 pub fn get_certificate_authority_arn(&self) -> &::std::option::Option<::std::string::String> {
61 &self.certificate_authority_arn
62 }
63 /// <p>The Amazon Web Services service or identity that will have its CA permissions revoked. At this time, the only valid service principal is <code>acm.amazonaws.com</code></p>
64 /// This field is required.
65 pub fn principal(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
66 self.principal = ::std::option::Option::Some(input.into());
67 self
68 }
69 /// <p>The Amazon Web Services service or identity that will have its CA permissions revoked. At this time, the only valid service principal is <code>acm.amazonaws.com</code></p>
70 pub fn set_principal(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
71 self.principal = input;
72 self
73 }
74 /// <p>The Amazon Web Services service or identity that will have its CA permissions revoked. At this time, the only valid service principal is <code>acm.amazonaws.com</code></p>
75 pub fn get_principal(&self) -> &::std::option::Option<::std::string::String> {
76 &self.principal
77 }
78 /// <p>The Amazon Web Services account that calls this action.</p>
79 pub fn source_account(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
80 self.source_account = ::std::option::Option::Some(input.into());
81 self
82 }
83 /// <p>The Amazon Web Services account that calls this action.</p>
84 pub fn set_source_account(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
85 self.source_account = input;
86 self
87 }
88 /// <p>The Amazon Web Services account that calls this action.</p>
89 pub fn get_source_account(&self) -> &::std::option::Option<::std::string::String> {
90 &self.source_account
91 }
92 /// Consumes the builder and constructs a [`DeletePermissionInput`](crate::operation::delete_permission::DeletePermissionInput).
93 pub fn build(
94 self,
95 ) -> ::std::result::Result<crate::operation::delete_permission::DeletePermissionInput, ::aws_smithy_types::error::operation::BuildError> {
96 ::std::result::Result::Ok(crate::operation::delete_permission::DeletePermissionInput {
97 certificate_authority_arn: self.certificate_authority_arn,
98 principal: self.principal,
99 source_account: self.source_account,
100 })
101 }
102}