oci.StackMonitoring.MonitoredResourcesAssociateMonitoredResource
Explore with Pulumi AI
This resource provides the Monitored Resources Associate Monitored Resource resource in Oracle Cloud Infrastructure Stack Monitoring service.
Create an association between two monitored resources. Associations can be created between resources from different compartments as long they are in same tenancy. User should have required access in both the compartments.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testMonitoredResourcesAssociateMonitoredResource = new oci.stackmonitoring.MonitoredResourcesAssociateMonitoredResource("test_monitored_resources_associate_monitored_resource", {
associationType: monitoredResourcesAssociateMonitoredResourceAssociationType,
compartmentId: compartmentId,
destinationResourceId: testDestinationResource.id,
sourceResourceId: testSourceResource.id,
});
import pulumi
import pulumi_oci as oci
test_monitored_resources_associate_monitored_resource = oci.stack_monitoring.MonitoredResourcesAssociateMonitoredResource("test_monitored_resources_associate_monitored_resource",
association_type=monitored_resources_associate_monitored_resource_association_type,
compartment_id=compartment_id,
destination_resource_id=test_destination_resource["id"],
source_resource_id=test_source_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.NewMonitoredResourcesAssociateMonitoredResource(ctx, "test_monitored_resources_associate_monitored_resource", &StackMonitoring.MonitoredResourcesAssociateMonitoredResourceArgs{
AssociationType: pulumi.Any(monitoredResourcesAssociateMonitoredResourceAssociationType),
CompartmentId: pulumi.Any(compartmentId),
DestinationResourceId: pulumi.Any(testDestinationResource.Id),
SourceResourceId: pulumi.Any(testSourceResource.Id),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() =>
{
var testMonitoredResourcesAssociateMonitoredResource = new Oci.StackMonitoring.MonitoredResourcesAssociateMonitoredResource("test_monitored_resources_associate_monitored_resource", new()
{
AssociationType = monitoredResourcesAssociateMonitoredResourceAssociationType,
CompartmentId = compartmentId,
DestinationResourceId = testDestinationResource.Id,
SourceResourceId = testSourceResource.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.StackMonitoring.MonitoredResourcesAssociateMonitoredResource;
import com.pulumi.oci.StackMonitoring.MonitoredResourcesAssociateMonitoredResourceArgs;
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 testMonitoredResourcesAssociateMonitoredResource = new MonitoredResourcesAssociateMonitoredResource("testMonitoredResourcesAssociateMonitoredResource", MonitoredResourcesAssociateMonitoredResourceArgs.builder()
.associationType(monitoredResourcesAssociateMonitoredResourceAssociationType)
.compartmentId(compartmentId)
.destinationResourceId(testDestinationResource.id())
.sourceResourceId(testSourceResource.id())
.build());
}
}
resources:
testMonitoredResourcesAssociateMonitoredResource:
type: oci:StackMonitoring:MonitoredResourcesAssociateMonitoredResource
name: test_monitored_resources_associate_monitored_resource
properties:
associationType: ${monitoredResourcesAssociateMonitoredResourceAssociationType}
compartmentId: ${compartmentId}
destinationResourceId: ${testDestinationResource.id}
sourceResourceId: ${testSourceResource.id}
Create MonitoredResourcesAssociateMonitoredResource Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new MonitoredResourcesAssociateMonitoredResource(name: string, args: MonitoredResourcesAssociateMonitoredResourceArgs, opts?: CustomResourceOptions);
@overload
def MonitoredResourcesAssociateMonitoredResource(resource_name: str,
args: MonitoredResourcesAssociateMonitoredResourceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def MonitoredResourcesAssociateMonitoredResource(resource_name: str,
opts: Optional[ResourceOptions] = None,
association_type: Optional[str] = None,
compartment_id: Optional[str] = None,
destination_resource_id: Optional[str] = None,
source_resource_id: Optional[str] = None)
func NewMonitoredResourcesAssociateMonitoredResource(ctx *Context, name string, args MonitoredResourcesAssociateMonitoredResourceArgs, opts ...ResourceOption) (*MonitoredResourcesAssociateMonitoredResource, error)
public MonitoredResourcesAssociateMonitoredResource(string name, MonitoredResourcesAssociateMonitoredResourceArgs args, CustomResourceOptions? opts = null)
public MonitoredResourcesAssociateMonitoredResource(String name, MonitoredResourcesAssociateMonitoredResourceArgs args)
public MonitoredResourcesAssociateMonitoredResource(String name, MonitoredResourcesAssociateMonitoredResourceArgs args, CustomResourceOptions options)
type: oci:StackMonitoring:MonitoredResourcesAssociateMonitoredResource
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 MonitoredResourcesAssociateMonitoredResourceArgs
- 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 MonitoredResourcesAssociateMonitoredResourceArgs
- 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 MonitoredResourcesAssociateMonitoredResourceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MonitoredResourcesAssociateMonitoredResourceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args MonitoredResourcesAssociateMonitoredResourceArgs
- 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 monitoredResourcesAssociateMonitoredResourceResource = new Oci.StackMonitoring.MonitoredResourcesAssociateMonitoredResource("monitoredResourcesAssociateMonitoredResourceResource", new()
{
AssociationType = "string",
CompartmentId = "string",
DestinationResourceId = "string",
SourceResourceId = "string",
});
example, err := StackMonitoring.NewMonitoredResourcesAssociateMonitoredResource(ctx, "monitoredResourcesAssociateMonitoredResourceResource", &StackMonitoring.MonitoredResourcesAssociateMonitoredResourceArgs{
AssociationType: pulumi.String("string"),
CompartmentId: pulumi.String("string"),
DestinationResourceId: pulumi.String("string"),
SourceResourceId: pulumi.String("string"),
})
var monitoredResourcesAssociateMonitoredResourceResource = new MonitoredResourcesAssociateMonitoredResource("monitoredResourcesAssociateMonitoredResourceResource", MonitoredResourcesAssociateMonitoredResourceArgs.builder()
.associationType("string")
.compartmentId("string")
.destinationResourceId("string")
.sourceResourceId("string")
.build());
monitored_resources_associate_monitored_resource_resource = oci.stack_monitoring.MonitoredResourcesAssociateMonitoredResource("monitoredResourcesAssociateMonitoredResourceResource",
association_type="string",
compartment_id="string",
destination_resource_id="string",
source_resource_id="string")
const monitoredResourcesAssociateMonitoredResourceResource = new oci.stackmonitoring.MonitoredResourcesAssociateMonitoredResource("monitoredResourcesAssociateMonitoredResourceResource", {
associationType: "string",
compartmentId: "string",
destinationResourceId: "string",
sourceResourceId: "string",
});
type: oci:StackMonitoring:MonitoredResourcesAssociateMonitoredResource
properties:
associationType: string
compartmentId: string
destinationResourceId: string
sourceResourceId: string
MonitoredResourcesAssociateMonitoredResource 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 MonitoredResourcesAssociateMonitoredResource resource accepts the following input properties:
- Association
Type string - Association type to be created between source and destination resources.
- Compartment
Id string - Compartment Identifier OCID.
- Destination
Resource stringId - Destination Monitored Resource Identifier OCID.
- Source
Resource stringId Source Monitored Resource Identifier OCID.
** 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
- Association
Type string - Association type to be created between source and destination resources.
- Compartment
Id string - Compartment Identifier OCID.
- Destination
Resource stringId - Destination Monitored Resource Identifier OCID.
- Source
Resource stringId Source Monitored Resource Identifier OCID.
** 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
- association
Type String - Association type to be created between source and destination resources.
- compartment
Id String - Compartment Identifier OCID.
- destination
Resource StringId - Destination Monitored Resource Identifier OCID.
- source
Resource StringId Source Monitored Resource Identifier OCID.
** 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
- association
Type string - Association type to be created between source and destination resources.
- compartment
Id string - Compartment Identifier OCID.
- destination
Resource stringId - Destination Monitored Resource Identifier OCID.
- source
Resource stringId Source Monitored Resource Identifier OCID.
** 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
- association_
type str - Association type to be created between source and destination resources.
- compartment_
id str - Compartment Identifier OCID.
- destination_
resource_ strid - Destination Monitored Resource Identifier OCID.
- source_
resource_ strid Source Monitored Resource Identifier OCID.
** 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
- association
Type String - Association type to be created between source and destination resources.
- compartment
Id String - Compartment Identifier OCID.
- destination
Resource StringId - Destination Monitored Resource Identifier OCID.
- source
Resource StringId Source Monitored Resource Identifier OCID.
** 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
Outputs
All input properties are implicitly available as output properties. Additionally, the MonitoredResourcesAssociateMonitoredResource resource produces the following output properties:
- Category string
- Association category. Possible values are:
- System created (SYSTEM),
- User created using API (USER_API)
- User created using tags (USER_TAG_ASSOC).
- Destination
Resource List<MonitoredDetails Resources Associate Monitored Resource Destination Resource Detail> - Association Resource Details.
- Id string
- The provider-assigned unique ID for this managed resource.
- Source
Resource List<MonitoredDetails Resources Associate Monitored Resource Source Resource Detail> - Association Resource Details.
- Tenant
Id string - Tenancy Identifier OCID.
- Time
Created string - The time when the association was created. An RFC3339 formatted datetime string.
- Category string
- Association category. Possible values are:
- System created (SYSTEM),
- User created using API (USER_API)
- User created using tags (USER_TAG_ASSOC).
- Destination
Resource []MonitoredDetails Resources Associate Monitored Resource Destination Resource Detail - Association Resource Details.
- Id string
- The provider-assigned unique ID for this managed resource.
- Source
Resource []MonitoredDetails Resources Associate Monitored Resource Source Resource Detail - Association Resource Details.
- Tenant
Id string - Tenancy Identifier OCID.
- Time
Created string - The time when the association was created. An RFC3339 formatted datetime string.
- category String
- Association category. Possible values are:
- System created (SYSTEM),
- User created using API (USER_API)
- User created using tags (USER_TAG_ASSOC).
- destination
Resource List<MonitoredDetails Resources Associate Monitored Resource Destination Resource Detail> - Association Resource Details.
- id String
- The provider-assigned unique ID for this managed resource.
- source
Resource List<MonitoredDetails Resources Associate Monitored Resource Source Resource Detail> - Association Resource Details.
- tenant
Id String - Tenancy Identifier OCID.
- time
Created String - The time when the association was created. An RFC3339 formatted datetime string.
- category string
- Association category. Possible values are:
- System created (SYSTEM),
- User created using API (USER_API)
- User created using tags (USER_TAG_ASSOC).
- destination
Resource MonitoredDetails Resources Associate Monitored Resource Destination Resource Detail[] - Association Resource Details.
- id string
- The provider-assigned unique ID for this managed resource.
- source
Resource MonitoredDetails Resources Associate Monitored Resource Source Resource Detail[] - Association Resource Details.
- tenant
Id string - Tenancy Identifier OCID.
- time
Created string - The time when the association was created. An RFC3339 formatted datetime string.
- category str
- Association category. Possible values are:
- System created (SYSTEM),
- User created using API (USER_API)
- User created using tags (USER_TAG_ASSOC).
- destination_
resource_ Sequence[stackmonitoring.details Monitored Resources Associate Monitored Resource Destination Resource Detail] - Association Resource Details.
- id str
- The provider-assigned unique ID for this managed resource.
- source_
resource_ Sequence[stackmonitoring.details Monitored Resources Associate Monitored Resource Source Resource Detail] - Association Resource Details.
- tenant_
id str - Tenancy Identifier OCID.
- time_
created str - The time when the association was created. An RFC3339 formatted datetime string.
- category String
- Association category. Possible values are:
- System created (SYSTEM),
- User created using API (USER_API)
- User created using tags (USER_TAG_ASSOC).
- destination
Resource List<Property Map>Details - Association Resource Details.
- id String
- The provider-assigned unique ID for this managed resource.
- source
Resource List<Property Map>Details - Association Resource Details.
- tenant
Id String - Tenancy Identifier OCID.
- time
Created String - The time when the association was created. An RFC3339 formatted datetime string.
Look up Existing MonitoredResourcesAssociateMonitoredResource Resource
Get an existing MonitoredResourcesAssociateMonitoredResource 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?: MonitoredResourcesAssociateMonitoredResourceState, opts?: CustomResourceOptions): MonitoredResourcesAssociateMonitoredResource
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
association_type: Optional[str] = None,
category: Optional[str] = None,
compartment_id: Optional[str] = None,
destination_resource_details: Optional[Sequence[_stackmonitoring.MonitoredResourcesAssociateMonitoredResourceDestinationResourceDetailArgs]] = None,
destination_resource_id: Optional[str] = None,
source_resource_details: Optional[Sequence[_stackmonitoring.MonitoredResourcesAssociateMonitoredResourceSourceResourceDetailArgs]] = None,
source_resource_id: Optional[str] = None,
tenant_id: Optional[str] = None,
time_created: Optional[str] = None) -> MonitoredResourcesAssociateMonitoredResource
func GetMonitoredResourcesAssociateMonitoredResource(ctx *Context, name string, id IDInput, state *MonitoredResourcesAssociateMonitoredResourceState, opts ...ResourceOption) (*MonitoredResourcesAssociateMonitoredResource, error)
public static MonitoredResourcesAssociateMonitoredResource Get(string name, Input<string> id, MonitoredResourcesAssociateMonitoredResourceState? state, CustomResourceOptions? opts = null)
public static MonitoredResourcesAssociateMonitoredResource get(String name, Output<String> id, MonitoredResourcesAssociateMonitoredResourceState 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.
- Association
Type string - Association type to be created between source and destination resources.
- Category string
- Association category. Possible values are:
- System created (SYSTEM),
- User created using API (USER_API)
- User created using tags (USER_TAG_ASSOC).
- Compartment
Id string - Compartment Identifier OCID.
- Destination
Resource List<MonitoredDetails Resources Associate Monitored Resource Destination Resource Detail> - Association Resource Details.
- Destination
Resource stringId - Destination Monitored Resource Identifier OCID.
- Source
Resource List<MonitoredDetails Resources Associate Monitored Resource Source Resource Detail> - Association Resource Details.
- Source
Resource stringId Source Monitored Resource Identifier OCID.
** 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
- Tenant
Id string - Tenancy Identifier OCID.
- Time
Created string - The time when the association was created. An RFC3339 formatted datetime string.
- Association
Type string - Association type to be created between source and destination resources.
- Category string
- Association category. Possible values are:
- System created (SYSTEM),
- User created using API (USER_API)
- User created using tags (USER_TAG_ASSOC).
- Compartment
Id string - Compartment Identifier OCID.
- Destination
Resource []MonitoredDetails Resources Associate Monitored Resource Destination Resource Detail Args - Association Resource Details.
- Destination
Resource stringId - Destination Monitored Resource Identifier OCID.
- Source
Resource []MonitoredDetails Resources Associate Monitored Resource Source Resource Detail Args - Association Resource Details.
- Source
Resource stringId Source Monitored Resource Identifier OCID.
** 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
- Tenant
Id string - Tenancy Identifier OCID.
- Time
Created string - The time when the association was created. An RFC3339 formatted datetime string.
- association
Type String - Association type to be created between source and destination resources.
- category String
- Association category. Possible values are:
- System created (SYSTEM),
- User created using API (USER_API)
- User created using tags (USER_TAG_ASSOC).
- compartment
Id String - Compartment Identifier OCID.
- destination
Resource List<MonitoredDetails Resources Associate Monitored Resource Destination Resource Detail> - Association Resource Details.
- destination
Resource StringId - Destination Monitored Resource Identifier OCID.
- source
Resource List<MonitoredDetails Resources Associate Monitored Resource Source Resource Detail> - Association Resource Details.
- source
Resource StringId Source Monitored Resource Identifier OCID.
** 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
- tenant
Id String - Tenancy Identifier OCID.
- time
Created String - The time when the association was created. An RFC3339 formatted datetime string.
- association
Type string - Association type to be created between source and destination resources.
- category string
- Association category. Possible values are:
- System created (SYSTEM),
- User created using API (USER_API)
- User created using tags (USER_TAG_ASSOC).
- compartment
Id string - Compartment Identifier OCID.
- destination
Resource MonitoredDetails Resources Associate Monitored Resource Destination Resource Detail[] - Association Resource Details.
- destination
Resource stringId - Destination Monitored Resource Identifier OCID.
- source
Resource MonitoredDetails Resources Associate Monitored Resource Source Resource Detail[] - Association Resource Details.
- source
Resource stringId Source Monitored Resource Identifier OCID.
** 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
- tenant
Id string - Tenancy Identifier OCID.
- time
Created string - The time when the association was created. An RFC3339 formatted datetime string.
- association_
type str - Association type to be created between source and destination resources.
- category str
- Association category. Possible values are:
- System created (SYSTEM),
- User created using API (USER_API)
- User created using tags (USER_TAG_ASSOC).
- compartment_
id str - Compartment Identifier OCID.
- destination_
resource_ Sequence[stackmonitoring.details Monitored Resources Associate Monitored Resource Destination Resource Detail Args] - Association Resource Details.
- destination_
resource_ strid - Destination Monitored Resource Identifier OCID.
- source_
resource_ Sequence[stackmonitoring.details Monitored Resources Associate Monitored Resource Source Resource Detail Args] - Association Resource Details.
- source_
resource_ strid Source Monitored Resource Identifier OCID.
** 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
- tenant_
id str - Tenancy Identifier OCID.
- time_
created str - The time when the association was created. An RFC3339 formatted datetime string.
- association
Type String - Association type to be created between source and destination resources.
- category String
- Association category. Possible values are:
- System created (SYSTEM),
- User created using API (USER_API)
- User created using tags (USER_TAG_ASSOC).
- compartment
Id String - Compartment Identifier OCID.
- destination
Resource List<Property Map>Details - Association Resource Details.
- destination
Resource StringId - Destination Monitored Resource Identifier OCID.
- source
Resource List<Property Map>Details - Association Resource Details.
- source
Resource StringId Source Monitored Resource Identifier OCID.
** 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
- tenant
Id String - Tenancy Identifier OCID.
- time
Created String - The time when the association was created. An RFC3339 formatted datetime string.
Supporting Types
MonitoredResourcesAssociateMonitoredResourceDestinationResourceDetail, MonitoredResourcesAssociateMonitoredResourceDestinationResourceDetailArgs
- Compartment
Id string - Compartment Identifier OCID.
- Name string
- Monitored Resource Name.
- Type string
- Monitored Resource Type.
- Compartment
Id string - Compartment Identifier OCID.
- Name string
- Monitored Resource Name.
- Type string
- Monitored Resource Type.
- compartment
Id String - Compartment Identifier OCID.
- name String
- Monitored Resource Name.
- type String
- Monitored Resource Type.
- compartment
Id string - Compartment Identifier OCID.
- name string
- Monitored Resource Name.
- type string
- Monitored Resource Type.
- compartment_
id str - Compartment Identifier OCID.
- name str
- Monitored Resource Name.
- type str
- Monitored Resource Type.
- compartment
Id String - Compartment Identifier OCID.
- name String
- Monitored Resource Name.
- type String
- Monitored Resource Type.
MonitoredResourcesAssociateMonitoredResourceSourceResourceDetail, MonitoredResourcesAssociateMonitoredResourceSourceResourceDetailArgs
- Compartment
Id string - Compartment Identifier OCID.
- Name string
- Monitored Resource Name.
- Type string
- Monitored Resource Type.
- Compartment
Id string - Compartment Identifier OCID.
- Name string
- Monitored Resource Name.
- Type string
- Monitored Resource Type.
- compartment
Id String - Compartment Identifier OCID.
- name String
- Monitored Resource Name.
- type String
- Monitored Resource Type.
- compartment
Id string - Compartment Identifier OCID.
- name string
- Monitored Resource Name.
- type string
- Monitored Resource Type.
- compartment_
id str - Compartment Identifier OCID.
- name str
- Monitored Resource Name.
- type str
- Monitored Resource Type.
- compartment
Id String - Compartment Identifier OCID.
- name String
- Monitored Resource Name.
- type String
- Monitored Resource Type.
Import
MonitoredResourcesAssociateMonitoredResources can be imported using the id
, e.g.
$ pulumi import oci:StackMonitoring/monitoredResourcesAssociateMonitoredResource:MonitoredResourcesAssociateMonitoredResource test_monitored_resources_associate_monitored_resource "id"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.