UNPKG

@pulumi/aws

Version:

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

108 lines 4.31 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.Stream = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a Kinesis Stream resource. Amazon Kinesis is a managed service that * scales elastically for real-time processing of streaming big data. * * For more details, see the [Amazon Kinesis Documentation](https://aws.amazon.com/documentation/kinesis/). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const testStream = new aws.kinesis.Stream("test_stream", { * name: "kinesis-test", * shardCount: 1, * retentionPeriod: 48, * shardLevelMetrics: [ * "IncomingBytes", * "OutgoingBytes", * ], * streamModeDetails: { * streamMode: "PROVISIONED", * }, * tags: { * Environment: "test", * }, * }); * ``` * * ## Import * * Using `pulumi import`, import Kinesis Streams using the `name`. For example: * * ```sh * $ pulumi import aws:kinesis/stream:Stream test_stream pulumi-kinesis-test * ``` */ class Stream extends pulumi.CustomResource { /** * Get an existing Stream 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 Stream(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Stream. 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'] === Stream.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["arn"] = state?.arn; resourceInputs["encryptionType"] = state?.encryptionType; resourceInputs["enforceConsumerDeletion"] = state?.enforceConsumerDeletion; resourceInputs["kmsKeyId"] = state?.kmsKeyId; resourceInputs["name"] = state?.name; resourceInputs["region"] = state?.region; resourceInputs["retentionPeriod"] = state?.retentionPeriod; resourceInputs["shardCount"] = state?.shardCount; resourceInputs["shardLevelMetrics"] = state?.shardLevelMetrics; resourceInputs["streamModeDetails"] = state?.streamModeDetails; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; } else { const args = argsOrState; resourceInputs["arn"] = args?.arn; resourceInputs["encryptionType"] = args?.encryptionType; resourceInputs["enforceConsumerDeletion"] = args?.enforceConsumerDeletion; resourceInputs["kmsKeyId"] = args?.kmsKeyId; resourceInputs["name"] = args?.name; resourceInputs["region"] = args?.region; resourceInputs["retentionPeriod"] = args?.retentionPeriod; resourceInputs["shardCount"] = args?.shardCount; resourceInputs["shardLevelMetrics"] = args?.shardLevelMetrics; resourceInputs["streamModeDetails"] = args?.streamModeDetails; resourceInputs["tags"] = args?.tags; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Stream.__pulumiType, name, resourceInputs, opts); } } exports.Stream = Stream; /** @internal */ Stream.__pulumiType = 'aws:kinesis/stream:Stream'; //# sourceMappingURL=stream.js.map