翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。
CLI AWS を使用したリソースの記録
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.jsonconfiguration-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.jsonconfiguration-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.jsonconfiguration-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" } ] }
-