Skip to content

[BUG] Microsoft.Sql - jobAgents - JobAgentIdentityType lists unsupported types in enum #33215

Open
@sreallymatt

Description

@sreallymatt

API Spec link

https://github.com/Azure/azure-rest-api-specs/blob/main/specification/sql/resource-manager/Microsoft.Sql/preview/2023-08-01-preview/JobAgents.json#L345-L350

API Spec version

2023-08-01-preview

Describe the bug

Based on the enum in the REST API specs it would seem that SystemAssigned and SystemAssignedUserAssigned are supported identity types, however when sending SystemAssigned in the request the API responds with a 400 status code.

Docs: https://learn.microsoft.com/en-us/rest/api/sql/job-agents/create-or-update?view=rest-sql-2023-08-01-preview&tabs=HTTP#jobagentidentitytype

Additionally, if SystemAssignedUserAssigned is to be supported, it would be great if the value was updated to SystemAssigned, UserAssigned to be consistent with other identity type enums.

Expected behavior

REST API spec and documentation accurately lists supported types / service accepts all listed types.

Actual behavior

400 Bad request error

performing CreateOrUpdate: unexpected status 400 (400 Bad Request) with error: CannotSetResourceIdentity: Resource type 'Microsoft.Sql/servers/jobAgents' does not support creation of 'SystemAssigned' resource identity. The supported types are 'UserAssigned'.

Reproduction Steps

PUT https://management.azure.com/subscriptions/<subscription_id>/resourceGroups/<resource_group_name>/providers/Microsoft.Sql/servers/<server_name>/jobAgents/<job_agent_name>?api-version=2023-08-01-preview

{
	"identity": {
		"type": "SystemAssigned"
	},
	"location": "eastus",
	"name": "<name>",
	"properties": {
		"databaseId": "/subscriptions/<subscription_id>/resourceGroups/<resource_group_name>/providers/Microsoft.Sql/servers/<server_name>/databases/<database_name>"
	},
	"sku": {
		"name": "JA100"
	},
}

Environment

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    MgmtThis issue is related to a management-plane library.SQLService AttentionWorkflow: This issue is responsible by Azure service team.bugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions