Skip to main content
È disponibile una versione più recente di questo prodotto.
La versione in lingua italiana fornita proviene da una traduzione automatica. Per eventuali incoerenze, fare riferimento alla versione in lingua inglese.

Modify a setting

Collaboratori

PUT /accounts/{account_id}/core/v1/settings/{setting_id}

Replaces the entire stored resource with the supplied JSON request body while preserving key values that are not user-modifiable.

Parameters

Name Type In Required Description

account_id

string

path

True

ID of the containing account resource

  • example: {{.Account}}

setting_id

string

path

True

ID of the setting collection to list

Request Body

Replaces the entire stored resource with the supplied JSON request body while preserving key values that are not user-modifiable.

Name Type Required Description

type

string

True

Media type of the resource. Defined values are:

  • "application/astra-setting"

version

string

True

Version of the resource. Defined values are:

  • "1.0"

  • "1.1"

id

string

False

Globally unique identifier of the resource. Defined values are:

  • Conforms to the UUIDv4 Schema

name

string

False

JSON string containing a name for the setting, in hierarchal dot notation (.). Defined values are:

  • Minimum length: 1

  • Maximum length: 63

  • This string is internally validated to prevent XSS, Unicode, directory traversal, and SQL-injection attacks. This value is specified by the configmap that is loaded at runtime and cannot be updated by the user.

currentConfig

type_json

False

JSON object containing keys and values that make up the current configuration for this setting. The contents of this object must conform to the JSON Schema contained in the configSchema field. Default values are supplied by the configmap. After defaults are changed by the user, they will not be overwritten.

desiredConfig

type_json

False

JSON object containing keys and values that make up the requested configuration for this setting. The contents of this object must conform to the JSON schema contained in the configSchema field. The object does not exist until specified. When specified, this triggers the feature service to notify the corresponding service to request that the desired configuration can be applied. The corresponding service can then perform validation and apply the desired configuration to the current configuration.

configSchema

type_json_schema

False

JSON object containing the JSON schema for the config property in this resource. Must conform to JSON Schema Draft 7. If config values are present in the resource, validation against the indicated configSchema is mandatory. As a common convention, configurations are recommended to have an "isEnabled" field, when appropriate. The "isEnabled" field contains a value that indicates whether the setting is turned on ("true") or off ("false").

state

string

False

JSON string containing a value indicating the operational state of the application. Defined values are:

  • "valid" - The current configuration matches the desired config.

  • "pending" - The desired configuration is being applied.

  • "error" - The desired configuration cannot be applied.

stateUnready

array[string]

False

JSON array of JSON strings, each indicating a reason why the setting was not successfully applied. Defined values are:

  • Minimum length: 1

  • Maximum length: 127

metadata

type_astra_metadata_update

False

Client and service-specified metadata associated with the resource. Defined values are:

  • Conforms to the Astra Metadata Schema If not specified on update, the metadata object's labels, creationTimestamp and createdBy, will be preserved without modification.

Example request
{
  "type": "application/astra-setting",
  "version": "1.1",
  "desiredConfig": {
    "credential": "e3d2ea77-398e-49be-85fd-ec66d9426a06",
    "port": 587,
    "relayServer": "smtp.sendgrid.net",
    "isEnabled": "true"
  }
}

Response

Status: 204, Indicates if the setting resource was updated.

Response

Status: 401, Unauthorized
Name Type Required Description

type

string

True

title

string

True

detail

string

True

status

string

True

correlationID

string

False

Example response
{
  "type": "https://astra.netapp.io/problems/3",
  "title": "Missing bearer token",
  "detail": "The request is missing the required bearer token.",
  "status": "401"
}

Response

Status: 400, Bad request
Name Type Required Description

type

string

True

title

string

True

detail

string

True

status

string

True

correlationID

string

False

invalidFields

array[invalidFields]

False

List of invalid request body fields

Example response
{
  "type": "https://astra.netapp.io/problems/5",
  "title": "Invalid query parameters",
  "detail": "The supplied query parameters are invalid.",
  "status": "400"
}

Response

Status: 409, Conflict
Name Type Required Description

type

string

True

title

string

True

detail

string

True

status

string

True

correlationID

string

False

invalidFields

array[invalidFields]

False

List of invalid request body fields

Example response
{
  "type": "https://astra.netapp.io/problems/10",
  "title": "JSON resource conflict",
  "detail": "The request body JSON contains a field that conflicts with an idempotent value.",
  "status": "409"
}

Response

Status: 403, Forbidden
Name Type Required Description

type

string

True

title

string

True

detail

string

True

status

string

True

correlationID

string

False

Example response
{
  "type": "https://astra.netapp.io/problems/11",
  "title": "Operation not permitted",
  "detail": "The requested operation isn't permitted.",
  "status": "403"
}

Response

Status: 503, Service unavailable
Name Type Required Description

type

string

True

title

string

True

detail

string

True

status

string

True

correlationID

string

False

Example response
{
  "type": "https://astra.netapp.io/problems/41",
  "title": "Service not ready",
  "detail": "Currently, the service can't respond to this request.",
  "status": "503"
}

Error

Status: 404, Not found
Name Type Required Description

type

string

True

title

string

True

detail

string

True

status

string

True

correlationID

string

False

Example error response
{
  "type": "https://astra.netapp.io/problems/2",
  "title": "Collection not found",
  "detail": "The collection specified in the request URI wasn't found.",
  "status": "404"
}

Definitions

See Definitions

type_json

JSON object containing keys and values that make up the current configuration for this setting. The contents of this object must conform to the JSON Schema contained in the configSchema field. Default values are supplied by the configmap. After defaults are changed by the user, they will not be overwritten.

type_json

JSON object containing keys and values that make up the requested configuration for this setting. The contents of this object must conform to the JSON schema contained in the configSchema field. The object does not exist until specified. When specified, this triggers the feature service to notify the corresponding service to request that the desired configuration can be applied. The corresponding service can then perform validation and apply the desired configuration to the current configuration.

properties

type_json_schema

JSON object containing the JSON schema for the config property in this resource. Must conform to JSON Schema Draft 7. If config values are present in the resource, validation against the indicated configSchema is mandatory. As a common convention, configurations are recommended to have an "isEnabled" field, when appropriate. The "isEnabled" field contains a value that indicates whether the setting is turned on ("true") or off ("false").

Name Type Required Description

$schema

string

True

type

string

True

properties

properties

True

additionalProperties

boolean

True

required

array[string]

True

type_astra_label

Name Type Required Description

name

string

True

value

string

True

type_astra_metadata_update

Client and service-specified metadata associated with the resource. Defined values are:

  • Conforms to the Astra Metadata Schema If not specified on update, the metadata object's labels, creationTimestamp and createdBy, will be preserved without modification.

Name Type Required Description

labels

array[type_astra_label]

False

creationTimestamp

string

False

modificationTimestamp

string

False

createdBy

string

False

modifiedBy

string

False

invalidParams

Name Type Required Description

name

string

True

Name of the invalid query parameter

reason

string

True

Reason why the query parameter is invalid

invalidFields

Name Type Required Description

name

string

True

Name of the invalid request body field

reason

string

True

Reason why the request body field is invalid