pub struct CreateCertificateFromCsr { /* private fields */ }
Expand description
Fluent builder constructing a request to CreateCertificateFromCsr
.
Creates an X.509 certificate using the specified certificate signing request.
Note: The CSR must include a public key that is either an RSA key with a length of at least 2048 bits or an ECC key from NIST P-256, NIST P-384, or NIST P-512 curves. For supported certificates, consult Certificate signing algorithms supported by IoT.
Note: Reusing the same certificate signing request (CSR) results in a distinct certificate.
Requires permission to access the CreateCertificateFromCsr action.
You can create multiple certificates in a batch by creating a directory, copying multiple .csr files into that directory, and then specifying that directory on the command line. The following commands show how to create a batch of certificates given a batch of CSRs.
Assuming a set of CSRs are located inside of the directory my-csr-directory:
On Linux and OS X, the command is:
$ ls my-csr-directory/ | xargs -I {} aws iot create-certificate-from-csr --certificate-signing-request file://my-csr-directory/{}
This command lists all of the CSRs in my-csr-directory and pipes each CSR file name to the aws iot create-certificate-from-csr Amazon Web Services CLI command to create a certificate for the corresponding CSR.
The aws iot create-certificate-from-csr part of the command can also be run in parallel to speed up the certificate creation process:
$ ls my-csr-directory/ | xargs -P 10 -I {} aws iot create-certificate-from-csr --certificate-signing-request file://my-csr-directory/{}
On Windows PowerShell, the command to create certificates for all CSRs in my-csr-directory is:
> ls -Name my-csr-directory | %{aws iot create-certificate-from-csr --certificate-signing-request file://my-csr-directory/$_}
On a Windows command prompt, the command to create certificates for all CSRs in my-csr-directory is:
> forfiles /p my-csr-directory /c "cmd /c aws iot create-certificate-from-csr --certificate-signing-request file://@path"
Implementations
sourceimpl CreateCertificateFromCsr
impl CreateCertificateFromCsr
sourcepub async fn send(
self
) -> Result<CreateCertificateFromCsrOutput, SdkError<CreateCertificateFromCsrError>>
pub async fn send(
self
) -> Result<CreateCertificateFromCsrOutput, SdkError<CreateCertificateFromCsrError>>
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, which can be set when configuring the client.
sourcepub fn certificate_signing_request(self, input: impl Into<String>) -> Self
pub fn certificate_signing_request(self, input: impl Into<String>) -> Self
The certificate signing request (CSR).
sourcepub fn set_certificate_signing_request(self, input: Option<String>) -> Self
pub fn set_certificate_signing_request(self, input: Option<String>) -> Self
The certificate signing request (CSR).
sourcepub fn set_as_active(self, input: bool) -> Self
pub fn set_as_active(self, input: bool) -> Self
Specifies whether the certificate is active.
sourcepub fn set_set_as_active(self, input: Option<bool>) -> Self
pub fn set_set_as_active(self, input: Option<bool>) -> Self
Specifies whether the certificate is active.
Trait Implementations
sourceimpl Clone for CreateCertificateFromCsr
impl Clone for CreateCertificateFromCsr
sourcefn clone(&self) -> CreateCertificateFromCsr
fn clone(&self) -> CreateCertificateFromCsr
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl !RefUnwindSafe for CreateCertificateFromCsr
impl Send for CreateCertificateFromCsr
impl Sync for CreateCertificateFromCsr
impl Unpin for CreateCertificateFromCsr
impl !UnwindSafe for CreateCertificateFromCsr
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> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
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