Azure / Azure/azure-rest-api-specs
[BUG]
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 444
Description
### API Spec link
https://github.com/Azure/azure-rest-api-specs/blob/main/specification/common-types/resource-management/v2/privatelinks.json
### API Spec version
v2
### Describe the bug
was directed to place a bug report here, from https://github.com/Azure/azure-sdk-for-python/issues/39387.
I am trying to rebuild a Private Endpoint Connection using the operation begin_create_or_updateon private_endpoint_connections, However under the required param PrivateEndpointConnectionProperties and property private_endpoint the PrivateEndpoint which is made up of just ìd`is marked as read-only so does not allow for pointing the connection to the desired Private Endpoint.
### Expected behavior
I would expect to create the connection between the account and the existing private endpoint.
### Actual behavior
Field is read-only so validate fails before request.
### Reproduction Steps
```
cog_client.private_endpoint_connections.begin_create_or_update(resource_group_name=resource_group_name, account_name=account_name, private_endpoint_connection_name=private_endpoint_connection_name, properties=PrivateEndpointConnectionProperties(
private_link_service_connection_state=PrivateLinkServiceConnectionState(
status="Approved",
description="Approved by script"
),
private_endpoint=PrivateEndpoint(
id=f"subscriptions/{subscription_id}/resourcegroups/{resource_group_name}/providers/microsoft.network/privateendpoints/{private_endpoint_name}"
)
))
```
```
Readonly attribute id will be ignored in class
```
### Environment
Package Name: azure-mgmt-cognitiveservices
Package Version: 13.6.0
Operating System: Mac Sonoma 14.6.1
Python Version: 3.8
Contributor guide
Research direction
Start with specification/common-types/resource-management/v2/privatelinks.json and the PrivateEndpointConnectionProperties.private_endpoint model used by begin_create_or_update. Reproduce the validation with the provided Python example and compare the read-only definition with the expected create request. Done means the existing private endpoint ID is accepted and the connection request can be built.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, python
- Domain
- api, cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100