UNPKG

@pulumi/aws

Version:

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

347 lines • 13.6 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.MediaInsightsPipelineConfiguration = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Resource for managing an AWS Chime SDK Media Pipelines Media Insights Pipeline Configuration. * Consult the [Call analytics developer guide](https://docs.aws.amazon.com/chime-sdk/latest/dg/call-analytics.html) for more detailed information about usage. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.kinesis.Stream("example", { * name: "example", * shardCount: 2, * }); * const mediaPipelinesAssumeRole = aws.iam.getPolicyDocument({ * statements: [{ * effect: "Allow", * principals: [{ * type: "Service", * identifiers: ["mediapipelines.chime.amazonaws.com"], * }], * actions: ["sts:AssumeRole"], * }], * }); * const callAnalyticsRole = new aws.iam.Role("call_analytics_role", { * name: "CallAnalyticsRole", * assumeRolePolicy: mediaPipelinesAssumeRole.then(mediaPipelinesAssumeRole => mediaPipelinesAssumeRole.json), * }); * const myConfiguration = new aws.chimesdkmediapipelines.MediaInsightsPipelineConfiguration("my_configuration", { * name: "MyBasicConfiguration", * resourceAccessRoleArn: callAnalyticsRole.arn, * elements: [ * { * type: "AmazonTranscribeCallAnalyticsProcessor", * amazonTranscribeCallAnalyticsProcessorConfiguration: { * languageCode: "en-US", * }, * }, * { * type: "KinesisDataStreamSink", * kinesisDataStreamSinkConfiguration: { * insightsTarget: example.arn, * }, * }, * ], * tags: { * Key1: "Value1", * Key2: "Value2", * }, * }); * ``` * * - The required policies on `callAnalyticsRole` will vary based on the selected processors. See [Call analytics resource access role](https://docs.aws.amazon.com/chime-sdk/latest/dg/ca-resource-access-role.html) for directions on choosing appropriate policies. * * ### Transcribe Call Analytics processor usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const transcribeAssumeRole = aws.iam.getPolicyDocument({ * statements: [{ * effect: "Allow", * principals: [{ * type: "Service", * identifiers: ["transcribe.amazonaws.com"], * }], * actions: ["sts:AssumeRole"], * }], * }); * const postCallRole = new aws.iam.Role("post_call_role", { * name: "PostCallAccessRole", * assumeRolePolicy: transcribeAssumeRole.then(transcribeAssumeRole => transcribeAssumeRole.json), * }); * const myConfiguration = new aws.chimesdkmediapipelines.MediaInsightsPipelineConfiguration("my_configuration", { * name: "MyCallAnalyticsConfiguration", * resourceAccessRoleArn: exampleAwsIamRole.arn, * elements: [ * { * type: "AmazonTranscribeCallAnalyticsProcessor", * amazonTranscribeCallAnalyticsProcessorConfiguration: { * callAnalyticsStreamCategories: [ * "category_1", * "category_2", * ], * contentRedactionType: "PII", * enablePartialResultsStabilization: true, * filterPartialResults: true, * languageCode: "en-US", * languageModelName: "MyLanguageModel", * partialResultsStability: "high", * piiEntityTypes: "ADDRESS,BANK_ACCOUNT_NUMBER", * postCallAnalyticsSettings: { * contentRedactionOutput: "redacted", * dataAccessRoleArn: postCallRole.arn, * outputEncryptionKmsKeyId: "MyKmsKeyId", * outputLocation: "s3://MyBucket", * }, * vocabularyFilterMethod: "mask", * vocabularyFilterName: "MyVocabularyFilter", * vocabularyName: "MyVocabulary", * }, * }, * { * type: "KinesisDataStreamSink", * kinesisDataStreamSinkConfiguration: { * insightsTarget: example.arn, * }, * }, * ], * }); * ``` * * ### Real time alerts usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const myConfiguration = new aws.chimesdkmediapipelines.MediaInsightsPipelineConfiguration("my_configuration", { * name: "MyRealTimeAlertConfiguration", * resourceAccessRoleArn: callAnalyticsRole.arn, * elements: [ * { * type: "AmazonTranscribeCallAnalyticsProcessor", * amazonTranscribeCallAnalyticsProcessorConfiguration: { * languageCode: "en-US", * }, * }, * { * type: "KinesisDataStreamSink", * kinesisDataStreamSinkConfiguration: { * insightsTarget: example.arn, * }, * }, * ], * realTimeAlertConfiguration: { * disabled: false, * rules: [ * { * type: "IssueDetection", * issueDetectionConfiguration: { * ruleName: "MyIssueDetectionRule", * }, * }, * { * type: "KeywordMatch", * keywordMatchConfiguration: { * keywords: [ * "keyword1", * "keyword2", * ], * negate: false, * ruleName: "MyKeywordMatchRule", * }, * }, * { * type: "Sentiment", * sentimentConfiguration: { * ruleName: "MySentimentRule", * sentimentType: "NEGATIVE", * timePeriod: 60, * }, * }, * ], * }, * }); * ``` * * ### Transcribe processor usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const myConfiguration = new aws.chimesdkmediapipelines.MediaInsightsPipelineConfiguration("my_configuration", { * name: "MyTranscribeConfiguration", * resourceAccessRoleArn: exampleAwsIamRole.arn, * elements: [ * { * type: "AmazonTranscribeProcessor", * amazonTranscribeProcessorConfiguration: { * contentIdentificationType: "PII", * enablePartialResultsStabilization: true, * filterPartialResults: true, * languageCode: "en-US", * languageModelName: "MyLanguageModel", * partialResultsStability: "high", * piiEntityTypes: "ADDRESS,BANK_ACCOUNT_NUMBER", * showSpeakerLabel: true, * vocabularyFilterMethod: "mask", * vocabularyFilterName: "MyVocabularyFilter", * vocabularyName: "MyVocabulary", * }, * }, * { * type: "KinesisDataStreamSink", * kinesisDataStreamSinkConfiguration: { * insightsTarget: example.arn, * }, * }, * ], * }); * ``` * * ### Voice analytics processor usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const myConfiguration = new aws.chimesdkmediapipelines.MediaInsightsPipelineConfiguration("my_configuration", { * name: "MyVoiceAnalyticsConfiguration", * resourceAccessRoleArn: example.arn, * elements: [ * { * type: "VoiceAnalyticsProcessor", * voiceAnalyticsProcessorConfiguration: { * speakerSearchStatus: "Enabled", * voiceToneAnalysisStatus: "Enabled", * }, * }, * { * type: "LambdaFunctionSink", * lambdaFunctionSinkConfiguration: { * insightsTarget: "arn:aws:lambda:us-west-2:1111111111:function:MyFunction", * }, * }, * { * type: "SnsTopicSink", * snsTopicSinkConfiguration: { * insightsTarget: "arn:aws:sns:us-west-2:1111111111:topic/MyTopic", * }, * }, * { * type: "SqsQueueSink", * sqsQueueSinkConfiguration: { * insightsTarget: "arn:aws:sqs:us-west-2:1111111111:queue/MyQueue", * }, * }, * { * type: "KinesisDataStreamSink", * kinesisDataStreamSinkConfiguration: { * insightsTarget: test.arn, * }, * }, * ], * }); * ``` * * ### S3 Recording sink usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const myConfiguration = new aws.chimesdkmediapipelines.MediaInsightsPipelineConfiguration("my_configuration", { * name: "MyS3RecordingConfiguration", * resourceAccessRoleArn: example.arn, * elements: [{ * type: "S3RecordingSink", * s3RecordingSinkConfiguration: { * destination: "arn:aws:s3:::MyBucket", * }, * }], * }); * ``` * * ## Import * * Using `pulumi import`, import Chime SDK Media Pipelines Media Insights Pipeline Configuration using the `id`. For example: * * ```sh * $ pulumi import aws:chimesdkmediapipelines/mediaInsightsPipelineConfiguration:MediaInsightsPipelineConfiguration example abcdef123456 * ``` */ class MediaInsightsPipelineConfiguration extends pulumi.CustomResource { /** * Get an existing MediaInsightsPipelineConfiguration 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 MediaInsightsPipelineConfiguration(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of MediaInsightsPipelineConfiguration. 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'] === MediaInsightsPipelineConfiguration.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["arn"] = state ? state.arn : undefined; resourceInputs["elements"] = state ? state.elements : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["realTimeAlertConfiguration"] = state ? state.realTimeAlertConfiguration : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["resourceAccessRoleArn"] = state ? state.resourceAccessRoleArn : undefined; resourceInputs["tags"] = state ? state.tags : undefined; resourceInputs["tagsAll"] = state ? state.tagsAll : undefined; } else { const args = argsOrState; if ((!args || args.elements === undefined) && !opts.urn) { throw new Error("Missing required property 'elements'"); } if ((!args || args.resourceAccessRoleArn === undefined) && !opts.urn) { throw new Error("Missing required property 'resourceAccessRoleArn'"); } resourceInputs["elements"] = args ? args.elements : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["realTimeAlertConfiguration"] = args ? args.realTimeAlertConfiguration : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["resourceAccessRoleArn"] = args ? args.resourceAccessRoleArn : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["arn"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(MediaInsightsPipelineConfiguration.__pulumiType, name, resourceInputs, opts); } } exports.MediaInsightsPipelineConfiguration = MediaInsightsPipelineConfiguration; /** @internal */ MediaInsightsPipelineConfiguration.__pulumiType = 'aws:chimesdkmediapipelines/mediaInsightsPipelineConfiguration:MediaInsightsPipelineConfiguration'; //# sourceMappingURL=mediaInsightsPipelineConfiguration.js.map