Aracılığıyla paylaş


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

maxLength: 256

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ı olursa, işlem 201 (Tamam) HTTP durum kodunu döndürür.

Other Status Codes

ErrorDetails

Varsayılan hata yanıtı.

Güvenlik

azure_auth

Azure Active Directory OAuth2 Akışı.

Tür: oauth2
Akış: implicit
Yetkilendirme URL’si: https://login.microsoftonline.com/common/oauth2/authorize

Kapsamlar

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

Örnekler

DPSCreateOrUpdateCertificate

Örnek isteği

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=="
  }
}

Örnek yanıt

{
  "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 (byte)

X509 sertifikası .cer dosyasının veya yalnızca .pem dosya içeriğinin taban-64 gösterimi.

created

string (date-time-rfc1123)

Sertifikanın oluşturma tarihi ve saati.

expiry

string (date-time-rfc1123)

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 (date-time-rfc1123)

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ü.

Değer Description
Application
Key
ManagedIdentity
User

ErrorDetails

Hata ayrıntıları.

Name Tür Description
code

integer (int32)

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 (date-time)

Kaynak oluşturma (UTC) zaman damgası.

createdBy

string

Kaynağı oluşturan kimlik.

createdByType

createdByType

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

lastModifiedAt

string (date-time)

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

lastModifiedBy

string

Kaynağı en son değiştiren kimlik.

lastModifiedByType

createdByType

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