UNPKG

@pulumi/aws

Version:

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

153 lines 6.14 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.VoiceConnectorStreaming = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Adds a streaming configuration for the specified Amazon Chime Voice Connector. The streaming configuration specifies whether media streaming is enabled for sending to Amazon Kinesis. * It also sets the retention period, in hours, for the Amazon Kinesis data. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const _default = new aws.chime.VoiceConnector("default", { * name: "vc-name-test", * requireEncryption: true, * }); * const defaultVoiceConnectorStreaming = new aws.chime.VoiceConnectorStreaming("default", { * disabled: false, * voiceConnectorId: _default.id, * dataRetention: 7, * streamingNotificationTargets: ["SQS"], * }); * ``` * * ### Example Usage With Media Insights * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const _default = new aws.chime.VoiceConnector("default", { * name: "vc-name-test", * requireEncryption: true, * }); * const assumeRole = aws.iam.getPolicyDocument({ * statements: [{ * effect: "Allow", * principals: [{ * type: "Service", * identifiers: ["mediapipelines.chime.amazonaws.com"], * }], * actions: ["sts:AssumeRole"], * }], * }); * const exampleRole = new aws.iam.Role("example", { * name: "ExampleResourceAccessRole", * assumeRolePolicy: assumeRole.then(assumeRole => assumeRole.json), * }); * const exampleStream = new aws.kinesis.Stream("example", { * name: "ExampleStream", * shardCount: 2, * }); * const example = new aws.chimesdkmediapipelines.MediaInsightsPipelineConfiguration("example", { * name: "ExampleConfig", * resourceAccessRoleArn: exampleRole.arn, * elements: [ * { * type: "AmazonTranscribeCallAnalyticsProcessor", * amazonTranscribeCallAnalyticsProcessorConfiguration: { * languageCode: "en-US", * }, * }, * { * type: "KinesisDataStreamSink", * kinesisDataStreamSinkConfiguration: { * insightsTarget: exampleStream.arn, * }, * }, * ], * }); * const defaultVoiceConnectorStreaming = new aws.chime.VoiceConnectorStreaming("default", { * disabled: false, * voiceConnectorId: _default.id, * dataRetention: 7, * streamingNotificationTargets: ["SQS"], * mediaInsightsConfiguration: { * disabled: false, * configurationArn: example.arn, * }, * }); * ``` * * ## Import * * Using `pulumi import`, import Chime Voice Connector Streaming using the `voice_connector_id`. For example: * * ```sh * $ pulumi import aws:chime/voiceConnectorStreaming:VoiceConnectorStreaming default abcdef1ghij2klmno3pqr4 * ``` */ class VoiceConnectorStreaming extends pulumi.CustomResource { /** * Get an existing VoiceConnectorStreaming 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 VoiceConnectorStreaming(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of VoiceConnectorStreaming. 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'] === VoiceConnectorStreaming.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["dataRetention"] = state?.dataRetention; resourceInputs["disabled"] = state?.disabled; resourceInputs["mediaInsightsConfiguration"] = state?.mediaInsightsConfiguration; resourceInputs["region"] = state?.region; resourceInputs["streamingNotificationTargets"] = state?.streamingNotificationTargets; resourceInputs["voiceConnectorId"] = state?.voiceConnectorId; } else { const args = argsOrState; if (args?.dataRetention === undefined && !opts.urn) { throw new Error("Missing required property 'dataRetention'"); } if (args?.voiceConnectorId === undefined && !opts.urn) { throw new Error("Missing required property 'voiceConnectorId'"); } resourceInputs["dataRetention"] = args?.dataRetention; resourceInputs["disabled"] = args?.disabled; resourceInputs["mediaInsightsConfiguration"] = args?.mediaInsightsConfiguration; resourceInputs["region"] = args?.region; resourceInputs["streamingNotificationTargets"] = args?.streamingNotificationTargets; resourceInputs["voiceConnectorId"] = args?.voiceConnectorId; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(VoiceConnectorStreaming.__pulumiType, name, resourceInputs, opts); } } exports.VoiceConnectorStreaming = VoiceConnectorStreaming; /** @internal */ VoiceConnectorStreaming.__pulumiType = 'aws:chime/voiceConnectorStreaming:VoiceConnectorStreaming'; //# sourceMappingURL=voiceConnectorStreaming.js.map