UNPKG

@pulumi/fastly

Version:

A Pulumi package for creating and managing fastly cloud resources.. Based on terraform-provider-fastly: version v4

78 lines 3.82 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.ServiceDictionaryItems = 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_dictionary_items.items` * * The resource ID is a combined value of the `service_id` and `dictionary_id` separated by a forward slash. * * ```sh * $ pulumi import fastly:index/serviceDictionaryItems:ServiceDictionaryItems items xxxxxxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxx * ``` * * If Terraform is already managing remote dictionary items 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_dictionary_items.items` from the Terraform state file. * * $ terraform state rm fastly_service_dictionary_items.items */ class ServiceDictionaryItems extends pulumi.CustomResource { /** * Get an existing ServiceDictionaryItems 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 ServiceDictionaryItems(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of ServiceDictionaryItems. 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'] === ServiceDictionaryItems.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["dictionaryId"] = state ? state.dictionaryId : undefined; resourceInputs["items"] = state ? state.items : undefined; resourceInputs["manageItems"] = state ? state.manageItems : undefined; resourceInputs["serviceId"] = state ? state.serviceId : undefined; } else { const args = argsOrState; if ((!args || args.dictionaryId === undefined) && !opts.urn) { throw new Error("Missing required property 'dictionaryId'"); } if ((!args || args.serviceId === undefined) && !opts.urn) { throw new Error("Missing required property 'serviceId'"); } resourceInputs["dictionaryId"] = args ? args.dictionaryId : undefined; resourceInputs["items"] = args ? args.items : undefined; resourceInputs["manageItems"] = args ? args.manageItems : undefined; resourceInputs["serviceId"] = args ? args.serviceId : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ServiceDictionaryItems.__pulumiType, name, resourceInputs, opts); } } exports.ServiceDictionaryItems = ServiceDictionaryItems; /** @internal */ ServiceDictionaryItems.__pulumiType = 'fastly:index/serviceDictionaryItems:ServiceDictionaryItems'; //# sourceMappingURL=serviceDictionaryItems.js.map