ntt communications cloudⁿ logging api マニュアルntt communications cloudⁿ logging api...

62
NTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の二次配布(配布・転載・提供等)は、ご遠慮ください。

Upload: others

Post on 18-Jul-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

NTT Communications

Cloudⁿ

Logging API マニュアル

Ver.1.1

本冊子掲載の内容の二次配布(配布・転載・提供等)は、ご遠慮ください。

Page 2: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

2

版数 編集日 変更内容

Ver.1.0 2014/06/05 初版作成

Ver1.1 2015/06/18 ログを保存する期間(RetentionPeriod)を最大35日から 100日へ変更

Page 3: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

3

目次

1 はじめに P4~ 1) サービスの概要

2) 事前に準備いただくもの

2 API リクエスト方法 P7~ 1) API リクエストの形式

2) リクエストを作成する

3) レスポンスを確認する

3 Logging サービスを利用する P12~ 1) LoggingServerGroup を作成する

2) LoggingServerGroup を表示する

3) LoggingServerを表示する

4) LoggingSourceを表示する

5) LoggingSecurityGroupを表示する

6) セキュリティルールを作成する

7) LoggingServerGroupを表示する

4 Logging API リファレンス P23~ 1) Logging API 共通情報

2) Logging API (Action )

巻末 P57~

1) OSS ライセンス

2) 諸元値

Page 4: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

4

本マニュアルでは、Cloudⁿ Loggingのご利用方法に関してご説明いたします。Cloudⁿ Loggingは

、お客様のログを一元的に収集し、ログの退避・保管、検索、アラート機能を提供するサービスです

。 手間のかかるログ管理タスクからお客様を解放し、お客様はビジネスに集中することができます。

主な提供機能は以下の通りです。

・Cloudⁿの他のサービスと同様に、初期投資は不要であり、お支払いいただくのは使用したリソー

スの分のみで、データ転送(I/O)は無料です。

・ログサーバは冗長化構成をとることができます(提供時期検討中)。お客様のクライアントでログの

振り分け設定を頂くと、ログサーバに障害が発生した場合に処理を継続できます。

・一定期間でCloudⁿ Object Storageへバックアップを実施します。

1-1) サービスの概要

※本サービスを利用するためには事前にCloudⁿ Object Storageを利用している必要があります。

※本サービスは以下のオープンソース・ソフトウェアを利用してサービス提供しております。

fluentd, Elasticsearch, Kibana, nginx

それぞれのライセンス条項については巻末に記載しております

ログサーバ (LoggingServer)

Cloudⁿ Compute のログ

ログはローテートされ、 Cloudⁿ Object Storageに保管

ログの横断検索

アラート

Cloudⁿ Object Storage

お客様 Web のログ

お客様 アプリケーションのログ

Page 5: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

5

以下のAPIはAmazon Web Service(AWS)では存在しません。簡単に基本概念を説明します。

1-1) サービスの概要

LoggingServerGroup(ログサーバグループ)

複数のLoggingServer(ログサーバ)を束ねる単位です。このLoggingServerGroupに

LoggingServerを追加することでクラスタを組み、冗長化構成を取ることが可能です(提供時期検討中)。また、LoggingSource(ログソース)、LoggingSecurityGroup(ログセキュリティグループ)、LoggingFilter(ログフィルタ)等、ログサーバへ反映される各種設定をここで行います。本オブジェクトは、お客様が最初に作成を行うオブジェクトになります。2014年6月5日時点では、LoggingServerGroupにLoggingServer1個までという制約を設けています。

LoggingServer(ログサーバ)

ログ収集機能を実現するサーバインスタンスです。本サーバ上のログ収集用のポートに向け、お客様がログを送信することで、ログの蓄積、検索ができるようになります。

LoggingSource(ログソース)

ログサーバに対するログの収集方法を規定します。LoggingServerGroupを作成すると、デフォルトで2つのログソースが作成されます。(syslog UDP, ポート番号5140,

fluentdのin-forward TCP/UDP, ポート番号24224)

LoggingSecurityGroup(ログセキュリティグループ)

ログサーバへアクセス制御設定する単位です。アクセス元のIPアドレスとポート番号によるホワイトリスト形式で登録します。

LoggingFilter(ログフィルタ)

収集したログデータからマッチ条件に合致したログを抽出することができます。LoggingAction(ログアクション)と組み合わせて利用することでマッチした場合のアクションを実行することができます。マッチ条件には正規表現を利用します。

LoggingAction(ログアクション)

LoggingFilter(ログフィルタ)でマッチ条件に合致したログに対するアクションを定義します。アクションは現在はメール送信機能を用意しており、 LoggingFilterと組み合わせ、ログ内に特定のキーワード(例:FATAL)にマッチした場合にメール通知を行うことができます。

Page 6: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

6

1-2) 事前に準備いただくもの

Logging サービスの利用開始

Cloudⁿ ポータルより、Logging サービスの利用を開始して下さい。サービスの利用開始方法については、「Cloudⁿ ポータル操作マニュアル」の「3-1) サービスの利用を開始する」を参照下さい。

Cloudⁿ Logging API をご利用頂くにあたっては、以下のものをご用意ください。

Cloudⁿ サービス共通の API アクセスキーおよび秘密鍵

Cloudⁿ ポータルにて、Logging API 利用に必要な「サービス共通」のAPI アクセスキー、および秘密鍵をご確認下さい。確認方法については、「 Cloudⁿ ポータル操作マニュアル」 の「3-3) API アクセスキー・秘密鍵を管理する」を参照下さい。

Logging サービスを利用する、Compute ( FLAT タイプ)上に作成された仮想サーバー

Cloudⁿ Logging サービスにおいて、Logging を利用するサーバー (クライアントサーバー)として、 Compute ( FLATタイプ/東日本 ) の仮想サーバー ( Linux系OS / CentOS , Ubuntu )をご利用いただきますと、そのログ管理を Logging にて管理することが可能です。

仮想サーバーの作成方法については、「Cloudⁿ Compute ( FLATタイプ ) 操作マニュアル」をご参照ください。

Cloudn Obeject Storageのご利用

本サービスを利用するためには、Cloudn Object Storageのご利用が必要です。別途、ご利用開始してください。

Page 7: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

7

2-1) API リクエストの形式

本サービスでは、Logging サービスの LoggingServer 作成や削除を行うための API を提供しています。

API を使用することで、お客様のプログラムから直接リソースを操作することが可能です。また、本 API は AmazonWebService 互換API ( 2012-04-23 Version )です。なお、サービスを利用するための接続先 URL である、API Server ( endpoint ) URL は以下の通りです。

[ API リクエストの形式 ]

API リクエストは、以下のように Query API 形式で送信します。

上記では例としてインスタンスを作成する CreateLoggingServerGroup を記載しています。

API リクエストは、主に命令の種類とそのオプションの値を含み、下記の要素で構成されます。

https://logging-api.jp-e1.cloudn-service.com/?Action=CreateLoggingServerGroup&identifier=CloudnServerGroupIdentifier&AWSAccessKeyId=<APIKEY>&SignatureMethod=HmacSHA256&SignatureVersion=2&Version=2013-04-23&Timestamp=2014-04-30T13%3A14%3A18%2B09%3A00&Signature=azZmCbQ3Dz4GZ64qhnlzdWW93QRUJONAdH3G%2F4ei3s8%3D

1.https://logging-api.jp-e1.cloudn-service.com/ 2.?Action=CreateLoggingServerGroup& 3.Identifier=CloudnServerGroupIdentifier& 4.AWSAccessKeyId=<APIKEY>& 5.SignatureMethod=HmacSHA256& 6.SignatureVersion=2& 7.Version=2013-04-23& 8.Timestamp=2014-04-30T13%3A14%3A18%2B09%3A00& 9.Signature=azZmCbQ3Dz4GZ64qhnlzdWW93QRUJONAdH3G%2F4ei3s8%3D

1行目: API サーバー / エンドポイント URL

2行目: Cloudⁿ Logging へのコマンド

3行目: コマンドに渡すオプションとその値

4-9行目: 署名情報

以降でリクエスト本文に署名を付ける手順を説明します。

リージョン名 リージョン API Server(endpoint) プロトコル

東日本リージョン jp-e1 logging-api.jp-e1.cloudn-service.com https

Page 8: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

8

2-2) リクエストを作成する

APIリクエストには、リクエスト内容を保証するために、署名 ( Signature ) を加えます。署名は、リク

エスト本文 ( 1の要素を元に作成 ) を元に、ユーザの SECRETKEY と HMAC-SHA-256 ハッシュア

ルゴリズムを組み合わせて作成します。 予めサービス利用に必要な公開鍵と秘密鍵を配布してい

ます。サービス上ではこれを APIKEY と SECRETKEY と呼びます。APIKEY と SECRETKEY につい

ては事前に配布されている物をご利用下さい。 以下では、ログサーバグループ作成を例に、署名と

