@pulumi/fastly
Version:
A Pulumi package for creating and managing fastly cloud resources.. Based on terraform-provider-fastly: version v4
89 lines • 4.26 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.ObjectStorageAccessKeys = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Provides an Object Storage Access Key, which can be used to manage resources in various clouds.
*
* Implements the [Object Storage Access Key API functions](https://www.fastly.com/documentation/reference/api/services/resources/object-storage-access-keys/)
*
* > **Note:** Access Keys cannot be updated, so when you change a value in any of the editable fields the key is destroyed and remade
*
* Basic usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as fastly from "@pulumi/fastly";
*
* const demo = new fastly.ObjectStorageAccessKeys("demo", {
* buckets: [
* "bucket1",
* "bucket2",
* ],
* description: "this is a bucket",
* permission: "",
* });
* ```
* > **Note:** Permissions can only be one of these values listed [here](https://quic.fastly.com/documentation/reference/api/services/resources/object-storage-access-keys/#permissions), any other values will return an error
*/
class ObjectStorageAccessKeys extends pulumi.CustomResource {
/**
* Get an existing ObjectStorageAccessKeys 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 ObjectStorageAccessKeys(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of ObjectStorageAccessKeys. 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'] === ObjectStorageAccessKeys.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["accessKeyId"] = state ? state.accessKeyId : undefined;
resourceInputs["buckets"] = state ? state.buckets : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["permission"] = state ? state.permission : undefined;
resourceInputs["secretKey"] = state ? state.secretKey : undefined;
}
else {
const args = argsOrState;
if ((!args || args.description === undefined) && !opts.urn) {
throw new Error("Missing required property 'description'");
}
if ((!args || args.permission === undefined) && !opts.urn) {
throw new Error("Missing required property 'permission'");
}
resourceInputs["buckets"] = args ? args.buckets : undefined;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["permission"] = args ? args.permission : undefined;
resourceInputs["accessKeyId"] = undefined /*out*/;
resourceInputs["secretKey"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["secretKey"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(ObjectStorageAccessKeys.__pulumiType, name, resourceInputs, opts);
}
}
exports.ObjectStorageAccessKeys = ObjectStorageAccessKeys;
/** @internal */
ObjectStorageAccessKeys.__pulumiType = 'fastly:index/objectStorageAccessKeys:ObjectStorageAccessKeys';
//# sourceMappingURL=objectStorageAccessKeys.js.map