Import a certificate
The Import a certificate operation creates a new certificate using a base64 encoded representation of a certificate. This operation can also update a certificate by the same name.
Request
To specify the request, replace <subscription-id> with your subscription ID, <cloud-service-name> with the name of the cloud service to use for making the request, <automation-account-name> with the name of the automation account to use for making the request, and <certificate-name> with the name of the certificate to import. Include required URI parameters
Method |
Request URI |
---|---|
PUT |
https://management.core.windows.net/<subscription-id>/cloudServices/<cloud-service-name>/resources/automation/~/automationAccounts/<automation-account-name>/certificates/<certificate-name>?api-version=2014-12-08 |
URI Parameters
Parameter |
Description |
---|---|
api-version |
Required. Must be set to 2014-12-08. |
Request Headers
The request headers in the following table are required.
Request Header |
Description |
---|---|
Content-Type |
Set to application/json. Do not include a specification for charset. |
x-ms-version |
Specifies the version of the operation. Set to 2013-06-01 or a later version. |
Request Body
{
"properties":{ "base64Value":"MIIDEDCCAfigAwIBAgIQEq5PU1v0s7JN9gvWHgRWrDANBgkqhkiG9w0BAQUFADAgMR4wHAYDVQQDDBVvYWFzdGVzdGRmMDMtdi1icnVoYW0wHhcNMTQxMjMwMjAxNDU3WhcNMTYxMjMwMjAyNDU3WjAgMR4wHAYDVQQDDBVvYWFzdGVzdGRmMDMtdi1icnVoYW0wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC3cvXQZdPKf8oU9iurFq4YTCZTZ4dykoy8Qqh2BiqXQEkIuyt5b1pKsy26626u3u9LcyrMc/hbRJ5EwBbhclJcthSnhICkOrbyk0hc7g8FdHWeX9196QvCCmrbWTkxvjXJ3maOiUS30Dg6EQaMP39qFRhlbOIkHuUXC4Ek/XP4EKJzJy8ivwDvLDLsAkkoheNySjRU9XIfFTRFlhjMTkqSqyNQ4GB32olI28genVMlClj/7Qs9xmJOajo7G0sebTMI8hq0fvOR+Rf9VZnk/ICFjrrZ5K3sIoDclmzVKOy5r0Q13w7TgLaPlerV92iUAjHPMyL9wv/Uy0oZsRCLWAnJAgMBAAGjRjBEMA4GA1UdDwEB/wQEAwIHgDATBgNVHSUEDDAKBggrBgEFBQcDAzAdBgNVHQ4EFgQUlxfvvS2SINa01DiPoL4J3sflMakwDQYJKoZIhvcNAQEFBQADggEBAAtNqjfKOd4gO17+LgOfndEHmtAV0KkfHqjGMle+kt63O2m/1QBTk9E3qH7KAHz/myA014DQRkRb1mnMHHjE88FXTz6dJWmINM/m4Ri0BNKUfmaaKFafqm90y03ZppEfT/EUuZp36tNHAz7AvpIW6qkD5HdXl1LN3juhd7XXMfdh8ZJVtJGYuvvFDrMsw9GvwpWjxNioxr6PhwH+6vRUHxoLlMeiRw3e04DuRoEHPYz23apYcfkht3up4kZCi/moi8oaOd/abValMZXvwQ7rc+tfys/VtoKcWYMeweZLaVXJQmK1EdGtVKt3/DuYkA9Gl5+0uJcJ01jYU/dGQ/M6YUo=",
"description":"Certificate for Litware.com"
}
}
Element |
Required |
Type |
Description |
---|---|---|---|
name |
Yes |
String |
Friendly name for the certificate. |
base64Value |
Yes |
String |
The base64 encoded representation of the certificate. |
description |
No |
String |
Description of the certificate or additional information. |
Response
Status Code
A successful operation returns 201 (Created). For information about common error codes, see HTTP/1.1 Status Code Definitions.
Response Headers
Request Header |
Description |
---|---|
x-ms-request-id |
A unique identifier for the current operation. |
Response Body
{
"name":"SSLCert-Litware.com",
"properties":{
"description":"Certificate for Litware.com",
"isExportable":false,
"thumbprint":"99E7C5699E4C54AC8A8F7191800599DE94BBCE94",
"expiryTime":"2016-12-30T20:24:57+00:00",
"creationTime":"2015-03-26T03:47:11.713+00:00",
"lastModifiedTime":"2015-03-26T03:47:11.713+00:00"
}
}
Element |
Description |
---|---|
name |
Friendly name for the certificate. |
description |
Description of the certificate or additional information. |
isExportable |
true if the certificate can be exported; otherwise false. |
thumbprint |
The thumbprint of the certificate. |
expriryTime |
The date the certificate expires. |
creationTime |
The date and time the certificate was created. |
lastmodificationTime |
The date and time the certificate was last changed. |