HTTPリクエストの生成方法について解説します。

1

リクエストのコマンドパラメータを作成します。 ログサーバグループ作成を例に、Signature

以外のコマンドパラメータを記載します。ログサーバグループ作成時は、Action キーに

“CreateLoggingServerGroup” を指定します。

コマンド(パラメータ)=key 値(サンプル)=value

Action CreateLoggingServerGroup

Identifier CloudnServerGroupIdentifier

SignatureVersion 2

SignatureMethod HmacSHA256

Version 2013-04-23

Timestamp 2014-04-30T13%3A14%3A18%2B09%3A00

AWSAccessKeyId <APIKEY>

指定する key は、大文字小文字を区別します。

Timestamp key は、リクエスト発行時の時刻を iso8601 形式で作成します。

パラメータ詳細につきましては、「4 Logging API リファレンス」を参照してください。

Identifier はお客様が指定する識別子です。Uuid はシステムが自動発行する識別子です。

Identifier を省略した場合、Identifier には Uuid の値が自動的に設定されます。

コマンド(パラメータ)の詳細は 4-2) Logging API ( Action ) をご参照ください。

Page 9: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

9

2-2) リクエストを作成する

次に署名を作成します。

2

1で作成したコマンドパラメータを、ASCII の昇順で並べ替え、値を URL エンコードします。本操作は署名の作成のために行うもので、リクエスト本文自体が並べ替えられるわけではありません。(リクエスト本文はソートされている必要はありません)

key のソート順は、ASCII 昇順で、アルファベット順でない点にご注意ください。

3

2の各 key と value を、”=“ にてつないだものを ”&” で接続し、HTTP リクエストの要素を揃えて署名対象文字列の作成します。以下の文字列をここでは ”data” とします:

GET◁ logging-api.jp-e1.cloudn-service.com◁ /◁ ?AWSAccessKeyId=<APIKEY>&Action=CreateLoggingServerGroup&identifier=CloudnServerGroupIdentifier&SignatureMethod=HmacSHA256&SignatureVersion=2&Version=2013-04-23&Timestamp=2014-04-30T13%3A14%3A18%2B09%3A00

key のソート順は、ASCII 昇順で、アルファベット順でない点にご注意ください。

コマンド(パラメータ)=key 値(サンプル)=value

AWSAccessKeyId <APIKEY>

Action CreateLoggingServerGroup

Identifier CloudnServerGroupIdentifier

SignatureMethod HmacSHA256

SignatureVersion 2

Timestamp 2014-04-30T13%3A14%3A18%2B09%3A00

Version 2013-04-23

Page 10: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

10

2-2) リクエストを作成する

4

3で作成した文字列 ”data” に対して、HMAC-SHA256 と SECRETKEY から署名を生成し、

これを HTTP リクエストに含められるように Base64 でエンコードします。

HMAC-SHA256 :

OpenSSL 等のライブラリの機能を利用します

(例 : Ruby であれば gem ライブラリの “ruby-hmac(0.4.0)” など)

SECRETKEY :

弊社から配布された物をご利用ください

HMAC による署名サンプル:

5df60c66d6715d33c5b49af3428c0cbb84918a0baa96c29f3b32670a742bdc29

署名サンプル : ( Base64 エンコード後)

azZmCbQ3Dz4GZ64qhnlzdWW93QRUJONAdH3G%2F4ei3s8=

key のソート順は、ASCII昇順で、アルファベット順でない点にご注意ください。

5

署名 ( Signature ) をリクエスト本文に付け加え、リクエスト文字列を作成ます。パラメータのvalue は予めURLエンコードしておきます。コマンド、パラメータの記述を key = value ( value は URL エンコード済) とし、各パラメータを&で繋ぎます。なお、HTTP リクエストでは項目をソートする必要はありません。

Action=CreateLoggingServerGroup&identifier=CloudnServerGroupIdentifier&AWSAccessKeyId=<APIKEY>&Signa

tureMethod=HmacSHA256&SignatureVersion=2&Version=2013-04-23&Timestamp=2014-04-

30T13%3A14%3A18%2B09%3A00&Signature=azZmCbQ3Dz4GZ64qhnlzdWW93QRUJONAdH3G%2F4ei3s8%3D

※改行無しで作成。

6

作成したリクエスト本文を元に、HTTPS でGET リクエストを実行します。Cloudn Logging のエンドポイントは https://logging-api.jp-e1.cloudn-service.com/ です。

GET /?

Action=CreateLoggingServerGroup&identifier=CloudnServerGroupIdentifier&AWSAccessKeyId=<APIKEY>&Signa

tureMethod=HmacSHA256&SignatureVersion=2&Version=2013-04-23&Timestamp=2014-04-

30T13%3A14%3A18%2B09%3A00&Signature=azZmCbQ3Dz4GZ64qhnlzdWW93QRUJONAdH3G%2F4ei3s8%3D

※改行無しで作成。

Page 11: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

11

2-3) レスポンスを確認する

リクエストが成功すると、以下のような xml 形式でレスポンスが返ります。

<?xml version="1.0" encoding="UTF-8"?> <CreateLoggingServerGroupResponse> <Group> <Identifier>CloudnServerGroupSample</Identifier> <Uuid>log-u-group-a6e38de1-1ffb-439d-8fde-84abef4b7a82</Uuid> <Name/> <Description/> <Status>creating</Status> <RetentionPeriod>14</RetentionPeriod> <InstanceType>log.m1.medium</InstanceType> <DiskSize>40</DiskSize> <Servers/> <Sources/> <Filters/> </Group> </CreateLoggingServerGroupResponse>

Page 12: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

12

3-1) LoggingServerGroup を作成する

以下では、LoggingServerGroup の作成方法について、具体例をもとに説明いたします。

LoggingServerGroupを作成するリクエストを作成します。

Action キーに “CreateLoggingServerGroup” を指定し、作成したい LoggingServerGroup名を Identifier キーに指定します。

コマンド(パラメータ)=key 値(サンプル)=value

Action CreateLoggingServerGroup

Identifier CloudnServerGroupSample ※

Name CloudnSample ※

Description CloudnSampleLogging ※

InstanceClass log.m1.medium

RetentionPeriod 10

DiskSize 40

SignatureVersion 2

SignatureMethod HmacSHA256

Timestamp 2014-04-30T13%3A14%3A18%2B09%3A00

AWSAccessKeyId <APIKEY>

Version 2013-04-23

パラメータ詳細につきましては、「4 Logging API リファレンス」を参照してください。

value に指定する値のうち、「※」マークの項目は任意に設定してください。

Identifier はお客様が指定する識別子です。Uuid はシステムが自動発行する識別子

です。Identifier を省略した場合、Identifier には Uuid の値が自動的に設定されます。コマ

ンド(パラメータ)の詳細は 4-2) Logging API ( Action ) をご参照ください。

Page 13: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

13

3-1) LoggingServerGroup を作成する

2 リクエストが成功すると、以下のような xml 形式でレスポンスが返ります。

<?xml version="1.0" encoding="UTF-8"?> <CreateLoggingServerGroupResponse> <Group> <Identifier>CloudnServerGroupSample</Identifier> <Uuid>log-u-group-d12c1997-0d8d-4db3-ba67-0739d612b4c9</Uuid> <Name>CloudnSample</Name> <Description>CloudnSampleLogging</Description> <Status>creating</Status> <RetentionPeriod>14</RetentionPeriod> <InstanceClass>log.m1.medium</InstanceClass> <DiskSize>40</DiskSize> <Servers/> <Sources/> <Filters/> </Group> </CreateLoggingServerGroupResponse>

レスポンス内容のうち、<Status>タグの値が “active” であることを確認します。

もし、値が “creating” であれば、 LoggingServerGroup をまだ利用できません。

DescribeLoggingServerGroups を利用して、“active” であることを確認することができます。

<Uuid> はシステムが自動発行する識別子です。一意にリソース(この場合

LoggingServerGroup )を特定することができます。

また、 <RetentionPeriod> タグはログの保持する期間(日)、 <InstanceClass> タグはログ

サーバインスタンスの CPU/Memory サイズ(モデル名)、 <DiskSize> タグはログサーバイ

ンスタンスのDISKサイズ( GB )であることをそれぞれ表します。

CreateLoggingServerGroup APIを実行すると、LoggingServerが1個、LoggingSourceが2個、

LoggingSecurityGroupが1個、自動生成されます。

Page 14: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

14

3-2) LoggingServerGroup を表示する

以下では、3-1)で作成した LoggingServerGroup の表示方法について、具体例をもとに説明いたします。

LoggingServerGroup を表示するリクエストを作成します。

Action キーに “DescribeLoggingServerGroups” を指定し、表示したいLoggingServerGroup 名を Identifier キーに指定します。

Identifier キーを省略した場合、すべての LoggingServerGroup 情報が表示されます。

