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

ibm.SchematicsResourceQuery

Explore with Pulumi AI

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

    Create, update, and delete a 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 = new ibm.SchematicsResourceQuery("schematicsResourceQuery", {});
    
    import pulumi
    import pulumi_ibm as ibm
    
    schematics_resource_query = ibm.SchematicsResourceQuery("schematicsResourceQuery")
    
    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.NewSchematicsResourceQuery(ctx, "schematicsResourceQuery", 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 = new Ibm.SchematicsResourceQuery("schematicsResourceQuery");
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.SchematicsResourceQuery;
    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) {
            var schematicsResourceQuery = new SchematicsResourceQuery("schematicsResourceQuery");
    
        }
    }
    
    resources:
      schematicsResourceQuery:
        type: ibm:SchematicsResourceQuery
    

    Create SchematicsResourceQuery Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new SchematicsResourceQuery(name: string, args?: SchematicsResourceQueryArgs, opts?: CustomResourceOptions);
    @overload
    def SchematicsResourceQuery(resource_name: str,
                                args: Optional[SchematicsResourceQueryArgs] = None,
                                opts: Optional[ResourceOptions] = None)
    
    @overload
    def SchematicsResourceQuery(resource_name: str,
                                opts: Optional[ResourceOptions] = None,
                                location: Optional[str] = None,
                                name: Optional[str] = None,
                                queries: Optional[Sequence[SchematicsResourceQueryQueryArgs]] = None,
                                schematics_resource_query_id: Optional[str] = None,
                                type: Optional[str] = None)
    func NewSchematicsResourceQuery(ctx *Context, name string, args *SchematicsResourceQueryArgs, opts ...ResourceOption) (*SchematicsResourceQuery, error)
    public SchematicsResourceQuery(string name, SchematicsResourceQueryArgs? args = null, CustomResourceOptions? opts = null)
    public SchematicsResourceQuery(String name, SchematicsResourceQueryArgs args)
    public SchematicsResourceQuery(String name, SchematicsResourceQueryArgs args, CustomResourceOptions options)
    
    type: ibm:SchematicsResourceQuery
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args SchematicsResourceQueryArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args SchematicsResourceQueryArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args SchematicsResourceQueryArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SchematicsResourceQueryArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SchematicsResourceQueryArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var schematicsResourceQueryResource = new Ibm.SchematicsResourceQuery("schematicsResourceQueryResource", new()
    {
        Location = "string",
        Name = "string",
        Queries = new[]
        {
            new Ibm.Inputs.SchematicsResourceQueryQueryArgs
            {
                QueryConditions = new[]
                {
                    new Ibm.Inputs.SchematicsResourceQueryQueryQueryConditionArgs
                    {
                        Description = "string",
                        Name = "string",
                        Value = "string",
                    },
                },
                QuerySelects = new[]
                {
                    "string",
                },
                QueryType = "string",
            },
        },
        SchematicsResourceQueryId = "string",
        Type = "string",
    });
    
    example, err := ibm.NewSchematicsResourceQuery(ctx, "schematicsResourceQueryResource", &ibm.SchematicsResourceQueryArgs{
    	Location: pulumi.String("string"),
    	Name:     pulumi.String("string"),
    	Queries: ibm.SchematicsResourceQueryQueryArray{
    		&ibm.SchematicsResourceQueryQueryArgs{
    			QueryConditions: ibm.SchematicsResourceQueryQueryQueryConditionArray{
    				&ibm.SchematicsResourceQueryQueryQueryConditionArgs{
    					Description: pulumi.String("string"),
    					Name:        pulumi.String("string"),
    					Value:       pulumi.String("string"),
    				},
    			},
    			QuerySelects: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			QueryType: pulumi.String("string"),
    		},
    	},
    	SchematicsResourceQueryId: pulumi.String("string"),
    	Type:                      pulumi.String("string"),
    })
    
    var schematicsResourceQueryResource = new SchematicsResourceQuery("schematicsResourceQueryResource", SchematicsResourceQueryArgs.builder()
        .location("string")
        .name("string")
        .queries(SchematicsResourceQueryQueryArgs.builder()
            .queryConditions(SchematicsResourceQueryQueryQueryConditionArgs.builder()
                .description("string")
                .name("string")
                .value("string")
                .build())
            .querySelects("string")
            .queryType("string")
            .build())
        .schematicsResourceQueryId("string")
        .type("string")
        .build());
    
    schematics_resource_query_resource = ibm.SchematicsResourceQuery("schematicsResourceQueryResource",
        location="string",
        name="string",
        queries=[{
            "query_conditions": [{
                "description": "string",
                "name": "string",
                "value": "string",
            }],
            "query_selects": ["string"],
            "query_type": "string",
        }],
        schematics_resource_query_id="string",
        type="string")
    
    const schematicsResourceQueryResource = new ibm.SchematicsResourceQuery("schematicsResourceQueryResource", {
        location: "string",
        name: "string",
        queries: [{
            queryConditions: [{
                description: "string",
                name: "string",
                value: "string",
            }],
            querySelects: ["string"],
            queryType: "string",
        }],
        schematicsResourceQueryId: "string",
        type: "string",
    });
    
    type: ibm:SchematicsResourceQuery
    properties:
        location: string
        name: string
        queries:
            - queryConditions:
                - description: string
                  name: string
                  value: string
              querySelects:
                - string
              queryType: string
        schematicsResourceQueryId: string
        type: string
    

    SchematicsResourceQuery Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The SchematicsResourceQuery resource accepts the following input properties:

    Location string
    The region of the workspace.
    Name string
    Resource query name.
    Queries List<SchematicsResourceQueryQuery>
    Nested scheme for queries:
    SchematicsResourceQueryId string
    The unique identifier of the schematics_resource_query.
    Type string
    Resource type (cluster, vsi, icd, vpc).

    • Constraints: Allowable values are: vsi
    Location string
    The region of the workspace.
    Name string
    Resource query name.
    Queries []SchematicsResourceQueryQueryArgs
    Nested scheme for queries:
    SchematicsResourceQueryId string
    The unique identifier of the schematics_resource_query.
    Type string
    Resource type (cluster, vsi, icd, vpc).

    • Constraints: Allowable values are: vsi
    location String
    The region of the workspace.
    name String
    Resource query name.
    queries List<SchematicsResourceQueryQuery>
    Nested scheme for queries:
    schematicsResourceQueryId String
    The unique identifier of the schematics_resource_query.
    type String
    Resource type (cluster, vsi, icd, vpc).

    • Constraints: Allowable values are: vsi
    location string
    The region of the workspace.
    name string
    Resource query name.
    queries SchematicsResourceQueryQuery[]
    Nested scheme for queries:
    schematicsResourceQueryId string
    The unique identifier of the schematics_resource_query.
    type string
    Resource type (cluster, vsi, icd, vpc).

    • Constraints: Allowable values are: vsi
    location str
    The region of the workspace.
    name str
    Resource query name.
    queries Sequence[SchematicsResourceQueryQueryArgs]
    Nested scheme for queries:
    schematics_resource_query_id str
    The unique identifier of the schematics_resource_query.
    type str
    Resource type (cluster, vsi, icd, vpc).

    • Constraints: Allowable values are: vsi
    location String
    The region of the workspace.
    name String
    Resource query name.
    queries List<Property Map>
    Nested scheme for queries:
    schematicsResourceQueryId String
    The unique identifier of the schematics_resource_query.
    type String
    Resource type (cluster, vsi, icd, vpc).

    • Constraints: Allowable values are: vsi

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SchematicsResourceQuery resource produces the following output properties:

    CreatedAt string
    (String) Resource query creation time.
    CreatedBy string
    (String) Email address of user who created the resource query.
    Id string
    The provider-assigned unique ID for this managed resource.
    UpdatedAt string
    (String) Resource query updation time.
    UpdatedBy string
    (String) Email address of user who updated the resource query.
    CreatedAt string
    (String) Resource query creation time.
    CreatedBy string
    (String) Email address of user who created the resource query.
    Id string
    The provider-assigned unique ID for this managed resource.
    UpdatedAt string
    (String) Resource query updation time.
    UpdatedBy string
    (String) Email address of user who updated the resource query.
    createdAt String
    (String) Resource query creation time.
    createdBy String
    (String) Email address of user who created the resource query.
    id String
    The provider-assigned unique ID for this managed resource.
    updatedAt String
    (String) Resource query updation time.
    updatedBy String
    (String) Email address of user who updated the resource query.
    createdAt string
    (String) Resource query creation time.
    createdBy string
    (String) Email address of user who created the resource query.
    id string
    The provider-assigned unique ID for this managed resource.
    updatedAt string
    (String) Resource query updation time.
    updatedBy string
    (String) Email address of user who updated the resource query.
    created_at str
    (String) Resource query creation time.
    created_by str
    (String) Email address of user who created the resource query.
    id str
    The provider-assigned unique ID for this managed resource.
    updated_at str
    (String) Resource query updation time.
    updated_by str
    (String) Email address of user who updated the resource query.
    createdAt String
    (String) Resource query creation time.
    createdBy String
    (String) Email address of user who created the resource query.
    id String
    The provider-assigned unique ID for this managed resource.
    updatedAt String
    (String) Resource query updation time.
    updatedBy String
    (String) Email address of user who updated the resource query.

    Look up Existing SchematicsResourceQuery Resource

    Get an existing SchematicsResourceQuery resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: SchematicsResourceQueryState, opts?: CustomResourceOptions): SchematicsResourceQuery
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            created_at: Optional[str] = None,
            created_by: Optional[str] = None,
            location: Optional[str] = None,
            name: Optional[str] = None,
            queries: Optional[Sequence[SchematicsResourceQueryQueryArgs]] = None,
            schematics_resource_query_id: Optional[str] = None,
            type: Optional[str] = None,
            updated_at: Optional[str] = None,
            updated_by: Optional[str] = None) -> SchematicsResourceQuery
    func GetSchematicsResourceQuery(ctx *Context, name string, id IDInput, state *SchematicsResourceQueryState, opts ...ResourceOption) (*SchematicsResourceQuery, error)
    public static SchematicsResourceQuery Get(string name, Input<string> id, SchematicsResourceQueryState? state, CustomResourceOptions? opts = null)
    public static SchematicsResourceQuery get(String name, Output<String> id, SchematicsResourceQueryState state, CustomResourceOptions options)
    resources:  _:    type: ibm:SchematicsResourceQuery    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    CreatedAt string
    (String) Resource query creation time.
    CreatedBy string
    (String) Email address of user who created the resource query.
    Location string
    The region of the workspace.
    Name string
    Resource query name.
    Queries List<SchematicsResourceQueryQuery>
    Nested scheme for queries:
    SchematicsResourceQueryId string
    The unique identifier of the schematics_resource_query.
    Type string
    Resource type (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.
    CreatedAt string
    (String) Resource query creation time.
    CreatedBy string
    (String) Email address of user who created the resource query.
    Location string
    The region of the workspace.
    Name string
    Resource query name.
    Queries []SchematicsResourceQueryQueryArgs
    Nested scheme for queries:
    SchematicsResourceQueryId string
    The unique identifier of the schematics_resource_query.
    Type string
    Resource type (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.
    createdAt String
    (String) Resource query creation time.
    createdBy String
    (String) Email address of user who created the resource query.
    location String
    The region of the workspace.
    name String
    Resource query name.
    queries List<SchematicsResourceQueryQuery>
    Nested scheme for queries:
    schematicsResourceQueryId String
    The unique identifier of the schematics_resource_query.
    type String
    Resource type (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.
    createdAt string
    (String) Resource query creation time.
    createdBy string
    (String) Email address of user who created the resource query.
    location string
    The region of the workspace.
    name string
    Resource query name.
    queries SchematicsResourceQueryQuery[]
    Nested scheme for queries:
    schematicsResourceQueryId string
    The unique identifier of the schematics_resource_query.
    type string
    Resource type (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.
    created_at str
    (String) Resource query creation time.
    created_by str
    (String) Email address of user who created the resource query.
    location str
    The region of the workspace.
    name str
    Resource query name.
    queries Sequence[SchematicsResourceQueryQueryArgs]
    Nested scheme for queries:
    schematics_resource_query_id str
    The unique identifier of the schematics_resource_query.
    type str
    Resource type (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.
    createdAt String
    (String) Resource query creation time.
    createdBy String
    (String) Email address of user who created the resource query.
    location String
    The region of the workspace.
    name String
    Resource query name.
    queries List<Property Map>
    Nested scheme for queries:
    schematicsResourceQueryId String
    The unique identifier of the schematics_resource_query.
    type String
    Resource type (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.

    Supporting Types

    SchematicsResourceQueryQuery, SchematicsResourceQueryQueryArgs

    QueryConditions List<SchematicsResourceQueryQueryQueryCondition>
    Nested scheme for query_condition:
    QuerySelects List<string>
    List of query selection parameters.
    QueryType string
    Type of the query(workspaces).

    • Constraints: Allowable values are: workspaces
    QueryConditions []SchematicsResourceQueryQueryQueryCondition
    Nested scheme for query_condition:
    QuerySelects []string
    List of query selection parameters.
    QueryType string
    Type of the query(workspaces).

    • Constraints: Allowable values are: workspaces
    queryConditions List<SchematicsResourceQueryQueryQueryCondition>
    Nested scheme for query_condition:
    querySelects List<String>
    List of query selection parameters.
    queryType String
    Type of the query(workspaces).

    • Constraints: Allowable values are: workspaces
    queryConditions SchematicsResourceQueryQueryQueryCondition[]
    Nested scheme for query_condition:
    querySelects string[]
    List of query selection parameters.
    queryType string
    Type of the query(workspaces).

    • Constraints: Allowable values are: workspaces
    query_conditions Sequence[SchematicsResourceQueryQueryQueryCondition]
    Nested scheme for query_condition:
    query_selects Sequence[str]
    List of query selection parameters.
    query_type str
    Type of the query(workspaces).

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

    • Constraints: Allowable values are: workspaces

    SchematicsResourceQueryQueryQueryCondition, SchematicsResourceQueryQueryQueryConditionArgs

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

    Import

    You can import the ibm_schematics_resource_query resource by using id.

    Syntax

    $ pulumi import ibm:index/schematicsResourceQuery:SchematicsResourceQuery schematics_resource_query <id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    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