UNPKG

@pulumi/aws

Version:

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

353 lines • 13.4 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 * * ### Identity Schema * * #### Required * * - `arn` (String) Amazon Resource Name (ARN) of the Chime SDK media insights pipeline configuration. * * Using `pulumi import`, import Chime SDK Media Pipelines Media Insights Pipeline Configuration using the `id`. For example: * * console * * % pulumi import aws_chimesdkmediapipelines_media_insights_pipeline_configuration.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, { ...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?.arn; resourceInputs["elements"] = state?.elements; resourceInputs["name"] = state?.name; resourceInputs["realTimeAlertConfiguration"] = state?.realTimeAlertConfiguration; resourceInputs["region"] = state?.region; resourceInputs["resourceAccessRoleArn"] = state?.resourceAccessRoleArn; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; } else { const args = argsOrState; if (args?.elements === undefined && !opts.urn) { throw new Error("Missing required property 'elements'"); } if (args?.resourceAccessRoleArn === undefined && !opts.urn) { throw new Error("Missing required property 'resourceAccessRoleArn'"); } resourceInputs["elements"] = args?.elements; resourceInputs["name"] = args?.name; resourceInputs["realTimeAlertConfiguration"] = args?.realTimeAlertConfiguration; resourceInputs["region"] = args?.region; resourceInputs["resourceAccessRoleArn"] = args?.resourceAccessRoleArn; resourceInputs["tags"] = args?.tags; 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