1. Packages
  2. Ibm Provider
  3. API Docs
  4. getSchematicsResourceQuery
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.getSchematicsResourceQuery

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    Retrieve information about the Schematics resource query. For more information, about Schematics action resource query, see Supported resource queries.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const schematicsResourceQuery = ibm.getSchematicsResourceQuery({
        queryId: "query_id",
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    schematics_resource_query = ibm.get_schematics_resource_query(query_id="query_id")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ibm.LookupSchematicsResourceQuery(ctx, &ibm.LookupSchematicsResourceQueryArgs{
    			QueryId: "query_id",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var schematicsResourceQuery = Ibm.GetSchematicsResourceQuery.Invoke(new()
        {
            QueryId = "query_id",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.IbmFunctions;
    import com.pulumi.ibm.inputs.GetSchematicsResourceQueryArgs;
    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 schematicsResourceQuery = IbmFunctions.getSchematicsResourceQuery(GetSchematicsResourceQueryArgs.builder()
                .queryId("query_id")
                .build());
    
        }
    }
    
    variables:
      schematicsResourceQuery:
        fn::invoke:
          function: ibm:getSchematicsResourceQuery
          arguments:
            queryId: query_id
    

    Using getSchematicsResourceQuery

    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 getSchematicsResourceQuery(args: GetSchematicsResourceQueryArgs, opts?: InvokeOptions): Promise<GetSchematicsResourceQueryResult>
    function getSchematicsResourceQueryOutput(args: GetSchematicsResourceQueryOutputArgs, opts?: InvokeOptions): Output<GetSchematicsResourceQueryResult>
    def get_schematics_resource_query(location: Optional[str] = None,
                                      query_id: Optional[str] = None,
                                      opts: Optional[InvokeOptions] = None) -> GetSchematicsResourceQueryResult
    def get_schematics_resource_query_output(location: Optional[pulumi.Input[str]] = None,
                                      query_id: Optional[pulumi.Input[str]] = None,
                                      opts: Optional[InvokeOptions] = None) -> Output[GetSchematicsResourceQueryResult]
    func LookupSchematicsResourceQuery(ctx *Context, args *LookupSchematicsResourceQueryArgs, opts ...InvokeOption) (*LookupSchematicsResourceQueryResult, error)
    func LookupSchematicsResourceQueryOutput(ctx *Context, args *LookupSchematicsResourceQueryOutputArgs, opts ...InvokeOption) LookupSchematicsResourceQueryResultOutput

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

    public static class GetSchematicsResourceQuery 
    {
        public static Task<GetSchematicsResourceQueryResult> InvokeAsync(GetSchematicsResourceQueryArgs args, InvokeOptions? opts = null)
        public static Output<GetSchematicsResourceQueryResult> Invoke(GetSchematicsResourceQueryInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSchematicsResourceQueryResult> getSchematicsResourceQuery(GetSchematicsResourceQueryArgs args, InvokeOptions options)
    public static Output<GetSchematicsResourceQueryResult> getSchematicsResourceQuery(GetSchematicsResourceQueryArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getSchematicsResourceQuery:getSchematicsResourceQuery
      arguments:
        # arguments dictionary

    The following arguments are supported:

    QueryId string
    Resource query ID. Use GET /v2/resource_query API to look up the Resource query definition Ids in your IBM Cloud account.
    Location string
    Location supported by IBM Cloud Schematics service. While creating your workspace or action, choose the right region, since it cannot be changed. Note, this does not limit the location of the IBM Cloud resources, provisioned using Schematics.

    • Constraints: Allowable values are: us-south, us-east, eu-gb, eu-de
    QueryId string
    Resource query ID. Use GET /v2/resource_query API to look up the Resource query definition Ids in your IBM Cloud account.
    Location string
    Location supported by IBM Cloud Schematics service. While creating your workspace or action, choose the right region, since it cannot be changed. Note, this does not limit the location of the IBM Cloud resources, provisioned using Schematics.

    • Constraints: Allowable values are: us-south, us-east, eu-gb, eu-de
    queryId String
    Resource query ID. Use GET /v2/resource_query API to look up the Resource query definition Ids in your IBM Cloud account.
    location String
    Location supported by IBM Cloud Schematics service. While creating your workspace or action, choose the right region, since it cannot be changed. Note, this does not limit the location of the IBM Cloud resources, provisioned using Schematics.

    • Constraints: Allowable values are: us-south, us-east, eu-gb, eu-de
    queryId string
    Resource query ID. Use GET /v2/resource_query API to look up the Resource query definition Ids in your IBM Cloud account.
    location string
    Location supported by IBM Cloud Schematics service. While creating your workspace or action, choose the right region, since it cannot be changed. Note, this does not limit the location of the IBM Cloud resources, provisioned using Schematics.

    • Constraints: Allowable values are: us-south, us-east, eu-gb, eu-de
    query_id str
    Resource query ID. Use GET /v2/resource_query API to look up the Resource query definition Ids in your IBM Cloud account.
    location str
    Location supported by IBM Cloud Schematics service. While creating your workspace or action, choose the right region, since it cannot be changed. Note, this does not limit the location of the IBM Cloud resources, provisioned using Schematics.

    • Constraints: Allowable values are: us-south, us-east, eu-gb, eu-de
    queryId String
    Resource query ID. Use GET /v2/resource_query API to look up the Resource query definition Ids in your IBM Cloud account.
    location String
    Location supported by IBM Cloud Schematics service. While creating your workspace or action, choose the right region, since it cannot be changed. Note, this does not limit the location of the IBM Cloud resources, provisioned using Schematics.

    • Constraints: Allowable values are: us-south, us-east, eu-gb, eu-de

    getSchematicsResourceQuery Result

    The following output properties are available:

    CreatedAt string
    (String) Resource query creation time.
    CreatedBy string
    (String) Email address of user who created the Resource query.
    Id string
    (String) Resource Query ID.
    Name string
    (String) Name of the resource query param.
    Queries List<GetSchematicsResourceQueryQuery>
    (List)
    QueryId string
    Type string
    (String) Resource type. Supported values are cluster, vsi, icd, vpc.

    • Constraints: Allowable values are: vsi
    UpdatedAt string
    (String) Resource query updation time.
    UpdatedBy string
    (String) Email address of user who updated the Resource query.
    Location string
    CreatedAt string
    (String) Resource query creation time.
    CreatedBy string
    (String) Email address of user who created the Resource query.
    Id string
    (String) Resource Query ID.
    Name string
    (String) Name of the resource query param.
    Queries []GetSchematicsResourceQueryQuery
    (List)
    QueryId string
    Type string
    (String) Resource type. Supported values are cluster, vsi, icd, vpc.

    • Constraints: Allowable values are: vsi
    UpdatedAt string
    (String) Resource query updation time.
    UpdatedBy string
    (String) Email address of user who updated the Resource query.
    Location string
    createdAt String
    (String) Resource query creation time.
    createdBy String
    (String) Email address of user who created the Resource query.
    id String
    (String) Resource Query ID.
    name String
    (String) Name of the resource query param.
    queries List<GetSchematicsResourceQueryQuery>
    (List)
    queryId String
    type String
    (String) Resource type. Supported values are cluster, vsi, icd, vpc.

    • Constraints: Allowable values are: vsi
    updatedAt String
    (String) Resource query updation time.
    updatedBy String
    (String) Email address of user who updated the Resource query.
    location String
    createdAt string
    (String) Resource query creation time.
    createdBy string
    (String) Email address of user who created the Resource query.
    id string
    (String) Resource Query ID.
    name string
    (String) Name of the resource query param.
    queries GetSchematicsResourceQueryQuery[]
    (List)
    queryId string
    type string
    (String) Resource type. Supported values are cluster, vsi, icd, vpc.

    • Constraints: Allowable values are: vsi
    updatedAt string
    (String) Resource query updation time.
    updatedBy string
    (String) Email address of user who updated the Resource query.
    location string
    created_at str
    (String) Resource query creation time.
    created_by str
    (String) Email address of user who created the Resource query.
    id str
    (String) Resource Query ID.
    name str
    (String) Name of the resource query param.
    queries Sequence[GetSchematicsResourceQueryQuery]
    (List)
    query_id str
    type str
    (String) Resource type. Supported values are cluster, vsi, icd, vpc.

    • Constraints: Allowable values are: vsi
    updated_at str
    (String) Resource query updation time.
    updated_by str
    (String) Email address of user who updated the Resource query.
    location str
    createdAt String
    (String) Resource query creation time.
    createdBy String
    (String) Email address of user who created the Resource query.
    id String
    (String) Resource Query ID.
    name String
    (String) Name of the resource query param.
    queries List<Property Map>
    (List)
    queryId String
    type String
    (String) Resource type. Supported values are cluster, vsi, icd, vpc.

    • Constraints: Allowable values are: vsi
    updatedAt String
    (String) Resource query updation time.
    updatedBy String
    (String) Email address of user who updated the Resource query.
    location String

    Supporting Types

    GetSchematicsResourceQueryQuery

    QueryConditions List<GetSchematicsResourceQueryQueryQueryCondition>
    (List)
    QuerySelects List<string>
    (List) List of query selection parameters.
    QueryType string
    (String) Type of the query such as workspaces.

    • Constraints: Allowable values are: workspaces
    QueryConditions []GetSchematicsResourceQueryQueryQueryCondition
    (List)
    QuerySelects []string
    (List) List of query selection parameters.
    QueryType string
    (String) Type of the query such as workspaces.

    • Constraints: Allowable values are: workspaces
    queryConditions List<GetSchematicsResourceQueryQueryQueryCondition>
    (List)
    querySelects List<String>
    (List) List of query selection parameters.
    queryType String
    (String) Type of the query such as workspaces.

    • Constraints: Allowable values are: workspaces
    queryConditions GetSchematicsResourceQueryQueryQueryCondition[]
    (List)
    querySelects string[]
    (List) List of query selection parameters.
    queryType string
    (String) Type of the query such as workspaces.

    • Constraints: Allowable values are: workspaces
    query_conditions Sequence[GetSchematicsResourceQueryQueryQueryCondition]
    (List)
    query_selects Sequence[str]
    (List) List of query selection parameters.
    query_type str
    (String) Type of the query such as workspaces.

    • Constraints: Allowable values are: workspaces
    queryConditions List<Property Map>
    (List)
    querySelects List<String>
    (List) List of query selection parameters.
    queryType String
    (String) Type of the query such as workspaces.

    • Constraints: Allowable values are: workspaces

    GetSchematicsResourceQueryQueryQueryCondition

    Description string
    (String) Description of resource query param variable.
    Name string
    (String) Name of the resource query param.
    Value string
    (String) Value of the resource query param.
    Description string
    (String) Description of resource query param variable.
    Name string
    (String) Name of the resource query param.
    Value string
    (String) Value of the resource query param.
    description String
    (String) Description of resource query param variable.
    name String
    (String) Name of the resource query param.
    value String
    (String) Value of the resource query param.
    description string
    (String) Description of resource query param variable.
    name string
    (String) Name of the resource query param.
    value string
    (String) Value of the resource query param.
    description str
    (String) Description of resource query param variable.
    name str
    (String) Name of the resource query param.
    value str
    (String) Value of the resource query param.
    description String
    (String) Description of resource query param variable.
    name String
    (String) Name of the resource query param.
    value String
    (String) Value of the resource query param.

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud