Dps Certificate - Create Or Update

Sertifikayı sağlama hizmetine yükleyin.
Yeni sertifika ekleyin veya var olan bir sertifikayı güncelleştirin.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{provisioningServiceName}/certificates/{certificateName}?api-version=2022-12-12

URI Parametreleri

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

string

Sertifika oluşturma veya güncelleştirme adı.

provisioningServiceName
path True

string

Sağlama hizmetinin adı.

resourceGroupName
path True

string

Kaynak grubu tanımlayıcısı.

subscriptionId
path True

string

Abonelik tanımlayıcısı.

api-version
query True

string

API'nin sürümü.

İstek Başlığı

Name Gerekli Tür Description
If-Match

string

Sertifikanın ETag'i. Bu, mevcut bir sertifikayı güncelleştirmek için gereklidir ve yepyeni bir sertifika oluşturulurken yoksayılır.

İstek Gövdesi

Name Tür Description
properties

CertificateProperties

sertifikanın özellikleri

Yanıtlar

Name Tür Description
200 OK

CertificateResponse

Sertifika zaten varsa ve güncelleştirme başarılıysa, işlem 201 HTTP durum kodunu döndürür (Tamam).

Other Status Codes

ErrorDetails

Varsayılan 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

DPSCreateOrUpdateCertificate

Sample Request

PUT https://management.azure.com/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/provisioningServices/myFirstProvisioningService/certificates/cert?api-version=2022-12-12

{
  "properties": {
    "certificate": "MA=="
  }
}

Sample Response

{
  "properties": {
    "subject": "CN=testdevice1",
    "expiry": "Sat, 31 Dec 2039 23:59:59 GMT",
    "certificate": "MA==",
    "thumbprint": "97388663832D0393C9246CAB4FBA2C8677185A25",
    "isVerified": false,
    "created": "Thu, 12 Oct 2017 19:23:50 GMT",
    "updated": "Thu, 12 Oct 2017 19:23:50 GMT"
  },
  "id": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/ProvisioningServives/myFirstProvisioningService/certificates/cert",
  "name": "cert",
  "type": "Microsoft.Devices/ProvisioningServices/Certificates",
  "etag": "AAAAAAExpNs="
}

Tanımlar

Name Description
CertificateProperties

X509 CA Sertifikasının açıklaması.

CertificateResponse

X509 Sertifikası.

createdByType

Kaynağı oluşturan kimliğin türü.

ErrorDetails

Hata ayrıntıları.

systemData

Kaynağın oluşturulması ve son değiştirilmesiyle ilgili meta veriler.

CertificateProperties

X509 CA Sertifikasının açıklaması.

Name Tür Description
certificate

string

X509 sertifikası .cer dosyasının temel 64 gösterimi veya yalnızca .pem dosyası içeriği.

created

string

Sertifikanın oluşturma tarihi ve saati.

expiry

string

Sertifikanın son kullanma tarihi ve saati.

isVerified

boolean

Sertifikanın doğrulanıp doğrulanmamış olduğunu belirler.

subject

string

Sertifikanın konu adı.

thumbprint

string

Sertifikanın parmak izi.

updated

string

Sertifikanın son güncelleştirme tarihi ve saati.

CertificateResponse

X509 Sertifikası.

Name Tür Description
etag

string

Varlık etiketi.

id

string

Kaynak tanımlayıcısı.

name

string

Sertifikanın adı.

properties

CertificateProperties

sertifikanın özellikleri

systemData

systemData

Kaynağın oluşturulması ve son değiştirilmesiyle ilgili meta veriler.

type

string

Kaynak türü.

createdByType

Kaynağı oluşturan kimliğin türü.

Name Tür Description
Application

string

Key

string

ManagedIdentity

string

User

string

ErrorDetails

Hata ayrıntıları.

Name Tür Description
code

integer

Hata kodu.

details

string

Hata ayrıntıları.

httpStatusCode

string

HTTP durum kodu.

message

string

Hata iletisi.

systemData

Kaynağın oluşturulması ve son değiştirilmesiyle ilgili meta veriler.

Name Tür Description
createdAt

string

Kaynak oluşturma (UTC) zaman damgası.

createdBy

string

Kaynağı oluşturan kimlik.

createdByType

createdByType

Kaynağı oluşturan kimliğin türü.

lastModifiedAt

string

Kaynağın son değişikliğinin zaman damgası (UTC)

lastModifiedBy

string

Kaynağı son değiştiren kimlik.

lastModifiedByType

createdByType

Kaynağı en son değiştiren kimliğin türü.