UNPKG

@pulumi/aws

Version:

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

98 lines 4.44 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.AccessGrantsLocation = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a resource to manage an S3 Access Grants location. * A location is an S3 resource (bucket or prefix) in a permission grant that the grantee can access. * The S3 data must be in the same Region as your S3 Access Grants instance. * When you register a location, you must include the IAM role that has permission to manage the S3 location that you are registering. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.s3control.AccessGrantsInstance("example", {}); * const exampleAccessGrantsLocation = new aws.s3control.AccessGrantsLocation("example", { * iamRoleArn: exampleAwsIamRole.arn, * locationScope: "s3://", * }, { * dependsOn: [example], * }); * ``` * * ## Import * * Using `pulumi import`, import S3 Access Grants locations using the `account_id` and `access_grants_location_id`, separated by a comma (`,`). For example: * * ```sh * $ pulumi import aws:s3control/accessGrantsLocation:AccessGrantsLocation example 123456789012,default * ``` */ class AccessGrantsLocation extends pulumi.CustomResource { /** * Get an existing AccessGrantsLocation 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 AccessGrantsLocation(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of AccessGrantsLocation. 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'] === AccessGrantsLocation.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["accessGrantsLocationArn"] = state?.accessGrantsLocationArn; resourceInputs["accessGrantsLocationId"] = state?.accessGrantsLocationId; resourceInputs["accountId"] = state?.accountId; resourceInputs["iamRoleArn"] = state?.iamRoleArn; resourceInputs["locationScope"] = state?.locationScope; resourceInputs["region"] = state?.region; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; } else { const args = argsOrState; if (args?.iamRoleArn === undefined && !opts.urn) { throw new Error("Missing required property 'iamRoleArn'"); } if (args?.locationScope === undefined && !opts.urn) { throw new Error("Missing required property 'locationScope'"); } resourceInputs["accountId"] = args?.accountId; resourceInputs["iamRoleArn"] = args?.iamRoleArn; resourceInputs["locationScope"] = args?.locationScope; resourceInputs["region"] = args?.region; resourceInputs["tags"] = args?.tags; resourceInputs["accessGrantsLocationArn"] = undefined /*out*/; resourceInputs["accessGrantsLocationId"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(AccessGrantsLocation.__pulumiType, name, resourceInputs, opts); } } exports.AccessGrantsLocation = AccessGrantsLocation; /** @internal */ AccessGrantsLocation.__pulumiType = 'aws:s3control/accessGrantsLocation:AccessGrantsLocation'; //# sourceMappingURL=accessGrantsLocation.js.map