コマンド(パラメータ)=key 値(サンプル)=value

Action DescribeLoggingServerGroups

Identifier CloudnServerGroupSample

SignatureVersion 2

SignatureMethod HmacSHA256

Timestamp 2014-04-30T13%3A14%3A18%2B09%3A00

AWSAccessKeyId <APIKEY>

Version 2013-04-23

パラメータ詳細につきましては、「4 Logging API リファレンス」を参照してください。

Page 15: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

15

3-2) LoggingServerGroup を表示する

2 リクエストが成功すると、以下のような xml 形式でレスポンスが返ります。

<?xml version="1.0" encoding="UTF-8"?> <DescribeLoggingServerGroupsResponse> <Groups> <Group> <Identifier>CloudnServerGroupSample</Identifier> <Uuid>log-u-group-d12c1997-0d8d-4db3-ba67-0739d612b4c9</Uuid> <Name>CloudnSample</Name> <Description>CloudnSampleLogging</Description> <Status>active</Status> <RetentionPeriod>14</RetentionPeriod> <InstanceClass>log.m1.medium</InstanceClass> <DiskSize>40</DiskSize> <Servers> <Server> </Server> ・・・<省略> </Filter> </Filters> </Group> </Groups> </DescribeLoggingServerGroupsResponse>

レスポンス内容のうち、 <Status> タグの値が状態を表します。LoggingServerGroup では、以下の状態を返却します。 “active” : 利用可能 “creating” : 作成中 “modifying” : 処理中 “deleting” : 削除中

Page 16: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

16

3-3) LoggingServerを表示する

1 3-2)にて、DescribeLoggingServerGroups APIを実行することで、LoggingServerを表示できます。

リクエストが成功すると、以下のような xml 形式でレスポンスが返ります。

<?xml version="1.0" encoding="UTF-8"?> <DescribeLoggingServerGroupsResponse> …<省略> <Servers> <Server> <Identifier>CloudnServerGroupSample0</Identifier> <Uuid>log-u-server-b29a9486-3d14-415c-97d9-5087e02129160</Uuid> <Name>CloudnServerGroupSample0</Name> <Description>CloudnServerGroupSample0</Description> <Status>active</Status> <IpAddress></IpAddress> </Server> </Servers> …<省略> </DescribeLoggingSecurityGroupsResponse>

レスポンス内容のうち、 <Status> タグの値が状態を表します。LoggingSecurityGroup では、以下の状態を返却します。 “active” : 利用可能 “creating” : 作成中 “modifying” : 処理中 “deleting” : 削除中

Page 17: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

17

3-4) LoggingSourceを表示する

1 3-2)にて、DescribeLoggingServerGroups APIを実行することでLoggingSourceを表示できます。

リクエストが成功すると、以下のような xml 形式でレスポンスが返ります。

<?xml version="1.0" encoding="UTF-8"?> <DescribeLoggingServerGroupsResponse> …<省略> <Sources> <Source> <Identifier>syslog</Identifier> <Uuid>log-u-source-307266e3-8f18-4bc9-ab8c-00d10f889b50</Uuid> <Name>syslog</Name> <Description>syslog</Description> <LoggingType>syslog</LoggingType> <Tag>syslog</Tag> <Port>5140</Port> <Status>active</Status> </Source> <Source> <Identifier>td</Identifier> <Uuid>log-u-source-532a4031-6aee-4480-85a4-6b0d45dc8be6</Uuid> <Name>td</Name> <Description>td</Description> <LoggingType>td</LoggingType> <Tag></Tag> <Port>24224</Port> <Status>active</Status> </Source> </Sources> …<省略> </DescribeLoggingSecurityGroupsResponse>

レスポンス内容のうち、 <Status> タグの値が状態を表します。LoggingSecurityGroup では、以下の状態を返却します。 “active” : 利用可能 “creating” : 作成中 “modifying” : 処理中 “deleting” : 削除中

Page 18: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

18

3-5) LoggingSecurityGroup を表示する

1 3-2)にて、DescribeLoggingServerGroups APIを実行することでLoggingSecurityGroupを表示できます。

リクエストが成功すると、以下のような xml 形式でレスポンスが返ります。

<?xml version="1.0" encoding="UTF-8"?> <DescribeLoggingServerGroupsResponse> …<省略> <SecurityGroups> <SecurityGroup> <Identifier>CloudnServerGroupSample</Identifier> <Uuid>log-u-group-d12c1997-0d8d-4db3-ba67-0739d612b4c9</Uuid> <Name></Name> <Description></Description> <Status>active</Status> </SecurityGroup> </SecurityGroups> …<省略> </DescribeLoggingSecurityGroupsResponse>

レスポンス内容のうち、 <Status> タグの値が状態を表します。LoggingSecurityGroup では、以下の状態を返却します。 “active” : 利用可能 “creating” : 作成中 “modifying” : 処理中 “deleting” : 削除中

Page 19: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

19

3-6) セキュリティルールを作成する

次にお客様とのサーバーから LogginServerGruop に接続するためのセキュリティルールを作成します。

AuthorizeLoggingSecurityGroup を作成するリクエストを作成します。

Action キーに “AuthorizeLoggingSecurityGroup” を指定し、関連づけたいLoggingSecurityGroupのIdentifier キーを SecurityGroupIdentifier キーに指定します。

コマンド(パラメータ)=key 値(サンプル)=value

Action AuthorizeLoggingSecurityGroup

SecurityGroupIdentifier CloudnServerGroupSample

Identifier CloudnAuthorizeLoggingSecurityGroupSampleIdentifier ※

Name CloudnAuthorizeLoggingSecurityGroupSampleName ※

Description CloudnAuthorizeLoggingSecurityGroupSampleDescription ※

Protcol tcp

Cidr 192.168.1.1/24

Port 1150

SignatureVersion 2

SignatureMethod HmacSHA256

Timestamp 2014-04-30T13%3A14%3A18%2B09%3A00

AWSAccessKeyId <APIKEY>

Version 2013-02-23

パラメータ詳細につきましては、「4 Logging API リファレンス」を参照してください。

Cidr の指定は、設定時は URL エンコードを実施してください。

SecurityGroupIdentifier は3-1)で指定した値(LoggingServerGroupのIdentifier)を指定

することにより、このセキュリティルールと 3-1)で作成したLoggingSecurityGroupが関連づ

けられます。

value に指定する値のうち、「※」マークの項目は任意に設定してください。

Page 20: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

20

2 リクエストが成功すると、以下のような xml 形式でレスポンスが返ります。

<?xml version="1.0" encoding="UTF-8"?> <AuthorizeLoggingSecurityGroupResponse> <SecurityGroupRule> <Identifier>CloudnAuthorizeLoggingSecurityGroupSampleIdentifier</Identifier> <Uuid>log-u-rule-c325b69b-a4fd-499b-98fb-5a48ebd7d3a4</Uuid> <Name>CloudnAuthorizeLoggingSecurityGroupSampleName</Name> <Description>CloudnAuthorizeLoggingSecurityGroupSampleDescription</Description> <Status>creating</Status> <Direction>ingress</Direction> <Protocol>tcp</Protocol> <Cidr>192.168.1.1</Cidr> <Port>1150</Port> </SecurityGroupRule> </AuthorizeLoggingSecurityGroupResponse>

レスポンス内容のうち、<Status>タグの値が “active” であることを確認します。

もし、値が “creating” であれば、セキュリティルールはまだ利用できません。

<Uuid> はシステムが自動発行する識別子です。一意にリソース(この場合 セキュリティ

ルール)を特定することができます。

3-6) セキュリティルールを作成する

Page 21: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

21

3-7) LoggingServerGroup を削除する

以下では、3-1)で作成した LoggingServerGroup の削除方法について、具体例をもとに説明いたします。

LoggingServerGroup を削除するリクエストを作成します。

Action キーに “DeleteLoggingServerGroup” を指定し、削除したい LoggingServerGroup名を Identifier キーに指定します。

Identifier キーを省略した場合、HTTP Status Code : 400 にてエラーとなります。

コマンド(パラメータ)=key 値(サンプル)=value

Action DeleteLoggingServerGroup

Identifier CloudnServerGroupSampleIdentifier

SignatureVersion 2

SignatureMethod HmacSHA256

Timestamp 2014-04-30T13%3A14%3A18%2B09%3A00

AWSAccessKeyId <APIKEY>

Version 2013-04-23

パラメータ詳細につきましては、「4 Logging API リファレンス」を参照してください。

Page 22: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

22

2 リクエストが成功すると、以下のような xml 形式でレスポンスが返ります。

