Certificate - Create Or Update

Create a certificate.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/certificates/{certificateName}?api-version=2015-10-31

URI Parameters

Name In Required Type Description
subscriptionId
path True
  • string

Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

resourceGroupName
path True
  • string

Name of an Azure Resource group.

Regex pattern: ^[-\w\._]+$

automationAccountName
path True
  • string

The name of the automation account.

certificateName
path True
  • string

The parameters supplied to the create or update certificate operation.

api-version
query True
  • string

Client Api Version.

Request Body

Name Required Type Description
name True
  • string

Gets or sets the name of the certificate.

properties.base64Value True
  • string

Gets or sets the base64 encoded value of the certificate.

properties.description
  • string

Gets or sets the description of the certificate.

properties.isExportable
  • boolean

Gets or sets the is exportable flag of the certificate.

properties.thumbprint
  • string

Gets or sets the thumbprint of the certificate.

Responses

Name Type Description
200 OK

OK

201 Created

Created

Other Status Codes

Automation error response describing why the operation failed.

Examples

Create or update a certificate

Sample Request

PUT https://management.azure.com/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount18/certificates/testCert?api-version=2015-10-31
{
  "name": "testCert",
  "properties": {
    "base64Value": "base 64 value of cert",
    "description": "Sample Cert",
    "thumbprint": "thumbprint of cert",
    "isExportable": false
  }
}

Sample Response

{
  "id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/certificates/testCert",
  "name": "testCert",
  "properties": {
    "description": "Sample Cert",
    "isExportable": false,
    "thumbprint": "thumbprint of cert",
    "expiryTime": "2018-03-29T17:25:45+00:00",
    "creationTime": "2017-03-29T17:26:43.337+00:00",
    "lastModifiedTime": "2017-03-29T17:26:43.337+00:00"
  }
}
{
  "id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/certificates/testCert",
  "name": "testCert",
  "properties": {
    "description": "sample certificate. Description updated",
    "isExportable": false,
    "thumbprint": "thumbprint of cert",
    "expiryTime": "2018-03-29T17:25:45+00:00",
    "creationTime": "2017-03-29T17:26:43.337+00:00",
    "lastModifiedTime": "2017-03-29T17:28:55.01+00:00"
  }
}

Definitions

Certificate

Definition of the certificate.

CertificateCreateOrUpdateParameters

The parameters supplied to the create or update or replace certificate operation.

ErrorResponse

Error response of an operation failure

Certificate

Definition of the certificate.

Name Type Description
id
  • string

Fully qualified resource Id for the resource

name
  • string

The name of the resource

properties.creationTime
  • string

Gets the creation time.

properties.description
  • string

Gets or sets the description.

properties.expiryTime
  • string

Gets the expiry time of the certificate.

properties.isExportable
  • boolean

Gets the is exportable flag of the certificate.

properties.lastModifiedTime
  • string

Gets the last modified time.

properties.thumbprint
  • string

Gets the thumbprint of the certificate.

type
  • string

The type of the resource.

CertificateCreateOrUpdateParameters

The parameters supplied to the create or update or replace certificate operation.

Name Type Description
name
  • string

Gets or sets the name of the certificate.

properties.base64Value
  • string

Gets or sets the base64 encoded value of the certificate.

properties.description
  • string

Gets or sets the description of the certificate.

properties.isExportable
  • boolean

Gets or sets the is exportable flag of the certificate.

properties.thumbprint
  • string

Gets or sets the thumbprint of the certificate.

ErrorResponse

Error response of an operation failure

Name Type Description
code
  • string

Error code

message
  • string

Error message indicating why the operation failed.