amazonka-iot-1.6.0: Amazon IoT SDK.

Copyright(c) 2013-2018 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@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: 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 or NIST P-384 curves.

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 #

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 #

The input for the CreateCertificateFromCsr operation.

See: createCertificateFromCSR smart constructor.

Instances
Eq CreateCertificateFromCSR # 
Instance details

Defined in Network.AWS.IoT.CreateCertificateFromCSR

Data CreateCertificateFromCSR # 
Instance details

Defined in Network.AWS.IoT.CreateCertificateFromCSR

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 # 
Instance details

Defined in Network.AWS.IoT.CreateCertificateFromCSR

Show CreateCertificateFromCSR # 
Instance details

Defined in Network.AWS.IoT.CreateCertificateFromCSR

Generic CreateCertificateFromCSR # 
Instance details

Defined in Network.AWS.IoT.CreateCertificateFromCSR

Associated Types

type Rep CreateCertificateFromCSR :: * -> * #

Hashable CreateCertificateFromCSR # 
Instance details

Defined in Network.AWS.IoT.CreateCertificateFromCSR

ToJSON CreateCertificateFromCSR # 
Instance details

Defined in Network.AWS.IoT.CreateCertificateFromCSR

AWSRequest CreateCertificateFromCSR # 
Instance details

Defined in Network.AWS.IoT.CreateCertificateFromCSR

Associated Types

type Rs CreateCertificateFromCSR :: * #

ToHeaders CreateCertificateFromCSR # 
Instance details

Defined in Network.AWS.IoT.CreateCertificateFromCSR

ToPath CreateCertificateFromCSR # 
Instance details

Defined in Network.AWS.IoT.CreateCertificateFromCSR

ToQuery CreateCertificateFromCSR # 
Instance details

Defined in Network.AWS.IoT.CreateCertificateFromCSR

NFData CreateCertificateFromCSR # 
Instance details

Defined in Network.AWS.IoT.CreateCertificateFromCSR

type Rep CreateCertificateFromCSR # 
Instance details

Defined in Network.AWS.IoT.CreateCertificateFromCSR

type Rep CreateCertificateFromCSR = D1 (MetaData "CreateCertificateFromCSR" "Network.AWS.IoT.CreateCertificateFromCSR" "amazonka-iot-1.6.0-CAejnyMMkfk3pNFUOERBSd" False) (C1 (MetaCons "CreateCertificateFromCSR'" PrefixI True) (S1 (MetaSel (Just "_ccfcsrSetAsActive") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 (MetaSel (Just "_ccfcsrCertificateSigningRequest") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)))
type Rs CreateCertificateFromCSR # 
Instance details

Defined in Network.AWS.IoT.CreateCertificateFromCSR

Request Lenses

ccfcsrSetAsActive :: Lens' CreateCertificateFromCSR (Maybe Bool) #

Specifies whether the certificate is active.

ccfcsrCertificateSigningRequest :: Lens' CreateCertificateFromCSR Text #

The certificate signing request (CSR).

Destructuring the Response

createCertificateFromCSRResponse #

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 #

The output from the CreateCertificateFromCsr operation.

See: createCertificateFromCSRResponse smart constructor.

Instances
Eq CreateCertificateFromCSRResponse # 
Instance details

Defined in Network.AWS.IoT.CreateCertificateFromCSR

Data CreateCertificateFromCSRResponse # 
Instance details

Defined in Network.AWS.IoT.CreateCertificateFromCSR

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 # 
Instance details

Defined in Network.AWS.IoT.CreateCertificateFromCSR

Show CreateCertificateFromCSRResponse # 
Instance details

Defined in Network.AWS.IoT.CreateCertificateFromCSR

Generic CreateCertificateFromCSRResponse # 
Instance details

Defined in Network.AWS.IoT.CreateCertificateFromCSR

Associated Types

type Rep CreateCertificateFromCSRResponse :: * -> * #

NFData CreateCertificateFromCSRResponse # 
Instance details

Defined in Network.AWS.IoT.CreateCertificateFromCSR

type Rep CreateCertificateFromCSRResponse # 
Instance details

Defined in Network.AWS.IoT.CreateCertificateFromCSR

type Rep CreateCertificateFromCSRResponse = D1 (MetaData "CreateCertificateFromCSRResponse" "Network.AWS.IoT.CreateCertificateFromCSR" "amazonka-iot-1.6.0-CAejnyMMkfk3pNFUOERBSd" False) (C1 (MetaCons "CreateCertificateFromCSRResponse'" PrefixI True) ((S1 (MetaSel (Just "_ccfcsrrsCertificatePem") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_ccfcsrrsCertificateARN") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 (MetaSel (Just "_ccfcsrrsCertificateId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_ccfcsrrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int))))

Response Lenses

ccfcsrrsCertificatePem :: Lens' CreateCertificateFromCSRResponse (Maybe Text) #

The certificate data, in PEM format.

ccfcsrrsCertificateARN :: Lens' CreateCertificateFromCSRResponse (Maybe Text) #

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

ccfcsrrsCertificateId :: Lens' CreateCertificateFromCSRResponse (Maybe Text) #

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