Azure / Azure/azure-rest-api-specs

`automation`: python3package resource GET API missing some properties

Open
#25,538 0 comments 0 reactions 0 assignees View on GitHub
Automation Service Attention
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
2d 22h
Merged PRs (30d)
444

Description

When creating a Python3 package reosurce with `ContentLink` field, the GET API does not return these fields. below is an example requests

Create with ContentLink:

```
PUT https://management.azure.com/subscriptions/xxx/resourceGroups/acctestRG-auto-230825185807845706/providers/Microsoft.Automation/automationAccounts/acctest-230825185807845706/python3Packages/acctest-230825185807845706?api-version=2022-08-08 HTTP/2.0
content-type: application/json; charset=utf-8
user-agent: HashiCorp/go-azure-sdk (Go-http-Client/1.1 python3package/2022-08-08) HashiCorp Terraform/1.3.7 (+https://www.terraform.io) Terraform Plugin SDK/2.10.1 terraform-provider-azurerm/dev pid-222c6c49-1b0a-5959-a213-6608f9eb8820
authorization: Bearer xxx
x-ms-correlation-request-id: 98007a53-046a-363b-4d71-c3cfdf8c3d23
content-length: 147
accept-encoding: gzip

{"properties":{"contentLink":{"uri":"https://pypi.org/packages/source/r/requests/requests-2.31.0.tar.gz","version":"2.31.0"}},"tags":{"key":"foo"}}

HTTP/2.0 201
cache-control: no-cache
pragma: no-cache
content-length: 653
content-type: application/json; charset=utf-8
expires: -1
location: https://management.azure.com/subscriptions/85b3dbca-5974-4067-9669-67a141095a76/resourceGroups/acctestRG-auto-230825185807845706/providers/Microsoft.Automation/automationAccounts/acctest-230825185807845706/python3Packages/acctest-230825185807845706?api-version=2022-08-08
x-ms-request-id: d550a3f0-367c-4a23-94c5-d31dc39066db
x-ms-ratelimit-remaining-subscription-writes: 1199
x-ms-correlation-request-id: 98007a53-046a-363b-4d71-c3cfdf8c3d23
x-ms-routing-request-id: WESTINDIA:20230825T105826Z:aa34bb41-d6d0-4f24-922d-5ed4c09cbe50
strict-transport-security: max-age=31536000; includeSubDomains
x-content-type-options: nosniff
x-cache: CONFIG_NOCACHE
x-msedge-ref: Ref A: 38BA2DD2172E4C59BF04108B21068811 Ref B: SEL221051504033 Ref C: 2023-08-25T10:58:26Z
date: Fri, 25 Aug 2023 10:58:26 GMT

{"id":"/subscriptions/xxx/resourceGroups/acctestRG-auto-230825185807845706/providers/Microsoft.Automation/automationAccounts/acctest-230825185807845706/python3Packages/acctest-230825185807845706","name":"acctest-230825185807845706","type":"Microsoft.Automation/AutomationAccounts/Python3Packages","location":"westeurope","tags":{"key":"foo"},"etag":null,"properties":{"isGlobal":false,"version":null,"sizeInBytes":0,"activityCount":0,"creationTime":"2023-08-25T10:58:26.58+00:00","lastModifiedTime":"2023-08-25T10:58:26.643+00:00","error":{"code":null,"message":null},"provisioningState":"Creating","isComposite":false}}
```

Get Response lost ContentLink:

```
GET https://management.azure.com/subscriptions/xxx/resourceGroups/acctestRG-auto-230825185807845706/providers/Microsoft.Automation/automationAccounts/acctest-230825185807845706/python3Packages/acctest-230825185807845706?api-version=2022-08-08 HTTP/2.0
odata-version: 4.0
accept: application/json; charset=utf-8; IEEE754Compatible=false
authorization: Bearer xxxx
x-ms-correlation-request-id: 98007a53-046a-363b-4d71-c3cfdf8c3d23
content-type: application/json; charset=utf-8
user-agent: HashiCorp/go-azure-sdk (Go-http-Client/1.1 python3package/2022-08-08) HashiCorp Terraform/1.3.7 (+https://www.terraform.io) Terraform Plugin SDK/2.10.1 terraform-provider-azurerm/dev pid-222c6c49-1b0a-5959-a213-6608f9eb8820
odata-maxversion: 4.0
accept-encoding: gzip
content-length: 0

HTTP/2.0 200
cache-control: no-cache
pragma: no-cache
content-length: 661
content-type: application/json; charset=utf-8
expires: -1
x-ms-request-id: 1f6377b9-8402-4f4b-844b-d92bf4b0a024
x-ms-ratelimit-remaining-subscription-reads: 11999
x-ms-correlation-request-id: 98007a53-046a-363b-4d71-c3cfdf8c3d23
x-ms-routing-request-id: WESTINDIA:20230825T110052Z:dd86590a-0c3e-4562-b44b-f71137c416b3
strict-transport-security: max-age=31536000; includeSubDomains
x-content-type-options: nosniff
x-cache: CONFIG_NOCACHE
x-msedge-ref: Ref A: F2B78A527608437CA1E8B4D83D25ADA4 Ref B: SEL221051504047 Ref C: 2023-08-25T11:00:50Z
date: Fri, 25 Aug 2023 11:00:51 GMT

{"id":"/subscriptions/xxx/resourceGroups/acctestRG-auto-230825185807845706/providers/Microsoft.Automation/automationAccounts/acctest-230825185807845706/python3Packages/acctest-230825185807845706","name":"acctest-230825185807845706","type":"Microsoft.Automation/AutomationAccounts/Python3Packages","location":"westeurope","tags":{"key":"foo"},"etag":null,"properties":{"isGlobal":false,"version":"2.31.0","sizeInBytes":110794,"activityCount":0,"creationTime":"2023-08-25T10:58:26.58+00:00","lastModifiedTime":"2023-08-25T11:00:42.763+00:00","error":{"code":null,"message":""},"provisioningState":"Succeeded","isComposite":false}}
```

Contributor guide

Open the contributing guide

Research direction

Locate the Azure Automation Python3 package API specification for version 2022-08-08 and compare the documented create response with the GET response shown here. Confirm how ContentLink and its fields are represented; the issue is done when the specification reflects the properties expected from the API GET response.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.