alicloud logo
Alibaba Cloud v3.34.0, Mar 17 23

alicloud.oos.Execution

Provides a OOS Execution resource. For information about Alicloud OOS Execution and how to use it, see What is Resource Alicloud OOS Execution.

NOTE: Available in 1.93.0+.

Example Usage

using System.Collections.Generic;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var @default = new AliCloud.Oos.Template("default", new()
    {
        Content = @"  {
    ""FormatVersion"": ""OOS-2019-06-01"",
    ""Description"": ""Update Describe instances of given status"",
    ""Parameters"":{
      ""Status"":{
        ""Type"": ""String"",
        ""Description"": ""(Required) The status of the Ecs instance.""
      }
    },
    ""Tasks"": [
      {
        ""Properties"" :{
          ""Parameters"":{
            ""Status"": ""{{ Status }}""
          },
          ""API"": ""DescribeInstances"",
          ""Service"": ""Ecs""
        },
        ""Name"": ""foo"",
        ""Action"": ""ACS::ExecuteApi""
      }]
  }
",
        TemplateName = "test-name",
        VersionName = "test",
        Tags = 
        {
            { "Created", "TF" },
            { "For", "acceptance Test" },
        },
    });

    var example = new AliCloud.Oos.Execution("example", new()
    {
        TemplateName = @default.TemplateName,
        Description = "From TF Test",
        Parameters = @"				{""Status"":""Running""}
",
    });

});
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/oos"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := oos.NewTemplate(ctx, "default", &oos.TemplateArgs{
			Content: pulumi.String(fmt.Sprintf(`  {
    "FormatVersion": "OOS-2019-06-01",
    "Description": "Update Describe instances of given status",
    "Parameters":{
      "Status":{
        "Type": "String",
        "Description": "(Required) The status of the Ecs instance."
      }
    },
    "Tasks": [
      {
        "Properties" :{
          "Parameters":{
            "Status": "{{ Status }}"
          },
          "API": "DescribeInstances",
          "Service": "Ecs"
        },
        "Name": "foo",
        "Action": "ACS::ExecuteApi"
      }]
  }
`)),
			TemplateName: pulumi.String("test-name"),
			VersionName:  pulumi.String("test"),
			Tags: pulumi.AnyMap{
				"Created": pulumi.Any("TF"),
				"For":     pulumi.Any("acceptance Test"),
			},
		})
		if err != nil {
			return err
		}
		_, err = oos.NewExecution(ctx, "example", &oos.ExecutionArgs{
			TemplateName: _default.TemplateName,
			Description:  pulumi.String("From TF Test"),
			Parameters:   pulumi.String("				{\"Status\":\"Running\"}\n"),
		})
		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.oos.Template;
import com.pulumi.alicloud.oos.TemplateArgs;
import com.pulumi.alicloud.oos.Execution;
import com.pulumi.alicloud.oos.ExecutionArgs;
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 default_ = new Template("default", TemplateArgs.builder()        
            .content("""
  {
    "FormatVersion": "OOS-2019-06-01",
    "Description": "Update Describe instances of given status",
    "Parameters":{
      "Status":{
        "Type": "String",
        "Description": "(Required) The status of the Ecs instance."
      }
    },
    "Tasks": [
      {
        "Properties" :{
          "Parameters":{
            "Status": "{{ Status }}"
          },
          "API": "DescribeInstances",
          "Service": "Ecs"
        },
        "Name": "foo",
        "Action": "ACS::ExecuteApi"
      }]
  }
            """)
            .templateName("test-name")
            .versionName("test")
            .tags(Map.ofEntries(
                Map.entry("Created", "TF"),
                Map.entry("For", "acceptance Test")
            ))
            .build());

        var example = new Execution("example", ExecutionArgs.builder()        
            .templateName(default_.templateName())
            .description("From TF Test")
            .parameters("""
				{"Status":"Running"}
            """)
            .build());

    }
}
import pulumi
import pulumi_alicloud as alicloud

