Class ProjectExclusion
Manages a project-level logging exclusion. For more information see the official documentation and Excluding Logs.
Note that you must have the "Logs Configuration Writer" IAM role (roles/logging.configWriter)
granted to the credentials used with this provider.
Example Usage
using Pulumi;
using Gcp = Pulumi.Gcp;
class MyStack : Stack
{
public MyStack()
{
var my_exclusion = new Gcp.Logging.ProjectExclusion("my-exclusion", new Gcp.Logging.ProjectExclusionArgs
{
Description = "Exclude GCE instance debug logs",
Filter = "resource.type = gce_instance AND severity <= DEBUG",
});
}
}
Inherited Members
Namespace: Pulumi.Gcp.Logging
Assembly: Pulumi.Gcp.dll
Syntax
public class ProjectExclusion : CustomResource
Constructors
View SourceProjectExclusion(String, ProjectExclusionArgs, CustomResourceOptions)
Create a ProjectExclusion resource with the given unique name, arguments, and options.
Declaration
public ProjectExclusion(string name, ProjectExclusionArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| ProjectExclusionArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceDescription
A human-readable description.
Declaration
public Output<string> Description { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Disabled
Whether this exclusion rule should be disabled or not. This defaults to false.
Declaration
public Output<bool?> Disabled { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
Filter
The filter to apply when excluding logs. Only log entries that match the filter are excluded. See Advanced Log Filters for information on how to write a filter.
Declaration
public Output<string> Filter { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Name
The name of the logging exclusion.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Project
The project to create the exclusion in. If omitted, the project associated with the provider is used.
Declaration
public Output<string> Project { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, ProjectExclusionState, CustomResourceOptions)
Get an existing ProjectExclusion resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static ProjectExclusion Get(string name, Input<string> id, ProjectExclusionState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| ProjectExclusionState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| ProjectExclusion |