oos

package
v2.21.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Execution added in v2.14.0

type Execution struct {
	pulumi.CustomResourceState

	// The counters of OOS Execution.
	Counters pulumi.StringOutput `pulumi:"counters"`
	// The time when the execution was created.
	CreateDate pulumi.StringOutput `pulumi:"createDate"`
	// The description of OOS Execution.
	Description pulumi.StringPtrOutput `pulumi:"description"`
	// The time when the execution was ended.
	EndDate pulumi.StringOutput `pulumi:"endDate"`
	// The user who execute the template.
	ExecutedBy pulumi.StringOutput `pulumi:"executedBy"`
	// Whether to include subtasks.
	IsParent pulumi.BoolOutput `pulumi:"isParent"`
	// The loop mode of OOS Execution.
	LoopMode pulumi.StringPtrOutput `pulumi:"loopMode"`
	// The mode of OOS Execution. Valid: `Automatic`, `Debug`. Default to `Automatic`.
	Mode pulumi.StringPtrOutput `pulumi:"mode"`
	// The outputs of OOS Execution.
	Outputs pulumi.StringOutput `pulumi:"outputs"`
	// The parameters required by the template. Default to `{}`.
	Parameters pulumi.StringPtrOutput `pulumi:"parameters"`
	// The id of parent execution.
	ParentExecutionId pulumi.StringPtrOutput `pulumi:"parentExecutionId"`
	// The role that executes the current template.
	RamRole pulumi.StringOutput `pulumi:"ramRole"`
	// The mode of safety check.
	SafetyCheck pulumi.StringPtrOutput `pulumi:"safetyCheck"`
	// The time when the execution was started.
	StartDate pulumi.StringOutput `pulumi:"startDate"`
	// The status of OOS Execution.
	Status pulumi.StringOutput `pulumi:"status"`
	// The message of status.
	StatusMessage pulumi.StringOutput `pulumi:"statusMessage"`
	// The id of template.
	TemplateId pulumi.StringOutput `pulumi:"templateId"`
	// The name of execution template.
	TemplateName pulumi.StringOutput `pulumi:"templateName"`
	// The version of execution template.
	TemplateVersion pulumi.StringOutput `pulumi:"templateVersion"`
	// The time when the execution was updated.
	UpdateDate pulumi.StringOutput `pulumi:"updateDate"`
}

