ibm.SchematicsResourceQuery
Explore with Pulumi AI
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<Schematics
Resource Query Query> - Nested scheme for queries:
- Schematics
Resource stringQuery Id - 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
[]Schematics
Resource Query Query Args - Nested scheme for queries:
- Schematics
Resource stringQuery Id - 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<Schematics
Resource Query Query> - Nested scheme for queries:
- schematics
Resource StringQuery Id - 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
Schematics
Resource Query Query[] - Nested scheme for queries:
- schematics
Resource stringQuery Id - 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[Schematics
Resource Query Query Args] - Nested scheme for queries:
- schematics_
resource_ strquery_ id - 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:
- schematics
Resource StringQuery Id - 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:
- Created
At string - (String) Resource query creation time.
- Created
By string - (String) Email address of user who created the resource query.
- Id string
- The provider-assigned unique ID for this managed resource.
- Updated
At string - (String) Resource query updation time.
- Updated
By string - (String) Email address of user who updated the resource query.
- Created
At string - (String) Resource query creation time.
- Created
By string - (String) Email address of user who created the resource query.
- Id string
- The provider-assigned unique ID for this managed resource.
- Updated
At string - (String) Resource query updation time.
- Updated
By string - (String) Email address of user who updated the resource query.
- created
At String - (String) Resource query creation time.
- created
By String - (String) Email address of user who created the resource query.
- id String
- The provider-assigned unique ID for this managed resource.
- updated
At String - (String) Resource query updation time.
- updated
By String - (String) Email address of user who updated the resource query.
- created
At string - (String) Resource query creation time.
- created
By string - (String) Email address of user who created the resource query.
- id string
- The provider-assigned unique ID for this managed resource.
- updated
At string - (String) Resource query updation time.
- updated
By 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.
- created
At String - (String) Resource query creation time.
- created
By String - (String) Email address of user who created the resource query.
- id String
- The provider-assigned unique ID for this managed resource.
- updated
At String - (String) Resource query updation time.
- updated
By 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.
- Created
At string - (String) Resource query creation time.
- Created
By 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<Schematics
Resource Query Query> - Nested scheme for queries:
- Schematics
Resource stringQuery Id - The unique identifier of the schematics_resource_query.
- Type string
- Resource type (cluster, vsi, icd, vpc).
- Constraints: Allowable values are: vsi
- Updated
At string - (String) Resource query updation time.
- Updated
By string - (String) Email address of user who updated the resource query.
- Created
At string - (String) Resource query creation time.
- Created
By string - (String) Email address of user who created the resource query.
- Location string
- The region of the workspace.
- Name string
- Resource query name.
- Queries
[]Schematics
Resource Query Query Args - Nested scheme for queries:
- Schematics
Resource stringQuery Id - The unique identifier of the schematics_resource_query.
- Type string
- Resource type (cluster, vsi, icd, vpc).
- Constraints: Allowable values are: vsi
- Updated
At string - (String) Resource query updation time.
- Updated
By string - (String) Email address of user who updated the resource query.
- created
At String - (String) Resource query creation time.
- created
By 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<Schematics
Resource Query Query> - Nested scheme for queries:
- schematics
Resource StringQuery Id - The unique identifier of the schematics_resource_query.
- type String
- Resource type (cluster, vsi, icd, vpc).
- Constraints: Allowable values are: vsi
- updated
At String - (String) Resource query updation time.
- updated
By String - (String) Email address of user who updated the resource query.
- created
At string - (String) Resource query creation time.
- created
By string - (String) Email address of user who created the resource query.
- location string
- The region of the workspace.
- name string
- Resource query name.
- queries
Schematics
Resource Query Query[] - Nested scheme for queries:
- schematics
Resource stringQuery Id - The unique identifier of the schematics_resource_query.
- type string
- Resource type (cluster, vsi, icd, vpc).
- Constraints: Allowable values are: vsi
- updated
At string - (String) Resource query updation time.
- updated
By 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[Schematics
Resource Query Query Args] - Nested scheme for queries:
- schematics_
resource_ strquery_ id - 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.
- created
At String - (String) Resource query creation time.
- created
By 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:
- schematics
Resource StringQuery Id - The unique identifier of the schematics_resource_query.
- type String
- Resource type (cluster, vsi, icd, vpc).
- Constraints: Allowable values are: vsi
- updated
At String - (String) Resource query updation time.
- updated
By String - (String) Email address of user who updated the resource query.
Supporting Types
SchematicsResourceQueryQuery, SchematicsResourceQueryQueryArgs
- Query
Conditions List<SchematicsResource Query Query Query Condition> - Nested scheme for query_condition:
- Query
Selects List<string> - List of query selection parameters.
- Query
Type string - Type of the query(workspaces).
- Constraints: Allowable values are: workspaces
- Query
Conditions []SchematicsResource Query Query Query Condition - Nested scheme for query_condition:
- Query
Selects []string - List of query selection parameters.
- Query
Type string - Type of the query(workspaces).
- Constraints: Allowable values are: workspaces
- query
Conditions List<SchematicsResource Query Query Query Condition> - Nested scheme for query_condition:
- query
Selects List<String> - List of query selection parameters.
- query
Type String - Type of the query(workspaces).
- Constraints: Allowable values are: workspaces
- query
Conditions SchematicsResource Query Query Query Condition[] - Nested scheme for query_condition:
- query
Selects string[] - List of query selection parameters.
- query
Type string - Type of the query(workspaces).
- Constraints: Allowable values are: workspaces
- query_
conditions Sequence[SchematicsResource Query Query Query Condition] - 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
- query
Conditions List<Property Map> - Nested scheme for query_condition:
- query
Selects List<String> - List of query selection parameters.
- query
Type 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.