Alibaba Cloud

v3.28.0 published on Tuesday, Aug 16, 2022 by Pulumi

getTemplateScratches

This data source provides the Ros Template Scratches of the current Alibaba Cloud user.

NOTE: Available in v1.151.0+.

Example Usage

Basic Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var ids = Output.Create(AliCloud.Ros.GetTemplateScratches.InvokeAsync(new AliCloud.Ros.GetTemplateScratchesArgs
        {
            Ids = 
            {
                "example_value",
            },
        }));
        this.RosTemplateScratchId1 = ids.Apply(ids => ids.Scratches?[0]?.Id);
        var status = Output.Create(AliCloud.Ros.GetTemplateScratches.InvokeAsync(new AliCloud.Ros.GetTemplateScratchesArgs
        {
            Status = "GENERATE_COMPLETE",
        }));
        this.RosTemplateScratchId2 = status.Apply(status => status.Scratches?[0]?.Id);
        var templateScratchType = Output.Create(AliCloud.Ros.GetTemplateScratches.InvokeAsync(new AliCloud.Ros.GetTemplateScratchesArgs
        {
            TemplateScratchType = "ResourceImport",
        }));
        this.RosTemplateScratchId3 = templateScratchType.Apply(templateScratchType => templateScratchType.Scratches?[0]?.Id);
    }

    [Output("rosTemplateScratchId1")]
    public Output<string> RosTemplateScratchId1 { get; set; }
    [Output("rosTemplateScratchId2")]
    public Output<string> RosTemplateScratchId2 { get; set; }
    [Output("rosTemplateScratchId3")]
    public Output<string> RosTemplateScratchId3 { get; set; }
}
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 {
		ids, err := ros.GetTemplateScratches(ctx, &ros.GetTemplateScratchesArgs{
			Ids: []string{
				"example_value",
			},
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("rosTemplateScratchId1", ids.Scratches[0].Id)
		status, err := ros.GetTemplateScratches(ctx, &ros.GetTemplateScratchesArgs{
			Status: pulumi.StringRef("GENERATE_COMPLETE"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("rosTemplateScratchId2", status.Scratches[0].Id)
		templateScratchType, err := ros.GetTemplateScratches(ctx, &ros.GetTemplateScratchesArgs{
			TemplateScratchType: pulumi.StringRef("ResourceImport"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("rosTemplateScratchId3", templateScratchType.Scratches[0].Id)
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ros.RosFunctions;
import com.pulumi.alicloud.ros.inputs.GetTemplateScratchesArgs;
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 ids = RosFunctions.getTemplateScratches(GetTemplateScratchesArgs.builder()
            .ids("example_value")
            .build());

        ctx.export("rosTemplateScratchId1", ids.applyValue(getTemplateScratchesResult -> getTemplateScratchesResult.scratches()[0].id()));
        final var status = RosFunctions.getTemplateScratches(GetTemplateScratchesArgs.builder()
            .status("GENERATE_COMPLETE")
            .build());

        ctx.export("rosTemplateScratchId2", status.applyValue(getTemplateScratchesResult -> getTemplateScratchesResult.scratches()[0].id()));
        final var templateScratchType = RosFunctions.getTemplateScratches(GetTemplateScratchesArgs.builder()
            .templateScratchType("ResourceImport")
            .build());

        ctx.export("rosTemplateScratchId3", templateScratchType.applyValue(getTemplateScratchesResult -> getTemplateScratchesResult.scratches()[0].id()));
    }
}
import pulumi
import pulumi_alicloud as alicloud

ids = alicloud.ros.get_template_scratches(ids=["example_value"])
pulumi.export("rosTemplateScratchId1", ids.scratches[0].id)
status = alicloud.ros.get_template_scratches(status="GENERATE_COMPLETE")
pulumi.export("rosTemplateScratchId2", status.scratches[0].id)
template_scratch_type = alicloud.ros.get_template_scratches(template_scratch_type="ResourceImport")
pulumi.export("rosTemplateScratchId3", template_scratch_type.scratches[0].id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const ids = alicloud.ros.getTemplateScratches({
    ids: ["example_value"],
});
export const rosTemplateScratchId1 = ids.then(ids => ids.scratches?[0]?.id);
const status = alicloud.ros.getTemplateScratches({
    status: "GENERATE_COMPLETE",
});
export const rosTemplateScratchId2 = status.then(status => status.scratches?[0]?.id);
const templateScratchType = alicloud.ros.getTemplateScratches({
    templateScratchType: "ResourceImport",
});
export const rosTemplateScratchId3 = templateScratchType.then(templateScratchType => templateScratchType.scratches?[0]?.id);
variables:
  ids:
    Fn::Invoke:
      Function: alicloud:ros:getTemplateScratches
      Arguments:
        ids:
          - example_value
  status:
    Fn::Invoke:
      Function: alicloud:ros:getTemplateScratches
      Arguments:
        status: GENERATE_COMPLETE
  templateScratchType:
    Fn::Invoke:
      Function: alicloud:ros:getTemplateScratches
      Arguments:
        templateScratchType: ResourceImport
outputs:
  rosTemplateScratchId1: ${ids.scratches[0].id}
  rosTemplateScratchId2: ${status.scratches[0].id}
  rosTemplateScratchId3: ${templateScratchType.scratches[0].id}

Using getTemplateScratches

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getTemplateScratches(args: GetTemplateScratchesArgs, opts?: InvokeOptions): Promise<GetTemplateScratchesResult>
function getTemplateScratchesOutput(args: GetTemplateScratchesOutputArgs, opts?: InvokeOptions): Output<GetTemplateScratchesResult>
def get_template_scratches(enable_details: Optional[bool] = None,
                           ids: Optional[Sequence[str]] = None,
                           output_file: Optional[str] = None,
                           status: Optional[str] = None,
                           template_scratch_type: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetTemplateScratchesResult
def get_template_scratches_output(enable_details: Optional[pulumi.Input[bool]] = None,
                           ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                           output_file: Optional[pulumi.Input[str]] = None,
                           status: Optional[pulumi.Input[str]] = None,
                           template_scratch_type: Optional[pulumi.Input[str]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetTemplateScratchesResult]
func GetTemplateScratches(ctx *Context, args *GetTemplateScratchesArgs, opts ...InvokeOption) (*GetTemplateScratchesResult, error)
func GetTemplateScratchesOutput(ctx *Context, args *GetTemplateScratchesOutputArgs, opts ...InvokeOption) GetTemplateScratchesResultOutput

> Note: This function is named GetTemplateScratches in the Go SDK.

public static class GetTemplateScratches 
{
    public static Task<GetTemplateScratchesResult> InvokeAsync(GetTemplateScratchesArgs args, InvokeOptions? opts = null)
    public static Output<GetTemplateScratchesResult> Invoke(GetTemplateScratchesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetTemplateScratchesResult> getTemplateScratches(GetTemplateScratchesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: alicloud:ros/getTemplateScratches:getTemplateScratches
  arguments:
    # arguments dictionary

The following arguments are supported:

EnableDetails bool

Default to false. Set it to true can output more details about resource attributes.

Ids List<string>

A list of Template Scratch IDs.

OutputFile string
Status string

The status of the resource.

TemplateScratchType string

The type of the Template Scratch.

EnableDetails bool

Default to false. Set it to true can output more details about resource attributes.

Ids []string

A list of Template Scratch IDs.

OutputFile string
Status string

The status of the resource.

TemplateScratchType string

The type of the Template Scratch.

enableDetails Boolean

Default to false. Set it to true can output more details about resource attributes.

ids List<String>

A list of Template Scratch IDs.

outputFile String
status String

The status of the resource.

templateScratchType String

The type of the Template Scratch.

enableDetails boolean

Default to false. Set it to true can output more details about resource attributes.

ids string[]

A list of Template Scratch IDs.

outputFile string
status string

The status of the resource.

templateScratchType string

The type of the Template Scratch.

enable_details bool

Default to false. Set it to true can output more details about resource attributes.

ids Sequence[str]

A list of Template Scratch IDs.

output_file str
status str

The status of the resource.

template_scratch_type str

The type of the Template Scratch.

enableDetails Boolean

Default to false. Set it to true can output more details about resource attributes.

ids List<String>

A list of Template Scratch IDs.

outputFile String
status String

The status of the resource.

templateScratchType String

The type of the Template Scratch.

getTemplateScratches Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>
Scratches List<Pulumi.AliCloud.Ros.Outputs.GetTemplateScratchesScratch>
EnableDetails bool
OutputFile string
Status string
TemplateScratchType string
Id string

The provider-assigned unique ID for this managed resource.

Ids []string
Scratches []GetTemplateScratchesScratch
EnableDetails bool
OutputFile string
Status string
TemplateScratchType string
id String

The provider-assigned unique ID for this managed resource.

ids List<String>
scratches List<GetTemplateScratchesScratch>
enableDetails Boolean
outputFile String
status String
templateScratchType String
id string

The provider-assigned unique ID for this managed resource.

ids string[]
scratches GetTemplateScratchesScratch[]
enableDetails boolean
outputFile string
status string
templateScratchType string
id str

The provider-assigned unique ID for this managed resource.

ids Sequence[str]
scratches Sequence[GetTemplateScratchesScratch]
enable_details bool
output_file str
status str
template_scratch_type str
id String

The provider-assigned unique ID for this managed resource.

ids List<String>
scratches List<Property Map>
enableDetails Boolean
outputFile String
status String
templateScratchType String

Supporting Types

GetTemplateScratchesScratch

CreateTime string

The creation time of the resource.

Description string

The description of the Template Scratch.

Id string

The ID of the Template Scratch.

LogicalIdStrategy string

The Logical ID generation strategy of the Template Scratch.

PreferenceParameters List<Pulumi.AliCloud.Ros.Inputs.GetTemplateScratchesScratchPreferenceParameter>

Priority parameter.

SourceResourceGroups List<Pulumi.AliCloud.Ros.Inputs.GetTemplateScratchesScratchSourceResourceGroup>

Source resource grouping.

SourceResources List<Pulumi.AliCloud.Ros.Inputs.GetTemplateScratchesScratchSourceResource>

Source resource.

SourceTags List<Pulumi.AliCloud.Ros.Inputs.GetTemplateScratchesScratchSourceTag>

The Source label list.

Stacks List<Pulumi.AliCloud.Ros.Inputs.GetTemplateScratchesScratchStack>

A list of resource stacks associated with the resource scene.

Status string

The status of the resource.

TemplateScratchId string

The ID of the Template Scratch.

TemplateScratchType string

The type of the Template Scratch.

CreateTime string

The creation time of the resource.

Description string

The description of the Template Scratch.

Id string

The ID of the Template Scratch.

LogicalIdStrategy string

The Logical ID generation strategy of the Template Scratch.

PreferenceParameters []GetTemplateScratchesScratchPreferenceParameter

Priority parameter.

SourceResourceGroups []GetTemplateScratchesScratchSourceResourceGroup

Source resource grouping.

SourceResources []GetTemplateScratchesScratchSourceResource

Source resource.

SourceTags []GetTemplateScratchesScratchSourceTag

The Source label list.

Stacks []GetTemplateScratchesScratchStack

A list of resource stacks associated with the resource scene.

Status string

The status of the resource.

TemplateScratchId string

The ID of the Template Scratch.

TemplateScratchType string

The type of the Template Scratch.

createTime String

The creation time of the resource.

description String

The description of the Template Scratch.

id String

The ID of the Template Scratch.

logicalIdStrategy String

The Logical ID generation strategy of the Template Scratch.

preferenceParameters List<GetTemplateScratchesScratchPreferenceParameter>

Priority parameter.

sourceResourceGroups List<GetTemplateScratchesScratchSourceResourceGroup>

Source resource grouping.

sourceResources List<GetTemplateScratchesScratchSourceResource>

Source resource.

sourceTags List<GetTemplateScratchesScratchSourceTag>

The Source label list.

stacks List<GetTemplateScratchesScratchStack>

A list of resource stacks associated with the resource scene.

status String

The status of the resource.

templateScratchId String

The ID of the Template Scratch.

templateScratchType String

The type of the Template Scratch.

createTime string

The creation time of the resource.

description string

The description of the Template Scratch.

id string

The ID of the Template Scratch.

logicalIdStrategy string

The Logical ID generation strategy of the Template Scratch.

preferenceParameters GetTemplateScratchesScratchPreferenceParameter[]

Priority parameter.

sourceResourceGroups GetTemplateScratchesScratchSourceResourceGroup[]

Source resource grouping.

sourceResources GetTemplateScratchesScratchSourceResource[]

Source resource.

sourceTags GetTemplateScratchesScratchSourceTag[]

The Source label list.

stacks GetTemplateScratchesScratchStack[]

A list of resource stacks associated with the resource scene.

status string

The status of the resource.

templateScratchId string

The ID of the Template Scratch.

templateScratchType string

The type of the Template Scratch.

create_time str

The creation time of the resource.

description str

The description of the Template Scratch.

id str

The ID of the Template Scratch.

logical_id_strategy str

The Logical ID generation strategy of the Template Scratch.

preference_parameters Sequence[GetTemplateScratchesScratchPreferenceParameter]

Priority parameter.

source_resource_groups Sequence[GetTemplateScratchesScratchSourceResourceGroup]

Source resource grouping.

source_resources Sequence[GetTemplateScratchesScratchSourceResource]

Source resource.

source_tags Sequence[GetTemplateScratchesScratchSourceTag]

The Source label list.

stacks Sequence[GetTemplateScratchesScratchStack]

A list of resource stacks associated with the resource scene.

status str

The status of the resource.

template_scratch_id str

The ID of the Template Scratch.

template_scratch_type str

The type of the Template Scratch.

createTime String

The creation time of the resource.

description String

The description of the Template Scratch.

id String

The ID of the Template Scratch.

logicalIdStrategy String

The Logical ID generation strategy of the Template Scratch.

preferenceParameters List<Property Map>

Priority parameter.

sourceResourceGroups List<Property Map>

Source resource grouping.

sourceResources List<Property Map>

Source resource.

sourceTags List<Property Map>

The Source label list.

stacks List<Property Map>

A list of resource stacks associated with the resource scene.

status String

The status of the resource.

templateScratchId String

The ID of the Template Scratch.

templateScratchType String

The type of the Template Scratch.

GetTemplateScratchesScratchPreferenceParameter

ParameterKey string

Priority parameter key.

ParameterValue string

Priority parameter value.

ParameterKey string

Priority parameter key.

ParameterValue string

Priority parameter value.

parameterKey String

Priority parameter key.

parameterValue String

Priority parameter value.

parameterKey string

Priority parameter key.

parameterValue string

Priority parameter value.

parameter_key str

Priority parameter key.

parameter_value str

Priority parameter value.

parameterKey String

Priority parameter key.

parameterValue String

Priority parameter value.

GetTemplateScratchesScratchSourceResource

ResourceId string

The ID of the Source Resource.

ResourceType string

The type of the Source resource.

ResourceId string

The ID of the Source Resource.

ResourceType string

The type of the Source resource.

resourceId String

The ID of the Source Resource.

resourceType String

The type of the Source resource.

resourceId string

The ID of the Source Resource.

resourceType string

The type of the Source resource.

resource_id str

The ID of the Source Resource.

resource_type str

The type of the Source resource.

resourceId String

The ID of the Source Resource.

resourceType String

The type of the Source resource.

GetTemplateScratchesScratchSourceResourceGroup

ResourceGroupId string

The ID of the Source Resource Group.

ResourceTypeFilters List<string>

Source resource type filter list.

ResourceGroupId string

The ID of the Source Resource Group.

ResourceTypeFilters []string

Source resource type filter list.

resourceGroupId String

The ID of the Source Resource Group.

resourceTypeFilters List<String>

Source resource type filter list.

resourceGroupId string

The ID of the Source Resource Group.

resourceTypeFilters string[]

Source resource type filter list.

resource_group_id str

The ID of the Source Resource Group.

resource_type_filters Sequence[str]

Source resource type filter list.

resourceGroupId String

The ID of the Source Resource Group.

resourceTypeFilters List<String>

Source resource type filter list.

GetTemplateScratchesScratchSourceTag

ResourceTags Dictionary<string, object>

Source label.

ResourceTypeFilters List<string>

Source resource type filter list.

ResourceTags map[string]interface{}

Source label.

ResourceTypeFilters []string

Source resource type filter list.

resourceTags Map<String,Object>

Source label.

resourceTypeFilters List<String>

Source resource type filter list.

resourceTags {[key: string]: any}

Source label.

resourceTypeFilters string[]

Source resource type filter list.

resource_tags Mapping[str, Any]

Source label.

resource_type_filters Sequence[str]

Source resource type filter list.

resourceTags Map<Any>

Source label.

resourceTypeFilters List<String>

Source resource type filter list.

GetTemplateScratchesScratchStack

StackId string

The ID of the Resource stack.

StackId string

The ID of the Resource stack.

stackId String

The ID of the Resource stack.

stackId string

The ID of the Resource stack.

stack_id str

The ID of the Resource stack.

stackId String

The ID of the Resource stack.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.