@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
78 lines (77 loc) • 2.71 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Gets a registration code used to register a CA certificate with AWS IoT.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* import * as tls from "@pulumi/tls";
*
* const example = aws.iot.getRegistrationCode({});
* const verification = new tls.PrivateKey("verification", {algorithm: "RSA"});
* const verificationCertRequest = new tls.CertRequest("verification", {
* keyAlgorithm: "RSA",
* privateKeyPem: verification.privateKeyPem,
* subject: [{
* commonName: example.then(example => example.registrationCode),
* }],
* });
* ```
*/
export declare function getRegistrationCode(args?: GetRegistrationCodeArgs, opts?: pulumi.InvokeOptions): Promise<GetRegistrationCodeResult>;
/**
* A collection of arguments for invoking getRegistrationCode.
*/
export interface GetRegistrationCodeArgs {
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: string;
}
/**
* A collection of values returned by getRegistrationCode.
*/
export interface GetRegistrationCodeResult {
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
readonly region: string;
/**
* The CA certificate registration code.
*/
readonly registrationCode: string;
}
/**
* Gets a registration code used to register a CA certificate with AWS IoT.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* import * as tls from "@pulumi/tls";
*
* const example = aws.iot.getRegistrationCode({});
* const verification = new tls.PrivateKey("verification", {algorithm: "RSA"});
* const verificationCertRequest = new tls.CertRequest("verification", {
* keyAlgorithm: "RSA",
* privateKeyPem: verification.privateKeyPem,
* subject: [{
* commonName: example.then(example => example.registrationCode),
* }],
* });
* ```
*/
export declare function getRegistrationCodeOutput(args?: GetRegistrationCodeOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetRegistrationCodeResult>;
/**
* A collection of arguments for invoking getRegistrationCode.
*/
export interface GetRegistrationCodeOutputArgs {
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: pulumi.Input<string>;
}