Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 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)
// Output-based functions aren't available in Java yet
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 List<string>
- A list of Template Scratch IDs.
- Output
File 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
andGENERATE_FAILED
. - Template
Scratch stringType - 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 []string
- A list of Template Scratch IDs.
- Output
File 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
andGENERATE_FAILED
. - Template
Scratch stringType - 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 List<String>
- A list of Template Scratch IDs.
- output
File 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
andGENERATE_FAILED
. - template
Scratch StringType - 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 string[]
- A list of Template Scratch IDs.
- output
File 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
andGENERATE_FAILED
. - template
Scratch stringType - 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 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
andGENERATE_FAILED
. - template_
scratch_ strtype - 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 List<String>
- A list of Template Scratch IDs.
- output
File 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
andGENERATE_FAILED
. - template
Scratch StringType - 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 string - The creation time of the resource.
- Description string
- The description of the Template Scratch.
- Id string
- The ID of the Template Scratch.
- Logical
Id stringStrategy - The Logical ID generation strategy of the Template Scratch.
- Preference
Parameters List<Pulumi.Ali Cloud. Ros. Inputs. Get Template Scratches Scratch Preference Parameter> - Priority parameter.
- Source
Resource List<Pulumi.Groups Ali Cloud. Ros. Inputs. Get Template Scratches Scratch Source Resource Group> - Source resource grouping.
- Source
Resources List<Pulumi.Ali Cloud. Ros. Inputs. Get Template Scratches Scratch Source Resource> - Source resource.
- List<Pulumi.
Ali Cloud. Ros. Inputs. Get Template Scratches Scratch Source Tag> - The Source label list.
- Stacks
List<Pulumi.
Ali Cloud. Ros. Inputs. Get Template Scratches Scratch Stack> - A list of resource stacks associated with the resource scene.
- Status string
- The status of the resource.
- Template
Scratch stringId - The ID of the Template Scratch.
- Template
Scratch stringType - The type of the Template Scratch.
- Create
Time string - The creation time of the resource.
- Description string
- The description of the Template Scratch.
- Id string
- The ID of the Template Scratch.
- Logical
Id stringStrategy - The Logical ID generation strategy of the Template Scratch.
- Preference
Parameters []GetTemplate Scratches Scratch Preference Parameter - Priority parameter.
- Source
Resource []GetGroups Template Scratches Scratch Source Resource Group - Source resource grouping.
- Source
Resources []GetTemplate Scratches Scratch Source Resource - Source resource.
- []Get
Template Scratches Scratch Source Tag - The Source label list.
- Stacks
[]Get
Template Scratches Scratch Stack - A list of resource stacks associated with the resource scene.
- Status string
- The status of the resource.
- Template
Scratch stringId - The ID of the Template Scratch.
- Template
Scratch stringType - The type of the Template Scratch.
- create
Time String - The creation time of the resource.
- description String
- The description of the Template Scratch.
- id String
- The ID of the Template Scratch.
- logical
Id StringStrategy - The Logical ID generation strategy of the Template Scratch.
- preference
Parameters List<GetTemplate Scratches Scratch Preference Parameter> - Priority parameter.
- source
Resource List<GetGroups Template Scratches Scratch Source Resource Group> - Source resource grouping.
- source
Resources List<GetTemplate Scratches Scratch Source Resource> - Source resource.
- List<Get
Template Scratches Scratch Source Tag> - The Source label list.
- stacks
List<Get
Template Scratches Scratch Stack> - A list of resource stacks associated with the resource scene.
- status String
- The status of the resource.
- template
Scratch StringId - The ID of the Template Scratch.
- template
Scratch StringType - The type of the Template Scratch.
- create
Time string - The creation time of the resource.
- description string
- The description of the Template Scratch.
- id string
- The ID of the Template Scratch.
- logical
Id stringStrategy - The Logical ID generation strategy of the Template Scratch.
- preference
Parameters GetTemplate Scratches Scratch Preference Parameter[] - Priority parameter.
- source
Resource GetGroups Template Scratches Scratch Source Resource Group[] - Source resource grouping.
- source
Resources GetTemplate Scratches Scratch Source Resource[] - Source resource.
- Get
Template Scratches Scratch Source Tag[] - The Source label list.
- stacks
Get
Template Scratches Scratch Stack[] - A list of resource stacks associated with the resource scene.
- status string
- The status of the resource.
- template
Scratch stringId - The ID of the Template Scratch.
- template
Scratch stringType - 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_ strstrategy - The Logical ID generation strategy of the Template Scratch.
- preference_
parameters Sequence[GetTemplate Scratches Scratch Preference Parameter] - Priority parameter.
- source_
resource_ Sequence[Getgroups Template Scratches Scratch Source Resource Group] - Source resource grouping.
- source_
resources Sequence[GetTemplate Scratches Scratch Source Resource] - Source resource.
- Sequence[Get
Template Scratches Scratch Source Tag] - The Source label list.
- stacks
Sequence[Get
Template Scratches Scratch Stack] - A list of resource stacks associated with the resource scene.
- status str
- The status of the resource.
- template_
scratch_ strid - The ID of the Template Scratch.
- template_
scratch_ strtype - The type of the Template Scratch.
- create
Time String - The creation time of the resource.
- description String
- The description of the Template Scratch.
- id String
- The ID of the Template Scratch.
- logical
Id StringStrategy - The Logical ID generation strategy of the Template Scratch.
- preference
Parameters List<Property Map> - Priority parameter.
- source
Resource List<Property Map>Groups - Source resource grouping.
- source
Resources List<Property Map> - Source resource.
- 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.
- template
Scratch StringId - The ID of the Template Scratch.
- template
Scratch StringType - The type of the Template Scratch.
GetTemplateScratchesScratchPreferenceParameter
- Parameter
Key string - Priority parameter key.
- Parameter
Value string - Priority parameter value.
- Parameter
Key string - Priority parameter key.
- Parameter
Value string - Priority parameter value.
- parameter
Key String - Priority parameter key.
- parameter
Value String - Priority parameter value.
- parameter
Key string - Priority parameter key.
- parameter
Value string - Priority parameter value.
- parameter_
key str - Priority parameter key.
- parameter_
value str - Priority parameter value.
- parameter
Key String - Priority parameter key.
- parameter
Value String - Priority parameter value.
GetTemplateScratchesScratchSourceResource
- Resource
Id string - The ID of the Source Resource.
- Resource
Type string - The type of the Source resource.
- Resource
Id string - The ID of the Source Resource.
- Resource
Type string - The type of the Source resource.
- resource
Id String - The ID of the Source Resource.
- resource
Type String - The type of the Source resource.
- resource
Id string - The ID of the Source Resource.
- resource
Type 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.
- resource
Id String - The ID of the Source Resource.
- resource
Type String - The type of the Source resource.
GetTemplateScratchesScratchSourceResourceGroup
- Resource
Group stringId - The ID of the Source Resource Group.
- Resource
Type List<string>Filters - Source resource type filter list.
- Resource
Group stringId - The ID of the Source Resource Group.
- Resource
Type []stringFilters - Source resource type filter list.
- resource
Group StringId - The ID of the Source Resource Group.
- resource
Type List<String>Filters - Source resource type filter list.
- resource
Group stringId - The ID of the Source Resource Group.
- resource
Type string[]Filters - Source resource type filter list.
- resource_
group_ strid - The ID of the Source Resource Group.
- resource_
type_ Sequence[str]filters - Source resource type filter list.
- resource
Group StringId - The ID of the Source Resource Group.
- resource
Type List<String>Filters - Source resource type filter list.
GetTemplateScratchesScratchSourceTag
- Dictionary<string, string>
- Source label.
- Resource
Type List<string>Filters - Source resource type filter list.
- map[string]string
- Source label.
- Resource
Type []stringFilters - Source resource type filter list.
- Map<String,String>
- Source label.
- resource
Type List<String>Filters - Source resource type filter list.
- {[key: string]: string}
- Source label.
- resource
Type string[]Filters - Source resource type filter list.
- Mapping[str, str]
- Source label.
- resource_
type_ Sequence[str]filters - Source resource type filter list.
- Map<String>
- Source label.
- resource
Type List<String>Filters - Source resource type filter list.
GetTemplateScratchesScratchStack
- Stack
Id string - The ID of the Resource stack.
- Stack
Id string - The ID of the Resource stack.
- stack
Id String - The ID of the Resource stack.
- stack
Id string - The ID of the Resource stack.
- stack_
id str - The ID of the Resource stack.
- stack
Id 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.