UNPKG

@pulumi/aws

Version:

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

118 lines 6.79 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.Profile = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Resource for managing an Amazon Customer Profiles Profile. * See the [Create Profile](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_CreateProfile.html) for more information. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.customerprofiles.Domain("example", {domainName: "example"}); * const exampleProfile = new aws.customerprofiles.Profile("example", {domainName: example.domainName}); * ``` * * ## Import * * Using `pulumi import`, import Amazon Customer Profiles Profile using the resource `id`. For example: * * ```sh * $ pulumi import aws:customerprofiles/profile:Profile example domain-name/5f2f473dfbe841eb8d05cfc2a4c926df * ``` */ class Profile extends pulumi.CustomResource { /** * Get an existing Profile 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 Profile(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Profile. 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'] === Profile.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["accountNumber"] = state ? state.accountNumber : undefined; resourceInputs["additionalInformation"] = state ? state.additionalInformation : undefined; resourceInputs["address"] = state ? state.address : undefined; resourceInputs["attributes"] = state ? state.attributes : undefined; resourceInputs["billingAddress"] = state ? state.billingAddress : undefined; resourceInputs["birthDate"] = state ? state.birthDate : undefined; resourceInputs["businessEmailAddress"] = state ? state.businessEmailAddress : undefined; resourceInputs["businessName"] = state ? state.businessName : undefined; resourceInputs["businessPhoneNumber"] = state ? state.businessPhoneNumber : undefined; resourceInputs["domainName"] = state ? state.domainName : undefined; resourceInputs["emailAddress"] = state ? state.emailAddress : undefined; resourceInputs["firstName"] = state ? state.firstName : undefined; resourceInputs["genderString"] = state ? state.genderString : undefined; resourceInputs["homePhoneNumber"] = state ? state.homePhoneNumber : undefined; resourceInputs["lastName"] = state ? state.lastName : undefined; resourceInputs["mailingAddress"] = state ? state.mailingAddress : undefined; resourceInputs["middleName"] = state ? state.middleName : undefined; resourceInputs["mobilePhoneNumber"] = state ? state.mobilePhoneNumber : undefined; resourceInputs["partyTypeString"] = state ? state.partyTypeString : undefined; resourceInputs["personalEmailAddress"] = state ? state.personalEmailAddress : undefined; resourceInputs["phoneNumber"] = state ? state.phoneNumber : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["shippingAddress"] = state ? state.shippingAddress : undefined; } else { const args = argsOrState; if ((!args || args.domainName === undefined) && !opts.urn) { throw new Error("Missing required property 'domainName'"); } resourceInputs["accountNumber"] = args ? args.accountNumber : undefined; resourceInputs["additionalInformation"] = args ? args.additionalInformation : undefined; resourceInputs["address"] = args ? args.address : undefined; resourceInputs["attributes"] = args ? args.attributes : undefined; resourceInputs["billingAddress"] = args ? args.billingAddress : undefined; resourceInputs["birthDate"] = args ? args.birthDate : undefined; resourceInputs["businessEmailAddress"] = args ? args.businessEmailAddress : undefined; resourceInputs["businessName"] = args ? args.businessName : undefined; resourceInputs["businessPhoneNumber"] = args ? args.businessPhoneNumber : undefined; resourceInputs["domainName"] = args ? args.domainName : undefined; resourceInputs["emailAddress"] = args ? args.emailAddress : undefined; resourceInputs["firstName"] = args ? args.firstName : undefined; resourceInputs["genderString"] = args ? args.genderString : undefined; resourceInputs["homePhoneNumber"] = args ? args.homePhoneNumber : undefined; resourceInputs["lastName"] = args ? args.lastName : undefined; resourceInputs["mailingAddress"] = args ? args.mailingAddress : undefined; resourceInputs["middleName"] = args ? args.middleName : undefined; resourceInputs["mobilePhoneNumber"] = args ? args.mobilePhoneNumber : undefined; resourceInputs["partyTypeString"] = args ? args.partyTypeString : undefined; resourceInputs["personalEmailAddress"] = args ? args.personalEmailAddress : undefined; resourceInputs["phoneNumber"] = args ? args.phoneNumber : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["shippingAddress"] = args ? args.shippingAddress : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Profile.__pulumiType, name, resourceInputs, opts); } } exports.Profile = Profile; /** @internal */ Profile.__pulumiType = 'aws:customerprofiles/profile:Profile'; //# sourceMappingURL=profile.js.map