amazonka-iot-1.4.4: Amazon IoT SDK.

Copyright(c) 2013-2016 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.IoT.CreateCertificateFromCsr

Contents

Description

Creates an X.509 certificate using the specified certificate signing request.

Note Reusing the same certificate signing request (CSR) results in a distinct certificate.

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 AWS 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\"

Synopsis

Creating a Request

createCertificateFromCsr Source #

Creates a value of CreateCertificateFromCsr with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

data CreateCertificateFromCsr Source #

The input for the CreateCertificateFromCsr operation.

See: createCertificateFromCsr smart constructor.

Instances

Eq CreateCertificateFromCsr Source # 
Data CreateCertificateFromCsr Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CreateCertificateFromCsr -> c CreateCertificateFromCsr #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CreateCertificateFromCsr #

toConstr :: CreateCertificateFromCsr -> Constr #

dataTypeOf :: CreateCertificateFromCsr -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c CreateCertificateFromCsr) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CreateCertificateFromCsr) #

gmapT :: (forall b. Data b => b -> b) -> CreateCertificateFromCsr -> CreateCertificateFromCsr #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CreateCertificateFromCsr -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CreateCertificateFromCsr -> r #

gmapQ :: (forall d. Data d => d -> u) -> CreateCertificateFromCsr -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CreateCertificateFromCsr -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CreateCertificateFromCsr -> m CreateCertificateFromCsr #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateCertificateFromCsr -> m CreateCertificateFromCsr #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateCertificateFromCsr -> m CreateCertificateFromCsr #

Read CreateCertificateFromCsr Source # 
Show CreateCertificateFromCsr Source # 
Generic CreateCertificateFromCsr Source # 
Hashable CreateCertificateFromCsr Source # 
NFData CreateCertificateFromCsr Source # 
AWSRequest CreateCertificateFromCsr Source # 
ToPath CreateCertificateFromCsr Source # 
ToHeaders CreateCertificateFromCsr Source # 
ToQuery CreateCertificateFromCsr Source # 
ToJSON CreateCertificateFromCsr Source # 
type Rep CreateCertificateFromCsr Source # 
type Rep CreateCertificateFromCsr = D1 (MetaData "CreateCertificateFromCsr" "Network.AWS.IoT.CreateCertificateFromCsr" "amazonka-iot-1.4.4-DeZW0JwAfGmFb7dFqhSZgL" False) (C1 (MetaCons "CreateCertificateFromCsr'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_ccfcSetAsActive") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Bool))) (S1 (MetaSel (Just Symbol "_ccfcCertificateSigningRequest") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text))))
type Rs CreateCertificateFromCsr Source # 

Request Lenses

ccfcSetAsActive :: Lens' CreateCertificateFromCsr (Maybe Bool) Source #

Specifies whether the certificate is active.

ccfcCertificateSigningRequest :: Lens' CreateCertificateFromCsr Text Source #

The certificate signing request (CSR).

Destructuring the Response

createCertificateFromCsrResponse Source #

Creates a value of CreateCertificateFromCsrResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

data CreateCertificateFromCsrResponse Source #

The output from the CreateCertificateFromCsr operation.

See: createCertificateFromCsrResponse smart constructor.

Instances

Eq CreateCertificateFromCsrResponse Source # 
Data CreateCertificateFromCsrResponse Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CreateCertificateFromCsrResponse -> c CreateCertificateFromCsrResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CreateCertificateFromCsrResponse #

toConstr :: CreateCertificateFromCsrResponse -> Constr #

dataTypeOf :: CreateCertificateFromCsrResponse -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c CreateCertificateFromCsrResponse) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CreateCertificateFromCsrResponse) #

gmapT :: (forall b. Data b => b -> b) -> CreateCertificateFromCsrResponse -> CreateCertificateFromCsrResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CreateCertificateFromCsrResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CreateCertificateFromCsrResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> CreateCertificateFromCsrResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CreateCertificateFromCsrResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CreateCertificateFromCsrResponse -> m CreateCertificateFromCsrResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateCertificateFromCsrResponse -> m CreateCertificateFromCsrResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateCertificateFromCsrResponse -> m CreateCertificateFromCsrResponse #

Read CreateCertificateFromCsrResponse Source # 
Show CreateCertificateFromCsrResponse Source # 
Generic CreateCertificateFromCsrResponse Source # 
NFData CreateCertificateFromCsrResponse Source # 
type Rep CreateCertificateFromCsrResponse Source # 
type Rep CreateCertificateFromCsrResponse = D1 (MetaData "CreateCertificateFromCsrResponse" "Network.AWS.IoT.CreateCertificateFromCsr" "amazonka-iot-1.4.4-DeZW0JwAfGmFb7dFqhSZgL" False) (C1 (MetaCons "CreateCertificateFromCsrResponse'" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_ccfcrsCertificatePem") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_ccfcrsCertificateARN") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)))) ((:*:) (S1 (MetaSel (Just Symbol "_ccfcrsCertificateId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_ccfcrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Int)))))

Response Lenses

ccfcrsCertificateARN :: Lens' CreateCertificateFromCsrResponse (Maybe Text) Source #

The Amazon Resource Name (ARN) of the certificate. You can use the ARN as a principal for policy operations.

ccfcrsCertificateId :: Lens' CreateCertificateFromCsrResponse (Maybe Text) Source #

The ID of the certificate. Certificate management operations only take a certificateId.