@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
103 lines • 4.09 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.CustomLogSource = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Resource for managing an AWS Security Lake Custom Log Source.
*
* > **NOTE:** The underlying `aws.securitylake.DataLake` must be configured before creating the `aws.securitylake.CustomLogSource`. Use a `dependsOn` statement.
*
* ## Example Usage
*
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.securitylake.CustomLogSource("example", {
* sourceName: "example-name",
* sourceVersion: "1.0",
* eventClasses: ["FILE_ACTIVITY"],
* configuration: {
* crawlerConfiguration: {
* roleArn: customLog.arn,
* },
* providerIdentity: {
* externalId: "example-id",
* principal: "123456789012",
* },
* },
* }, {
* dependsOn: [exampleAwsSecuritylakeDataLake],
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import Custom log sources using the source name. For example:
*
* ```sh
* $ pulumi import aws:securitylake/customLogSource:CustomLogSource example example-name
* ```
*/
class CustomLogSource extends pulumi.CustomResource {
/**
* Get an existing CustomLogSource 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 CustomLogSource(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of CustomLogSource. 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'] === CustomLogSource.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["attributes"] = state?.attributes;
resourceInputs["configuration"] = state?.configuration;
resourceInputs["eventClasses"] = state?.eventClasses;
resourceInputs["providerDetails"] = state?.providerDetails;
resourceInputs["region"] = state?.region;
resourceInputs["sourceName"] = state?.sourceName;
resourceInputs["sourceVersion"] = state?.sourceVersion;
}
else {
const args = argsOrState;
if (args?.sourceName === undefined && !opts.urn) {
throw new Error("Missing required property 'sourceName'");
}
resourceInputs["configuration"] = args?.configuration;
resourceInputs["eventClasses"] = args?.eventClasses;
resourceInputs["region"] = args?.region;
resourceInputs["sourceName"] = args?.sourceName;
resourceInputs["sourceVersion"] = args?.sourceVersion;
resourceInputs["attributes"] = undefined /*out*/;
resourceInputs["providerDetails"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(CustomLogSource.__pulumiType, name, resourceInputs, opts);
}
}
exports.CustomLogSource = CustomLogSource;
/** @internal */
CustomLogSource.__pulumiType = 'aws:securitylake/customLogSource:CustomLogSource';
//# sourceMappingURL=customLogSource.js.map