oci.StackMonitoring.getMonitoredResource
This data source provides details about a specific Monitored Resource resource in Oracle Cloud Infrastructure Stack Monitoring service.
Gets a monitored resource by identifier
Example Usage
using System.Collections.Generic;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() =>
{
var testMonitoredResource = Oci.StackMonitoring.GetMonitoredResource.Invoke(new()
{
MonitoredResourceId = oci_stack_monitoring_monitored_resource.Test_monitored_resource.Id,
});
});
package main
import (
"github.com/pulumi/pulumi-oci/sdk/go/oci/StackMonitoring"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := StackMonitoring.GetMonitoredResource(ctx, &stackmonitoring.GetMonitoredResourceArgs{
MonitoredResourceId: oci_stack_monitoring_monitored_resource.Test_monitored_resource.Id,
}, nil)
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.StackMonitoring.StackMonitoringFunctions;
import com.pulumi.oci.StackMonitoring.inputs.GetMonitoredResourceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var testMonitoredResource = StackMonitoringFunctions.getMonitoredResource(GetMonitoredResourceArgs.builder()
.monitoredResourceId(oci_stack_monitoring_monitored_resource.test_monitored_resource().id())
.build());
}
}
import pulumi
import pulumi_oci as oci
test_monitored_resource = oci.StackMonitoring.get_monitored_resource(monitored_resource_id=oci_stack_monitoring_monitored_resource["test_monitored_resource"]["id"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testMonitoredResource = oci.StackMonitoring.getMonitoredResource({
monitoredResourceId: oci_stack_monitoring_monitored_resource.test_monitored_resource.id,
});
variables:
testMonitoredResource:
fn::invoke:
Function: oci:StackMonitoring:getMonitoredResource
Arguments:
monitoredResourceId: ${oci_stack_monitoring_monitored_resource.test_monitored_resource.id}
Using getMonitoredResource
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getMonitoredResource(args: GetMonitoredResourceArgs, opts?: InvokeOptions): Promise<GetMonitoredResourceResult>
function getMonitoredResourceOutput(args: GetMonitoredResourceOutputArgs, opts?: InvokeOptions): Output<GetMonitoredResourceResult>
def get_monitored_resource(monitored_resource_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetMonitoredResourceResult
def get_monitored_resource_output(monitored_resource_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetMonitoredResourceResult]
func GetMonitoredResource(ctx *Context, args *GetMonitoredResourceArgs, opts ...InvokeOption) (*GetMonitoredResourceResult, error)
func GetMonitoredResourceOutput(ctx *Context, args *GetMonitoredResourceOutputArgs, opts ...InvokeOption) GetMonitoredResourceResultOutput
> Note: This function is named GetMonitoredResource
in the Go SDK.
public static class GetMonitoredResource
{
public static Task<GetMonitoredResourceResult> InvokeAsync(GetMonitoredResourceArgs args, InvokeOptions? opts = null)
public static Output<GetMonitoredResourceResult> Invoke(GetMonitoredResourceInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetMonitoredResourceResult> getMonitoredResource(GetMonitoredResourceArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:StackMonitoring/getMonitoredResource:getMonitoredResource
arguments:
# arguments dictionary
The following arguments are supported:
- Monitored
Resource stringId The OCID of monitored resource.
- Monitored
Resource stringId The OCID of monitored resource.
- monitored
Resource StringId The OCID of monitored resource.
- monitored
Resource stringId The OCID of monitored resource.
- monitored_
resource_ strid The OCID of monitored resource.
- monitored
Resource StringId The OCID of monitored resource.
getMonitoredResource Result
The following output properties are available:
- Aliases
List<Get
Monitored Resource Alias> Monitored Resource Alias Credential Details
- Compartment
Id string Compartment Identifier OCID
- Credentials
List<Get
Monitored Resource Credential> Monitored Resource Credential Details
- Database
Connection List<GetDetails Monitored Resource Database Connection Detail> Connection details to connect to the database. HostName, protocol, and port should be specified.
- Dictionary<string, object>
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- Display
Name string Monitored resource display name.
- External
Id string External resource is any Oracle Cloud Infrastructure resource identifier OCID which is not a Stack Monitoring service resource. Currently supports only following resource type identifiers - externalcontainerdatabase, externalnoncontainerdatabase, externalpluggabledatabase and Oracle Cloud Infrastructure compute instance.
- External
Resource stringId - Dictionary<string, object>
Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
- Host
Name string Monitored resource host name.
- Id string
The OCID of monitored resource.
- Management
Agent stringId Management Agent Identifier OCID.
- Monitored
Resource stringId - Name string
property name
- Properties
List<Get
Monitored Resource Property> List of monitored resource properties
- Resource
Time stringZone Time zone in the form of tz database canonical zone ID.
- State string
Lifecycle state of the monitored resource.
- Dictionary<string, object>
Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- Tenant
Id string Tenancy Identifier OCID
- Time
Created string The time the the resource was created. An RFC3339 formatted datetime string
- Time
Updated string The time the the resource was updated. An RFC3339 formatted datetime string
- Type string
Monitored resource type
- Aliases
[]Get
Monitored Resource Alias Monitored Resource Alias Credential Details
- Compartment
Id string Compartment Identifier OCID
- Credentials
[]Get
Monitored Resource Credential Monitored Resource Credential Details
- Database
Connection []GetDetails Monitored Resource Database Connection Detail Connection details to connect to the database. HostName, protocol, and port should be specified.
- map[string]interface{}
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- Display
Name string Monitored resource display name.
- External
Id string External resource is any Oracle Cloud Infrastructure resource identifier OCID which is not a Stack Monitoring service resource. Currently supports only following resource type identifiers - externalcontainerdatabase, externalnoncontainerdatabase, externalpluggabledatabase and Oracle Cloud Infrastructure compute instance.
- External
Resource stringId - map[string]interface{}
Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
- Host
Name string Monitored resource host name.
- Id string
The OCID of monitored resource.
- Management
Agent stringId Management Agent Identifier OCID.
- Monitored
Resource stringId - Name string
property name
- Properties
[]Get
Monitored Resource Property List of monitored resource properties
- Resource
Time stringZone Time zone in the form of tz database canonical zone ID.
- State string
Lifecycle state of the monitored resource.
- map[string]interface{}
Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- Tenant
Id string Tenancy Identifier OCID
- Time
Created string The time the the resource was created. An RFC3339 formatted datetime string
- Time
Updated string The time the the resource was updated. An RFC3339 formatted datetime string
- Type string
Monitored resource type
- aliases
List<Get
Monitored Resource Alias> Monitored Resource Alias Credential Details
- compartment
Id String Compartment Identifier OCID
- credentials
List<Get
Monitored Resource Credential> Monitored Resource Credential Details
- database
Connection List<GetDetails Monitored Resource Database Connection Detail> Connection details to connect to the database. HostName, protocol, and port should be specified.
- Map<String,Object>
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- display
Name String Monitored resource display name.
- external
Id String External resource is any Oracle Cloud Infrastructure resource identifier OCID which is not a Stack Monitoring service resource. Currently supports only following resource type identifiers - externalcontainerdatabase, externalnoncontainerdatabase, externalpluggabledatabase and Oracle Cloud Infrastructure compute instance.
- external
Resource StringId - Map<String,Object>
Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
- host
Name String Monitored resource host name.
- id String
The OCID of monitored resource.
- management
Agent StringId Management Agent Identifier OCID.
- monitored
Resource StringId - name String
property name
- properties
List<Get
Monitored Resource Property> List of monitored resource properties
- resource
Time StringZone Time zone in the form of tz database canonical zone ID.
- state String
Lifecycle state of the monitored resource.
- Map<String,Object>
Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- tenant
Id String Tenancy Identifier OCID
- time
Created String The time the the resource was created. An RFC3339 formatted datetime string
- time
Updated String The time the the resource was updated. An RFC3339 formatted datetime string
- type String
Monitored resource type
- aliases
Get
Monitored Resource Alias[] Monitored Resource Alias Credential Details
- compartment
Id string Compartment Identifier OCID
- credentials
Get
Monitored Resource Credential[] Monitored Resource Credential Details
- database
Connection GetDetails Monitored Resource Database Connection Detail[] Connection details to connect to the database. HostName, protocol, and port should be specified.
- {[key: string]: any}
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- display
Name string Monitored resource display name.
- external
Id string External resource is any Oracle Cloud Infrastructure resource identifier OCID which is not a Stack Monitoring service resource. Currently supports only following resource type identifiers - externalcontainerdatabase, externalnoncontainerdatabase, externalpluggabledatabase and Oracle Cloud Infrastructure compute instance.
- external
Resource stringId - {[key: string]: any}
Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
- host
Name string Monitored resource host name.
- id string
The OCID of monitored resource.
- management
Agent stringId Management Agent Identifier OCID.
- monitored
Resource stringId - name string
property name
- properties
Get
Monitored Resource Property[] List of monitored resource properties
- resource
Time stringZone Time zone in the form of tz database canonical zone ID.
- state string
Lifecycle state of the monitored resource.
- {[key: string]: any}
Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- tenant
Id string Tenancy Identifier OCID
- time
Created string The time the the resource was created. An RFC3339 formatted datetime string
- time
Updated string The time the the resource was updated. An RFC3339 formatted datetime string
- type string
Monitored resource type
- aliases
Get
Monitored Resource Alias] Monitored Resource Alias Credential Details
- compartment_
id str Compartment Identifier OCID
- credentials
Get
Monitored Resource Credential] Monitored Resource Credential Details
- database_
connection_ Getdetails Monitored Resource Database Connection Detail] Connection details to connect to the database. HostName, protocol, and port should be specified.
- Mapping[str, Any]
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- display_
name str Monitored resource display name.
- external_
id str External resource is any Oracle Cloud Infrastructure resource identifier OCID which is not a Stack Monitoring service resource. Currently supports only following resource type identifiers - externalcontainerdatabase, externalnoncontainerdatabase, externalpluggabledatabase and Oracle Cloud Infrastructure compute instance.
- external_
resource_ strid - Mapping[str, Any]
Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
- host_
name str Monitored resource host name.
- id str
The OCID of monitored resource.
- management_
agent_ strid Management Agent Identifier OCID.
- monitored_
resource_ strid - name str
property name
- properties
Get
Monitored Resource Property] List of monitored resource properties
- resource_
time_ strzone Time zone in the form of tz database canonical zone ID.
- state str
Lifecycle state of the monitored resource.
- Mapping[str, Any]
Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- tenant_
id str Tenancy Identifier OCID
- time_
created str The time the the resource was created. An RFC3339 formatted datetime string
- time_
updated str The time the the resource was updated. An RFC3339 formatted datetime string
- type str
Monitored resource type
- aliases List<Property Map>
Monitored Resource Alias Credential Details
- compartment
Id String Compartment Identifier OCID
- credentials List<Property Map>
Monitored Resource Credential Details
- database
Connection List<Property Map>Details Connection details to connect to the database. HostName, protocol, and port should be specified.
- Map<Any>
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- display
Name String Monitored resource display name.
- external
Id String External resource is any Oracle Cloud Infrastructure resource identifier OCID which is not a Stack Monitoring service resource. Currently supports only following resource type identifiers - externalcontainerdatabase, externalnoncontainerdatabase, externalpluggabledatabase and Oracle Cloud Infrastructure compute instance.
- external
Resource StringId - Map<Any>
Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
- host
Name String Monitored resource host name.
- id String
The OCID of monitored resource.
- management
Agent StringId Management Agent Identifier OCID.
- monitored
Resource StringId - name String
property name
- properties List<Property Map>
List of monitored resource properties
- resource
Time StringZone Time zone in the form of tz database canonical zone ID.
- state String
Lifecycle state of the monitored resource.
- Map<Any>
Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- tenant
Id String Tenancy Identifier OCID
- time
Created String The time the the resource was created. An RFC3339 formatted datetime string
- time
Updated String The time the the resource was updated. An RFC3339 formatted datetime string
- type String
Monitored resource type
Supporting Types
GetMonitoredResourceAlias
- Credentials
List<Get
Monitored Resource Alias Credential> Monitored Resource Alias Reference Source Credential
- Name string
property name
- Source string
The source type and source name combination,delimited with (.) separator. {source type}.{source name} and source type max char limit is 63.
- Credentials
[]Get
Monitored Resource Alias Credential Monitored Resource Alias Reference Source Credential
- Name string
property name
- Source string
The source type and source name combination,delimited with (.) separator. {source type}.{source name} and source type max char limit is 63.
- credentials
List<Get
Monitored Resource Alias Credential> Monitored Resource Alias Reference Source Credential
- name String
property name
- source String
The source type and source name combination,delimited with (.) separator. {source type}.{source name} and source type max char limit is 63.
- credentials
Get
Monitored Resource Alias Credential[] Monitored Resource Alias Reference Source Credential
- name string
property name
- source string
The source type and source name combination,delimited with (.) separator. {source type}.{source name} and source type max char limit is 63.
- credentials
Get
Monitored Resource Alias Credential] Monitored Resource Alias Reference Source Credential
- name str
property name
- source str
The source type and source name combination,delimited with (.) separator. {source type}.{source name} and source type max char limit is 63.
- credentials List<Property Map>
Monitored Resource Alias Reference Source Credential
- name String
property name
- source String
The source type and source name combination,delimited with (.) separator. {source type}.{source name} and source type max char limit is 63.
GetMonitoredResourceAliasCredential
GetMonitoredResourceCredential
- Credential
Type string Type of credentials specified in the credentials element. Three possible values - EXISTING, PLAINTEXT and ENCRYPTED. * EXISTING - Credential is already stored in agent and only credential name need to be passed for existing credential. * PLAINTEXT - The credential properties will have credentials in plain text format. * ENCRYPTED - The credential properties will have credentials stored in vault in encrypted format using KMS client which uses master key for encryption. The same master key will be used to decrypt the credentials before passing on to the management agent.
- Description string
The user-specified textual description of the credential.
- Key
Id string The master key OCID and applicable only for property value type ENCRYPTION. Key OCID is passed as input to Key management service decrypt API to retrieve the encrypted property value text.
- Name string
property name
- Properties
List<Get
Monitored Resource Credential Property> List of monitored resource properties
- Source string
The source type and source name combination,delimited with (.) separator. {source type}.{source name} and source type max char limit is 63.
- Type string
Monitored resource type
- Credential
Type string Type of credentials specified in the credentials element. Three possible values - EXISTING, PLAINTEXT and ENCRYPTED. * EXISTING - Credential is already stored in agent and only credential name need to be passed for existing credential. * PLAINTEXT - The credential properties will have credentials in plain text format. * ENCRYPTED - The credential properties will have credentials stored in vault in encrypted format using KMS client which uses master key for encryption. The same master key will be used to decrypt the credentials before passing on to the management agent.
- Description string
The user-specified textual description of the credential.
- Key
Id string The master key OCID and applicable only for property value type ENCRYPTION. Key OCID is passed as input to Key management service decrypt API to retrieve the encrypted property value text.
- Name string
property name
- Properties
[]Get
Monitored Resource Credential Property List of monitored resource properties
- Source string
The source type and source name combination,delimited with (.) separator. {source type}.{source name} and source type max char limit is 63.
- Type string
Monitored resource type
- credential
Type String Type of credentials specified in the credentials element. Three possible values - EXISTING, PLAINTEXT and ENCRYPTED. * EXISTING - Credential is already stored in agent and only credential name need to be passed for existing credential. * PLAINTEXT - The credential properties will have credentials in plain text format. * ENCRYPTED - The credential properties will have credentials stored in vault in encrypted format using KMS client which uses master key for encryption. The same master key will be used to decrypt the credentials before passing on to the management agent.
- description String
The user-specified textual description of the credential.
- key
Id String The master key OCID and applicable only for property value type ENCRYPTION. Key OCID is passed as input to Key management service decrypt API to retrieve the encrypted property value text.
- name String
property name
- properties
List<Get
Monitored Resource Credential Property> List of monitored resource properties
- source String
The source type and source name combination,delimited with (.) separator. {source type}.{source name} and source type max char limit is 63.
- type String
Monitored resource type
- credential
Type string Type of credentials specified in the credentials element. Three possible values - EXISTING, PLAINTEXT and ENCRYPTED. * EXISTING - Credential is already stored in agent and only credential name need to be passed for existing credential. * PLAINTEXT - The credential properties will have credentials in plain text format. * ENCRYPTED - The credential properties will have credentials stored in vault in encrypted format using KMS client which uses master key for encryption. The same master key will be used to decrypt the credentials before passing on to the management agent.
- description string
The user-specified textual description of the credential.
- key
Id string The master key OCID and applicable only for property value type ENCRYPTION. Key OCID is passed as input to Key management service decrypt API to retrieve the encrypted property value text.
- name string
property name
- properties
Get
Monitored Resource Credential Property[] List of monitored resource properties
- source string
The source type and source name combination,delimited with (.) separator. {source type}.{source name} and source type max char limit is 63.
- type string
Monitored resource type
- credential_
type str Type of credentials specified in the credentials element. Three possible values - EXISTING, PLAINTEXT and ENCRYPTED. * EXISTING - Credential is already stored in agent and only credential name need to be passed for existing credential. * PLAINTEXT - The credential properties will have credentials in plain text format. * ENCRYPTED - The credential properties will have credentials stored in vault in encrypted format using KMS client which uses master key for encryption. The same master key will be used to decrypt the credentials before passing on to the management agent.
- description str
The user-specified textual description of the credential.
- key_
id str The master key OCID and applicable only for property value type ENCRYPTION. Key OCID is passed as input to Key management service decrypt API to retrieve the encrypted property value text.
- name str
property name
- properties
Get
Monitored Resource Credential Property] List of monitored resource properties
- source str
The source type and source name combination,delimited with (.) separator. {source type}.{source name} and source type max char limit is 63.
- type str
Monitored resource type
- credential
Type String Type of credentials specified in the credentials element. Three possible values - EXISTING, PLAINTEXT and ENCRYPTED. * EXISTING - Credential is already stored in agent and only credential name need to be passed for existing credential. * PLAINTEXT - The credential properties will have credentials in plain text format. * ENCRYPTED - The credential properties will have credentials stored in vault in encrypted format using KMS client which uses master key for encryption. The same master key will be used to decrypt the credentials before passing on to the management agent.
- description String
The user-specified textual description of the credential.
- key
Id String The master key OCID and applicable only for property value type ENCRYPTION. Key OCID is passed as input to Key management service decrypt API to retrieve the encrypted property value text.
- name String
property name
- properties List<Property Map>
List of monitored resource properties
- source String
The source type and source name combination,delimited with (.) separator. {source type}.{source name} and source type max char limit is 63.
- type String
Monitored resource type
GetMonitoredResourceCredentialProperty
GetMonitoredResourceDatabaseConnectionDetail
- Connector
Id string Database connector Identifier
- Db
Id string dbId of the database
- Db
Unique stringName UniqueName used for database connection requests.
- Port int
Listener Port number used for connection requests.
- Protocol string
Protocol used in DB connection string when connecting to external database service.
- Service
Name string Service name used for connection requests.
- Ssl
Secret stringId SSL Secret Identifier for TCPS connector in Oracle Cloud Infrastructure VaultOCID
- Connector
Id string Database connector Identifier
- Db
Id string dbId of the database
- Db
Unique stringName UniqueName used for database connection requests.
- Port int
Listener Port number used for connection requests.
- Protocol string
Protocol used in DB connection string when connecting to external database service.
- Service
Name string Service name used for connection requests.
- Ssl
Secret stringId SSL Secret Identifier for TCPS connector in Oracle Cloud Infrastructure VaultOCID
- connector
Id String Database connector Identifier
- db
Id String dbId of the database
- db
Unique StringName UniqueName used for database connection requests.
- port Integer
Listener Port number used for connection requests.
- protocol String
Protocol used in DB connection string when connecting to external database service.
- service
Name String Service name used for connection requests.
- ssl
Secret StringId SSL Secret Identifier for TCPS connector in Oracle Cloud Infrastructure VaultOCID
- connector
Id string Database connector Identifier
- db
Id string dbId of the database
- db
Unique stringName UniqueName used for database connection requests.
- port number
Listener Port number used for connection requests.
- protocol string
Protocol used in DB connection string when connecting to external database service.
- service
Name string Service name used for connection requests.
- ssl
Secret stringId SSL Secret Identifier for TCPS connector in Oracle Cloud Infrastructure VaultOCID
- connector_
id str Database connector Identifier
- db_
id str dbId of the database
- db_
unique_ strname UniqueName used for database connection requests.
- port int
Listener Port number used for connection requests.
- protocol str
Protocol used in DB connection string when connecting to external database service.
- service_
name str Service name used for connection requests.
- ssl_
secret_ strid SSL Secret Identifier for TCPS connector in Oracle Cloud Infrastructure VaultOCID
- connector
Id String Database connector Identifier
- db
Id String dbId of the database
- db
Unique StringName UniqueName used for database connection requests.
- port Number
Listener Port number used for connection requests.
- protocol String
Protocol used in DB connection string when connecting to external database service.
- service
Name String Service name used for connection requests.
- ssl
Secret StringId SSL Secret Identifier for TCPS connector in Oracle Cloud Infrastructure VaultOCID
GetMonitoredResourceProperty
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
oci
Terraform Provider.