Provides a OOS Execution resource. For information about Alicloud OOS Execution and how to use it, see [What is Resource Alicloud OOS Execution](https://www.alibabacloud.com/help/doc-detail/120771.htm).

> **NOTE:** Available in 1.93.0+.

## Example Usage

```go package main

import (

"fmt"

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/oos"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := oos.NewTemplate(ctx, "_default", &oos.TemplateArgs{
			Content:      pulumi.String(fmt.Sprintf("%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v", "  {\n", "    \"FormatVersion\": \"OOS-2019-06-01\",\n", "    \"Description\": \"Update Describe instances of given status\",\n", "    \"Parameters\":{\n", "      \"Status\":{\n", "        \"Type\": \"String\",\n", "        \"Description\": \"(Required) The status of the Ecs instance.\"\n", "      }\n", "    },\n", "    \"Tasks\": [\n", "      {\n", "        \"Properties\" :{\n", "          \"Parameters\":{\n", "            \"Status\": \"{{ Status }}\"\n", "          },\n", "          \"API\": \"DescribeInstances\",\n", "          \"Service\": \"Ecs\"\n", "        },\n", "        \"Name\": \"foo\",\n", "        \"Action\": \"ACS::ExecuteApi\"\n", "      }]\n", "  }\n")),
			TemplateName: pulumi.String("test-name"),
			VersionName:  pulumi.String("test"),
			Tags: pulumi.StringMap{
				"Created": pulumi.String("TF"),
				"For":     pulumi.String("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
	})
}

```

func GetExecution added in v2.14.0

func GetExecution(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *ExecutionState, opts ...pulumi.ResourceOption) (*Execution, error)

GetExecution gets an existing Execution resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewExecution added in v2.14.0

func NewExecution(ctx *pulumi.Context,
	name string, args *ExecutionArgs, opts ...pulumi.ResourceOption) (*Execution, error)

NewExecution registers a new resource with the given unique name, arguments, and options.

type ExecutionArgs added in v2.14.0

type ExecutionArgs struct {
	// The description of OOS Execution.
	Description pulumi.StringPtrInput
	// The loop mode of OOS Execution.
	LoopMode pulumi.StringPtrInput
	// The mode of OOS Execution. Valid: `Automatic`, `Debug`. Default to `Automatic`.
	Mode pulumi.StringPtrInput
	// The parameters required by the template. Default to `{}`.
	Parameters pulumi.StringPtrInput
	// The id of parent execution.
	ParentExecutionId pulumi.StringPtrInput
	// The mode of safety check.
	SafetyCheck pulumi.StringPtrInput
	// The name of execution template.
	TemplateName pulumi.StringInput
	// The version of execution template.
	TemplateVersion pulumi.StringPtrInput
}

The set of arguments for constructing a Execution resource.

func (ExecutionArgs) ElementType added in v2.14.0

func (ExecutionArgs) ElementType() reflect.Type

type ExecutionState added in v2.14.0

type ExecutionState struct {
	// The counters of OOS Execution.
	Counters pulumi.StringPtrInput
	// The time when the execution was created.
	CreateDate pulumi.StringPtrInput
	// The description of OOS Execution.
	Description pulumi.StringPtrInput
	// The time when the execution was ended.
	EndDate pulumi.StringPtrInput
	// The user who execute the template.
	ExecutedBy pulumi.StringPtrInput
	// Whether to include subtasks.
	IsParent pulumi.BoolPtrInput
	// The loop mode of OOS Execution.
	LoopMode pulumi.StringPtrInput
	// The mode of OOS Execution. Valid: `Automatic`, `Debug`. Default to `Automatic`.
	Mode pulumi.StringPtrInput
	// The outputs of OOS Execution.
	Outputs pulumi.StringPtrInput
	// The parameters required by the template. Default to `{}`.
	Parameters pulumi.StringPtrInput
	// The id of parent execution.
	ParentExecutionId pulumi.StringPtrInput
	// The role that executes the current template.
	RamRole pulumi.StringPtrInput
	// The mode of safety check.
	SafetyCheck pulumi.StringPtrInput
	// The time when the execution was started.
	StartDate pulumi.StringPtrInput
	// The status of OOS Execution.
	Status pulumi.StringPtrInput
	// The message of status.
	StatusMessage pulumi.StringPtrInput
	// The id of template.
	TemplateId pulumi.StringPtrInput
	// The name of execution template.
	TemplateName pulumi.StringPtrInput
	// The version of execution template.
	TemplateVersion pulumi.StringPtrInput
	// The time when the execution was updated.
	UpdateDate pulumi.StringPtrInput
}

func (ExecutionState) ElementType added in v2.14.0

func (ExecutionState) ElementType() reflect.Type

type GetExecutionsArgs added in v2.14.0

type GetExecutionsArgs struct {
	// The category of template. Valid: `AlarmTrigger`, `EventTrigger`, `Other` and `TimerTrigger`.
	Category *string `pulumi:"category"`
	// The time when the execution was ended.
	EndDate *string `pulumi:"endDate"`
	// Execution whose end time is less than or equal to the specified time.
	EndDateAfter *string `pulumi:"endDateAfter"`
	// The user who execute the template.
	ExecutedBy *string `pulumi:"executedBy"`
	// A list of OOS Execution ids.
	Ids []string `pulumi:"ids"`
	// Whether to include sub-execution.
	IncludeChildExecution *bool `pulumi:"includeChildExecution"`
	// The mode of OOS Execution. Valid: `Automatic`, `Debug`.
	Mode       *string `pulumi:"mode"`
	OutputFile *string `pulumi:"outputFile"`
	// The id of parent OOS Execution.
	ParentExecutionId *string `pulumi:"parentExecutionId"`
	// The role that executes the current template.
	RamRole *string `pulumi:"ramRole"`
	// The sort field.
	SortField *string `pulumi:"sortField"`
	// The sort order.
	SortOrder *string `pulumi:"sortOrder"`
	// The execution whose start time is greater than or equal to the specified time.
	StartDateAfter *string `pulumi:"startDateAfter"`
	// The execution with start time less than or equal to the specified time.
	StartDateBefore *string `pulumi:"startDateBefore"`
	// The Status of OOS Execution. Valid: `Cancelled`, `Failed`, `Queued`, `Running`, `Started`, `Success`, `Waiting`.
	Status *string `pulumi:"status"`
	// A mapping of tags to assign to the resource.
	Tags map[string]interface{} `pulumi:"tags"`
	// The name of execution template.
	TemplateName *string `pulumi:"templateName"`
}

A collection of arguments for invoking getExecutions.

type GetExecutionsExecution added in v2.14.0

type GetExecutionsExecution struct {
	// The category of template. Valid: `AlarmTrigger`, `EventTrigger`, `Other` and `TimerTrigger`.
	Category string `pulumi:"category"`
	// The counters of OOS Execution.
	Counters string `pulumi:"counters"`
	// The time when the execution was created.
	CreateDate string `pulumi:"createDate"`
	// The time when the execution was ended.
	EndDate string `pulumi:"endDate"`
	// The user who execute the template.
	ExecutedBy string `pulumi:"executedBy"`
	// ID of the OOS Executions.
	ExecutionId string `pulumi:"executionId"`
	// ID of the OOS Executions.
	Id string `pulumi:"id"`
	// Whether to include subtasks.
	IsParent bool `pulumi:"isParent"`
	// The mode of OOS Execution. Valid: `Automatic`, `Debug`.
	Mode string `pulumi:"mode"`
	// The outputs of OOS Executions.
	Outputs string `pulumi:"outputs"`
	// The parameters required by the template
	Parameters string `pulumi:"parameters"`
	// The id of parent OOS Execution.
	ParentExecutionId string `pulumi:"parentExecutionId"`
	// The role that executes the current template.
	RamRole string `pulumi:"ramRole"`
	// The time when the template was started.
	StartDate string `pulumi:"startDate"`
	// The Status of OOS Execution. Valid: `Cancelled`, `Failed`, `Queued`, `Running`, `Started`, `Success`, `Waiting`.
	Status string `pulumi:"status"`
	// The message of status.
	StatusMessage string `pulumi:"statusMessage"`
	// The reason of status.
	StatusReason string `pulumi:"statusReason"`
	// The id of execution template.
	TemplateId string `pulumi:"templateId"`
	// The name of execution template.
	TemplateName string `pulumi:"templateName"`
	// The version of execution template.
	TemplateVersion string `pulumi:"templateVersion"`
	// The time when the template was updated.
	UpdateDate string `pulumi:"updateDate"`
}

type GetExecutionsExecutionArgs added in v2.14.0

type GetExecutionsExecutionArgs struct {
	// The category of template. Valid: `AlarmTrigger`, `EventTrigger`, `Other` and `TimerTrigger`.
	Category pulumi.StringInput `pulumi:"category"`
	// The counters of OOS Execution.
	Counters pulumi.StringInput `pulumi:"counters"`
	// The time when the execution was created.
	CreateDate pulumi.StringInput `pulumi:"createDate"`
	// The time when the execution was ended.
	EndDate pulumi.StringInput `pulumi:"endDate"`
	// The user who execute the template.
	ExecutedBy pulumi.StringInput `pulumi:"executedBy"`
	// ID of the OOS Executions.
	ExecutionId pulumi.StringInput `pulumi:"executionId"`
	// ID of the OOS Executions.
	Id pulumi.StringInput `pulumi:"id"`
	// Whether to include subtasks.
	IsParent pulumi.BoolInput `pulumi:"isParent"`
	// The mode of OOS Execution. Valid: `Automatic`, `Debug`.
	Mode pulumi.StringInput `pulumi:"mode"`
	// The outputs of OOS Executions.
	Outputs pulumi.StringInput `pulumi:"outputs"`
	// The parameters required by the template
	Parameters pulumi.StringInput `pulumi:"parameters"`
	// The id of parent OOS Execution.
	ParentExecutionId pulumi.StringInput `pulumi:"parentExecutionId"`
	// The role that executes the current template.
	RamRole pulumi.StringInput `pulumi:"ramRole"`
	// The time when the template was started.
	StartDate pulumi.StringInput `pulumi:"startDate"`
	// The Status of OOS Execution. Valid: `Cancelled`, `Failed`, `Queued`, `Running`, `Started`, `Success`, `Waiting`.
	Status pulumi.StringInput `pulumi:"status"`
	// The message of status.
	StatusMessage pulumi.StringInput `pulumi:"statusMessage"`
	// The reason of status.
	StatusReason pulumi.StringInput `pulumi:"statusReason"`
	// The id of execution template.
	TemplateId pulumi.StringInput `pulumi:"templateId"`
	// The name of execution template.
	TemplateName pulumi.StringInput `pulumi:"templateName"`
	// The version of execution template.
	TemplateVersion pulumi.StringInput `pulumi:"templateVersion"`
	// The time when the template was updated.
	UpdateDate pulumi.StringInput `pulumi:"updateDate"`
}

func (GetExecutionsExecutionArgs) ElementType added in v2.14.0

func (GetExecutionsExecutionArgs) ElementType() reflect.Type

func (GetExecutionsExecutionArgs) ToGetExecutionsExecutionOutput added in v2.14.0

func (i GetExecutionsExecutionArgs) ToGetExecutionsExecutionOutput() GetExecutionsExecutionOutput

func (GetExecutionsExecutionArgs) ToGetExecutionsExecutionOutputWithContext added in v2.14.0

func (i GetExecutionsExecutionArgs) ToGetExecutionsExecutionOutputWithContext(ctx context.Context) GetExecutionsExecutionOutput

type GetExecutionsExecutionArray added in v2.14.0

type GetExecutionsExecutionArray []GetExecutionsExecutionInput

func (GetExecutionsExecutionArray) ElementType added in v2.14.0

func (GetExecutionsExecutionArray) ToGetExecutionsExecutionArrayOutput added in v2.14.0

func (i GetExecutionsExecutionArray) ToGetExecutionsExecutionArrayOutput() GetExecutionsExecutionArrayOutput

func (GetExecutionsExecutionArray) ToGetExecutionsExecutionArrayOutputWithContext added in v2.14.0

func (i GetExecutionsExecutionArray) ToGetExecutionsExecutionArrayOutputWithContext(ctx context.Context) GetExecutionsExecutionArrayOutput

type GetExecutionsExecutionArrayInput added in v2.14.0

type GetExecutionsExecutionArrayInput interface {
	pulumi.Input

	ToGetExecutionsExecutionArrayOutput() GetExecutionsExecutionArrayOutput
	ToGetExecutionsExecutionArrayOutputWithContext(context.Context) GetExecutionsExecutionArrayOutput
}

GetExecutionsExecutionArrayInput is an input type that accepts GetExecutionsExecutionArray and GetExecutionsExecutionArrayOutput values. You can construct a concrete instance of `GetExecutionsExecutionArrayInput` via:

GetExecutionsExecutionArray{ GetExecutionsExecutionArgs{...} }

type GetExecutionsExecutionArrayOutput added in v2.14.0

type GetExecutionsExecutionArrayOutput struct{ *pulumi.OutputState }

func (GetExecutionsExecutionArrayOutput) ElementType added in v2.14.0

func (GetExecutionsExecutionArrayOutput) Index added in v2.14.0

func (GetExecutionsExecutionArrayOutput) ToGetExecutionsExecutionArrayOutput added in v2.14.0

func (o GetExecutionsExecutionArrayOutput) ToGetExecutionsExecutionArrayOutput() GetExecutionsExecutionArrayOutput

func (GetExecutionsExecutionArrayOutput) ToGetExecutionsExecutionArrayOutputWithContext added in v2.14.0

func (o GetExecutionsExecutionArrayOutput) ToGetExecutionsExecutionArrayOutputWithContext(ctx context.Context) GetExecutionsExecutionArrayOutput

type GetExecutionsExecutionInput added in v2.14.0

type GetExecutionsExecutionInput interface {
	pulumi.Input

	ToGetExecutionsExecutionOutput() GetExecutionsExecutionOutput
	ToGetExecutionsExecutionOutputWithContext(context.Context) GetExecutionsExecutionOutput
}

GetExecutionsExecutionInput is an input type that accepts GetExecutionsExecutionArgs and GetExecutionsExecutionOutput values. You can construct a concrete instance of `GetExecutionsExecutionInput` via:

GetExecutionsExecutionArgs{...}

type GetExecutionsExecutionOutput added in v2.14.0

type GetExecutionsExecutionOutput struct{ *pulumi.OutputState }

func (GetExecutionsExecutionOutput) Category added in v2.14.0

The category of template. Valid: `AlarmTrigger`, `EventTrigger`, `Other` and `TimerTrigger`.

func (GetExecutionsExecutionOutput) Counters added in v2.14.0

The counters of OOS Execution.

func (GetExecutionsExecutionOutput) CreateDate added in v2.14.0

The time when the execution was created.

func (GetExecutionsExecutionOutput) ElementType added in v2.14.0

func (GetExecutionsExecutionOutput) EndDate added in v2.14.0

The time when the execution was ended.

func (GetExecutionsExecutionOutput) ExecutedBy added in v2.14.0

The user who execute the template.

func (GetExecutionsExecutionOutput) ExecutionId added in v2.14.0

ID of the OOS Executions.

func (GetExecutionsExecutionOutput) Id added in v2.14.0

ID of the OOS Executions.

func (GetExecutionsExecutionOutput) IsParent added in v2.14.0

Whether to include subtasks.

func (GetExecutionsExecutionOutput) Mode added in v2.14.0

The mode of OOS Execution. Valid: `Automatic`, `Debug`.

func (GetExecutionsExecutionOutput) Outputs added in v2.14.0

The outputs of OOS Executions.

func (GetExecutionsExecutionOutput) Parameters added in v2.14.0

The parameters required by the template

func (GetExecutionsExecutionOutput) ParentExecutionId added in v2.14.0

func (o GetExecutionsExecutionOutput) ParentExecutionId() pulumi.StringOutput

The id of parent OOS Execution.

func (GetExecutionsExecutionOutput) RamRole added in v2.14.0

The role that executes the current template.

func (GetExecutionsExecutionOutput) StartDate added in v2.14.0

The time when the template was started.

func (GetExecutionsExecutionOutput) Status added in v2.14.0

The Status of OOS Execution. Valid: `Cancelled`, `Failed`, `Queued`, `Running`, `Started`, `Success`, `Waiting`.

func (GetExecutionsExecutionOutput) StatusMessage added in v2.14.0

The message of status.

func (GetExecutionsExecutionOutput) StatusReason added in v2.14.0

The reason of status.

func (GetExecutionsExecutionOutput) TemplateId added in v2.14.0

The id of execution template.

func (GetExecutionsExecutionOutput) TemplateName added in v2.14.0

The name of execution template.

func (GetExecutionsExecutionOutput) TemplateVersion added in v2.14.0

func (o GetExecutionsExecutionOutput) TemplateVersion() pulumi.StringOutput

The version of execution template.

func (GetExecutionsExecutionOutput) ToGetExecutionsExecutionOutput added in v2.14.0

func (o GetExecutionsExecutionOutput) ToGetExecutionsExecutionOutput() GetExecutionsExecutionOutput

func (GetExecutionsExecutionOutput) ToGetExecutionsExecutionOutputWithContext added in v2.14.0

func (o GetExecutionsExecutionOutput) ToGetExecutionsExecutionOutputWithContext(ctx context.Context) GetExecutionsExecutionOutput

func (GetExecutionsExecutionOutput) UpdateDate added in v2.14.0

The time when the template was updated.

type GetExecutionsResult added in v2.14.0

type GetExecutionsResult struct {
	Category     *string `pulumi:"category"`
	EndDate      *string `pulumi:"endDate"`
	EndDateAfter *string `pulumi:"endDateAfter"`
	ExecutedBy   *string `pulumi:"executedBy"`
	// A list of OOS Executions. Each element contains the following attributes:
	Executions []GetExecutionsExecution `pulumi:"executions"`
	// The provider-assigned unique ID for this managed resource.
	Id string `pulumi:"id"`
	// A list of OOS Execution ids.
	Ids                   []string               `pulumi:"ids"`
	IncludeChildExecution *bool                  `pulumi:"includeChildExecution"`
	Mode                  *string                `pulumi:"mode"`
	OutputFile            *string                `pulumi:"outputFile"`
	ParentExecutionId     *string                `pulumi:"parentExecutionId"`
	RamRole               *string                `pulumi:"ramRole"`
	SortField             *string                `pulumi:"sortField"`
	SortOrder             *string                `pulumi:"sortOrder"`
	StartDateAfter        *string                `pulumi:"startDateAfter"`
	StartDateBefore       *string                `pulumi:"startDateBefore"`
	Status                *string                `pulumi:"status"`
	Tags                  map[string]interface{} `pulumi:"tags"`
	TemplateName          *string                `pulumi:"templateName"`
}

A collection of values returned by getExecutions.

func GetExecutions added in v2.14.0

func GetExecutions(ctx *pulumi.Context, args *GetExecutionsArgs, opts ...pulumi.InvokeOption) (*GetExecutionsResult, error)

This data source provides a list of OOS Executions in an Alibaba Cloud account according to the specified filters.

> **NOTE:** Available in v1.93.0+.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/oos"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		opt0 := "Success"
		opt1 := "name"
		example, err := oos.GetExecutions(ctx, &oos.GetExecutionsArgs{
			Ids: []string{
				"execution_id",
			},
			Status:       &opt0,
			TemplateName: &opt1,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("firstExecutionId", example.Executions[0].Id)
		return nil
	})
}