<?xml version="1.0" encoding="UTF-8"?> <DeleteLoggingServerGroupResponse> <Group> <Identifier>CloudnServerGroupSample</Identifier> <Uuid>log-u-group-d12c1997-0d8d-4db3-ba67-0739d612b4c9</Uuid> <Name>CloudnSample</Name> <Description>CloudnSampleLogging</Description> <Status>deleting</Status> <RetentionPeriod>1</RetentionPeriod> <InstanceClass>log.m1.medium</InstanceClass> <DiskSize>40</DiskSize> <Servers> <Server> <Identifier>server-identifier-1</Identifier> <Uuid>server-uuid-1</Uuid> <Name>name</Name> <Description>description</Description> <Status>active</Status> <IpAddress></IpAddress> </Server> </Servers> <Sources/> <Filters/> </Group> </DeleteLoggingServerGroupResponse>

3-7) LoggingServerGroup を削除する

レスポンス内容のうち、 <Status>タグの値が状態を表します。 LoggingServerGroup では、“deleting” (削除中)として返却されます。 削除処理が完了した場合、DescribeLoggingServerGroups にて確認すると削除した ServerGroup が表示されないことで、削除が完了したことを確認することができます。

Page 23: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

23

4-1) Logging API共通情報

本サービスにて提供しているAPI Server (End Point)は下記となります。 APIリクエストには、認証が必要です。認証に利用するパラメータは以下になります。 「AWAAccessKeyID」「SignatureVersion」「Timestamp」「Signature」 各パラメータの詳細は以下を参照ください。」

Common Query Parametersの

パラメーター名 説明 Required

Action 実行する action を指定します。 Yes

AWSAccessKeyID request の認証に必要な Logging の Secret Access Key に対となる Access Key ID を指定します。 Default : None Type : String

Yes

Signature API request のために作成されたデジタル署名です。 署名を生成する方法については、本書の1章をご参照ください。 Default : None Type : String

Yes

SignatureMethod API request に利用するデジタル署名生成の hash algorithm です。 固定文字列( 「HmacSHA256」 ※) を値として設定してください (※)括弧「」の中の値部分のみを設定ください。 Default : None Valid Values : HmacSHA256 Type : String

Yes

SignatureVersion シグネチャのバージョンは、リクエストに署名するために使用します。 SignatureVersion のバージョンは“2”のみ対応のため、”2”を設定してください。 Default : None

Yes

Timestamp APIのrequestを発出した日時を指定します。表記方法は ISO8601 形式で「YYYY-MM-DDThh:mm:ssZ」※という形式で設定してください。 (※)括弧「」の中の値部分のみを設定ください。 Default : None Type : String

Yes

Version 使用するAPIの Version です。 「2013-04-23」 ※ を値として設定してください。 (※)括弧「」の中の値部分のみを設定ください。 Type : String

Yes

リージョン名 リージョン API Server(endpoint) プロトコル

東日本リージョン jp-e1 logging-api.jp-e1.cloudn-service.com https

Page 24: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

24

4-1) Logging API共通情報

共通的な注意点

□Constraints について

Logging API のパラメータの値を入れる際に守るべき内容が記述されています。Constraints

を逸脱した場合は、多くの場合エラーとなります。

□Default について

Logging API では多くの必須項目としないパラメータにおいて Default 値が用意されておりま

す。パラメータ設定値を省略した際には、この Default の値が自動的に設定されます。

□Valid Values について

Logging API のパラメータの中では値を選択して設定することが求められます。その選択でき

る値が、 Valid Values であり、その値の中から選択し設定することとなります。必須項目とし

ないパラメータにおいて、設定しない場合は、 Default の値が自動的に設定されます。

□ Identifier 、Uuid について

本 API を利用して作成するリソース (LoggingServerGroup, LoggingFilter 等)には、二種類の

識別子が付与されます。

ひとつは、Identifier で、お客様が設定する識別子です。もうひとつは、Uuid でシステムで自

動付与する識別子です。Logging API ではリソースを特定する場合、Identifier 、Uuid の識別

子のいずれかを指定していただきます。

API において、Identifier を省略した場合、システム側で Uuid が自動的に払い出され、

Identifier = Uuid という値で設定されます。

なお、Identifier は API 上、必須項目とはしておりませんが、発行したリクエストの成功・失敗

の追跡や、可読性の観点から、利用することを強くお勧め致します。また、一部の API にお

いては、Identifier の指定のみが許容されるものがある点をご承知ください。

Page 25: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

25

4-1) Logging API共通情報

Common Errors

エラー 説明 HTTP Status Code

AlreadyExists パラメータ不正です。 (semantic) 指定されたリソースがすでに存在します。 400

IllegalState 状態不正です。 指定されたオブジェクトの状態が不正です。 409

IncompleteSignatureRequest リクエスト形式不正です。 (syntax) デジタル署名が不正です。 400

InternalFailure 恒久故障。 サーバー起因の故障により失敗しています。 500

InvalidAction リクエスト形式不正です。 (syntax) 指定された Action が不正です。 400

InvalidArgument パラメータ不正です。 (semantic) 400

InvalidClientTokenId リクエスト形式不正です。 (syntax) アクセスキー、シークレットキーが不正です。 400

InvalidParameterValue リクエスト形式不正です。 (syntax) リクエストメソッドが不正です。 400

InvalidQueryParameter リクエスト形式不正です。 (syntax) Query パラメータの形式が不正です。 400

MissingAuthenticationToken リクエスト形式不正です。 (syntax) アクセスキー、シークレットキーが不正です。 400

MissingContract 前提契約が存在しない。 オブジェクトストレージの契約がありません。 404

MissingParameter パラメータ不正です。 (semantic) 必須パラメータが省略されています。 400

NotFound パラメータ不正です。 (semantic) 指定されたリソースが存在しません。 404

QuotaExceeded クォータ上限超えです。 指定されたリソースの上限を超えています。 400

RequestExpired リクエスト形式不正です。 (syntax) リクエスト有効期限切れです。 400

ServiceUnavailable 一時故障です。サーバー側のリソースが不足しています。 503

Timeout タイムアウトが発生しています。 503

UnsupportedOperation パラメータ不正です。 (semantic) 未サポートの機能の実行を要求された 400

Page 26: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

26

4-2) Logging API一覧 (Action)

本サービスにて提供しているActionは下記となります。

Action コマンド 説明

CreateLoggingServerGroup ログサーバグループを作成する

DescribeLoggingServerGroups ログサーバグループの一覧を取得する

DeleteLoggingServerGroup ログサーバグループを削除する

AuthorizeLoggingSecurityGroup セキュリティグループにルールを追加する

RevokeLoggingSecurityGroup セキュリティグループにルールを削除する

CreateLoggingAction ログフィルタがマッチした時のアクションを作成する

DescribeLoggingAction アクションの一覧を取得する

DeleteLoggingAction アクションを削除する

CreateLoggingFilter ログフィルタをログサーバに対して追加する

DescribeLoggingFilters ログサーバのログフィルタ一覧を取得する

DeleteLoggingFilter ログフィルタをログサーバから削除する

Page 27: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

27

4-2) Logging API(Action)

CreateLoggingServerGroup

概要 新規に LoggingServerGroup を作成するAPIです。 LoggingServerGroup は1つ以上のログサーバのグループを表します。よって、ログサーバの作成に先立って作成する必要があります。 LoggingServerGroup ではログサーバを作成する際のサーバーモデルCPU、メモリ、DISKサイズ、ログの保存期間を定義し、ログサーバを生成する際に適用されます。

また、ログサーバ(LoggingServer)の情報の他、ログフィルタ(LoggingFilter)、ログソース(LoggingSource)を管理しています。

Request Parameters

パラメーター名 説明 Required

Identifier LoggingServerGroup を一意に識別するための識別子

Constraints :

利用可能な文字数は 1~64

利用可能文字は英数字とハイフン

最初の1文字は英字

ハイフンは最後の文字として利用不可、連続利用不可

Type : uuid

No

Name LoggingServerGroup の名称

Default : (空文字列)

Constraints :

0~255文字以内

マルチバイト文字利用可能

Type : String

No

Description LoggingServerGroup の説明

Default : (空文字列)

Constraints :

0~255文字以内

マルチバイト文字利用可能

Type : String

No

RetentionPeriod ログを保持する期間。単位(日)

Default : 14

Constraints : 指定可能な数字は1-100

Type : Integer

No

Page 28: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

28

Response Elements

パラメーター名 説明 Required

Identifier LoggingServerGroup を一意に識別するための識別子

ユーザからの指定がない場合は、下記のUuidの値となります。

Type : uuid

No

Uuid システムで自動付与したLoggingServerGroupを一意に識別するための uuid 識別子

Type : uuid

No

Name LoggingServerGroup の名称

ユーザからの指定がない場合は、空の文字列となります。

Type : String

No

Description LoggingServerGroup の説明

ユーザからの指定がない場合は、空の文字列となります。

Type : String

No

Status LoggingServerGroup の状態を表します。

“active” : 利用可能 “creating” : 作成中 “modifying” : 処理中 “deleting” : 削除中

Type : String

No

InstanceClass LoggingServerGroup に属するサーバーインスタンスのCPU/Memoryサイズ

