通过本文您可以了解资源配置变更历史投递到对象存储OSS的内容示例和主要参数说明。
内容示例
创建资源、修改资源和删除资源的配置变更历史投递到对象存储OSS的内容示例如下:
创建资源
在单账号模式下,阿里云账号
120886317861****
在云服务器ECS的呼和浩特地域创建云盘test_disk
,在configurationDiff
中显示云盘的变更前信息null
和变更后详细信息,在relationship
和relationshipDiff
中显示云盘无相关资源,且无变更项。{ "configurationItems": [ { "accountId": "120886317861****", "availabilityZone": "cn-huhehaote-a", "regionId": "cn-huhehaote", "configuration": "{\"DetachedTime\":\"\",\"Category\":\"cloud_essd\",\"KMSKeyId\":\"\",\"Description\":\"test_disk\",\"ResourceGroupId\":\"\",\"Size\":40,\"Encrypted\":false,\"DeleteAutoSnapshot\":false,\"DiskChargeType\":\"PostPaid\",\"MultiAttach\":\"Disabled\",\"ExpiredTime\":\"2029-09-08T16:00Z\",\"ImageId\":\"\",\"StorageSetId\":\"\",\"Tags\":{\"Tag\":[]},\"Status\":\"Available\",\"AttachedTime\":\"\",\"StorageClusterId\":\"\",\"ZoneId\":\"cn-huhehaote-a\",\"InstanceId\":\"\",\"ProductCode\":\"\",\"SourceSnapshotId\":\"\",\"Device\":\"\",\"PerformanceLevel\":\"PL1\",\"DeleteWithInstance\":false,\"EnableAutomatedSnapshotPolicy\":false,\"EnableAutoSnapshot\":true,\"AutoSnapshotPolicyId\":\"\",\"DiskName\":\"test_disk\",\"BdfId\":\"\",\"OperationLocks\":{\"OperationLock\":[]},\"Portable\":true,\"Type\":\"data\",\"SerialNumber\":\"hp33k7bzwqvtmjrs****\",\"CreationTime\":\"2021-08-25T06:32:40Z\",\"RegionId\":\"cn-huhehaote\",\"DiskId\":\"d-hp33k7bzwqvtmjrs****\"}", "configurationDiff": "{\"Status\":[null,\"Available\"],\"Category\":[null,\"cloud_essd\"],\"Description\":[null,\"test_disk\"],\"ZoneId\":[null,\"cn-huhehaote-a\"],\"Size\":[null,40],\"Encrypted\":[null,false],\"PerformanceLevel\":[null,\"PL1\"],\"DeleteAutoSnapshot\":[null,false],\"DeleteWithInstance\":[null,false],\"EnableAutomatedSnapshotPolicy\":[null,false],\"DiskChargeType\":[null,\"PostPaid\"],\"EnableAutoSnapshot\":[null,true],\"DiskName\":[null,\"test_disk\"],\"MultiAttach\":[null,\"Disabled\"],\"OperationLocks\":[null,{\"OperationLock\":[]}],\"Portable\":[null,true],\"Type\":[null,\"data\"],\"SerialNumber\":[null,\"hp33k7bzwqvtmjrs****\"],\"ExpiredTime\":[null,\"2029-09-08T16:00Z\"],\"CreationTime\":[null,\"2021-08-25T06:32:40Z\"],\"RegionId\":[null,\"cn-huhehaote\"],\"Tags\":[null,{\"Tag\":[]}],\"DiskId\":[null,\"d-hp33k7bzwqvtmjrs****\"]}", "relationship": "", "relationshipDiff": "{\"relationship_diff\":{\"relationship_add\":[],\"relationship_delete\":[]}}", "captureTime": 1629873195000, "resourceCreateTime": 1629873160000, "resourceStatus": "Available", "resourceId": "d-hp33k7bzwqvtmjrs****", "resourceName": "test_disk", "resourceGroupId": "rg-acfmw3ty5y7****", "resourceType": "ACS::ECS::Disk", "tags": "{}", "resourceEventType": "DISCOVERED" } ], "requestId": "c746a79d-c0b9-4584-bf41-a6a9f370ee71", "fileVersion": "1.0"
修改资源
在单账号模式下,阿里云账号
120886317861****
在对象存储OSS的杭州地域为存储空间test_bucket
关联标签,在configurationDiff
中显示存储空间的标签变更前信息null
和标签变更后信息(Key
为key1
)。{ "configurationItems": [ { "accountId": "120886317861****", "availabilityZone": "", "regionId": "cn-hangzhou", "configuration": "{\"AccessControlList\":{\"Grant\":\"private\"},\"ServerSideEncryptionRule\":{\"SSEAlgorithm\":\"None\"},\"Comment\":\"\",\"CreationDate\":\"2021-08-10T07:49:53.000Z\",\"Owner\":{\"DisplayName\":\"120886317861****\",\"ID\":\"120886317861****\"},\"StorageClass\":\"Standard\",\"DataRedundancyType\":\"LRS\",\"AllowEmptyReferer\":\"true\",\"Name\":\"test_bucket\",\"BucketPolicy\":{\"LogPrefix\":\"\",\"LogBucket\":\"\"},\"TagSet\":{\"Tag\":[{\"Value\":\"\",\"Key\":\"key1\"}]},\"ExtranetEndpoint\":\"oss-cn-hangzhou.aliyuncs.com\",\"IntranetEndpoint\":\"oss-cn-hangzhou-internal.aliyuncs.com\",\"Location\":\"oss-cn-hangzhou\"}", "configurationDiff": "{\"TagSet\":[null,{\"Tag\":[{\"Value\":\"\",\"Key\":\"key1\"}]}]}", "relationship": "", "relationshipDiff": "", "captureTime": 1629949618000, "resourceCreateTime": 1628581793000, "resourceStatus": "", "resourceId": "test_bucket", "resourceName": "test_bucket", "resourceGroupId": "", "resourceType": "ACS::OSS::Bucket", "tags": "{\"key1\":[\"\"]}", "resourceEventType": "MODIFY" } ], "requestId": "e2e88348-8ee4-4b3a-9908-0c815bd47718", "fileVersion": "1.0" }
删除资源
在多账号模式下,管理账号
100931896542****
在云服务器ECS的呼和浩特地域删除云盘test01_disk
,在configurationDiff
中显示云盘变更前信息和变更后信息(null),在relationship
和relationshipDiff
中显示云盘无相关资源,且无变更项。{ "configurationItems": [ { "accountId": "100931896542****", "availabilityZone": "cn-huhehaote-a", "regionId": "cn-huhehaote", "configuration": "{\"DetachedTime\":\"\",\"Category\":\"cloud_essd\",\"KMSKeyId\":\"\",\"Description\":\"\",\"ResourceGroupId\":\"\",\"Size\":40,\"Encrypted\":false,\"DeleteAutoSnapshot\":false,\"DiskChargeType\":\"PostPaid\",\"MultiAttach\":\"Disabled\",\"ExpiredTime\":\"2029-09-08T16:00Z\",\"ImageId\":\"\",\"StorageSetId\":\"\",\"Tags\":{\"Tag\":[]},\"Status\":\"Available\",\"AttachedTime\":\"\",\"StorageClusterId\":\"\",\"ZoneId\":\"cn-huhehaote-a\",\"InstanceId\":\"\",\"ProductCode\":\"\",\"SourceSnapshotId\":\"\",\"Device\":\"\",\"PerformanceLevel\":\"PL1\",\"DeleteWithInstance\":false,\"EnableAutomatedSnapshotPolicy\":false,\"EnableAutoSnapshot\":true,\"AutoSnapshotPolicyId\":\"\",\"DiskName\":\"test01_disk\",\"BdfId\":\"\",\"OperationLocks\":{\"OperationLock\":[]},\"Portable\":true,\"Type\":\"data\",\"SerialNumber\":\"hp3ezlgii0ltupns****\",\"CreationTime\":\"2021-08-25T08:16:20Z\",\"RegionId\":\"cn-huhehaote\",\"DiskId\":\"d-hp3ezlgii0ltupns****\"}", "configurationDiff": "{\"Status\":[\"Available\",null],\"Category\":[\"cloud_essd\",null],\"ZoneId\":[\"cn-huhehaote-a\",null],\"Size\":[40,null],\"Encrypted\":[false,null],\"PerformanceLevel\":[\"PL1\",null],\"DeleteAutoSnapshot\":[false,null],\"DeleteWithInstance\":[false,null],\"EnableAutomatedSnapshotPolicy\":[false,null],\"DiskChargeType\":[\"PostPaid\",null],\"EnableAutoSnapshot\":[true,null],\"DiskName\":[\"test01_disk\",null],\"MultiAttach\":[\"Disabled\",null],\"OperationLocks\":[{\"OperationLock\":[]},null],\"Portable\":[true,null],\"Type\":[\"data\",null],\"SerialNumber\":[\"hp3ezlgii0ltupns****\",null],\"ExpiredTime\":[\"2029-09-08T16:00Z\",null],\"CreationTime\":[\"2021-08-25T08:16:20Z\",null],\"RegionId\":[\"cn-huhehaote\",null],\"Tags\":[{\"Tag\":[]},null],\"DiskId\":[\"d-hp3ezlgii0ltupns****\",null]}", "relationship": "", "relationshipDiff": "{\"relationship_diff\":{\"relationship_add\":[],\"relationship_delete\":[]}}", "captureTime": 1629880000000, "resourceCreateTime": 1629879380000, "resourceStatus": "Available", "resourceId": "d-hp3ezlgii0ltupns****", "resourceName": "test01_disk", "resourceGroupId": "rg-acfmvoh45rh****", "resourceType": "ACS::ECS::Disk", "tags": "{}", "resourceEventType": "REMOVE" } ], "requestId": "cbb047ba-1149-46d3-a07d-5ac20d94ba49", "fileVersion": "1.0" }
参数说明
资源配置变更历史投递到对象存储OSS的主要参数说明如下表所示。
参数 | 说明 |
accountId | 资源归属的账号ID。配置审计支持如下账号类型:
|
regionId | 资源所在地域ID。 |
configuration | 资源的详细配置。 |
configurationDiff | 资源配置变更的具体变更项及变更前后信息。 |
relationship | 相关资源的详细信息,包括相关资源所在地域ID、资源关系、资源ID和资源类型。根据资源是否有相关资源,该参数显示如下:
|
relationshipDiff | 相关资源的变更项。 |
captureTime | 配置审计发现资源变更事件并生成快照的时间戳。 |
resourceCreateTime | 创建资源的时间戳。 |
resourceStatus | 资源状态。资源的状态取决于各云服务对资源的定义,该参数可能为空。例如:
|
resourceId | 资源ID。 |
resourceName | 资源名称。 |
resourceGroupId | 资源归属的资源组ID。根据资源类型是否支持资源组,该参数显示如下:
|
resourceType | 资源类型。关于支持配置审计的资源类型,请参见配置审计支持的资源类型和资源关系。 |
tags | 资源标签。 |
resourceEventType | 资源变更事件的类型。取值:
|