@pulumi/fastly
Version:
A Pulumi package for creating and managing fastly cloud resources.. Based on terraform-provider-fastly: version v4
78 lines • 3.7 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.ServiceACLEntries = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* ## Import
*
* This is an example of the import command being applied to the resource named `fastly_service_acl_entries.entries`
*
* The resource ID is a combined value of the `service_id` and `acl_id` separated by a forward slash.
*
* ```sh
* $ pulumi import fastly:index/serviceACLEntries:ServiceACLEntries entries xxxxxxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxx
* ```
*
* If Terraform is already managing remote acl entries against a resource being imported then the user will be asked to remove it from the existing Terraform state.
*
* The following is an example of the Terraform state command to remove the resource named `fastly_service_acl_entries.entries` from the Terraform state file.
*
* $ terraform state rm fastly_service_acl_entries.entries
*/
class ServiceACLEntries extends pulumi.CustomResource {
/**
* Get an existing ServiceACLEntries 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 ServiceACLEntries(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of ServiceACLEntries. 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'] === ServiceACLEntries.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["aclId"] = state ? state.aclId : undefined;
resourceInputs["entries"] = state ? state.entries : undefined;
resourceInputs["manageEntries"] = state ? state.manageEntries : undefined;
resourceInputs["serviceId"] = state ? state.serviceId : undefined;
}
else {
const args = argsOrState;
if ((!args || args.aclId === undefined) && !opts.urn) {
throw new Error("Missing required property 'aclId'");
}
if ((!args || args.serviceId === undefined) && !opts.urn) {
throw new Error("Missing required property 'serviceId'");
}
resourceInputs["aclId"] = args ? args.aclId : undefined;
resourceInputs["entries"] = args ? args.entries : undefined;
resourceInputs["manageEntries"] = args ? args.manageEntries : undefined;
resourceInputs["serviceId"] = args ? args.serviceId : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(ServiceACLEntries.__pulumiType, name, resourceInputs, opts);
}
}
exports.ServiceACLEntries = ServiceACLEntries;
/** @internal */
ServiceACLEntries.__pulumiType = 'fastly:index/serviceACLEntries:ServiceACLEntries';
//# sourceMappingURL=serviceACLEntries.js.map