Type : String

No

RetentionPeriod ログを保持する期間。単位(日)

ユーザからの指定がない場合は 14 となります。

Type : Integer

No

DiskSize LoggingServerGroup に属するサーバーインスタンスのDISKサイズ。

単位は( GB )

ユーザからの指定がない場合は 40 となります。

Type : Integer

No

4-2) Logging API(Action)

LoggingServerGroupのレスポンスです。

次ページへつづく

Page 29: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

29

4-2) Logging API(Action)

LoggingServerのレスポンスです。

Response Elements

パラメーター名 説明 Required

Identifier LoggingServer グループの識別子

Type : uuid

No

Uuid システムで自動付与した LoggingServer グループの uuid 識別子

Type : uuid

No

Name LoggingServer の名称

ユーザからの指定がない場合は、空の文字列となります。

Type : String

No

Description LoggingServe の説明

ユーザからの指定がない場合は、空の文字列となります。

Type : String

No

Status LoggingServerGroup の状態を表します。

“active”:利用可能 “creating”:作成中 “modifying”:処理中 “deleting”:削除中

Type : String

No

IpAddress LoggingServerGroup 属する LoggingServe のIPアドレス

Type : String

No

Response Elements

パラメーター名 説明 Required

Identifier ログの収集受付ポートを設定する LoggingServerGroup の一意に識別する

ための識別子

TYPE : uuid

No

Uuid ログの収集受付ポートを設定する LoggingServerGroup の一意に識別するための uuid 識別子 TYPE : uuid

No

Name 収集受付ポート設定の名称

TYPE : String

No

Description 収集受付ポートを説明

TYPE : String

No

LoggingType ログの収集受付のロギング形式

TYPE : String

No

Tag ログの収集受付のロギング形式に対応したタグ形式

TYPE : String

No

Port ログの収集受付を行うポート番号

TYPE : String

No

LoggingSourceのレスポンスです。

次ページへつづく

Page 30: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

30

4-2) Logging API(Action)

LoggingSecurityGroupのレスポンスです。

Response Elements

パラメーター名 説明 Required

Identifier LoggingSecurityGroup を一意に識別するための識別子

ユーザからの指定がない場合は、下記のUuidの値となります。

Type : uuid

No

Uuid システムで自動付与した LoggingSecurityGroup の uuid 識別子

Type : uuid

No

Name LoggingSecurityGroup の名称

ユーザからの指定がない場合は、空の文字列となります。

Type : String

No

Description LoggingSecurityGroup の説明

ユーザからの指定がない場合は、空の文字列となります。

Type : String

No

Status LoggingSecurityGroup の状態を表します。

“active” : 利用可能 “creating” : 作成中 “modifying” : 処理中 “deleting” : 削除中

Type : String

No

Errors

パラメータ名 説明 HTTP Status Code

AlreadyExists パラメータ不正です。 ( semantic ) パラメータで指定された ServerGroup がすでに存在します。

400

QuotaExceeded クォータ上限超えです。 指定されたリソースの上限を超えています。ServerGroupの実存数が上限値以上の場合などに発生します。

400

Page 31: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

31

4-2) Logging API(Action)

DescribeLoggingServerGroups

概要 LoggingServerGroup を表示するAPIです。

※Identifier、Uuid のどちらも指定しない場合、お客様の全ての LoggingServerGroup が表示されます。 ※Identifier、Uuid を両方指定した場合は AND検索での結果が表示されます。

Request Parameters

パラメーター名 説明 Required

Identifier

LoggingServerGroup を一意に識別するための識別子

Constraints :

利用可能な文字数は 1~64

利用可能文字は英数字とハイフン

最初の1文字は英字

ハイフンは最後の文字として利用不可、連続利用不可

Type : uuid

No

Uuid ※

システムで自動付与した LoggingServerGroup を一意に識別するための uuid

識別子

Constraints :

利用可能な文字数は 1~64

利用可能文字は英数字とハイフン

最初の1文字は英字

ハイフンは最後の文字として利用不可、連続利用不可

TYPE : uuid

No

Page 32: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

32

Response Elements

パラメーター名 説明 Required

Identifier LoggingServerGroup を一意に識別するための識別子

Type : uuid

No

Uuid システムで自動付与したLoggingServerGroupを一意に識別するための uuid 識別子

TYPE:uuid

No

Name LoggingServerGroup の名称

Type : String

No

Description LoggingServerGroup の説明

Type : String

No

Status LoggingServerGroup の状態を表します。

“active” : 利用可能 “creating” : 作成中 “modifying” : 処理中 “deleting” : 削除中

Type : String

No

InstanceClass LoggingServerGroup に属する LoggingServer の CPU / Memory サイズ

Type : String

No

RetentionPeriod ログを保持する期間。単位(日)

Type : Integer

No

DiskSize LoggingServerGroup に属する LoggingServer のDISKサイズ。単位は( GB )

Type : Integer

No

4-2) Logging API(Action)

LoggingServerGroupのレスポンスです。

次ページへつづく

Page 33: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

33

4-2) Logging API(Action)

LoggingServerのレスポンスです。

Response Elements

パラメーター名 説明 Required

Identifier LoggingServer グループの識別子

Type : uuid

No

Uuid システムで自動付与した LoggingServer グループの uuid 識別子

Type : uuid

No

Name LoggingServer の名称

ユーザからの指定がない場合は、空の文字列となります。

Type : String

No

Description LoggingServe の説明

ユーザからの指定がない場合は、空の文字列となります。

Type : String

No

Status LoggingServerGroup の状態を表します。

“active”:利用可能 “creating”:作成中 “modifying”:処理中 “deleting”:削除中

Type : String

No

IpAddress LoggingServerGroup 属する LoggingServe のIPアドレス

Type : String

No

Response Elements

パラメーター名 説明 Required

Identifier ログの収集受付ポートを設定する LoggingServerGroup の一意に識別する

ための識別子

TYPE : uuid

No

Uuid ログの収集受付ポートを設定する LoggingServerGroup の一意に識別するための uuid 識別子 TYPE : uuid

No

Name 収集受付ポート設定の名称

TYPE : String

No

Description 収集受付ポートを説明

TYPE : String

No

LoggingType ログの収集受付のロギング形式

TYPE : String

No

Tag ログの収集受付のロギング形式に対応したタグ形式

TYPE : String

No

Port ログの収集受付を行うポート番号

TYPE : String

No

LoggingSourceのレスポンスです。

次ページへつづく

Page 34: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

34

4-2) Logging API(Action)

LoggingServerGroup に属するLoggingServer、LoggingFilter、LoggingSource、LoggingSecurityGroupの情報のすべてが表示されます。 LoggingFilterの情報については、DescribeLoggingFilterのResponse Elements をご参照ください。

Response Elements

パラメーター名 説明 Required

Identifier LoggingSecurityGroup を一意に識別するための識別子

ユーザからの指定がない場合は、下記のUuidの値となります。

Type : uuid

No

Uuid システムで自動付与した LoggingSecurityGroup の uuid 識別子

Type : uuid

No

Name LoggingSecurityGroup の名称

ユーザからの指定がない場合は、空の文字列となります。

Type : String

No

Description LoggingSecurityGroup の説明

ユーザからの指定がない場合は、空の文字列となります。

Type : String

No

Status LoggingSecurityGroup の状態を表します。

“active” : 利用可能 “creating” : 作成中 “modifying” : 処理中 “deleting” : 削除中

Type : String

No

Errors

パラメータ名 説明 HTTP Status Code

InvalidParameterValue リクエスト形式不正 ( syntax ) リクエストメソッド不正です。各パラメータの Constraints (文字数制約や先頭文字制約など) の条件を満たさない場合に発生します。

400

Page 35: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

35

4-2) Logging API(Action)

DeleteLoggingServerGroup

概要 LoggingServerGroup を削除する API です。

Request Parameters

パラメーター名 説明 Required

Identifier

LoggingServerGroup を一意に識別するための識別子

Constraints :

利用可能な文字数は 1~64

利用可能文字は英数字とハイフン

最初の1文字は英字

ハイフンは最後の文字として利用不可、連続利用不可

Type : uuid

No

Uuid ※

システムで自動付与した LoggingServerGroup を一意に識別するための

uuid 識別子

Constraints :

利用可能な文字数は 1~64

利用可能文字は英数字とハイフン

最初の1文字は英字

ハイフンは最後の文字として利用不可、連続利用不可

TYPE : uuid

No

※Identifier、Uuid のどちらも指定しない場合は、HTTP Status Code : 400 にてエラーとなります。 ※Identifier、Uuid を両方指定した場合は AND 検索により、LoggingServerGroup が削除されます。

Page 36: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

36

Response Elements

パラメーター名 説明 Required

Identifier LoggingServerGroup を一意に識別するための識別子

Type : uuid

No

Uuid システムで自動付与した LoggingServerGroup を一意に識別するための uuid

