UNPKG

@pulumi/aws

Version:

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

186 lines 7.91 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.EnvironmentProfile = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Resource for managing an AWS DataZone Environment Profile. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const domainExecutionRole = new aws.iam.Role("domain_execution_role", { * name: "example-name", * assumeRolePolicy: JSON.stringify({ * Version: "2012-10-17", * Statement: [ * { * Action: [ * "sts:AssumeRole", * "sts:TagSession", * ], * Effect: "Allow", * Principal: { * Service: "datazone.amazonaws.com", * }, * }, * { * Action: [ * "sts:AssumeRole", * "sts:TagSession", * ], * Effect: "Allow", * Principal: { * Service: "cloudformation.amazonaws.com", * }, * }, * ], * }), * inlinePolicies: [{ * name: "example-name", * policy: JSON.stringify({ * Version: "2012-10-17", * Statement: [{ * Action: [ * "datazone:*", * "ram:*", * "sso:*", * "kms:*", * ], * Effect: "Allow", * Resource: "*", * }], * }), * }], * }); * const testDomain = new aws.datazone.Domain("test", { * name: "example-name", * domainExecutionRole: domainExecutionRole.arn, * }); * const testSecurityGroup = new aws.ec2.SecurityGroup("test", {name: "example-name"}); * const testProject = new aws.datazone.Project("test", { * domainIdentifier: testDomain.id, * glossaryTerms: ["2N8w6XJCwZf"], * name: "example-name", * description: "desc", * skipDeletionCheck: true, * }); * const test = aws.getCallerIdentity({}); * const testGetRegion = aws.getRegion({}); * const testGetEnvironmentBlueprint = aws.datazone.getEnvironmentBlueprintOutput({ * domainId: testDomain.id, * name: "DefaultDataLake", * managed: true, * }); * const testEnvironmentBlueprintConfiguration = new aws.datazone.EnvironmentBlueprintConfiguration("test", { * domainId: testDomain.id, * environmentBlueprintId: testGetEnvironmentBlueprint.apply(testGetEnvironmentBlueprint => testGetEnvironmentBlueprint.id), * provisioningRoleArn: domainExecutionRole.arn, * enabledRegions: [testGetRegion.then(testGetRegion => testGetRegion.name)], * }); * const testEnvironmentProfile = new aws.datazone.EnvironmentProfile("test", { * awsAccountId: test.then(test => test.accountId), * awsAccountRegion: testGetRegion.then(testGetRegion => testGetRegion.name), * description: "description", * environmentBlueprintIdentifier: testGetEnvironmentBlueprint.apply(testGetEnvironmentBlueprint => testGetEnvironmentBlueprint.id), * name: "example-name", * projectIdentifier: testProject.id, * domainIdentifier: testDomain.id, * userParameters: [{ * name: "consumerGlueDbName", * value: "value", * }], * }); * ``` * * ## Import * * Using `pulumi import`, import DataZone Environment Profile using a comma-delimited string combining `id` and `domain_identifier`. For example: * * ```sh * $ pulumi import aws:datazone/environmentProfile:EnvironmentProfile example environment_profile-id-12345678,domain-id-12345678 * ``` */ class EnvironmentProfile extends pulumi.CustomResource { /** * Get an existing EnvironmentProfile 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 EnvironmentProfile(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of EnvironmentProfile. 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'] === EnvironmentProfile.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["awsAccountId"] = state?.awsAccountId; resourceInputs["awsAccountRegion"] = state?.awsAccountRegion; resourceInputs["createdAt"] = state?.createdAt; resourceInputs["createdBy"] = state?.createdBy; resourceInputs["description"] = state?.description; resourceInputs["domainIdentifier"] = state?.domainIdentifier; resourceInputs["environmentBlueprintIdentifier"] = state?.environmentBlueprintIdentifier; resourceInputs["name"] = state?.name; resourceInputs["projectIdentifier"] = state?.projectIdentifier; resourceInputs["region"] = state?.region; resourceInputs["updatedAt"] = state?.updatedAt; resourceInputs["userParameters"] = state?.userParameters; } else { const args = argsOrState; if (args?.awsAccountRegion === undefined && !opts.urn) { throw new Error("Missing required property 'awsAccountRegion'"); } if (args?.domainIdentifier === undefined && !opts.urn) { throw new Error("Missing required property 'domainIdentifier'"); } if (args?.environmentBlueprintIdentifier === undefined && !opts.urn) { throw new Error("Missing required property 'environmentBlueprintIdentifier'"); } if (args?.projectIdentifier === undefined && !opts.urn) { throw new Error("Missing required property 'projectIdentifier'"); } resourceInputs["awsAccountId"] = args?.awsAccountId; resourceInputs["awsAccountRegion"] = args?.awsAccountRegion; resourceInputs["description"] = args?.description; resourceInputs["domainIdentifier"] = args?.domainIdentifier; resourceInputs["environmentBlueprintIdentifier"] = args?.environmentBlueprintIdentifier; resourceInputs["name"] = args?.name; resourceInputs["projectIdentifier"] = args?.projectIdentifier; resourceInputs["region"] = args?.region; resourceInputs["userParameters"] = args?.userParameters; resourceInputs["createdAt"] = undefined /*out*/; resourceInputs["createdBy"] = undefined /*out*/; resourceInputs["updatedAt"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(EnvironmentProfile.__pulumiType, name, resourceInputs, opts); } } exports.EnvironmentProfile = EnvironmentProfile; /** @internal */ EnvironmentProfile.__pulumiType = 'aws:datazone/environmentProfile:EnvironmentProfile'; //# sourceMappingURL=environmentProfile.js.map