alicloud.ros.Template
Explore with Pulumi AI
Provides a ROS Template resource.
For information about ROS Template and how to use it, see What is Template.
NOTE: Available in v1.108.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const example = new alicloud.ros.Template("example", {
templateName: "example_value",
templateBody: ` {
\x09"ROSTemplateFormatVersion": "2015-09-01"
}
`,
});
import pulumi
import pulumi_alicloud as alicloud
example = alicloud.ros.Template("example",
template_name="example_value",
template_body=""" {
\x09"ROSTemplateFormatVersion": "2015-09-01"
}
""")
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ros"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ros.NewTemplate(ctx, "example", &ros.TemplateArgs{
TemplateName: pulumi.String("example_value"),
TemplateBody: pulumi.String(" {\n \"ROSTemplateFormatVersion\": \"2015-09-01\"\n }\n"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var example = new AliCloud.Ros.Template("example", new()
{
TemplateName = "example_value",
TemplateBody = @" {
""ROSTemplateFormatVersion"": ""2015-09-01""
}
",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ros.Template;
import com.pulumi.alicloud.ros.TemplateArgs;
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 example = new Template("example", TemplateArgs.builder()
.templateName("example_value")
.templateBody("""
{
"ROSTemplateFormatVersion": "2015-09-01"
}
""")
.build());
}
}
resources:
example:
type: alicloud:ros:Template
properties:
templateName: example_value
templateBody: |2
{
"ROSTemplateFormatVersion": "2015-09-01"
}
Create Template Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Template(name: string, args: TemplateArgs, opts?: CustomResourceOptions);
@overload
def Template(resource_name: str,
args: TemplateArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Template(resource_name: str,
opts: Optional[ResourceOptions] = None,
template_name: Optional[str] = None,
description: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
template_body: Optional[str] = None,
template_url: Optional[str] = None)
func NewTemplate(ctx *Context, name string, args TemplateArgs, opts ...ResourceOption) (*Template, error)
public Template(string name, TemplateArgs args, CustomResourceOptions? opts = null)
public Template(String name, TemplateArgs args)
public Template(String name, TemplateArgs args, CustomResourceOptions options)
type: alicloud:ros:Template
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 TemplateArgs
- 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 TemplateArgs
- 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 TemplateArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TemplateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TemplateArgs
- 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 alicloudTemplateResource = new AliCloud.Ros.Template("alicloudTemplateResource", new()
{
TemplateName = "string",
Description = "string",
Tags =
{
{ "string", "string" },
},
TemplateBody = "string",
TemplateUrl = "string",
});
example, err := ros.NewTemplate(ctx, "alicloudTemplateResource", &ros.TemplateArgs{
TemplateName: pulumi.String("string"),
Description: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
TemplateBody: pulumi.String("string"),
TemplateUrl: pulumi.String("string"),
})
var alicloudTemplateResource = new Template("alicloudTemplateResource", TemplateArgs.builder()
.templateName("string")
.description("string")
.tags(Map.of("string", "string"))
.templateBody("string")
.templateUrl("string")
.build());
alicloud_template_resource = alicloud.ros.Template("alicloudTemplateResource",
template_name="string",
description="string",
tags={
"string": "string",
},
template_body="string",
template_url="string")
const alicloudTemplateResource = new alicloud.ros.Template("alicloudTemplateResource", {
templateName: "string",
description: "string",
tags: {
string: "string",
},
templateBody: "string",
templateUrl: "string",
});
type: alicloud:ros:Template
properties:
description: string
tags:
string: string
templateBody: string
templateName: string
templateUrl: string
Template 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 Template resource accepts the following input properties:
- Template
Name string - The name of the template. The name can be up to 255 characters in length and can contain digits, letters, hyphens (-), and underscores (_). It must start with a digit or letter.
- Description string
- The description of the template. The description can be up to 256 characters in length.
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Template
Body string - The structure that contains the template body. The template body must be 1 to 524,288 bytes in length. If the length of the template body is longer than required, we recommend that you add parameters to the HTTP POST request body to avoid request failures due to excessive length of URLs. You must specify one of the TemplateBody and TemplateURL parameters, but you cannot specify both of them.
- Template
Url string - The template url.
- Template
Name string - The name of the template. The name can be up to 255 characters in length and can contain digits, letters, hyphens (-), and underscores (_). It must start with a digit or letter.
- Description string
- The description of the template. The description can be up to 256 characters in length.
- map[string]string
- A mapping of tags to assign to the resource.
- Template
Body string - The structure that contains the template body. The template body must be 1 to 524,288 bytes in length. If the length of the template body is longer than required, we recommend that you add parameters to the HTTP POST request body to avoid request failures due to excessive length of URLs. You must specify one of the TemplateBody and TemplateURL parameters, but you cannot specify both of them.
- Template
Url string - The template url.
- template
Name String - The name of the template. The name can be up to 255 characters in length and can contain digits, letters, hyphens (-), and underscores (_). It must start with a digit or letter.
- description String
- The description of the template. The description can be up to 256 characters in length.
- Map<String,String>
- A mapping of tags to assign to the resource.
- template
Body String - The structure that contains the template body. The template body must be 1 to 524,288 bytes in length. If the length of the template body is longer than required, we recommend that you add parameters to the HTTP POST request body to avoid request failures due to excessive length of URLs. You must specify one of the TemplateBody and TemplateURL parameters, but you cannot specify both of them.
- template
Url String - The template url.
- template
Name string - The name of the template. The name can be up to 255 characters in length and can contain digits, letters, hyphens (-), and underscores (_). It must start with a digit or letter.
- description string
- The description of the template. The description can be up to 256 characters in length.
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- template
Body string - The structure that contains the template body. The template body must be 1 to 524,288 bytes in length. If the length of the template body is longer than required, we recommend that you add parameters to the HTTP POST request body to avoid request failures due to excessive length of URLs. You must specify one of the TemplateBody and TemplateURL parameters, but you cannot specify both of them.
- template
Url string - The template url.
- template_
name str - The name of the template. The name can be up to 255 characters in length and can contain digits, letters, hyphens (-), and underscores (_). It must start with a digit or letter.
- description str
- The description of the template. The description can be up to 256 characters in length.
- Mapping[str, str]
- A mapping of tags to assign to the resource.
- template_
body str - The structure that contains the template body. The template body must be 1 to 524,288 bytes in length. If the length of the template body is longer than required, we recommend that you add parameters to the HTTP POST request body to avoid request failures due to excessive length of URLs. You must specify one of the TemplateBody and TemplateURL parameters, but you cannot specify both of them.
- template_
url str - The template url.
- template
Name String - The name of the template. The name can be up to 255 characters in length and can contain digits, letters, hyphens (-), and underscores (_). It must start with a digit or letter.
- description String
- The description of the template. The description can be up to 256 characters in length.
- Map<String>
- A mapping of tags to assign to the resource.
- template
Body String - The structure that contains the template body. The template body must be 1 to 524,288 bytes in length. If the length of the template body is longer than required, we recommend that you add parameters to the HTTP POST request body to avoid request failures due to excessive length of URLs. You must specify one of the TemplateBody and TemplateURL parameters, but you cannot specify both of them.
- template
Url String - The template url.
Outputs
All input properties are implicitly available as output properties. Additionally, the Template 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 Template Resource
Get an existing Template 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?: TemplateState, opts?: CustomResourceOptions): Template
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
template_body: Optional[str] = None,
template_name: Optional[str] = None,
template_url: Optional[str] = None) -> Template
func GetTemplate(ctx *Context, name string, id IDInput, state *TemplateState, opts ...ResourceOption) (*Template, error)
public static Template Get(string name, Input<string> id, TemplateState? state, CustomResourceOptions? opts = null)
public static Template get(String name, Output<String> id, TemplateState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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 template. The description can be up to 256 characters in length.
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Template
Body string - The structure that contains the template body. The template body must be 1 to 524,288 bytes in length. If the length of the template body is longer than required, we recommend that you add parameters to the HTTP POST request body to avoid request failures due to excessive length of URLs. You must specify one of the TemplateBody and TemplateURL parameters, but you cannot specify both of them.
- Template
Name string - The name of the template. The name can be up to 255 characters in length and can contain digits, letters, hyphens (-), and underscores (_). It must start with a digit or letter.
- Template
Url string - The template url.
- Description string
- The description of the template. The description can be up to 256 characters in length.
- map[string]string
- A mapping of tags to assign to the resource.
- Template
Body string - The structure that contains the template body. The template body must be 1 to 524,288 bytes in length. If the length of the template body is longer than required, we recommend that you add parameters to the HTTP POST request body to avoid request failures due to excessive length of URLs. You must specify one of the TemplateBody and TemplateURL parameters, but you cannot specify both of them.
- Template
Name string - The name of the template. The name can be up to 255 characters in length and can contain digits, letters, hyphens (-), and underscores (_). It must start with a digit or letter.
- Template
Url string - The template url.
- description String
- The description of the template. The description can be up to 256 characters in length.
- Map<String,String>
- A mapping of tags to assign to the resource.
- template
Body String - The structure that contains the template body. The template body must be 1 to 524,288 bytes in length. If the length of the template body is longer than required, we recommend that you add parameters to the HTTP POST request body to avoid request failures due to excessive length of URLs. You must specify one of the TemplateBody and TemplateURL parameters, but you cannot specify both of them.
- template
Name String - The name of the template. The name can be up to 255 characters in length and can contain digits, letters, hyphens (-), and underscores (_). It must start with a digit or letter.
- template
Url String - The template url.
- description string
- The description of the template. The description can be up to 256 characters in length.
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- template
Body string - The structure that contains the template body. The template body must be 1 to 524,288 bytes in length. If the length of the template body is longer than required, we recommend that you add parameters to the HTTP POST request body to avoid request failures due to excessive length of URLs. You must specify one of the TemplateBody and TemplateURL parameters, but you cannot specify both of them.
- template
Name string - The name of the template. The name can be up to 255 characters in length and can contain digits, letters, hyphens (-), and underscores (_). It must start with a digit or letter.
- template
Url string - The template url.
- description str
- The description of the template. The description can be up to 256 characters in length.
- Mapping[str, str]
- A mapping of tags to assign to the resource.
- template_
body str - The structure that contains the template body. The template body must be 1 to 524,288 bytes in length. If the length of the template body is longer than required, we recommend that you add parameters to the HTTP POST request body to avoid request failures due to excessive length of URLs. You must specify one of the TemplateBody and TemplateURL parameters, but you cannot specify both of them.
- template_
name str - The name of the template. The name can be up to 255 characters in length and can contain digits, letters, hyphens (-), and underscores (_). It must start with a digit or letter.
- template_
url str - The template url.
- description String
- The description of the template. The description can be up to 256 characters in length.
- Map<String>
- A mapping of tags to assign to the resource.
- template
Body String - The structure that contains the template body. The template body must be 1 to 524,288 bytes in length. If the length of the template body is longer than required, we recommend that you add parameters to the HTTP POST request body to avoid request failures due to excessive length of URLs. You must specify one of the TemplateBody and TemplateURL parameters, but you cannot specify both of them.
- template
Name String - The name of the template. The name can be up to 255 characters in length and can contain digits, letters, hyphens (-), and underscores (_). It must start with a digit or letter.
- template
Url String - The template url.
Import
ROS Template can be imported using the id, e.g.
$ pulumi import alicloud:ros/template:Template example <template_id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.