Todos os produtos
Search
Central de documentação

Resource Orchestration Service:ALIYUN::SAE::ConfigMap

Última atualização: Jun 27, 2026

Cria uma instância de ConfigMap em um namespace.

Sintaxe

{
  "Type": "ALIYUN::SAE::ConfigMap",
  "Properties": {
    "Data": Map,
    "NamespaceId": String,
    "Name": String,
    "Description": String
  }
}

Propriedades

Propriedade

Tipo

Obrigatória

Editável

Descrição

Restrição

Data

Map

Sim

Sim

Dados do ConfigMap.

Pares chave-valor no formato JSON. Exemplo:

{"Data":"{"k1":"v1", "k2":"v2"}"}

k indica a chave e v indica o valor. Para obter mais informações, consulte Gerenciar um ConfigMap do Kubernetes.

NamespaceId

String

Sim

Não

ID do namespace da instância de ConfigMap.

Nenhuma.

Name

String

Sim

Não

Nome da instância de ConfigMap.

Deve começar com uma letra e pode conter letras, dígitos e sublinhados (_).

Description

String

Não

Sim

Descrição da instância.

Deve ter de 1 a 255 caracteres e não pode conter espaços.

Valores de retorno

Fn::GetAtt

  • ConfigMapId: ID da instância de ConfigMap.

  • NamespaceId: ID do namespace da instância de ConfigMap.

Exemplos

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "Data": {
      "Type": "Json",
      "Description": {
        "en": "Configmap key value pairs of data, json format.The format is as follows:\n{\"k1\":\"v1\", \"k2\":\"v2\"}\nK means key, V represents value.For more information about configuration items, see management and use of configuration items."
      },
      "Required": true
    },
    "NamespaceId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the namespace to which this config map instance belongs."
      },
      "Required": true
    },
    "Name": {
      "Type": "String",
      "Description": {
        "en": "The name of the config map."
      },
      "Required": true
    }
  },
  "Resources": {
    "ConfigMap": {
      "Type": "ALIYUN::SAE::ConfigMap",
      "Properties": {
        "Data": {
          "Ref": "Data"
        },
        "NamespaceId": {
          "Ref": "NamespaceId"
        },
        "Name": {
          "Ref": "Name"
        }
      }
    }
  },
  "Outputs": {
    "ConfigMapId": {
      "Description": "The ID of the config map.",
      "Value": {
        "Fn::GetAtt": [
          "ConfigMap",
          "ConfigMapId"
        ]
      }
    },
    "NamespaceId": {
      "Description": "The ID of the namespace to which this config map instance belongs.",
      "Value": {
        "Fn::GetAtt": [
          "ConfigMap",
          "NamespaceId"
        ]
      }
    }
  }
}
                        
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "Data": {
      "Type": "Json",
      "Description": {
        "en": "Configmap key value pairs of data, json format.The format is as follows:\n{\"k1\":\"v1\", \"k2\":\"v2\"}\nK means key, V represents value.For more information about configuration items, see management and use of configuration items."
      },
      "Required": true
    },
    "NamespaceId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the namespace to which this config map instance belongs."
      },
      "Required": true
    },
    "Name": {
      "Type": "String",
      "Description": {
        "en": "The name of the config map."
      },
      "Required": true
    }
  },
  "Resources": {
    "ConfigMap": {
      "Type": "ALIYUN::SAE::ConfigMap",
      "Properties": {
        "Data": {
          "Ref": "Data"
        },
        "NamespaceId": {
          "Ref": "NamespaceId"
        },
        "Name": {
          "Ref": "Name"
        }
      }
    }
  },
  "Outputs": {
    "ConfigMapId": {
      "Description": "The ID of the config map.",
      "Value": {
        "Fn::GetAtt": [
          "ConfigMap",
          "ConfigMapId"
        ]
      }
    },
    "NamespaceId": {
      "Description": "The ID of the namespace to which this config map instance belongs.",
      "Value": {
        "Fn::GetAtt": [
          "ConfigMap",
          "NamespaceId"
        ]
      }
    }
  }
}