UNPKG

@pulumi/fastly

Version:

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

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