@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
153 lines • 6.41 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.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, Object.assign(Object.assign({}, 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 ? state.dataRetention : undefined;
resourceInputs["disabled"] = state ? state.disabled : undefined;
resourceInputs["mediaInsightsConfiguration"] = state ? state.mediaInsightsConfiguration : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["streamingNotificationTargets"] = state ? state.streamingNotificationTargets : undefined;
resourceInputs["voiceConnectorId"] = state ? state.voiceConnectorId : undefined;
}
else {
const args = argsOrState;
if ((!args || args.dataRetention === undefined) && !opts.urn) {
throw new Error("Missing required property 'dataRetention'");
}
if ((!args || args.voiceConnectorId === undefined) && !opts.urn) {
throw new Error("Missing required property 'voiceConnectorId'");
}
resourceInputs["dataRetention"] = args ? args.dataRetention : undefined;
resourceInputs["disabled"] = args ? args.disabled : undefined;
resourceInputs["mediaInsightsConfiguration"] = args ? args.mediaInsightsConfiguration : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["streamingNotificationTargets"] = args ? args.streamingNotificationTargets : undefined;
resourceInputs["voiceConnectorId"] = args ? args.voiceConnectorId : undefined;
}
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