UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

121 lines 4.68 kB
"use strict"; // *** 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.TrustAnchor = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Resource for managing a Roles Anywhere Trust Anchor. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.acmpca.CertificateAuthority("example", { * permanentDeletionTimeInDays: 7, * type: "ROOT", * certificateAuthorityConfiguration: { * keyAlgorithm: "RSA_4096", * signingAlgorithm: "SHA512WITHRSA", * subject: { * commonName: "example.com", * }, * }, * }); * const current = aws.getPartition({}); * const test = new aws.acmpca.Certificate("test", { * certificateAuthorityArn: example.arn, * certificateSigningRequest: example.certificateSigningRequest, * signingAlgorithm: "SHA512WITHRSA", * templateArn: current.then(current => `arn:${current.partition}:acm-pca:::template/RootCACertificate/V1`), * validity: { * type: "YEARS", * value: "1", * }, * }); * const exampleCertificateAuthorityCertificate = new aws.acmpca.CertificateAuthorityCertificate("example", { * certificateAuthorityArn: example.arn, * certificate: exampleAwsAcmpcaCertificate.certificate, * certificateChain: exampleAwsAcmpcaCertificate.certificateChain, * }); * const testTrustAnchor = new aws.rolesanywhere.TrustAnchor("test", { * name: "example", * source: { * sourceData: { * acmPcaArn: example.arn, * }, * sourceType: "AWS_ACM_PCA", * }, * }, { * dependsOn: [exampleCertificateAuthorityCertificate], * }); * ``` * * ## Import * * Using `pulumi import`, import `aws_rolesanywhere_trust_anchor` using its `id`. For example: * * ```sh * $ pulumi import aws:rolesanywhere/trustAnchor:TrustAnchor example 92b2fbbb-984d-41a3-a765-e3cbdb69ebb1 * ``` */ class TrustAnchor extends pulumi.CustomResource { /** * Get an existing TrustAnchor 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 TrustAnchor(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of TrustAnchor. 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'] === TrustAnchor.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["arn"] = state?.arn; resourceInputs["enabled"] = state?.enabled; resourceInputs["name"] = state?.name; resourceInputs["notificationSettings"] = state?.notificationSettings; resourceInputs["source"] = state?.source; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; } else { const args = argsOrState; if (args?.source === undefined && !opts.urn) { throw new Error("Missing required property 'source'"); } resourceInputs["enabled"] = args?.enabled; resourceInputs["name"] = args?.name; resourceInputs["notificationSettings"] = args?.notificationSettings; resourceInputs["source"] = args?.source; resourceInputs["tags"] = args?.tags; resourceInputs["arn"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(TrustAnchor.__pulumiType, name, resourceInputs, opts); } } exports.TrustAnchor = TrustAnchor; /** @internal */ TrustAnchor.__pulumiType = 'aws:rolesanywhere/trustAnchor:TrustAnchor'; //# sourceMappingURL=trustAnchor.js.map