Certificate - Create Or Update

Arka uçla kimlik doğrulaması için kullanılan sertifikayı oluşturur veya güncelleştirir.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}?api-version=2022-08-01

URI Parametreleri

Name İçinde Gerekli Tür Description
certificateId
path True

string

Sertifika varlığının tanımlayıcısı. Geçerli API Management hizmet örneğinde benzersiz olmalıdır.

Regex pattern: ^[^*#&+:<>?]+$

resourceGroupName
path True

string

Kaynak grubunun adı. Ad büyük/küçük harfe duyarlı değildir.

serviceName
path True

string

API Management hizmetinin adı.

Regex pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$

subscriptionId
path True

string

Hedef aboneliğin kimliği.

api-version
query True

string

Bu işlem için kullanılacak API sürümü.

İstek Başlığı

Name Gerekli Tür Description
If-Match

string

Varlığın ETag'i. Varlık oluştururken gerekli değildir, ancak varlığı güncelleştirirken gereklidir.

İstek Gövdesi

Name Tür Description
properties.data

string

Application/x-pkcs12 gösterimini kullanarak temel 64 kodlanmış sertifika.

properties.keyVault

KeyVaultContractCreateProperties

Sertifikanın KeyVault konum ayrıntıları.

properties.password

string

Sertifika parolası

Yanıtlar

Name Tür Description
200 OK

CertificateContract

Sertifika ayrıntıları başarıyla güncelleştirildi.

Headers

ETag: string

201 Created

CertificateContract

Yeni sertifika başarıyla eklendi.

Headers

ETag: string

Other Status Codes

ErrorResponse

İşlemin neden başarısız olduğunu açıklayan hata yanıtı.

Güvenlik

azure_auth

Azure Active Directory OAuth2 Flow.

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation kullanıcı hesabınızın kimliğine bürünme

Örnekler

ApiManagementCreateCertificate
ApiManagementCreateCertificateWithKeyVault

ApiManagementCreateCertificate

Sample Request

PUT https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/tempcert?api-version=2022-08-01

{
  "properties": {
    "data": "****************Base 64 Encoded Certificate *******************************",
    "password": "****Certificate Password******"
  }
}

Sample Response

{
  "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/tempcert",
  "type": "Microsoft.ApiManagement/service/certificates",
  "name": "tempcert",
  "properties": {
    "subject": "CN=contoso.com",
    "thumbprint": "*******************3",
    "expirationDate": "2018-03-17T21:55:07+00:00"
  }
}
{
  "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/tempcert",
  "type": "Microsoft.ApiManagement/service/certificates",
  "name": "tempcert",
  "properties": {
    "subject": "CN=contoso.com",
    "thumbprint": "*******************3",
    "expirationDate": "2018-03-17T21:55:07+00:00"
  }
}

ApiManagementCreateCertificateWithKeyVault

Sample Request

PUT https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/templateCertkv?api-version=2022-08-01

{
  "properties": {
    "keyVault": {
      "identityClientId": "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0",
      "secretIdentifier": "https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert"
    }
  }
}

Sample Response

{
  "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/templateCertkv",
  "type": "Microsoft.ApiManagement/service/certificates",
  "name": "templateCertkv",
  "properties": {
    "subject": "CN=*.msitesting.net",
    "thumbprint": "EA**********************9AD690",
    "expirationDate": "2037-01-01T07:00:00Z",
    "keyVault": {
      "secretIdentifier": "https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert",
      "identityClientId": "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0",
      "lastStatus": {
        "code": "Success",
        "timeStampUtc": "2020-09-22T00:24:53.3191468Z"
      }
    }
  }
}
{
  "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/templateCertkv",
  "type": "Microsoft.ApiManagement/service/certificates",
  "name": "templateCertkv",
  "properties": {
    "subject": "CN=*.msitesting.net",
    "thumbprint": "EA**********************9AD690",
    "expirationDate": "2037-01-01T07:00:00Z",
    "keyVault": {
      "secretIdentifier": "https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert",
      "identityClientId": "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0",
      "lastStatus": {
        "code": "Success",
        "timeStampUtc": "2020-09-22T00:24:53.3191468Z"
      }
    }
  }
}

Tanımlar

Name Description
CertificateContract

Sertifika ayrıntıları.

CertificateCreateOrUpdateParameters

Sertifika oluşturma veya güncelleştirme ayrıntıları.

ErrorFieldContract

Hata Alanı sözleşmesi.

ErrorResponse

Hata Yanıtı.

KeyVaultContractCreateProperties

keyVault sözleşme ayrıntılarını oluşturun.

KeyVaultContractProperties

KeyVault sözleşme ayrıntıları.

KeyVaultLastAccessStatusContractProperties

Sözleşme Güncelleştirme Özellikleri'ni yayımlar.

CertificateContract

Sertifika ayrıntıları.

Name Tür Description
id

string

Kaynağın tam kaynak kimliği. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name

string

Kaynağın adı

properties.expirationDate

string

Sertifikanın son kullanma tarihi. Tarih şu biçime uygundur: yyyy-MM-ddTHH:mm:ssZ ISO 8601 standardı tarafından belirtildiği gibi.

properties.keyVault

KeyVaultContractProperties

Sertifikanın KeyVault konum ayrıntıları.

properties.subject

string

Sertifikanın konu özniteliği.

properties.thumbprint

string

Sertifikanın parmak izi.

type

string

Kaynağın türü. Örneğin, "Microsoft.Compute/virtualMachines" veya "Microsoft.Storage/storageAccounts"

CertificateCreateOrUpdateParameters

Sertifika oluşturma veya güncelleştirme ayrıntıları.

Name Tür Description
properties.data

string

Application/x-pkcs12 gösterimini kullanarak temel 64 kodlanmış sertifika.

properties.keyVault

KeyVaultContractCreateProperties

Sertifikanın KeyVault konum ayrıntıları.

properties.password

string

Sertifika parolası

ErrorFieldContract

Hata Alanı sözleşmesi.

Name Tür Description
code

string

Özellik düzeyi hata kodu.

message

string

Özellik düzeyi hatanın insan tarafından okunabilir gösterimi.

target

string

Özellik adı.

ErrorResponse

Hata Yanıtı.

Name Tür Description
error.code

string

Hizmet tanımlı hata kodu. Bu kod, yanıtta belirtilen HTTP hata kodu için bir alt durum görevi görür.

error.details

ErrorFieldContract[]

Doğrulama hatası durumunda istekte gönderilen geçersiz alanların listesi.

error.message

string

Hatanın insan tarafından okunabilir gösterimi.

KeyVaultContractCreateProperties

keyVault sözleşme ayrıntılarını oluşturun.

Name Tür Description
identityClientId

string

Anahtar kasası gizli dizisine erişmek için kullanılacak Olan SystemAssignedIdentity için Null veya UserAssignedIdentity İstemci Kimliği.

secretIdentifier

string

Gizli diziyi getirmek için anahtar kasası gizli dizi tanımlayıcısı. Sürümlü gizli dizi sağlamak otomatik yenilemeyi engeller. Bunun için API Management hizmetinin aka.ms/apimmsi ile yapılandırılması gerekir

KeyVaultContractProperties

KeyVault sözleşme ayrıntıları.

Name Tür Description
identityClientId

string

Anahtar kasası gizli dizisine erişmek için kullanılacak Olan SystemAssignedIdentity için Null veya UserAssignedIdentity İstemci Kimliği.

lastStatus

KeyVaultLastAccessStatusContractProperties

Anahtar kasasından gizli diziyi son kez eşitleme ve yenileme durumu.

secretIdentifier

string

Gizli diziyi getirmek için anahtar kasası gizli dizi tanımlayıcısı. Sürümlü gizli dizi sağlamak otomatik yenilemeyi engeller. Bunun için API Management hizmetinin aka.ms/apimmsi ile yapılandırılması gerekir

KeyVaultLastAccessStatusContractProperties

Sözleşme Güncelleştirme Özellikleri'ni yayımlar.

Name Tür Description
code

string

Anahtar kasasından gizli dizi eşitleme ve yenileme için son durum kodu.

message

string

Hatanın ayrıntıları yoksa boş.

timeStampUtc

string

Gizli diziye son erişildiğinde. Tarih şu biçime uygundur: yyyy-MM-ddTHH:mm:ssZ ISO 8601 standardı tarafından belirtildiği gibi.