識別子

TYPE:uuid

No

Name LoggingServerGroup の名称

Type : String

No

Description LoggingServerGroup の説明

Type : String

No

Status LoggingServerGroup の状態を表します。

“active” : 利用可能 “creating” : 作成中 “modifying” : 処理中 “deleting” : 削除中

Type : String

No

InstanceClass LoggingServerGroup に属する LoggingServer の CPU / Memory サイズ

Type : String

No

RetentionPeriod ログを保持する期間。単位(日)

Type : Integer

No

DiskSize LoggingServerGroup に属するサーバーインスタンスのDISKサイズ。単位は(GB)

Type : Integer

No

4-2) Logging API(Action)

LoggingServerGroupのレスポンスです。

次ページへつづく

Page 37: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

37

4-2) Logging API(Action)

LoggingServerのレスポンスです。

Response Elements

パラメーター名 説明 Required

Identifier LoggingServer グループの識別子

Type : uuid

No

Uuid システムで自動付与した LoggingServer グループの uuid 識別子

Type : uuid

No

Name LoggingServer の名称

ユーザからの指定がない場合は、空の文字列となります。

Type : String

No

Description LoggingServe の説明

ユーザからの指定がない場合は、空の文字列となります。

Type : String

No

Status LoggingServerGroup の状態を表します。

“active”:利用可能 “creating”:作成中 “modifying”:処理中 “deleting”:削除中

Type : String

No

IpAddress LoggingServerGroup 属する LoggingServe のIPアドレス

Type : String

No

Response Elements

パラメーター名 説明 Required

Identifier ログの収集受付ポートを設定する LoggingServerGroup の一意に識別する

ための識別子

TYPE : uuid

No

Uuid ログの収集受付ポートを設定する LoggingServerGroup の一意に識別するための uuid 識別子 TYPE : uuid

No

Name 収集受付ポート設定の名称

TYPE : String

No

Description 収集受付ポートを説明

TYPE : String

No

LoggingType ログの収集受付のロギング形式

TYPE : String

No

Tag ログの収集受付のロギング形式に対応したタグ形式

TYPE : String

No

Port ログの収集受付を行うポート番号

TYPE : String

No

LoggingSourceのレスポンスです。

次ページへつづく

Page 38: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

38

Errors

パラメータ名 説明 HTTP Status Code

IllegalState 状態不正です。 指定されたオブジェクトの状態が不正です。 LoggingServerGroup の状態が creating , modifying , deleting の場合に発生します。

409

NotFound パラメータ不正です。 ( semantic ) 指定されたリソースが存在しません。 指定された ServerGroup が実在しない場合に発生します。

404

4-2) Logging API(Action)

LoggingServerGroup に属するLoggingServer、LoggingFilter、LoggingSource、LoggingSecurityGroupの情報のすべてが表示されます。 LoggingFilterの情報については、DescribeLoggingFilterのResponse Elements をご参照ください。

Response Elements

パラメーター名 説明 Required

Identifier LoggingSecurityGroup を一意に識別するための識別子

ユーザからの指定がない場合は、下記のUuidの値となります。

Type : uuid

No

Uuid システムで自動付与した LoggingSecurityGroup の uuid 識別子

Type : uuid

No

Name LoggingSecurityGroup の名称

ユーザからの指定がない場合は、空の文字列となります。

Type : String

No

Description LoggingSecurityGroup の説明

ユーザからの指定がない場合は、空の文字列となります。

Type : String

No

Status LoggingSecurityGroup の状態を表します。

“active” : 利用可能 “creating” : 作成中 “modifying” : 処理中 “deleting” : 削除中

Type : String

No

Page 39: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

39

AuthorizeLoggingSecurityGroup

概要 本 API は、ログサーバ(LoggingServer)への接続を許可する送信元のルールを定義します。ルールを定義していない状態では全遮断となり、ログサーバへの接続は許可されていません。 本 API を繰り返して実行することで許可する送信元を追加するホワイトリスト方式となっています。許可する送信元を指定する方法として、プロトコル種別として TCP または UDP、送信元の IP アドレスの範囲を CIDR 形式で、また、ログサーバの受信ポートを指定可能です。

Request Parameters

パラメーター名 説明 Required

SecurityGroupUuid LoggingSecurityGroup を一意に識別するためのuuid識別子

Constraints :

利用可能な文字数は 1~64

利用可能文字は英数字とハイフン

最初の1文字は英字

ハイフンは最後の文字として利用不可、連続利用不可

TYPE : uuid

No

SecurityGroupIdentifier LoggingSecurityGroup 一意に識別するための識別子

Constraints :

利用可能な文字数は 1~64

利用可能文字は英数字とハイフン

最初の1文字は英字

ハイフンは最後の文字として利用不可、連続利用不可

TYPE : uuid

No

Identifier セキュリティルールを一意に識別するための識別子

Constraints :

利用可能な文字数は 1~64

利用可能文字は英数字とハイフン

最初の1文字は英字

ハイフンは最後の文字として利用不可、連続利用不可

Type : uuid

No

Description セキュリティルールの説明

Default : (空文字列)

Constraints :

0~255文字以内 マルチバイト文字利用可能

Type : String

No

Protocol 利用する通信プロトコル

Valid values : tcp | udp

TYPE : String

Yes

4-2) Logging API(Action)

次ページへつづく

※ SecurityGroupUuid 、SecurityGroupIdentifier のいずれも指定しない場合はHTTP Status Code : 400 にてエラーとなります。

Page 40: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

40

Request Parameters

パラメーター名 説明 Required

Cidr CIDR形式のアクセス元として接続許可するIPレンジ Format: ネットワークIPアドレス “/” マスク

ネットワークIPアドレス = (0-255 の数値) . (0-255 の数値) . (0-255 の数値) . (0-255 の数値)

各数字の区切り文字は半角ピリオド "."

マスク = (0-32) の数値

ネットワークIPアドレスとマスクとの区切り文字は半角バックスラッシュ “/"

ネットワークIPアドレス、 マスク共に省略はできません。

Example :192.168.1.1/24 (設定時は URL エンコードを実施すること)

Type : String

Yes

Port 利用するポート番号

Valid values : 1150~65535(9200-9400を除く)

Type : Integer

Yes

4-2) Logging API(Action)

Page 41: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

41

Errors

パラメータ名 説明 HTTP Status Code

IllegalState 状態不正です。 指定されたオブジェクトの状態が不正です。 LoggingSecurityGroupの状態が “creating” , “modifying” , “deleting” の場合に発生します。 LoggingSecurityGroup が、LoggingServerGroup と関連付けられている場合は、LoggingServerGroup の状態が active 以外の場合にも、IllegalState が発生します。

409

AlreadyExists パラメータ不正です。 ( semantic ) Protocol, Cidr, Port の組が完全に一致するルールを登録しようとした場合に発生します。

400

NotFound パラメータ不正です。 ( semantic ) 指定されたリソースが存在しません。 指定された LoggingSecurityGroup が実在しない場合に発生します。

404

Response Elements

パラメーター名 説明 Required

Identifier セキュリティルールを一意に識別するための識別子

Type : uuid

No

Uuid セキュリティルールを一意に識別するためのuuid識別子

Type : uuid

No

Name セキュリティルールの名称

Type : String

No

Description LoggingSecurityGroup の説明

Type : String

No

Status セキュリティルールの状態

Type : String

No

Direction 通信の方向

TYPE : String

No

Protocol 通信プロトコル

TYPE : String

Yes

Cidr CIDR形式のアクセス元として指定されるIPレンジ

Type : String

Yes

Port 利用するポート番号

Type : Integer

Yes

4-2) Logging API(Action)

Page 42: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

42

RevokeLoggingSecurityGroup

概要 作成したセキュリティルールを削除する API です。 本 API を実行することにより、お客様のサーバーからログサーバへの接続ができなくなります。

Request Parameters

パラメーター名 説明 Required

Identifier

セキュリティルールを一意に識別するための識別子

Constraints :

利用可能な文字数は 1~64

利用可能文字は英数字とハイフン

最初の1文字は英字

ハイフンは最後の文字として利用不可、連続利用不可

Type : uuid

No

Uuid ※

セキュリティルールを一意に識別するためのuuid識別子 Constraints :

利用可能な文字数は 1~64

利用可能文字は英数字とハイフン

最初の1文字は英字

ハイフンは最後の文字として利用不可、連続利用不可

TYPE : uuid

No

※ Identifier 、Uuid のいずれも指定しない場合は HTTP Status Code : 400にてエラーとなります。 ※ Identifier 、Uuid を指定した場合は AND検索での結果でセキュリティルールが削除されます。

4-2) Logging API(Action)

Page 43: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

43

Errors

パラメータ名 説明 HTTP Status Code

IllegalState 状態不正です。 指定されたオブジェクトの状態が不正です。 LoggingSecurityGroup の状態が “creating” , “modifying” , ”deleting” の場合に発生します。

