1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. compute
  5. getNestServiceInstances
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

alicloud.compute.getNestServiceInstances

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

    This data source provides the Compute Nest Service Instances of the current Alibaba Cloud user.

    NOTE: Available in v1.205.0+.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const ids = alicloud.compute.getNestServiceInstances({
        ids: ["example_id"],
    });
    export const armsPrometheisId1 = ids.then(ids => ids.serviceInstances?.[0]?.id);
    const nameRegex = alicloud.compute.getNestServiceInstances({
        nameRegex: "tf-example",
    });
    export const armsPrometheisId2 = nameRegex.then(nameRegex => nameRegex.serviceInstances?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    ids = alicloud.compute.get_nest_service_instances(ids=["example_id"])
    pulumi.export("armsPrometheisId1", ids.service_instances[0].id)
    name_regex = alicloud.compute.get_nest_service_instances(name_regex="tf-example")
    pulumi.export("armsPrometheisId2", name_regex.service_instances[0].id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/compute"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		ids, err := compute.GetNestServiceInstances(ctx, &compute.GetNestServiceInstancesArgs{
    			Ids: []string{
    				"example_id",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("armsPrometheisId1", ids.ServiceInstances[0].Id)
    		nameRegex, err := compute.GetNestServiceInstances(ctx, &compute.GetNestServiceInstancesArgs{
    			NameRegex: pulumi.StringRef("tf-example"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("armsPrometheisId2", nameRegex.ServiceInstances[0].Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var ids = AliCloud.Compute.GetNestServiceInstances.Invoke(new()
        {
            Ids = new[]
            {
                "example_id",
            },
        });
    
        var nameRegex = AliCloud.Compute.GetNestServiceInstances.Invoke(new()
        {
            NameRegex = "tf-example",
        });
    
        return new Dictionary<string, object?>
        {
            ["armsPrometheisId1"] = ids.Apply(getNestServiceInstancesResult => getNestServiceInstancesResult.ServiceInstances[0]?.Id),
            ["armsPrometheisId2"] = nameRegex.Apply(getNestServiceInstancesResult => getNestServiceInstancesResult.ServiceInstances[0]?.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.compute.ComputeFunctions;
    import com.pulumi.alicloud.compute.inputs.GetNestServiceInstancesArgs;
    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 = ComputeFunctions.getNestServiceInstances(GetNestServiceInstancesArgs.builder()
                .ids("example_id")
                .build());
    
            ctx.export("armsPrometheisId1", ids.applyValue(getNestServiceInstancesResult -> getNestServiceInstancesResult.serviceInstances()[0].id()));
            final var nameRegex = ComputeFunctions.getNestServiceInstances(GetNestServiceInstancesArgs.builder()
                .nameRegex("tf-example")
                .build());
    
            ctx.export("armsPrometheisId2", nameRegex.applyValue(getNestServiceInstancesResult -> getNestServiceInstancesResult.serviceInstances()[0].id()));
        }
    }
    
    variables:
      ids:
        fn::invoke:
          Function: alicloud:compute:getNestServiceInstances
          Arguments:
            ids:
              - example_id
      nameRegex:
        fn::invoke:
          Function: alicloud:compute:getNestServiceInstances
          Arguments:
            nameRegex: tf-example
    outputs:
      armsPrometheisId1: ${ids.serviceInstances[0].id}
      armsPrometheisId2: ${nameRegex.serviceInstances[0].id}
    

    Using getNestServiceInstances

    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 getNestServiceInstances(args: GetNestServiceInstancesArgs, opts?: InvokeOptions): Promise<GetNestServiceInstancesResult>
    function getNestServiceInstancesOutput(args: GetNestServiceInstancesOutputArgs, opts?: InvokeOptions): Output<GetNestServiceInstancesResult>
    def get_nest_service_instances(filters: Optional[Sequence[GetNestServiceInstancesFilter]] = None,
                                   ids: Optional[Sequence[str]] = None,
                                   name_regex: Optional[str] = None,
                                   output_file: Optional[str] = None,
                                   status: Optional[str] = None,
                                   tags: Optional[Mapping[str, Any]] = None,
                                   opts: Optional[InvokeOptions] = None) -> GetNestServiceInstancesResult
    def get_nest_service_instances_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetNestServiceInstancesFilterArgs]]]] = None,
                                   ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                   name_regex: Optional[pulumi.Input[str]] = None,
                                   output_file: Optional[pulumi.Input[str]] = None,
                                   status: Optional[pulumi.Input[str]] = None,
                                   tags: Optional[pulumi.Input[Mapping[str, Any]]] = None,
                                   opts: Optional[InvokeOptions] = None) -> Output[GetNestServiceInstancesResult]
    func GetNestServiceInstances(ctx *Context, args *GetNestServiceInstancesArgs, opts ...InvokeOption) (*GetNestServiceInstancesResult, error)
    func GetNestServiceInstancesOutput(ctx *Context, args *GetNestServiceInstancesOutputArgs, opts ...InvokeOption) GetNestServiceInstancesResultOutput

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

    public static class GetNestServiceInstances 
    {
        public static Task<GetNestServiceInstancesResult> InvokeAsync(GetNestServiceInstancesArgs args, InvokeOptions? opts = null)
        public static Output<GetNestServiceInstancesResult> Invoke(GetNestServiceInstancesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetNestServiceInstancesResult> getNestServiceInstances(GetNestServiceInstancesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:compute/getNestServiceInstances:getNestServiceInstances
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Filters List<Pulumi.AliCloud.Compute.Inputs.GetNestServiceInstancesFilter>
    The conditions that are used to filter. See the following Block filter.
    Ids List<string>
    A list of Service Instance IDs.
    NameRegex string
    A regex string to filter results by Service Instance name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Status string
    The status of the Service Instance. Valid Values: Created, Deploying, DeployedFailed, Deployed, Upgrading, Deleting, Deleted, DeletedFailed.
    Tags Dictionary<string, object>
    A mapping of tags to assign to the resource.
    Filters []GetNestServiceInstancesFilter
    The conditions that are used to filter. See the following Block filter.
    Ids []string
    A list of Service Instance IDs.
    NameRegex string
    A regex string to filter results by Service Instance name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Status string
    The status of the Service Instance. Valid Values: Created, Deploying, DeployedFailed, Deployed, Upgrading, Deleting, Deleted, DeletedFailed.
    Tags map[string]interface{}
    A mapping of tags to assign to the resource.
    filters List<GetNestServiceInstancesFilter>
    The conditions that are used to filter. See the following Block filter.
    ids List<String>
    A list of Service Instance IDs.
    nameRegex String
    A regex string to filter results by Service Instance name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    status String
    The status of the Service Instance. Valid Values: Created, Deploying, DeployedFailed, Deployed, Upgrading, Deleting, Deleted, DeletedFailed.
    tags Map<String,Object>
    A mapping of tags to assign to the resource.
    filters GetNestServiceInstancesFilter[]
    The conditions that are used to filter. See the following Block filter.
    ids string[]
    A list of Service Instance IDs.
    nameRegex string
    A regex string to filter results by Service Instance name.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    status string
    The status of the Service Instance. Valid Values: Created, Deploying, DeployedFailed, Deployed, Upgrading, Deleting, Deleted, DeletedFailed.
    tags {[key: string]: any}
    A mapping of tags to assign to the resource.
    filters Sequence[GetNestServiceInstancesFilter]
    The conditions that are used to filter. See the following Block filter.
    ids Sequence[str]
    A list of Service Instance IDs.
    name_regex str
    A regex string to filter results by Service Instance name.
    output_file str
    File name where to save data source results (after running pulumi preview).
    status str
    The status of the Service Instance. Valid Values: Created, Deploying, DeployedFailed, Deployed, Upgrading, Deleting, Deleted, DeletedFailed.
    tags Mapping[str, Any]
    A mapping of tags to assign to the resource.
    filters List<Property Map>
    The conditions that are used to filter. See the following Block filter.
    ids List<String>
    A list of Service Instance IDs.
    nameRegex String
    A regex string to filter results by Service Instance name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    status String
    The status of the Service Instance. Valid Values: Created, Deploying, DeployedFailed, Deployed, Upgrading, Deleting, Deleted, DeletedFailed.
    tags Map<Any>
    A mapping of tags to assign to the resource.

    getNestServiceInstances Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    Names List<string>
    A list of Service Instance names.
    ServiceInstances List<Pulumi.AliCloud.Compute.Outputs.GetNestServiceInstancesServiceInstance>
    A list of Service Instances. Each element contains the following attributes:
    Filters List<Pulumi.AliCloud.Compute.Outputs.GetNestServiceInstancesFilter>
    NameRegex string
    OutputFile string
    Status string
    The status of the Service Instance.
    Tags Dictionary<string, object>
    The tag of the Service Instance.
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    Names []string
    A list of Service Instance names.
    ServiceInstances []GetNestServiceInstancesServiceInstance
    A list of Service Instances. Each element contains the following attributes:
    Filters []GetNestServiceInstancesFilter
    NameRegex string
    OutputFile string
    Status string
    The status of the Service Instance.
    Tags map[string]interface{}
    The tag of the Service Instance.
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    A list of Service Instance names.
    serviceInstances List<GetNestServiceInstancesServiceInstance>
    A list of Service Instances. Each element contains the following attributes:
    filters List<GetNestServiceInstancesFilter>
    nameRegex String
    outputFile String
    status String
    The status of the Service Instance.
    tags Map<String,Object>
    The tag of the Service Instance.
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    names string[]
    A list of Service Instance names.
    serviceInstances GetNestServiceInstancesServiceInstance[]
    A list of Service Instances. Each element contains the following attributes:
    filters GetNestServiceInstancesFilter[]
    nameRegex string
    outputFile string
    status string
    The status of the Service Instance.
    tags {[key: string]: any}
    The tag of the Service Instance.
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    names Sequence[str]
    A list of Service Instance names.
    service_instances Sequence[GetNestServiceInstancesServiceInstance]
    A list of Service Instances. Each element contains the following attributes:
    filters Sequence[GetNestServiceInstancesFilter]
    name_regex str
    output_file str
    status str
    The status of the Service Instance.
    tags Mapping[str, Any]
    The tag of the Service Instance.
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    A list of Service Instance names.
    serviceInstances List<Property Map>
    A list of Service Instances. Each element contains the following attributes:
    filters List<Property Map>
    nameRegex String
    outputFile String
    status String
    The status of the Service Instance.
    tags Map<Any>
    The tag of the Service Instance.

    Supporting Types

    GetNestServiceInstancesFilter

    Name string
    The name of the service.
    Values List<string>
    Name string
    The name of the service.
    Values []string
    name String
    The name of the service.
    values List<String>
    name string
    The name of the service.
    values string[]
    name str
    The name of the service.
    values Sequence[str]
    name String
    The name of the service.
    values List<String>

    GetNestServiceInstancesServiceInstance

    EnableInstanceOps bool
    Whether the service instance has the O&M function.
    Id string
    The ID of the Service Instance.
    OperatedServiceInstanceId string
    The ID of the imported service instance.
    OperationEndTime string
    The end time of O&M.
    OperationStartTime string
    The start time of O&M.
    Parameters string
    The parameters entered by the deployment service instance.
    Resources string
    The list of imported resources.
    ServiceInstanceId string
    The ID of the Service Instance.
    ServiceInstanceName string
    The name of the Service Instance.
    Services List<Pulumi.AliCloud.Compute.Inputs.GetNestServiceInstancesServiceInstanceService>
    Service details.
    Source string
    The source of the Service Instance.
    Status string
    The status of the Service Instance. Valid Values: Created, Deploying, DeployedFailed, Deployed, Upgrading, Deleting, Deleted, DeletedFailed.
    Tags Dictionary<string, object>
    A mapping of tags to assign to the resource.
    TemplateName string
    The name of the template.
    EnableInstanceOps bool
    Whether the service instance has the O&M function.
    Id string
    The ID of the Service Instance.
    OperatedServiceInstanceId string
    The ID of the imported service instance.
    OperationEndTime string
    The end time of O&M.
    OperationStartTime string
    The start time of O&M.
    Parameters string
    The parameters entered by the deployment service instance.
    Resources string
    The list of imported resources.
    ServiceInstanceId string
    The ID of the Service Instance.
    ServiceInstanceName string
    The name of the Service Instance.
    Services []GetNestServiceInstancesServiceInstanceService
    Service details.
    Source string
    The source of the Service Instance.
    Status string
    The status of the Service Instance. Valid Values: Created, Deploying, DeployedFailed, Deployed, Upgrading, Deleting, Deleted, DeletedFailed.
    Tags map[string]interface{}
    A mapping of tags to assign to the resource.
    TemplateName string
    The name of the template.
    enableInstanceOps Boolean
    Whether the service instance has the O&M function.
    id String
    The ID of the Service Instance.
    operatedServiceInstanceId String
    The ID of the imported service instance.
    operationEndTime String
    The end time of O&M.
    operationStartTime String
    The start time of O&M.
    parameters String
    The parameters entered by the deployment service instance.
    resources String
    The list of imported resources.
    serviceInstanceId String
    The ID of the Service Instance.
    serviceInstanceName String
    The name of the Service Instance.
    services List<GetNestServiceInstancesServiceInstanceService>
    Service details.
    source String
    The source of the Service Instance.
    status String
    The status of the Service Instance. Valid Values: Created, Deploying, DeployedFailed, Deployed, Upgrading, Deleting, Deleted, DeletedFailed.
    tags Map<String,Object>
    A mapping of tags to assign to the resource.
    templateName String
    The name of the template.
    enableInstanceOps boolean
    Whether the service instance has the O&M function.
    id string
    The ID of the Service Instance.
    operatedServiceInstanceId string
    The ID of the imported service instance.
    operationEndTime string
    The end time of O&M.
    operationStartTime string
    The start time of O&M.
    parameters string
    The parameters entered by the deployment service instance.
    resources string
    The list of imported resources.
    serviceInstanceId string
    The ID of the Service Instance.
    serviceInstanceName string
    The name of the Service Instance.
    services GetNestServiceInstancesServiceInstanceService[]
    Service details.
    source string
    The source of the Service Instance.
    status string
    The status of the Service Instance. Valid Values: Created, Deploying, DeployedFailed, Deployed, Upgrading, Deleting, Deleted, DeletedFailed.
    tags {[key: string]: any}
    A mapping of tags to assign to the resource.
    templateName string
    The name of the template.
    enable_instance_ops bool
    Whether the service instance has the O&M function.
    id str
    The ID of the Service Instance.
    operated_service_instance_id str
    The ID of the imported service instance.
    operation_end_time str
    The end time of O&M.
    operation_start_time str
    The start time of O&M.
    parameters str
    The parameters entered by the deployment service instance.
    resources str
    The list of imported resources.
    service_instance_id str
    The ID of the Service Instance.
    service_instance_name str
    The name of the Service Instance.
    services Sequence[GetNestServiceInstancesServiceInstanceService]
    Service details.
    source str
    The source of the Service Instance.
    status str
    The status of the Service Instance. Valid Values: Created, Deploying, DeployedFailed, Deployed, Upgrading, Deleting, Deleted, DeletedFailed.
    tags Mapping[str, Any]
    A mapping of tags to assign to the resource.
    template_name str
    The name of the template.
    enableInstanceOps Boolean
    Whether the service instance has the O&M function.
    id String
    The ID of the Service Instance.
    operatedServiceInstanceId String
    The ID of the imported service instance.
    operationEndTime String
    The end time of O&M.
    operationStartTime String
    The start time of O&M.
    parameters String
    The parameters entered by the deployment service instance.
    resources String
    The list of imported resources.
    serviceInstanceId String
    The ID of the Service Instance.
    serviceInstanceName String
    The name of the Service Instance.
    services List<Property Map>
    Service details.
    source String
    The source of the Service Instance.
    status String
    The status of the Service Instance. Valid Values: Created, Deploying, DeployedFailed, Deployed, Upgrading, Deleting, Deleted, DeletedFailed.
    tags Map<Any>
    A mapping of tags to assign to the resource.
    templateName String
    The name of the template.

    GetNestServiceInstancesServiceInstanceService

    DeployType string
    The type of the deployment.
    PublishTime string
    The time of publish.
    ServiceId string
    The id of the service.
    ServiceInfos List<Pulumi.AliCloud.Compute.Inputs.GetNestServiceInstancesServiceInstanceServiceServiceInfo>
    Service information.
    ServiceType string
    The type of the service.
    Status string
    The status of the Service Instance. Valid Values: Created, Deploying, DeployedFailed, Deployed, Upgrading, Deleting, Deleted, DeletedFailed.
    SupplierName string
    The name of the supplier.
    SupplierUrl string
    The url of the supplier.
    Version string
    The version of the service.
    VersionName string
    The version name of the service.
    DeployType string
    The type of the deployment.
    PublishTime string
    The time of publish.
    ServiceId string
    The id of the service.
    ServiceInfos []GetNestServiceInstancesServiceInstanceServiceServiceInfo
    Service information.
    ServiceType string
    The type of the service.
    Status string
    The status of the Service Instance. Valid Values: Created, Deploying, DeployedFailed, Deployed, Upgrading, Deleting, Deleted, DeletedFailed.
    SupplierName string
    The name of the supplier.
    SupplierUrl string
    The url of the supplier.
    Version string
    The version of the service.
    VersionName string
    The version name of the service.
    deployType String
    The type of the deployment.
    publishTime String
    The time of publish.
    serviceId String
    The id of the service.
    serviceInfos List<GetNestServiceInstancesServiceInstanceServiceServiceInfo>
    Service information.
    serviceType String
    The type of the service.
    status String
    The status of the Service Instance. Valid Values: Created, Deploying, DeployedFailed, Deployed, Upgrading, Deleting, Deleted, DeletedFailed.
    supplierName String
    The name of the supplier.
    supplierUrl String
    The url of the supplier.
    version String
    The version of the service.
    versionName String
    The version name of the service.
    deployType string
    The type of the deployment.
    publishTime string
    The time of publish.
    serviceId string
    The id of the service.
    serviceInfos GetNestServiceInstancesServiceInstanceServiceServiceInfo[]
    Service information.
    serviceType string
    The type of the service.
    status string
    The status of the Service Instance. Valid Values: Created, Deploying, DeployedFailed, Deployed, Upgrading, Deleting, Deleted, DeletedFailed.
    supplierName string
    The name of the supplier.
    supplierUrl string
    The url of the supplier.
    version string
    The version of the service.
    versionName string
    The version name of the service.
    deploy_type str
    The type of the deployment.
    publish_time str
    The time of publish.
    service_id str
    The id of the service.
    service_infos Sequence[GetNestServiceInstancesServiceInstanceServiceServiceInfo]
    Service information.
    service_type str
    The type of the service.
    status str
    The status of the Service Instance. Valid Values: Created, Deploying, DeployedFailed, Deployed, Upgrading, Deleting, Deleted, DeletedFailed.
    supplier_name str
    The name of the supplier.
    supplier_url str
    The url of the supplier.
    version str
    The version of the service.
    version_name str
    The version name of the service.
    deployType String
    The type of the deployment.
    publishTime String
    The time of publish.
    serviceId String
    The id of the service.
    serviceInfos List<Property Map>
    Service information.
    serviceType String
    The type of the service.
    status String
    The status of the Service Instance. Valid Values: Created, Deploying, DeployedFailed, Deployed, Upgrading, Deleting, Deleted, DeletedFailed.
    supplierName String
    The name of the supplier.
    supplierUrl String
    The url of the supplier.
    version String
    The version of the service.
    versionName String
    The version name of the service.

    GetNestServiceInstancesServiceInstanceServiceServiceInfo

    Image string
    The image of the service.
    Locale string
    The locale of the service.
    Name string
    The name of the service.
    ShortDescription string
    The short description of the service.
    Image string
    The image of the service.
    Locale string
    The locale of the service.
    Name string
    The name of the service.
    ShortDescription string
    The short description of the service.
    image String
    The image of the service.
    locale String
    The locale of the service.
    name String
    The name of the service.
    shortDescription String
    The short description of the service.
    image string
    The image of the service.
    locale string
    The locale of the service.
    name string
    The name of the service.
    shortDescription string
    The short description of the service.
    image str
    The image of the service.
    locale str
    The locale of the service.
    name str
    The name of the service.
    short_description str
    The short description of the service.
    image String
    The image of the service.
    locale String
    The locale of the service.
    name String
    The name of the service.
    shortDescription String
    The short description of the service.

    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.57.1 published on Wednesday, Jun 26, 2024 by Pulumi