Consulta os detalhes de um pacote de conformidade em um grupo de contas especificado.
Descrição da operação
Este tópico fornece um exemplo de como obter os detalhes do pacote de conformidade cp-fdc8626622af00f9**** no grupo de contas ca-f632626622af0079****.
Experimente agora
Testar
Autorização RAM
|
Ação |
Nível de acesso |
Tipo de recurso |
Chave de condição |
Ação dependente |
|
config:GetAggregateCompliancePack |
get |
*AggregateCompliancePack
|
Nenhuma | Nenhuma |
Parâmetros da solicitação
|
Parâmetro |
Tipo |
Obrigatório |
Descrição |
Exemplo |
| CompliancePackId |
string |
Sim |
O ID do pacote de conformidade. Para obter mais informações sobre como obter o ID de um pacote de conformidade, consulte ListAggregateCompliancePacks. |
cp-fdc8626622af00f9**** |
| AggregatorId |
string |
Sim |
O ID do grupo de contas. Para obter mais informações sobre como obter o ID de um grupo de contas, consulte ListAggregators. |
ca-f632626622af0079**** |
Tag
deprecated
|
array<object> |
Não |
As tags do recurso. Este parâmetro foi descontinuado e não tem mais efeito. Você pode anexar até 20 tags a um recurso. |
|
|
object |
Não |
As tags do recurso. Você pode anexar até 20 tags a um recurso. |
||
| Key |
string |
Não |
A chave da tag do recurso. Você pode anexar até 20 chaves de tag. |
key-1 |
| Value |
string |
Não |
O valor da tag do recurso. Você pode anexar até 20 valores de tag. |
value-1 |
Elementos de resposta
|
Elemento |
Tipo |
Descrição |
Exemplo |
|
object |
Nenhum. |
||
| RequestId |
string |
O ID da solicitação. |
6EC7AED1-172F-42AE-9C12-295BC2ADB751 |
| CompliancePack |
object |
Os detalhes do pacote de conformidade. |
|
| Status |
string |
O status do pacote de conformidade. Valores válidos:
|
ACTIVE |
| RiskLevel |
integer |
O nível de risco do pacote de conformidade. Valores válidos:
|
1 |
| CompliancePackId |
string |
O ID do pacote de conformidade. |
cp-fdc8626622af00f9**** |
| Description |
string |
A descrição do pacote de conformidade. |
基于等保2.0三级标准,提供持续检测合规性的建议模板,帮助您提前自检并修复问题,以便快速通过正式检测。 |
| ConfigRules |
array<object> |
A lista de regras no pacote de conformidade. |
|
|
array<object> |
Nenhum. |
||
| ManagedRuleIdentifier |
string |
The identifier of the rule. |
eip-bandwidth-limit |
| ConfigRuleName |
string |
The name of the rule. |
弹性IP实例带宽满足最低要求 |
| ConfigRuleId |
string |
The ID of the rule. |
cr-a260626622af0005**** |
| ConfigRuleParameters |
array<object> |
The input parameters of the rule. |
|
|
object |
None |
||
| Required |
boolean |
Indicates whether the input parameter is required. Valid values:
|
true |
| ParameterName |
string |
The name of the input parameter. |
bandwidth |
| ParameterValue |
string |
The value of the input parameter. |
10 |
| Description |
string |
The description of the rule. |
弹性IP实例可用带宽大于等于指定参数值,视为“合规”。默认值:10 MB。 |
| RiskLevel |
integer |
The risk level of the rule. Valid values:
|
1 |
| ResourceTypesScope |
string |
The types of the resources that are evaluated by the rule. Separate multiple resource types with commas (,). |
ACS::EIP::EipAddress |
| TemplateContent |
string |
As informações sobre o modelo de pacote de conformidade. A lista de regras no modelo não inclui regras de função definidas pelo usuário. Você pode usar o modelo para criar rapidamente o mesmo pacote de conformidade para outras contas ou grupos de contas. |
{ "configRuleTemplates": [ { "configRuleName": "自定义条件规则示例", "scope": { "complianceResourceTypes": [ "ACS::ECS::Instance" ] }, "description": "", "source": { "owner": "CUSTOM_CONFIGURATION", "identifier": "acs-config-configuration", "sourceDetails": [ { "messageType": "ScheduledNotification", "maximumExecutionFrequency": "Twelve_Hours" }, { "messageType": "ConfigurationItemChangeNotification" } ], "conditions": "{\"ComplianceConditions\":\"{\\\"operator\\\":\\\"and\\\",\\\"children\\\":[{\\\"operator\\\":\\\"GreaterOrEquals\\\",\\\"featurePath\\\":\\\"$.Cpu\\\",\\\"featureSource\\\":\\\"CONFIGURATION\\\",\\\"desired\\\":\\\"2\\\"}]}\"}" }, "inputParameters": {} }, { "configRuleName": "OSS存储空间Referer在指定的防盗链白名单中", "scope": { "complianceResourceTypes": [ "ACS::OSS::Bucket" ] }, "description": "OSS存储空间开启防盗链并且Referer在指定白名单中,视为“合规”。", "source": { "owner": "ALIYUN", "identifier": "oss-bucket-referer-limit", "sourceDetails": [ { "messageType": "ConfigurationItemChangeNotification" } ] }, "inputParameters": { "allowEmptyReferer": "true", "allowReferers": "http://www.aliyun.com" } } ] } |
| CompliancePackName |
string |
O nome do pacote de conformidade. |
等保三级预检合规包 |
| AccountId |
integer |
O ID da conta de gerenciamento à qual o pacote de conformidade pertence. |
100931896542**** |
| AggregatorId |
string |
O ID do grupo de contas. |
ca-f632626622af0079**** |
| CompliancePackTemplateId |
string |
O ID do modelo de pacote de conformidade. |
ct-5f26ff4e06a300c4**** |
| CreateTimestamp |
integer |
O timestamp em que o pacote de conformidade foi criado. Unidade: milissegundos. |
1624243657000 |
| Scope |
object |
O escopo de avaliação do pacote de conformidade. |
|
| ExcludeRegionIdsScope |
string |
The IDs of the regions to exclude. Separate multiple region IDs with commas (,). |
cn-hangzhou |
| ResourceIdsScope |
string |
The IDs of the resources to which the rule applies. Separate multiple resource IDs with commas (,). |
eip-8vbf3x310fn56ijfd**** |
| ExcludeResourceGroupIdsScope |
string |
The IDs of the resource groups to exclude. The compliance pack does not apply to resources in these groups. Separate multiple resource group IDs with commas (,). |
rg-aekzc7r7rhx**** |
| TagKeyScope |
string |
The tag key of the resources to which the compliance pack applies. |
ECS |
| TagValueScope |
string |
The tag value of the resources to which the compliance pack applies. |
test |
| RegionIdsScope |
string |
The IDs of the regions where the compliance pack applies. Separate multiple region IDs with commas (,). |
cn-hangzhou |
| ExcludeResourceIdsScope |
string |
The IDs of the resources to exclude. The compliance pack does not apply to these resources. Separate multiple resource IDs with commas (,). |
eip-8vbf3x310fn56ijfd**** |
| ResourceGroupIdsScope |
string |
The IDs of the resource groups where the compliance pack applies. Separate multiple resource group IDs with commas (,). |
rg-aekzc7r7rhx**** |
| TagsScope |
array<object> |
The tag scope. |
|
|
object |
|||
| TagKey |
string |
The tag key. |
key-1 |
| TagValue |
string |
The tag value. |
value-1 |
| ExcludeTagsScope |
array<object> |
The excluded tag scope. |
|
|
object |
The excluded tag scope. |
||
| TagKey |
string |
The tag key. |
key-2 |
| TagValue |
string |
The tag value. |
value-2 |
| Tags |
array<object> |
As tags do recurso. |
|
|
object |
As tags do recurso. |
||
| TagKey |
string |
The tag key. |
key-1 |
| TagValue |
string |
The tag value. |
value-1 |
Exemplos
Resposta de sucesso
JSON formato
{
"RequestId": "6EC7AED1-172F-42AE-9C12-295BC2ADB751",
"CompliancePack": {
"Status": "ACTIVE",
"RiskLevel": 1,
"CompliancePackId": "cp-fdc8626622af00f9****",
"Description": "基于等保2.0三级标准,提供持续检测合规性的建议模板,帮助您提前自检并修复问题,以便快速通过正式检测。",
"ConfigRules": [
{
"ManagedRuleIdentifier": "eip-bandwidth-limit",
"ConfigRuleName": "弹性IP实例带宽满足最低要求",
"ConfigRuleId": "cr-a260626622af0005****",
"ConfigRuleParameters": [
{
"Required": true,
"ParameterName": "bandwidth",
"ParameterValue": "10"
}
],
"Description": "弹性IP实例可用带宽大于等于指定参数值,视为“合规”。默认值:10 MB。",
"RiskLevel": 1,
"ResourceTypesScope": "ACS::EIP::EipAddress"
}
],
"TemplateContent": "{\n \"configRuleTemplates\": [\n {\n \"configRuleName\": \"自定义条件规则示例\",\n \"scope\": {\n \"complianceResourceTypes\": [\n \"ACS::ECS::Instance\"\n ]\n },\n \"description\": \"\",\n \"source\": {\n \"owner\": \"CUSTOM_CONFIGURATION\",\n \"identifier\": \"acs-config-configuration\",\n \"sourceDetails\": [\n {\n \"messageType\": \"ScheduledNotification\",\n \"maximumExecutionFrequency\": \"Twelve_Hours\"\n },\n {\n \"messageType\": \"ConfigurationItemChangeNotification\"\n }\n ],\n \"conditions\": \"{\\\"ComplianceConditions\\\":\\\"{\\\\\\\"operator\\\\\\\":\\\\\\\"and\\\\\\\",\\\\\\\"children\\\\\\\":[{\\\\\\\"operator\\\\\\\":\\\\\\\"GreaterOrEquals\\\\\\\",\\\\\\\"featurePath\\\\\\\":\\\\\\\"$.Cpu\\\\\\\",\\\\\\\"featureSource\\\\\\\":\\\\\\\"CONFIGURATION\\\\\\\",\\\\\\\"desired\\\\\\\":\\\\\\\"2\\\\\\\"}]}\\\"}\"\n },\n \"inputParameters\": {}\n },\n {\n \"configRuleName\": \"OSS存储空间Referer在指定的防盗链白名单中\",\n \"scope\": {\n \"complianceResourceTypes\": [\n \"ACS::OSS::Bucket\"\n ]\n },\n \"description\": \"OSS存储空间开启防盗链并且Referer在指定白名单中,视为“合规”。\",\n \"source\": {\n \"owner\": \"ALIYUN\",\n \"identifier\": \"oss-bucket-referer-limit\",\n \"sourceDetails\": [\n {\n \"messageType\": \"ConfigurationItemChangeNotification\"\n }\n ]\n },\n \"inputParameters\": {\n \"allowEmptyReferer\": \"true\",\n \"allowReferers\": \"http://www.aliyun.com\"\n }\n }\n ]\n}",
"CompliancePackName": "等保三级预检合规包",
"AccountId": 0,
"AggregatorId": "ca-f632626622af0079****",
"CompliancePackTemplateId": "ct-5f26ff4e06a300c4****",
"CreateTimestamp": 1624243657000,
"Scope": {
"ExcludeRegionIdsScope": "cn-hangzhou",
"ResourceIdsScope": "eip-8vbf3x310fn56ijfd****\n",
"ExcludeResourceGroupIdsScope": "rg-aekzc7r7rhx****",
"TagKeyScope": "ECS",
"TagValueScope": "test",
"RegionIdsScope": "cn-hangzhou",
"ExcludeResourceIdsScope": "eip-8vbf3x310fn56ijfd****",
"ResourceGroupIdsScope": "rg-aekzc7r7rhx****",
"TagsScope": [
{
"TagKey": "key-1",
"TagValue": "value-1"
}
],
"ExcludeTagsScope": [
{
"TagKey": "key-2",
"TagValue": "value-2"
}
]
},
"Tags": [
{
"TagKey": "key-1",
"TagValue": "value-1"
}
]
}
}
Códigos de erro
|
Código de status HTTP |
Código de erro |
Mensagem de erro |
Descrição |
|---|---|---|---|
| 400 | Invalid.AggregatorId.Value | The specified AggregatorId is invalid. | The specified aggregator ID does not exist or you are not authorized to use the aggregator. |
| 400 | Invalid.CompliancePackId.Value | The specified CompliancePackId does not exist. | The specified compliance pack ID does not exist. |
| 404 | AccountNotExisted | Your account does not exist. | |
| 503 | ServiceUnavailable | The request has failed due to a temporary failure of the server. | The request has failed due to a temporary failure of the server. |
Consulte Códigos de Erro para uma lista completa.
Notas de versão
Consulte Notas de Versão para uma lista completa.