@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
116 lines • 4.97 kB
JavaScript
;
// *** 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.SourceIamMember = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* A Cloud Security Command Center's (Cloud SCC) finding source. A finding
* source is an entity or a mechanism that can produce a finding. A source is
* like a container of findings that come from the same scanner, logger,
* monitor, etc.
*
* To get more information about Source, see:
*
* * [API documentation](https://cloud.google.com/security-command-center/docs/reference/rest/v1/organizations.sources)
* * How-to Guides
* * [Official Documentation](https://cloud.google.com/security-command-center/docs)
*
* ## Example Usage
*
* ### Scc Source Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const customSource = new gcp.securitycenter.Source("custom_source", {
* displayName: "My Source",
* organization: "123456789",
* description: "My custom Cloud Security Command Center Finding Source",
* });
* ```
*
* ## Import
*
* Source can be imported using any of these accepted formats:
*
* * `organizations/{{organization}}/sources/{{name}}`
*
* * `{{organization}}/{{name}}`
*
* When using the `pulumi import` command, Source can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:securitycenter/sourceIamMember:SourceIamMember default organizations/{{organization}}/sources/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:securitycenter/sourceIamMember:SourceIamMember default {{organization}}/{{name}}
* ```
*/
class SourceIamMember extends pulumi.CustomResource {
/**
* Get an existing SourceIamMember 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 SourceIamMember(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of SourceIamMember. 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'] === SourceIamMember.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["condition"] = state ? state.condition : undefined;
resourceInputs["etag"] = state ? state.etag : undefined;
resourceInputs["member"] = state ? state.member : undefined;
resourceInputs["organization"] = state ? state.organization : undefined;
resourceInputs["role"] = state ? state.role : undefined;
resourceInputs["source"] = state ? state.source : undefined;
}
else {
const args = argsOrState;
if ((!args || args.member === undefined) && !opts.urn) {
throw new Error("Missing required property 'member'");
}
if ((!args || args.organization === undefined) && !opts.urn) {
throw new Error("Missing required property 'organization'");
}
if ((!args || args.role === undefined) && !opts.urn) {
throw new Error("Missing required property 'role'");
}
if ((!args || args.source === undefined) && !opts.urn) {
throw new Error("Missing required property 'source'");
}
resourceInputs["condition"] = args ? args.condition : undefined;
resourceInputs["member"] = args ? args.member : undefined;
resourceInputs["organization"] = args ? args.organization : undefined;
resourceInputs["role"] = args ? args.role : undefined;
resourceInputs["source"] = args ? args.source : undefined;
resourceInputs["etag"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(SourceIamMember.__pulumiType, name, resourceInputs, opts);
}
}
exports.SourceIamMember = SourceIamMember;
/** @internal */
SourceIamMember.__pulumiType = 'gcp:securitycenter/sourceIamMember:SourceIamMember';
//# sourceMappingURL=sourceIamMember.js.map