409

NotFound パラメータ不正です。 ( semantic ) 指定されたリソースが存在しません。 指定された LoggingSecurityGroup が実在しない場合に発生します。

404

4-2) Logging API(Action)

Response Elements

パラメーター名 説明 Required

Identifier セキュリティルールを一意に識別するための識別子

Type : uuid

No

Uuid セキュリティルールを一意に識別するためのuuid識別子

Type : uuid

No

Name セキュリティルールの名称

Type : String

No

Description セキュリティルールの説明

Type : String

No

Status セキュリティルールの状態

Type : String

No

Direction 通信の方向

TYPE : String

No

protocol 通信プロトコル

TYPE : String

Yes

Cidr アクセス元として指定されるIPレンジ

Type : String

Yes

Port 利用するポート番号

Type : Integer

Yes

Page 44: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

44

4-2) Logging API(Action)

CreateLoggingAction

概要 本 API は、ログサーバ-が、フィルタにマッチしたログを受信した時の振る舞いを定義するもので、現在はメールへの通知機能が用意されています。フィルタ機能を利用する場合は、予め送信先のメールアドレスを本 API を用いて定義しておく必要があります。

Action では、1 つのメール送信先を定義することができます。複数の宛先に送信する場合は、送信先にメーリングリスト等を利用してください。

Action は複数の Filter から 1 つの Action が共有されます。Action に Filter が関連付けられている場合、Action の削除はできません。Action を削除する場合は、予め関連付けられている Filter の削除を行ってください。

Request Parameters

パラメーター名 説明 Required

Identifier 作成するアクションの識別子

Constraints :

利用可能な文字数は1~64

利用可能文字は英数字とハイフン

最初の1文字は英字

ハイフンは最後の文字として利用不可、連続利用不可

Type : uuid

No

Name 作成するアクションの名称

Default : (空文字列)

Constraints :

0~255文字以内

マルチバイト文字利用可能

Type : String

No

Description 作成するアクションの説明

Default : (空文字列)

Constraints :

0~255文字以内

マルチバイト文字利用可能

Type : String

No

ActionType アクションのタイプ

Valid Values : mail

Type : String

Yes

ActionValue アクションへの引数(メールアドレス)

Constraints :

指定可能な文字数は1~255

メールアドレスは1 件のみ登録可能

Type : String

Yes

Filter と Action の関係 ・ひとつのActionは複数のフィルタから参照されます(FilterとActionは n: 1の関係) ・よって、ActionはすべてのFilterから関係が解消されないと、削除することができません。

Page 45: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

45

4-2) Logging API(Action)

Response Elements

パラメーター名 説明 Required

Identifier ユーザが指定したアクションの識別子

Type : uuid

No

Name ユーザが指定したアクションの名称

Type : String

No

Description ユーザが指定したアクションの説明

Type : String

No

ActionType アクションのタイプ

Valid Values : mail

Type : String

Yes

ActionValue アクションへの引数(メールアドレス)

Constraints : メールアドレスは1 件のみ登録可能

Type : String

Yes

Errors

パラメータ名 説明 HTTP Status Code

InvalidParameterValue リクエスト形式不正です。 (syntax) リクエストメソッドが不正です。 各パラメータの Constraints (文字数制約や先頭文字制約など) の条件を満たさない場合に発生します。 また、Identifier が無効の場合、uuid が無効の場合にも発生します。

400

MissingParameter パラメータ不正です。 (semantic) 必須パラメータが省略されています。 Identifier、Uuid のパラメータ共に指定がない場合に発生します。

400

Page 46: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

46

4-2) Logging API(Action)

DescribeLoggingActions

概要 作成したアクション( Action )を表示するAPIです。

※ Identifier 、Uuid のどちらも指定しない場合、お客様の全ての LoggingAction が表示されます。 ※ Identifier 、Uuid を両方指定した場合は AND検索での結果が表示されます。

Request Parameters

パラメーター名 説明 Required

Identifier

表示するアクションを特定する識別子

Constraints :

利用可能な文字数は1~64

利用可能文字は英数字とハイフン

最初の1文字は英字

ハイフンは最後の文字として利用不可、連続利用不可

Type : uuid

No

Uuid ※

表示するアクションを一意に識別するための識別子

Constraints :

利用可能な文字数は1~64

利用可能文字は英数字とハイフン

最初の1文字は英字

ハイフンは最後の文字として利用不可、連続利用不可

TYPE : uuid

No

Page 47: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

47

4-2) Logging API(Action)

Response Elements

パラメーター名 説明 Required

Identifier ユーザが指定したアクションの識別子

Type : uuid

No

Uuid システムで自動付与したアクションの識別子

Type : uuid

No

Name ユーザが指定したアクションの名称

Type : String

No

Description ユーザが指定したアクションの説明

Type : String

No

ActionType アクションのタイプ

Valid Values : mail

Type : String

Yes

ActionValue アクションへの引数(メールアドレス)

Constraints : メールアドレスは1 件のみ登録可能

Type : String

Yes

Errors

パラメータ名 説明 HTTP Status Code

InvalidParameterValue リクエスト形式不正です。 (syntax) リクエストメソッドが不正です。 各パラメータの Constraints (文字数制約や先頭文字制約など) の条件を満たさない場合に発生します。 また、Identifier が無効の場合、uuid が無効の場合にも発生します。

400

Page 48: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

48

4-2) Logging API(Action)

DeleteLoggingAction

概要 作成したアクション( Action )を削除するAPIです。 Action は複数の Filter から 1 つの Action が共有されます。Action に Filter が関連付けられている場合、Action の削除はできません。Action を削除する場合は、予め関連付けられている Filter の削除を行ってください。

Request Parameters

パラメーター名 説明 Required

Identifier

削除するアクションを特定する識別子

Constraints :

利用可能な文字数は1~64

利用可能文字は英数字とハイフン

最初の1文字は英字

ハイフンは最後の文字として利用不可、連続利用不可

Type : uuid

No

Uuid ※

削除するアクションを一意に識別するための識別子

Constraints :

利用可能な文字数は1~64

利用可能文字は英数字とハイフン

最初の1文字は英字

ハイフンは最後の文字として利用不可、連続利用不可

TYPE : uuid

No

※ Identifier、Uuid のどちらも指定しない場合は、HTTP Status Code : 400 にてエラーとなります。 ※ Identifier、Uuid を両方指定した場合は AND条件による LoggingAction の削除になります。 ただし、 Fileter に登録されている Action は削除できません。

Page 49: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

49

4-2) Logging API(Action)

Errors

パラメータ名 説明 HTTP Status Code

IllegalState 状態不正です。 指定されたオブジェクトの状態が不正です。 ActionにFilterが関連づいている状態でActionを削除しようとしたときに発生します。

409

InvalidParameterValue リクエスト形式不正です。 (syntax) リクエストメソッドが不正です。 各パラメータの Constraints (文字数制約や先頭文字制約など) の条件を満たさない場合に発生します。 また、Identifier が無効の場合、uuid が無効の場合にも発生します。

400

Response Elements

パラメーター名 説明 Required

Identifier ユーザが指定したアクションの識別子

Type : uuid

No

Uuid システムで自動付与したアクションの識別子

Type : uuid

No

Name ユーザが指定したアクションの名称

Type : String

No

Description ユーザが指定したアクションの説明

Type : String

No

ActionType アクションのタイプ

Valid Values : mail

Type : String

Yes

ActionValue アクションへの引数(メールアドレス)

Constraints : メールアドレスは1 件のみ登録可能

Type : String

Yes

Page 50: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

50

4-2) Logging API(Filter)

CreateLoggingFilter

概要 本 API は、ログサーバ( LoggingServer )に収集されたログ情報から条件に合致するログを検出するためのLoggingFilter を作成する API です。

LoggingFilter を作成に先立ってアクション( LoggingAction )を先に作成しておく必要があります。

LoggingFilter のマッチ条件は正規表現で記述します。本API ではRuby 1.9.3 の正規表現をサポートし、対象は1メッセージの全文マッチ検索に対応しています。

複数の LoggingFilter から 1つの LoggingAction を共有していますので、 LoggingAction を削除する際には予め関連付けられている LoggingFilter の削除が必要となります。

Request Parameters

パラメーター名 説明 Required

LoggingServerGroupIdentifier LoggingFilter を設定する LoggingServerGroup のIdentifier識別子

Constraints :

利用可能な文字数は 1~64

利用可能文字は英数字とハイフン

最初の1文字は英字

ハイフンは最後の文字として利用不可、連続利用不可

Type : uuid

No

LoggingServerGroupUuid LoggingFilter を設定する LoggingServerGroup の uuid 識別子 Constraints : 利用可能な文字数は 1~64 利用可能文字は英数字とハイフン 最初の1文字は英字 ハイフンは最後の文字として利用不可、連続利用不可 TYPE : uuid

