UNPKG

@pulumi/gcp

Version:

A Pulumi package for creating and managing Google Cloud Platform resources.

91 lines 3.83 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.IamAuditConfig = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Allows management of audit logging config for a given service for a Google Cloud Platform Organization. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const config = new gcp.organizations.IamAuditConfig("config", { * orgId: "your-organization-id", * service: "allServices", * auditLogConfigs: [{ * logType: "DATA_READ", * exemptedMembers: ["user:joebloggs@example.com"], * }], * }); * ``` * * ## Import * * IAM audit config imports use the identifier of the resource in question and the service, e.g. * * ```sh * $ pulumi import gcp:organizations/iamAuditConfig:IamAuditConfig config "your-organization-id foo.googleapis.com" * ``` */ class IamAuditConfig extends pulumi.CustomResource { /** * Get an existing IamAuditConfig resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, state, opts) { return new IamAuditConfig(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of IamAuditConfig. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === IamAuditConfig.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["auditLogConfigs"] = state ? state.auditLogConfigs : undefined; resourceInputs["etag"] = state ? state.etag : undefined; resourceInputs["orgId"] = state ? state.orgId : undefined; resourceInputs["service"] = state ? state.service : undefined; } else { const args = argsOrState; if ((!args || args.auditLogConfigs === undefined) && !opts.urn) { throw new Error("Missing required property 'auditLogConfigs'"); } if ((!args || args.orgId === undefined) && !opts.urn) { throw new Error("Missing required property 'orgId'"); } if ((!args || args.service === undefined) && !opts.urn) { throw new Error("Missing required property 'service'"); } resourceInputs["auditLogConfigs"] = args ? args.auditLogConfigs : undefined; resourceInputs["orgId"] = args ? args.orgId : undefined; resourceInputs["service"] = args ? args.service : undefined; resourceInputs["etag"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(IamAuditConfig.__pulumiType, name, resourceInputs, opts); } } exports.IamAuditConfig = IamAuditConfig; /** @internal */ IamAuditConfig.__pulumiType = 'gcp:organizations/iamAuditConfig:IamAuditConfig'; //# sourceMappingURL=iamAuditConfig.js.map