ReferenceList class

Reference lists are user-defined lists of values which users can use in multiple Rules.

To get more information about ReferenceList, see:

Example Usage

Chronicle Referencelist Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const testScope = new gcp.chronicle.DataAccessScope("test_scope", {
    location: "us",
    instance: "00000000-0000-0000-0000-000000000000",
    dataAccessScopeId: "scope-id",
    description: "test scope description",
    allowedDataAccessLabels: [{
        logType: "GCP_CLOUDAUDIT",
    }],
});
const example = new gcp.chronicle.ReferenceList("example", {
    location: "us",
    instance: "00000000-0000-0000-0000-000000000000",
    referenceListId: "reference_list_id",
    description: "referencelist-description",
    entries: [{
        value: "referencelist-entry-value",
    }],
    syntaxType: "REFERENCE_LIST_SYNTAX_TYPE_PLAIN_TEXT_STRING",
    scopeInfos: [{
        referenceListScope: {
            scopeNames: [testScope.name],
        },
    }],
});
import pulumi
import pulumi_gcp as gcp

test_scope = gcp.chronicle.DataAccessScope("test_scope",
    location="us",
    instance="00000000-0000-0000-0000-000000000000",
    data_access_scope_id="scope-id",
    description="test scope description",
    allowed_data_access_labels=[{
        "log_type": "GCP_CLOUDAUDIT",
    }])
