Struct aws_sdk_acm::client::Client
source · [−]pub struct Client { /* private fields */ }
Expand description
Client for AWS Certificate Manager
Client for invoking operations on AWS Certificate Manager. Each operation on AWS Certificate Manager is a method on this
this struct. .send()
MUST be invoked on the generated operations to dispatch the request to the service.
Examples
Constructing a client and invoking an operation
// create a shared configuration. This can be used & shared between multiple service clients.
let shared_config = aws_config::load_from_env().await;
let client = aws_sdk_acm::Client::new(&shared_config);
// invoke an operation
/* let rsp = client
.<operation_name>().
.<param>("some value")
.send().await; */
Constructing a client with custom configuration
use aws_config::RetryConfig;
let shared_config = aws_config::load_from_env().await;
let config = aws_sdk_acm::config::Builder::from(&shared_config)
.retry_config(RetryConfig::disabled())
.build();
let client = aws_sdk_acm::Client::from_conf(config);
Implementations
sourceimpl Client
impl Client
sourcepub fn with_config(
client: Client<DynConnector, DynMiddleware<DynConnector>>,
conf: Config
) -> Self
pub fn with_config(
client: Client<DynConnector, DynMiddleware<DynConnector>>,
conf: Config
) -> Self
Creates a client with the given service configuration.
sourceimpl Client
impl Client
Constructs a fluent builder for the AddTagsToCertificate
operation.
- The fluent builder is configurable:
certificate_arn(impl Into<String>)
/set_certificate_arn(Option<String>)
:String that contains the ARN of the ACM certificate to which the tag is to be applied. This must be of the form:
arn:aws:acm:region:123456789012:certificate/12345678-1234-1234-1234-123456789012
For more information about ARNs, see Amazon Resource Names (ARNs).
tags(Vec<Tag>)
/set_tags(Option<Vec<Tag>>)
:The key-value pair that defines the tag. The tag value is optional.
- On success, responds with
AddTagsToCertificateOutput
- On failure, responds with
SdkError<AddTagsToCertificateError>
sourcepub fn delete_certificate(&self) -> DeleteCertificate
pub fn delete_certificate(&self) -> DeleteCertificate
Constructs a fluent builder for the DeleteCertificate
operation.
- The fluent builder is configurable:
certificate_arn(impl Into<String>)
/set_certificate_arn(Option<String>)
:String that contains the ARN of the ACM certificate to be deleted. This must be of the form:
arn:aws:acm:region:123456789012:certificate/12345678-1234-1234-1234-123456789012
For more information about ARNs, see Amazon Resource Names (ARNs).
- On success, responds with
DeleteCertificateOutput
- On failure, responds with
SdkError<DeleteCertificateError>
sourcepub fn describe_certificate(&self) -> DescribeCertificate
pub fn describe_certificate(&self) -> DescribeCertificate
Constructs a fluent builder for the DescribeCertificate
operation.
- The fluent builder is configurable:
certificate_arn(impl Into<String>)
/set_certificate_arn(Option<String>)
:The Amazon Resource Name (ARN) of the ACM certificate. The ARN must have the following form:
arn:aws:acm:region:123456789012:certificate/12345678-1234-1234-1234-123456789012
For more information about ARNs, see Amazon Resource Names (ARNs).
- On success, responds with
DescribeCertificateOutput
with field(s):certificate(Option<CertificateDetail>)
:Metadata about an ACM certificate.
- On failure, responds with
SdkError<DescribeCertificateError>
sourcepub fn export_certificate(&self) -> ExportCertificate
pub fn export_certificate(&self) -> ExportCertificate
Constructs a fluent builder for the ExportCertificate
operation.
- The fluent builder is configurable:
certificate_arn(impl Into<String>)
/set_certificate_arn(Option<String>)
:An Amazon Resource Name (ARN) of the issued certificate. This must be of the form:
arn:aws:acm:region:account:certificate/12345678-1234-1234-1234-123456789012
passphrase(Blob)
/set_passphrase(Option<Blob>)
:Passphrase to associate with the encrypted exported private key. If you want to later decrypt the private key, you must have the passphrase. You can use the following OpenSSL command to decrypt a private key:
openssl rsa -in encrypted_key.pem -out decrypted_key.pem
- On success, responds with
ExportCertificateOutput
with field(s):certificate(Option<String>)
:The base64 PEM-encoded certificate.
certificate_chain(Option<String>)
:The base64 PEM-encoded certificate chain. This does not include the certificate that you are exporting.
private_key(Option<String>)
:The encrypted private key associated with the public key in the certificate. The key is output in PKCS #8 format and is base64 PEM-encoded.
- On failure, responds with
SdkError<ExportCertificateError>
sourcepub fn get_account_configuration(&self) -> GetAccountConfiguration
pub fn get_account_configuration(&self) -> GetAccountConfiguration
Constructs a fluent builder for the GetAccountConfiguration
operation.
- The fluent builder takes no input, just
send
it. - On success, responds with
GetAccountConfigurationOutput
with field(s):expiry_events(Option<ExpiryEventsConfiguration>)
:Expiration events configuration options associated with the Amazon Web Services account.
- On failure, responds with
SdkError<GetAccountConfigurationError>
sourcepub fn get_certificate(&self) -> GetCertificate
pub fn get_certificate(&self) -> GetCertificate
Constructs a fluent builder for the GetCertificate
operation.
- The fluent builder is configurable:
certificate_arn(impl Into<String>)
/set_certificate_arn(Option<String>)
:String that contains a certificate ARN in the following format:
arn:aws:acm:region:123456789012:certificate/12345678-1234-1234-1234-123456789012
For more information about ARNs, see Amazon Resource Names (ARNs).
- On success, responds with
GetCertificateOutput
with field(s):certificate(Option<String>)
:The ACM-issued certificate corresponding to the ARN specified as input.
certificate_chain(Option<String>)
:Certificates forming the requested certificate’s chain of trust. The chain consists of the certificate of the issuing CA and the intermediate certificates of any other subordinate CAs.
- On failure, responds with
SdkError<GetCertificateError>
sourcepub fn import_certificate(&self) -> ImportCertificate
pub fn import_certificate(&self) -> ImportCertificate
Constructs a fluent builder for the ImportCertificate
operation.
- The fluent builder is configurable:
certificate_arn(impl Into<String>)
/set_certificate_arn(Option<String>)
:The Amazon Resource Name (ARN) of an imported certificate to replace. To import a new certificate, omit this field.
certificate(Blob)
/set_certificate(Option<Blob>)
:The certificate to import.
private_key(Blob)
/set_private_key(Option<Blob>)
:The private key that matches the public key in the certificate.
certificate_chain(Blob)
/set_certificate_chain(Option<Blob>)
:The PEM encoded certificate chain.
tags(Vec<Tag>)
/set_tags(Option<Vec<Tag>>)
:One or more resource tags to associate with the imported certificate.
Note: You cannot apply tags when reimporting a certificate.
- On success, responds with
ImportCertificateOutput
with field(s):certificate_arn(Option<String>)
:The Amazon Resource Name (ARN) of the imported certificate.
- On failure, responds with
SdkError<ImportCertificateError>
sourcepub fn list_certificates(&self) -> ListCertificates
pub fn list_certificates(&self) -> ListCertificates
Constructs a fluent builder for the ListCertificates
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
certificate_statuses(Vec<CertificateStatus>)
/set_certificate_statuses(Option<Vec<CertificateStatus>>)
:Filter the certificate list by status value.
includes(Filters)
/set_includes(Option<Filters>)
:Filter the certificate list. For more information, see the
Filters
structure.next_token(impl Into<String>)
/set_next_token(Option<String>)
:Use this parameter only when paginating results and only in a subsequent request after you receive a response with truncated results. Set it to the value of
NextToken
from the response you just received.max_items(i32)
/set_max_items(Option<i32>)
:Use this parameter when paginating results to specify the maximum number of items to return in the response. If additional items exist beyond the number you specify, the
NextToken
element is sent in the response. Use thisNextToken
value in a subsequent request to retrieve additional items.
- On success, responds with
ListCertificatesOutput
with field(s):next_token(Option<String>)
:When the list is truncated, this value is present and contains the value to use for the
NextToken
parameter in a subsequent pagination request.certificate_summary_list(Option<Vec<CertificateSummary>>)
:A list of ACM certificates.
- On failure, responds with
SdkError<ListCertificatesError>
Constructs a fluent builder for the ListTagsForCertificate
operation.
- The fluent builder is configurable:
certificate_arn(impl Into<String>)
/set_certificate_arn(Option<String>)
:String that contains the ARN of the ACM certificate for which you want to list the tags. This must have the following form:
arn:aws:acm:region:123456789012:certificate/12345678-1234-1234-1234-123456789012
For more information about ARNs, see Amazon Resource Names (ARNs).
- On success, responds with
ListTagsForCertificateOutput
with field(s):tags(Option<Vec<Tag>>)
:The key-value pairs that define the applied tags.
- On failure, responds with
SdkError<ListTagsForCertificateError>
sourcepub fn put_account_configuration(&self) -> PutAccountConfiguration
pub fn put_account_configuration(&self) -> PutAccountConfiguration
Constructs a fluent builder for the PutAccountConfiguration
operation.
- The fluent builder is configurable:
expiry_events(ExpiryEventsConfiguration)
/set_expiry_events(Option<ExpiryEventsConfiguration>)
:Specifies expiration events associated with an account.
idempotency_token(impl Into<String>)
/set_idempotency_token(Option<String>)
:Customer-chosen string used to distinguish between calls to
PutAccountConfiguration
. Idempotency tokens time out after one hour. If you callPutAccountConfiguration
multiple times with the same unexpired idempotency token, ACM treats it as the same request and returns the original result. If you change the idempotency token for each call, ACM treats each call as a new request.
- On success, responds with
PutAccountConfigurationOutput
- On failure, responds with
SdkError<PutAccountConfigurationError>
Constructs a fluent builder for the RemoveTagsFromCertificate
operation.
- The fluent builder is configurable:
certificate_arn(impl Into<String>)
/set_certificate_arn(Option<String>)
:String that contains the ARN of the ACM Certificate with one or more tags that you want to remove. This must be of the form:
arn:aws:acm:region:123456789012:certificate/12345678-1234-1234-1234-123456789012
For more information about ARNs, see Amazon Resource Names (ARNs).
tags(Vec<Tag>)
/set_tags(Option<Vec<Tag>>)
:The key-value pair that defines the tag to remove.
- On success, responds with
RemoveTagsFromCertificateOutput
- On failure, responds with
SdkError<RemoveTagsFromCertificateError>
sourcepub fn renew_certificate(&self) -> RenewCertificate
pub fn renew_certificate(&self) -> RenewCertificate
Constructs a fluent builder for the RenewCertificate
operation.
- The fluent builder is configurable:
certificate_arn(impl Into<String>)
/set_certificate_arn(Option<String>)
:String that contains the ARN of the ACM certificate to be renewed. This must be of the form:
arn:aws:acm:region:123456789012:certificate/12345678-1234-1234-1234-123456789012
For more information about ARNs, see Amazon Resource Names (ARNs).
- On success, responds with
RenewCertificateOutput
- On failure, responds with
SdkError<RenewCertificateError>
sourcepub fn request_certificate(&self) -> RequestCertificate
pub fn request_certificate(&self) -> RequestCertificate
Constructs a fluent builder for the RequestCertificate
operation.
- The fluent builder is configurable:
domain_name(impl Into<String>)
/set_domain_name(Option<String>)
:Fully qualified domain name (FQDN), such as www.example.com, that you want to secure with an ACM certificate. Use an asterisk (*) to create a wildcard certificate that protects several sites in the same domain. For example, *.example.com protects www.example.com, site.example.com, and images.example.com.
The first domain name you enter cannot exceed 64 octets, including periods. Each subsequent Subject Alternative Name (SAN), however, can be up to 253 octets in length.
validation_method(ValidationMethod)
/set_validation_method(Option<ValidationMethod>)
:The method you want to use if you are requesting a public certificate to validate that you own or control domain. You can validate with DNS or validate with email. We recommend that you use DNS validation.
subject_alternative_names(Vec<String>)
/set_subject_alternative_names(Option<Vec<String>>)
:Additional FQDNs to be included in the Subject Alternative Name extension of the ACM certificate. For example, add the name www.example.net to a certificate for which the
DomainName
field is www.example.com if users can reach your site by using either name. The maximum number of domain names that you can add to an ACM certificate is 100. However, the initial quota is 10 domain names. If you need more than 10 names, you must request a quota increase. For more information, see Quotas.The maximum length of a SAN DNS name is 253 octets. The name is made up of multiple labels separated by periods. No label can be longer than 63 octets. Consider the following examples:
-
(63 octets).(63 octets).(63 octets).(61 octets)
is legal because the total length is 253 octets (63+1+63+1+63+1+61) and no label exceeds 63 octets. -
(64 octets).(63 octets).(63 octets).(61 octets)
is not legal because the total length exceeds 253 octets (64+1+63+1+63+1+61) and the first label exceeds 63 octets. -
(63 octets).(63 octets).(63 octets).(62 octets)
is not legal because the total length of the DNS name (63+1+63+1+63+1+62) exceeds 253 octets.
-
idempotency_token(impl Into<String>)
/set_idempotency_token(Option<String>)
:Customer chosen string that can be used to distinguish between calls to
RequestCertificate
. Idempotency tokens time out after one hour. Therefore, if you callRequestCertificate
multiple times with the same idempotency token within one hour, ACM recognizes that you are requesting only one certificate and will issue only one. If you change the idempotency token for each call, ACM recognizes that you are requesting multiple certificates.domain_validation_options(Vec<DomainValidationOption>)
/set_domain_validation_options(Option<Vec<DomainValidationOption>>)
:The domain name that you want ACM to use to send you emails so that you can validate domain ownership.
options(CertificateOptions)
/set_options(Option<CertificateOptions>)
:Currently, you can use this parameter to specify whether to add the certificate to a certificate transparency log. Certificate transparency makes it possible to detect SSL/TLS certificates that have been mistakenly or maliciously issued. Certificates that have not been logged typically produce an error message in a browser. For more information, see Opting Out of Certificate Transparency Logging.
certificate_authority_arn(impl Into<String>)
/set_certificate_authority_arn(Option<String>)
:The Amazon Resource Name (ARN) of the private certificate authority (CA) that will be used to issue the certificate. If you do not provide an ARN and you are trying to request a private certificate, ACM will attempt to issue a public certificate. For more information about private CAs, see the Amazon Web Services Certificate Manager Private Certificate Authority (PCA) user guide. The ARN must have the following form:
arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012
tags(Vec<Tag>)
/set_tags(Option<Vec<Tag>>)
:One or more resource tags to associate with the certificate.
- On success, responds with
RequestCertificateOutput
with field(s):certificate_arn(Option<String>)
:String that contains the ARN of the issued certificate. This must be of the form:
arn:aws:acm:us-east-1:123456789012:certificate/12345678-1234-1234-1234-123456789012
- On failure, responds with
SdkError<RequestCertificateError>
sourcepub fn resend_validation_email(&self) -> ResendValidationEmail
pub fn resend_validation_email(&self) -> ResendValidationEmail
Constructs a fluent builder for the ResendValidationEmail
operation.
- The fluent builder is configurable:
certificate_arn(impl Into<String>)
/set_certificate_arn(Option<String>)
:String that contains the ARN of the requested certificate. The certificate ARN is generated and returned by the
RequestCertificate
action as soon as the request is made. By default, using this parameter causes email to be sent to all top-level domains you specified in the certificate request. The ARN must be of the form:arn:aws:acm:us-east-1:123456789012:certificate/12345678-1234-1234-1234-123456789012
domain(impl Into<String>)
/set_domain(Option<String>)
:The fully qualified domain name (FQDN) of the certificate that needs to be validated.
validation_domain(impl Into<String>)
/set_validation_domain(Option<String>)
:The base validation domain that will act as the suffix of the email addresses that are used to send the emails. This must be the same as the
Domain
value or a superdomain of theDomain
value. For example, if you requested a certificate forsite.subdomain.example.com
and specify a ValidationDomain ofsubdomain.example.com
, ACM sends email to the domain registrant, technical contact, and administrative contact in WHOIS and the following five addresses:-
admin@subdomain.example.com
-
administrator@subdomain.example.com
-
hostmaster@subdomain.example.com
-
postmaster@subdomain.example.com
-
webmaster@subdomain.example.com
-
- On success, responds with
ResendValidationEmailOutput
- On failure, responds with
SdkError<ResendValidationEmailError>
sourcepub fn update_certificate_options(&self) -> UpdateCertificateOptions
pub fn update_certificate_options(&self) -> UpdateCertificateOptions
Constructs a fluent builder for the UpdateCertificateOptions
operation.
- The fluent builder is configurable:
certificate_arn(impl Into<String>)
/set_certificate_arn(Option<String>)
:ARN of the requested certificate to update. This must be of the form:
arn:aws:acm:us-east-1:account:certificate/12345678-1234-1234-1234-123456789012
options(CertificateOptions)
/set_options(Option<CertificateOptions>)
:Use to update the options for your certificate. Currently, you can specify whether to add your certificate to a transparency log. Certificate transparency makes it possible to detect SSL/TLS certificates that have been mistakenly or maliciously issued. Certificates that have not been logged typically produce an error message in a browser.
- On success, responds with
UpdateCertificateOptionsOutput
- On failure, responds with
SdkError<UpdateCertificateOptionsError>
sourceimpl Client
impl Client
sourcepub fn from_conf_conn<C, E>(conf: Config, conn: C) -> Self where
C: SmithyConnector<Error = E> + Send + 'static,
E: Into<ConnectorError>,
pub fn from_conf_conn<C, E>(conf: Config, conn: C) -> Self where
C: SmithyConnector<Error = E> + Send + 'static,
E: Into<ConnectorError>,
Creates a client with the given service config and connector override.
Trait Implementations
sourceimpl From<Client<DynConnector, DynMiddleware<DynConnector>, Standard>> for Client
impl From<Client<DynConnector, DynMiddleware<DynConnector>, Standard>> for Client
sourcefn from(client: Client<DynConnector, DynMiddleware<DynConnector>>) -> Self
fn from(client: Client<DynConnector, DynMiddleware<DynConnector>>) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more