ibm.LogsEnrichment
Explore with Pulumi AI
Create, update, and delete logs_enrichments with this resource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";
const logsEnrichmentInstance = new ibm.LogsEnrichment("logsEnrichmentInstance", {
instanceId: ibm_resource_instance.logs_instance.guid,
region: ibm_resource_instance.logs_instance.location,
fieldName: "ip",
enrichmentType: {
geoIp: {},
},
});
import pulumi
import pulumi_ibm as ibm
logs_enrichment_instance = ibm.LogsEnrichment("logsEnrichmentInstance",
instance_id=ibm_resource_instance["logs_instance"]["guid"],
region=ibm_resource_instance["logs_instance"]["location"],
field_name="ip",
enrichment_type={
"geo_ip": {},
})
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.NewLogsEnrichment(ctx, "logsEnrichmentInstance", &ibm.LogsEnrichmentArgs{
InstanceId: pulumi.Any(ibm_resource_instance.Logs_instance.Guid),
Region: pulumi.Any(ibm_resource_instance.Logs_instance.Location),
FieldName: pulumi.String("ip"),
EnrichmentType: &ibm.LogsEnrichmentEnrichmentTypeArgs{
GeoIp: &ibm.LogsEnrichmentEnrichmentTypeGeoIpArgs{},
},
})
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 logsEnrichmentInstance = new Ibm.LogsEnrichment("logsEnrichmentInstance", new()
{
InstanceId = ibm_resource_instance.Logs_instance.Guid,
Region = ibm_resource_instance.Logs_instance.Location,
FieldName = "ip",
EnrichmentType = new Ibm.Inputs.LogsEnrichmentEnrichmentTypeArgs
{
GeoIp = null,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.LogsEnrichment;
import com.pulumi.ibm.LogsEnrichmentArgs;
import com.pulumi.ibm.inputs.LogsEnrichmentEnrichmentTypeArgs;
import com.pulumi.ibm.inputs.LogsEnrichmentEnrichmentTypeGeoIpArgs;
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 logsEnrichmentInstance = new LogsEnrichment("logsEnrichmentInstance", LogsEnrichmentArgs.builder()
.instanceId(ibm_resource_instance.logs_instance().guid())
.region(ibm_resource_instance.logs_instance().location())
.fieldName("ip")
.enrichmentType(LogsEnrichmentEnrichmentTypeArgs.builder()
.geoIp()
.build())
.build());
}
}
resources:
logsEnrichmentInstance:
type: ibm:LogsEnrichment
properties:
instanceId: ${ibm_resource_instance.logs_instance.guid}
region: ${ibm_resource_instance.logs_instance.location}
fieldName: ip
enrichmentType:
geoIp: {}
Create LogsEnrichment Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new LogsEnrichment(name: string, args: LogsEnrichmentArgs, opts?: CustomResourceOptions);
@overload
def LogsEnrichment(resource_name: str,
args: LogsEnrichmentArgs,
opts: Optional[ResourceOptions] = None)
@overload
def LogsEnrichment(resource_name: str,
opts: Optional[ResourceOptions] = None,
enrichment_type: Optional[LogsEnrichmentEnrichmentTypeArgs] = None,
field_name: Optional[str] = None,
instance_id: Optional[str] = None,
endpoint_type: Optional[str] = None,
logs_enrichment_id: Optional[str] = None,
region: Optional[str] = None)
func NewLogsEnrichment(ctx *Context, name string, args LogsEnrichmentArgs, opts ...ResourceOption) (*LogsEnrichment, error)
public LogsEnrichment(string name, LogsEnrichmentArgs args, CustomResourceOptions? opts = null)
public LogsEnrichment(String name, LogsEnrichmentArgs args)
public LogsEnrichment(String name, LogsEnrichmentArgs args, CustomResourceOptions options)
type: ibm:LogsEnrichment
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 LogsEnrichmentArgs
- 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 LogsEnrichmentArgs
- 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 LogsEnrichmentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args LogsEnrichmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args LogsEnrichmentArgs
- 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 logsEnrichmentResource = new Ibm.LogsEnrichment("logsEnrichmentResource", new()
{
EnrichmentType = new Ibm.Inputs.LogsEnrichmentEnrichmentTypeArgs
{
CustomEnrichment = new Ibm.Inputs.LogsEnrichmentEnrichmentTypeCustomEnrichmentArgs
{
Id = 0,
},
GeoIp = null,
SuspiciousIp = null,
},
FieldName = "string",
InstanceId = "string",
EndpointType = "string",
LogsEnrichmentId = "string",
Region = "string",
});
example, err := ibm.NewLogsEnrichment(ctx, "logsEnrichmentResource", &ibm.LogsEnrichmentArgs{
EnrichmentType: &ibm.LogsEnrichmentEnrichmentTypeArgs{
CustomEnrichment: &ibm.LogsEnrichmentEnrichmentTypeCustomEnrichmentArgs{
Id: pulumi.Float64(0),
},
GeoIp: &ibm.LogsEnrichmentEnrichmentTypeGeoIpArgs{},
SuspiciousIp: &ibm.LogsEnrichmentEnrichmentTypeSuspiciousIpArgs{},
},
FieldName: pulumi.String("string"),
InstanceId: pulumi.String("string"),
EndpointType: pulumi.String("string"),
LogsEnrichmentId: pulumi.String("string"),
Region: pulumi.String("string"),
})
var logsEnrichmentResource = new LogsEnrichment("logsEnrichmentResource", LogsEnrichmentArgs.builder()
.enrichmentType(LogsEnrichmentEnrichmentTypeArgs.builder()
.customEnrichment(LogsEnrichmentEnrichmentTypeCustomEnrichmentArgs.builder()
.id(0)
.build())
.geoIp()
.suspiciousIp()
.build())
.fieldName("string")
.instanceId("string")
.endpointType("string")
.logsEnrichmentId("string")
.region("string")
.build());
logs_enrichment_resource = ibm.LogsEnrichment("logsEnrichmentResource",
enrichment_type={
"custom_enrichment": {
"id": 0,
},
"geo_ip": {},
"suspicious_ip": {},
},
field_name="string",
instance_id="string",
endpoint_type="string",
logs_enrichment_id="string",
region="string")
const logsEnrichmentResource = new ibm.LogsEnrichment("logsEnrichmentResource", {
enrichmentType: {
customEnrichment: {
id: 0,
},
geoIp: {},
suspiciousIp: {},
},
fieldName: "string",
instanceId: "string",
endpointType: "string",
logsEnrichmentId: "string",
region: "string",
});
type: ibm:LogsEnrichment
properties:
endpointType: string
enrichmentType:
customEnrichment:
id: 0
geoIp: {}
suspiciousIp: {}
fieldName: string
instanceId: string
logsEnrichmentId: string
region: string
LogsEnrichment 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 LogsEnrichment resource accepts the following input properties:
- Enrichment
Type LogsEnrichment Enrichment Type - The enrichment type. Nested schema for enrichment_type:
- Field
Name string - The enrichment field name.
- Constraints: The maximum length is
4096
characters. The minimum length is1
character. The value must match regular expression^[\\p{L}\\p{N}\\p{P}\\p{Z}\\p{S}\\p{M}]+$
.
- Constraints: The maximum length is
- Instance
Id string - Cloud Logs Instance GUID.
- Endpoint
Type string - Cloud Logs Instance Endpoint type. Allowed values
public
andprivate
. - Logs
Enrichment stringId - The unique identifier of the logs_enrichment resource.
- Region string
- Cloud Logs Instance Region.
- Enrichment
Type LogsEnrichment Enrichment Type Args - The enrichment type. Nested schema for enrichment_type:
- Field
Name string - The enrichment field name.
- Constraints: The maximum length is
4096
characters. The minimum length is1
character. The value must match regular expression^[\\p{L}\\p{N}\\p{P}\\p{Z}\\p{S}\\p{M}]+$
.
- Constraints: The maximum length is
- Instance
Id string - Cloud Logs Instance GUID.
- Endpoint
Type string - Cloud Logs Instance Endpoint type. Allowed values
public
andprivate
. - Logs
Enrichment stringId - The unique identifier of the logs_enrichment resource.
- Region string
- Cloud Logs Instance Region.
- enrichment
Type LogsEnrichment Enrichment Type - The enrichment type. Nested schema for enrichment_type:
- field
Name String - The enrichment field name.
- Constraints: The maximum length is
4096
characters. The minimum length is1
character. The value must match regular expression^[\\p{L}\\p{N}\\p{P}\\p{Z}\\p{S}\\p{M}]+$
.
- Constraints: The maximum length is
- instance
Id String - Cloud Logs Instance GUID.
- endpoint
Type String - Cloud Logs Instance Endpoint type. Allowed values
public
andprivate
. - logs
Enrichment StringId - The unique identifier of the logs_enrichment resource.
- region String
- Cloud Logs Instance Region.
- enrichment
Type LogsEnrichment Enrichment Type - The enrichment type. Nested schema for enrichment_type:
- field
Name string - The enrichment field name.
- Constraints: The maximum length is
4096
characters. The minimum length is1
character. The value must match regular expression^[\\p{L}\\p{N}\\p{P}\\p{Z}\\p{S}\\p{M}]+$
.
- Constraints: The maximum length is
- instance
Id string - Cloud Logs Instance GUID.
- endpoint
Type string - Cloud Logs Instance Endpoint type. Allowed values
public
andprivate
. - logs
Enrichment stringId - The unique identifier of the logs_enrichment resource.
- region string
- Cloud Logs Instance Region.
- enrichment_
type LogsEnrichment Enrichment Type Args - The enrichment type. Nested schema for enrichment_type:
- field_
name str - The enrichment field name.
- Constraints: The maximum length is
4096
characters. The minimum length is1
character. The value must match regular expression^[\\p{L}\\p{N}\\p{P}\\p{Z}\\p{S}\\p{M}]+$
.
- Constraints: The maximum length is
- instance_
id str - Cloud Logs Instance GUID.
- endpoint_
type str - Cloud Logs Instance Endpoint type. Allowed values
public
andprivate
. - logs_
enrichment_ strid - The unique identifier of the logs_enrichment resource.
- region str
- Cloud Logs Instance Region.
- enrichment
Type Property Map - The enrichment type. Nested schema for enrichment_type:
- field
Name String - The enrichment field name.
- Constraints: The maximum length is
4096
characters. The minimum length is1
character. The value must match regular expression^[\\p{L}\\p{N}\\p{P}\\p{Z}\\p{S}\\p{M}]+$
.
- Constraints: The maximum length is
- instance
Id String - Cloud Logs Instance GUID.
- endpoint
Type String - Cloud Logs Instance Endpoint type. Allowed values
public
andprivate
. - logs
Enrichment StringId - The unique identifier of the logs_enrichment resource.
- region String
- Cloud Logs Instance Region.
Outputs
All input properties are implicitly available as output properties. Additionally, the LogsEnrichment resource produces the following output properties:
- Enrichment
Id string - The unique identifier of the logs_enrichment.
- Id string
- The provider-assigned unique ID for this managed resource.
- Enrichment
Id string - The unique identifier of the logs_enrichment.
- Id string
- The provider-assigned unique ID for this managed resource.
- enrichment
Id String - The unique identifier of the logs_enrichment.
- id String
- The provider-assigned unique ID for this managed resource.
- enrichment
Id string - The unique identifier of the logs_enrichment.
- id string
- The provider-assigned unique ID for this managed resource.
- enrichment_
id str - The unique identifier of the logs_enrichment.
- id str
- The provider-assigned unique ID for this managed resource.
- enrichment
Id String - The unique identifier of the logs_enrichment.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing LogsEnrichment Resource
Get an existing LogsEnrichment 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?: LogsEnrichmentState, opts?: CustomResourceOptions): LogsEnrichment
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
endpoint_type: Optional[str] = None,
enrichment_id: Optional[str] = None,
enrichment_type: Optional[LogsEnrichmentEnrichmentTypeArgs] = None,
field_name: Optional[str] = None,
instance_id: Optional[str] = None,
logs_enrichment_id: Optional[str] = None,
region: Optional[str] = None) -> LogsEnrichment
func GetLogsEnrichment(ctx *Context, name string, id IDInput, state *LogsEnrichmentState, opts ...ResourceOption) (*LogsEnrichment, error)
public static LogsEnrichment Get(string name, Input<string> id, LogsEnrichmentState? state, CustomResourceOptions? opts = null)
public static LogsEnrichment get(String name, Output<String> id, LogsEnrichmentState state, CustomResourceOptions options)
resources: _: type: ibm:LogsEnrichment 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.
- Endpoint
Type string - Cloud Logs Instance Endpoint type. Allowed values
public
andprivate
. - Enrichment
Id string - The unique identifier of the logs_enrichment.
- Enrichment
Type LogsEnrichment Enrichment Type - The enrichment type. Nested schema for enrichment_type:
- Field
Name string - The enrichment field name.
- Constraints: The maximum length is
4096
characters. The minimum length is1
character. The value must match regular expression^[\\p{L}\\p{N}\\p{P}\\p{Z}\\p{S}\\p{M}]+$
.
- Constraints: The maximum length is
- Instance
Id string - Cloud Logs Instance GUID.
- Logs
Enrichment stringId - The unique identifier of the logs_enrichment resource.
- Region string
- Cloud Logs Instance Region.
- Endpoint
Type string - Cloud Logs Instance Endpoint type. Allowed values
public
andprivate
. - Enrichment
Id string - The unique identifier of the logs_enrichment.
- Enrichment
Type LogsEnrichment Enrichment Type Args - The enrichment type. Nested schema for enrichment_type:
- Field
Name string - The enrichment field name.
- Constraints: The maximum length is
4096
characters. The minimum length is1
character. The value must match regular expression^[\\p{L}\\p{N}\\p{P}\\p{Z}\\p{S}\\p{M}]+$
.
- Constraints: The maximum length is
- Instance
Id string - Cloud Logs Instance GUID.
- Logs
Enrichment stringId - The unique identifier of the logs_enrichment resource.
- Region string
- Cloud Logs Instance Region.
- endpoint
Type String - Cloud Logs Instance Endpoint type. Allowed values
public
andprivate
. - enrichment
Id String - The unique identifier of the logs_enrichment.
- enrichment
Type LogsEnrichment Enrichment Type - The enrichment type. Nested schema for enrichment_type:
- field
Name String - The enrichment field name.
- Constraints: The maximum length is
4096
characters. The minimum length is1
character. The value must match regular expression^[\\p{L}\\p{N}\\p{P}\\p{Z}\\p{S}\\p{M}]+$
.
- Constraints: The maximum length is
- instance
Id String - Cloud Logs Instance GUID.
- logs
Enrichment StringId - The unique identifier of the logs_enrichment resource.
- region String
- Cloud Logs Instance Region.
- endpoint
Type string - Cloud Logs Instance Endpoint type. Allowed values
public
andprivate
. - enrichment
Id string - The unique identifier of the logs_enrichment.
- enrichment
Type LogsEnrichment Enrichment Type - The enrichment type. Nested schema for enrichment_type:
- field
Name string - The enrichment field name.
- Constraints: The maximum length is
4096
characters. The minimum length is1
character. The value must match regular expression^[\\p{L}\\p{N}\\p{P}\\p{Z}\\p{S}\\p{M}]+$
.
- Constraints: The maximum length is
- instance
Id string - Cloud Logs Instance GUID.
- logs
Enrichment stringId - The unique identifier of the logs_enrichment resource.
- region string
- Cloud Logs Instance Region.
- endpoint_
type str - Cloud Logs Instance Endpoint type. Allowed values
public
andprivate
. - enrichment_
id str - The unique identifier of the logs_enrichment.
- enrichment_
type LogsEnrichment Enrichment Type Args - The enrichment type. Nested schema for enrichment_type:
- field_
name str - The enrichment field name.
- Constraints: The maximum length is
4096
characters. The minimum length is1
character. The value must match regular expression^[\\p{L}\\p{N}\\p{P}\\p{Z}\\p{S}\\p{M}]+$
.
- Constraints: The maximum length is
- instance_
id str - Cloud Logs Instance GUID.
- logs_
enrichment_ strid - The unique identifier of the logs_enrichment resource.
- region str
- Cloud Logs Instance Region.
- endpoint
Type String - Cloud Logs Instance Endpoint type. Allowed values
public
andprivate
. - enrichment
Id String - The unique identifier of the logs_enrichment.
- enrichment
Type Property Map - The enrichment type. Nested schema for enrichment_type:
- field
Name String - The enrichment field name.
- Constraints: The maximum length is
4096
characters. The minimum length is1
character. The value must match regular expression^[\\p{L}\\p{N}\\p{P}\\p{Z}\\p{S}\\p{M}]+$
.
- Constraints: The maximum length is
- instance
Id String - Cloud Logs Instance GUID.
- logs
Enrichment StringId - The unique identifier of the logs_enrichment resource.
- region String
- Cloud Logs Instance Region.
Supporting Types
LogsEnrichmentEnrichmentType, LogsEnrichmentEnrichmentTypeArgs
- Custom
Enrichment LogsEnrichment Enrichment Type Custom Enrichment - The custom enrichment. Nested schema for custom_enrichment:
- Geo
Ip LogsEnrichment Enrichment Type Geo Ip - The geo ip enrichment. Nested schema for geo_ip:
- Suspicious
Ip LogsEnrichment Enrichment Type Suspicious Ip - The suspicious ip enrichment. Nested schema for suspicious_ip:
- Custom
Enrichment LogsEnrichment Enrichment Type Custom Enrichment - The custom enrichment. Nested schema for custom_enrichment:
- Geo
Ip LogsEnrichment Enrichment Type Geo Ip - The geo ip enrichment. Nested schema for geo_ip:
- Suspicious
Ip LogsEnrichment Enrichment Type Suspicious Ip - The suspicious ip enrichment. Nested schema for suspicious_ip:
- custom
Enrichment LogsEnrichment Enrichment Type Custom Enrichment - The custom enrichment. Nested schema for custom_enrichment:
- geo
Ip LogsEnrichment Enrichment Type Geo Ip - The geo ip enrichment. Nested schema for geo_ip:
- suspicious
Ip LogsEnrichment Enrichment Type Suspicious Ip - The suspicious ip enrichment. Nested schema for suspicious_ip:
- custom
Enrichment LogsEnrichment Enrichment Type Custom Enrichment - The custom enrichment. Nested schema for custom_enrichment:
- geo
Ip LogsEnrichment Enrichment Type Geo Ip - The geo ip enrichment. Nested schema for geo_ip:
- suspicious
Ip LogsEnrichment Enrichment Type Suspicious Ip - The suspicious ip enrichment. Nested schema for suspicious_ip:
- custom_
enrichment LogsEnrichment Enrichment Type Custom Enrichment - The custom enrichment. Nested schema for custom_enrichment:
- geo_
ip LogsEnrichment Enrichment Type Geo Ip - The geo ip enrichment. Nested schema for geo_ip:
- suspicious_
ip LogsEnrichment Enrichment Type Suspicious Ip - The suspicious ip enrichment. Nested schema for suspicious_ip:
- custom
Enrichment Property Map - The custom enrichment. Nested schema for custom_enrichment:
- geo
Ip Property Map - The geo ip enrichment. Nested schema for geo_ip:
- suspicious
Ip Property Map - The suspicious ip enrichment. Nested schema for suspicious_ip:
LogsEnrichmentEnrichmentTypeCustomEnrichment, LogsEnrichmentEnrichmentTypeCustomEnrichmentArgs
- Id double
- The ID of the custom enrichment.
- Constraints: The maximum value is
4294967295
. The minimum value is0
.
- Constraints: The maximum value is
- Id float64
- The ID of the custom enrichment.
- Constraints: The maximum value is
4294967295
. The minimum value is0
.
- Constraints: The maximum value is
- id Double
- The ID of the custom enrichment.
- Constraints: The maximum value is
4294967295
. The minimum value is0
.
- Constraints: The maximum value is
- id number
- The ID of the custom enrichment.
- Constraints: The maximum value is
4294967295
. The minimum value is0
.
- Constraints: The maximum value is
- id float
- The ID of the custom enrichment.
- Constraints: The maximum value is
4294967295
. The minimum value is0
.
- Constraints: The maximum value is
- id Number
- The ID of the custom enrichment.
- Constraints: The maximum value is
4294967295
. The minimum value is0
.
- Constraints: The maximum value is
Import
You can import the ibm_logs_enrichment
resource by using id
. You can import the ibm_logs_e2m
resource by using id
. id
combination of region
, instance_id
and enrichment_id
.
Syntax
```sh $ pulumi import ibm:index/logsEnrichment:LogsEnrichment logs_enrichment < region >/< instance_id >/< enrichment_id > ```
Example
$ pulumi import ibm:index/logsEnrichment:LogsEnrichment logs_enrichment eu-gb/3dc02998-0b50-4ea8-b68a-4779d716fa1f/1
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.