Secrets - Update

Allows modifying tags of secrets. All other properties will be ignored.

PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/secrets/{name}?api-version=2018-09-15

URI Parameters

Name In Required Type Description
labName
path True

string

The name of the lab.

name
path True

string

The name of the secret.

resourceGroupName
path True

string

The name of the resource group.

subscriptionId
path True

string

The subscription ID.

userName
path True

string

The name of the user profile.

api-version
query True

string

Client API version.

Request Body

Name Type Description
tags

object

The tags of the resource.

Responses

Name Type Description
200 OK

Secret

OK

Other Status Codes

CloudError

BadRequest

Security

azure_auth

OAuth2 Implicit Grant

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

Scopes

Name Description
user_impersonation Access Microsoft Azure

Examples

Secrets_Update

Sample Request

PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/secrets/{secretName}?api-version=2018-09-15

{
  "tags": {
    "tagName1": "tagValue1"
  }
}

Sample Response

{
  "properties": {
    "uniqueIdentifier": "00000000-0000-0000-0000-000000000000"
  },
  "id": "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/users/{userName}/secrets/{secretName}",
  "name": "{secretName}",
  "type": "Microsoft.DevTestLab/labs/users/secrets"
}

Definitions

Name Description
CloudError

Error from a REST request.

CloudErrorBody

Body of an error from a REST request.

Secret

A secret.

SecretFragment

A secret.

CloudError

Error from a REST request.

Name Type Description
error

CloudErrorBody

The cloud error that occurred

CloudErrorBody

Body of an error from a REST request.

Name Type Description
code

string

The error code.

details

CloudErrorBody[]

Inner errors.

message

string

The error message.

target

string

The error target.

Secret

A secret.

Name Type Description
id

string

The identifier of the resource.

location

string

The location of the resource.

name

string

The name of the resource.

properties.provisioningState

string

The provisioning status of the resource.

properties.uniqueIdentifier

string

The unique immutable identifier of a resource (Guid).

properties.value

string

The value of the secret for secret creation.

tags

object

The tags of the resource.

type

string

The type of the resource.

SecretFragment

A secret.

Name Type Description
tags

object

The tags of the resource.