1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. ros
  5. getTemplateScratches
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.ros.getTemplateScratches

Explore with Pulumi AI

Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

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

NOTE: Available in v1.151.0+.

Example Usage

Basic Usage

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);
Copy
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)
Copy
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
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var ids = AliCloud.Ros.GetTemplateScratches.Invoke(new()
    {
        Ids = new[]
        {
            "example_value",
        },
    });

    var status = AliCloud.Ros.GetTemplateScratches.Invoke(new()
    {
        Status = "GENERATE_COMPLETE",
    });

    var templateScratchType = AliCloud.Ros.GetTemplateScratches.Invoke(new()
    {
        TemplateScratchType = "ResourceImport",
    });

    return new Dictionary<string, object?>
    {
        ["rosTemplateScratchId1"] = ids.Apply(getTemplateScratchesResult => getTemplateScratchesResult.Scratches[0]?.Id),
        ["rosTemplateScratchId2"] = status.Apply(getTemplateScratchesResult => getTemplateScratchesResult.Scratches[0]?.Id),
        ["rosTemplateScratchId3"] = templateScratchType.Apply(getTemplateScratchesResult => getTemplateScratchesResult.Scratches[0]?.Id),
    };
});
Copy
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()));
    }
}
Copy
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}
Copy

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>
Copy
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]
Copy
func GetTemplateScratches(ctx *Context, args *GetTemplateScratchesArgs, opts ...InvokeOption) (*GetTemplateScratchesResult, error)
func GetTemplateScratchesOutput(ctx *Context, args *GetTemplateScratchesOutputArgs, opts ...InvokeOption) GetTemplateScratchesResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetTemplateScratchesResult> getTemplateScratches(GetTemplateScratchesArgs args, InvokeOptions options)
public static Output<GetTemplateScratchesResult> getTemplateScratches(GetTemplateScratchesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:ros/getTemplateScratches:getTemplateScratches
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

EnableDetails bool
Default to false. Set it to true can output more details about resource attributes.
Ids Changes to this property will trigger replacement. List<string>
A list of Template Scratch IDs.
OutputFile string
File name where to save data source results (after running pulumi preview).
Status Changes to this property will trigger replacement. string
The status of the resource. Valid Values: GENERATE_IN_PROGRESS, GENERATE_COMPLETE and GENERATE_FAILED.
TemplateScratchType Changes to this property will trigger replacement. string
The type of the template scratch. Valid Values: ResourceImport, ArchitectureReplication.
EnableDetails bool
Default to false. Set it to true can output more details about resource attributes.
Ids Changes to this property will trigger replacement. []string
A list of Template Scratch IDs.
OutputFile string
File name where to save data source results (after running pulumi preview).
Status Changes to this property will trigger replacement. string
The status of the resource. Valid Values: GENERATE_IN_PROGRESS, GENERATE_COMPLETE and GENERATE_FAILED.
TemplateScratchType Changes to this property will trigger replacement. string
The type of the template scratch. Valid Values: ResourceImport, ArchitectureReplication.
enableDetails Boolean
Default to false. Set it to true can output more details about resource attributes.
ids Changes to this property will trigger replacement. List<String>
A list of Template Scratch IDs.
outputFile String
File name where to save data source results (after running pulumi preview).
status Changes to this property will trigger replacement. String
The status of the resource. Valid Values: GENERATE_IN_PROGRESS, GENERATE_COMPLETE and GENERATE_FAILED.
templateScratchType Changes to this property will trigger replacement. String
The type of the template scratch. Valid Values: ResourceImport, ArchitectureReplication.
enableDetails boolean
Default to false. Set it to true can output more details about resource attributes.
ids Changes to this property will trigger replacement. string[]
A list of Template Scratch IDs.
outputFile string
File name where to save data source results (after running pulumi preview).
status Changes to this property will trigger replacement. string
The status of the resource. Valid Values: GENERATE_IN_PROGRESS, GENERATE_COMPLETE and GENERATE_FAILED.
templateScratchType Changes to this property will trigger replacement. string
The type of the template scratch. Valid Values: ResourceImport, ArchitectureReplication.
enable_details bool
Default to false. Set it to true can output more details about resource attributes.
ids Changes to this property will trigger replacement. Sequence[str]
A list of Template Scratch IDs.
output_file str
File name where to save data source results (after running pulumi preview).
status Changes to this property will trigger replacement. str
The status of the resource. Valid Values: GENERATE_IN_PROGRESS, GENERATE_COMPLETE and GENERATE_FAILED.
template_scratch_type Changes to this property will trigger replacement. str
The type of the template scratch. Valid Values: ResourceImport, ArchitectureReplication.
enableDetails Boolean
Default to false. Set it to true can output more details about resource attributes.
ids Changes to this property will trigger replacement. List<String>
A list of Template Scratch IDs.
outputFile String
File name where to save data source results (after running pulumi preview).
status Changes to this property will trigger replacement. String
The status of the resource. Valid Values: GENERATE_IN_PROGRESS, GENERATE_COMPLETE and GENERATE_FAILED.
templateScratchType Changes to this property will trigger replacement. String
The type of the template scratch. Valid Values: ResourceImport, ArchitectureReplication.

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 This property is required. string
The creation time of the resource.
Description This property is required. string
The description of the Template Scratch.
Id This property is required. string
The ID of the Template Scratch.
LogicalIdStrategy This property is required. string
The Logical ID generation strategy of the Template Scratch.
PreferenceParameters This property is required. List<Pulumi.AliCloud.Ros.Inputs.GetTemplateScratchesScratchPreferenceParameter>
Priority parameter.
SourceResourceGroups This property is required. List<Pulumi.AliCloud.Ros.Inputs.GetTemplateScratchesScratchSourceResourceGroup>
Source resource grouping.
SourceResources This property is required. List<Pulumi.AliCloud.Ros.Inputs.GetTemplateScratchesScratchSourceResource>
Source resource.
SourceTags This property is required. List<Pulumi.AliCloud.Ros.Inputs.GetTemplateScratchesScratchSourceTag>
The Source label list.
Stacks This property is required. List<Pulumi.AliCloud.Ros.Inputs.GetTemplateScratchesScratchStack>
A list of resource stacks associated with the resource scene.
Status This property is required. string
The status of the resource.
TemplateScratchId This property is required. string
The ID of the Template Scratch.
TemplateScratchType This property is required. string
The type of the Template Scratch.
CreateTime This property is required. string
The creation time of the resource.
Description This property is required. string
The description of the Template Scratch.
Id This property is required. string
The ID of the Template Scratch.
LogicalIdStrategy This property is required. string
The Logical ID generation strategy of the Template Scratch.
PreferenceParameters This property is required. []GetTemplateScratchesScratchPreferenceParameter
Priority parameter.
SourceResourceGroups This property is required. []GetTemplateScratchesScratchSourceResourceGroup
Source resource grouping.
SourceResources This property is required. []GetTemplateScratchesScratchSourceResource
Source resource.
SourceTags This property is required. []GetTemplateScratchesScratchSourceTag
The Source label list.
Stacks This property is required. []GetTemplateScratchesScratchStack
A list of resource stacks associated with the resource scene.
Status This property is required. string
The status of the resource.
TemplateScratchId This property is required. string
The ID of the Template Scratch.
TemplateScratchType This property is required. string
The type of the Template Scratch.
createTime This property is required. String
The creation time of the resource.
description This property is required. String
The description of the Template Scratch.
id This property is required. String
The ID of the Template Scratch.
logicalIdStrategy This property is required. String
The Logical ID generation strategy of the Template Scratch.
preferenceParameters This property is required. List<GetTemplateScratchesScratchPreferenceParameter>
Priority parameter.
sourceResourceGroups This property is required. List<GetTemplateScratchesScratchSourceResourceGroup>
Source resource grouping.
sourceResources This property is required. List<GetTemplateScratchesScratchSourceResource>
Source resource.
sourceTags This property is required. List<GetTemplateScratchesScratchSourceTag>
The Source label list.
stacks This property is required. List<GetTemplateScratchesScratchStack>
A list of resource stacks associated with the resource scene.
status This property is required. String
The status of the resource.
templateScratchId This property is required. String
The ID of the Template Scratch.
templateScratchType This property is required. String
The type of the Template Scratch.
createTime This property is required. string
The creation time of the resource.
description This property is required. string
The description of the Template Scratch.
id This property is required. string
The ID of the Template Scratch.
logicalIdStrategy This property is required. string
The Logical ID generation strategy of the Template Scratch.
preferenceParameters This property is required. GetTemplateScratchesScratchPreferenceParameter[]
Priority parameter.
sourceResourceGroups This property is required. GetTemplateScratchesScratchSourceResourceGroup[]
Source resource grouping.
sourceResources This property is required. GetTemplateScratchesScratchSourceResource[]
Source resource.
sourceTags This property is required. GetTemplateScratchesScratchSourceTag[]
The Source label list.
stacks This property is required. GetTemplateScratchesScratchStack[]
A list of resource stacks associated with the resource scene.
status This property is required. string
The status of the resource.
templateScratchId This property is required. string
The ID of the Template Scratch.
templateScratchType This property is required. string
The type of the Template Scratch.
create_time This property is required. str
The creation time of the resource.
description This property is required. str
The description of the Template Scratch.
id This property is required. str
The ID of the Template Scratch.
logical_id_strategy This property is required. str
The Logical ID generation strategy of the Template Scratch.
preference_parameters This property is required. Sequence[GetTemplateScratchesScratchPreferenceParameter]
Priority parameter.
source_resource_groups This property is required. Sequence[GetTemplateScratchesScratchSourceResourceGroup]
Source resource grouping.
source_resources This property is required. Sequence[GetTemplateScratchesScratchSourceResource]
Source resource.
source_tags This property is required. Sequence[GetTemplateScratchesScratchSourceTag]
The Source label list.
stacks This property is required. Sequence[GetTemplateScratchesScratchStack]
A list of resource stacks associated with the resource scene.
status This property is required. str
The status of the resource.
template_scratch_id This property is required. str
The ID of the Template Scratch.
template_scratch_type This property is required. str
The type of the Template Scratch.
createTime This property is required. String
The creation time of the resource.
description This property is required. String
The description of the Template Scratch.
id This property is required. String
The ID of the Template Scratch.
logicalIdStrategy This property is required. String
The Logical ID generation strategy of the Template Scratch.
preferenceParameters This property is required. List<Property Map>
Priority parameter.
sourceResourceGroups This property is required. List<Property Map>
Source resource grouping.
sourceResources This property is required. List<Property Map>
Source resource.
sourceTags This property is required. List<Property Map>
The Source label list.
stacks This property is required. List<Property Map>
A list of resource stacks associated with the resource scene.
status This property is required. String
The status of the resource.
templateScratchId This property is required. String
The ID of the Template Scratch.
templateScratchType This property is required. String
The type of the Template Scratch.

GetTemplateScratchesScratchPreferenceParameter

ParameterKey This property is required. string
Priority parameter key.
ParameterValue This property is required. string
Priority parameter value.
ParameterKey This property is required. string
Priority parameter key.
ParameterValue This property is required. string
Priority parameter value.
parameterKey This property is required. String
Priority parameter key.
parameterValue This property is required. String
Priority parameter value.
parameterKey This property is required. string
Priority parameter key.
parameterValue This property is required. string
Priority parameter value.
parameter_key This property is required. str
Priority parameter key.
parameter_value This property is required. str
Priority parameter value.
parameterKey This property is required. String
Priority parameter key.
parameterValue This property is required. String
Priority parameter value.

GetTemplateScratchesScratchSourceResource

ResourceId This property is required. string
The ID of the Source Resource.
ResourceType This property is required. string
The type of the Source resource.
ResourceId This property is required. string
The ID of the Source Resource.
ResourceType This property is required. string
The type of the Source resource.
resourceId This property is required. String
The ID of the Source Resource.
resourceType This property is required. String
The type of the Source resource.
resourceId This property is required. string
The ID of the Source Resource.
resourceType This property is required. string
The type of the Source resource.
resource_id This property is required. str
The ID of the Source Resource.
resource_type This property is required. str
The type of the Source resource.
resourceId This property is required. String
The ID of the Source Resource.
resourceType This property is required. String
The type of the Source resource.

GetTemplateScratchesScratchSourceResourceGroup

ResourceGroupId This property is required. string
The ID of the Source Resource Group.
ResourceTypeFilters This property is required. List<string>
Source resource type filter list.
ResourceGroupId This property is required. string
The ID of the Source Resource Group.
ResourceTypeFilters This property is required. []string
Source resource type filter list.
resourceGroupId This property is required. String
The ID of the Source Resource Group.
resourceTypeFilters This property is required. List<String>
Source resource type filter list.
resourceGroupId This property is required. string
The ID of the Source Resource Group.
resourceTypeFilters This property is required. string[]
Source resource type filter list.
resource_group_id This property is required. str
The ID of the Source Resource Group.
resource_type_filters This property is required. Sequence[str]
Source resource type filter list.
resourceGroupId This property is required. String
The ID of the Source Resource Group.
resourceTypeFilters This property is required. List<String>
Source resource type filter list.

GetTemplateScratchesScratchSourceTag

ResourceTags This property is required. Dictionary<string, string>
Source label.
ResourceTypeFilters This property is required. List<string>
Source resource type filter list.
ResourceTags This property is required. map[string]string
Source label.
ResourceTypeFilters This property is required. []string
Source resource type filter list.
resourceTags This property is required. Map<String,String>
Source label.
resourceTypeFilters This property is required. List<String>
Source resource type filter list.
resourceTags This property is required. {[key: string]: string}
Source label.
resourceTypeFilters This property is required. string[]
Source resource type filter list.
resource_tags This property is required. Mapping[str, str]
Source label.
resource_type_filters This property is required. Sequence[str]
Source resource type filter list.
resourceTags This property is required. Map<String>
Source label.
resourceTypeFilters This property is required. List<String>
Source resource type filter list.

GetTemplateScratchesScratchStack

StackId This property is required. string
The ID of the Resource stack.
StackId This property is required. string
The ID of the Resource stack.
stackId This property is required. String
The ID of the Resource stack.
stackId This property is required. string
The ID of the Resource stack.
stack_id This property is required. str
The ID of the Resource stack.
stackId This property is required. String
The ID of the Resource stack.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi