@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
131 lines • 6.3 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.SigningJob = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Creates a Signer Signing Job.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const testSp = new aws.signer.SigningProfile("test_sp", {platformId: "AWSLambda-SHA384-ECDSA"});
* const buildSigningJob = new aws.signer.SigningJob("build_signing_job", {
* profileName: testSp.name,
* source: {
* s3: {
* bucket: "s3-bucket-name",
* key: "object-to-be-signed.zip",
* version: "jADjFYYYEXAMPLETszPjOmCMFDzd9dN1",
* },
* },
* destination: {
* s3: {
* bucket: "s3-bucket-name",
* prefix: "signed/",
* },
* },
* ignoreSigningJobFailure: true,
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import Signer signing jobs using the `job_id`. For example:
*
* ```sh
* $ pulumi import aws:signer/signingJob:SigningJob test_signer_signing_job 9ed7e5c3-b8d4-4da0-8459-44e0b068f7ee
* ```
*/
class SigningJob extends pulumi.CustomResource {
/**
* Get an existing SigningJob resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name, id, state, opts) {
return new SigningJob(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of SigningJob. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === SigningJob.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["completedAt"] = state ? state.completedAt : undefined;
resourceInputs["createdAt"] = state ? state.createdAt : undefined;
resourceInputs["destination"] = state ? state.destination : undefined;
resourceInputs["ignoreSigningJobFailure"] = state ? state.ignoreSigningJobFailure : undefined;
resourceInputs["jobId"] = state ? state.jobId : undefined;
resourceInputs["jobInvoker"] = state ? state.jobInvoker : undefined;
resourceInputs["jobOwner"] = state ? state.jobOwner : undefined;
resourceInputs["platformDisplayName"] = state ? state.platformDisplayName : undefined;
resourceInputs["platformId"] = state ? state.platformId : undefined;
resourceInputs["profileName"] = state ? state.profileName : undefined;
resourceInputs["profileVersion"] = state ? state.profileVersion : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["requestedBy"] = state ? state.requestedBy : undefined;
resourceInputs["revocationRecords"] = state ? state.revocationRecords : undefined;
resourceInputs["signatureExpiresAt"] = state ? state.signatureExpiresAt : undefined;
resourceInputs["signedObjects"] = state ? state.signedObjects : undefined;
resourceInputs["source"] = state ? state.source : undefined;
resourceInputs["status"] = state ? state.status : undefined;
resourceInputs["statusReason"] = state ? state.statusReason : undefined;
}
else {
const args = argsOrState;
if ((!args || args.destination === undefined) && !opts.urn) {
throw new Error("Missing required property 'destination'");
}
if ((!args || args.profileName === undefined) && !opts.urn) {
throw new Error("Missing required property 'profileName'");
}
if ((!args || args.source === undefined) && !opts.urn) {
throw new Error("Missing required property 'source'");
}
resourceInputs["destination"] = args ? args.destination : undefined;
resourceInputs["ignoreSigningJobFailure"] = args ? args.ignoreSigningJobFailure : undefined;
resourceInputs["profileName"] = args ? args.profileName : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["source"] = args ? args.source : undefined;
resourceInputs["completedAt"] = undefined /*out*/;
resourceInputs["createdAt"] = undefined /*out*/;
resourceInputs["jobId"] = undefined /*out*/;
resourceInputs["jobInvoker"] = undefined /*out*/;
resourceInputs["jobOwner"] = undefined /*out*/;
resourceInputs["platformDisplayName"] = undefined /*out*/;
resourceInputs["platformId"] = undefined /*out*/;
resourceInputs["profileVersion"] = undefined /*out*/;
resourceInputs["requestedBy"] = undefined /*out*/;
resourceInputs["revocationRecords"] = undefined /*out*/;
resourceInputs["signatureExpiresAt"] = undefined /*out*/;
resourceInputs["signedObjects"] = undefined /*out*/;
resourceInputs["status"] = undefined /*out*/;
resourceInputs["statusReason"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(SigningJob.__pulumiType, name, resourceInputs, opts);
}
}
exports.SigningJob = SigningJob;
/** @internal */
SigningJob.__pulumiType = 'aws:signer/signingJob:SigningJob';
//# sourceMappingURL=signingJob.js.map