No

Identifier LoggingFilterのを一意に識別するための識別子

Constraints :

利用可能な文字数は 1~64

利用可能文字は英数字とハイフン

最初の1文字は英字

ハイフンは最後の文字として利用不可、連続利用不可

Type : uuid

No

Name LoggingFilter の名称

Default : (空文字列)

Constraints :

0~255文字以内

マルチバイト文字利用可能

改行コード(¥n)は利用不可

Type : String

No

Description LoggingFilter の説明

Default : (空文字列)

Constraints :

0~255文字以内

マルチバイト文字利用可能

改行コード(¥n)は利用不可

Type : String

No

次ページに続く

Page 51: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

51

4-2) Logging API(Filter)

Request Parameters

パラメーター名 説明 Required

FilterType LoggingFilter の条件タイプ

Default : match

Valid Values : match

Type : String

No

FilterValue LoggingFilter の条件( Ruby 1.9.3 の正規表現)

Constraints :

指定可能な文字数は1~255

条件は1行のみ

Type : String

Yes

FilterActionIdentifier マッチ条件 ( FilterType , FilterValue ) で検知した場合に実行する LoggingAction のIdentifier 識別子

Constraints :

利用可能な文字数は1~64

利用可能文字は英数字とハイフン

最初の1文字は英字

ハイフンは最後の文字として利用不可、連続利用不可

Type : uuid

Yes

Page 52: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

52

4-2) Logging API(Filter)

Response Elements

パラメーター名 説明 Required

Identifier LoggingFilter を一意に特定する識別子

Type : uuid

No

Uuid システムで自動付与する LoggingFilter を一意に特定する uuid 識別子

TYPE : uuid

No

Name LoggingFilter の名称

Type : String

No

Description LoggingFilter の説明

Type : String

No

FilterType LoggingFilter の条件タイプ

Type : String

No

FilterValue LoggingFilter への条件( Ruby 1.9.3 の正規表現)

Type : String

Yes

FilterActionIdentifier

マッチ条件 ( FilterType , FilterValue ) で検知した場合に実行する LoggingAction のIdentifier 識別子

Type : uuid

Yes

Status LoggingFilter の状態を表します。

“active” : 利用可能 “creating” : 作成中 “modifying” : 処理中 “deleting” : 削除中

Type:String

No

LoggingFilter と LoggingAction の関係 ・ひとつの LoggingAction は複数のフィルタから参照されます( LoggingFilter と LoggingAction は n: 1の関係) ・よって、LoggingAction はすべてのLoggingFilter から関係が解消されないと、削除することができません。 LoggingFilter と ServerGroup の関係 ・ひとつの LoggingServerGroup は複数の LoggingFilter から参照されます ( LoggingServerGroup と LoggingAction は n: 1 の関係) ・よって、LoggingAction はすべての LoggingServerGroup から関係が解消されないと、削除することができません。 LoggingFilter と LoggingServer 、LoggingSource 、SecurityGroup との関係 ・特に関係はありません。

Errors

パラメータ名 説明 HTTP Status Code

IllegalState 状態不正です。 指定されたオブジェクトの状態が不正です。 LoggingServerGroup の状態が ”creating” , “modifying” , “deleting” の場合に発生します。 また、指定した LoggingSource が “creating“ または “deleting” の場合にも発生します。

409

NotFound パラメータ不正です。 ( semantic ) 指定されたリソースが存在しません。 指定された LoggingServerGroup が実在しない場合に発生します。

404

Page 53: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

53

4-2) Logging API(Filter)

DescribeLoggingFilters

概要 LoggingFilter を表示する API です。

※Identifier、Uuid のどちらも指定しない場合、お客様の全ての LoggingFilter が表示されます。 ※Identifier、Uuid を両方指定した場合は AND検索での結果が表示されます。

Request Parameters

パラメーター名 説明 Required

Identifier

LoggingFilter を一意に識別するための識別子

フィルタを特定する識別子

Constraints :

利用可能な文字数は 1~64

利用可能文字は英数字とハイフン

最初の1文字は英字

ハイフンは最後の文字として利用不可、連続利用不可

Type:uuid

No

Uuid ※

LoggingFilter を一意に識別するための uuid 識別子

Constraints :

利用可能な文字数は 1~64

利用可能文字は英数字とハイフン

最初の1文字は英字

ハイフンは最後の文字として利用不可、連続利用不可

TYPE:uuid

No

Page 54: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

54

4-2) Logging API(Filter)

Errors

パラメータ名 説明 HTTP Status Code

InvalidParameterValue リクエスト形式不正です。 ( syntax ) リクエストメソッドが不正です。 各パラメータの Constraints (文字数制約や先頭文字制約など) の条件を満たさない場合に発生します。 また、Identifier が無効の場合、uuid が無効の場合にも発生します。

400

Response Elements

パラメーター名 説明 Required

Identifier LoggingFilter を一意に特定する識別子

Type : uuid

No

Uuid システムで自動付与する LoggingFilter を一意に特定する uuid 識別子

TYPE : uuid

No

Name LoggingFilter の名称

Type : String

No

Description LoggingFilter の説明

Type : String

No

FilterType LoggingFilter の条件タイプ

Type : String

No

FilterValue LoggingFilter への条件( Ruby 1.9.3 の正規表現)

Type : String

Yes

FilterActionIdentifier

マッチ条件 ( FilterType , FilterValue ) で検知した場合に実行する LoggingAction のIdentifier 識別子

Type : uuid

Yes

Status LoggingFilter の状態を表します。

“active” : 利用可能 “creating” : 作成中 “modifying” : 処理中 “deleting” : 削除中

Type:String

No

Page 55: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

55

4-2) Logging API(Filter)

DeleteLoggingFilter

概要 LoggingFilter を削除するAPIです。

※Identifier、Uuid のどちらも指定しない場合は、HTTP Status Code : 400 にてエラーとなります。 ※Identifier、Uuid を両方指定した場合は AND条件による LoggingFilter の削除になります。

Request Parameters

パラメーター名 説明 Required

Identifier

LoggingFilter を一意に特定する識別子 Constraints :

利用可能な文字数は 1~64

利用可能文字は英数字とハイフン

最初の1文字は英字

ハイフンは最後の文字として利用不可、連続利用不可

Type:uuid

No

Uuid ※

システムで自動付与する LoggingFilter を一意に特定する uuid 識別子

Constraints :

利用可能な文字数は 1~64

利用可能文字は英数字とハイフン

最初の1文字は英字

ハイフンは最後の文字として利用不可、連続利用不可

TYPE:uuid

No

Page 56: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

56

4-2) Logging API(Filter)

Errors

パラメータ名 説明 HTTP Status Code

MissingParameter パラメータ不正です。 ( semantic ) 必須パラメータが省略されています。 Identifier、Uuid のどちらも指定がない場合に発生します。

400

Response Elements

パラメーター名 説明 Required

Identifier LoggingFilter を一意に特定する識別子

Type : uuid

No

Uuid システムで自動付与する LoggingFilter を一意に特定する uuid 識別子

TYPE : uuid

No

Name LoggingFilter の名称

Type : String

No

Description LoggingFilter の説明

Type : String

No

FilterType LoggingFilter の条件タイプ

Type : String

No

FilterValue LoggingFilter への条件( Ruby 1.9.3 の正規表現)

Type : String

Yes

FilterActionIdentifier

マッチ条件 ( FilterType , FilterValue ) で検知した場合に実行する LoggingAction のIdentifier 識別子

Type : uuid

Yes

Status LoggingFilter の状態を表します。

“active” : 利用可能 “creating” : 作成中 “modifying” : 処理中 “deleting” : 削除中

Type:String

No

Page 57: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

57

Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."

巻末) OSS ライセンス

Page 58: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

58

"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.

巻末) OSS ライセンス

Page 59: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

59

You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS

巻末) OSS ライセンス

Page 60: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

60

APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

巻末) OSS ライセンス

Page 61: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

61

/* * Copyright (C) 2002-2014 Igor Sysoev * Copyright (C) 2011-2014 Nginx, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */

2-clause license

巻末) OSS ライセンス

Page 62: NTT Communications Cloudⁿ Logging API マニュアルNTT Communications Cloudⁿ Logging API マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。2

62

項目名 上限値

LoggingServerGroup(ログサーバグループ) 1Cloudnアカウントにつき、1個まで

LoggingServer(ログサーバ) 1ログサーバグループにつき、1個まで

LoggingSource(ログソース) 1ログサーバグループにつき、2個(デフォルト)

LoggingSecurityGroup(ログセキュリティグループ) 1ログサーバグループにつき、1個まで

LoggingSecurityGroupのセキュリティルール 1ログセキュリティグループにつき、16個まで

LoggingFilter(ログフィルタ) 1ログサーバグループにつき、3個まで

LoggingAction(ログアクション) 1ログフィルタにつき、3個まで

巻末) 諸元値