@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
88 lines • 3.91 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.PrincipalPortfolioAssociation = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Manages a Service Catalog Principal Portfolio Association.
*
* ## Example Usage
*
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.servicecatalog.PrincipalPortfolioAssociation("example", {
* portfolioId: "port-68656c6c6f",
* principalArn: "arn:aws:iam::123456789012:user/Eleanor",
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import `aws_servicecatalog_principal_portfolio_association` using `accept_language`, `principal_arn`, `portfolio_id`, and `principal_type` separated by a comma. For example:
*
* ```sh
* $ pulumi import aws:servicecatalog/principalPortfolioAssociation:PrincipalPortfolioAssociation example en,arn:aws:iam::123456789012:user/Eleanor,port-68656c6c6f,IAM
* ```
*/
class PrincipalPortfolioAssociation extends pulumi.CustomResource {
/**
* Get an existing PrincipalPortfolioAssociation 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 PrincipalPortfolioAssociation(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of PrincipalPortfolioAssociation. 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'] === PrincipalPortfolioAssociation.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["acceptLanguage"] = state?.acceptLanguage;
resourceInputs["portfolioId"] = state?.portfolioId;
resourceInputs["principalArn"] = state?.principalArn;
resourceInputs["principalType"] = state?.principalType;
resourceInputs["region"] = state?.region;
}
else {
const args = argsOrState;
if (args?.portfolioId === undefined && !opts.urn) {
throw new Error("Missing required property 'portfolioId'");
}
if (args?.principalArn === undefined && !opts.urn) {
throw new Error("Missing required property 'principalArn'");
}
resourceInputs["acceptLanguage"] = args?.acceptLanguage;
resourceInputs["portfolioId"] = args?.portfolioId;
resourceInputs["principalArn"] = args?.principalArn;
resourceInputs["principalType"] = args?.principalType;
resourceInputs["region"] = args?.region;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(PrincipalPortfolioAssociation.__pulumiType, name, resourceInputs, opts);
}
}
exports.PrincipalPortfolioAssociation = PrincipalPortfolioAssociation;
/** @internal */
PrincipalPortfolioAssociation.__pulumiType = 'aws:servicecatalog/principalPortfolioAssociation:PrincipalPortfolioAssociation';
//# sourceMappingURL=principalPortfolioAssociation.js.map