@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
131 lines • 5.79 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, { ...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?.completedAt;
resourceInputs["createdAt"] = state?.createdAt;
resourceInputs["destination"] = state?.destination;
resourceInputs["ignoreSigningJobFailure"] = state?.ignoreSigningJobFailure;
resourceInputs["jobId"] = state?.jobId;
resourceInputs["jobInvoker"] = state?.jobInvoker;
resourceInputs["jobOwner"] = state?.jobOwner;
resourceInputs["platformDisplayName"] = state?.platformDisplayName;
resourceInputs["platformId"] = state?.platformId;
resourceInputs["profileName"] = state?.profileName;
resourceInputs["profileVersion"] = state?.profileVersion;
resourceInputs["region"] = state?.region;
resourceInputs["requestedBy"] = state?.requestedBy;
resourceInputs["revocationRecords"] = state?.revocationRecords;
resourceInputs["signatureExpiresAt"] = state?.signatureExpiresAt;
resourceInputs["signedObjects"] = state?.signedObjects;
resourceInputs["source"] = state?.source;
resourceInputs["status"] = state?.status;
resourceInputs["statusReason"] = state?.statusReason;
}
else {
const args = argsOrState;
if (args?.destination === undefined && !opts.urn) {
throw new Error("Missing required property 'destination'");
}
if (args?.profileName === undefined && !opts.urn) {
throw new Error("Missing required property 'profileName'");
}
if (args?.source === undefined && !opts.urn) {
throw new Error("Missing required property 'source'");
}
resourceInputs["destination"] = args?.destination;
resourceInputs["ignoreSigningJobFailure"] = args?.ignoreSigningJobFailure;
resourceInputs["profileName"] = args?.profileName;
resourceInputs["region"] = args?.region;
resourceInputs["source"] = args?.source;
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