default = alicloud.oos.Template("default",
    content="""  {
    "FormatVersion": "OOS-2019-06-01",
    "Description": "Update Describe instances of given status",
    "Parameters":{
      "Status":{
        "Type": "String",
        "Description": "(Required) The status of the Ecs instance."
      }
    },
    "Tasks": [
      {
        "Properties" :{
          "Parameters":{
            "Status": "{{ Status }}"
          },
          "API": "DescribeInstances",
          "Service": "Ecs"
        },
        "Name": "foo",
        "Action": "ACS::ExecuteApi"
      }]
  }
""",
    template_name="test-name",
    version_name="test",
    tags={
        "Created": "TF",
        "For": "acceptance Test",
    })
example = alicloud.oos.Execution("example",
    template_name=default.template_name,
    description="From TF Test",
    parameters="				{\"Status\":\"Running\"}\n")
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const _default = new alicloud.oos.Template("default", {
    content: `  {
    "FormatVersion": "OOS-2019-06-01",
    "Description": "Update Describe instances of given status",
    "Parameters":{
      "Status":{
        "Type": "String",
        "Description": "(Required) The status of the Ecs instance."
      }
    },
    "Tasks": [
      {
        "Properties" :{
          "Parameters":{
            "Status": "{{ Status }}"
          },
          "API": "DescribeInstances",
          "Service": "Ecs"
        },
        "Name": "foo",
        "Action": "ACS::ExecuteApi"
      }]
  }
`,
    templateName: "test-name",
    versionName: "test",
    tags: {
        Created: "TF",
        For: "acceptance Test",
    },
});
const example = new alicloud.oos.Execution("example", {
    templateName: _default.templateName,
    description: "From TF Test",
    parameters: "				{\"Status\":\"Running\"}\n",
});
resources:
  default:
    type: alicloud:oos:Template
    properties:
      content: |2
          {
            "FormatVersion": "OOS-2019-06-01",
            "Description": "Update Describe instances of given status",
            "Parameters":{
              "Status":{
                "Type": "String",
                "Description": "(Required) The status of the Ecs instance."
              }
            },
            "Tasks": [
              {
                "Properties" :{
                  "Parameters":{
                    "Status": "{{ Status }}"
                  },
                  "API": "DescribeInstances",
                  "Service": "Ecs"
                },
                "Name": "foo",
                "Action": "ACS::ExecuteApi"
              }]
          }
      templateName: test-name
      versionName: test
      tags:
        Created: TF
        For: acceptance Test
  example:
    type: alicloud:oos:Execution
    properties:
      templateName: ${default.templateName}
      description: From TF Test
      parameters: |
                				{"Status":"Running"}

Create Execution Resource

new Execution(name: string, args: ExecutionArgs, opts?: CustomResourceOptions);
@overload
def Execution(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              description: Optional[str] = None,
              loop_mode: Optional[str] = None,
              mode: Optional[str] = None,
              parameters: Optional[str] = None,
              parent_execution_id: Optional[str] = None,
              safety_check: Optional[str] = None,
              template_content: Optional[str] = None,
              template_name: Optional[str] = None,
              template_version: Optional[str] = None)
@overload
def Execution(resource_name: str,
              args: ExecutionArgs,
              opts: Optional[ResourceOptions] = None)
func NewExecution(ctx *Context, name string, args ExecutionArgs, opts ...ResourceOption) (*Execution, error)
public Execution(string name, ExecutionArgs args, CustomResourceOptions? opts = null)
public Execution(String name, ExecutionArgs args)
public Execution(String name, ExecutionArgs args, CustomResourceOptions options)
type: alicloud:oos:Execution
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args ExecutionArgs
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 ExecutionArgs
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 ExecutionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ExecutionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args ExecutionArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

TemplateName string

The name of execution template.

Description string

The description of OOS Execution.

LoopMode string

The loop mode of OOS Execution.

Mode string

The mode of OOS Execution. Valid: Automatic, Debug. Default to Automatic.

Parameters string

The parameters required by the template. Default to {}.

ParentExecutionId string

The id of parent execution.

SafetyCheck string

The mode of safety check.

TemplateContent string

The content of template. When the user selects an existing template to create and execute a task, it is not necessary to pass in this field.

TemplateVersion string

The version of execution template.

TemplateName string

The name of execution template.

Description string

The description of OOS Execution.

LoopMode string

The loop mode of OOS Execution.

Mode string

The mode of OOS Execution. Valid: Automatic, Debug. Default to Automatic.

Parameters string

