Consulta os detalhes de um pacote de conformidade específico.
Descrição da operação
Este tópico fornece um exemplo de como consultar os detalhes do pacote de conformidade cp-fdc8626622af00f9****. A resposta indica que o pacote de conformidade tem o nome de MLPS 2.0 Level 3 Pre-check Compliance Package, seu status é ACTIVE e o nível de risco de suas regras é 1 (alto risco).
Experimente agora
Testar
Autorização RAM
|
Ação |
Nível de acesso |
Tipo de recurso |
Chave de condição |
Ação dependente |
|
config:GetCompliancePack |
get |
*CompliancePack
|
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 do pacote de conformidade, consulte ListCompliancePacks. |
cp-a8a8626622af0082**** |
Tag
deprecated
|
array<object> |
Não |
As tags do recurso. Este parâmetro foi descontinuado e não tem efeito se for especificado. Você pode adicionar até 20 tags. |
|
|
object |
Não |
As tags do recurso. Você pode adicionar até 20 tags. |
||
| Key |
string |
Não |
A chave da tag do recurso. A chave da tag não pode ser uma string vazia. A chave da tag pode ter até 64 caracteres. Não pode começar com Você pode especificar até 20 chaves de tag por vez. |
key-1 |
| Value |
string |
Não |
O valor da tag do recurso. O valor da tag pode ser uma string vazia ou uma string de até 128 caracteres. Não pode começar com Cada chave de tag deve ter um valor de tag correspondente. Você pode especificar até 20 valores de tag por vez. |
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 |
As informações sobre o pacote de conformidade. |
|
| Status |
string |
O status do pacote de conformidade. Valores válidos:
|
ACTIVE |
| CompliancePackId |
string |
O ID do pacote de conformidade. |
cp-a8a8626622af0082**** |
| RiskLevel |
integer |
O nível de risco do pacote de conformidade. Valores válidos:
|
1 |
| 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 template. |
eip-bandwidth-limit |
| ConfigRuleName |
string |
The name of the rule. |
弹性IP实例带宽满足最低要求 |
| ConfigRuleId |
string |
The rule ID. |
cr-a260626622af0005**** |
| ConfigRuleParameters |
array<object> |
The information about the rule parameters. |
|
|
object |
None. |
||
| Required |
boolean |
Indicates whether the parameter is required for the rule. Valid values:
|
true |
| ParameterName |
string |
The name of the rule parameter. |
bandwidth |
| ParameterValue |
string |
The value of the rule 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 resources that are evaluated by the rule. Separate multiple resource types with commas (,). |
ACS::EIP::EipAddress |
| TemplateContent |
string |
As informações do modelo para o pacote de conformidade. A lista de regras no modelo não inclui regras de função definidas pelo usuário. Você pode usar este 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 Alibaba Cloud à qual o pacote de conformidade pertence. |
100931896542**** |
| CompliancePackTemplateId |
string |
O ID do modelo de pacote de conformidade. |
ct-5f26ff4e06a300c4**** |
| CreateTimestamp |
integer |
O carimbo de data/hora de quando o pacote de conformidade foi criado. Unidade: milissegundos. |
1624245766000 |
| Scope |
object |
O escopo de avaliação. |
|
| ExcludeRegionIdsScope |
string |
The IDs of the regions from which resources are excluded. Separate multiple region IDs with commas (,). |
cn-hangzhou |
| ResourceIdsScope |
string |
The compliance package is effective only for resources with the specified IDs. Separate multiple resource IDs with commas (,). |
eip-8vbf3x310fn56ijfd**** |
| ExcludeResourceGroupIdsScope |
string |
The compliance package is not effective for the resources in the resource groups with the specified IDs. Separate multiple resource group IDs with commas (,). |
rg-aekzc7r7rhx**** |
| TagKeyScope |
string |
The compliance package is effective only for the resources that have the specified tag key. |
ECS |
| TagsScope |
array<object> |
The tag scope. |
|
|
object |
The tag scope. |
||
| 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 |
| TagValueScope |
string |
The compliance package is effective only for the resources that have the specified tag key-value pair. |
test |
| RegionIdsScope |
string |
The compliance package is effective only for resources in the specified regions. |
cn-hangzhou |
| ExcludeResourceIdsScope |
string |
The compliance package is not effective for the resources with the specified IDs. The resources are not evaluated. |
eip-8vbf3x310fn56ijfd**** |
| ResourceGroupIdsScope |
string |
The compliance package is effective only for the resources in the resource groups with the specified IDs. |
rg-aekzc7r7rhx**** |
| 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",
"CompliancePackId": "cp-a8a8626622af0082****",
"RiskLevel": 1,
"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,
"CompliancePackTemplateId": "ct-5f26ff4e06a300c4****",
"CreateTimestamp": 1624245766000,
"Scope": {
"ExcludeRegionIdsScope": "cn-hangzhou",
"ResourceIdsScope": "eip-8vbf3x310fn56ijfd****\n",
"ExcludeResourceGroupIdsScope": "rg-aekzc7r7rhx****",
"TagKeyScope": "ECS",
"TagsScope": [
{
"TagKey": "key-1",
"TagValue": "value-1"
}
],
"ExcludeTagsScope": [
{
"TagKey": "key-2",
"TagValue": "value-2"
}
],
"TagValueScope": "test",
"RegionIdsScope": "cn-hangzhou",
"ExcludeResourceIdsScope": "eip-8vbf3x310fn56ijfd****",
"ResourceGroupIdsScope": "rg-aekzc7r7rhx****"
},
"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.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.