```

type GetTemplatesArgs

type GetTemplatesArgs struct {
	// The category of template.
	Category *string `pulumi:"category"`
	// The creator of the template.
	CreatedBy *string `pulumi:"createdBy"`
	// The template whose creation time is less than or equal to the specified time. The format is: YYYY-MM-DDThh:mm::ssZ.
	CreatedDate *string `pulumi:"createdDate"`
	// Create a template whose time is greater than or equal to the specified time. The format is: YYYY-MM-DDThh:mm:ssZ.
	CreatedDateAfter *string `pulumi:"createdDateAfter"`
	// Is it triggered successfully.
	HasTrigger *bool `pulumi:"hasTrigger"`
	// A list of OOS Template ids. Each element in the list is same as template_name.
	Ids []string `pulumi:"ids"`
	// A regex string to filter the results by the template_name.
	NameRegex  *string `pulumi:"nameRegex"`
	OutputFile *string `pulumi:"outputFile"`
	// The sharing type of the template. Valid values: `Private`, `Public`.
	ShareType *string `pulumi:"shareType"`
	// Sort field. Valid values: `TotalExecutionCount`, `Popularity`, `TemplateName` and `CreatedDate`. Default to `TotalExecutionCount`.
	SortField *string `pulumi:"sortField"`
	// Sort order. Valid values: `Ascending`, `Descending`. Default to `Descending`
	SortOrder *string `pulumi:"sortOrder"`
	// A mapping of tags to assign to the resource.
	Tags map[string]interface{} `pulumi:"tags"`
	// The format of the template. Valid values: `JSON`, `YAML`.
	TemplateFormat *string `pulumi:"templateFormat"`
	// The type of OOS Template.
	TemplateType *string `pulumi:"templateType"`
}

A collection of arguments for invoking getTemplates.

type GetTemplatesResult

type GetTemplatesResult struct {
	Category         *string `pulumi:"category"`
	CreatedBy        *string `pulumi:"createdBy"`
	CreatedDate      *string `pulumi:"createdDate"`
	CreatedDateAfter *string `pulumi:"createdDateAfter"`
	HasTrigger       *bool   `pulumi:"hasTrigger"`
	// The provider-assigned unique ID for this managed resource.
	Id string `pulumi:"id"`
	// A list of OOS Template ids. Each element in the list is same as template_name.
	Ids            []string               `pulumi:"ids"`
	NameRegex      *string                `pulumi:"nameRegex"`
	OutputFile     *string                `pulumi:"outputFile"`
	ShareType      *string                `pulumi:"shareType"`
	SortField      *string                `pulumi:"sortField"`
	SortOrder      *string                `pulumi:"sortOrder"`
	Tags           map[string]interface{} `pulumi:"tags"`
	TemplateFormat *string                `pulumi:"templateFormat"`
	TemplateType   *string                `pulumi:"templateType"`
	// A list of OOS Templates. Each element contains the following attributes:
	Templates []GetTemplatesTemplate `pulumi:"templates"`
}

A collection of values returned by getTemplates.

func GetTemplates

func GetTemplates(ctx *pulumi.Context, args *GetTemplatesArgs, opts ...pulumi.InvokeOption) (*GetTemplatesResult, error)

This data source provides a list of OOS Templates in an Alibaba Cloud account according to the specified filters.

> **NOTE:** Available in v1.92.0+.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/oos"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		opt0 := false
		opt1 := "test"
		opt2 := "Private"
		example, err := oos.GetTemplates(ctx, &oos.GetTemplatesArgs{
			HasTrigger: &opt0,
			NameRegex:  &opt1,
			ShareType:  &opt2,
			Tags: map[string]interface{}{
				"Created": "TF",
				"For":     "template Test",
			},
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("firstTemplateName", example.Templates[0].TemplateName)
		return nil
	})
}

```