example = gcp.chronicle.ReferenceList("example",
    location="us",
    instance="00000000-0000-0000-0000-000000000000",
    reference_list_id="reference_list_id",
    description="referencelist-description",
    entries=[{
        "value": "referencelist-entry-value",
    }],
    syntax_type="REFERENCE_LIST_SYNTAX_TYPE_PLAIN_TEXT_STRING",
    scope_infos=[{
        "reference_list_scope": {
            "scope_names": [test_scope.name],
        },
    }])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() =>
{
    var testScope = new Gcp.Chronicle.DataAccessScope("test_scope", new()
    {
        Location = "us",
        Instance = "00000000-0000-0000-0000-000000000000",
        DataAccessScopeId = "scope-id",
        Description = "test scope description",
        AllowedDataAccessLabels = new[]
        {
            new Gcp.Chronicle.Inputs.DataAccessScopeAllowedDataAccessLabelArgs
            {
                LogType = "GCP_CLOUDAUDIT",
            },
        },
    });

    var example = new Gcp.Chronicle.ReferenceList("example", new()
    {
        Location = "us",
        Instance = "00000000-0000-0000-0000-000000000000",
        ReferenceListId = "reference_list_id",
        Description = "referencelist-description",
        Entries = new[]
        {
            new Gcp.Chronicle.Inputs.ReferenceListEntryArgs
            {
                Value = "referencelist-entry-value",
            },
        },
        SyntaxType = "REFERENCE_LIST_SYNTAX_TYPE_PLAIN_TEXT_STRING",
        ScopeInfos = new[]
        {
            new Gcp.Chronicle.Inputs.ReferenceListScopeInfoArgs
            {
                ReferenceListScope = new Gcp.Chronicle.Inputs.ReferenceListScopeInfoReferenceListScopeArgs
                {
                    ScopeNames = new[]
                    {
                        testScope.Name,
                    },
                },
            },
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/chronicle"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		testScope, err := chronicle.NewDataAccessScope(ctx, "test_scope", &chronicle.DataAccessScopeArgs{
			Location:          pulumi.String("us"),
			Instance:          pulumi.String("00000000-0000-0000-0000-000000000000"),
			DataAccessScopeId: pulumi.String("scope-id"),
			Description:       pulumi.String("test scope description"),
			AllowedDataAccessLabels: chronicle.DataAccessScopeAllowedDataAccessLabelArray{
				&chronicle.DataAccessScopeAllowedDataAccessLabelArgs{
					LogType: pulumi.String("GCP_CLOUDAUDIT"),
				},
			},
		})
		if err != nil {
			return err
		}
		_, err = chronicle.NewReferenceList(ctx, "example", &chronicle.ReferenceListArgs{
			Location:        pulumi.String("us"),
			Instance:        pulumi.String("00000000-0000-0000-0000-000000000000"),
			ReferenceListId: pulumi.String("reference_list_id"),
			Description:     pulumi.String("referencelist-description"),
			Entries: chronicle.ReferenceListEntryArray{
				&chronicle.ReferenceListEntryArgs{
					Value: pulumi.String("referencelist-entry-value"),
				},
			},
			SyntaxType: pulumi.String("REFERENCE_LIST_SYNTAX_TYPE_PLAIN_TEXT_STRING"),
			ScopeInfos: chronicle.ReferenceListScopeInfoArray{
				&chronicle.ReferenceListScopeInfoArgs{
					ReferenceListScope: &chronicle.ReferenceListScopeInfoReferenceListScopeArgs{
						ScopeNames: pulumi.StringArray{
							testScope.Name,
						},
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    gcp = {
      source = "pulumi/gcp"
    }
  }
}

resource "gcp_chronicle_dataaccessscope" "test_scope" {
  location             = "us"
  instance             = "00000000-0000-0000-0000-000000000000"
  data_access_scope_id = "scope-id"
  description          = "test scope description"
  allowed_data_access_labels {
    log_type = "GCP_CLOUDAUDIT"
  }
}
resource "gcp_chronicle_referencelist" "example" {
  location          = "us"
  instance          = "00000000-0000-0000-0000-000000000000"
  reference_list_id = "reference_list_id"
  description       = "referencelist-description"
  entries {
    value = "referencelist-entry-value"
  }
  syntax_type = "REFERENCE_LIST_SYNTAX_TYPE_PLAIN_TEXT_STRING"
  scope_infos {
    reference_list_scope = {
      scope_names = [gcp_chronicle_dataaccessscope.test_scope.name]
    }
  }
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.chronicle.DataAccessScope;
import com.pulumi.gcp.chronicle.DataAccessScopeArgs;
import com.pulumi.gcp.chronicle.inputs.DataAccessScopeAllowedDataAccessLabelArgs;
import com.pulumi.gcp.chronicle.ReferenceList;
import com.pulumi.gcp.chronicle.ReferenceListArgs;
import com.pulumi.gcp.chronicle.inputs.ReferenceListEntryArgs;
import com.pulumi.gcp.chronicle.inputs.ReferenceListScopeInfoArgs;
import com.pulumi.gcp.chronicle.inputs.ReferenceListScopeInfoReferenceListScopeArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 testScope = new DataAccessScope("testScope", DataAccessScopeArgs.builder()
            .location("us")
            .instance("00000000-0000-0000-0000-000000000000")
            .dataAccessScopeId("scope-id")
            .description("test scope description")
            .allowedDataAccessLabels(DataAccessScopeAllowedDataAccessLabelArgs.builder()
                .logType("GCP_CLOUDAUDIT")
                .build())
            .build());

        var example = new ReferenceList("example", ReferenceListArgs.builder()
            .location("us")
            .instance("00000000-0000-0000-0000-000000000000")
            .referenceListId("reference_list_id")
            .description("referencelist-description")
            .entries(ReferenceListEntryArgs.builder()
                .value("referencelist-entry-value")
                .build())
            .syntaxType("REFERENCE_LIST_SYNTAX_TYPE_PLAIN_TEXT_STRING")
            .scopeInfos(ReferenceListScopeInfoArgs.builder()
                .referenceListScope(ReferenceListScopeInfoReferenceListScopeArgs.builder()
                    .scopeNames(testScope.name())
                    .build())
                .build())
            .build());

    }
}
resources:
  testScope:
    type: gcp:chronicle:DataAccessScope
    name: test_scope
    properties:
      location: us
      instance: 00000000-0000-0000-0000-000000000000
      dataAccessScopeId: scope-id
      description: test scope description
      allowedDataAccessLabels:
        - logType: GCP_CLOUDAUDIT
  example:
    type: gcp:chronicle:ReferenceList
    properties:
      location: us
      instance: 00000000-0000-0000-0000-000000000000
      referenceListId: reference_list_id
      description: referencelist-description
      entries:
        - value: referencelist-entry-value
      syntaxType: REFERENCE_LIST_SYNTAX_TYPE_PLAIN_TEXT_STRING
      scopeInfos:
        - referenceListScope:
            scopeNames:
              - ${testScope.name}

Import

ReferenceList can be imported using any of these accepted formats:

  • projects/{{project}}/locations/{{location}}/instances/{{instance}}/referenceLists/{{reference_list_id}}
  • {{project}}/{{location}}/{{instance}}/{{reference_list_id}}
  • {{location}}/{{instance}}/{{reference_list_id}}

When using the pulumi import command, ReferenceList can be imported using one of the formats above. For example:

$ pulumi import gcp:chronicle/referenceList:ReferenceList default projects/{{project}}/locations/{{location}}/instances/{{instance}}/referenceLists/{{reference_list_id}}
$ pulumi import gcp:chronicle/referenceList:ReferenceList default {{project}}/{{location}}/{{instance}}/{{reference_list_id}}
$ pulumi import gcp:chronicle/referenceList:ReferenceList default {{location}}/{{instance}}/{{reference_list_id}}

Constructors

ReferenceList(String name, {ReferenceListArgs? args, CustomResourceOptions? options})
Creates a new ReferenceList. name The Pulumi resource name. args Arguments used to configure this ReferenceList. The set of arguments for ReferenceList. options Resource options controlling this resource's behavior.
ReferenceList.reference(String urn)
Creates a typed reference to an existing ReferenceList resource.

Properties

childResources → Set<Resource>
finalinherited
completionSources ↔ Map<String, IOutputCompletionSource>
latefinalinherited
description ↔ Output<String>
Required. A user-provided description of the reference list.
latefinal
displayName ↔ Output<String>
Output only. The unique display name of the reference list.
latefinal
entries ↔ Output<List<ReferenceListEntry>>
Required. The entries of the reference list. When listed, they are returned in the order that was specified at creation or update. The combined size of the values of the reference list may not exceed 6MB. This is returned only when the view is REFERENCE_LIST_VIEW_FULL. Structure is documented below.
latefinal
hashCode → int
The hash code for this object.
no setterinherited
id ↔ Output<String>
getter/setter pairinherited
instance ↔ Output<String>
The unique identifier for the Chronicle instance, which is the same as the customer ID.
latefinal
isCustom → bool
Returns whether this resource is provider-managed.
no setterinherited
isProtected → bool
Returns whether this resource is protected from deletion.
no setterinherited
isRemote → bool
Whether this resource is registered as remote.
no setterinherited
isResourceReference → bool
Whether this instance represents a resource value returned over RPC.
finalinherited
location ↔ Output<String>
The location of the resource. This is the geographical region where the Chronicle instance resides, such as "us" or "europe-west2".
latefinal
name ↔ Output<String>
Output only. The resource name of the reference list. Format: projects/{project}/locations/{location}/instances/{instance}/referenceLists/{reference_list}
latefinal
project ↔ Output<String>
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
latefinal
referenceListId ↔ Output<String>
Required. The ID to use for the reference list. This is also the display name for the reference list. It must satisfy the following requirements:
latefinal
resourceTransforms → List<ResourceTransform>
Inherited/explicit async transforms.
no setterinherited
revisionCreateTime ↔ Output<String>
Output only. The timestamp when the reference list was last updated.
latefinal
ruleAssociationsCount ↔ Output<int>
Output only. The count of self-authored rules using the reference list.
latefinal
rules ↔ Output<List<String>>
Output only. The resource names for the associated self-authored Rules that use this reference list. This is returned only when the view is REFERENCE_LIST_VIEW_FULL.
latefinal
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scopeInfos ↔ Output<List<ReferenceListScopeInfo>?>
ScopeInfo specifies the scope info of the reference list. Structure is documented below.
latefinal
syntaxType ↔ Output<String>
Possible values: REFERENCE_LIST_SYNTAX_TYPE_PLAIN_TEXT_STRING REFERENCE_LIST_SYNTAX_TYPE_REGEX REFERENCE_LIST_SYNTAX_TYPE_CIDR
latefinal
transformations → List<ResourceTransformation>
Inherited/explicit legacy transformations.
no setterinherited
urn ↔ Output<String>
latefinalinherited

Methods

failId(Object error) → void
Completes this resource ID with an error when registration fails.
inherited
failOutputs(Object error) → void
Completes all output properties with error.
inherited
failUrn(Object error) → void
Completes this resource URN with an error when registration fails.
inherited
getProvider(String moduleMember) → ProviderResource?
Returns provider for moduleMember's package, if configured.
inherited
getResourceName() → String
Returns this resource's logical name.
inherited
getResourceType() → String
Returns this resource's Pulumi type token.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerOutput<T>(String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output<T>
Registers a dynamic output property for this resource.
inherited
resolveId(String? value, {required bool isKnown}) → void
Resolves the provider-assigned ID for this resource.
inherited
resolveOutputs(Struct outputs) → void
Resolves all output properties from a monitor response payload.
inherited
resolveUrn(String value) → void
Resolves this resource's URN once assigned by the engine.
inherited
serializeProperties(Map<String, dynamic> properties) → Future<Struct>
Serializes resource properties for RPC transmission.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

get(String name, Input<String> id, {ReferenceListState? state, CustomResourceOptions? options}) → ReferenceList
Gets an existing ReferenceList resource's state with the given name and id.