Why do I get an Access denied error while trying to get a Voximplant's call recording?
Executing JS command: CreateRecorder with params
[{id = XbLsgTUlSyyAxa4MSsbkMNOGqAi0jk4BgV42WGFC8b0 ; } ; {classification = {} ; expireSuffix = ; hd_audio = false ; language = ; lossless = false ; name = ; provider = google ; record_name_prefix = ; s3 = {} ; secure = false ; transcribe = false ; video = true ; videoopt = {mixing = true ; } ; } ; ]
You probably have secured storage option enabled in your application.
You can disable it (three dots menu in your application) or use authorization to access the records:
https://voximplant.com/docs/guides/managementapi/authorization
Related
I am creating Redis in AWS using Terraform. But When I execute terraform apply command for first time it creates without issues. But If I re-run Terraform apply below TF code destroys the Redis and starts re-creating it instead it should tell me that it already exists start focusing on other newly added resources .
Is it expected behaviour of Redis?
Adding terraform plan in the question:
-/+ resource "aws_elasticache_replication_group" "redis" {
apply_immediately = true
at_rest_encryption_enabled = true
auto_minor_version_upgrade = false
automatic_failover_enabled = true
+ configuration_endpoint_address = (known after apply)
engine = "redis"
engine_version = "5.0.4"
~ id = "dev-af-redis" -> (known after apply)
maintenance_window = "sun:06:00-sun:07:00"
~ member_clusters = [
- "ca-cng-dev-af-redis-001",
- "ca-cng-dev-af-redis-002",
] -> (known after apply)
node_type = "cache.t2.medium"
~ number_cache_clusters = 2 -> (known after apply)
parameter_group_name = "default.redis5.0"
port = 6379
~ primary_endpoint_address = "master.dev-af-redis.qxyj8a.euc1.cache.amazonaws.com" -> (known after apply)
replication_group_description = "Airflow Cluster"
replication_group_id = "dev-af-redis"
security_group_ids = [
"sg-094175ad3062da04d",
]
~ security_group_names = [] -> (known after apply)
- snapshot_retention_limit = 0 -> null
~ snapshot_window = "02:30-03:30" -> (known after apply)
subnet_group_name = "dev-subnet-group-airflow"
tags = {
"Application" = "project"
"BusinessUnit" = "subproject"
"Classification" = "private"
"Environment" = "development"
"Name" = "dev-airflow-redis"
"TechnicalOwner" = "ops"
"Tier" = "orchestration"
}
transit_encryption_enabled = true
+ cluster_mode {
+ num_node_groups = 1
+ replicas_per_node_group = 1 # forces replacement
}
}
Plan: 1 to add, 0 to change, 1 to destroy.
TF code which used to create Redis:-
resource "aws_elasticache_replication_group" "cng_redis" {
replication_group_description = "Cluster"
replication_group_id = "dev-af-redis"
engine = "redis"
engine_version = "5.0.4"
node_type = "cache.t2.medium "
port = 6379
subnet_group_name = "dev-subnet-group-airflow"
security_group_ids = ["${aws_security_group.airflow_sg.id}"]
parameter_group_name = "default.redis5.0"
at_rest_encryption_enabled = true
transit_encryption_enabled = true
maintenance_window = "sun:06:00-sun:07:00"
auto_minor_version_upgrade = false
apply_immediately = true
automatic_failover_enabled = true
cluster_mode {
num_node_groups = "1"
replicas_per_node_group = "1"
}
tags = merge(
var.common_tags,
map("Classification", "private"),
map("Name", "airflow-redis")
)
}
Here is a solution ("this is not a bug, it's a feature" case, I suppose ;) ): https://github.com/terraform-providers/terraform-provider-aws/issues/4817#issuecomment-463993424
I tested it and it works.
You have to add parameter group with cluster-enabled set to yes.
I'm using Redis 5.0.5, so to my aws_elasticache_replication_group I added:
resource "aws_elasticache_replication_group" "elc-rep-group" {
...
automatic_failover_enabled = true #this is required, when cluster-enabled parameter is on
parameter_group_name = "default.redis5.0.cluster.on"
...
}
I'm creating a module to make easy to provision a BigQuery table in GCP.
My module is working, but now I'm trying to add the option to create the table based in external data, like a GCS bucket.
In the doc (https://www.terraform.io/docs/providers/google/r/bigquery_table.html#external_data_configuration) are saying this configuration is supported, but I get only this error:
Acquiring state lock. This may take a few moments...
Error: Unsupported block type
on ../../modules/bq_table/main.tf line 24, in resource "google_bigquery_table" "default":
24: external_data_configuration {
Blocks of type "external_data_configuration" are not expected here.
Im using the last Terraform version (0.12.5) and google provider v2.10.0 in Mac OS.
Here is my module code in HCL2:
resource "google_bigquery_table" "default" {
dataset_id = "${terraform.workspace}_${var.bq_dataset_id}"
table_id = "${terraform.workspace}_${var.bq_table_id}"
project = (var.project_id != "" ? var.project_id : null)
description = (var.bq_table_description != "" ? var.project_id : null)
expiration_time = (var.bq_table_expiration_time != null ? var.project_id : null)
friendly_name = (var.bq_table_name != "" ? var.project_id : null)
dynamic "external_data_configuration" {
for_each = var.bq_table_external_data_configuration
content {
autodetect = true
source_format = "NEWLINE_DELIMITED_JSON"
source_uris = [external_data_configuration.value]
}
}
time_partitioning {
type = "DAY"
field = var.bq_table_partition_field
}
labels = var.bq_table_labels
schema = (var.bq_table_schema != "" ? var.bq_table_schema : null)
dynamic "view" {
for_each = (var.bq_table_view_query != "" ? {query = var.bq_table_view_query} : {})
content {
query = view.value
}
}
depends_on = ["null_resource.depends_on"]
}
Above im using Dynamic blocks, but tried to use normally and the error is the same.
The for_each property inside your dynamic block expects an array value. Try wrapping the input variable in an array:
dynamic "external_data_configuration" {
for_each = var.bq_table_external_data_configuration ? [var.bq_table_external_data_configuration] : []
content {
autodetect = true
source_format = "NEWLINE_DELIMITED_JSON"
source_uris = [external_data_configuration.value]
}
}
Conditional blocks are still a bit of a hassle even after Terraform 0.12; read here for more.
I'm using AWS Lex API for sending message to Their Service (AWS Lex)
But it gives me an error
Concurrent Client Requests: Encountered resource conflict while saving session data
here is my code
user_id = params[:appUser][:_id]
intercept = Intercept.find_by_user_id(user_id)
begin
app_id = params[:app][:_id]
text = params[:messages][0][:text]
platform = params[:appUser][:clients][0][:platform]
status = params[:appUser][:devices][0][:active]
unless params[:appUser][:userId].nil? && params[:appUser][:userId].eql?("19980216")
CreateInterceptWorker.perform_async(app_id,status,platform,user_id)
end
CreateMessageUserWorker.perform_async(user_id,params[:messages][0][:name],text,params[:messages][0][:_id])
unless intercept.nil? || intercept.is_human.eql?(true)
bot = App.find_by_app_id(app_id).bot
publish_alias = bot.publish_aliases.last.name
response = #lex_runtime.post_text( bot_name: bot.name,bot_alias: publish_alias,input_text: text,user_id: user_id)
text_response = response.message
message_post_body = SmoochApi::MessagePost.new( text: text_response,role: 'appMaker',type: 'text')
binding.pry
result = #api_instance.post_message(app_id, user_id, message_post_body)
CreateMessageMakerWorker.perform_async(result.message.author_id,result.message.text,result.message._id,user_id)
end
rescue Exception => x
message_post_body = SmoochApi::MessagePost.new( text: x,role: 'appMaker',type: 'text')
result = #api_instance.post_message(app_id, user_id, message_post_body)
end
I am trying to automate drag and drop between two File Explorers on windows OS. I could find online help to drag and drop implementation for Browsers.
But no help for drag and drop for file to another File Explorer.
Use for this the Shell.Application object. To get the selection from the explorer you can use the following function:
;===============================================================================
; Function Name....: _ActiveExplorer_GetSelected
; Description......: Creates an array with
; - Count of selected files/folder
; - Path of active Explorer window and
; - the path/es of selected file/s /folder
; Requirement(s)...: Opened Explorer window
; Return Value(s)..: Array with data, $a[0] = Count, $a[1] = Folderpath, $a[2..] = File/Foldername
; .................: ATTENTION! Last index $a[0]+1 !!
; Author(s)........: BugFix ( AutoIt#bug-fix.info )
;===============================================================================
Func _ActiveExplorer_GetSelected()
Local $oShell = ObjCreate("Shell.Application")
Local $oExplorer, $sPath, $oFolderView, $iCount = 0, $sSelectedFiles = '', $n = 2
Local $oShellWindows = $oShell.Windows
For $i = 0 To $oShellWindows.Count -1
$oExplorer = $oShellWindows($i)
$sPath = StringReplace(StringReplace(StringTrimLeft($oExplorer.LocationURL, 8), '%20', ' '), '/', '\')
If WinGetTitle('[ACTIVE]') = $sPath Then ExitLoop
Next
$oFolderView = $oExplorer.Document.SelectedItems()
$iCount = $oFolderView.Count
Local $aOut[$iCount +2]
$aOut[0] = $iCount
$aOut[1] = $sPath
If $iCount = 0 Then
Return ''
Else
For $oFolderItem In $oFolderView
$aOut[$n] = $oFolderItem.Name
$n += 1
Next
Return $aOut
EndIf
EndFunc ; ==>_ActiveExplorer_GetSelected
I am trying to create 3 notifications with 10 seconds gap. However, It only plays the first sound and it repeats forever with 10 seconds gap. Can you please examine my code and tell me what I am doing wrong?
local futureTime = 10 --10 seconds
local sounds = {"Icebaby.mp3", "Pokemon.mp3", "Yoshi.mp3"}
i=1
local options = {
alert = "Wake up!",
sound = "Icebaby.mp3" ,
custom = { msg = "Alarm" }
}
local notificationID = system.scheduleNotification( futureTime, options )
local function notificationListener( event )
system.cancelNotification(notificationID)
i=i+1
options.sound=sounds[i]
if(i>3) then
Runtime:removeEventListener ( "notification", notificationListener )
else
notificationID = system.scheduleNotification( futureTime, options )
end
end
Runtime:addEventListener( "notification", notificationListener )
1st problem: "It only plays the first sound"
-> Yes, because you don't change the options table. So it's always this options table:
local options = {
alert = "Wake up!",
sound = "Icebaby.mp3" ,
custom = { msg = "Alarm" }
}
Change the options table each time you create the next notification. For example use your "sounds" table!