Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.gcp.folder.kotlin.IamAuditConfigArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gcp.folder.kotlin
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.folder.IamAuditConfigArgs.builder
import com.pulumi.gcp.folder.kotlin.inputs.IamAuditConfigAuditLogConfigArgs
import com.pulumi.gcp.folder.kotlin.inputs.IamAuditConfigAuditLogConfigArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* Four different resources help you manage your IAM policy for a folder. Each of these resources serves a different use case:
* * `gcp.folder.IAMPolicy`: Authoritative. Sets the IAM policy for the folder and replaces any existing policy already attached.
* * `gcp.folder.IAMBinding`: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the folder are preserved.
* * `gcp.folder.IAMMember`: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the folder are preserved.
* * `gcp.folder.IamAuditConfig`: Authoritative for a given service. Updates the IAM policy to enable audit logging for the given service.
* > **Note:** `gcp.folder.IAMPolicy` **cannot** be used in conjunction with `gcp.folder.IAMBinding`, `gcp.folder.IAMMember`, or `gcp.folder.IamAuditConfig` or they will fight over what your policy should be.
* > **Note:** `gcp.folder.IAMBinding` resources **can be** used in conjunction with `gcp.folder.IAMMember` resources **only if** they do not grant privilege to the same role.
* > **Note:** The underlying API method `projects.setIamPolicy` has constraints which are documented [here](https://cloud.google.com/resource-manager/reference/rest/v1/projects/setIamPolicy). In addition to these constraints,
* IAM Conditions cannot be used with Basic Roles such as Owner. Violating these constraints will result in the API returning a 400 error code so please review these if you encounter errors with this resource.
* ## gcp.folder.IAMPolicy
* !> **Be careful!** You can accidentally lock yourself out of your folder
* using this resource. Deleting a `gcp.folder.IAMPolicy` removes access
* from anyone without permissions on its parent folder/organization. Proceed with caution.
* It's not recommended to use `gcp.folder.IAMPolicy` with your provider folder
* to avoid locking yourself out, and it should generally only be used with folders
* fully managed by this provider. If you do use this resource, it is recommended to **import** the policy before
* applying the change.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const admin = gcp.organizations.getIAMPolicy({
* bindings: [{
* role: "roles/editor",
* members: ["user:jane@example.com"],
* }],
* });
* const folder = new gcp.folder.IAMPolicy("folder", {
* folder: "folders/1234567",
* policyData: admin.then(admin => admin.policyData),
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* admin = gcp.organizations.get_iam_policy(bindings=[{
* "role": "roles/editor",
* "members": ["user:jane@example.com"],
* }])
* folder = gcp.folder.IAMPolicy("folder",
* folder="folders/1234567",
* policy_data=admin.policy_data)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var admin = Gcp.Organizations.GetIAMPolicy.Invoke(new()
* {
* Bindings = new[]
* {
* new Gcp.Organizations.Inputs.GetIAMPolicyBindingInputArgs
* {
* Role = "roles/editor",
* Members = new[]
* {
* "user:[email protected] ",
* },
* },
* },
* });
* var folder = new Gcp.Folder.IAMPolicy("folder", new()
* {
* Folder = "folders/1234567",
* PolicyData = admin.Apply(getIAMPolicyResult => getIAMPolicyResult.PolicyData),
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/folder"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/organizations"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* admin, err := organizations.LookupIAMPolicy(ctx, &organizations.LookupIAMPolicyArgs{
* Bindings: []organizations.GetIAMPolicyBinding{
* {
* Role: "roles/editor",
* Members: []string{
* "user:[email protected] ",
* },
* },
* },
* }, nil)
* if err != nil {
* return err
* }
* _, err = folder.NewIAMPolicy(ctx, "folder", &folder.IAMPolicyArgs{
* Folder: pulumi.String("folders/1234567"),
* PolicyData: pulumi.String(admin.PolicyData),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.gcp.organizations.OrganizationsFunctions;
* import com.pulumi.gcp.organizations.inputs.GetIAMPolicyArgs;
* import com.pulumi.gcp.folder.IAMPolicy;
* import com.pulumi.gcp.folder.IAMPolicyArgs;
* 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) {
* final var admin = OrganizationsFunctions.getIAMPolicy(GetIAMPolicyArgs.builder()
* .bindings(GetIAMPolicyBindingArgs.builder()
* .role("roles/editor")
* .members("user:[email protected] ")
* .build())
* .build());
* var folder = new IAMPolicy("folder", IAMPolicyArgs.builder()
* .folder("folders/1234567")
* .policyData(admin.applyValue(getIAMPolicyResult -> getIAMPolicyResult.policyData()))
* .build());
* }
* }
* ```
* ```yaml
* resources:
* folder:
* type: gcp:folder:IAMPolicy
* properties:
* folder: folders/1234567
* policyData: ${admin.policyData}
* variables:
* admin:
* fn::invoke:
* Function: gcp:organizations:getIAMPolicy
* Arguments:
* bindings:
* - role: roles/editor
* members:
* - user:[email protected]
* ```
*
* With IAM Conditions:
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const admin = gcp.organizations.getIAMPolicy({
* bindings: [{
* role: "roles/compute.admin",
* members: ["user:jane@example.com"],
* condition: {
* title: "expires_after_2019_12_31",
* description: "Expiring at midnight of 2019-12-31",
* expression: "request.time < timestamp(\"2020-01-01T00:00:00Z\")",
* },
* }],
* });
* const folder = new gcp.folder.IAMPolicy("folder", {
* folder: "folders/1234567",
* policyData: admin.then(admin => admin.policyData),
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* admin = gcp.organizations.get_iam_policy(bindings=[{
* "role": "roles/compute.admin",
* "members": ["user:jane@example.com"],
* "condition": {
* "title": "expires_after_2019_12_31",
* "description": "Expiring at midnight of 2019-12-31",
* "expression": "request.time < timestamp(\"2020-01-01T00:00:00Z\")",
* },
* }])
* folder = gcp.folder.IAMPolicy("folder",
* folder="folders/1234567",
* policy_data=admin.policy_data)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var admin = Gcp.Organizations.GetIAMPolicy.Invoke(new()
* {
* Bindings = new[]
* {
* new Gcp.Organizations.Inputs.GetIAMPolicyBindingInputArgs
* {
* Role = "roles/compute.admin",
* Members = new[]
* {
* "user:[email protected] ",
* },
* Condition = new Gcp.Organizations.Inputs.GetIAMPolicyBindingConditionInputArgs
* {
* Title = "expires_after_2019_12_31",
* Description = "Expiring at midnight of 2019-12-31",
* Expression = "request.time < timestamp(\"2020-01-01T00:00:00Z\")",
* },
* },
* },
* });
* var folder = new Gcp.Folder.IAMPolicy("folder", new()
* {
* Folder = "folders/1234567",
* PolicyData = admin.Apply(getIAMPolicyResult => getIAMPolicyResult.PolicyData),
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/folder"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/organizations"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* admin, err := organizations.LookupIAMPolicy(ctx, &organizations.LookupIAMPolicyArgs{
* Bindings: []organizations.GetIAMPolicyBinding{
* {
* Role: "roles/compute.admin",
* Members: []string{
* "user:[email protected] ",
* },
* Condition: {
* Title: "expires_after_2019_12_31",
* Description: pulumi.StringRef("Expiring at midnight of 2019-12-31"),
* Expression: "request.time < timestamp(\"2020-01-01T00:00:00Z\")",
* },
* },
* },
* }, nil)
* if err != nil {
* return err
* }
* _, err = folder.NewIAMPolicy(ctx, "folder", &folder.IAMPolicyArgs{
* Folder: pulumi.String("folders/1234567"),
* PolicyData: pulumi.String(admin.PolicyData),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.gcp.organizations.OrganizationsFunctions;
* import com.pulumi.gcp.organizations.inputs.GetIAMPolicyArgs;
* import com.pulumi.gcp.folder.IAMPolicy;
* import com.pulumi.gcp.folder.IAMPolicyArgs;
* 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) {
* final var admin = OrganizationsFunctions.getIAMPolicy(GetIAMPolicyArgs.builder()
* .bindings(GetIAMPolicyBindingArgs.builder()
* .role("roles/compute.admin")
* .members("user:[email protected] ")
* .condition(GetIAMPolicyBindingConditionArgs.builder()
* .title("expires_after_2019_12_31")
* .description("Expiring at midnight of 2019-12-31")
* .expression("request.time < timestamp(\"2020-01-01T00:00:00Z\")")
* .build())
* .build())
* .build());
* var folder = new IAMPolicy("folder", IAMPolicyArgs.builder()
* .folder("folders/1234567")
* .policyData(admin.applyValue(getIAMPolicyResult -> getIAMPolicyResult.policyData()))
* .build());
* }
* }
* ```
* ```yaml
* resources:
* folder:
* type: gcp:folder:IAMPolicy
* properties:
* folder: folders/1234567
* policyData: ${admin.policyData}
* variables:
* admin:
* fn::invoke:
* Function: gcp:organizations:getIAMPolicy
* Arguments:
* bindings:
* - role: roles/compute.admin
* members:
* - user:[email protected]
* condition:
* title: expires_after_2019_12_31
* description: Expiring at midnight of 2019-12-31
* expression: request.time < timestamp("2020-01-01T00:00:00Z")
* ```
*
* ## gcp.folder.IAMBinding
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const folder = new gcp.folder.IAMBinding("folder", {
* folder: "folders/1234567",
* role: "roles/editor",
* members: ["user:jane@example.com"],
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* folder = gcp.folder.IAMBinding("folder",
* folder="folders/1234567",
* role="roles/editor",
* members=["user:jane@example.com"])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var folder = new Gcp.Folder.IAMBinding("folder", new()
* {
* Folder = "folders/1234567",
* Role = "roles/editor",
* Members = new[]
* {
* "user:[email protected] ",
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/folder"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := folder.NewIAMBinding(ctx, "folder", &folder.IAMBindingArgs{
* Folder: pulumi.String("folders/1234567"),
* Role: pulumi.String("roles/editor"),
* Members: pulumi.StringArray{
* pulumi.String("user:[email protected] "),
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.gcp.folder.IAMBinding;
* import com.pulumi.gcp.folder.IAMBindingArgs;
* 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 folder = new IAMBinding("folder", IAMBindingArgs.builder()
* .folder("folders/1234567")
* .role("roles/editor")
* .members("user:[email protected] ")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* folder:
* type: gcp:folder:IAMBinding
* properties:
* folder: folders/1234567
* role: roles/editor
* members:
* - user:[email protected]
* ```
*
* With IAM Conditions:
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const folder = new gcp.folder.IAMBinding("folder", {
* folder: "folders/1234567",
* role: "roles/container.admin",
* members: ["user:jane@example.com"],
* condition: {
* title: "expires_after_2019_12_31",
* description: "Expiring at midnight of 2019-12-31",
* expression: "request.time < timestamp(\"2020-01-01T00:00:00Z\")",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* folder = gcp.folder.IAMBinding("folder",
* folder="folders/1234567",
* role="roles/container.admin",
* members=["user:jane@example.com"],
* condition={
* "title": "expires_after_2019_12_31",
* "description": "Expiring at midnight of 2019-12-31",
* "expression": "request.time < timestamp(\"2020-01-01T00:00:00Z\")",
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var folder = new Gcp.Folder.IAMBinding("folder", new()
* {
* Folder = "folders/1234567",
* Role = "roles/container.admin",
* Members = new[]
* {
* "user:[email protected] ",
* },
* Condition = new Gcp.Folder.Inputs.IAMBindingConditionArgs
* {
* Title = "expires_after_2019_12_31",
* Description = "Expiring at midnight of 2019-12-31",
* Expression = "request.time < timestamp(\"2020-01-01T00:00:00Z\")",
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/folder"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := folder.NewIAMBinding(ctx, "folder", &folder.IAMBindingArgs{
* Folder: pulumi.String("folders/1234567"),
* Role: pulumi.String("roles/container.admin"),
* Members: pulumi.StringArray{
* pulumi.String("user:[email protected] "),
* },
* Condition: &folder.IAMBindingConditionArgs{
* Title: pulumi.String("expires_after_2019_12_31"),
* Description: pulumi.String("Expiring at midnight of 2019-12-31"),
* Expression: pulumi.String("request.time < timestamp(\"2020-01-01T00:00:00Z\")"),
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.gcp.folder.IAMBinding;
* import com.pulumi.gcp.folder.IAMBindingArgs;
* import com.pulumi.gcp.folder.inputs.IAMBindingConditionArgs;
* 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 folder = new IAMBinding("folder", IAMBindingArgs.builder()
* .folder("folders/1234567")
* .role("roles/container.admin")
* .members("user:[email protected] ")
* .condition(IAMBindingConditionArgs.builder()
* .title("expires_after_2019_12_31")
* .description("Expiring at midnight of 2019-12-31")
* .expression("request.time < timestamp(\"2020-01-01T00:00:00Z\")")
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* folder:
* type: gcp:folder:IAMBinding
* properties:
* folder: folders/1234567
* role: roles/container.admin
* members:
* - user:[email protected]
* condition:
* title: expires_after_2019_12_31
* description: Expiring at midnight of 2019-12-31
* expression: request.time < timestamp("2020-01-01T00:00:00Z")
* ```
*
* ## gcp.folder.IAMMember
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const folder = new gcp.folder.IAMMember("folder", {
* folder: "folders/1234567",
* role: "roles/editor",
* member: "user:[email protected] ",
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* folder = gcp.folder.IAMMember("folder",
* folder="folders/1234567",
* role="roles/editor",
* member="user:[email protected] ")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var folder = new Gcp.Folder.IAMMember("folder", new()
* {
* Folder = "folders/1234567",
* Role = "roles/editor",
* Member = "user:[email protected] ",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/folder"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := folder.NewIAMMember(ctx, "folder", &folder.IAMMemberArgs{
* Folder: pulumi.String("folders/1234567"),
* Role: pulumi.String("roles/editor"),
* Member: pulumi.String("user:[email protected] "),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.gcp.folder.IAMMember;
* import com.pulumi.gcp.folder.IAMMemberArgs;
* 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 folder = new IAMMember("folder", IAMMemberArgs.builder()
* .folder("folders/1234567")
* .role("roles/editor")
* .member("user:[email protected] ")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* folder:
* type: gcp:folder:IAMMember
* properties:
* folder: folders/1234567
* role: roles/editor
* member: user:[email protected]
* ```
*
* With IAM Conditions:
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const folder = new gcp.folder.IAMMember("folder", {
* folder: "folders/1234567",
* role: "roles/firebase.admin",
* member: "user:[email protected] ",
* condition: {
* title: "expires_after_2019_12_31",
* description: "Expiring at midnight of 2019-12-31",
* expression: "request.time < timestamp(\"2020-01-01T00:00:00Z\")",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* folder = gcp.folder.IAMMember("folder",
* folder="folders/1234567",
* role="roles/firebase.admin",
* member="user:[email protected] ",
* condition={
* "title": "expires_after_2019_12_31",
* "description": "Expiring at midnight of 2019-12-31",
* "expression": "request.time < timestamp(\"2020-01-01T00:00:00Z\")",
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var folder = new Gcp.Folder.IAMMember("folder", new()
* {
* Folder = "folders/1234567",
* Role = "roles/firebase.admin",
* Member = "user:[email protected] ",
* Condition = new Gcp.Folder.Inputs.IAMMemberConditionArgs
* {
* Title = "expires_after_2019_12_31",
* Description = "Expiring at midnight of 2019-12-31",
* Expression = "request.time < timestamp(\"2020-01-01T00:00:00Z\")",
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/folder"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := folder.NewIAMMember(ctx, "folder", &folder.IAMMemberArgs{
* Folder: pulumi.String("folders/1234567"),
* Role: pulumi.String("roles/firebase.admin"),
* Member: pulumi.String("user:[email protected] "),
* Condition: &folder.IAMMemberConditionArgs{
* Title: pulumi.String("expires_after_2019_12_31"),
* Description: pulumi.String("Expiring at midnight of 2019-12-31"),
* Expression: pulumi.String("request.time < timestamp(\"2020-01-01T00:00:00Z\")"),
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.gcp.folder.IAMMember;
* import com.pulumi.gcp.folder.IAMMemberArgs;
* import com.pulumi.gcp.folder.inputs.IAMMemberConditionArgs;
* 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 folder = new IAMMember("folder", IAMMemberArgs.builder()
* .folder("folders/1234567")
* .role("roles/firebase.admin")
* .member("user:[email protected] ")
* .condition(IAMMemberConditionArgs.builder()
* .title("expires_after_2019_12_31")
* .description("Expiring at midnight of 2019-12-31")
* .expression("request.time < timestamp(\"2020-01-01T00:00:00Z\")")
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* folder:
* type: gcp:folder:IAMMember
* properties:
* folder: folders/1234567
* role: roles/firebase.admin
* member: user:[email protected]
* condition:
* title: expires_after_2019_12_31
* description: Expiring at midnight of 2019-12-31
* expression: request.time < timestamp("2020-01-01T00:00:00Z")
* ```
*
* ## gcp.folder.IamAuditConfig
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const folder = new gcp.folder.IamAuditConfig("folder", {
* folder: "folders/1234567",
* service: "allServices",
* auditLogConfigs: [
* {
* logType: "ADMIN_READ",
* },
* {
* logType: "DATA_READ",
* exemptedMembers: ["user:joebloggs@example.com"],
* },
* ],
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* folder = gcp.folder.IamAuditConfig("folder",
* folder="folders/1234567",
* service="allServices",
* audit_log_configs=[
* {
* "log_type": "ADMIN_READ",
* },
* {
* "log_type": "DATA_READ",
* "exempted_members": ["user:joebloggs@example.com"],
* },
* ])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var folder = new Gcp.Folder.IamAuditConfig("folder", new()
* {
* Folder = "folders/1234567",
* Service = "allServices",
* AuditLogConfigs = new[]
* {
* new Gcp.Folder.Inputs.IamAuditConfigAuditLogConfigArgs
* {
* LogType = "ADMIN_READ",
* },
* new Gcp.Folder.Inputs.IamAuditConfigAuditLogConfigArgs
* {
* LogType = "DATA_READ",
* ExemptedMembers = new[]
* {
* "user:[email protected] ",
* },
* },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/folder"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := folder.NewIamAuditConfig(ctx, "folder", &folder.IamAuditConfigArgs{
* Folder: pulumi.String("folders/1234567"),
* Service: pulumi.String("allServices"),
* AuditLogConfigs: folder.IamAuditConfigAuditLogConfigArray{
* &folder.IamAuditConfigAuditLogConfigArgs{
* LogType: pulumi.String("ADMIN_READ"),
* },
* &folder.IamAuditConfigAuditLogConfigArgs{
* LogType: pulumi.String("DATA_READ"),
* ExemptedMembers: pulumi.StringArray{
* pulumi.String("user:[email protected] "),
* },
* },
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.gcp.folder.IamAuditConfig;
* import com.pulumi.gcp.folder.IamAuditConfigArgs;
* import com.pulumi.gcp.folder.inputs.IamAuditConfigAuditLogConfigArgs;
* 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 folder = new IamAuditConfig("folder", IamAuditConfigArgs.builder()
* .folder("folders/1234567")
* .service("allServices")
* .auditLogConfigs(
* IamAuditConfigAuditLogConfigArgs.builder()
* .logType("ADMIN_READ")
* .build(),
* IamAuditConfigAuditLogConfigArgs.builder()
* .logType("DATA_READ")
* .exemptedMembers("user:[email protected] ")
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* folder:
* type: gcp:folder:IamAuditConfig
* properties:
* folder: folders/1234567
* service: allServices
* auditLogConfigs:
* - logType: ADMIN_READ
* - logType: DATA_READ
* exemptedMembers:
* - user:[email protected]
* ```
*
* ## gcp.folder.IAMBinding
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const folder = new gcp.folder.IAMBinding("folder", {
* folder: "folders/1234567",
* role: "roles/editor",
* members: ["user:jane@example.com"],
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* folder = gcp.folder.IAMBinding("folder",
* folder="folders/1234567",
* role="roles/editor",
* members=["user:jane@example.com"])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var folder = new Gcp.Folder.IAMBinding("folder", new()
* {
* Folder = "folders/1234567",
* Role = "roles/editor",
* Members = new[]
* {
* "user:[email protected] ",
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/folder"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := folder.NewIAMBinding(ctx, "folder", &folder.IAMBindingArgs{
* Folder: pulumi.String("folders/1234567"),
* Role: pulumi.String("roles/editor"),
* Members: pulumi.StringArray{
* pulumi.String("user:[email protected] "),
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.gcp.folder.IAMBinding;
* import com.pulumi.gcp.folder.IAMBindingArgs;
* 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 folder = new IAMBinding("folder", IAMBindingArgs.builder()
* .folder("folders/1234567")
* .role("roles/editor")
* .members("user:[email protected] ")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* folder:
* type: gcp:folder:IAMBinding
* properties:
* folder: folders/1234567
* role: roles/editor
* members:
* - user:[email protected]
* ```
*
* With IAM Conditions:
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const folder = new gcp.folder.IAMBinding("folder", {
* folder: "folders/1234567",
* role: "roles/container.admin",
* members: ["user:jane@example.com"],
* condition: {
* title: "expires_after_2019_12_31",
* description: "Expiring at midnight of 2019-12-31",
* expression: "request.time < timestamp(\"2020-01-01T00:00:00Z\")",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* folder = gcp.folder.IAMBinding("folder",
* folder="folders/1234567",
* role="roles/container.admin",
* members=["user:jane@example.com"],
* condition={
* "title": "expires_after_2019_12_31",
* "description": "Expiring at midnight of 2019-12-31",
* "expression": "request.time < timestamp(\"2020-01-01T00:00:00Z\")",
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var folder = new Gcp.Folder.IAMBinding("folder", new()
* {
* Folder = "folders/1234567",
* Role = "roles/container.admin",
* Members = new[]
* {
* "user:[email protected] ",
* },
* Condition = new Gcp.Folder.Inputs.IAMBindingConditionArgs
* {
* Title = "expires_after_2019_12_31",
* Description = "Expiring at midnight of 2019-12-31",
* Expression = "request.time < timestamp(\"2020-01-01T00:00:00Z\")",
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/folder"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := folder.NewIAMBinding(ctx, "folder", &folder.IAMBindingArgs{
* Folder: pulumi.String("folders/1234567"),
* Role: pulumi.String("roles/container.admin"),
* Members: pulumi.StringArray{
* pulumi.String("user:[email protected] "),
* },
* Condition: &folder.IAMBindingConditionArgs{
* Title: pulumi.String("expires_after_2019_12_31"),
* Description: pulumi.String("Expiring at midnight of 2019-12-31"),
* Expression: pulumi.String("request.time < timestamp(\"2020-01-01T00:00:00Z\")"),
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.gcp.folder.IAMBinding;
* import com.pulumi.gcp.folder.IAMBindingArgs;
* import com.pulumi.gcp.folder.inputs.IAMBindingConditionArgs;
* 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 folder = new IAMBinding("folder", IAMBindingArgs.builder()
* .folder("folders/1234567")
* .role("roles/container.admin")
* .members("user:[email protected] ")
* .condition(IAMBindingConditionArgs.builder()
* .title("expires_after_2019_12_31")
* .description("Expiring at midnight of 2019-12-31")
* .expression("request.time < timestamp(\"2020-01-01T00:00:00Z\")")
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* folder:
* type: gcp:folder:IAMBinding
* properties:
* folder: folders/1234567
* role: roles/container.admin
* members:
* - user:[email protected]
* condition:
* title: expires_after_2019_12_31
* description: Expiring at midnight of 2019-12-31
* expression: request.time < timestamp("2020-01-01T00:00:00Z")
* ```
*
* ## gcp.folder.IAMMember
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const folder = new gcp.folder.IAMMember("folder", {
* folder: "folders/1234567",
* role: "roles/editor",
* member: "user:[email protected] ",
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* folder = gcp.folder.IAMMember("folder",
* folder="folders/1234567",
* role="roles/editor",
* member="user:[email protected] ")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var folder = new Gcp.Folder.IAMMember("folder", new()
* {
* Folder = "folders/1234567",
* Role = "roles/editor",
* Member = "user:[email protected] ",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/folder"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := folder.NewIAMMember(ctx, "folder", &folder.IAMMemberArgs{
* Folder: pulumi.String("folders/1234567"),
* Role: pulumi.String("roles/editor"),
* Member: pulumi.String("user:[email protected] "),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.gcp.folder.IAMMember;
* import com.pulumi.gcp.folder.IAMMemberArgs;
* 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 folder = new IAMMember("folder", IAMMemberArgs.builder()
* .folder("folders/1234567")
* .role("roles/editor")
* .member("user:[email protected] ")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* folder:
* type: gcp:folder:IAMMember
* properties:
* folder: folders/1234567
* role: roles/editor
* member: user:[email protected]
* ```
*
* With IAM Conditions:
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const folder = new gcp.folder.IAMMember("folder", {
* folder: "folders/1234567",
* role: "roles/firebase.admin",
* member: "user:[email protected] ",
* condition: {
* title: "expires_after_2019_12_31",
* description: "Expiring at midnight of 2019-12-31",
* expression: "request.time < timestamp(\"2020-01-01T00:00:00Z\")",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* folder = gcp.folder.IAMMember("folder",
* folder="folders/1234567",
* role="roles/firebase.admin",
* member="user:[email protected] ",
* condition={
* "title": "expires_after_2019_12_31",
* "description": "Expiring at midnight of 2019-12-31",
* "expression": "request.time < timestamp(\"2020-01-01T00:00:00Z\")",
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var folder = new Gcp.Folder.IAMMember("folder", new()
* {
* Folder = "folders/1234567",
* Role = "roles/firebase.admin",
* Member = "user:[email protected] ",
* Condition = new Gcp.Folder.Inputs.IAMMemberConditionArgs
* {
* Title = "expires_after_2019_12_31",
* Description = "Expiring at midnight of 2019-12-31",
* Expression = "request.time < timestamp(\"2020-01-01T00:00:00Z\")",
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/folder"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := folder.NewIAMMember(ctx, "folder", &folder.IAMMemberArgs{
* Folder: pulumi.String("folders/1234567"),
* Role: pulumi.String("roles/firebase.admin"),
* Member: pulumi.String("user:[email protected] "),
* Condition: &folder.IAMMemberConditionArgs{
* Title: pulumi.String("expires_after_2019_12_31"),
* Description: pulumi.String("Expiring at midnight of 2019-12-31"),
* Expression: pulumi.String("request.time < timestamp(\"2020-01-01T00:00:00Z\")"),
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.gcp.folder.IAMMember;
* import com.pulumi.gcp.folder.IAMMemberArgs;
* import com.pulumi.gcp.folder.inputs.IAMMemberConditionArgs;
* 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 folder = new IAMMember("folder", IAMMemberArgs.builder()
* .folder("folders/1234567")
* .role("roles/firebase.admin")
* .member("user:[email protected] ")
* .condition(IAMMemberConditionArgs.builder()
* .title("expires_after_2019_12_31")
* .description("Expiring at midnight of 2019-12-31")
* .expression("request.time < timestamp(\"2020-01-01T00:00:00Z\")")
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* folder:
* type: gcp:folder:IAMMember
* properties:
* folder: folders/1234567
* role: roles/firebase.admin
* member: user:[email protected]
* condition:
* title: expires_after_2019_12_31
* description: Expiring at midnight of 2019-12-31
* expression: request.time < timestamp("2020-01-01T00:00:00Z")
* ```
*
* ## gcp.folder.IamAuditConfig
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const folder = new gcp.folder.IamAuditConfig("folder", {
* folder: "folders/1234567",
* service: "allServices",
* auditLogConfigs: [
* {
* logType: "ADMIN_READ",
* },
* {
* logType: "DATA_READ",
* exemptedMembers: ["user:joebloggs@example.com"],
* },
* ],
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* folder = gcp.folder.IamAuditConfig("folder",
* folder="folders/1234567",
* service="allServices",
* audit_log_configs=[
* {
* "log_type": "ADMIN_READ",
* },
* {
* "log_type": "DATA_READ",
* "exempted_members": ["user:joebloggs@example.com"],
* },
* ])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var folder = new Gcp.Folder.IamAuditConfig("folder", new()
* {
* Folder = "folders/1234567",
* Service = "allServices",
* AuditLogConfigs = new[]
* {
* new Gcp.Folder.Inputs.IamAuditConfigAuditLogConfigArgs
* {
* LogType = "ADMIN_READ",
* },
* new Gcp.Folder.Inputs.IamAuditConfigAuditLogConfigArgs
* {
* LogType = "DATA_READ",
* ExemptedMembers = new[]
* {
* "user:[email protected] ",
* },
* },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/folder"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := folder.NewIamAuditConfig(ctx, "folder", &folder.IamAuditConfigArgs{
* Folder: pulumi.String("folders/1234567"),
* Service: pulumi.String("allServices"),
* AuditLogConfigs: folder.IamAuditConfigAuditLogConfigArray{
* &folder.IamAuditConfigAuditLogConfigArgs{
* LogType: pulumi.String("ADMIN_READ"),
* },
* &folder.IamAuditConfigAuditLogConfigArgs{
* LogType: pulumi.String("DATA_READ"),
* ExemptedMembers: pulumi.StringArray{
* pulumi.String("user:[email protected] "),
* },
* },
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.gcp.folder.IamAuditConfig;
* import com.pulumi.gcp.folder.IamAuditConfigArgs;
* import com.pulumi.gcp.folder.inputs.IamAuditConfigAuditLogConfigArgs;
* 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 folder = new IamAuditConfig("folder", IamAuditConfigArgs.builder()
* .folder("folders/1234567")
* .service("allServices")
* .auditLogConfigs(
* IamAuditConfigAuditLogConfigArgs.builder()
* .logType("ADMIN_READ")
* .build(),
* IamAuditConfigAuditLogConfigArgs.builder()
* .logType("DATA_READ")
* .exemptedMembers("user:[email protected] ")
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* folder:
* type: gcp:folder:IamAuditConfig
* properties:
* folder: folders/1234567
* service: allServices
* auditLogConfigs:
* - logType: ADMIN_READ
* - logType: DATA_READ
* exemptedMembers:
* - user:[email protected]
* ```
*
* ## Import
* ### Importing Audit Configs
* An audit config can be imported into a `google_folder_iam_audit_config` resource using the resource's `folder_id` and the `service`, e.g:
* * `"folder/{{folder_id}} foo.googleapis.com"`
* An `import` block (Terraform v1.5.0 and later) can be used to import audit configs:
* tf
* import {
* id = "folder/{{folder_id}} foo.googleapis.com"
* to = google_folder_iam_audit_config.default
* }
* The `pulumi import` command can also be used:
* ```sh
* $ pulumi import gcp:folder/iamAuditConfig:IamAuditConfig default "folder/{{folder_id}} foo.googleapis.com"
* ```
* @property auditLogConfigs The configuration for logging of each type of permission. This can be specified multiple times. Structure is documented below.
* @property folder The resource name of the folder the policy is attached to. Its format is folders/{folder_id}.
* @property service Service which will be enabled for audit logging. The special value `allServices` covers all services. Note that if there are gcp.folder.IamAuditConfig resources covering both `allServices` and a specific service then the union of the two AuditConfigs is used for that service: the `log_types` specified in each `audit_log_config` are enabled, and the `exempted_members` in each `audit_log_config` are exempted.
*/
public data class IamAuditConfigArgs(
public val auditLogConfigs: Output>? = null,
public val folder: Output? = null,
public val service: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.folder.IamAuditConfigArgs =
com.pulumi.gcp.folder.IamAuditConfigArgs.builder()
.auditLogConfigs(
auditLogConfigs?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.folder(folder?.applyValue({ args0 -> args0 }))
.service(service?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [IamAuditConfigArgs].
*/
@PulumiTagMarker
public class IamAuditConfigArgsBuilder internal constructor() {
private var auditLogConfigs: Output>? = null
private var folder: Output? = null
private var service: Output? = null
/**
* @param value The configuration for logging of each type of permission. This can be specified multiple times. Structure is documented below.
*/
@JvmName("bwyjjsdgxxqfesrx")
public suspend fun auditLogConfigs(`value`: Output>) {
this.auditLogConfigs = value
}
@JvmName("guxcjgynmtnymsfr")
public suspend fun auditLogConfigs(vararg values: Output) {
this.auditLogConfigs = Output.all(values.asList())
}
/**
* @param values The configuration for logging of each type of permission. This can be specified multiple times. Structure is documented below.
*/
@JvmName("lrsihyyamcmxvqmh")
public suspend fun auditLogConfigs(values: List>) {
this.auditLogConfigs = Output.all(values)
}
/**
* @param value The resource name of the folder the policy is attached to. Its format is folders/{folder_id}.
*/
@JvmName("qvgflejdtemeuuyt")
public suspend fun folder(`value`: Output) {
this.folder = value
}
/**
* @param value Service which will be enabled for audit logging. The special value `allServices` covers all services. Note that if there are gcp.folder.IamAuditConfig resources covering both `allServices` and a specific service then the union of the two AuditConfigs is used for that service: the `log_types` specified in each `audit_log_config` are enabled, and the `exempted_members` in each `audit_log_config` are exempted.
*/
@JvmName("rxsfgmagjqgqdxfr")
public suspend fun service(`value`: Output) {
this.service = value
}
/**
* @param value The configuration for logging of each type of permission. This can be specified multiple times. Structure is documented below.
*/
@JvmName("gjfvfrfmjcdrmafu")
public suspend fun auditLogConfigs(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.auditLogConfigs = mapped
}
/**
* @param argument The configuration for logging of each type of permission. This can be specified multiple times. Structure is documented below.
*/
@JvmName("hjaohhurobvsruwl")
public suspend fun auditLogConfigs(argument: List Unit>) {
val toBeMapped = argument.toList().map {
IamAuditConfigAuditLogConfigArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.auditLogConfigs = mapped
}
/**
* @param argument The configuration for logging of each type of permission. This can be specified multiple times. Structure is documented below.
*/
@JvmName("lhsierxipkxdaqjv")
public suspend fun auditLogConfigs(vararg argument: suspend IamAuditConfigAuditLogConfigArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map {
IamAuditConfigAuditLogConfigArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.auditLogConfigs = mapped
}
/**
* @param argument The configuration for logging of each type of permission. This can be specified multiple times. Structure is documented below.
*/
@JvmName("ggerepuxpdqxlyms")
public suspend fun auditLogConfigs(argument: suspend IamAuditConfigAuditLogConfigArgsBuilder.() -> Unit) {
val toBeMapped = listOf(
IamAuditConfigAuditLogConfigArgsBuilder().applySuspend {
argument()
}.build(),
)
val mapped = of(toBeMapped)
this.auditLogConfigs = mapped
}
/**
* @param values The configuration for logging of each type of permission. This can be specified multiple times. Structure is documented below.
*/
@JvmName("bdvrkwfmfpwuqfgb")
public suspend fun auditLogConfigs(vararg values: IamAuditConfigAuditLogConfigArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.auditLogConfigs = mapped
}
/**
* @param value The resource name of the folder the policy is attached to. Its format is folders/{folder_id}.
*/
@JvmName("ufkirjqhortqqgki")
public suspend fun folder(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.folder = mapped
}
/**
* @param value Service which will be enabled for audit logging. The special value `allServices` covers all services. Note that if there are gcp.folder.IamAuditConfig resources covering both `allServices` and a specific service then the union of the two AuditConfigs is used for that service: the `log_types` specified in each `audit_log_config` are enabled, and the `exempted_members` in each `audit_log_config` are exempted.
*/
@JvmName("ogqefxafgqlhoigi")
public suspend fun service(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.service = mapped
}
internal fun build(): IamAuditConfigArgs = IamAuditConfigArgs(
auditLogConfigs = auditLogConfigs,
folder = folder,
service = service,
)
}