The parameters required by the template. Default to {}.

ParentExecutionId string

The id of parent execution.

SafetyCheck string

The mode of safety check.

TemplateContent string

The content of template. When the user selects an existing template to create and execute a task, it is not necessary to pass in this field.

TemplateVersion string

The version of execution template.

templateName String

The name of execution template.

description String

The description of OOS Execution.

loopMode String

The loop mode of OOS Execution.

mode String

The mode of OOS Execution. Valid: Automatic, Debug. Default to Automatic.

parameters String

The parameters required by the template. Default to {}.

parentExecutionId String

The id of parent execution.

safetyCheck String

The mode of safety check.

templateContent String

The content of template. When the user selects an existing template to create and execute a task, it is not necessary to pass in this field.

templateVersion String

The version of execution template.

templateName string

The name of execution template.

description string

The description of OOS Execution.

loopMode string

The loop mode of OOS Execution.

mode string

The mode of OOS Execution. Valid: Automatic, Debug. Default to Automatic.

parameters string

The parameters required by the template. Default to {}.

parentExecutionId string

The id of parent execution.

safetyCheck string

The mode of safety check.

templateContent string

The content of template. When the user selects an existing template to create and execute a task, it is not necessary to pass in this field.

templateVersion string

The version of execution template.

template_name str

The name of execution template.

description str

The description of OOS Execution.

loop_mode str

The loop mode of OOS Execution.

mode str

The mode of OOS Execution. Valid: Automatic, Debug. Default to Automatic.

parameters str

The parameters required by the template. Default to {}.

parent_execution_id str

The id of parent execution.

safety_check str

The mode of safety check.

template_content str

The content of template. When the user selects an existing template to create and execute a task, it is not necessary to pass in this field.

template_version str

The version of execution template.

templateName String

The name of execution template.

description String

The description of OOS Execution.

loopMode String

The loop mode of OOS Execution.

mode String

The mode of OOS Execution. Valid: Automatic, Debug. Default to Automatic.

parameters String

The parameters required by the template. Default to {}.

parentExecutionId String

The id of parent execution.

safetyCheck String

The mode of safety check.

templateContent String

The content of template. When the user selects an existing template to create and execute a task, it is not necessary to pass in this field.

templateVersion String

The version of execution template.

Outputs

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

Counters string

The counters of OOS Execution.

CreateDate string

The time when the execution was created.

EndDate string

The time when the execution was ended.

ExecutedBy string

The user who execute the template.

Id string

The provider-assigned unique ID for this managed resource.

IsParent bool

Whether to include subtasks.

Outputs string

The outputs of OOS Execution.

RamRole string

The role that executes the current template.

StartDate string

The time when the execution was started.

Status string

The status of OOS Execution.

StatusMessage string

The message of status.

TemplateId string

The id of template.

UpdateDate string

The time when the execution was updated.

Counters string

The counters of OOS Execution.

CreateDate string

The time when the execution was created.

EndDate string

The time when the execution was ended.

ExecutedBy string

The user who execute the template.

Id string

The provider-assigned unique ID for this managed resource.

IsParent bool

Whether to include subtasks.

Outputs string

The outputs of OOS Execution.

RamRole string

The role that executes the current template.

StartDate string

The time when the execution was started.

Status string

The status of OOS Execution.

StatusMessage string

The message of status.

TemplateId string

The id of template.

UpdateDate string

The time when the execution was updated.

counters String

The counters of OOS Execution.

createDate String

The time when the execution was created.

endDate String

The time when the execution was ended.

executedBy String

The user who execute the template.

id String

The provider-assigned unique ID for this managed resource.

isParent Boolean

Whether to include subtasks.

outputs String

The outputs of OOS Execution.

ramRole String

The role that executes the current template.

startDate String

The time when the execution was started.

status String

The status of OOS Execution.

statusMessage String

The message of status.

templateId String

The id of template.

updateDate String

The time when the execution was updated.

counters string

The counters of OOS Execution.

createDate string

The time when the execution was created.

endDate string

The time when the execution was ended.

executedBy string

The user who execute the template.

id string

The provider-assigned unique ID for this managed resource.

isParent boolean

Whether to include subtasks.

outputs string

The outputs of OOS Execution.

ramRole string

The role that executes the current template.

