UNPKG

@pulumi/aws

Version:

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

102 lines 4.66 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.AssessmentDelegation = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Resource for managing an AWS Audit Manager Assessment Delegation. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.auditmanager.AssessmentDelegation("example", { * assessmentId: exampleAwsAuditmanagerAssessment.id, * roleArn: exampleAwsIamRole.arn, * roleType: "RESOURCE_OWNER", * controlSetId: "example", * }); * ``` * * ## Import * * Using `pulumi import`, import Audit Manager Assessment Delegation using the `id`. For example: * * ```sh * $ pulumi import aws:auditmanager/assessmentDelegation:AssessmentDelegation example abcdef-123456,arn:aws:iam::123456789012:role/example,example * ``` */ class AssessmentDelegation extends pulumi.CustomResource { /** * Get an existing AssessmentDelegation 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 AssessmentDelegation(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of AssessmentDelegation. 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'] === AssessmentDelegation.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["assessmentId"] = state ? state.assessmentId : undefined; resourceInputs["comment"] = state ? state.comment : undefined; resourceInputs["controlSetId"] = state ? state.controlSetId : undefined; resourceInputs["delegationId"] = state ? state.delegationId : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["roleArn"] = state ? state.roleArn : undefined; resourceInputs["roleType"] = state ? state.roleType : undefined; resourceInputs["status"] = state ? state.status : undefined; } else { const args = argsOrState; if ((!args || args.assessmentId === undefined) && !opts.urn) { throw new Error("Missing required property 'assessmentId'"); } if ((!args || args.controlSetId === undefined) && !opts.urn) { throw new Error("Missing required property 'controlSetId'"); } if ((!args || args.roleArn === undefined) && !opts.urn) { throw new Error("Missing required property 'roleArn'"); } if ((!args || args.roleType === undefined) && !opts.urn) { throw new Error("Missing required property 'roleType'"); } resourceInputs["assessmentId"] = args ? args.assessmentId : undefined; resourceInputs["comment"] = args ? args.comment : undefined; resourceInputs["controlSetId"] = args ? args.controlSetId : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["roleArn"] = args ? args.roleArn : undefined; resourceInputs["roleType"] = args ? args.roleType : undefined; resourceInputs["delegationId"] = undefined /*out*/; resourceInputs["status"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(AssessmentDelegation.__pulumiType, name, resourceInputs, opts); } } exports.AssessmentDelegation = AssessmentDelegation; /** @internal */ AssessmentDelegation.__pulumiType = 'aws:auditmanager/assessmentDelegation:AssessmentDelegation'; //# sourceMappingURL=assessmentDelegation.js.map