翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。
AWS CLI を使用したリソースの記録
AWS CLI を使用して AWS Config で記録するリソースのタイプを選択できます。これを行うには、カスタマー管理設定レコーダーを作成します。設定レコーダーは、記録グループ内の指定されたタイプのリソースを記録します。記録グループ内では、サポートされているすべてのリソースタイプを記録するのか、特定のリソースタイプのみを含めるか、または除外するかを指定します。
- Record all current and future supported resource types
-
このリージョンで現在および将来サポートされるすべてのリソースタイプの設定変更を記録するように AWS Config を設定します。サポートされるリソースタイプのリストについては、「サポートされているリソースタイプ」を参照してください。
-
put-configuration-recorderコマンドを使用します。このコマンドは、[
--configuration-recorder] フィールドと [---recording-group] フィールドを使用します。$ aws configservice put-configuration-recorder \ --configuration-recorderfile://configurationRecorder.json\ --recording-groupfile://recordingGroup.json[
configuration-recorder] フィールド[
configurationRecorder.json] ファイルは、nameおよびroleArn、さらに設定レコーダーのデフォルトの記録頻度を指定します (recordingMode)。{ "name": "default", "roleARN": "arn:aws:iam::123456789012:role/config-role", "recordingMode": { "recordingFrequency":CONTINUOUSorDAILY, "recordingModeOverrides": [ { "description": "Description you provide for the override", "recordingFrequency":CONTINUOUSorDAILY, "resourceTypes": [Comma-separated list of resource types to include in the override] } ] } }[
recording-group] フィールドrecordingGroup.jsonファイルは、記録するリソースタイプを指定します。{ "allSupported": true, "recordingStrategy": { "useOnly": "ALL_SUPPORTED_RESOURCE_TYPES" }, "includeGlobalResourceTypes": true }オブジェクトの詳細については、「AWS CLI コマンドリファレンス」の「
put-configuration-recorder」を参照してください。 -
(オプション) カスタマー管理設定レコーダーが正しく設定されていることを確認するには、次の
describe-configuration-recordersコマンドを使用します。$ aws configservice describe-configuration-recorders以下に、応答の例を示します。
{ "ConfigurationRecorders": [ { "name": "default" "recordingGroup": { "allSupported": true, "exclusionByResourceTypes": { "resourceTypes": [] }, "includeGlobalResourceTypes": true, "recordingStrategy": { "useOnly": "ALL_SUPPORTED_RESOURCE_TYPES" }, "resourceTypes": [], }, "recordingMode": { "recordingFrequency":CONTINUOUSorDAILY, "recordingModeOverrides": [ { "description": "Description you provide for the override, "recordingFrequency":CONTINUOUSorDAILY, "resourceTypes": [Comma-separated list of resource types to include in the override] } ] }, "roleARN": "arn:aws:iam::123456789012:role/config-role" } ] }
-
- Record all current and future supported resources types excluding the types you specify
-
記録から除外するように指定したリソースタイプを除き、グローバルリソースタイプを含め、現在および将来サポートされるすべてのリソースタイプの設定変更を記録するように AWS Config を設定します。
リソースタイプの記録を停止することを選択した場合、既に記録されている設定項目は変更されません。サポートされるリソースタイプのリストについては、「サポートされているリソースタイプ」を参照してください。
-
put-configuration-recorderコマンドを使用します。このコマンドは、[
--configuration-recorder] フィールドと [---recording-group] フィールドを使用します。$ aws configservice put-configuration-recorder \ --configuration-recorderfile://configurationRecorder.json\ --recording-groupfile://recordingGroup.json[
configuration-recorder] フィールド[
configurationRecorder.json] ファイルは、nameおよびroleArn、さらに設定レコーダーのデフォルトの記録頻度を指定します (recordingMode)。{ "name": "default", "roleARN": "arn:aws:iam::123456789012:role/config-role", "recordingMode": { "recordingFrequency":CONTINUOUSorDAILY, "recordingModeOverrides": [ { "description": "Description you provide for the override", "recordingFrequency":CONTINUOUSorDAILY, "resourceTypes": [Comma-separated list of resource types to include in the override] } ] } }[
recording-group] フィールドrecordingGroup.jsonファイルは、AWS Config で記録するリソースのタイプを指定します。次の例に示すように、exclusionByResourceTypesの [resourceTypes] フィールドに除外する 1 つ以上のリソースタイプを渡します。{ "allSupported": false, "exclusionByResourceTypes": { "resourceTypes": [ "AWS::Redshift::ClusterSnapshot", "AWS::RDS::DBClusterSnapshot", "AWS::CloudFront::StreamingDistribution" ] }, "includeGlobalResourceTypes": false, "recordingStrategy": { "useOnly": "EXCLUSION_BY_RESOURCE_TYPES" }, }オブジェクトの詳細については、「AWS CLI コマンドリファレンス」の「
put-configuration-recorder」を参照してください。 -
(オプション) カスタマー管理設定レコーダーが正しく設定されていることを確認するには、次の
describe-configuration-recordersコマンドを使用します。$aws configservice describe-configuration-recorders以下に、応答の例を示します。
{ "ConfigurationRecorders": [ { "name": "default", "recordingGroup": { "allSupported": false, "exclusionByResourceTypes": { "resourceTypes": [ "AWS::Redshift::ClusterSnapshot", "AWS::RDS::DBClusterSnapshot", "AWS::CloudFront::StreamingDistribution" ] }, "includeGlobalResourceTypes": false, "recordingStrategy": { "useOnly": "EXCLUSION_BY_RESOURCE_TYPES" }, "resourceTypes": [], }, "recordingMode": { "recordingFrequency":CONTINUOUSorDAILY, "recordingModeOverrides": [ { "description": "Description you provide for the override, "recordingFrequency":CONTINUOUSorDAILY, "resourceTypes": [Comma-separated list of resource types to include in the override] } ] }, "roleARN": "arn:aws:iam::123456789012:role/config-role" } ] }
-
- Record specific resource types
-
指定したリソースタイプの設定変更のみを記録するよう、AWS Config を設定します。
リソースタイプの記録を停止することを選択した場合、既に記録されている設定項目は変更されません。サポートされるリソースタイプのリストについては、「サポートされているリソースタイプ」を参照してください。
-
put-configuration-recorderコマンドを使用します。このコマンドは、[
--configuration-recorder] フィールドと [---recording-group] フィールドを使用します。$ aws configservice put-configuration-recorder \ --configuration-recorderfile://configurationRecorder.json\ --recording-groupfile://recordingGroup.json[
configuration-recorder] フィールド[
configurationRecorder.json] ファイルは、nameおよびroleArn、さらに設定レコーダーのデフォルトの記録頻度を指定します (recordingMode)。{ "name": "default", "roleARN": "arn:aws:iam::123456789012:role/config-role", "recordingMode": { "recordingFrequency":CONTINUOUSorDAILY, "recordingModeOverrides": [ { "description": "Description you provide for the override", "recordingFrequency":CONTINUOUSorDAILY, "resourceTypes": [Comma-separated list of resource types to include in the override] } ] } }[
recording-group] フィールドrecordingGroup.jsonファイルは、AWS Config で記録するリソースのタイプを指定します。次の例に示すように、[resourceTypes] フィールドに除外する 1 つ以上のリソースタイプを渡します。{ "allSupported": false, "recordingStrategy": { "useOnly": "INCLUSION_BY_RESOURCE_TYPES" }, "includeGlobalResourceTypes": false, "resourceTypes": [ "AWS::EC2::EIP", "AWS::EC2::Instance", "AWS::EC2::NetworkAcl", "AWS::EC2::SecurityGroup", "AWS::CloudTrail::Trail", "AWS::EC2::Volume", "AWS::EC2::VPC", "AWS::IAM::User", "AWS::IAM::Policy" ] }オブジェクトの詳細については、「AWS CLI コマンドリファレンス」の「
put-configuration-recorder」を参照してください。 -
(オプション) カスタマー管理設定レコーダーが正しく設定されていることを確認するには、次の
describe-configuration-recordersコマンドを使用します。$aws configservice describe-configuration-recorders以下に、応答の例を示します。
{ "ConfigurationRecorders": [ { "name": "default", "recordingGroup": { "allSupported": false, "exclusionByResourceTypes": { "resourceTypes": [] }, "includeGlobalResourceTypes": false "recordingStrategy": { "useOnly": "INCLUSION_BY_RESOURCE_TYPES" }, "resourceTypes": [ "AWS::EC2::EIP", "AWS::EC2::Instance", "AWS::EC2::NetworkAcl", "AWS::EC2::SecurityGroup", "AWS::CloudTrail::Trail", "AWS::EC2::Volume", "AWS::EC2::VPC", "AWS::IAM::User", "AWS::IAM::Policy" ] }, "recordingMode": { "recordingFrequency":CONTINUOUSorDAILY, "recordingModeOverrides": [ { "description": "Description you provide for the override, "recordingFrequency":CONTINUOUSorDAILY, "resourceTypes": [Comma-separated list of resource types to include in the override] } ] }, "roleARN": "arn:aws:iam::123456789012:role/config-role" } ] }
-