ibm.LogsDataUsageMetrics
Explore with Pulumi AI
Create, update, and delete logs_data_usage_metricss with this resource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";
const logsDataUsageMetricsInstance = new ibm.LogsDataUsageMetrics("logsDataUsageMetricsInstance", {
instanceId: ibm_resource_instance.logs_instance.guid,
region: ibm_resource_instance.logs_instance.location,
enabled: true,
});
import pulumi
import pulumi_ibm as ibm
logs_data_usage_metrics_instance = ibm.LogsDataUsageMetrics("logsDataUsageMetricsInstance",
instance_id=ibm_resource_instance["logs_instance"]["guid"],
region=ibm_resource_instance["logs_instance"]["location"],
enabled=True)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ibm.NewLogsDataUsageMetrics(ctx, "logsDataUsageMetricsInstance", &ibm.LogsDataUsageMetricsArgs{
InstanceId: pulumi.Any(ibm_resource_instance.Logs_instance.Guid),
Region: pulumi.Any(ibm_resource_instance.Logs_instance.Location),
Enabled: pulumi.Bool(true),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ibm = Pulumi.Ibm;
return await Deployment.RunAsync(() =>
{
var logsDataUsageMetricsInstance = new Ibm.LogsDataUsageMetrics("logsDataUsageMetricsInstance", new()
{
InstanceId = ibm_resource_instance.Logs_instance.Guid,
Region = ibm_resource_instance.Logs_instance.Location,
Enabled = true,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.LogsDataUsageMetrics;
import com.pulumi.ibm.LogsDataUsageMetricsArgs;
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 logsDataUsageMetricsInstance = new LogsDataUsageMetrics("logsDataUsageMetricsInstance", LogsDataUsageMetricsArgs.builder()
.instanceId(ibm_resource_instance.logs_instance().guid())
.region(ibm_resource_instance.logs_instance().location())
.enabled(true)
.build());
}
}
resources:
logsDataUsageMetricsInstance:
type: ibm:LogsDataUsageMetrics
properties:
instanceId: ${ibm_resource_instance.logs_instance.guid}
region: ${ibm_resource_instance.logs_instance.location}
enabled: true
Create LogsDataUsageMetrics Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new LogsDataUsageMetrics(name: string, args: LogsDataUsageMetricsArgs, opts?: CustomResourceOptions);
@overload
def LogsDataUsageMetrics(resource_name: str,
args: LogsDataUsageMetricsArgs,
opts: Optional[ResourceOptions] = None)
@overload
def LogsDataUsageMetrics(resource_name: str,
opts: Optional[ResourceOptions] = None,
enabled: Optional[bool] = None,
instance_id: Optional[str] = None,
endpoint_type: Optional[str] = None,
logs_data_usage_metrics_id: Optional[str] = None,
region: Optional[str] = None)
func NewLogsDataUsageMetrics(ctx *Context, name string, args LogsDataUsageMetricsArgs, opts ...ResourceOption) (*LogsDataUsageMetrics, error)
public LogsDataUsageMetrics(string name, LogsDataUsageMetricsArgs args, CustomResourceOptions? opts = null)
public LogsDataUsageMetrics(String name, LogsDataUsageMetricsArgs args)
public LogsDataUsageMetrics(String name, LogsDataUsageMetricsArgs args, CustomResourceOptions options)
type: ibm:LogsDataUsageMetrics
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 LogsDataUsageMetricsArgs
- 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 LogsDataUsageMetricsArgs
- 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 LogsDataUsageMetricsArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args LogsDataUsageMetricsArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args LogsDataUsageMetricsArgs
- 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 logsDataUsageMetricsResource = new Ibm.LogsDataUsageMetrics("logsDataUsageMetricsResource", new()
{
Enabled = false,
InstanceId = "string",
EndpointType = "string",
LogsDataUsageMetricsId = "string",
Region = "string",
});
example, err := ibm.NewLogsDataUsageMetrics(ctx, "logsDataUsageMetricsResource", &ibm.LogsDataUsageMetricsArgs{
Enabled: pulumi.Bool(false),
InstanceId: pulumi.String("string"),
EndpointType: pulumi.String("string"),
LogsDataUsageMetricsId: pulumi.String("string"),
Region: pulumi.String("string"),
})
var logsDataUsageMetricsResource = new LogsDataUsageMetrics("logsDataUsageMetricsResource", LogsDataUsageMetricsArgs.builder()
.enabled(false)
.instanceId("string")
.endpointType("string")
.logsDataUsageMetricsId("string")
.region("string")
.build());
logs_data_usage_metrics_resource = ibm.LogsDataUsageMetrics("logsDataUsageMetricsResource",
enabled=False,
instance_id="string",
endpoint_type="string",
logs_data_usage_metrics_id="string",
region="string")
const logsDataUsageMetricsResource = new ibm.LogsDataUsageMetrics("logsDataUsageMetricsResource", {
enabled: false,
instanceId: "string",
endpointType: "string",
logsDataUsageMetricsId: "string",
region: "string",
});
type: ibm:LogsDataUsageMetrics
properties:
enabled: false
endpointType: string
instanceId: string
logsDataUsageMetricsId: string
region: string
LogsDataUsageMetrics 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 LogsDataUsageMetrics resource accepts the following input properties:
- Enabled bool
- The "enabled" parameter for metrics export.
- Instance
Id string - Cloud Logs Instance GUID.
- Endpoint
Type string - Cloud Logs Instance Endpoint type. Allowed values
public
andprivate
. - Logs
Data stringUsage Metrics Id - The unique identifier of the logs_data_usage_metrics resource.
- Region string
- Cloud Logs Instance Region.
- Enabled bool
- The "enabled" parameter for metrics export.
- Instance
Id string - Cloud Logs Instance GUID.
- Endpoint
Type string - Cloud Logs Instance Endpoint type. Allowed values
public
andprivate
. - Logs
Data stringUsage Metrics Id - The unique identifier of the logs_data_usage_metrics resource.
- Region string
- Cloud Logs Instance Region.
- enabled Boolean
- The "enabled" parameter for metrics export.
- instance
Id String - Cloud Logs Instance GUID.
- endpoint
Type String - Cloud Logs Instance Endpoint type. Allowed values
public
andprivate
. - logs
Data StringUsage Metrics Id - The unique identifier of the logs_data_usage_metrics resource.
- region String
- Cloud Logs Instance Region.
- enabled boolean
- The "enabled" parameter for metrics export.
- instance
Id string - Cloud Logs Instance GUID.
- endpoint
Type string - Cloud Logs Instance Endpoint type. Allowed values
public
andprivate
. - logs
Data stringUsage Metrics Id - The unique identifier of the logs_data_usage_metrics resource.
- region string
- Cloud Logs Instance Region.
- enabled bool
- The "enabled" parameter for metrics export.
- instance_
id str - Cloud Logs Instance GUID.
- endpoint_
type str - Cloud Logs Instance Endpoint type. Allowed values
public
andprivate
. - logs_
data_ strusage_ metrics_ id - The unique identifier of the logs_data_usage_metrics resource.
- region str
- Cloud Logs Instance Region.
- enabled Boolean
- The "enabled" parameter for metrics export.
- instance
Id String - Cloud Logs Instance GUID.
- endpoint
Type String - Cloud Logs Instance Endpoint type. Allowed values
public
andprivate
. - logs
Data StringUsage Metrics Id - The unique identifier of the logs_data_usage_metrics resource.
- region String
- Cloud Logs Instance Region.
Outputs
All input properties are implicitly available as output properties. Additionally, the LogsDataUsageMetrics 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 LogsDataUsageMetrics Resource
Get an existing LogsDataUsageMetrics 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?: LogsDataUsageMetricsState, opts?: CustomResourceOptions): LogsDataUsageMetrics
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
enabled: Optional[bool] = None,
endpoint_type: Optional[str] = None,
instance_id: Optional[str] = None,
logs_data_usage_metrics_id: Optional[str] = None,
region: Optional[str] = None) -> LogsDataUsageMetrics
func GetLogsDataUsageMetrics(ctx *Context, name string, id IDInput, state *LogsDataUsageMetricsState, opts ...ResourceOption) (*LogsDataUsageMetrics, error)
public static LogsDataUsageMetrics Get(string name, Input<string> id, LogsDataUsageMetricsState? state, CustomResourceOptions? opts = null)
public static LogsDataUsageMetrics get(String name, Output<String> id, LogsDataUsageMetricsState state, CustomResourceOptions options)
resources: _: type: ibm:LogsDataUsageMetrics get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Enabled bool
- The "enabled" parameter for metrics export.
- Endpoint
Type string - Cloud Logs Instance Endpoint type. Allowed values
public
andprivate
. - Instance
Id string - Cloud Logs Instance GUID.
- Logs
Data stringUsage Metrics Id - The unique identifier of the logs_data_usage_metrics resource.
- Region string
- Cloud Logs Instance Region.
- Enabled bool
- The "enabled" parameter for metrics export.
- Endpoint
Type string - Cloud Logs Instance Endpoint type. Allowed values
public
andprivate
. - Instance
Id string - Cloud Logs Instance GUID.
- Logs
Data stringUsage Metrics Id - The unique identifier of the logs_data_usage_metrics resource.
- Region string
- Cloud Logs Instance Region.
- enabled Boolean
- The "enabled" parameter for metrics export.
- endpoint
Type String - Cloud Logs Instance Endpoint type. Allowed values
public
andprivate
. - instance
Id String - Cloud Logs Instance GUID.
- logs
Data StringUsage Metrics Id - The unique identifier of the logs_data_usage_metrics resource.
- region String
- Cloud Logs Instance Region.
- enabled boolean
- The "enabled" parameter for metrics export.
- endpoint
Type string - Cloud Logs Instance Endpoint type. Allowed values
public
andprivate
. - instance
Id string - Cloud Logs Instance GUID.
- logs
Data stringUsage Metrics Id - The unique identifier of the logs_data_usage_metrics resource.
- region string
- Cloud Logs Instance Region.
- enabled bool
- The "enabled" parameter for metrics export.
- endpoint_
type str - Cloud Logs Instance Endpoint type. Allowed values
public
andprivate
. - instance_
id str - Cloud Logs Instance GUID.
- logs_
data_ strusage_ metrics_ id - The unique identifier of the logs_data_usage_metrics resource.
- region str
- Cloud Logs Instance Region.
- enabled Boolean
- The "enabled" parameter for metrics export.
- endpoint
Type String - Cloud Logs Instance Endpoint type. Allowed values
public
andprivate
. - instance
Id String - Cloud Logs Instance GUID.
- logs
Data StringUsage Metrics Id - The unique identifier of the logs_data_usage_metrics resource.
- region String
- Cloud Logs Instance Region.
Import
You can import the ibm_logs_data_usage_metrics
resource by using id
. Data Usage ID. id
combination of region
and instance_id
Syntax
```sh $ pulumi import ibm:index/logsDataUsageMetrics:LogsDataUsageMetrics logs_data_usage_metrics < region >/< instance_id >; ```
Example
$ pulumi import ibm:index/logsDataUsageMetrics:LogsDataUsageMetrics logs_data_usage_metrics eu-gb/3dc02998-0b50-4ea8-b68a-4779d716fa1f
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- ibm ibm-cloud/terraform-provider-ibm
- License
- Notes
- This Pulumi package is based on the
ibm
Terraform Provider.