UNPKG

@pulumi/aws

Version:

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

93 lines 3.97 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.ApplicationAccessScope = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Resource for managing an AWS SSO Admin Application Access Scope. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.ssoadmin.getInstances({}); * const exampleApplication = new aws.ssoadmin.Application("example", { * name: "example", * applicationProviderArn: "arn:aws:sso::aws:applicationProvider/custom", * instanceArn: example.then(example => example.arns?.[0]), * }); * const exampleApplicationAccessScope = new aws.ssoadmin.ApplicationAccessScope("example", { * applicationArn: exampleApplication.arn, * authorizedTargets: ["arn:aws:sso::123456789012:application/ssoins-123456789012/apl-123456789012"], * scope: "sso:account:access", * }); * ``` * * ## Import * * Using `pulumi import`, import SSO Admin Application Access Scope using the `id`. For example: * * ```sh * $ pulumi import aws:ssoadmin/applicationAccessScope:ApplicationAccessScope example arn:aws:sso::123456789012:application/ssoins-123456789012/apl-123456789012,sso:account:access * ``` */ class ApplicationAccessScope extends pulumi.CustomResource { /** * Get an existing ApplicationAccessScope 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 ApplicationAccessScope(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of ApplicationAccessScope. 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'] === ApplicationAccessScope.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["applicationArn"] = state?.applicationArn; resourceInputs["authorizedTargets"] = state?.authorizedTargets; resourceInputs["region"] = state?.region; resourceInputs["scope"] = state?.scope; } else { const args = argsOrState; if (args?.applicationArn === undefined && !opts.urn) { throw new Error("Missing required property 'applicationArn'"); } if (args?.scope === undefined && !opts.urn) { throw new Error("Missing required property 'scope'"); } resourceInputs["applicationArn"] = args?.applicationArn; resourceInputs["authorizedTargets"] = args?.authorizedTargets; resourceInputs["region"] = args?.region; resourceInputs["scope"] = args?.scope; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ApplicationAccessScope.__pulumiType, name, resourceInputs, opts); } } exports.ApplicationAccessScope = ApplicationAccessScope; /** @internal */ ApplicationAccessScope.__pulumiType = 'aws:ssoadmin/applicationAccessScope:ApplicationAccessScope'; //# sourceMappingURL=applicationAccessScope.js.map