1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. esa
  5. Routine
Alibaba Cloud v3.82.0 published on Tuesday, Jul 8, 2025 by Pulumi

alicloud.esa.Routine

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.82.0 published on Tuesday, Jul 8, 2025 by Pulumi

    Provides a ESA Routine resource.

    For information about ESA Routine and how to use it, see What is Routine.

    NOTE: Available since v1.251.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "terraform-example";
    const _default = new alicloud.esa.Routine("default", {
        description: name,
        name: name,
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "terraform-example"
    default = alicloud.esa.Routine("default",
        description=name,
        name=name)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/esa"
    	"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, "")
    		name := "terraform-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		_, err := esa.NewRoutine(ctx, "default", &esa.RoutineArgs{
    			Description: pulumi.String(name),
    			Name:        pulumi.String(name),
    		})
    		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 config = new Config();
        var name = config.Get("name") ?? "terraform-example";
        var @default = new AliCloud.Esa.Routine("default", new()
        {
            Description = name,
            Name = name,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.esa.Routine;
    import com.pulumi.alicloud.esa.RoutineArgs;
    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 name = config.get("name").orElse("terraform-example");
            var default_ = new Routine("default", RoutineArgs.builder()
                .description(name)
                .name(name)
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: terraform-example
    resources:
      default:
        type: alicloud:esa:Routine
        properties:
          description: ${name}
          name: ${name}
    

    Create Routine Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Routine(name: string, args?: RoutineArgs, opts?: CustomResourceOptions);
    @overload
    def Routine(resource_name: str,
                args: Optional[RoutineArgs] = None,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Routine(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                description: Optional[str] = None,
                name: Optional[str] = None)
    func NewRoutine(ctx *Context, name string, args *RoutineArgs, opts ...ResourceOption) (*Routine, error)
    public Routine(string name, RoutineArgs? args = null, CustomResourceOptions? opts = null)
    public Routine(String name, RoutineArgs args)
    public Routine(String name, RoutineArgs args, CustomResourceOptions options)
    
    type: alicloud:esa:Routine
    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 RoutineArgs
    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 RoutineArgs
    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 RoutineArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RoutineArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RoutineArgs
    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 routineResource = new AliCloud.Esa.Routine("routineResource", new()
    {
        Description = "string",
        Name = "string",
    });
    
    example, err := esa.NewRoutine(ctx, "routineResource", &esa.RoutineArgs{
    	Description: pulumi.String("string"),
    	Name:        pulumi.String("string"),
    })
    
    var routineResource = new Routine("routineResource", RoutineArgs.builder()
        .description("string")
        .name("string")
        .build());
    
    routine_resource = alicloud.esa.Routine("routineResource",
        description="string",
        name="string")
    
    const routineResource = new alicloud.esa.Routine("routineResource", {
        description: "string",
        name: "string",
    });
    
    type: alicloud:esa:Routine
    properties:
        description: string
        name: string
    

    Routine 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 Routine resource accepts the following input properties:

    Description string
    The routine name, which must be unique in the same account.
    Name string
    Routine Name
    Description string
    The routine name, which must be unique in the same account.
    Name string
    Routine Name
    description String
    The routine name, which must be unique in the same account.
    name String
    Routine Name
    description string
    The routine name, which must be unique in the same account.
    name string
    Routine Name
    description str
    The routine name, which must be unique in the same account.
    name str
    Routine Name
    description String
    The routine name, which must be unique in the same account.
    name String
    Routine Name

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Routine resource produces the following output properties:

    CreateTime string
    The time when the routine was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    CreateTime string
    The time when the routine was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    createTime String
    The time when the routine was created.
    id String
    The provider-assigned unique ID for this managed resource.
    createTime string
    The time when the routine was created.
    id string
    The provider-assigned unique ID for this managed resource.
    create_time str
    The time when the routine was created.
    id str
    The provider-assigned unique ID for this managed resource.
    createTime String
    The time when the routine was created.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Routine Resource

    Get an existing Routine 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?: RoutineState, opts?: CustomResourceOptions): Routine
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            create_time: Optional[str] = None,
            description: Optional[str] = None,
            name: Optional[str] = None) -> Routine
    func GetRoutine(ctx *Context, name string, id IDInput, state *RoutineState, opts ...ResourceOption) (*Routine, error)
    public static Routine Get(string name, Input<string> id, RoutineState? state, CustomResourceOptions? opts = null)
    public static Routine get(String name, Output<String> id, RoutineState state, CustomResourceOptions options)
    resources:  _:    type: alicloud:esa:Routine    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.
    The following state arguments are supported:
    CreateTime string
    The time when the routine was created.
    Description string
    The routine name, which must be unique in the same account.
    Name string
    Routine Name
    CreateTime string
    The time when the routine was created.
    Description string
    The routine name, which must be unique in the same account.
    Name string
    Routine Name
    createTime String
    The time when the routine was created.
    description String
    The routine name, which must be unique in the same account.
    name String
    Routine Name
    createTime string
    The time when the routine was created.
    description string
    The routine name, which must be unique in the same account.
    name string
    Routine Name
    create_time str
    The time when the routine was created.
    description str
    The routine name, which must be unique in the same account.
    name str
    Routine Name
    createTime String
    The time when the routine was created.
    description String
    The routine name, which must be unique in the same account.
    name String
    Routine Name

    Import

    ESA Routine can be imported using the id, e.g.

    $ pulumi import alicloud:esa/routine:Routine example <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.
    alicloud logo
    Alibaba Cloud v3.82.0 published on Tuesday, Jul 8, 2025 by Pulumi