type GetTemplatesTemplate

type GetTemplatesTemplate struct {
	// The category of template.
	Category string `pulumi:"category"`
	// The creator of the template.
	CreatedBy string `pulumi:"createdBy"`
	// The template whose creation time is less than or equal to the specified time. The format is: YYYY-MM-DDThh:mm::ssZ.
	CreatedDate string `pulumi:"createdDate"`
	// Description of the OOS Template.
	Description string `pulumi:"description"`
	// Is it triggered successfully.
	HasTrigger bool `pulumi:"hasTrigger"`
	// ID of the OOS Template. The value is same as template_name.
	Id string `pulumi:"id"`
	// The sharing type of the template. Valid values: `Private`, `Public`.
	ShareType string `pulumi:"shareType"`
	// A mapping of tags to assign to the resource.
	Tags map[string]interface{} `pulumi:"tags"`
	// The format of the template. Valid values: `JSON`, `YAML`.
	TemplateFormat string `pulumi:"templateFormat"`
	// ID of the OOS Template resource.
	TemplateId string `pulumi:"templateId"`
	// Name of the OOS Template.
	TemplateName string `pulumi:"templateName"`
	// The type of OOS Template.
	TemplateType string `pulumi:"templateType"`
	// Version of the OOS Template.
	TemplateVersion string `pulumi:"templateVersion"`
	// The user who updated the template.
	UpdatedBy string `pulumi:"updatedBy"`
	// The time when the template was updated.
	UpdatedDate string `pulumi:"updatedDate"`
}

