Amazon Connect管理者がAWSコンソールにログインする場合のポリシーを検討します
- AWSコンソールログインできる
- 対象となるConnectインスタンス以外は操作できない
- 対象となるConnectインスタンスのみ操作できる
- 通話記録・チャット記録、エクスポートされたレポートを参照できる(S3)
{ | |
"actions": [ | |
{ | |
"id": "uid-000", | |
"type": "SE_Start", | |
"meta": {}, | |
"controls": {}, | |
"ports": { | |
"done": "uid-101" | |
}, |
{ | |
"actions": [ | |
{ | |
"id": "uid-start", | |
"type": "SE_Start", | |
"meta": {}, | |
"controls": {}, | |
"ports": { | |
"done": "uid-001" | |
}, |
{ | |
"actions": [ | |
{ | |
"id": "uid-start", | |
"type": "SE_Start", | |
"meta": {}, | |
"controls": {}, | |
"ports": { | |
"done": "uid-001" | |
}, |
{ | |
"actions": [ | |
{ | |
"id": "0", | |
"type": "SE_Start", | |
"meta": {}, | |
"controls": {}, | |
"ports": { | |
"done": "1" | |
}, |
# usage in AWS Lambda: | |
from lexv2_utils import IntentBase | |
class MyIntentClass(IntentBase): | |
# Implements a behavior your bot. | |
def do_fulfillment(self) -> dict: | |
# Implements a your logic | |
message = { | |
'contentType': 'PlainText', |
exports.handler = async (event) => { | |
event.Records.map(({kinesis}) => { | |
const payload = Buffer.from(kinesis.data, 'base64').toString(); | |
outputlog(JSON.parse(payload)); | |
}); | |
return {statusCode: 200}; | |
}; | |
function outputlog({EventType, EventTimestamp, CurrentAgentSnapshot}) { | |
if (EventType === 'HEART_BEAT') return; |
import boto3 | |
from datetime import datetime | |
def get_events(log_group_name, log_stream_name, region_name=None): | |
""" | |
Get all event messages of a group and stream from CloudWatch Logs AWS | |
""" | |
client = boto3.client('logs', region_name=region_name) |
def getValue(key, items): | |
""" | |
Get value from list of dict that has "Key" and "Value" key. | |
""" | |
values = [x['Value'] for x in items if 'Key' in x and 'Value' in x and x['Key'] == key] | |
return values[0] if values else None | |
# 使用例 | |
items = [{'Key': 'Name', 'Value': 'apple'}, |
Hoge p = new Hoge(); | |
p.code = '0001'; | |
p.name = 'hogename1'; | |
p.items = new List<HogeItem>{ | |
new HogeItem('0001-01', 'item001'), | |
new HogeItem('0001-02', 'item002') | |
}; | |
JSONGenerator jg = JSON.createGenerator(false); | |
jg.writeObject(p); |