@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
109 lines • 4.18 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.Profile = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Resource for managing a Roles Anywhere Profile.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const test = new aws.iam.Role("test", {
* name: "test",
* path: "/",
* assumeRolePolicy: JSON.stringify({
* Version: "2012-10-17",
* Statement: [{
* Action: [
* "sts:AssumeRole",
* "sts:TagSession",
* "sts:SetSourceIdentity",
* ],
* Principal: {
* Service: "rolesanywhere.amazonaws.com",
* },
* Effect: "Allow",
* Sid: "",
* }],
* }),
* });
* const testProfile = new aws.rolesanywhere.Profile("test", {
* name: "example",
* roleArns: [test.arn],
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import `aws_rolesanywhere_profile` using its `id`. For example:
*
* ```sh
* $ pulumi import aws:rolesanywhere/profile:Profile example db138a85-8925-4f9f-a409-08231233cacf
* ```
*/
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, { ...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["arn"] = state?.arn;
resourceInputs["durationSeconds"] = state?.durationSeconds;
resourceInputs["enabled"] = state?.enabled;
resourceInputs["managedPolicyArns"] = state?.managedPolicyArns;
resourceInputs["name"] = state?.name;
resourceInputs["requireInstanceProperties"] = state?.requireInstanceProperties;
resourceInputs["roleArns"] = state?.roleArns;
resourceInputs["sessionPolicy"] = state?.sessionPolicy;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
}
else {
const args = argsOrState;
resourceInputs["durationSeconds"] = args?.durationSeconds;
resourceInputs["enabled"] = args?.enabled;
resourceInputs["managedPolicyArns"] = args?.managedPolicyArns;
resourceInputs["name"] = args?.name;
resourceInputs["requireInstanceProperties"] = args?.requireInstanceProperties;
resourceInputs["roleArns"] = args?.roleArns;
resourceInputs["sessionPolicy"] = args?.sessionPolicy;
resourceInputs["tags"] = args?.tags;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Profile.__pulumiType, name, resourceInputs, opts);
}
}
exports.Profile = Profile;
/** @internal */
Profile.__pulumiType = 'aws:rolesanywhere/profile:Profile';
//# sourceMappingURL=profile.js.map