type GetTemplatesTemplateArgs

type GetTemplatesTemplateArgs struct {
	// The category of template.
	Category pulumi.StringInput `pulumi:"category"`
	// The creator of the template.
	CreatedBy pulumi.StringInput `pulumi:"createdBy"`
	// The template whose creation time is less than or equal to the specified time. The format is: YYYY-MM-DDThh:mm::ssZ.
	CreatedDate pulumi.StringInput `pulumi:"createdDate"`
	// Description of the OOS Template.
	Description pulumi.StringInput `pulumi:"description"`
	// Is it triggered successfully.
	HasTrigger pulumi.BoolInput `pulumi:"hasTrigger"`
	// ID of the OOS Template. The value is same as template_name.
	Id pulumi.StringInput `pulumi:"id"`
	// The sharing type of the template. Valid values: `Private`, `Public`.
	ShareType pulumi.StringInput `pulumi:"shareType"`
	// A mapping of tags to assign to the resource.
	Tags pulumi.MapInput `pulumi:"tags"`
	// The format of the template. Valid values: `JSON`, `YAML`.
	TemplateFormat pulumi.StringInput `pulumi:"templateFormat"`
	// ID of the OOS Template resource.
	TemplateId pulumi.StringInput `pulumi:"templateId"`
	// Name of the OOS Template.
	TemplateName pulumi.StringInput `pulumi:"templateName"`
	// The type of OOS Template.
	TemplateType pulumi.StringInput `pulumi:"templateType"`
	// Version of the OOS Template.
	TemplateVersion pulumi.StringInput `pulumi:"templateVersion"`
	// The user who updated the template.
	UpdatedBy pulumi.StringInput `pulumi:"updatedBy"`
	// The time when the template was updated.
	UpdatedDate pulumi.StringInput `pulumi:"updatedDate"`
}

