UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

150 lines 5.83 kB
"use strict"; // *** 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.Subscriber = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Resource for managing an AWS Security Lake Subscriber. * * > **NOTE:** The underlying `aws.securitylake.DataLake` must be configured before creating the `aws.securitylake.Subscriber`. 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.Subscriber("example", { * subscriberName: "example-name", * accessType: "S3", * sources: [{ * awsLogSourceResource: { * sourceName: "ROUTE53", * sourceVersion: "1.0", * }, * }], * subscriberIdentity: { * externalId: "example", * principal: "1234567890", * }, * }, { * dependsOn: [exampleAwsSecuritylakeDataLake], * }); * ``` * * ### Multiple Log Sources * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.securitylake.Subscriber("example", { * subscriberName: "example-name", * accessType: "S3", * sources: [ * { * awsLogSourceResource: { * sourceName: "SH_FINDINGS", * sourceVersion: "2.0", * }, * }, * { * awsLogSourceResource: { * sourceName: "ROUTE53", * sourceVersion: "2.0", * }, * }, * ], * subscriberIdentity: { * externalId: "example", * principal: "1234567890", * }, * }, { * dependsOn: [exampleAwsSecuritylakeDataLake], * }); * ``` * * ## Import * * Using `pulumi import`, import Security Lake subscriber using the subscriber ID. For example: * * ```sh * $ pulumi import aws:securitylake/subscriber:Subscriber example 9f3bfe79-d543-474d-a93c-f3846805d208 * ``` */ class Subscriber extends pulumi.CustomResource { /** * Get an existing Subscriber 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 Subscriber(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Subscriber. 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'] === Subscriber.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["accessType"] = state?.accessType; resourceInputs["arn"] = state?.arn; resourceInputs["region"] = state?.region; resourceInputs["resourceShareArn"] = state?.resourceShareArn; resourceInputs["resourceShareName"] = state?.resourceShareName; resourceInputs["roleArn"] = state?.roleArn; resourceInputs["s3BucketArn"] = state?.s3BucketArn; resourceInputs["sources"] = state?.sources; resourceInputs["subscriberDescription"] = state?.subscriberDescription; resourceInputs["subscriberEndpoint"] = state?.subscriberEndpoint; resourceInputs["subscriberIdentity"] = state?.subscriberIdentity; resourceInputs["subscriberName"] = state?.subscriberName; resourceInputs["subscriberStatus"] = state?.subscriberStatus; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; resourceInputs["timeouts"] = state?.timeouts; } else { const args = argsOrState; resourceInputs["accessType"] = args?.accessType; resourceInputs["region"] = args?.region; resourceInputs["sources"] = args?.sources; resourceInputs["subscriberDescription"] = args?.subscriberDescription; resourceInputs["subscriberIdentity"] = args?.subscriberIdentity; resourceInputs["subscriberName"] = args?.subscriberName; resourceInputs["tags"] = args?.tags; resourceInputs["timeouts"] = args?.timeouts; resourceInputs["arn"] = undefined /*out*/; resourceInputs["resourceShareArn"] = undefined /*out*/; resourceInputs["resourceShareName"] = undefined /*out*/; resourceInputs["roleArn"] = undefined /*out*/; resourceInputs["s3BucketArn"] = undefined /*out*/; resourceInputs["subscriberEndpoint"] = undefined /*out*/; resourceInputs["subscriberStatus"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Subscriber.__pulumiType, name, resourceInputs, opts); } } exports.Subscriber = Subscriber; /** @internal */ Subscriber.__pulumiType = 'aws:securitylake/subscriber:Subscriber'; //# sourceMappingURL=subscriber.js.map