Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -264,10 +264,10 @@
"properties": {
"keyName": {
"type": "string",
"description": "Gets or sets the agent registration key name - Primary or Secondary.",
"description": "Gets or sets the agent registration key name - primary or secondary.",
"enum": [
"Primary",
"Secondary"
"primary",
Copy link
Contributor

@fearthecowboy fearthecowboy Feb 8, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ouch!
You're changing enum values here.

Did the service change, or was this an error in the spec before? If this is a service change, we're potentially breaking an API.

As it is, this means that current clients are incorrect. Is this so?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Spec was incorrect here and I just changed it to reflect what we are sending from the service. And we are in the process of releasing new Automation SDKs based on Swagger and are still in preview mode.

Our last stable release of SDK was based on Hyak.

"secondary"
],
"x-ms-enum": {
"name": "AgentRegistrationKeyName",
Expand Down Expand Up @@ -1128,6 +1128,14 @@
"readOnly": true,
"description": "Gets the creation time of the job."
},
"provisioningState": {
"$ref": "#/definitions/ProvisioningStateProperty",
"description": "The current provisioning state of the job."
},
"runOn": {
"type": "string",
"description": "Gets or sets the runOn which specifies the group name where the job is to be executed."
},
"status": {
"type": "string",
"description": "Gets or sets the status of the job.",
Expand Down Expand Up @@ -1201,6 +1209,11 @@
"readOnly": true,
"description": "Gets the id of the resource."
},
"name": {
"type": "string",
"readOnly": true,
"description": "Dsc Compilation Job name"
},
"properties": {
"$ref": "#/definitions/DscCompilationJobProperties",
"x-ms-client-flatten": true,
Expand Down Expand Up @@ -1320,6 +1333,7 @@
"description": "Definition of the configuration property type."
},
"DscConfiguration": {
"type": "object",
"properties": {
"properties": {
"$ref": "#/definitions/DscConfigurationProperties",
Expand Down Expand Up @@ -1494,7 +1508,7 @@
},
"allOf": [
{
"$ref": "#/definitions/Resource"
"$ref": "#/definitions/ProxyResource"
}
],
"description": "Definition of the dsc node type."
Expand Down Expand Up @@ -1550,6 +1564,7 @@
"description": "Gets or sets the id of the resource."
}
},
"x-ms-azure-resource": true,
"description": "Definition of the dsc node configuration."
},
"DscNodeConfigurationListResult": {
Expand Down Expand Up @@ -2541,6 +2556,37 @@
"description": "The Resource definition.",
"x-ms-azure-resource": true
},
"ProxyResource": {
"properties": {
"id": {
"readOnly": true,
"type": "string",
"description": "Resource Id"
},
"name": {
"readOnly": true,
"type": "string",
"description": "Resource name"
},
"type": {
"readOnly": true,
"type": "string",
"description": "Resource type"
}
},
"description": "The Resource definition.",
"x-ms-azure-resource": true
},
"ProvisioningStateProperty": {
"properties": {
"provisioningState": {
"readOnly": true,
"type": "string",
"description": "The provisioning state of the resource."
}
},
"description": "The provisioning state property."
},
"RunAsCredentialAssociationProperty": {
"properties": {
"name": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@
"externalDocs": {
"url": "http://aka.ms/azureautomationsdk/dsccompilationjoboperations"
},
"x-ms-examples": {
"Get a DSC Compilation job": {
"$ref": "./examples/getCompilationJob.json"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, I checked with the team and I resolved the issue. They had added new flags and it wasn't documented in the spec, which caused the validation failures in DSCCompilationJob. Fixed it.

}
},
"parameters": [
{
"$ref": "./definitions.json#/parameters/ResourceGroupNameParameter"
Expand Down Expand Up @@ -159,6 +164,11 @@
"externalDocs": {
"url": "http://aka.ms/azureautomationsdk/compilationjoboperations"
},
"x-ms-examples": {
"List DSC Compilation job in Automation Account": {
"$ref": "./examples/listCompilationJobsByAutomationAccount.json"
}
},
"parameters": [
{
"$ref": "./definitions.json#/parameters/ResourceGroupNameParameter"
Expand Down Expand Up @@ -203,6 +213,63 @@
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/compilationjobs/{jobId}/streams/": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this adding a new API or documenting an existing one that wasn't listed before?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documenting existing API which wasn't listed earlier.

"get": {
"tags": [
"DscCompilationJob"
],
"operationId": "DscCompilationJobStream_ListByJob",
"description": "Retrieve all the job streams for the compilation Job.",
"externalDocs": {
"url": "http://aka.ms/azureautomationsdk/jobstreamoperations"
},
"x-ms-examples": {
"List DSC Compilation job streams": {
"$ref": "./examples/compilationJobStreamList.json"
}
},
"parameters": [
{
"$ref": "./definitions.json#/parameters/ResourceGroupNameParameter"
},
{
"name": "automationAccountName",
"in": "path",
"required": true,
"type": "string",
"description": "The automation account name."
},
{
"name": "jobId",
"in": "path",
"required": true,
"type": "string",
"format": "uuid",
"description": "The job id."
},
{
"$ref": "./definitions.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "./definitions.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "./definitions.json#/definitions/JobStreamListResult"
}
},
"default": {
"description": "Automation error response describing why the operation failed.",
"schema": {
"$ref": "./definitions.json#/definitions/ErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/compilationjobs/{jobId}/streams/{jobStreamId}": {
"get": {
"tags": [
Expand All @@ -213,6 +280,11 @@
"externalDocs": {
"url": "http://aka.ms/azureautomationsdk/jobstreamoperations"
},
"x-ms-examples": {
"Get a DSC Compilation job stream by job stream id": {
"$ref": "./examples/compilationJobStreamByJobStreamId.json"
}
},
"parameters": [
{
"$ref": "./definitions.json#/parameters/ResourceGroupNameParameter"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@
"https"
],
"consumes": [
"application/json"
"application/json",
"text/plain; charset=utf-8"
],
"produces": [
"application/json"
"application/json",
"text/plain; charset=utf-8"
],
"security": [
{
Expand Down Expand Up @@ -256,7 +258,7 @@
"200": {
"description": "OK",
"schema": {
"type": "file"
"type": "string"
}
},
"default": {
Expand Down Expand Up @@ -323,4 +325,4 @@
},
"definitions": {},
"parameters": {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@
"externalDocs": {
"url": "http://aka.ms/azureautomationsdk/agentregistrationoperations"
},
"x-ms-examples": {
"Get Agent Registration Information": {
"$ref": "./examples/getAgentRegistrationInformation.json"
}
},
"parameters": [
{
"$ref": "./definitions.json#/parameters/ResourceGroupNameParameter"
Expand Down Expand Up @@ -87,6 +92,11 @@
"externalDocs": {
"url": "http://aka.ms/azureautomationsdk/agentregistrationoperations"
},
"x-ms-examples": {
"Regenerate the Primary Agent Registration Key": {
"$ref": "./examples/regenerateAgentRegistrationKey.json"
}
},
"parameters": [
{
"$ref": "./definitions.json#/parameters/ResourceGroupNameParameter"
Expand Down Expand Up @@ -140,6 +150,11 @@
"externalDocs": {
"url": "http://aka.ms/azureautomationsdk/dscnodeoperations"
},
"x-ms-examples": {
"Delete a DSC Node": {
"$ref": "./examples/deleteDscNode.json"
}
},
"parameters": [
{
"$ref": "./definitions.json#/parameters/ResourceGroupNameParameter"
Expand Down Expand Up @@ -537,7 +552,7 @@
"200": {
"description": "OK",
"schema": {
"type": "file"
"type": "object"
}
},
"default": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,11 @@
"externalDocs": {
"url": "http://aka.ms/azureautomationsdk/dscnodeconfigurations"
},
"x-ms-examples": {
"Get a DSC node configuration": {
"$ref": "./examples/createOrUpdateDscNodeConfiguration.json"
}
},
"parameters": [
{
"$ref": "./definitions.json#/parameters/ResourceGroupNameParameter"
Expand Down Expand Up @@ -189,12 +194,6 @@
"$ref": "./definitions.json#/definitions/DscNodeConfiguration"
}
},
"201": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this deleted? This may result in a breaking change in the generated clients.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It returns only 200 and not 201. As mentioned earlier, we don't have any swagger-based stable clients and are in the process of releasing them.

I'll confirm the response code with Fiddler.

"description": "Created",
"schema": {
"$ref": "./definitions.json#/definitions/DscNodeConfiguration"
}
},
"default": {
"description": "Automation error response describing why the operation failed.",
"schema": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"parameters": {
"subscriptionId": "subid",
"resourceGroupName": "rg",
"automationAccountName": "myAutomationAccount33",
"api-version": "2015-10-31",
"jobId": "836d4e06-2d88-46b4-8500-7febd4906838",
"jobStreamId": "836d4e06-2d88-46b4-8500-7febd4906838_00636481062421684835_00000000000000000008"
},
"responses": {
"200": {
"headers": {},
"body": {
"id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/compilationjobs/836d4e06-2d88-46b4-8500-7febd4906838/streams/836d4e06-2d88-46b4-8500-7febd4906838_00636481062421684835_00000000000000000008",
"properties": {
"jobStreamId": "836d4e06-2d88-46b4-8500-7febd4906838:00636481062421684835:00000000000000000001",
"summary": "",
"time": "2017-12-05T21:30:42.1684835+00:00",
"streamType": "Output",
"streamText": "",
"value": {
"value": "",
"PSComputerName": "localhost",
"PSShowComputerName": true,
"PSSourceJobInstanceId": "836d4e06-2d88-46b4-8500-7febd4906838"
}
}
}
}
}
}
Loading