UNPKG

@pulumi/aws

Version:

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

86 lines 3.61 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.BucketAccessKey = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages a Lightsail bucket access key. Use this resource to create credentials that allow programmatic access to your Lightsail bucket via API requests. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.lightsail.Bucket("example", { * name: "example-bucket", * bundleId: "small_1_0", * }); * const exampleBucketAccessKey = new aws.lightsail.BucketAccessKey("example", {bucketName: example.id}); * ``` * * ## Import * * Using `pulumi import`, import `aws_lightsail_bucket_access_key` using the `id` attribute. For example: * * ```sh * $ pulumi import aws:lightsail/bucketAccessKey:BucketAccessKey example example-bucket,AKIAIOSFODNN7EXAMPLE * ``` */ class BucketAccessKey extends pulumi.CustomResource { /** * Get an existing BucketAccessKey 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 BucketAccessKey(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of BucketAccessKey. 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'] === BucketAccessKey.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["accessKeyId"] = state?.accessKeyId; resourceInputs["bucketName"] = state?.bucketName; resourceInputs["createdAt"] = state?.createdAt; resourceInputs["region"] = state?.region; resourceInputs["secretAccessKey"] = state?.secretAccessKey; resourceInputs["status"] = state?.status; } else { const args = argsOrState; if (args?.bucketName === undefined && !opts.urn) { throw new Error("Missing required property 'bucketName'"); } resourceInputs["bucketName"] = args?.bucketName; resourceInputs["region"] = args?.region; resourceInputs["accessKeyId"] = undefined /*out*/; resourceInputs["createdAt"] = undefined /*out*/; resourceInputs["secretAccessKey"] = undefined /*out*/; resourceInputs["status"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(BucketAccessKey.__pulumiType, name, resourceInputs, opts); } } exports.BucketAccessKey = BucketAccessKey; /** @internal */ BucketAccessKey.__pulumiType = 'aws:lightsail/bucketAccessKey:BucketAccessKey'; //# sourceMappingURL=bucketAccessKey.js.map