DataAccessScope class

A DataAccessScope is a boolean expression of data access labels used to restrict access to data for users.

To get more information about DataAccessScope, see:

Example Usage

Chronicle Dataaccessscope With Logtype

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

const example = new gcp.chronicle.DataAccessScope("example", {
    location: "us",
    instance: "00000000-0000-0000-0000-000000000000",
    dataAccessScopeId: "scope-id",
    description: "scope-description",
    allowedDataAccessLabels: [
        {
            logType: "GCP_CLOUDAUDIT",
        },
        {
            logType: "GITHUB",
        },
    ],
});
import pulumi
import pulumi_gcp as gcp

example = gcp.chronicle.DataAccessScope("example",
    location="us",
    instance="00000000-0000-0000-0000-000000000000",
    data_access_scope_id="scope-id",
    description="scope-description",
    allowed_data_access_labels=[
        {
            "log_type": "GCP_CLOUDAUDIT",
        },
        {
            "log_type": "GITHUB",
        },
    ])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

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

});
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 {
		_, err := chronicle.NewDataAccessScope(ctx, "example", &chronicle.DataAccessScopeArgs{
			Location:          pulumi.String("us"),
			Instance:          pulumi.String("00000000-0000-0000-0000-000000000000"),
			DataAccessScopeId: pulumi.String("scope-id"),
			Description:       pulumi.String("scope-description"),
			AllowedDataAccessLabels: chronicle.DataAccessScopeAllowedDataAccessLabelArray{
				&chronicle.DataAccessScopeAllowedDataAccessLabelArgs{
					LogType: pulumi.String("GCP_CLOUDAUDIT"),
				},
				&chronicle.DataAccessScopeAllowedDataAccessLabelArgs{
					LogType: pulumi.String("GITHUB"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    gcp = {
      source = "pulumi/gcp"
    }
  }
}

resource "gcp_chronicle_dataaccessscope" "example" {
  location             = "us"
  instance             = "00000000-0000-0000-0000-000000000000"
  data_access_scope_id = "scope-id"
  description          = "scope-description"
  allowed_data_access_labels {
    log_type = "GCP_CLOUDAUDIT"
  }
  allowed_data_access_labels {
    log_type = "GITHUB"
  }
}
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 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 example = new DataAccessScope("example", DataAccessScopeArgs.builder()
            .location("us")
            .instance("00000000-0000-0000-0000-000000000000")
            .dataAccessScopeId("scope-id")
            .description("scope-description")
            .allowedDataAccessLabels(
                DataAccessScopeAllowedDataAccessLabelArgs.builder()
                    .logType("GCP_CLOUDAUDIT")
                    .build(),
                DataAccessScopeAllowedDataAccessLabelArgs.builder()
                    .logType("GITHUB")
                    .build())
            .build());

    }
}
resources:
  example:
    type: gcp:chronicle:DataAccessScope
    properties:
      location: us
      instance: 00000000-0000-0000-0000-000000000000
      dataAccessScopeId: scope-id
      description: scope-description
      allowedDataAccessLabels:
        - logType: GCP_CLOUDAUDIT
        - logType: GITHUB

Chronicle Dataaccessscope With Dataaccesslabel

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

const customDataAccessLabel = new gcp.chronicle.DataAccessLabel("custom_data_access_label", {
    location: "us",
    instance: "00000000-0000-0000-0000-000000000000",
    dataAccessLabelId: "label-id",
    udmQuery: "principal.hostname=\"google.com\"",
});
const example = new gcp.chronicle.DataAccessScope("example", {
    location: "us",
    instance: "00000000-0000-0000-0000-000000000000",
    dataAccessScopeId: "scope-id",
    description: "scope-description",
    allowedDataAccessLabels: [{
        dataAccessLabel: googleChronicleDataAccessLabel.customDataAccessLabel.dataAccessLabelId,
    }],
});
import pulumi
import pulumi_gcp as gcp

custom_data_access_label = gcp.chronicle.DataAccessLabel("custom_data_access_label",
    location="us",
    instance="00000000-0000-0000-0000-000000000000",
    data_access_label_id="label-id",
    udm_query="principal.hostname=\"google.com\"")
example = gcp.chronicle.DataAccessScope("example",
    location="us",
    instance="00000000-0000-0000-0000-000000000000",
    data_access_scope_id="scope-id",
    description="scope-description",
    allowed_data_access_labels=[{
        "data_access_label": google_chronicle_data_access_label["customDataAccessLabel"]["dataAccessLabelId"],
    }])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() =>
{
    var customDataAccessLabel = new Gcp.Chronicle.DataAccessLabel("custom_data_access_label", new()
    {
        Location = "us",
        Instance = "00000000-0000-0000-0000-000000000000",
        DataAccessLabelId = "label-id",
        UdmQuery = "principal.hostname=\"google.com\"",
    });

    var example = new Gcp.Chronicle.DataAccessScope("example", new()
    {
        Location = "us",
        Instance = "00000000-0000-0000-0000-000000000000",
        DataAccessScopeId = "scope-id",
        Description = "scope-description",
        AllowedDataAccessLabels = new[]
        {
            new Gcp.Chronicle.Inputs.DataAccessScopeAllowedDataAccessLabelArgs
            {
                DataAccessLabel = googleChronicleDataAccessLabel.CustomDataAccessLabel.DataAccessLabelId,
            },
        },
    });

});
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 {
		_, err := chronicle.NewDataAccessLabel(ctx, "custom_data_access_label", &chronicle.DataAccessLabelArgs{
			Location:          pulumi.String("us"),
			Instance:          pulumi.String("00000000-0000-0000-0000-000000000000"),
			DataAccessLabelId: pulumi.String("label-id"),
			UdmQuery:          pulumi.String("principal.hostname=\"google.com\""),
		})
		if err != nil {
			return err
		}
		_, err = chronicle.NewDataAccessScope(ctx, "example", &chronicle.DataAccessScopeArgs{
			Location:          pulumi.String("us"),
			Instance:          pulumi.String("00000000-0000-0000-0000-000000000000"),
			DataAccessScopeId: pulumi.String("scope-id"),
			Description:       pulumi.String("scope-description"),
			AllowedDataAccessLabels: chronicle.DataAccessScopeAllowedDataAccessLabelArray{
				&chronicle.DataAccessScopeAllowedDataAccessLabelArgs{
					DataAccessLabel: pulumi.Any(googleChronicleDataAccessLabel.CustomDataAccessLabel.DataAccessLabelId),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    gcp = {
      source = "pulumi/gcp"
    }
  }
}

resource "gcp_chronicle_dataaccesslabel" "custom_data_access_label" {
  location             = "us"
  instance             = "00000000-0000-0000-0000-000000000000"
  data_access_label_id = "label-id"
  udm_query            = "principal.hostname=\"google.com\""
}
resource "gcp_chronicle_dataaccessscope" "example" {
  location             = "us"
  instance             = "00000000-0000-0000-0000-000000000000"
  data_access_scope_id = "scope-id"
  description          = "scope-description"
  allowed_data_access_labels {
    data_access_label = googleChronicleDataAccessLabel.customDataAccessLabel.dataAccessLabelId
  }
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.chronicle.DataAccessLabel;
import com.pulumi.gcp.chronicle.DataAccessLabelArgs;
import com.pulumi.gcp.chronicle.DataAccessScope;
import com.pulumi.gcp.chronicle.DataAccessScopeArgs;
import com.pulumi.gcp.chronicle.inputs.DataAccessScopeAllowedDataAccessLabelArgs;
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 customDataAccessLabel = new DataAccessLabel("customDataAccessLabel", DataAccessLabelArgs.builder()
            .location("us")
            .instance("00000000-0000-0000-0000-000000000000")
            .dataAccessLabelId("label-id")
            .udmQuery("principal.hostname=\"google.com\"")
            .build());

        var example = new DataAccessScope("example", DataAccessScopeArgs.builder()
            .location("us")
            .instance("00000000-0000-0000-0000-000000000000")
            .dataAccessScopeId("scope-id")
            .description("scope-description")
            .allowedDataAccessLabels(DataAccessScopeAllowedDataAccessLabelArgs.builder()
                .dataAccessLabel(googleChronicleDataAccessLabel.get("customDataAccessLabel").get("dataAccessLabelId"))
                .build())
            .build());

    }
}
resources:
  customDataAccessLabel:
    type: gcp:chronicle:DataAccessLabel
    name: custom_data_access_label
    properties:
      location: us
      instance: 00000000-0000-0000-0000-000000000000
      dataAccessLabelId: label-id
      udmQuery: principal.hostname="google.com"
  example:
    type: gcp:chronicle:DataAccessScope
    properties:
      location: us
      instance: 00000000-0000-0000-0000-000000000000
      dataAccessScopeId: scope-id
      description: scope-description
      allowedDataAccessLabels:
        - dataAccessLabel: ${googleChronicleDataAccessLabel.customDataAccessLabel.dataAccessLabelId}

Chronicle Dataaccessscope With Asset Namespace

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

const example = new gcp.chronicle.DataAccessScope("example", {
    location: "us",
    instance: "00000000-0000-0000-0000-000000000000",
    dataAccessScopeId: "scope-id",
    description: "scope-description",
    allowedDataAccessLabels: [{
        assetNamespace: "my-namespace",
    }],
});
import pulumi
import pulumi_gcp as gcp

example = gcp.chronicle.DataAccessScope("example",
    location="us",
    instance="00000000-0000-0000-0000-000000000000",
    data_access_scope_id="scope-id",
    description="scope-description",
    allowed_data_access_labels=[{
        "asset_namespace": "my-namespace",
    }])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

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

});
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 {
		_, err := chronicle.NewDataAccessScope(ctx, "example", &chronicle.DataAccessScopeArgs{
			Location:          pulumi.String("us"),
			Instance:          pulumi.String("00000000-0000-0000-0000-000000000000"),
			DataAccessScopeId: pulumi.String("scope-id"),
			Description:       pulumi.String("scope-description"),
			AllowedDataAccessLabels: chronicle.DataAccessScopeAllowedDataAccessLabelArray{
				&chronicle.DataAccessScopeAllowedDataAccessLabelArgs{
					AssetNamespace: pulumi.String("my-namespace"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    gcp = {
      source = "pulumi/gcp"
    }
  }
}

resource "gcp_chronicle_dataaccessscope" "example" {
  location             = "us"
  instance             = "00000000-0000-0000-0000-000000000000"
  data_access_scope_id = "scope-id"
  description          = "scope-description"
  allowed_data_access_labels {
    asset_namespace = "my-namespace"
  }
}
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 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 example = new DataAccessScope("example", DataAccessScopeArgs.builder()
            .location("us")
            .instance("00000000-0000-0000-0000-000000000000")
            .dataAccessScopeId("scope-id")
            .description("scope-description")
            .allowedDataAccessLabels(DataAccessScopeAllowedDataAccessLabelArgs.builder()
                .assetNamespace("my-namespace")
                .build())
            .build());

    }
}
resources:
  example:
    type: gcp:chronicle:DataAccessScope
    properties:
      location: us
      instance: 00000000-0000-0000-0000-000000000000
      dataAccessScopeId: scope-id
      description: scope-description
      allowedDataAccessLabels:
        - assetNamespace: my-namespace

Chronicle Dataaccessscope With Ingestion Label

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

const example = new gcp.chronicle.DataAccessScope("example", {
    location: "us",
    instance: "00000000-0000-0000-0000-000000000000",
    dataAccessScopeId: "scope-id",
    description: "scope-description",
    allowedDataAccessLabels: [{
        ingestionLabel: {
            ingestionLabelKey: "ingestion_key",
            ingestionLabelValue: "ingestion_value",
        },
    }],
});
import pulumi
import pulumi_gcp as gcp

example = gcp.chronicle.DataAccessScope("example",
    location="us",
    instance="00000000-0000-0000-0000-000000000000",
    data_access_scope_id="scope-id",
    description="scope-description",
    allowed_data_access_labels=[{
        "ingestion_label": {
            "ingestion_label_key": "ingestion_key",
            "ingestion_label_value": "ingestion_value",
        },
    }])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() =>
{
    var example = new Gcp.Chronicle.DataAccessScope("example", new()
    {
        Location = "us",
        Instance = "00000000-0000-0000-0000-000000000000",
        DataAccessScopeId = "scope-id",
        Description = "scope-description",
        AllowedDataAccessLabels = new[]
        {
            new Gcp.Chronicle.Inputs.DataAccessScopeAllowedDataAccessLabelArgs
            {
                IngestionLabel = new Gcp.Chronicle.Inputs.DataAccessScopeAllowedDataAccessLabelIngestionLabelArgs
                {
                    IngestionLabelKey = "ingestion_key",
                    IngestionLabelValue = "ingestion_value",
                },
            },
        },
    });

});
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 {
		_, err := chronicle.NewDataAccessScope(ctx, "example", &chronicle.DataAccessScopeArgs{
			Location:          pulumi.String("us"),
			Instance:          pulumi.String("00000000-0000-0000-0000-000000000000"),
			DataAccessScopeId: pulumi.String("scope-id"),
			Description:       pulumi.String("scope-description"),
			AllowedDataAccessLabels: chronicle.DataAccessScopeAllowedDataAccessLabelArray{
				&chronicle.DataAccessScopeAllowedDataAccessLabelArgs{
					IngestionLabel: &chronicle.DataAccessScopeAllowedDataAccessLabelIngestionLabelArgs{
						IngestionLabelKey:   pulumi.String("ingestion_key"),
						IngestionLabelValue: pulumi.String("ingestion_value"),
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    gcp = {
      source = "pulumi/gcp"
    }
  }
}

resource "gcp_chronicle_dataaccessscope" "example" {
  location             = "us"
  instance             = "00000000-0000-0000-0000-000000000000"
  data_access_scope_id = "scope-id"
  description          = "scope-description"
  allowed_data_access_labels {
    ingestion_label = {
      ingestion_label_key   = "ingestion_key"
      ingestion_label_value = "ingestion_value"
    }
  }
}
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.inputs.DataAccessScopeAllowedDataAccessLabelIngestionLabelArgs;
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 example = new DataAccessScope("example", DataAccessScopeArgs.builder()
            .location("us")
            .instance("00000000-0000-0000-0000-000000000000")
            .dataAccessScopeId("scope-id")
            .description("scope-description")
            .allowedDataAccessLabels(DataAccessScopeAllowedDataAccessLabelArgs.builder()
                .ingestionLabel(DataAccessScopeAllowedDataAccessLabelIngestionLabelArgs.builder()
                    .ingestionLabelKey("ingestion_key")
                    .ingestionLabelValue("ingestion_value")
                    .build())
                .build())
            .build());

    }
}
resources:
  example:
    type: gcp:chronicle:DataAccessScope
    properties:
      location: us
      instance: 00000000-0000-0000-0000-000000000000
      dataAccessScopeId: scope-id
      description: scope-description
      allowedDataAccessLabels:
        - ingestionLabel:
            ingestionLabelKey: ingestion_key
            ingestionLabelValue: ingestion_value

Chronicle Dataaccessscope With Denied Labels

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

const customDataAccessLabel = new gcp.chronicle.DataAccessLabel("custom_data_access_label", {
    location: "us",
    instance: "00000000-0000-0000-0000-000000000000",
    dataAccessLabelId: "label-id",
    udmQuery: "principal.hostname=\"google.com\"",
});
const example = new gcp.chronicle.DataAccessScope("example", {
    location: "us",
    instance: "00000000-0000-0000-0000-000000000000",
    dataAccessScopeId: "scope-id",
    description: "scope-description",
    allowAll: true,
    deniedDataAccessLabels: [
        {
            logType: "GCP_CLOUDAUDIT",
        },
        {
            dataAccessLabel: googleChronicleDataAccessLabel.customDataAccessLabel.dataAccessLabelId,
        },
        {
            ingestionLabel: {
                ingestionLabelKey: "ingestion_key",
                ingestionLabelValue: "ingestion_value",
            },
        },
        {
            assetNamespace: "my-namespace",
        },
    ],
});
import pulumi
import pulumi_gcp as gcp

custom_data_access_label = gcp.chronicle.DataAccessLabel("custom_data_access_label",
    location="us",
    instance="00000000-0000-0000-0000-000000000000",
    data_access_label_id="label-id",
    udm_query="principal.hostname=\"google.com\"")
example = gcp.chronicle.DataAccessScope("example",
    location="us",
    instance="00000000-0000-0000-0000-000000000000",
    data_access_scope_id="scope-id",
    description="scope-description",
    allow_all=True,
    denied_data_access_labels=[
        {
            "log_type": "GCP_CLOUDAUDIT",
        },
        {
            "data_access_label": google_chronicle_data_access_label["customDataAccessLabel"]["dataAccessLabelId"],
        },
        {
            "ingestion_label": {
                "ingestion_label_key": "ingestion_key",
                "ingestion_label_value": "ingestion_value",
            },
        },
        {
            "asset_namespace": "my-namespace",
        },
    ])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() =>
{
    var customDataAccessLabel = new Gcp.Chronicle.DataAccessLabel("custom_data_access_label", new()
    {
        Location = "us",
        Instance = "00000000-0000-0000-0000-000000000000",
        DataAccessLabelId = "label-id",
        UdmQuery = "principal.hostname=\"google.com\"",
    });

    var example = new Gcp.Chronicle.DataAccessScope("example", new()
    {
        Location = "us",
        Instance = "00000000-0000-0000-0000-000000000000",
        DataAccessScopeId = "scope-id",
        Description = "scope-description",
        AllowAll = true,
        DeniedDataAccessLabels = new[]
        {
            new Gcp.Chronicle.Inputs.DataAccessScopeDeniedDataAccessLabelArgs
            {
                LogType = "GCP_CLOUDAUDIT",
            },
            new Gcp.Chronicle.Inputs.DataAccessScopeDeniedDataAccessLabelArgs
            {
                DataAccessLabel = googleChronicleDataAccessLabel.CustomDataAccessLabel.DataAccessLabelId,
            },
            new Gcp.Chronicle.Inputs.DataAccessScopeDeniedDataAccessLabelArgs
            {
                IngestionLabel = new Gcp.Chronicle.Inputs.DataAccessScopeDeniedDataAccessLabelIngestionLabelArgs
                {
                    IngestionLabelKey = "ingestion_key",
                    IngestionLabelValue = "ingestion_value",
                },
            },
            new Gcp.Chronicle.Inputs.DataAccessScopeDeniedDataAccessLabelArgs
            {
                AssetNamespace = "my-namespace",
            },
        },
    });

});
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 {
		_, err := chronicle.NewDataAccessLabel(ctx, "custom_data_access_label", &chronicle.DataAccessLabelArgs{
			Location:          pulumi.String("us"),
			Instance:          pulumi.String("00000000-0000-0000-0000-000000000000"),
			DataAccessLabelId: pulumi.String("label-id"),
			UdmQuery:          pulumi.String("principal.hostname=\"google.com\""),
		})
		if err != nil {
			return err
		}
		_, err = chronicle.NewDataAccessScope(ctx, "example", &chronicle.DataAccessScopeArgs{
			Location:          pulumi.String("us"),
			Instance:          pulumi.String("00000000-0000-0000-0000-000000000000"),
			DataAccessScopeId: pulumi.String("scope-id"),
			Description:       pulumi.String("scope-description"),
			AllowAll:          pulumi.Bool(true),
			DeniedDataAccessLabels: chronicle.DataAccessScopeDeniedDataAccessLabelArray{
				&chronicle.DataAccessScopeDeniedDataAccessLabelArgs{
					LogType: pulumi.String("GCP_CLOUDAUDIT"),
				},
				&chronicle.DataAccessScopeDeniedDataAccessLabelArgs{
					DataAccessLabel: pulumi.Any(googleChronicleDataAccessLabel.CustomDataAccessLabel.DataAccessLabelId),
				},
				&chronicle.DataAccessScopeDeniedDataAccessLabelArgs{
					IngestionLabel: &chronicle.DataAccessScopeDeniedDataAccessLabelIngestionLabelArgs{
						IngestionLabelKey:   pulumi.String("ingestion_key"),
						IngestionLabelValue: pulumi.String("ingestion_value"),
					},
				},
				&chronicle.DataAccessScopeDeniedDataAccessLabelArgs{
					AssetNamespace: pulumi.String("my-namespace"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    gcp = {
      source = "pulumi/gcp"
    }
  }
}

resource "gcp_chronicle_dataaccesslabel" "custom_data_access_label" {
  location             = "us"
  instance             = "00000000-0000-0000-0000-000000000000"
  data_access_label_id = "label-id"
  udm_query            = "principal.hostname=\"google.com\""
}
resource "gcp_chronicle_dataaccessscope" "example" {
  location             = "us"
  instance             = "00000000-0000-0000-0000-000000000000"
  data_access_scope_id = "scope-id"
  description          = "scope-description"
  allow_all            = true
  denied_data_access_labels {
    log_type = "GCP_CLOUDAUDIT"
  }
  denied_data_access_labels {
    data_access_label = googleChronicleDataAccessLabel.customDataAccessLabel.dataAccessLabelId
  }
  denied_data_access_labels {
    ingestion_label = {
      ingestion_label_key   = "ingestion_key"
      ingestion_label_value = "ingestion_value"
    }
  }
  denied_data_access_labels {
    asset_namespace = "my-namespace"
  }
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.chronicle.DataAccessLabel;
import com.pulumi.gcp.chronicle.DataAccessLabelArgs;
import com.pulumi.gcp.chronicle.DataAccessScope;
import com.pulumi.gcp.chronicle.DataAccessScopeArgs;
import com.pulumi.gcp.chronicle.inputs.DataAccessScopeDeniedDataAccessLabelArgs;
import com.pulumi.gcp.chronicle.inputs.DataAccessScopeDeniedDataAccessLabelIngestionLabelArgs;
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 customDataAccessLabel = new DataAccessLabel("customDataAccessLabel", DataAccessLabelArgs.builder()
            .location("us")
            .instance("00000000-0000-0000-0000-000000000000")
            .dataAccessLabelId("label-id")
            .udmQuery("principal.hostname=\"google.com\"")
            .build());

        var example = new DataAccessScope("example", DataAccessScopeArgs.builder()
            .location("us")
            .instance("00000000-0000-0000-0000-000000000000")
            .dataAccessScopeId("scope-id")
            .description("scope-description")
            .allowAll(true)
            .deniedDataAccessLabels(
                DataAccessScopeDeniedDataAccessLabelArgs.builder()
                    .logType("GCP_CLOUDAUDIT")
                    .build(),
                DataAccessScopeDeniedDataAccessLabelArgs.builder()
                    .dataAccessLabel(googleChronicleDataAccessLabel.get("customDataAccessLabel").get("dataAccessLabelId"))
                    .build(),
                DataAccessScopeDeniedDataAccessLabelArgs.builder()
                    .ingestionLabel(DataAccessScopeDeniedDataAccessLabelIngestionLabelArgs.builder()
                        .ingestionLabelKey("ingestion_key")
                        .ingestionLabelValue("ingestion_value")
                        .build())
                    .build(),
                DataAccessScopeDeniedDataAccessLabelArgs.builder()
                    .assetNamespace("my-namespace")
                    .build())
            .build());

    }
}
resources:
  customDataAccessLabel:
    type: gcp:chronicle:DataAccessLabel
    name: custom_data_access_label
    properties:
      location: us
      instance: 00000000-0000-0000-0000-000000000000
      dataAccessLabelId: label-id
      udmQuery: principal.hostname="google.com"
  example:
    type: gcp:chronicle:DataAccessScope
    properties:
      location: us
      instance: 00000000-0000-0000-0000-000000000000
      dataAccessScopeId: scope-id
      description: scope-description
      allowAll: true
      deniedDataAccessLabels:
        - logType: GCP_CLOUDAUDIT
        - dataAccessLabel: ${googleChronicleDataAccessLabel.customDataAccessLabel.dataAccessLabelId}
        - ingestionLabel:
            ingestionLabelKey: ingestion_key
            ingestionLabelValue: ingestion_value
        - assetNamespace: my-namespace

Import

DataAccessScope can be imported using any of these accepted formats:

  • projects/{{project}}/locations/{{location}}/instances/{{instance}}/dataAccessScopes/{{data_access_scope_id}}
  • {{project}}/{{location}}/{{instance}}/{{data_access_scope_id}}
  • {{location}}/{{instance}}/{{data_access_scope_id}}

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

$ pulumi import gcp:chronicle/dataAccessScope:DataAccessScope default projects/{{project}}/locations/{{location}}/instances/{{instance}}/dataAccessScopes/{{data_access_scope_id}}
$ pulumi import gcp:chronicle/dataAccessScope:DataAccessScope default {{project}}/{{location}}/{{instance}}/{{data_access_scope_id}}
$ pulumi import gcp:chronicle/dataAccessScope:DataAccessScope default {{location}}/{{instance}}/{{data_access_scope_id}}

Constructors

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

Properties

allowAll ↔ Output<bool?>
Optional. Whether or not the scope allows all labels, allowAll and allowedDataAccessLabels are mutually exclusive and one of them must be present. deniedDataAccessLabels can still be used along with allow_all. When combined with denied_data_access_labels, access will be granted to all data that doesn't have labels mentioned in denied_data_access_labels. E.g.: A customer with scope with denied labels A and B and allowAll will be able to see all data except data labeled with A and data labeled with B and data with labels A and B.
latefinal
allowedDataAccessLabels ↔ Output<List<DataAccessScopeAllowedDataAccessLabel>?>
The allowed labels for the scope. There has to be at least one label allowed for the scope to be valid. The logical operator for evaluation of the allowed labels is OR. Either allowAll or allowedDataAccessLabels needs to be provided. E.g.: A customer with scope with allowed labels A and B will be able to see data with labeled with A or B or (A and B). Structure is documented below.
latefinal
author ↔ Output<String>
Output only. The user who created the data access scope.
latefinal
childResources → Set<Resource>
finalinherited
completionSources ↔ Map<String, IOutputCompletionSource>
latefinalinherited
createTime ↔ Output<String>
Output only. The time at which the data access scope was created.
latefinal
dataAccessScopeId ↔ Output<String>
Required. The user provided scope id which will become the last part of the name of the scope resource. Needs to be compliant with https://google.aip.dev/122
latefinal
deletionPolicy ↔ Output<String>
Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
latefinal
deniedDataAccessLabels ↔ Output<List<DataAccessScopeDeniedDataAccessLabel>?>
Optional. The denied labels for the scope. The logical operator for evaluation of the denied labels is AND. E.g.: A customer with scope with denied labels A and B won't be able to see data labeled with A and data labeled with B and data with labels A and B. Structure is documented below.
latefinal
description ↔ Output<String?>
Optional. A description of the data access scope for a human reader.
latefinal
displayName ↔ Output<String>
Output only. The name to be used for display to customers of the data access scope.
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
lastEditor ↔ Output<String>
Output only. The user who last updated the data access scope.
latefinal
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>
The unique full name of the data access scope. This unique identifier is generated using values provided for the URL parameters. Format: projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope_id}
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
resourceTransforms → List<ResourceTransform>
Inherited/explicit async transforms.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
transformations → List<ResourceTransformation>
Inherited/explicit legacy transformations.
no setterinherited
updateTime ↔ Output<String>
Output only. The time at which the data access scope was last updated.
latefinal
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, {DataAccessScopeState? state, CustomResourceOptions? options}) → DataAccessScope
Gets an existing DataAccessScope resource's state with the given name and id.