oci.Core.ConsoleHistory
Explore with Pulumi AI
This resource provides the Console History resource in Oracle Cloud Infrastructure Core service.
Captures the most recent serial console data (up to a megabyte) for the specified instance.
The CaptureConsoleHistory
operation works with the other console history operations
as described below.
- Use
CaptureConsoleHistory
to request the capture of up to a megabyte of the most recent console history. This call returns aConsoleHistory
object. The object will have a state of REQUESTED. - Wait for the capture operation to succeed by polling
GetConsoleHistory
with the identifier of the console history metadata. The state of theConsoleHistory
object will go from REQUESTED to GETTING-HISTORY and then SUCCEEDED (or FAILED). - Use
GetConsoleHistoryContent
to get the actual console history data (not the metadata). - Optionally, use
DeleteConsoleHistory
to delete the console history metadata and the console history data.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() =>
{
var testConsoleHistory = new Oci.Core.ConsoleHistory("testConsoleHistory", new()
{
InstanceId = oci_core_instance.Test_instance.Id,
DefinedTags =
{
{ "Operations.CostCenter", "42" },
},
DisplayName = @var.Console_history_display_name,
FreeformTags =
{
{ "Department", "Finance" },
},
});
});
package main
import (
"github.com/pulumi/pulumi-oci/sdk/go/oci/Core"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := Core.NewConsoleHistory(ctx, "testConsoleHistory", &Core.ConsoleHistoryArgs{
InstanceId: pulumi.Any(oci_core_instance.Test_instance.Id),
DefinedTags: pulumi.AnyMap{
"Operations.CostCenter": pulumi.Any("42"),
},
DisplayName: pulumi.Any(_var.Console_history_display_name),
FreeformTags: pulumi.AnyMap{
"Department": pulumi.Any("Finance"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Core.ConsoleHistory;
import com.pulumi.oci.Core.ConsoleHistoryArgs;
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 testConsoleHistory = new ConsoleHistory("testConsoleHistory", ConsoleHistoryArgs.builder()
.instanceId(oci_core_instance.test_instance().id())
.definedTags(Map.of("Operations.CostCenter", "42"))
.displayName(var_.console_history_display_name())
.freeformTags(Map.of("Department", "Finance"))
.build());
}
}
import pulumi
import pulumi_oci as oci
test_console_history = oci.core.ConsoleHistory("testConsoleHistory",
instance_id=oci_core_instance["test_instance"]["id"],
defined_tags={
"Operations.CostCenter": "42",
},
display_name=var["console_history_display_name"],
freeform_tags={
"Department": "Finance",
})
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testConsoleHistory = new oci.core.ConsoleHistory("testConsoleHistory", {
instanceId: oci_core_instance.test_instance.id,
definedTags: {
"Operations.CostCenter": "42",
},
displayName: _var.console_history_display_name,
freeformTags: {
Department: "Finance",
},
});
resources:
testConsoleHistory:
type: oci:Core:ConsoleHistory
properties:
#Required
instanceId: ${oci_core_instance.test_instance.id}
#Optional
definedTags:
Operations.CostCenter: '42'
displayName: ${var.console_history_display_name}
freeformTags:
Department: Finance
Create ConsoleHistory Resource
new ConsoleHistory(name: string, args: ConsoleHistoryArgs, opts?: CustomResourceOptions);
@overload
def ConsoleHistory(resource_name: str,
opts: Optional[ResourceOptions] = None,
defined_tags: Optional[Mapping[str, Any]] = None,
display_name: Optional[str] = None,
freeform_tags: Optional[Mapping[str, Any]] = None,
instance_id: Optional[str] = None)
@overload
def ConsoleHistory(resource_name: str,
args: ConsoleHistoryArgs,
opts: Optional[ResourceOptions] = None)
func NewConsoleHistory(ctx *Context, name string, args ConsoleHistoryArgs, opts ...ResourceOption) (*ConsoleHistory, error)
public ConsoleHistory(string name, ConsoleHistoryArgs args, CustomResourceOptions? opts = null)
public ConsoleHistory(String name, ConsoleHistoryArgs args)
public ConsoleHistory(String name, ConsoleHistoryArgs args, CustomResourceOptions options)
type: oci:Core:ConsoleHistory
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ConsoleHistoryArgs
- 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 ConsoleHistoryArgs
- 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 ConsoleHistoryArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ConsoleHistoryArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ConsoleHistoryArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
ConsoleHistory Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The ConsoleHistory resource accepts the following input properties:
- Instance
Id string The OCID of the instance to get the console history from.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- Dictionary<string, object>
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Display
Name string (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- Dictionary<string, object>
(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- Instance
Id string The OCID of the instance to get the console history from.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- map[string]interface{}
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Display
Name string (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- map[string]interface{}
(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- instance
Id String The OCID of the instance to get the console history from.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- Map<String,Object>
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- display
Name String (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- Map<String,Object>
(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- instance
Id string The OCID of the instance to get the console history from.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- {[key: string]: any}
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- display
Name string (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- {[key: string]: any}
(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- instance_
id str The OCID of the instance to get the console history from.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- Mapping[str, Any]
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- display_
name str (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- Mapping[str, Any]
(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- instance
Id String The OCID of the instance to get the console history from.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- Map<Any>
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- display
Name String (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- Map<Any>
(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
Outputs
All input properties are implicitly available as output properties. Additionally, the ConsoleHistory resource produces the following output properties:
- Availability
Domain string The availability domain of an instance. Example:
Uocm:PHX-AD-1
- Compartment
Id string The OCID of the compartment.
- Id string
The provider-assigned unique ID for this managed resource.
- State string
The current state of the console history.
- Time
Created string The date and time the history was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- Availability
Domain string The availability domain of an instance. Example:
Uocm:PHX-AD-1
- Compartment
Id string The OCID of the compartment.
- Id string
The provider-assigned unique ID for this managed resource.
- State string
The current state of the console history.
- Time
Created string The date and time the history was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- availability
Domain String The availability domain of an instance. Example:
Uocm:PHX-AD-1
- compartment
Id String The OCID of the compartment.
- id String
The provider-assigned unique ID for this managed resource.
- state String
The current state of the console history.
- time
Created String The date and time the history was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- availability
Domain string The availability domain of an instance. Example:
Uocm:PHX-AD-1
- compartment
Id string The OCID of the compartment.
- id string
The provider-assigned unique ID for this managed resource.
- state string
The current state of the console history.
- time
Created string The date and time the history was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- availability_
domain str The availability domain of an instance. Example:
Uocm:PHX-AD-1
- compartment_
id str The OCID of the compartment.
- id str
The provider-assigned unique ID for this managed resource.
- state str
The current state of the console history.
- time_
created str The date and time the history was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- availability
Domain String The availability domain of an instance. Example:
Uocm:PHX-AD-1
- compartment
Id String The OCID of the compartment.
- id String
The provider-assigned unique ID for this managed resource.
- state String
The current state of the console history.
- time
Created String The date and time the history was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
Look up Existing ConsoleHistory Resource
Get an existing ConsoleHistory 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?: ConsoleHistoryState, opts?: CustomResourceOptions): ConsoleHistory
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
availability_domain: Optional[str] = None,
compartment_id: Optional[str] = None,
defined_tags: Optional[Mapping[str, Any]] = None,
display_name: Optional[str] = None,
freeform_tags: Optional[Mapping[str, Any]] = None,
instance_id: Optional[str] = None,
state: Optional[str] = None,
time_created: Optional[str] = None) -> ConsoleHistory
func GetConsoleHistory(ctx *Context, name string, id IDInput, state *ConsoleHistoryState, opts ...ResourceOption) (*ConsoleHistory, error)
public static ConsoleHistory Get(string name, Input<string> id, ConsoleHistoryState? state, CustomResourceOptions? opts = null)
public static ConsoleHistory get(String name, Output<String> id, ConsoleHistoryState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Availability
Domain string The availability domain of an instance. Example:
Uocm:PHX-AD-1
- Compartment
Id string The OCID of the compartment.
- Dictionary<string, object>
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Display
Name string (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- Dictionary<string, object>
(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- Instance
Id string The OCID of the instance to get the console history from.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- State string
The current state of the console history.
- Time
Created string The date and time the history was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- Availability
Domain string The availability domain of an instance. Example:
Uocm:PHX-AD-1
- Compartment
Id string The OCID of the compartment.
- map[string]interface{}
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Display
Name string (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- map[string]interface{}
(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- Instance
Id string The OCID of the instance to get the console history from.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- State string
The current state of the console history.
- Time
Created string The date and time the history was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- availability
Domain String The availability domain of an instance. Example:
Uocm:PHX-AD-1
- compartment
Id String The OCID of the compartment.
- Map<String,Object>
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- display
Name String (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- Map<String,Object>
(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- instance
Id String The OCID of the instance to get the console history from.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- state String
The current state of the console history.
- time
Created String The date and time the history was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- availability
Domain string The availability domain of an instance. Example:
Uocm:PHX-AD-1
- compartment
Id string The OCID of the compartment.
- {[key: string]: any}
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- display
Name string (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- {[key: string]: any}
(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- instance
Id string The OCID of the instance to get the console history from.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- state string
The current state of the console history.
- time
Created string The date and time the history was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- availability_
domain str The availability domain of an instance. Example:
Uocm:PHX-AD-1
- compartment_
id str The OCID of the compartment.
- Mapping[str, Any]
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- display_
name str (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- Mapping[str, Any]
(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- instance_
id str The OCID of the instance to get the console history from.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- state str
The current state of the console history.
- time_
created str The date and time the history was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- availability
Domain String The availability domain of an instance. Example:
Uocm:PHX-AD-1
- compartment
Id String The OCID of the compartment.
- Map<Any>
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- display
Name String (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- Map<Any>
(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- instance
Id String The OCID of the instance to get the console history from.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- state String
The current state of the console history.
- time
Created String The date and time the history was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
Import
ConsoleHistories can be imported using the id
, e.g.
$ pulumi import oci:Core/consoleHistory:ConsoleHistory test_console_history "id"
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
oci
Terraform Provider.