1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. StackMonitoring
  5. MetricExtensionMetricExtensionOnGivenResourcesManagement
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

oci.StackMonitoring.MetricExtensionMetricExtensionOnGivenResourcesManagement

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

    This resource provides the Metric Extension Metric Extension On Given Resources Management resource in Oracle Cloud Infrastructure Stack Monitoring service.

    Submits a request to enable matching metric extension Id for the given Resource IDs

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testMetricExtensionMetricExtensionOnGivenResourcesManagement = new oci.stackmonitoring.MetricExtensionMetricExtensionOnGivenResourcesManagement("test_metric_extension_metric_extension_on_given_resources_management", {
        metricExtensionId: testMetricExtension.id,
        resourceIds: metricExtensionMetricExtensionOnGivenResourcesManagementResourceIds[0],
        enableMetricExtensionOnGivenResources: enableMetricExtensionOnGivenResources,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_metric_extension_metric_extension_on_given_resources_management = oci.stack_monitoring.MetricExtensionMetricExtensionOnGivenResourcesManagement("test_metric_extension_metric_extension_on_given_resources_management",
        metric_extension_id=test_metric_extension["id"],
        resource_ids=metric_extension_metric_extension_on_given_resources_management_resource_ids[0],
        enable_metric_extension_on_given_resources=enable_metric_extension_on_given_resources)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/StackMonitoring"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := StackMonitoring.NewMetricExtensionMetricExtensionOnGivenResourcesManagement(ctx, "test_metric_extension_metric_extension_on_given_resources_management", &StackMonitoring.MetricExtensionMetricExtensionOnGivenResourcesManagementArgs{
    			MetricExtensionId:                     pulumi.Any(testMetricExtension.Id),
    			ResourceIds:                           pulumi.Any(metricExtensionMetricExtensionOnGivenResourcesManagementResourceIds[0]),
    			EnableMetricExtensionOnGivenResources: pulumi.Any(enableMetricExtensionOnGivenResources),
    		})
    		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 testMetricExtensionMetricExtensionOnGivenResourcesManagement = new Oci.StackMonitoring.MetricExtensionMetricExtensionOnGivenResourcesManagement("test_metric_extension_metric_extension_on_given_resources_management", new()
        {
            MetricExtensionId = testMetricExtension.Id,
            ResourceIds = metricExtensionMetricExtensionOnGivenResourcesManagementResourceIds[0],
            EnableMetricExtensionOnGivenResources = enableMetricExtensionOnGivenResources,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.StackMonitoring.MetricExtensionMetricExtensionOnGivenResourcesManagement;
    import com.pulumi.oci.StackMonitoring.MetricExtensionMetricExtensionOnGivenResourcesManagementArgs;
    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 testMetricExtensionMetricExtensionOnGivenResourcesManagement = new MetricExtensionMetricExtensionOnGivenResourcesManagement("testMetricExtensionMetricExtensionOnGivenResourcesManagement", MetricExtensionMetricExtensionOnGivenResourcesManagementArgs.builder()
                .metricExtensionId(testMetricExtension.id())
                .resourceIds(metricExtensionMetricExtensionOnGivenResourcesManagementResourceIds[0])
                .enableMetricExtensionOnGivenResources(enableMetricExtensionOnGivenResources)
                .build());
    
        }
    }
    
    resources:
      testMetricExtensionMetricExtensionOnGivenResourcesManagement:
        type: oci:StackMonitoring:MetricExtensionMetricExtensionOnGivenResourcesManagement
        name: test_metric_extension_metric_extension_on_given_resources_management
        properties:
          metricExtensionId: ${testMetricExtension.id}
          resourceIds: ${metricExtensionMetricExtensionOnGivenResourcesManagementResourceIds[0]}
          enableMetricExtensionOnGivenResources: ${enableMetricExtensionOnGivenResources}
    

    Create MetricExtensionMetricExtensionOnGivenResourcesManagement Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new MetricExtensionMetricExtensionOnGivenResourcesManagement(name: string, args: MetricExtensionMetricExtensionOnGivenResourcesManagementArgs, opts?: CustomResourceOptions);
    @overload
    def MetricExtensionMetricExtensionOnGivenResourcesManagement(resource_name: str,
                                                                 args: MetricExtensionMetricExtensionOnGivenResourcesManagementArgs,
                                                                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def MetricExtensionMetricExtensionOnGivenResourcesManagement(resource_name: str,
                                                                 opts: Optional[ResourceOptions] = None,
                                                                 enable_metric_extension_on_given_resources: Optional[bool] = None,
                                                                 metric_extension_id: Optional[str] = None,
                                                                 resource_ids: Optional[str] = None)
    func NewMetricExtensionMetricExtensionOnGivenResourcesManagement(ctx *Context, name string, args MetricExtensionMetricExtensionOnGivenResourcesManagementArgs, opts ...ResourceOption) (*MetricExtensionMetricExtensionOnGivenResourcesManagement, error)
    public MetricExtensionMetricExtensionOnGivenResourcesManagement(string name, MetricExtensionMetricExtensionOnGivenResourcesManagementArgs args, CustomResourceOptions? opts = null)
    public MetricExtensionMetricExtensionOnGivenResourcesManagement(String name, MetricExtensionMetricExtensionOnGivenResourcesManagementArgs args)
    public MetricExtensionMetricExtensionOnGivenResourcesManagement(String name, MetricExtensionMetricExtensionOnGivenResourcesManagementArgs args, CustomResourceOptions options)
    
    type: oci:StackMonitoring:MetricExtensionMetricExtensionOnGivenResourcesManagement
    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 MetricExtensionMetricExtensionOnGivenResourcesManagementArgs
    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 MetricExtensionMetricExtensionOnGivenResourcesManagementArgs
    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 MetricExtensionMetricExtensionOnGivenResourcesManagementArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MetricExtensionMetricExtensionOnGivenResourcesManagementArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MetricExtensionMetricExtensionOnGivenResourcesManagementArgs
    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 metricExtensionMetricExtensionOnGivenResourcesManagementResource = new Oci.StackMonitoring.MetricExtensionMetricExtensionOnGivenResourcesManagement("metricExtensionMetricExtensionOnGivenResourcesManagementResource", new()
    {
        EnableMetricExtensionOnGivenResources = false,
        MetricExtensionId = "string",
        ResourceIds = "string",
    });
    
    example, err := StackMonitoring.NewMetricExtensionMetricExtensionOnGivenResourcesManagement(ctx, "metricExtensionMetricExtensionOnGivenResourcesManagementResource", &StackMonitoring.MetricExtensionMetricExtensionOnGivenResourcesManagementArgs{
    	EnableMetricExtensionOnGivenResources: pulumi.Bool(false),
    	MetricExtensionId:                     pulumi.String("string"),
    	ResourceIds:                           pulumi.String("string"),
    })
    
    var metricExtensionMetricExtensionOnGivenResourcesManagementResource = new MetricExtensionMetricExtensionOnGivenResourcesManagement("metricExtensionMetricExtensionOnGivenResourcesManagementResource", MetricExtensionMetricExtensionOnGivenResourcesManagementArgs.builder()
        .enableMetricExtensionOnGivenResources(false)
        .metricExtensionId("string")
        .resourceIds("string")
        .build());
    
    metric_extension_metric_extension_on_given_resources_management_resource = oci.stack_monitoring.MetricExtensionMetricExtensionOnGivenResourcesManagement("metricExtensionMetricExtensionOnGivenResourcesManagementResource",
        enable_metric_extension_on_given_resources=False,
        metric_extension_id="string",
        resource_ids="string")
    
    const metricExtensionMetricExtensionOnGivenResourcesManagementResource = new oci.stackmonitoring.MetricExtensionMetricExtensionOnGivenResourcesManagement("metricExtensionMetricExtensionOnGivenResourcesManagementResource", {
        enableMetricExtensionOnGivenResources: false,
        metricExtensionId: "string",
        resourceIds: "string",
    });
    
    type: oci:StackMonitoring:MetricExtensionMetricExtensionOnGivenResourcesManagement
    properties:
        enableMetricExtensionOnGivenResources: false
        metricExtensionId: string
        resourceIds: string
    

    MetricExtensionMetricExtensionOnGivenResourcesManagement 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 MetricExtensionMetricExtensionOnGivenResourcesManagement resource accepts the following input properties:

    EnableMetricExtensionOnGivenResources bool

    (Updatable) A required field when set to true calls enable action and when set to false calls disable action.

    ** 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

    MetricExtensionId string
    The OCID of the metric extension resource.
    ResourceIds string
    List of Resource IDs [OCIDs]. Currently, supports only one resource id per request.
    EnableMetricExtensionOnGivenResources bool

    (Updatable) A required field when set to true calls enable action and when set to false calls disable action.

    ** 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

    MetricExtensionId string
    The OCID of the metric extension resource.
    ResourceIds string
    List of Resource IDs [OCIDs]. Currently, supports only one resource id per request.
    enableMetricExtensionOnGivenResources Boolean

    (Updatable) A required field when set to true calls enable action and when set to false calls disable action.

    ** 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

    metricExtensionId String
    The OCID of the metric extension resource.
    resourceIds String
    List of Resource IDs [OCIDs]. Currently, supports only one resource id per request.
    enableMetricExtensionOnGivenResources boolean

    (Updatable) A required field when set to true calls enable action and when set to false calls disable action.

    ** 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

    metricExtensionId string
    The OCID of the metric extension resource.
    resourceIds string
    List of Resource IDs [OCIDs]. Currently, supports only one resource id per request.
    enable_metric_extension_on_given_resources bool

    (Updatable) A required field when set to true calls enable action and when set to false calls disable action.

    ** 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

    metric_extension_id str
    The OCID of the metric extension resource.
    resource_ids str
    List of Resource IDs [OCIDs]. Currently, supports only one resource id per request.
    enableMetricExtensionOnGivenResources Boolean

    (Updatable) A required field when set to true calls enable action and when set to false calls disable action.

    ** 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

    metricExtensionId String
    The OCID of the metric extension resource.
    resourceIds String
    List of Resource IDs [OCIDs]. Currently, supports only one resource id per request.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the MetricExtensionMetricExtensionOnGivenResourcesManagement resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing MetricExtensionMetricExtensionOnGivenResourcesManagement Resource

    Get an existing MetricExtensionMetricExtensionOnGivenResourcesManagement 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?: MetricExtensionMetricExtensionOnGivenResourcesManagementState, opts?: CustomResourceOptions): MetricExtensionMetricExtensionOnGivenResourcesManagement
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            enable_metric_extension_on_given_resources: Optional[bool] = None,
            metric_extension_id: Optional[str] = None,
            resource_ids: Optional[str] = None) -> MetricExtensionMetricExtensionOnGivenResourcesManagement
    func GetMetricExtensionMetricExtensionOnGivenResourcesManagement(ctx *Context, name string, id IDInput, state *MetricExtensionMetricExtensionOnGivenResourcesManagementState, opts ...ResourceOption) (*MetricExtensionMetricExtensionOnGivenResourcesManagement, error)
    public static MetricExtensionMetricExtensionOnGivenResourcesManagement Get(string name, Input<string> id, MetricExtensionMetricExtensionOnGivenResourcesManagementState? state, CustomResourceOptions? opts = null)
    public static MetricExtensionMetricExtensionOnGivenResourcesManagement get(String name, Output<String> id, MetricExtensionMetricExtensionOnGivenResourcesManagementState 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.
    The following state arguments are supported:
    EnableMetricExtensionOnGivenResources bool

    (Updatable) A required field when set to true calls enable action and when set to false calls disable action.

    ** 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

    MetricExtensionId string
    The OCID of the metric extension resource.
    ResourceIds string
    List of Resource IDs [OCIDs]. Currently, supports only one resource id per request.
    EnableMetricExtensionOnGivenResources bool

    (Updatable) A required field when set to true calls enable action and when set to false calls disable action.

    ** 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

    MetricExtensionId string
    The OCID of the metric extension resource.
    ResourceIds string
    List of Resource IDs [OCIDs]. Currently, supports only one resource id per request.
    enableMetricExtensionOnGivenResources Boolean

    (Updatable) A required field when set to true calls enable action and when set to false calls disable action.

    ** 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

    metricExtensionId String
    The OCID of the metric extension resource.
    resourceIds String
    List of Resource IDs [OCIDs]. Currently, supports only one resource id per request.
    enableMetricExtensionOnGivenResources boolean

    (Updatable) A required field when set to true calls enable action and when set to false calls disable action.

    ** 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

    metricExtensionId string
    The OCID of the metric extension resource.
    resourceIds string
    List of Resource IDs [OCIDs]. Currently, supports only one resource id per request.
    enable_metric_extension_on_given_resources bool

    (Updatable) A required field when set to true calls enable action and when set to false calls disable action.

    ** 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

    metric_extension_id str
    The OCID of the metric extension resource.
    resource_ids str
    List of Resource IDs [OCIDs]. Currently, supports only one resource id per request.
    enableMetricExtensionOnGivenResources Boolean

    (Updatable) A required field when set to true calls enable action and when set to false calls disable action.

    ** 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

    metricExtensionId String
    The OCID of the metric extension resource.
    resourceIds String
    List of Resource IDs [OCIDs]. Currently, supports only one resource id per request.

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi