Acting as a restful API client, this object supports POST, GET, PUT and DELETE on the specified url
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as restapi from "@pulumi/restapi";
const foo2 = new restapi.Object("Foo2", {
path: "/api/objects",
data: "{ \"id\": \"55555\", \"first\": \"Foo\", \"last\": \"Bar\" }",
});
import pulumi
import pulumi_restapi as restapi
foo2 = restapi.Object("Foo2",
path="/api/objects",
data="{ \"id\": \"55555\", \"first\": \"Foo\", \"last\": \"Bar\" }")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/restapi/v3/restapi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := restapi.NewObject(ctx, "Foo2", &restapi.ObjectArgs{
Path: pulumi.String("/api/objects"),
Data: pulumi.String("{ \"id\": \"55555\", \"first\": \"Foo\", \"last\": \"Bar\" }"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Restapi = Pulumi.Restapi;
return await Deployment.RunAsync(() =>
{
var foo2 = new Restapi.Object("Foo2", new()
{
Path = "/api/objects",
Data = "{ \"id\": \"55555\", \"first\": \"Foo\", \"last\": \"Bar\" }",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.restapi.Object;
import com.pulumi.restapi.ObjectArgs;
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 foo2 = new Object("foo2", ObjectArgs.builder()
.path("/api/objects")
.data("{ \"id\": \"55555\", \"first\": \"Foo\", \"last\": \"Bar\" }")
.build());
}
}
resources:
foo2:
type: restapi:Object
name: Foo2
properties:
path: /api/objects
data: '{ "id": "55555", "first": "Foo", "last": "Bar" }'
import * as pulumi from "@pulumi/pulumi";
import * as restapi from "@pulumi/restapi";
// Example: Using read_search with search_patch to transform API responses
//
// When an API returns objects in a wrapped structure or with extra metadata,
// you can use search_patch to transform the response to match your desired state.
const userWithSearchPatch = new restapi.Object("user_with_search_patch", {
path: "/api/users",
data: JSON.stringify({
id: "user123",
name: "John Doe",
email: "john@example.com",
}),
readSearch: {
searchKey: "email",
searchValue: "john@example.com",
searchPatch: JSON.stringify([
{
op: "copy",
from: "/data/id",
path: "/id",
},
{
op: "copy",
from: "/data/name",
path: "/name",
},
{
op: "copy",
from: "/data/email",
path: "/email",
},
{
op: "remove",
path: "/data",
},
{
op: "remove",
path: "/metadata",
},
]),
},
});
// Example: Remove server-generated fields from API responses
const cleanResponse = new restapi.Object("clean_response", {
path: "/api/resources",
data: JSON.stringify({
id: "resource456",
name: "My Resource",
}),
readSearch: {
searchKey: "id",
searchValue: "{id}",
searchPatch: JSON.stringify([
{
op: "remove",
path: "/createdAt",
},
{
op: "remove",
path: "/updatedAt",
},
{
op: "remove",
path: "/metadata",
},
]),
},
});
import pulumi
import json
import pulumi_restapi as restapi
# Example: Using read_search with search_patch to transform API responses
#
# When an API returns objects in a wrapped structure or with extra metadata,
# you can use search_patch to transform the response to match your desired state.
user_with_search_patch = restapi.Object("user_with_search_patch",
path="/api/users",
data=json.dumps({
"id": "user123",
"name": "John Doe",
"email": "john@example.com",
}),
read_search={
"search_key": "email",
"search_value": "john@example.com",
"search_patch": json.dumps([
{
"op": "copy",
"from": "/data/id",
"path": "/id",
},
{
"op": "copy",
"from": "/data/name",
"path": "/name",
},
{
"op": "copy",
"from": "/data/email",
"path": "/email",
},
{
"op": "remove",
"path": "/data",
},
{
"op": "remove",
"path": "/metadata",
},
]),
})
# Example: Remove server-generated fields from API responses
clean_response = restapi.Object("clean_response",
path="/api/resources",
data=json.dumps({
"id": "resource456",
"name": "My Resource",
}),
read_search={
"search_key": "id",
"search_value": "{id}",
"search_patch": json.dumps([
{
"op": "remove",
"path": "/createdAt",
},
{
"op": "remove",
"path": "/updatedAt",
},
{
"op": "remove",
"path": "/metadata",
},
]),
})
package main
import (
"encoding/json"
"github.com/pulumi/pulumi-terraform-provider/sdks/go/restapi/v3/restapi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
tmpJSON0, err := json.Marshal(map[string]interface{}{
"id": "user123",
"name": "John Doe",
"email": "john@example.com",
})
if err != nil {
return err
}
json0 := string(tmpJSON0)
tmpJSON1, err := json.Marshal([]interface{}{
map[string]interface{}{
"op": "copy",
"from": "/data/id",
"path": "/id",
},
map[string]interface{}{
"op": "copy",
"from": "/data/name",
"path": "/name",
},
map[string]interface{}{
"op": "copy",
"from": "/data/email",
"path": "/email",
},
map[string]interface{}{
"op": "remove",
"path": "/data",
},
map[string]interface{}{
"op": "remove",
"path": "/metadata",
},
})
if err != nil {
return err
}
json1 := string(tmpJSON1)
// Example: Using read_search with search_patch to transform API responses
//
// When an API returns objects in a wrapped structure or with extra metadata,
// you can use search_patch to transform the response to match your desired state.
_, err = restapi.NewObject(ctx, "user_with_search_patch", &restapi.ObjectArgs{
Path: pulumi.String("/api/users"),
Data: pulumi.String(json0),
ReadSearch: &restapi.ObjectReadSearchArgs{
SearchKey: pulumi.String("email"),
SearchValue: pulumi.String("john@example.com"),
SearchPatch: pulumi.String(json1),
},
})
if err != nil {
return err
}
tmpJSON2, err := json.Marshal(map[string]interface{}{
"id": "resource456",
"name": "My Resource",
})
if err != nil {
return err
}
json2 := string(tmpJSON2)
tmpJSON3, err := json.Marshal([]map[string]interface{}{
map[string]interface{}{
"op": "remove",
"path": "/createdAt",
},
map[string]interface{}{
"op": "remove",
"path": "/updatedAt",
},
map[string]interface{}{
"op": "remove",
"path": "/metadata",
},
})
if err != nil {
return err
}
json3 := string(tmpJSON3)
// Example: Remove server-generated fields from API responses
_, err = restapi.NewObject(ctx, "clean_response", &restapi.ObjectArgs{
Path: pulumi.String("/api/resources"),
Data: pulumi.String(json2),
ReadSearch: &restapi.ObjectReadSearchArgs{
SearchKey: pulumi.String("id"),
SearchValue: pulumi.String("{id}"),
SearchPatch: pulumi.String(json3),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Restapi = Pulumi.Restapi;
return await Deployment.RunAsync(() =>
{
// Example: Using read_search with search_patch to transform API responses
//
// When an API returns objects in a wrapped structure or with extra metadata,
// you can use search_patch to transform the response to match your desired state.
var userWithSearchPatch = new Restapi.Object("user_with_search_patch", new()
{
Path = "/api/users",
Data = JsonSerializer.Serialize(new Dictionary<string, object?>
{
["id"] = "user123",
["name"] = "John Doe",
["email"] = "john@example.com",
}),
ReadSearch = new Restapi.Inputs.ObjectReadSearchArgs
{
SearchKey = "email",
SearchValue = "john@example.com",
SearchPatch = JsonSerializer.Serialize(new[]
{
new Dictionary<string, object?>
{
["op"] = "copy",
["from"] = "/data/id",
["path"] = "/id",
},
new Dictionary<string, object?>
{
["op"] = "copy",
["from"] = "/data/name",
["path"] = "/name",
},
new Dictionary<string, object?>
{
["op"] = "copy",
["from"] = "/data/email",
["path"] = "/email",
},
new Dictionary<string, object?>
{
["op"] = "remove",
["path"] = "/data",
},
new Dictionary<string, object?>
{
["op"] = "remove",
["path"] = "/metadata",
},
}),
},
});
// Example: Remove server-generated fields from API responses
var cleanResponse = new Restapi.Object("clean_response", new()
{
Path = "/api/resources",
Data = JsonSerializer.Serialize(new Dictionary<string, object?>
{
["id"] = "resource456",
["name"] = "My Resource",
}),
ReadSearch = new Restapi.Inputs.ObjectReadSearchArgs
{
SearchKey = "id",
SearchValue = "{id}",
SearchPatch = JsonSerializer.Serialize(new[]
{
new Dictionary<string, object?>
{
["op"] = "remove",
["path"] = "/createdAt",
},
new Dictionary<string, object?>
{
["op"] = "remove",
["path"] = "/updatedAt",
},
new Dictionary<string, object?>
{
["op"] = "remove",
["path"] = "/metadata",
},
}),
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.restapi.Object;
import com.pulumi.restapi.ObjectArgs;
import com.pulumi.restapi.inputs.ObjectReadSearchArgs;
import static com.pulumi.codegen.internal.Serialization.*;
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) {
// Example: Using read_search with search_patch to transform API responses
//
// When an API returns objects in a wrapped structure or with extra metadata,
// you can use search_patch to transform the response to match your desired state.
var userWithSearchPatch = new Object("userWithSearchPatch", ObjectArgs.builder()
.path("/api/users")
.data(serializeJson(
jsonObject(
jsonProperty("id", "user123"),
jsonProperty("name", "John Doe"),
jsonProperty("email", "john@example.com")
)))
.readSearch(ObjectReadSearchArgs.builder()
.searchKey("email")
.searchValue("john@example.com")
.searchPatch(serializeJson(
jsonArray(
jsonObject(
jsonProperty("op", "copy"),
jsonProperty("from", "/data/id"),
jsonProperty("path", "/id")
),
jsonObject(
jsonProperty("op", "copy"),
jsonProperty("from", "/data/name"),
jsonProperty("path", "/name")
),
jsonObject(
jsonProperty("op", "copy"),
jsonProperty("from", "/data/email"),
jsonProperty("path", "/email")
),
jsonObject(
jsonProperty("op", "remove"),
jsonProperty("path", "/data")
),
jsonObject(
jsonProperty("op", "remove"),
jsonProperty("path", "/metadata")
)
)))
.build())
.build());
// Example: Remove server-generated fields from API responses
var cleanResponse = new Object("cleanResponse", ObjectArgs.builder()
.path("/api/resources")
.data(serializeJson(
jsonObject(
jsonProperty("id", "resource456"),
jsonProperty("name", "My Resource")
)))
.readSearch(ObjectReadSearchArgs.builder()
.searchKey("id")
.searchValue("{id}")
.searchPatch(serializeJson(
jsonArray(
jsonObject(
jsonProperty("op", "remove"),
jsonProperty("path", "/createdAt")
),
jsonObject(
jsonProperty("op", "remove"),
jsonProperty("path", "/updatedAt")
),
jsonObject(
jsonProperty("op", "remove"),
jsonProperty("path", "/metadata")
)
)))
.build())
.build());
}
}
resources:
# Example: Using read_search with search_patch to transform API responses
#
# When an API returns objects in a wrapped structure or with extra metadata,
# you can use search_patch to transform the response to match your desired state.
userWithSearchPatch:
type: restapi:Object
name: user_with_search_patch
properties:
path: /api/users
data:
fn::toJSON:
id: user123
name: John Doe
email: john@example.com
readSearch:
searchKey: email
searchValue: john@example.com
searchPatch:
fn::toJSON:
- op: copy
from: /data/id
path: /id
- op: copy
from: /data/name
path: /name
- op: copy
from: /data/email
path: /email
- op: remove
path: /data
- op: remove
path: /metadata
# Example: Remove server-generated fields from API responses
cleanResponse:
type: restapi:Object
name: clean_response
properties:
path: /api/resources
data:
fn::toJSON:
id: resource456
name: My Resource
readSearch:
searchKey: id
searchValue: '{id}'
searchPatch:
fn::toJSON:
- op: remove
path: /createdAt
- op: remove
path: /updatedAt
- op: remove
path: /metadata
Create Object Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Object(name: string, args: ObjectArgs, opts?: CustomResourceOptions);@overload
def Object(resource_name: str,
args: ObjectArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Object(resource_name: str,
opts: Optional[ResourceOptions] = None,
data: Optional[str] = None,
path: Optional[str] = None,
ignore_changes_tos: Optional[Sequence[str]] = None,
ignore_server_additions: Optional[bool] = None,
destroy_data: Optional[str] = None,
destroy_method: Optional[str] = None,
destroy_path: Optional[str] = None,
force_news: Optional[Sequence[str]] = None,
id_attribute: Optional[str] = None,
ignore_all_server_changes: Optional[bool] = None,
create_method: Optional[str] = None,
debug: Optional[bool] = None,
object_id: Optional[str] = None,
create_path: Optional[str] = None,
query_string: Optional[str] = None,
read_data: Optional[str] = None,
read_method: Optional[str] = None,
read_path: Optional[str] = None,
read_search: Optional[ObjectReadSearchArgs] = None,
update_data: Optional[str] = None,
update_method: Optional[str] = None,
update_path: Optional[str] = None)func NewObject(ctx *Context, name string, args ObjectArgs, opts ...ResourceOption) (*Object, error)public Object(string name, ObjectArgs args, CustomResourceOptions? opts = null)
public Object(String name, ObjectArgs args)
public Object(String name, ObjectArgs args, CustomResourceOptions options)
type: restapi:Object
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 ObjectArgs
- 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 ObjectArgs
- 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 ObjectArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ObjectArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ObjectArgs
- 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 objectResource = new Restapi.Object("objectResource", new()
{
Data = "string",
Path = "string",
IgnoreChangesTos = new[]
{
"string",
},
IgnoreServerAdditions = false,
DestroyData = "string",
DestroyMethod = "string",
DestroyPath = "string",
ForceNews = new[]
{
"string",
},
IdAttribute = "string",
IgnoreAllServerChanges = false,
CreateMethod = "string",
Debug = false,
ObjectId = "string",
CreatePath = "string",
QueryString = "string",
ReadData = "string",
ReadMethod = "string",
ReadPath = "string",
ReadSearch = new Restapi.Inputs.ObjectReadSearchArgs
{
SearchKey = "string",
SearchValue = "string",
QueryString = "string",
ResultsKey = "string",
SearchData = "string",
SearchPatch = "string",
},
UpdateData = "string",
UpdateMethod = "string",
UpdatePath = "string",
});
example, err := restapi.NewObject(ctx, "objectResource", &restapi.ObjectArgs{
Data: pulumi.String("string"),
Path: pulumi.String("string"),
IgnoreChangesTos: pulumi.StringArray{
pulumi.String("string"),
},
IgnoreServerAdditions: pulumi.Bool(false),
DestroyData: pulumi.String("string"),
DestroyMethod: pulumi.String("string"),
DestroyPath: pulumi.String("string"),
ForceNews: pulumi.StringArray{
pulumi.String("string"),
},
IdAttribute: pulumi.String("string"),
IgnoreAllServerChanges: pulumi.Bool(false),
CreateMethod: pulumi.String("string"),
Debug: pulumi.Bool(false),
ObjectId: pulumi.String("string"),
CreatePath: pulumi.String("string"),
QueryString: pulumi.String("string"),
ReadData: pulumi.String("string"),
ReadMethod: pulumi.String("string"),
ReadPath: pulumi.String("string"),
ReadSearch: &restapi.ObjectReadSearchArgs{
SearchKey: pulumi.String("string"),
SearchValue: pulumi.String("string"),
QueryString: pulumi.String("string"),
ResultsKey: pulumi.String("string"),
SearchData: pulumi.String("string"),
SearchPatch: pulumi.String("string"),
},
UpdateData: pulumi.String("string"),
UpdateMethod: pulumi.String("string"),
UpdatePath: pulumi.String("string"),
})
var objectResource = new Object("objectResource", ObjectArgs.builder()
.data("string")
.path("string")
.ignoreChangesTos("string")
.ignoreServerAdditions(false)
.destroyData("string")
.destroyMethod("string")
.destroyPath("string")
.forceNews("string")
.idAttribute("string")
.ignoreAllServerChanges(false)
.createMethod("string")
.debug(false)
.objectId("string")
.createPath("string")
.queryString("string")
.readData("string")
.readMethod("string")
.readPath("string")
.readSearch(ObjectReadSearchArgs.builder()
.searchKey("string")
.searchValue("string")
.queryString("string")
.resultsKey("string")
.searchData("string")
.searchPatch("string")
.build())
.updateData("string")
.updateMethod("string")
.updatePath("string")
.build());
object_resource = restapi.Object("objectResource",
data="string",
path="string",
ignore_changes_tos=["string"],
ignore_server_additions=False,
destroy_data="string",
destroy_method="string",
destroy_path="string",
force_news=["string"],
id_attribute="string",
ignore_all_server_changes=False,
create_method="string",
debug=False,
object_id="string",
create_path="string",
query_string="string",
read_data="string",
read_method="string",
read_path="string",
read_search={
"search_key": "string",
"search_value": "string",
"query_string": "string",
"results_key": "string",
"search_data": "string",
"search_patch": "string",
},
update_data="string",
update_method="string",
update_path="string")
const objectResource = new restapi.Object("objectResource", {
data: "string",
path: "string",
ignoreChangesTos: ["string"],
ignoreServerAdditions: false,
destroyData: "string",
destroyMethod: "string",
destroyPath: "string",
forceNews: ["string"],
idAttribute: "string",
ignoreAllServerChanges: false,
createMethod: "string",
debug: false,
objectId: "string",
createPath: "string",
queryString: "string",
readData: "string",
readMethod: "string",
readPath: "string",
readSearch: {
searchKey: "string",
searchValue: "string",
queryString: "string",
resultsKey: "string",
searchData: "string",
searchPatch: "string",
},
updateData: "string",
updateMethod: "string",
updatePath: "string",
});
type: restapi:Object
properties:
createMethod: string
createPath: string
data: string
debug: false
destroyData: string
destroyMethod: string
destroyPath: string
forceNews:
- string
idAttribute: string
ignoreAllServerChanges: false
ignoreChangesTos:
- string
ignoreServerAdditions: false
objectId: string
path: string
queryString: string
readData: string
readMethod: string
readPath: string
readSearch:
queryString: string
resultsKey: string
searchData: string
searchKey: string
searchPatch: string
searchValue: string
updateData: string
updateMethod: string
updatePath: string
Object 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 Object resource accepts the following input properties:
- Data string
- Valid JSON object that this provider will manage with the API server.
- Path string
- The API path on top of the base URL set in the provider that represents objects of this type on the API server.
- Create
Method string - Defaults to
create_methodset on the provider. Allows per-resource override ofcreate_method(seecreate_methodprovider config documentation) - Create
Path string - Debug bool
- Whether to emit the HTTP request and response to STDOUT while working with the API object on the server.
- Destroy
Data string - Valid JSON object to pass during to destroy requests.
- Destroy
Method string - Defaults to
destroy_methodset on the provider. Allows per-resource override ofdestroy_method(seedestroy_methodprovider config documentation) - Destroy
Path string - Force
News List<string> - Any changes to these values will result in recreating the resource instead of updating.
- Id
Attribute string - Defaults to
id_attributeset on the provider. Allows per-resource override ofid_attribute(seeid_attributeprovider config documentation) - Ignore
All boolServer Changes - Ignore
Changes List<string>Tos - Ignore
Server boolAdditions - When set to 'true', fields added by the server (but not present in your configuration) will be ignored for drift detection. This prevents resource recreation when the API returns additional fields like defaults, timestamps, or metadata. Unlike 'ignoreallserver_changes', this still detects when the server modifies fields you explicitly configured. Default: false
- Object
Id string - Defaults to the id learned by the provider during normal operations and
id_attribute. Allows you to set the id manually. This is used in conjunction with the*_pathattributes. - Query
String string - Query string to be included in the path
- Read
Data string - Valid JSON object to pass during read requests.
- Read
Method string - Defaults to
read_methodset on the provider. Allows per-resource override ofread_method(seeread_methodprovider config documentation) - Read
Path string - Read
Search ObjectRead Search - Custom search for
read_path. This map will takesearch_data,search_key,search_value,results_keyandquery_string(see datasource config documentation) - Update
Data string - Valid JSON object to pass during to update requests.
- Update
Method string - Defaults to
update_methodset on the provider. Allows per-resource override ofupdate_method(seeupdate_methodprovider config documentation) - Update
Path string
- Data string
- Valid JSON object that this provider will manage with the API server.
- Path string
- The API path on top of the base URL set in the provider that represents objects of this type on the API server.
- Create
Method string - Defaults to
create_methodset on the provider. Allows per-resource override ofcreate_method(seecreate_methodprovider config documentation) - Create
Path string - Debug bool
- Whether to emit the HTTP request and response to STDOUT while working with the API object on the server.
- Destroy
Data string - Valid JSON object to pass during to destroy requests.
- Destroy
Method string - Defaults to
destroy_methodset on the provider. Allows per-resource override ofdestroy_method(seedestroy_methodprovider config documentation) - Destroy
Path string - Force
News []string - Any changes to these values will result in recreating the resource instead of updating.
- Id
Attribute string - Defaults to
id_attributeset on the provider. Allows per-resource override ofid_attribute(seeid_attributeprovider config documentation) - Ignore
All boolServer Changes - Ignore
Changes []stringTos - Ignore
Server boolAdditions - When set to 'true', fields added by the server (but not present in your configuration) will be ignored for drift detection. This prevents resource recreation when the API returns additional fields like defaults, timestamps, or metadata. Unlike 'ignoreallserver_changes', this still detects when the server modifies fields you explicitly configured. Default: false
- Object
Id string - Defaults to the id learned by the provider during normal operations and
id_attribute. Allows you to set the id manually. This is used in conjunction with the*_pathattributes. - Query
String string - Query string to be included in the path
- Read
Data string - Valid JSON object to pass during read requests.
- Read
Method string - Defaults to
read_methodset on the provider. Allows per-resource override ofread_method(seeread_methodprovider config documentation) - Read
Path string - Read
Search ObjectRead Search Args - Custom search for
read_path. This map will takesearch_data,search_key,search_value,results_keyandquery_string(see datasource config documentation) - Update
Data string - Valid JSON object to pass during to update requests.
- Update
Method string - Defaults to
update_methodset on the provider. Allows per-resource override ofupdate_method(seeupdate_methodprovider config documentation) - Update
Path string
- data String
- Valid JSON object that this provider will manage with the API server.
- path String
- The API path on top of the base URL set in the provider that represents objects of this type on the API server.
- create
Method String - Defaults to
create_methodset on the provider. Allows per-resource override ofcreate_method(seecreate_methodprovider config documentation) - create
Path String - debug Boolean
- Whether to emit the HTTP request and response to STDOUT while working with the API object on the server.
- destroy
Data String - Valid JSON object to pass during to destroy requests.
- destroy
Method String - Defaults to
destroy_methodset on the provider. Allows per-resource override ofdestroy_method(seedestroy_methodprovider config documentation) - destroy
Path String - force
News List<String> - Any changes to these values will result in recreating the resource instead of updating.
- id
Attribute String - Defaults to
id_attributeset on the provider. Allows per-resource override ofid_attribute(seeid_attributeprovider config documentation) - ignore
All BooleanServer Changes - ignore
Changes List<String>Tos - ignore
Server BooleanAdditions - When set to 'true', fields added by the server (but not present in your configuration) will be ignored for drift detection. This prevents resource recreation when the API returns additional fields like defaults, timestamps, or metadata. Unlike 'ignoreallserver_changes', this still detects when the server modifies fields you explicitly configured. Default: false
- object
Id String - Defaults to the id learned by the provider during normal operations and
id_attribute. Allows you to set the id manually. This is used in conjunction with the*_pathattributes. - query
String String - Query string to be included in the path
- read
Data String - Valid JSON object to pass during read requests.
- read
Method String - Defaults to
read_methodset on the provider. Allows per-resource override ofread_method(seeread_methodprovider config documentation) - read
Path String - read
Search ObjectRead Search - Custom search for
read_path. This map will takesearch_data,search_key,search_value,results_keyandquery_string(see datasource config documentation) - update
Data String - Valid JSON object to pass during to update requests.
- update
Method String - Defaults to
update_methodset on the provider. Allows per-resource override ofupdate_method(seeupdate_methodprovider config documentation) - update
Path String
- data string
- Valid JSON object that this provider will manage with the API server.
- path string
- The API path on top of the base URL set in the provider that represents objects of this type on the API server.
- create
Method string - Defaults to
create_methodset on the provider. Allows per-resource override ofcreate_method(seecreate_methodprovider config documentation) - create
Path string - debug boolean
- Whether to emit the HTTP request and response to STDOUT while working with the API object on the server.
- destroy
Data string - Valid JSON object to pass during to destroy requests.
- destroy
Method string - Defaults to
destroy_methodset on the provider. Allows per-resource override ofdestroy_method(seedestroy_methodprovider config documentation) - destroy
Path string - force
News string[] - Any changes to these values will result in recreating the resource instead of updating.
- id
Attribute string - Defaults to
id_attributeset on the provider. Allows per-resource override ofid_attribute(seeid_attributeprovider config documentation) - ignore
All booleanServer Changes - ignore
Changes string[]Tos - ignore
Server booleanAdditions - When set to 'true', fields added by the server (but not present in your configuration) will be ignored for drift detection. This prevents resource recreation when the API returns additional fields like defaults, timestamps, or metadata. Unlike 'ignoreallserver_changes', this still detects when the server modifies fields you explicitly configured. Default: false
- object
Id string - Defaults to the id learned by the provider during normal operations and
id_attribute. Allows you to set the id manually. This is used in conjunction with the*_pathattributes. - query
String string - Query string to be included in the path
- read
Data string - Valid JSON object to pass during read requests.
- read
Method string - Defaults to
read_methodset on the provider. Allows per-resource override ofread_method(seeread_methodprovider config documentation) - read
Path string - read
Search ObjectRead Search - Custom search for
read_path. This map will takesearch_data,search_key,search_value,results_keyandquery_string(see datasource config documentation) - update
Data string - Valid JSON object to pass during to update requests.
- update
Method string - Defaults to
update_methodset on the provider. Allows per-resource override ofupdate_method(seeupdate_methodprovider config documentation) - update
Path string
- data str
- Valid JSON object that this provider will manage with the API server.
- path str
- The API path on top of the base URL set in the provider that represents objects of this type on the API server.
- create_
method str - Defaults to
create_methodset on the provider. Allows per-resource override ofcreate_method(seecreate_methodprovider config documentation) - create_
path str - debug bool
- Whether to emit the HTTP request and response to STDOUT while working with the API object on the server.
- destroy_
data str - Valid JSON object to pass during to destroy requests.
- destroy_
method str - Defaults to
destroy_methodset on the provider. Allows per-resource override ofdestroy_method(seedestroy_methodprovider config documentation) - destroy_
path str - force_
news Sequence[str] - Any changes to these values will result in recreating the resource instead of updating.
- id_
attribute str - Defaults to
id_attributeset on the provider. Allows per-resource override ofid_attribute(seeid_attributeprovider config documentation) - ignore_
all_ boolserver_ changes - ignore_
changes_ Sequence[str]tos - ignore_
server_ booladditions - When set to 'true', fields added by the server (but not present in your configuration) will be ignored for drift detection. This prevents resource recreation when the API returns additional fields like defaults, timestamps, or metadata. Unlike 'ignoreallserver_changes', this still detects when the server modifies fields you explicitly configured. Default: false
- object_
id str - Defaults to the id learned by the provider during normal operations and
id_attribute. Allows you to set the id manually. This is used in conjunction with the*_pathattributes. - query_
string str - Query string to be included in the path
- read_
data str - Valid JSON object to pass during read requests.
- read_
method str - Defaults to
read_methodset on the provider. Allows per-resource override ofread_method(seeread_methodprovider config documentation) - read_
path str - read_
search ObjectRead Search Args - Custom search for
read_path. This map will takesearch_data,search_key,search_value,results_keyandquery_string(see datasource config documentation) - update_
data str - Valid JSON object to pass during to update requests.
- update_
method str - Defaults to
update_methodset on the provider. Allows per-resource override ofupdate_method(seeupdate_methodprovider config documentation) - update_
path str
- data String
- Valid JSON object that this provider will manage with the API server.
- path String
- The API path on top of the base URL set in the provider that represents objects of this type on the API server.
- create
Method String - Defaults to
create_methodset on the provider. Allows per-resource override ofcreate_method(seecreate_methodprovider config documentation) - create
Path String - debug Boolean
- Whether to emit the HTTP request and response to STDOUT while working with the API object on the server.
- destroy
Data String - Valid JSON object to pass during to destroy requests.
- destroy
Method String - Defaults to
destroy_methodset on the provider. Allows per-resource override ofdestroy_method(seedestroy_methodprovider config documentation) - destroy
Path String - force
News List<String> - Any changes to these values will result in recreating the resource instead of updating.
- id
Attribute String - Defaults to
id_attributeset on the provider. Allows per-resource override ofid_attribute(seeid_attributeprovider config documentation) - ignore
All BooleanServer Changes - ignore
Changes List<String>Tos - ignore
Server BooleanAdditions - When set to 'true', fields added by the server (but not present in your configuration) will be ignored for drift detection. This prevents resource recreation when the API returns additional fields like defaults, timestamps, or metadata. Unlike 'ignoreallserver_changes', this still detects when the server modifies fields you explicitly configured. Default: false
- object
Id String - Defaults to the id learned by the provider during normal operations and
id_attribute. Allows you to set the id manually. This is used in conjunction with the*_pathattributes. - query
String String - Query string to be included in the path
- read
Data String - Valid JSON object to pass during read requests.
- read
Method String - Defaults to
read_methodset on the provider. Allows per-resource override ofread_method(seeread_methodprovider config documentation) - read
Path String - read
Search Property Map - Custom search for
read_path. This map will takesearch_data,search_key,search_value,results_keyandquery_string(see datasource config documentation) - update
Data String - Valid JSON object to pass during to update requests.
- update
Method String - Defaults to
update_methodset on the provider. Allows per-resource override ofupdate_method(seeupdate_methodprovider config documentation) - update
Path String
Outputs
All input properties are implicitly available as output properties. Additionally, the Object resource produces the following output properties:
- Api
Data Dictionary<string, string> - Api
Response string - The raw body of the HTTP response from the last read of the object.
- Create
Response string - The raw body of the HTTP response returned when creating the object.
- Id string
- The provider-assigned unique ID for this managed resource.
- Api
Data map[string]string - Api
Response string - The raw body of the HTTP response from the last read of the object.
- Create
Response string - The raw body of the HTTP response returned when creating the object.
- Id string
- The provider-assigned unique ID for this managed resource.
- api
Data Map<String,String> - api
Response String - The raw body of the HTTP response from the last read of the object.
- create
Response String - The raw body of the HTTP response returned when creating the object.
- id String
- The provider-assigned unique ID for this managed resource.
- api
Data {[key: string]: string} - api
Response string - The raw body of the HTTP response from the last read of the object.
- create
Response string - The raw body of the HTTP response returned when creating the object.
- id string
- The provider-assigned unique ID for this managed resource.
- api_
data Mapping[str, str] - api_
response str - The raw body of the HTTP response from the last read of the object.
- create_
response str - The raw body of the HTTP response returned when creating the object.
- id str
- The provider-assigned unique ID for this managed resource.
- api
Data Map<String> - api
Response String - The raw body of the HTTP response from the last read of the object.
- create
Response String - The raw body of the HTTP response returned when creating the object.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing Object Resource
Get an existing Object 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?: ObjectState, opts?: CustomResourceOptions): Object@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
api_data: Optional[Mapping[str, str]] = None,
api_response: Optional[str] = None,
create_method: Optional[str] = None,
create_path: Optional[str] = None,
create_response: Optional[str] = None,
data: Optional[str] = None,
debug: Optional[bool] = None,
destroy_data: Optional[str] = None,
destroy_method: Optional[str] = None,
destroy_path: Optional[str] = None,
force_news: Optional[Sequence[str]] = None,
id_attribute: Optional[str] = None,
ignore_all_server_changes: Optional[bool] = None,
ignore_changes_tos: Optional[Sequence[str]] = None,
ignore_server_additions: Optional[bool] = None,
object_id: Optional[str] = None,
path: Optional[str] = None,
query_string: Optional[str] = None,
read_data: Optional[str] = None,
read_method: Optional[str] = None,
read_path: Optional[str] = None,
read_search: Optional[ObjectReadSearchArgs] = None,
update_data: Optional[str] = None,
update_method: Optional[str] = None,
update_path: Optional[str] = None) -> Objectfunc GetObject(ctx *Context, name string, id IDInput, state *ObjectState, opts ...ResourceOption) (*Object, error)public static Object Get(string name, Input<string> id, ObjectState? state, CustomResourceOptions? opts = null)public static Object get(String name, Output<String> id, ObjectState state, CustomResourceOptions options)resources: _: type: restapi:Object 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.
- Api
Data Dictionary<string, string> - Api
Response string - The raw body of the HTTP response from the last read of the object.
- Create
Method string - Defaults to
create_methodset on the provider. Allows per-resource override ofcreate_method(seecreate_methodprovider config documentation) - Create
Path string - Create
Response string - The raw body of the HTTP response returned when creating the object.
- Data string
- Valid JSON object that this provider will manage with the API server.
- Debug bool
- Whether to emit the HTTP request and response to STDOUT while working with the API object on the server.
- Destroy
Data string - Valid JSON object to pass during to destroy requests.
- Destroy
Method string - Defaults to
destroy_methodset on the provider. Allows per-resource override ofdestroy_method(seedestroy_methodprovider config documentation) - Destroy
Path string - Force
News List<string> - Any changes to these values will result in recreating the resource instead of updating.
- Id
Attribute string - Defaults to
id_attributeset on the provider. Allows per-resource override ofid_attribute(seeid_attributeprovider config documentation) - Ignore
All boolServer Changes - Ignore
Changes List<string>Tos - Ignore
Server boolAdditions - When set to 'true', fields added by the server (but not present in your configuration) will be ignored for drift detection. This prevents resource recreation when the API returns additional fields like defaults, timestamps, or metadata. Unlike 'ignoreallserver_changes', this still detects when the server modifies fields you explicitly configured. Default: false
- Object
Id string - Defaults to the id learned by the provider during normal operations and
id_attribute. Allows you to set the id manually. This is used in conjunction with the*_pathattributes. - Path string
- The API path on top of the base URL set in the provider that represents objects of this type on the API server.
- Query
String string - Query string to be included in the path
- Read
Data string - Valid JSON object to pass during read requests.
- Read
Method string - Defaults to
read_methodset on the provider. Allows per-resource override ofread_method(seeread_methodprovider config documentation) - Read
Path string - Read
Search ObjectRead Search - Custom search for
read_path. This map will takesearch_data,search_key,search_value,results_keyandquery_string(see datasource config documentation) - Update
Data string - Valid JSON object to pass during to update requests.
- Update
Method string - Defaults to
update_methodset on the provider. Allows per-resource override ofupdate_method(seeupdate_methodprovider config documentation) - Update
Path string
- Api
Data map[string]string - Api
Response string - The raw body of the HTTP response from the last read of the object.
- Create
Method string - Defaults to
create_methodset on the provider. Allows per-resource override ofcreate_method(seecreate_methodprovider config documentation) - Create
Path string - Create
Response string - The raw body of the HTTP response returned when creating the object.
- Data string
- Valid JSON object that this provider will manage with the API server.
- Debug bool
- Whether to emit the HTTP request and response to STDOUT while working with the API object on the server.
- Destroy
Data string - Valid JSON object to pass during to destroy requests.
- Destroy
Method string - Defaults to
destroy_methodset on the provider. Allows per-resource override ofdestroy_method(seedestroy_methodprovider config documentation) - Destroy
Path string - Force
News []string - Any changes to these values will result in recreating the resource instead of updating.
- Id
Attribute string - Defaults to
id_attributeset on the provider. Allows per-resource override ofid_attribute(seeid_attributeprovider config documentation) - Ignore
All boolServer Changes - Ignore
Changes []stringTos - Ignore
Server boolAdditions - When set to 'true', fields added by the server (but not present in your configuration) will be ignored for drift detection. This prevents resource recreation when the API returns additional fields like defaults, timestamps, or metadata. Unlike 'ignoreallserver_changes', this still detects when the server modifies fields you explicitly configured. Default: false
- Object
Id string - Defaults to the id learned by the provider during normal operations and
id_attribute. Allows you to set the id manually. This is used in conjunction with the*_pathattributes. - Path string
- The API path on top of the base URL set in the provider that represents objects of this type on the API server.
- Query
String string - Query string to be included in the path
- Read
Data string - Valid JSON object to pass during read requests.
- Read
Method string - Defaults to
read_methodset on the provider. Allows per-resource override ofread_method(seeread_methodprovider config documentation) - Read
Path string - Read
Search ObjectRead Search Args - Custom search for
read_path. This map will takesearch_data,search_key,search_value,results_keyandquery_string(see datasource config documentation) - Update
Data string - Valid JSON object to pass during to update requests.
- Update
Method string - Defaults to
update_methodset on the provider. Allows per-resource override ofupdate_method(seeupdate_methodprovider config documentation) - Update
Path string
- api
Data Map<String,String> - api
Response String - The raw body of the HTTP response from the last read of the object.
- create
Method String - Defaults to
create_methodset on the provider. Allows per-resource override ofcreate_method(seecreate_methodprovider config documentation) - create
Path String - create
Response String - The raw body of the HTTP response returned when creating the object.
- data String
- Valid JSON object that this provider will manage with the API server.
- debug Boolean
- Whether to emit the HTTP request and response to STDOUT while working with the API object on the server.
- destroy
Data String - Valid JSON object to pass during to destroy requests.
- destroy
Method String - Defaults to
destroy_methodset on the provider. Allows per-resource override ofdestroy_method(seedestroy_methodprovider config documentation) - destroy
Path String - force
News List<String> - Any changes to these values will result in recreating the resource instead of updating.
- id
Attribute String - Defaults to
id_attributeset on the provider. Allows per-resource override ofid_attribute(seeid_attributeprovider config documentation) - ignore
All BooleanServer Changes - ignore
Changes List<String>Tos - ignore
Server BooleanAdditions - When set to 'true', fields added by the server (but not present in your configuration) will be ignored for drift detection. This prevents resource recreation when the API returns additional fields like defaults, timestamps, or metadata. Unlike 'ignoreallserver_changes', this still detects when the server modifies fields you explicitly configured. Default: false
- object
Id String - Defaults to the id learned by the provider during normal operations and
id_attribute. Allows you to set the id manually. This is used in conjunction with the*_pathattributes. - path String
- The API path on top of the base URL set in the provider that represents objects of this type on the API server.
- query
String String - Query string to be included in the path
- read
Data String - Valid JSON object to pass during read requests.
- read
Method String - Defaults to
read_methodset on the provider. Allows per-resource override ofread_method(seeread_methodprovider config documentation) - read
Path String - read
Search ObjectRead Search - Custom search for
read_path. This map will takesearch_data,search_key,search_value,results_keyandquery_string(see datasource config documentation) - update
Data String - Valid JSON object to pass during to update requests.
- update
Method String - Defaults to
update_methodset on the provider. Allows per-resource override ofupdate_method(seeupdate_methodprovider config documentation) - update
Path String
- api
Data {[key: string]: string} - api
Response string - The raw body of the HTTP response from the last read of the object.
- create
Method string - Defaults to
create_methodset on the provider. Allows per-resource override ofcreate_method(seecreate_methodprovider config documentation) - create
Path string - create
Response string - The raw body of the HTTP response returned when creating the object.
- data string
- Valid JSON object that this provider will manage with the API server.
- debug boolean
- Whether to emit the HTTP request and response to STDOUT while working with the API object on the server.
- destroy
Data string - Valid JSON object to pass during to destroy requests.
- destroy
Method string - Defaults to
destroy_methodset on the provider. Allows per-resource override ofdestroy_method(seedestroy_methodprovider config documentation) - destroy
Path string - force
News string[] - Any changes to these values will result in recreating the resource instead of updating.
- id
Attribute string - Defaults to
id_attributeset on the provider. Allows per-resource override ofid_attribute(seeid_attributeprovider config documentation) - ignore
All booleanServer Changes - ignore
Changes string[]Tos - ignore
Server booleanAdditions - When set to 'true', fields added by the server (but not present in your configuration) will be ignored for drift detection. This prevents resource recreation when the API returns additional fields like defaults, timestamps, or metadata. Unlike 'ignoreallserver_changes', this still detects when the server modifies fields you explicitly configured. Default: false
- object
Id string - Defaults to the id learned by the provider during normal operations and
id_attribute. Allows you to set the id manually. This is used in conjunction with the*_pathattributes. - path string
- The API path on top of the base URL set in the provider that represents objects of this type on the API server.
- query
String string - Query string to be included in the path
- read
Data string - Valid JSON object to pass during read requests.
- read
Method string - Defaults to
read_methodset on the provider. Allows per-resource override ofread_method(seeread_methodprovider config documentation) - read
Path string - read
Search ObjectRead Search - Custom search for
read_path. This map will takesearch_data,search_key,search_value,results_keyandquery_string(see datasource config documentation) - update
Data string - Valid JSON object to pass during to update requests.
- update
Method string - Defaults to
update_methodset on the provider. Allows per-resource override ofupdate_method(seeupdate_methodprovider config documentation) - update
Path string
- api_
data Mapping[str, str] - api_
response str - The raw body of the HTTP response from the last read of the object.
- create_
method str - Defaults to
create_methodset on the provider. Allows per-resource override ofcreate_method(seecreate_methodprovider config documentation) - create_
path str - create_
response str - The raw body of the HTTP response returned when creating the object.
- data str
- Valid JSON object that this provider will manage with the API server.
- debug bool
- Whether to emit the HTTP request and response to STDOUT while working with the API object on the server.
- destroy_
data str - Valid JSON object to pass during to destroy requests.
- destroy_
method str - Defaults to
destroy_methodset on the provider. Allows per-resource override ofdestroy_method(seedestroy_methodprovider config documentation) - destroy_
path str - force_
news Sequence[str] - Any changes to these values will result in recreating the resource instead of updating.
- id_
attribute str - Defaults to
id_attributeset on the provider. Allows per-resource override ofid_attribute(seeid_attributeprovider config documentation) - ignore_
all_ boolserver_ changes - ignore_
changes_ Sequence[str]tos - ignore_
server_ booladditions - When set to 'true', fields added by the server (but not present in your configuration) will be ignored for drift detection. This prevents resource recreation when the API returns additional fields like defaults, timestamps, or metadata. Unlike 'ignoreallserver_changes', this still detects when the server modifies fields you explicitly configured. Default: false
- object_
id str - Defaults to the id learned by the provider during normal operations and
id_attribute. Allows you to set the id manually. This is used in conjunction with the*_pathattributes. - path str
- The API path on top of the base URL set in the provider that represents objects of this type on the API server.
- query_
string str - Query string to be included in the path
- read_
data str - Valid JSON object to pass during read requests.
- read_
method str - Defaults to
read_methodset on the provider. Allows per-resource override ofread_method(seeread_methodprovider config documentation) - read_
path str - read_
search ObjectRead Search Args - Custom search for
read_path. This map will takesearch_data,search_key,search_value,results_keyandquery_string(see datasource config documentation) - update_
data str - Valid JSON object to pass during to update requests.
- update_
method str - Defaults to
update_methodset on the provider. Allows per-resource override ofupdate_method(seeupdate_methodprovider config documentation) - update_
path str
- api
Data Map<String> - api
Response String - The raw body of the HTTP response from the last read of the object.
- create
Method String - Defaults to
create_methodset on the provider. Allows per-resource override ofcreate_method(seecreate_methodprovider config documentation) - create
Path String - create
Response String - The raw body of the HTTP response returned when creating the object.
- data String
- Valid JSON object that this provider will manage with the API server.
- debug Boolean
- Whether to emit the HTTP request and response to STDOUT while working with the API object on the server.
- destroy
Data String - Valid JSON object to pass during to destroy requests.
- destroy
Method String - Defaults to
destroy_methodset on the provider. Allows per-resource override ofdestroy_method(seedestroy_methodprovider config documentation) - destroy
Path String - force
News List<String> - Any changes to these values will result in recreating the resource instead of updating.
- id
Attribute String - Defaults to
id_attributeset on the provider. Allows per-resource override ofid_attribute(seeid_attributeprovider config documentation) - ignore
All BooleanServer Changes - ignore
Changes List<String>Tos - ignore
Server BooleanAdditions - When set to 'true', fields added by the server (but not present in your configuration) will be ignored for drift detection. This prevents resource recreation when the API returns additional fields like defaults, timestamps, or metadata. Unlike 'ignoreallserver_changes', this still detects when the server modifies fields you explicitly configured. Default: false
- object
Id String - Defaults to the id learned by the provider during normal operations and
id_attribute. Allows you to set the id manually. This is used in conjunction with the*_pathattributes. - path String
- The API path on top of the base URL set in the provider that represents objects of this type on the API server.
- query
String String - Query string to be included in the path
- read
Data String - Valid JSON object to pass during read requests.
- read
Method String - Defaults to
read_methodset on the provider. Allows per-resource override ofread_method(seeread_methodprovider config documentation) - read
Path String - read
Search Property Map - Custom search for
read_path. This map will takesearch_data,search_key,search_value,results_keyandquery_string(see datasource config documentation) - update
Data String - Valid JSON object to pass during to update requests.
- update
Method String - Defaults to
update_methodset on the provider. Allows per-resource override ofupdate_method(seeupdate_methodprovider config documentation) - update
Path String
Supporting Types
ObjectReadSearch, ObjectReadSearchArgs
- Search
Key string - When reading search results from the API, this key is used to identify the specific record to read. This should be a unique record such as 'name'. Similar to results_key, the value may be in the format of 'field/field/field' to search for data deeper in the returned object.
- Search
Value string - The value of 'searchkey' will be compared to this value to determine if the correct object was found. Example: if 'searchkey' is 'name' and 'search_value' is 'foo', the record in the array returned by the API with name=foo will be used. Supports interpolation of {id} placeholder with the object's ID.
- Query
String string - An optional query string to send when performing the search.
- Results
Key string - When issuing a GET to the path, this JSON key is used to locate the results array. The format is 'field/field/field'. Example: 'results/values'. If omitted, it is assumed the results coming back are already an array and are to be used exactly as-is.
- Search
Data string - Valid JSON object to pass to search request as body
- Search
Patch string - A JSON Patch (RFC 6902) to apply to the search result before storing in state. This allows transformation of the API response to match the expected data structure. Example: [{"op":"move","from":"/old","path":"/new"}]
- Search
Key string - When reading search results from the API, this key is used to identify the specific record to read. This should be a unique record such as 'name'. Similar to results_key, the value may be in the format of 'field/field/field' to search for data deeper in the returned object.
- Search
Value string - The value of 'searchkey' will be compared to this value to determine if the correct object was found. Example: if 'searchkey' is 'name' and 'search_value' is 'foo', the record in the array returned by the API with name=foo will be used. Supports interpolation of {id} placeholder with the object's ID.
- Query
String string - An optional query string to send when performing the search.
- Results
Key string - When issuing a GET to the path, this JSON key is used to locate the results array. The format is 'field/field/field'. Example: 'results/values'. If omitted, it is assumed the results coming back are already an array and are to be used exactly as-is.
- Search
Data string - Valid JSON object to pass to search request as body
- Search
Patch string - A JSON Patch (RFC 6902) to apply to the search result before storing in state. This allows transformation of the API response to match the expected data structure. Example: [{"op":"move","from":"/old","path":"/new"}]
- search
Key String - When reading search results from the API, this key is used to identify the specific record to read. This should be a unique record such as 'name'. Similar to results_key, the value may be in the format of 'field/field/field' to search for data deeper in the returned object.
- search
Value String - The value of 'searchkey' will be compared to this value to determine if the correct object was found. Example: if 'searchkey' is 'name' and 'search_value' is 'foo', the record in the array returned by the API with name=foo will be used. Supports interpolation of {id} placeholder with the object's ID.
- query
String String - An optional query string to send when performing the search.
- results
Key String - When issuing a GET to the path, this JSON key is used to locate the results array. The format is 'field/field/field'. Example: 'results/values'. If omitted, it is assumed the results coming back are already an array and are to be used exactly as-is.
- search
Data String - Valid JSON object to pass to search request as body
- search
Patch String - A JSON Patch (RFC 6902) to apply to the search result before storing in state. This allows transformation of the API response to match the expected data structure. Example: [{"op":"move","from":"/old","path":"/new"}]
- search
Key string - When reading search results from the API, this key is used to identify the specific record to read. This should be a unique record such as 'name'. Similar to results_key, the value may be in the format of 'field/field/field' to search for data deeper in the returned object.
- search
Value string - The value of 'searchkey' will be compared to this value to determine if the correct object was found. Example: if 'searchkey' is 'name' and 'search_value' is 'foo', the record in the array returned by the API with name=foo will be used. Supports interpolation of {id} placeholder with the object's ID.
- query
String string - An optional query string to send when performing the search.
- results
Key string - When issuing a GET to the path, this JSON key is used to locate the results array. The format is 'field/field/field'. Example: 'results/values'. If omitted, it is assumed the results coming back are already an array and are to be used exactly as-is.
- search
Data string - Valid JSON object to pass to search request as body
- search
Patch string - A JSON Patch (RFC 6902) to apply to the search result before storing in state. This allows transformation of the API response to match the expected data structure. Example: [{"op":"move","from":"/old","path":"/new"}]
- search_
key str - When reading search results from the API, this key is used to identify the specific record to read. This should be a unique record such as 'name'. Similar to results_key, the value may be in the format of 'field/field/field' to search for data deeper in the returned object.
- search_
value str - The value of 'searchkey' will be compared to this value to determine if the correct object was found. Example: if 'searchkey' is 'name' and 'search_value' is 'foo', the record in the array returned by the API with name=foo will be used. Supports interpolation of {id} placeholder with the object's ID.
- query_
string str - An optional query string to send when performing the search.
- results_
key str - When issuing a GET to the path, this JSON key is used to locate the results array. The format is 'field/field/field'. Example: 'results/values'. If omitted, it is assumed the results coming back are already an array and are to be used exactly as-is.
- search_
data str - Valid JSON object to pass to search request as body
- search_
patch str - A JSON Patch (RFC 6902) to apply to the search result before storing in state. This allows transformation of the API response to match the expected data structure. Example: [{"op":"move","from":"/old","path":"/new"}]
- search
Key String - When reading search results from the API, this key is used to identify the specific record to read. This should be a unique record such as 'name'. Similar to results_key, the value may be in the format of 'field/field/field' to search for data deeper in the returned object.
- search
Value String - The value of 'searchkey' will be compared to this value to determine if the correct object was found. Example: if 'searchkey' is 'name' and 'search_value' is 'foo', the record in the array returned by the API with name=foo will be used. Supports interpolation of {id} placeholder with the object's ID.
- query
String String - An optional query string to send when performing the search.
- results
Key String - When issuing a GET to the path, this JSON key is used to locate the results array. The format is 'field/field/field'. Example: 'results/values'. If omitted, it is assumed the results coming back are already an array and are to be used exactly as-is.
- search
Data String - Valid JSON object to pass to search request as body
- search
Patch String - A JSON Patch (RFC 6902) to apply to the search result before storing in state. This allows transformation of the API response to match the expected data structure. Example: [{"op":"move","from":"/old","path":"/new"}]
Import
The pulumi import command can be used, for example:
identifier: /
Examples:
$ pulumi import restapi:index/object:Object objects /api/objects
$ pulumi import restapi:index/object:Object object /api/objects/123
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- restapi mastercard/terraform-provider-restapi
- License
- Notes
- This Pulumi package is based on the
restapiTerraform Provider.
