1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. ros
  5. getTemplateScratches
Alibaba Cloud v3.54.0 published on Wednesday, Apr 24, 2024 by Pulumi

alicloud.ros.getTemplateScratches

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.54.0 published on Wednesday, Apr 24, 2024 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);
    
    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)
    
    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
    	})
    }
    
    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),
        };
    });
    
    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()));
        }
    }
    
    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
    File name where to save data source results (after running pulumi preview).
    Status string
    The status of the resource. Valid Values: GENERATE_IN_PROGRESS, GENERATE_COMPLETE and GENERATE_FAILED.
    TemplateScratchType 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 []string
    A list of Template Scratch IDs.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Status string
    The status of the resource. Valid Values: GENERATE_IN_PROGRESS, GENERATE_COMPLETE and GENERATE_FAILED.
    TemplateScratchType 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 List<String>
    A list of Template Scratch IDs.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    status String
    The status of the resource. Valid Values: GENERATE_IN_PROGRESS, GENERATE_COMPLETE and GENERATE_FAILED.
    templateScratchType 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 string[]
    A list of Template Scratch IDs.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    status string
    The status of the resource. Valid Values: GENERATE_IN_PROGRESS, GENERATE_COMPLETE and GENERATE_FAILED.
    templateScratchType 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 Sequence[str]
    A list of Template Scratch IDs.
    output_file str
    File name where to save data source results (after running pulumi preview).
    status str
    The status of the resource. Valid Values: GENERATE_IN_PROGRESS, GENERATE_COMPLETE and GENERATE_FAILED.
    template_scratch_type 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 List<String>
    A list of Template Scratch IDs.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    status String
    The status of the resource. Valid Values: GENERATE_IN_PROGRESS, GENERATE_COMPLETE and GENERATE_FAILED.
    templateScratchType 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 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

    GetTemplateScratchesScratchSourceResource

    GetTemplateScratchesScratchSourceResourceGroup

    GetTemplateScratchesScratchSourceTag

    ResourceTags Dictionary<string, object>
    ResourceTypeFilters List<string>
    ResourceTags map[string]interface{}
    ResourceTypeFilters []string
    resourceTags Map<String,Object>
    resourceTypeFilters List<String>
    resourceTags {[key: string]: any}
    resourceTypeFilters string[]
    resource_tags Mapping[str, Any]
    resource_type_filters Sequence[str]
    resourceTags Map<Any>
    resourceTypeFilters List<String>

    GetTemplateScratchesScratchStack

    StackId string
    StackId string
    stackId String
    stackId string
    stackId String

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.54.0 published on Wednesday, Apr 24, 2024 by Pulumi