startDate string

The time when the execution was started.

status string

The status of OOS Execution.

statusMessage string

The message of status.

templateId string

The id of template.

updateDate string

The time when the execution was updated.

counters str

The counters of OOS Execution.

create_date str

The time when the execution was created.

end_date str

The time when the execution was ended.

executed_by str

The user who execute the template.

id str

The provider-assigned unique ID for this managed resource.

is_parent bool

Whether to include subtasks.

outputs str

The outputs of OOS Execution.

ram_role str

The role that executes the current template.

start_date str

The time when the execution was started.

status str

The status of OOS Execution.

status_message str

The message of status.

template_id str

The id of template.

update_date str

The time when the execution was updated.

counters String

The counters of OOS Execution.

createDate String

The time when the execution was created.

endDate String

The time when the execution was ended.

executedBy String

The user who execute the template.

id String

The provider-assigned unique ID for this managed resource.

isParent Boolean

Whether to include subtasks.

outputs String

The outputs of OOS Execution.

ramRole String

The role that executes the current template.

startDate String

The time when the execution was started.

status String

The status of OOS Execution.

statusMessage String

The message of status.

templateId String

The id of template.

updateDate String

The time when the execution was updated.

Look up Existing Execution Resource

Get an existing Execution 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?: ExecutionState, opts?: CustomResourceOptions): Execution
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        counters: Optional[str] = None,
        create_date: Optional[str] = None,
        description: Optional[str] = None,
        end_date: Optional[str] = None,
        executed_by: Optional[str] = None,
        is_parent: Optional[bool] = None,
        loop_mode: Optional[str] = None,
        mode: Optional[str] = None,
        outputs: Optional[str] = None,
        parameters: Optional[str] = None,
        parent_execution_id: Optional[str] = None,
        ram_role: Optional[str] = None,
        safety_check: Optional[str] = None,
        start_date: Optional[str] = None,
        status: Optional[str] = None,
        status_message: Optional[str] = None,
        template_content: Optional[str] = None,
        template_id: Optional[str] = None,
        template_name: Optional[str] = None,
        template_version: Optional[str] = None,
        update_date: Optional[str] = None) -> Execution
