gcore.FastedgeTemplate
Explore with Pulumi AI
FastEdge application template.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcore from "@pulumi/gcore";
const testBinary = new gcore.FastedgeBinary("testBinary", {filename: "test.wasm"});
const testTemplate = new gcore.FastedgeTemplate("testTemplate", {
binary: testBinary.fastedgeBinaryId,
shortDescr: "short description",
longDescr: "long description",
params: [
{
name: "foo",
type: "string",
mandatory: true,
descr: "Parameter foo",
},
{
name: "bar",
type: "number",
descr: "Parameter bar",
},
],
});
import pulumi
import pulumi_gcore as gcore
test_binary = gcore.FastedgeBinary("testBinary", filename="test.wasm")
test_template = gcore.FastedgeTemplate("testTemplate",
binary=test_binary.fastedge_binary_id,
short_descr="short description",
long_descr="long description",
params=[
{
"name": "foo",
"type": "string",
"mandatory": True,
"descr": "Parameter foo",
},
{
"name": "bar",
"type": "number",
"descr": "Parameter bar",
},
])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/gcore/gcore"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
testBinary, err := gcore.NewFastedgeBinary(ctx, "testBinary", &gcore.FastedgeBinaryArgs{
Filename: pulumi.String("test.wasm"),
})
if err != nil {
return err
}
_, err = gcore.NewFastedgeTemplate(ctx, "testTemplate", &gcore.FastedgeTemplateArgs{
Binary: testBinary.FastedgeBinaryId,
ShortDescr: pulumi.String("short description"),
LongDescr: pulumi.String("long description"),
Params: gcore.FastedgeTemplateParamArray{
&gcore.FastedgeTemplateParamArgs{
Name: pulumi.String("foo"),
Type: pulumi.String("string"),
Mandatory: pulumi.Bool(true),
Descr: pulumi.String("Parameter foo"),
},
&gcore.FastedgeTemplateParamArgs{
Name: pulumi.String("bar"),
Type: pulumi.String("number"),
Descr: pulumi.String("Parameter bar"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcore = Pulumi.Gcore;
return await Deployment.RunAsync(() =>
{
var testBinary = new Gcore.FastedgeBinary("testBinary", new()
{
Filename = "test.wasm",
});
var testTemplate = new Gcore.FastedgeTemplate("testTemplate", new()
{
Binary = testBinary.FastedgeBinaryId,
ShortDescr = "short description",
LongDescr = "long description",
Params = new[]
{
new Gcore.Inputs.FastedgeTemplateParamArgs
{
Name = "foo",
Type = "string",
Mandatory = true,
Descr = "Parameter foo",
},
new Gcore.Inputs.FastedgeTemplateParamArgs
{
Name = "bar",
Type = "number",
Descr = "Parameter bar",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcore.FastedgeBinary;
import com.pulumi.gcore.FastedgeBinaryArgs;
import com.pulumi.gcore.FastedgeTemplate;
import com.pulumi.gcore.FastedgeTemplateArgs;
import com.pulumi.gcore.inputs.FastedgeTemplateParamArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var testBinary = new FastedgeBinary("testBinary", FastedgeBinaryArgs.builder()
.filename("test.wasm")
.build());
var testTemplate = new FastedgeTemplate("testTemplate", FastedgeTemplateArgs.builder()
.binary(testBinary.fastedgeBinaryId())
.shortDescr("short description")
.longDescr("long description")
.params(
FastedgeTemplateParamArgs.builder()
.name("foo")
.type("string")
.mandatory(true)
.descr("Parameter foo")
.build(),
FastedgeTemplateParamArgs.builder()
.name("bar")
.type("number")
.descr("Parameter bar")
.build())
.build());
}
}
resources:
testBinary:
type: gcore:FastedgeBinary
properties:
filename: test.wasm
testTemplate:
type: gcore:FastedgeTemplate
properties:
binary: ${testBinary.fastedgeBinaryId}
shortDescr: short description
longDescr: long description
params:
- name: foo
type: string
mandatory: true
descr: Parameter foo
- name: bar
type: number
descr: Parameter bar
Create FastedgeTemplate Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new FastedgeTemplate(name: string, args: FastedgeTemplateArgs, opts?: CustomResourceOptions);
@overload
def FastedgeTemplate(resource_name: str,
args: FastedgeTemplateArgs,
opts: Optional[ResourceOptions] = None)
@overload
def FastedgeTemplate(resource_name: str,
opts: Optional[ResourceOptions] = None,
binary: Optional[float] = None,
fastedge_template_id: Optional[str] = None,
long_descr: Optional[str] = None,
name: Optional[str] = None,
params: Optional[Sequence[FastedgeTemplateParamArgs]] = None,
short_descr: Optional[str] = None)
func NewFastedgeTemplate(ctx *Context, name string, args FastedgeTemplateArgs, opts ...ResourceOption) (*FastedgeTemplate, error)
public FastedgeTemplate(string name, FastedgeTemplateArgs args, CustomResourceOptions? opts = null)
public FastedgeTemplate(String name, FastedgeTemplateArgs args)
public FastedgeTemplate(String name, FastedgeTemplateArgs args, CustomResourceOptions options)
type: gcore:FastedgeTemplate
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args FastedgeTemplateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args FastedgeTemplateArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args FastedgeTemplateArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args FastedgeTemplateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args FastedgeTemplateArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var fastedgeTemplateResource = new Gcore.FastedgeTemplate("fastedgeTemplateResource", new()
{
Binary = 0,
FastedgeTemplateId = "string",
LongDescr = "string",
Name = "string",
Params = new[]
{
new Gcore.Inputs.FastedgeTemplateParamArgs
{
Name = "string",
Type = "string",
Descr = "string",
Mandatory = false,
},
},
ShortDescr = "string",
});
example, err := gcore.NewFastedgeTemplate(ctx, "fastedgeTemplateResource", &gcore.FastedgeTemplateArgs{
Binary: pulumi.Float64(0),
FastedgeTemplateId: pulumi.String("string"),
LongDescr: pulumi.String("string"),
Name: pulumi.String("string"),
Params: gcore.FastedgeTemplateParamArray{
&gcore.FastedgeTemplateParamArgs{
Name: pulumi.String("string"),
Type: pulumi.String("string"),
Descr: pulumi.String("string"),
Mandatory: pulumi.Bool(false),
},
},
ShortDescr: pulumi.String("string"),
})
var fastedgeTemplateResource = new FastedgeTemplate("fastedgeTemplateResource", FastedgeTemplateArgs.builder()
.binary(0)
.fastedgeTemplateId("string")
.longDescr("string")
.name("string")
.params(FastedgeTemplateParamArgs.builder()
.name("string")
.type("string")
.descr("string")
.mandatory(false)
.build())
.shortDescr("string")
.build());
fastedge_template_resource = gcore.FastedgeTemplate("fastedgeTemplateResource",
binary=0,
fastedge_template_id="string",
long_descr="string",
name="string",
params=[{
"name": "string",
"type": "string",
"descr": "string",
"mandatory": False,
}],
short_descr="string")
const fastedgeTemplateResource = new gcore.FastedgeTemplate("fastedgeTemplateResource", {
binary: 0,
fastedgeTemplateId: "string",
longDescr: "string",
name: "string",
params: [{
name: "string",
type: "string",
descr: "string",
mandatory: false,
}],
shortDescr: "string",
});
type: gcore:FastedgeTemplate
properties:
binary: 0
fastedgeTemplateId: string
longDescr: string
name: string
params:
- descr: string
mandatory: false
name: string
type: string
shortDescr: string
FastedgeTemplate Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The FastedgeTemplate resource accepts the following input properties:
- Binary double
- WebAssembly binary id.
- Fastedge
Template stringId - The ID of this resource.
- Long
Descr string - Instruction how to configure the template.
- Name string
- Template name.
- Params
List<Fastedge
Template Param> - Template parameter.
- Short
Descr string - Short description.
- Binary float64
- WebAssembly binary id.
- Fastedge
Template stringId - The ID of this resource.
- Long
Descr string - Instruction how to configure the template.
- Name string
- Template name.
- Params
[]Fastedge
Template Param Args - Template parameter.
- Short
Descr string - Short description.
- binary Double
- WebAssembly binary id.
- fastedge
Template StringId - The ID of this resource.
- long
Descr String - Instruction how to configure the template.
- name String
- Template name.
- params
List<Fastedge
Template Param> - Template parameter.
- short
Descr String - Short description.
- binary number
- WebAssembly binary id.
- fastedge
Template stringId - The ID of this resource.
- long
Descr string - Instruction how to configure the template.
- name string
- Template name.
- params
Fastedge
Template Param[] - Template parameter.
- short
Descr string - Short description.
- binary float
- WebAssembly binary id.
- fastedge_
template_ strid - The ID of this resource.
- long_
descr str - Instruction how to configure the template.
- name str
- Template name.
- params
Sequence[Fastedge
Template Param Args] - Template parameter.
- short_
descr str - Short description.
- binary Number
- WebAssembly binary id.
- fastedge
Template StringId - The ID of this resource.
- long
Descr String - Instruction how to configure the template.
- name String
- Template name.
- params List<Property Map>
- Template parameter.
- short
Descr String - Short description.
Outputs
All input properties are implicitly available as output properties. Additionally, the FastedgeTemplate resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing FastedgeTemplate Resource
Get an existing FastedgeTemplate resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: FastedgeTemplateState, opts?: CustomResourceOptions): FastedgeTemplate
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
binary: Optional[float] = None,
fastedge_template_id: Optional[str] = None,
long_descr: Optional[str] = None,
name: Optional[str] = None,
params: Optional[Sequence[FastedgeTemplateParamArgs]] = None,
short_descr: Optional[str] = None) -> FastedgeTemplate
func GetFastedgeTemplate(ctx *Context, name string, id IDInput, state *FastedgeTemplateState, opts ...ResourceOption) (*FastedgeTemplate, error)
public static FastedgeTemplate Get(string name, Input<string> id, FastedgeTemplateState? state, CustomResourceOptions? opts = null)
public static FastedgeTemplate get(String name, Output<String> id, FastedgeTemplateState state, CustomResourceOptions options)
resources: _: type: gcore:FastedgeTemplate get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Binary double
- WebAssembly binary id.
- Fastedge
Template stringId - The ID of this resource.
- Long
Descr string - Instruction how to configure the template.
- Name string
- Template name.
- Params
List<Fastedge
Template Param> - Template parameter.
- Short
Descr string - Short description.
- Binary float64
- WebAssembly binary id.
- Fastedge
Template stringId - The ID of this resource.
- Long
Descr string - Instruction how to configure the template.
- Name string
- Template name.
- Params
[]Fastedge
Template Param Args - Template parameter.
- Short
Descr string - Short description.
- binary Double
- WebAssembly binary id.
- fastedge
Template StringId - The ID of this resource.
- long
Descr String - Instruction how to configure the template.
- name String
- Template name.
- params
List<Fastedge
Template Param> - Template parameter.
- short
Descr String - Short description.
- binary number
- WebAssembly binary id.
- fastedge
Template stringId - The ID of this resource.
- long
Descr string - Instruction how to configure the template.
- name string
- Template name.
- params
Fastedge
Template Param[] - Template parameter.
- short
Descr string - Short description.
- binary float
- WebAssembly binary id.
- fastedge_
template_ strid - The ID of this resource.
- long_
descr str - Instruction how to configure the template.
- name str
- Template name.
- params
Sequence[Fastedge
Template Param Args] - Template parameter.
- short_
descr str - Short description.
- binary Number
- WebAssembly binary id.
- fastedge
Template StringId - The ID of this resource.
- long
Descr String - Instruction how to configure the template.
- name String
- Template name.
- params List<Property Map>
- Template parameter.
- short
Descr String - Short description.
Supporting Types
FastedgeTemplateParam, FastedgeTemplateParamArgs
Package Details
- Repository
- gcore g-core/terraform-provider-gcore
- License
- Notes
- This Pulumi package is based on the
gcore
Terraform Provider.