@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
86 lines • 3.65 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.VoiceConnectorLogging = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Adds a logging configuration for the specified Amazon Chime Voice Connector. The logging configuration specifies whether SIP message logs are enabled for sending to Amazon CloudWatch Logs.
*
* ## 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 defaultVoiceConnectorLogging = new aws.chime.VoiceConnectorLogging("default", {
* enableSipLogs: true,
* enableMediaMetricLogs: true,
* voiceConnectorId: _default.id,
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import Chime Voice Connector Logging using the `voice_connector_id`. For example:
*
* ```sh
* $ pulumi import aws:chime/voiceConnectorLogging:VoiceConnectorLogging default abcdef1ghij2klmno3pqr4
* ```
*/
class VoiceConnectorLogging extends pulumi.CustomResource {
/**
* Get an existing VoiceConnectorLogging 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 VoiceConnectorLogging(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of VoiceConnectorLogging. 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'] === VoiceConnectorLogging.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["enableMediaMetricLogs"] = state?.enableMediaMetricLogs;
resourceInputs["enableSipLogs"] = state?.enableSipLogs;
resourceInputs["region"] = state?.region;
resourceInputs["voiceConnectorId"] = state?.voiceConnectorId;
}
else {
const args = argsOrState;
if (args?.voiceConnectorId === undefined && !opts.urn) {
throw new Error("Missing required property 'voiceConnectorId'");
}
resourceInputs["enableMediaMetricLogs"] = args?.enableMediaMetricLogs;
resourceInputs["enableSipLogs"] = args?.enableSipLogs;
resourceInputs["region"] = args?.region;
resourceInputs["voiceConnectorId"] = args?.voiceConnectorId;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(VoiceConnectorLogging.__pulumiType, name, resourceInputs, opts);
}
}
exports.VoiceConnectorLogging = VoiceConnectorLogging;
/** @internal */
VoiceConnectorLogging.__pulumiType = 'aws:chime/voiceConnectorLogging:VoiceConnectorLogging';
//# sourceMappingURL=voiceConnectorLogging.js.map