func (GetTemplatesTemplateArgs) ElementType

func (GetTemplatesTemplateArgs) ElementType() reflect.Type

func (GetTemplatesTemplateArgs) ToGetTemplatesTemplateOutput

func (i GetTemplatesTemplateArgs) ToGetTemplatesTemplateOutput() GetTemplatesTemplateOutput

func (GetTemplatesTemplateArgs) ToGetTemplatesTemplateOutputWithContext

func (i GetTemplatesTemplateArgs) ToGetTemplatesTemplateOutputWithContext(ctx context.Context) GetTemplatesTemplateOutput

type GetTemplatesTemplateArray

type GetTemplatesTemplateArray []GetTemplatesTemplateInput

func (GetTemplatesTemplateArray) ElementType

func (GetTemplatesTemplateArray) ElementType() reflect.Type

func (GetTemplatesTemplateArray) ToGetTemplatesTemplateArrayOutput

func (i GetTemplatesTemplateArray) ToGetTemplatesTemplateArrayOutput() GetTemplatesTemplateArrayOutput

func (GetTemplatesTemplateArray) ToGetTemplatesTemplateArrayOutputWithContext

func (i GetTemplatesTemplateArray) ToGetTemplatesTemplateArrayOutputWithContext(ctx context.Context) GetTemplatesTemplateArrayOutput

type GetTemplatesTemplateArrayInput

type GetTemplatesTemplateArrayInput interface {
	pulumi.Input

	ToGetTemplatesTemplateArrayOutput() GetTemplatesTemplateArrayOutput
	ToGetTemplatesTemplateArrayOutputWithContext(context.Context) GetTemplatesTemplateArrayOutput
}

GetTemplatesTemplateArrayInput is an input type that accepts GetTemplatesTemplateArray and GetTemplatesTemplateArrayOutput values. You can construct a concrete instance of `GetTemplatesTemplateArrayInput` via:

GetTemplatesTemplateArray{ GetTemplatesTemplateArgs{...} }

type GetTemplatesTemplateArrayOutput

type GetTemplatesTemplateArrayOutput struct{ *pulumi.OutputState }

