flexibleengine.DliTemplateFlink
Explore with Pulumi AI
Manages a DLI Flink template resource within FlexibleEngine.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as flexibleengine from "@pulumi/flexibleengine";
const config = new pulumi.Config();
const sql = config.requireObject("sql");
const test = new flexibleengine.DliTemplateFlink("test", {
type: "flink_sql_job",
sql: sql,
description: "This is a demo",
tags: {
foo: "bar",
key: "value",
},
});
import pulumi
import pulumi_flexibleengine as flexibleengine
config = pulumi.Config()
sql = config.require_object("sql")
test = flexibleengine.DliTemplateFlink("test",
type="flink_sql_job",
sql=sql,
description="This is a demo",
tags={
"foo": "bar",
"key": "value",
})
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
sql := cfg.RequireObject("sql")
_, err := flexibleengine.NewDliTemplateFlink(ctx, "test", &flexibleengine.DliTemplateFlinkArgs{
Type: pulumi.String("flink_sql_job"),
Sql: pulumi.Any(sql),
Description: pulumi.String("This is a demo"),
Tags: pulumi.StringMap{
"foo": pulumi.String("bar"),
"key": pulumi.String("value"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Flexibleengine = Pulumi.Flexibleengine;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var sql = config.RequireObject<dynamic>("sql");
var test = new Flexibleengine.DliTemplateFlink("test", new()
{
Type = "flink_sql_job",
Sql = sql,
Description = "This is a demo",
Tags =
{
{ "foo", "bar" },
{ "key", "value" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.flexibleengine.DliTemplateFlink;
import com.pulumi.flexibleengine.DliTemplateFlinkArgs;
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) {
final var config = ctx.config();
final var sql = config.get("sql");
var test = new DliTemplateFlink("test", DliTemplateFlinkArgs.builder()
.type("flink_sql_job")
.sql(sql)
.description("This is a demo")
.tags(Map.ofEntries(
Map.entry("foo", "bar"),
Map.entry("key", "value")
))
.build());
}
}
configuration:
sql:
type: dynamic
resources:
test:
type: flexibleengine:DliTemplateFlink
properties:
type: flink_sql_job
sql: ${sql}
description: This is a demo
tags:
foo: bar
key: value
Create DliTemplateFlink Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DliTemplateFlink(name: string, args?: DliTemplateFlinkArgs, opts?: CustomResourceOptions);
@overload
def DliTemplateFlink(resource_name: str,
args: Optional[DliTemplateFlinkArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def DliTemplateFlink(resource_name: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
dli_template_flink_id: Optional[str] = None,
name: Optional[str] = None,
region: Optional[str] = None,
sql: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
type: Optional[str] = None)
func NewDliTemplateFlink(ctx *Context, name string, args *DliTemplateFlinkArgs, opts ...ResourceOption) (*DliTemplateFlink, error)
public DliTemplateFlink(string name, DliTemplateFlinkArgs? args = null, CustomResourceOptions? opts = null)
public DliTemplateFlink(String name, DliTemplateFlinkArgs args)
public DliTemplateFlink(String name, DliTemplateFlinkArgs args, CustomResourceOptions options)
type: flexibleengine:DliTemplateFlink
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 DliTemplateFlinkArgs
- 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 DliTemplateFlinkArgs
- 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 DliTemplateFlinkArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DliTemplateFlinkArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DliTemplateFlinkArgs
- 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 dliTemplateFlinkResource = new Flexibleengine.DliTemplateFlink("dliTemplateFlinkResource", new()
{
Description = "string",
DliTemplateFlinkId = "string",
Name = "string",
Region = "string",
Sql = "string",
Tags =
{
{ "string", "string" },
},
Type = "string",
});
example, err := flexibleengine.NewDliTemplateFlink(ctx, "dliTemplateFlinkResource", &flexibleengine.DliTemplateFlinkArgs{
Description: pulumi.String("string"),
DliTemplateFlinkId: pulumi.String("string"),
Name: pulumi.String("string"),
Region: pulumi.String("string"),
Sql: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
Type: pulumi.String("string"),
})
var dliTemplateFlinkResource = new DliTemplateFlink("dliTemplateFlinkResource", DliTemplateFlinkArgs.builder()
.description("string")
.dliTemplateFlinkId("string")
.name("string")
.region("string")
.sql("string")
.tags(Map.of("string", "string"))
.type("string")
.build());
dli_template_flink_resource = flexibleengine.DliTemplateFlink("dliTemplateFlinkResource",
description="string",
dli_template_flink_id="string",
name="string",
region="string",
sql="string",
tags={
"string": "string",
},
type="string")
const dliTemplateFlinkResource = new flexibleengine.DliTemplateFlink("dliTemplateFlinkResource", {
description: "string",
dliTemplateFlinkId: "string",
name: "string",
region: "string",
sql: "string",
tags: {
string: "string",
},
type: "string",
});
type: flexibleengine:DliTemplateFlink
properties:
description: string
dliTemplateFlinkId: string
name: string
region: string
sql: string
tags:
string: string
type: string
DliTemplateFlink 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 DliTemplateFlink resource accepts the following input properties:
- Description string
- The description of the flink template.
- Dli
Template stringFlink Id - The resource ID.
- Name string
- The name of the flink template.
- Region string
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- Sql string
- The statement of the flink template.
- Dictionary<string, string>
The key/value pairs to associate with the flink template.
Changing this parameter will create a new resource.
- Type string
The type of the flink template.
Valid values are flink_sql_job and flink_opensource_sql_job. Defaults to flink_sql_job.Changing this parameter will create a new resource.
- Description string
- The description of the flink template.
- Dli
Template stringFlink Id - The resource ID.
- Name string
- The name of the flink template.
- Region string
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- Sql string
- The statement of the flink template.
- map[string]string
The key/value pairs to associate with the flink template.
Changing this parameter will create a new resource.
- Type string
The type of the flink template.
Valid values are flink_sql_job and flink_opensource_sql_job. Defaults to flink_sql_job.Changing this parameter will create a new resource.
- description String
- The description of the flink template.
- dli
Template StringFlink Id - The resource ID.
- name String
- The name of the flink template.
- region String
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- sql String
- The statement of the flink template.
- Map<String,String>
The key/value pairs to associate with the flink template.
Changing this parameter will create a new resource.
- type String
The type of the flink template.
Valid values are flink_sql_job and flink_opensource_sql_job. Defaults to flink_sql_job.Changing this parameter will create a new resource.
- description string
- The description of the flink template.
- dli
Template stringFlink Id - The resource ID.
- name string
- The name of the flink template.
- region string
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- sql string
- The statement of the flink template.
- {[key: string]: string}
The key/value pairs to associate with the flink template.
Changing this parameter will create a new resource.
- type string
The type of the flink template.
Valid values are flink_sql_job and flink_opensource_sql_job. Defaults to flink_sql_job.Changing this parameter will create a new resource.
- description str
- The description of the flink template.
- dli_
template_ strflink_ id - The resource ID.
- name str
- The name of the flink template.
- region str
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- sql str
- The statement of the flink template.
- Mapping[str, str]
The key/value pairs to associate with the flink template.
Changing this parameter will create a new resource.
- type str
The type of the flink template.
Valid values are flink_sql_job and flink_opensource_sql_job. Defaults to flink_sql_job.Changing this parameter will create a new resource.
- description String
- The description of the flink template.
- dli
Template StringFlink Id - The resource ID.
- name String
- The name of the flink template.
- region String
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- sql String
- The statement of the flink template.
- Map<String>
The key/value pairs to associate with the flink template.
Changing this parameter will create a new resource.
- type String
The type of the flink template.
Valid values are flink_sql_job and flink_opensource_sql_job. Defaults to flink_sql_job.Changing this parameter will create a new resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the DliTemplateFlink 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 DliTemplateFlink Resource
Get an existing DliTemplateFlink 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?: DliTemplateFlinkState, opts?: CustomResourceOptions): DliTemplateFlink
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
dli_template_flink_id: Optional[str] = None,
name: Optional[str] = None,
region: Optional[str] = None,
sql: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
type: Optional[str] = None) -> DliTemplateFlink
func GetDliTemplateFlink(ctx *Context, name string, id IDInput, state *DliTemplateFlinkState, opts ...ResourceOption) (*DliTemplateFlink, error)
public static DliTemplateFlink Get(string name, Input<string> id, DliTemplateFlinkState? state, CustomResourceOptions? opts = null)
public static DliTemplateFlink get(String name, Output<String> id, DliTemplateFlinkState state, CustomResourceOptions options)
resources: _: type: flexibleengine:DliTemplateFlink 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.
- Description string
- The description of the flink template.
- Dli
Template stringFlink Id - The resource ID.
- Name string
- The name of the flink template.
- Region string
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- Sql string
- The statement of the flink template.
- Dictionary<string, string>
The key/value pairs to associate with the flink template.
Changing this parameter will create a new resource.
- Type string
The type of the flink template.
Valid values are flink_sql_job and flink_opensource_sql_job. Defaults to flink_sql_job.Changing this parameter will create a new resource.
- Description string
- The description of the flink template.
- Dli
Template stringFlink Id - The resource ID.
- Name string
- The name of the flink template.
- Region string
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- Sql string
- The statement of the flink template.
- map[string]string
The key/value pairs to associate with the flink template.
Changing this parameter will create a new resource.
- Type string
The type of the flink template.
Valid values are flink_sql_job and flink_opensource_sql_job. Defaults to flink_sql_job.Changing this parameter will create a new resource.
- description String
- The description of the flink template.
- dli
Template StringFlink Id - The resource ID.
- name String
- The name of the flink template.
- region String
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- sql String
- The statement of the flink template.
- Map<String,String>
The key/value pairs to associate with the flink template.
Changing this parameter will create a new resource.
- type String
The type of the flink template.
Valid values are flink_sql_job and flink_opensource_sql_job. Defaults to flink_sql_job.Changing this parameter will create a new resource.
- description string
- The description of the flink template.
- dli
Template stringFlink Id - The resource ID.
- name string
- The name of the flink template.
- region string
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- sql string
- The statement of the flink template.
- {[key: string]: string}
The key/value pairs to associate with the flink template.
Changing this parameter will create a new resource.
- type string
The type of the flink template.
Valid values are flink_sql_job and flink_opensource_sql_job. Defaults to flink_sql_job.Changing this parameter will create a new resource.
- description str
- The description of the flink template.
- dli_
template_ strflink_ id - The resource ID.
- name str
- The name of the flink template.
- region str
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- sql str
- The statement of the flink template.
- Mapping[str, str]
The key/value pairs to associate with the flink template.
Changing this parameter will create a new resource.
- type str
The type of the flink template.
Valid values are flink_sql_job and flink_opensource_sql_job. Defaults to flink_sql_job.Changing this parameter will create a new resource.
- description String
- The description of the flink template.
- dli
Template StringFlink Id - The resource ID.
- name String
- The name of the flink template.
- region String
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- sql String
- The statement of the flink template.
- Map<String>
The key/value pairs to associate with the flink template.
Changing this parameter will create a new resource.
- type String
The type of the flink template.
Valid values are flink_sql_job and flink_opensource_sql_job. Defaults to flink_sql_job.Changing this parameter will create a new resource.
Import
The flink template can be imported using the id
, e.g.
$ pulumi import flexibleengine:index/dliTemplateFlink:DliTemplateFlink test 1231
Note that the imported state may not be identical to your resource definition, due to some attributes missing from the
API response, security or some other reason. The missing attributes include:
tags
.
It is generally recommended running pulumi preview
after importing a resource.
You can then decide if changes should be applied to the resource, or the resource definition should be updated to align
with the resource. Also, you can ignore changes as below.
bash
resource “flexibleengine_dli_template_flink” “test” {
...
lifecycle {
ignore_changes = [
tags
]
}
}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- flexibleengine flexibleenginecloud/terraform-provider-flexibleengine
- License
- Notes
- This Pulumi package is based on the
flexibleengine
Terraform Provider.