Cria uma instância de Secret em um namespace.
Sintaxe
{
"Type": "ALIYUN::SAE::Secret",
"Properties": {
"NamespaceId": String,
"SecretName": String,
"SecretType": String,
"SecretData": Map
}
}
Propriedades
|
Propriedade |
Tipo |
Obrigatório |
Editável |
Descrição |
Restrição |
|
NamespaceId |
String |
Sim |
Não |
ID do namespace da instância de Secret. |
Para o namespace padrão, especifique apenas o RegionId, como |
|
SecretName |
String |
Sim |
Não |
Nome da instância de Secret. |
O valor pode conter letras, dígitos e sublinhados (_) e deve começar com uma letra. |
|
SecretType |
String |
Sim |
Não |
Tipo da instância de Secret. |
Valores válidos:
|
|
SecretData |
Map |
Sim |
Sim |
Dados do Secret. |
Especifique os dados de chave-valor no seguinte formato: {"Data":"{"k1":"v1", "k2":"v2"}"} Neste formato, k representa a chave e v representa o valor. Exemplo de valor:
|
Valores de retorno
Fn::GetAtt
SecretId: ID da instância de Secret.
NamespaceId: ID do namespace da instância de Secret.
Exemplo
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
SecretName:
Type: String
Description:
en: Secret instance name. Allows combinations of numbers, letters, en dash (-) and underscores (_) and only start with letters.
AllowedPattern: ^[a-zA-Z][a-zA-Z0-9_-]*$
Required: true
SecretType:
Type: String
Description:
en: |-
The currently supported Secret instance type.The values are as follows:
kubernetes.io/dockerconfigjson: A confidential dictionary that stores the username and password of the mirror repository, used to pull mirror authentication during deployment.
AllowedValues:
- Opaque
- kubernetes.io/dockerconfigjson
- kubernetes.io/tls
Required: true
NamespaceId:
Type: String
Description:
en: The namespace ID where the Secret instance resides. If the namespace you are in is the default namespace, you just need to fill in the RegionId.
Required: true
SecretData:
Type: Json
Description:
en: |-
Secret key-value pair data, required.The format is as follows:
{"Data":"{"k1":"v1", "k2":"v2"}"}
k represents the key and v represents the value.
Required: true
Resources:
Secret:
Type: ALIYUN::SAE::Secret
Properties:
SecretName:
Ref: SecretName
SecretType:
Ref: SecretType
NamespaceId:
Ref: NamespaceId
SecretData:
Ref: SecretData
Outputs:
SecretId:
Description: The ID of the secret.
Value:
Fn::GetAtt:
- Secret
- SecretId
NamespaceId:
Description: The namespace ID that the Secret instance belongs to.
Value:
Fn::GetAtt:
- Secret
- NamespaceId
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"SecretName": {
"Type": "String",
"Description": {
"en": "Secret instance name. Allows combinations of numbers, letters, en dash (-) and underscores (_) and only start with letters."
},
"AllowedPattern": "^[a-zA-Z][a-zA-Z0-9_-]*$",
"Required": true
},
"SecretType": {
"Type": "String",
"Description": {
"en": "The currently supported Secret instance type.The values are as follows:\nkubernetes.io/dockerconfigjson: A confidential dictionary that stores the username and password of the mirror repository, used to pull mirror authentication during deployment."
},
"AllowedValues": [
"Opaque",
"kubernetes.io/dockerconfigjson",
"kubernetes.io/tls"
],
"Required": true
},
"NamespaceId": {
"Type": "String",
"Description": {
"en": "The namespace ID where the Secret instance resides. If the namespace you are in is the default namespace, you just need to fill in the RegionId."
},
"Required": true
},
"SecretData": {
"Type": "Json",
"Description": {
"en": "Secret key-value pair data, required.The format is as follows:\n{\"Data\":\"{\"k1\":\"v1\", \"k2\":\"v2\"}\"}\nk represents the key and v represents the value."
},
"Required": true
}
},
"Resources": {
"Secret": {
"Type": "ALIYUN::SAE::Secret",
"Properties": {
"SecretName": {
"Ref": "SecretName"
},
"SecretType": {
"Ref": "SecretType"
},
"NamespaceId": {
"Ref": "NamespaceId"
},
"SecretData": {
"Ref": "SecretData"
}
}
}
},
"Outputs": {
"SecretId": {
"Description": "The ID of the secret.",
"Value": {
"Fn::GetAtt": [
"Secret",
"SecretId"
]
}
},
"NamespaceId": {
"Description": "The namespace ID that the Secret instance belongs to.",
"Value": {
"Fn::GetAtt": [
"Secret",
"NamespaceId"
]
}
}
}
}