func GetExecution(ctx *Context, name string, id IDInput, state *ExecutionState, opts ...ResourceOption) (*Execution, error)
public static Execution Get(string name, Input<string> id, ExecutionState? state, CustomResourceOptions? opts = null)
public static Execution get(String name, Output<String> id, ExecutionState 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:
Counters string

The counters of OOS Execution.

CreateDate string

The time when the execution was created.

Description string

The description of OOS Execution.

EndDate string

The time when the execution was ended.

ExecutedBy string

The user who execute the template.

IsParent bool

Whether to include subtasks.

LoopMode string

The loop mode of OOS Execution.

Mode string

The mode of OOS Execution. Valid: Automatic, Debug. Default to Automatic.

Outputs string

The outputs of OOS Execution.

Parameters string

The parameters required by the template. Default to {}.

ParentExecutionId string

The id of parent execution.

RamRole string

The role that executes the current template.

SafetyCheck string

The mode of safety check.

StartDate string

The time when the execution was started.

Status string

The status of OOS Execution.

StatusMessage string

The message of status.

TemplateContent string

The content of template. When the user selects an existing template to create and execute a task, it is not necessary to pass in this field.

TemplateId string

The id of template.

TemplateName string

The name of execution template.

TemplateVersion string

The version of execution template.

UpdateDate string

The time when the execution was updated.

Counters string

The counters of OOS Execution.

CreateDate string

The time when the execution was created.

Description string

The description of OOS Execution.

EndDate string

The time when the execution was ended.

ExecutedBy string

The user who execute the template.

IsParent bool

Whether to include subtasks.

LoopMode string

The loop mode of OOS Execution.

Mode string

The mode of OOS Execution. Valid: Automatic, Debug. Default to Automatic.

Outputs string

The outputs of OOS Execution.

Parameters string

The parameters required by the template. Default to {}.

ParentExecutionId string

The id of parent execution.

RamRole string

The role that executes the current template.

SafetyCheck string

The mode of safety check.

StartDate string

The time when the execution was started.

Status string

The status of OOS Execution.

StatusMessage string

The message of status.

TemplateContent string

The content of template. When the user selects an existing template to create and execute a task, it is not necessary to pass in this field.

TemplateId string

The id of template.

TemplateName string

The name of execution template.

TemplateVersion string

The version of execution template.

UpdateDate string

The time when the execution was updated.

counters String

The counters of OOS Execution.

createDate String

The time when the execution was created.

description String

The description of OOS Execution.

endDate String

The time when the execution was ended.

executedBy String

The user who execute the template.

isParent Boolean

Whether to include subtasks.

loopMode String

The loop mode of OOS Execution.

mode String

The mode of OOS Execution. Valid: Automatic, Debug. Default to Automatic.

outputs String

The outputs of OOS Execution.

parameters String

The parameters required by the template. Default to {}.

parentExecutionId String

The id of parent execution.

ramRole String

The role that executes the current template.

safetyCheck String

The mode of safety check.

startDate String

The time when the execution was started.

status String

The status of OOS Execution.

statusMessage String

The message of status.

templateContent String

The content of template. When the user selects an existing template to create and execute a task, it is not necessary to pass in this field.

templateId String

The id of template.

templateName String

The name of execution template.

templateVersion String

The version of execution template.

updateDate String

The time when the execution was updated.

counters string

The counters of OOS Execution.

createDate string

The time when the execution was created.

description string

The description of OOS Execution.

endDate string

The time when the execution was ended.

executedBy string

The user who execute the template.

isParent boolean

Whether to include subtasks.

loopMode string

The loop mode of OOS Execution.

mode string

The mode of OOS Execution. Valid: Automatic, Debug. Default to Automatic.

outputs string

The outputs of OOS Execution.

parameters string

The parameters required by the template. Default to {}.

parentExecutionId string

The id of parent execution.

ramRole string

The role that executes the current template.

safetyCheck string

The mode of safety check.

startDate string

The time when the execution was started.

status string

The status of OOS Execution.

statusMessage string

The message of status.

templateContent string

The content of template. When the user selects an existing template to create and execute a task, it is not necessary to pass in this field.

templateId string

The id of template.

templateName string

The name of execution template.

templateVersion string

The version of execution template.

updateDate string

The time when the execution was updated.

counters str

The counters of OOS Execution.

create_date str

The time when the execution was created.

description str

The description of OOS Execution.

end_date str

The time when the execution was ended.

executed_by str

The user who execute the template.

is_parent bool

Whether to include subtasks.

loop_mode str

The loop mode of OOS Execution.

mode str

The mode of OOS Execution. Valid: Automatic, Debug. Default to Automatic.

outputs str

The outputs of OOS Execution.

parameters str

The parameters required by the template. Default to {}.

parent_execution_id str

The id of parent execution.

ram_role str

The role that executes the current template.

safety_check str

The mode of safety check.

start_date str

The time when the execution was started.

status str

The status of OOS Execution.

status_message str

The message of status.

template_content str

The content of template. When the user selects an existing template to create and execute a task, it is not necessary to pass in this field.

template_id str

The id of template.

template_name str

The name of execution template.

template_version str

The version of execution template.

update_date str

The time when the execution was updated.

counters String

The counters of OOS Execution.

createDate String

The time when the execution was created.

description String

The description of OOS Execution.

endDate String

The time when the execution was ended.

executedBy String

The user who execute the template.

isParent Boolean

Whether to include subtasks.

loopMode String

The loop mode of OOS Execution.

mode String

The mode of OOS Execution. Valid: Automatic, Debug. Default to Automatic.

outputs String

The outputs of OOS Execution.

parameters String

The parameters required by the template. Default to {}.

parentExecutionId String

The id of parent execution.

ramRole String

The role that executes the current template.

safetyCheck String

The mode of safety check.

startDate String

The time when the execution was started.

status String

The status of OOS Execution.

statusMessage String

The message of status.

templateContent String

The content of template. When the user selects an existing template to create and execute a task, it is not necessary to pass in this field.

templateId String

The id of template.

templateName String

The name of execution template.

templateVersion String

The version of execution template.

updateDate String

The time when the execution was updated.

Import

OOS Execution can be imported using the id, e.g.

 $ pulumi import alicloud:oos/execution:Execution example exec-ef6xxxx

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.