1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. ros
  5. Template
Alibaba Cloud v3.49.1 published on Wednesday, Feb 28, 2024 by Pulumi

alicloud.ros.Template

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.49.1 published on Wednesday, Feb 28, 2024 by Pulumi

    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

    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()
        {
            TemplateBody = @"    {
        	""ROSTemplateFormatVersion"": ""2015-09-01""
        }
        
    ",
            TemplateName = "example_value",
        });
    
    });
    
    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{
    			TemplateBody: pulumi.String("    {\n    	\"ROSTemplateFormatVersion\": \"2015-09-01\"\n    }\n    \n"),
    			TemplateName: pulumi.String("example_value"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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()        
                .templateBody("""
        {
        	"ROSTemplateFormatVersion": "2015-09-01"
        }
        
                """)
                .templateName("example_value")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    example = alicloud.ros.Template("example",
        template_body="""    {
        	"ROSTemplateFormatVersion": "2015-09-01"
        }
        
    """,
        template_name="example_value")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const example = new alicloud.ros.Template("example", {
        templateBody: `    {
        	"ROSTemplateFormatVersion": "2015-09-01"
        }
        
    `,
        templateName: "example_value",
    });
    
    resources:
      example:
        type: alicloud:ros:Template
        properties:
          templateBody: "    {\n    \t\"ROSTemplateFormatVersion\": \"2015-09-01\"\n    }\n    \n"
          templateName: example_value
    

    Create Template Resource

    new Template(name: string, args: TemplateArgs, opts?: CustomResourceOptions);
    @overload
    def Template(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 description: Optional[str] = None,
                 tags: Optional[Mapping[str, Any]] = None,
                 template_body: Optional[str] = None,
                 template_name: Optional[str] = None,
                 template_url: Optional[str] = None)
    @overload
    def Template(resource_name: str,
                 args: TemplateArgs,
                 opts: Optional[ResourceOptions] = 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.
    
    
    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.

    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

    The Template resource accepts the following input properties:

    TemplateName 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.
    Tags Dictionary<string, object>
    A mapping of tags to assign to the resource.
    TemplateBody 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.
    TemplateUrl string
    The template url.
    TemplateName 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.
    Tags map[string]interface{}
    A mapping of tags to assign to the resource.
    TemplateBody 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.
    TemplateUrl string
    The template url.
    templateName 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.
    tags Map<String,Object>
    A mapping of tags to assign to the resource.
    templateBody 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.
    templateUrl String
    The template url.
    templateName 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.
    tags {[key: string]: any}
    A mapping of tags to assign to the resource.
    templateBody 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.
    templateUrl 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.
    tags Mapping[str, Any]
    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.
    templateName 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.
    tags Map<Any>
    A mapping of tags to assign to the resource.
    templateBody 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.
    templateUrl 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, Any]] = 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.
    The following state arguments are supported:
    Description string
    The description of the template. The description can be up to 256 characters in length.
    Tags Dictionary<string, object>
    A mapping of tags to assign to the resource.
    TemplateBody 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.
    TemplateName 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.
    TemplateUrl string
    The template url.
    Description string
    The description of the template. The description can be up to 256 characters in length.
    Tags map[string]interface{}
    A mapping of tags to assign to the resource.
    TemplateBody 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.
    TemplateName 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.
    TemplateUrl string
    The template url.
    description String
    The description of the template. The description can be up to 256 characters in length.
    tags Map<String,Object>
    A mapping of tags to assign to the resource.
    templateBody 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.
    templateName 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.
    templateUrl String
    The template url.
    description string
    The description of the template. The description can be up to 256 characters in length.
    tags {[key: string]: any}
    A mapping of tags to assign to the resource.
    templateBody 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.
    templateName 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.
    templateUrl string
    The template url.
    description str
    The description of the template. The description can be up to 256 characters in length.
    tags Mapping[str, Any]
    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.
    tags Map<Any>
    A mapping of tags to assign to the resource.
    templateBody 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.
    templateName 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.
    templateUrl String
    The template url.

    Import

    ROS Template can be imported using the id, e.g.

    $ pulumi import alicloud:ros/template:Template example <template_id>
    

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.49.1 published on Wednesday, Feb 28, 2024 by Pulumi