dsc-schema
Synopsis
Hämtar JSON-schemat för en DSC-typ.
Syntax
dsc schema [Options] --type <TYPE>
Description
Kommandot schema
returnerar JSON-schemat för en specifik DSC-typ. Dessa scheman kan användas för att verifiera returdata från programmet eller för att generera kompatibla typdefinitioner för ett integrerande verktyg.
Programmet använder dessa scheman för att verifiera data internt när de tas emot eller representerar utdata för ett av programmets kommandon.
Exempel
Exempel 1 – Hämta schemat för dsc-resursen hämta kommandoresultatet
dsc schema --type get-result
$schema: http://json-schema.org/draft-07/schema#
title: GetResult
anyOf:
- $ref: '#/definitions/ResourceGetResponse'
- type: array
items:
$ref: '#/definitions/ResourceGetResult'
definitions:
ResourceGetResponse:
type: object
required:
- actualState
properties:
actualState:
description: The state of the resource as it was returned by the Get method.
additionalProperties: false
ResourceGetResult:
type: object
required:
- name
- result
- type
properties:
metadata:
anyOf:
- $ref: '#/definitions/Metadata'
- type: 'null'
name:
type: string
type:
type: string
result:
$ref: '#/definitions/GetResult'
additionalProperties: false
Metadata:
type: object
properties:
Microsoft.DSC:
anyOf:
- $ref: '#/definitions/MicrosoftDscMetadata'
- type: 'null'
MicrosoftDscMetadata:
type: object
properties:
version:
description: Version of DSC
type:
- string
- 'null'
operation:
description: The operation being performed
anyOf:
- $ref: '#/definitions/Operation'
- type: 'null'
executionType:
description: The type of execution
anyOf:
- $ref: '#/definitions/ExecutionKind'
- type: 'null'
startDatetime:
description: The start time of the configuration operation
type:
- string
- 'null'
endDatetime:
description: The end time of the configuration operation
type:
- string
- 'null'
duration:
description: The duration of the configuration operation
type:
- string
- 'null'
securityContext:
description: The security context of the configuration operation, can be specified to be required
anyOf:
- $ref: '#/definitions/SecurityContextKind'
- type: 'null'
context:
description: Identifies if the operation is part of a configuration
anyOf:
- $ref: '#/definitions/ContextKind'
- type: 'null'
Operation:
type: string
enum:
- Get
- Set
- Test
- Export
ExecutionKind:
type: string
enum:
- Actual
- WhatIf
SecurityContextKind:
type: string
enum:
- Current
- Elevated
- Restricted
ContextKind:
type: string
enum:
- Configuration
- Resource
GetResult:
anyOf:
- $ref: '#/definitions/ResourceGetResponse'
- type: array
items:
$ref: '#/definitions/ResourceGetResult'
Alternativ
-t, --type
Det här alternativet är obligatoriskt för schema
kommandot. Värdet för det här alternativet avgör vilket schema programmet returnerar:
dsc-resource
(referensdokumentation) – Representerar en DSC-resurs som returneras fråndsc resource list
kommandot .resource-manifest
(referensdokumentation) – Validerar ett kommandobaserat DSC-resursmanifest. Om manifestet är ogiltigt utlöser DSC ett fel.get-result
(referensdokumentation) – Representerar utdata fråndsc resource get
kommandot.set-result
(referensdokumentation) – Representerar utdata fråndsc resource set
kommandot.test-result
(referensdokumentation) – Representerar utdata fråndsc resource test
kommandot.configuration
(referensdokumentation) – Validerar ett dokument för DSC-konfiguration. Om dokumentet är ogiltigt genererar DSC ett fel.configuration-get-result
(referensdokumentation) – Representerar utdata fråndsc config get
kommandot.configuration-set-result
(referensdokumentation) – Representerar utdata fråndsc config set
kommandot.configuration-test-result
(referensdokumentation) – Representerar utdata fråndsc config test
kommandot.
Type: String
Mandatory: true
ValidValues: [
dsc-resource,
resource-manifest,
get-result,
set-result,
test-result,
configuration,
configuration-get-result,
configuration-set-result,
configuration-test-result
]
-f, --format
Alternativet --format
styr konsolens utdataformat för kommandot. Om kommandots utdata omdirigeras eller avbildas som en variabel är utdata alltid JSON.
Type: String
Mandatory: false
DefaultValue: yaml
ValidValues: [json, pretty-json, yaml]
-h, --help
Visar hjälpen för det aktuella kommandot eller underkommandot. När du anger det här alternativet ignorerar programmet alla alternativ och argument efter det här alternativet.
Type: Boolean
Mandatory: false