func (GetTemplatesTemplateArrayOutput) ElementType

func (GetTemplatesTemplateArrayOutput) Index

func (GetTemplatesTemplateArrayOutput) ToGetTemplatesTemplateArrayOutput

func (o GetTemplatesTemplateArrayOutput) ToGetTemplatesTemplateArrayOutput() GetTemplatesTemplateArrayOutput

func (GetTemplatesTemplateArrayOutput) ToGetTemplatesTemplateArrayOutputWithContext

func (o GetTemplatesTemplateArrayOutput) ToGetTemplatesTemplateArrayOutputWithContext(ctx context.Context) GetTemplatesTemplateArrayOutput

type GetTemplatesTemplateInput

type GetTemplatesTemplateInput interface {
	pulumi.Input

	ToGetTemplatesTemplateOutput() GetTemplatesTemplateOutput
	ToGetTemplatesTemplateOutputWithContext(context.Context) GetTemplatesTemplateOutput
}

GetTemplatesTemplateInput is an input type that accepts GetTemplatesTemplateArgs and GetTemplatesTemplateOutput values. You can construct a concrete instance of `GetTemplatesTemplateInput` via:

GetTemplatesTemplateArgs{...}

type GetTemplatesTemplateOutput

type GetTemplatesTemplateOutput struct{ *pulumi.OutputState }

func (GetTemplatesTemplateOutput) Category

The category of template.

func (GetTemplatesTemplateOutput) CreatedBy

The creator of the template.

func (GetTemplatesTemplateOutput) CreatedDate

The template whose creation time is less than or equal to the specified time. The format is: YYYY-MM-DDThh:mm::ssZ.

func (GetTemplatesTemplateOutput) Description

Description of the OOS Template.

func (GetTemplatesTemplateOutput) ElementType

func (GetTemplatesTemplateOutput) ElementType() reflect.Type

func (GetTemplatesTemplateOutput) HasTrigger

Is it triggered successfully.

func (GetTemplatesTemplateOutput) Id

ID of the OOS Template. The value is same as template_name.

func (GetTemplatesTemplateOutput) ShareType

The sharing type of the template. Valid values: `Private`, `Public`.

func (GetTemplatesTemplateOutput) Tags

A mapping of tags to assign to the resource.

func (GetTemplatesTemplateOutput) TemplateFormat

func (o GetTemplatesTemplateOutput) TemplateFormat() pulumi.StringOutput

The format of the template. Valid values: `JSON`, `YAML`.

func (GetTemplatesTemplateOutput) TemplateId

ID of the OOS Template resource.

func (GetTemplatesTemplateOutput) TemplateName

Name of the OOS Template.

func (GetTemplatesTemplateOutput) TemplateType

The type of OOS Template.

func (GetTemplatesTemplateOutput) TemplateVersion

func (o GetTemplatesTemplateOutput) TemplateVersion() pulumi.StringOutput

Version of the OOS Template.

func (GetTemplatesTemplateOutput) ToGetTemplatesTemplateOutput

func (o GetTemplatesTemplateOutput) ToGetTemplatesTemplateOutput() GetTemplatesTemplateOutput

func (GetTemplatesTemplateOutput) ToGetTemplatesTemplateOutputWithContext

func (o GetTemplatesTemplateOutput) ToGetTemplatesTemplateOutputWithContext(ctx context.Context) GetTemplatesTemplateOutput

func (GetTemplatesTemplateOutput) UpdatedBy

The user who updated the template.

func (GetTemplatesTemplateOutput) UpdatedDate

The time when the template was updated.

type Template

type Template struct {
	pulumi.CustomResourceState

	// When deleting a template, whether to delete its related executions. Default to `false`.
	AutoDeleteExecutions pulumi.BoolPtrOutput `pulumi:"autoDeleteExecutions"`
	// The content of the template. The template must be in the JSON or YAML format. Maximum size: 64 KB.
	Content pulumi.StringOutput `pulumi:"content"`
	// The creator of the template.
	CreatedBy pulumi.StringOutput `pulumi:"createdBy"`
	// The time when the template is created.
	CreatedDate pulumi.StringOutput `pulumi:"createdDate"`
	// The description of the template.
	Description pulumi.StringOutput `pulumi:"description"`
	// Is it triggered successfully.
	HasTrigger pulumi.BoolOutput `pulumi:"hasTrigger"`
	// The sharing type of the template. The sharing type of templates created by users are set to Private. The sharing type of common templates provided by OOS are set to Public.
	ShareType pulumi.StringOutput `pulumi:"shareType"`
	// A mapping of tags to assign to the resource.
	Tags pulumi.MapOutput `pulumi:"tags"`
	// The format of the template. The format can be JSON or YAML. The system automatically identifies the format.
	TemplateFormat pulumi.StringOutput `pulumi:"templateFormat"`
	// The id of OOS Template.
	TemplateId pulumi.StringOutput `pulumi:"templateId"`
	// The name of the template. The template name can be up to 200 characters in length. The name can contain letters, digits, hyphens (-), and underscores (_). It cannot start with `ALIYUN`, `ACS`, `ALIBABA`, or `ALICLOUD`.
	TemplateName pulumi.StringOutput `pulumi:"templateName"`
	// The type of OOS Template. `Automation` means the implementation of Alibaba Cloud API template, `Package` means represents a template for installing software.
	TemplateType pulumi.StringOutput `pulumi:"templateType"`
	// The version of OOS Template.
	TemplateVersion pulumi.StringOutput `pulumi:"templateVersion"`
	// The user who updated the template.
	UpdatedBy pulumi.StringOutput `pulumi:"updatedBy"`
	// The time when the template was updated.
	UpdatedDate pulumi.StringOutput `pulumi:"updatedDate"`
	// The name of template version.
	VersionName pulumi.StringPtrOutput `pulumi:"versionName"`
}

