Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi
alicloud.ros.getTemplateScratches
Explore with Pulumi AI
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)
public static Output<GetTemplateScratchesResult> getTemplateScratches(GetTemplateScratchesArgs args, InvokeOptions options)
fn::invoke:
function: alicloud:ros/getTemplateScratches:getTemplateScratches
arguments:
# arguments dictionary
The following arguments are supported:
- Enable
Details bool - Default to
false
. Set it totrue
can output more details about resource attributes. - Ids
Changes to this property will trigger replacement.
- A list of Template Scratch IDs.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Status
Changes to this property will trigger replacement.
- The status of the resource. Valid Values:
GENERATE_IN_PROGRESS
,GENERATE_COMPLETE
andGENERATE_FAILED
. - Template
Scratch Type Changes to this property will trigger replacement.
- The type of the template scratch. Valid Values:
ResourceImport
,ArchitectureReplication
.
- Enable
Details bool - Default to
false
. Set it totrue
can output more details about resource attributes. - Ids
Changes to this property will trigger replacement.
- A list of Template Scratch IDs.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Status
Changes to this property will trigger replacement.
- The status of the resource. Valid Values:
GENERATE_IN_PROGRESS
,GENERATE_COMPLETE
andGENERATE_FAILED
. - Template
Scratch Type Changes to this property will trigger replacement.
- The type of the template scratch. Valid Values:
ResourceImport
,ArchitectureReplication
.
- enable
Details Boolean - Default to
false
. Set it totrue
can output more details about resource attributes. - ids
Changes to this property will trigger replacement.
- A list of Template Scratch IDs.
- output
File String - File name where to save data source results (after running
pulumi preview
). - status
Changes to this property will trigger replacement.
- The status of the resource. Valid Values:
GENERATE_IN_PROGRESS
,GENERATE_COMPLETE
andGENERATE_FAILED
. - template
Scratch Type Changes to this property will trigger replacement.
- The type of the template scratch. Valid Values:
ResourceImport
,ArchitectureReplication
.
- enable
Details boolean - Default to
false
. Set it totrue
can output more details about resource attributes. - ids
Changes to this property will trigger replacement.
- A list of Template Scratch IDs.
- output
File string - File name where to save data source results (after running
pulumi preview
). - status
Changes to this property will trigger replacement.
- The status of the resource. Valid Values:
GENERATE_IN_PROGRESS
,GENERATE_COMPLETE
andGENERATE_FAILED
. - template
Scratch Type Changes to this property will trigger replacement.
- The type of the template scratch. Valid Values:
ResourceImport
,ArchitectureReplication
.
- enable_
details bool - Default to
false
. Set it totrue
can output more details about resource attributes. - ids
Changes to this property will trigger replacement.
- 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.
- The status of the resource. Valid Values:
GENERATE_IN_PROGRESS
,GENERATE_COMPLETE
andGENERATE_FAILED
. - template_
scratch_ type Changes to this property will trigger replacement.
- The type of the template scratch. Valid Values:
ResourceImport
,ArchitectureReplication
.
- enable
Details Boolean - Default to
false
. Set it totrue
can output more details about resource attributes. - ids
Changes to this property will trigger replacement.
- A list of Template Scratch IDs.
- output
File String - File name where to save data source results (after running
pulumi preview
). - status
Changes to this property will trigger replacement.
- The status of the resource. Valid Values:
GENERATE_IN_PROGRESS
,GENERATE_COMPLETE
andGENERATE_FAILED
. - template
Scratch Type Changes to this property will trigger replacement.
- 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.
Ali Cloud. Ros. Outputs. Get Template Scratches Scratch> - Enable
Details bool - Output
File string - Status string
- Template
Scratch stringType
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Scratches
[]Get
Template Scratches Scratch - Enable
Details bool - Output
File string - Status string
- Template
Scratch stringType
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- scratches
List<Get
Template Scratches Scratch> - enable
Details Boolean - output
File String - status String
- template
Scratch StringType
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- scratches
Get
Template Scratches Scratch[] - enable
Details boolean - output
File string - status string
- template
Scratch stringType
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- scratches
Sequence[Get
Template Scratches Scratch] - enable_
details bool - output_
file str - status str
- template_
scratch_ strtype
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- scratches List<Property Map>
- enable
Details Boolean - output
File String - status String
- template
Scratch StringType
Supporting Types
GetTemplateScratchesScratch
- Create
Time 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.
- Logical
Id Strategy This property is required. string - The Logical ID generation strategy of the Template Scratch.
- Preference
Parameters This property is required. List<Pulumi.Ali Cloud. Ros. Inputs. Get Template Scratches Scratch Preference Parameter> - Priority parameter.
- Source
Resource Groups This property is required. List<Pulumi.Ali Cloud. Ros. Inputs. Get Template Scratches Scratch Source Resource Group> - Source resource grouping.
- Source
Resources This property is required. List<Pulumi.Ali Cloud. Ros. Inputs. Get Template Scratches Scratch Source Resource> - Source resource.
This property is required. List<Pulumi.Ali Cloud. Ros. Inputs. Get Template Scratches Scratch Source Tag> - The Source label list.
- Stacks
This property is required. List<Pulumi.Ali Cloud. Ros. Inputs. Get Template Scratches Scratch Stack> - A list of resource stacks associated with the resource scene.
- Status
This property is required. string - The status of the resource.
- Template
Scratch Id This property is required. string - The ID of the Template Scratch.
- Template
Scratch Type This property is required. string - The type of the Template Scratch.
- Create
Time 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.
- Logical
Id Strategy This property is required. string - The Logical ID generation strategy of the Template Scratch.
- Preference
Parameters This property is required. []GetTemplate Scratches Scratch Preference Parameter - Priority parameter.
- Source
Resource Groups This property is required. []GetTemplate Scratches Scratch Source Resource Group - Source resource grouping.
- Source
Resources This property is required. []GetTemplate Scratches Scratch Source Resource - Source resource.
This property is required. []GetTemplate Scratches Scratch Source Tag - The Source label list.
- Stacks
This property is required. []GetTemplate Scratches Scratch Stack - A list of resource stacks associated with the resource scene.
- Status
This property is required. string - The status of the resource.
- Template
Scratch Id This property is required. string - The ID of the Template Scratch.
- Template
Scratch Type This property is required. string - The type of the Template Scratch.
- create
Time 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.
- logical
Id Strategy This property is required. String - The Logical ID generation strategy of the Template Scratch.
- preference
Parameters This property is required. List<GetTemplate Scratches Scratch Preference Parameter> - Priority parameter.
- source
Resource Groups This property is required. List<GetTemplate Scratches Scratch Source Resource Group> - Source resource grouping.
- source
Resources This property is required. List<GetTemplate Scratches Scratch Source Resource> - Source resource.
This property is required. List<GetTemplate Scratches Scratch Source Tag> - The Source label list.
- stacks
This property is required. List<GetTemplate Scratches Scratch Stack> - A list of resource stacks associated with the resource scene.
- status
This property is required. String - The status of the resource.
- template
Scratch Id This property is required. String - The ID of the Template Scratch.
- template
Scratch Type This property is required. String - The type of the Template Scratch.
- create
Time 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.
- logical
Id Strategy This property is required. string - The Logical ID generation strategy of the Template Scratch.
- preference
Parameters This property is required. GetTemplate Scratches Scratch Preference Parameter[] - Priority parameter.
- source
Resource Groups This property is required. GetTemplate Scratches Scratch Source Resource Group[] - Source resource grouping.
- source
Resources This property is required. GetTemplate Scratches Scratch Source Resource[] - Source resource.
This property is required. GetTemplate Scratches Scratch Source Tag[] - The Source label list.
- stacks
This property is required. GetTemplate Scratches Scratch Stack[] - A list of resource stacks associated with the resource scene.
- status
This property is required. string - The status of the resource.
- template
Scratch Id This property is required. string - The ID of the Template Scratch.
- template
Scratch Type 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[GetTemplate Scratches Scratch Preference Parameter] - Priority parameter.
- source_
resource_ groups This property is required. Sequence[GetTemplate Scratches Scratch Source Resource Group] - Source resource grouping.
- source_
resources This property is required. Sequence[GetTemplate Scratches Scratch Source Resource] - Source resource.
This property is required. Sequence[GetTemplate Scratches Scratch Source Tag] - The Source label list.
- stacks
This property is required. Sequence[GetTemplate Scratches Scratch Stack] - 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.
- create
Time 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.
- logical
Id Strategy This property is required. String - The Logical ID generation strategy of the Template Scratch.
- preference
Parameters This property is required. List<Property Map> - Priority parameter.
- source
Resource Groups This property is required. List<Property Map> - Source resource grouping.
- source
Resources This property is required. List<Property Map> - Source resource.
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.
- template
Scratch Id This property is required. String - The ID of the Template Scratch.
- template
Scratch Type This property is required. String - The type of the Template Scratch.
GetTemplateScratchesScratchPreferenceParameter
- Parameter
Key This property is required. string - Priority parameter key.
- Parameter
Value This property is required. string - Priority parameter value.
- Parameter
Key This property is required. string - Priority parameter key.
- Parameter
Value This property is required. string - Priority parameter value.
- parameter
Key This property is required. String - Priority parameter key.
- parameter
Value This property is required. String - Priority parameter value.
- parameter
Key This property is required. string - Priority parameter key.
- parameter
Value 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.
- parameter
Key This property is required. String - Priority parameter key.
- parameter
Value This property is required. String - Priority parameter value.
GetTemplateScratchesScratchSourceResource
- Resource
Id This property is required. string - The ID of the Source Resource.
- Resource
Type This property is required. string - The type of the Source resource.
- Resource
Id This property is required. string - The ID of the Source Resource.
- Resource
Type This property is required. string - The type of the Source resource.
- resource
Id This property is required. String - The ID of the Source Resource.
- resource
Type This property is required. String - The type of the Source resource.
- resource
Id This property is required. string - The ID of the Source Resource.
- resource
Type 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.
- resource
Id This property is required. String - The ID of the Source Resource.
- resource
Type This property is required. String - The type of the Source resource.
GetTemplateScratchesScratchSourceResourceGroup
- Resource
Group Id This property is required. string - The ID of the Source Resource Group.
- Resource
Type Filters This property is required. List<string> - Source resource type filter list.
- Resource
Group Id This property is required. string - The ID of the Source Resource Group.
- Resource
Type Filters This property is required. []string - Source resource type filter list.
- resource
Group Id This property is required. String - The ID of the Source Resource Group.
- resource
Type Filters This property is required. List<String> - Source resource type filter list.
- resource
Group Id This property is required. string - The ID of the Source Resource Group.
- resource
Type Filters 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.
- resource
Group Id This property is required. String - The ID of the Source Resource Group.
- resource
Type Filters This property is required. List<String> - Source resource type filter list.
GetTemplateScratchesScratchSourceTag
This property is required. Dictionary<string, string>- Source label.
- Resource
Type Filters This property is required. List<string> - Source resource type filter list.
This property is required. map[string]string- Source label.
- Resource
Type Filters This property is required. []string - Source resource type filter list.
This property is required. Map<String,String>- Source label.
- resource
Type Filters This property is required. List<String> - Source resource type filter list.
This property is required. {[key: string]: string}- Source label.
- resource
Type Filters This property is required. string[] - Source resource type filter list.
This property is required. Mapping[str, str]- Source label.
- resource_
type_ filters This property is required. Sequence[str] - Source resource type filter list.
This property is required. Map<String>- Source label.
- resource
Type Filters This property is required. List<String> - Source resource type filter list.
GetTemplateScratchesScratchStack
- Stack
Id This property is required. string - The ID of the Resource stack.
- Stack
Id This property is required. string - The ID of the Resource stack.
- stack
Id This property is required. String - The ID of the Resource stack.
- stack
Id This property is required. string - The ID of the Resource stack.
- stack_
id This property is required. str - The ID of the Resource stack.
- stack
Id 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.