Provides a OOS Template resource. For information about Alicloud OOS Template and how to use it, see [What is Resource Alicloud OOS Template](https://www.alibabacloud.com/help/doc-detail/120761.htm).

> **NOTE:** Available in 1.92.0+.

## Example Usage

```go package main

import (

"fmt"

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/oos"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := oos.NewTemplate(ctx, "example", &oos.TemplateArgs{
			Content: pulumi.String(fmt.Sprintf("%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v", "  {\n", "    \"FormatVersion\": \"OOS-2019-06-01\",\n", "    \"Description\": \"Update Describe instances of given status\",\n", "    \"Parameters\":{\n", "      \"Status\":{\n", "        \"Type\": \"String\",\n", "        \"Description\": \"(Required) The status of the Ecs instance.\"\n", "      }\n", "    },\n", "    \"Tasks\": [\n", "      {\n", "        \"Properties\" :{\n", "          \"Parameters\":{\n", "            \"Status\": \"{{ Status }}\"\n", "          },\n", "          \"API\": \"DescribeInstances\",\n", "          \"Service\": \"Ecs\"\n", "        },\n", "        \"Name\": \"foo\",\n", "        \"Action\": \"ACS::ExecuteApi\"\n", "      }]\n", "  }\n", "  \n")),
			Tags: pulumi.StringMap{
				"Created": pulumi.String("TF"),
				"For":     pulumi.String("acceptance Test"),
			},
			TemplateName: pulumi.String("test-name"),
			VersionName:  pulumi.String("test"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

func GetTemplate

func GetTemplate(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *TemplateState, opts ...pulumi.ResourceOption) (*Template, error)

GetTemplate gets an existing Template resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewTemplate

func NewTemplate(ctx *pulumi.Context,
	name string, args *TemplateArgs, opts ...pulumi.ResourceOption) (*Template, error)

NewTemplate registers a new resource with the given unique name, arguments, and options.

type TemplateArgs

type TemplateArgs struct {
	// When deleting a template, whether to delete its related executions. Default to `false`.
	AutoDeleteExecutions pulumi.BoolPtrInput
	// The content of the template. The template must be in the JSON or YAML format. Maximum size: 64 KB.
	Content pulumi.StringInput
	// A mapping of tags to assign to the resource.
	Tags pulumi.MapInput
	// The name of the template. The template name can be up to 200 characters in length. The name can contain letters, digits, hyphens (-), and underscores (_). It cannot start with `ALIYUN`, `ACS`, `ALIBABA`, or `ALICLOUD`.
	TemplateName pulumi.StringInput
	// The name of template version.
	VersionName pulumi.StringPtrInput
}

The set of arguments for constructing a Template resource.

func (TemplateArgs) ElementType

func (TemplateArgs) ElementType() reflect.Type

type TemplateState

type TemplateState struct {
	// When deleting a template, whether to delete its related executions. Default to `false`.
	AutoDeleteExecutions pulumi.BoolPtrInput
	// The content of the template. The template must be in the JSON or YAML format. Maximum size: 64 KB.
	Content pulumi.StringPtrInput
	// The creator of the template.
	CreatedBy pulumi.StringPtrInput
	// The time when the template is created.
	CreatedDate pulumi.StringPtrInput
	// The description of the template.
	Description pulumi.StringPtrInput
	// Is it triggered successfully.
	HasTrigger pulumi.BoolPtrInput
	// The sharing type of the template. The sharing type of templates created by users are set to Private. The sharing type of common templates provided by OOS are set to Public.
	ShareType pulumi.StringPtrInput
	// A mapping of tags to assign to the resource.
	Tags pulumi.MapInput
	// The format of the template. The format can be JSON or YAML. The system automatically identifies the format.
	TemplateFormat pulumi.StringPtrInput
	// The id of OOS Template.
	TemplateId pulumi.StringPtrInput
	// The name of the template. The template name can be up to 200 characters in length. The name can contain letters, digits, hyphens (-), and underscores (_). It cannot start with `ALIYUN`, `ACS`, `ALIBABA`, or `ALICLOUD`.
	TemplateName pulumi.StringPtrInput
	// The type of OOS Template. `Automation` means the implementation of Alibaba Cloud API template, `Package` means represents a template for installing software.
	TemplateType pulumi.StringPtrInput
	// The version of OOS Template.
	TemplateVersion pulumi.StringPtrInput
	// The user who updated the template.
	UpdatedBy pulumi.StringPtrInput
	// The time when the template was updated.
	UpdatedDate pulumi.StringPtrInput
	// The name of template version.
	VersionName pulumi.StringPtrInput
}

func (TemplateState) ElementType

func (TemplateState) ElementType() reflect.Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL