Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure Search: Resource Manager: Support 'None' Identity type #5319

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
@@ -0,0 +1,81 @@
{
"parameters": {
"searchServiceName": "mysearchservice",
"resourceGroupName": "rg1",
"api-version": "2015-08-19",
"subscriptionId": "subid",
"service": {
"location": "westus",
"tags": {
"app-name": "My e-commerce app"
},
"sku": {
"name": "standard"
},
"properties": {
"replicaCount": 3,
"partitionCount": 1,
"hostingMode": "default"
},
"identity": {
"type": "SystemAssigned"
}
}
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice",
"name": "mysearchservice",
"location": "westus",
"type": "Microsoft.Search/searchServices",
"tags": {
"app-name": "My e-commerce app"
},
"sku": {
"name": "standard"
},
"properties":{
"replicaCount": 3,
"partitionCount": 1,
"status": "provisioning",
"statusDetails": "",
"hostingMode": "default",
"provisioningState": "provisioning"
},
"identity": {
"type": "SystemAssigned",
"principalId": "9d1e1f18-2122-4988-a11c-878782e40a5c",
"tenantId": "f686d426-8d16-42db-81b7-ab578e110ccd"
}
}
},
"201": {
"body": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice",
"name": "mysearchservice",
"location": "westus",
"type": "Microsoft.Search/searchServices",
"tags": {
"app-name": "My e-commerce app"
},
"sku": {
"name": "standard"
},
"properties":{
"replicaCount": 3,
"partitionCount": 1,
"status": "provisioning",
"statusDetails": "",
"hostingMode": "default",
"provisioningState": "provisioning"
},
"identity": {
"type": "SystemAssigned",
"principalId": "9d1e1f18-2122-4988-a11c-878782e40a5c",
Copy link
Member

Choose a reason for hiding this comment

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

@natinimni I trust these are not real IDs. :)

Copy link
Contributor Author

@natinimni natinimni Mar 7, 2019

Choose a reason for hiding this comment

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

The 'tenantId' is real, but public. The 'principalId' is not real, and not considered a secret :)

"tenantId": "f686d426-8d16-42db-81b7-ab578e110ccd"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"parameters": {
"searchServiceName": "mysearchservice",
"resourceGroupName": "rg1",
"api-version": "2015-08-19",
"subscriptionId": "subid",
"service": {
"sku": {
"name": "standard"
},
"identity": {
"type": "None"
}
}
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice",
"name": "mysearchservice",
"location": "westus",
"type": "Microsoft.Search/searchServices",
"tags": {
},
"sku": {
"name": "standard"
},
"properties":{
"replicaCount": 3,
"partitionCount": 1,
"status": "running",
"statusDetails": "",
"hostingMode": "default",
"provisioningState": "succeeded"
},
"identity": {
"type": "None"
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,8 @@
],
"operationId": "Services_CreateOrUpdate",
"x-ms-examples": {
"SearchCreateOrUpdateService": { "$ref": "./examples/SearchCreateOrUpdateService.json" }
"SearchCreateOrUpdateService": { "$ref": "./examples/SearchCreateOrUpdateService.json" },
"SearchCreateOrUpdateServiceWithIdentity": { "$ref": "./examples/SearchCreateOrUpdateServiceWithIdentity.json" }
},
"description": "Creates or updates a Search service in the given resource group. If the Search service already exists, all properties will be updated with the given values.",
"externalDocs": {
Expand Down Expand Up @@ -395,7 +396,8 @@
],
"operationId": "Services_Update",
"x-ms-examples": {
"SearchUpdateService": { "$ref": "./examples/SearchUpdateService.json" }
"SearchUpdateService": { "$ref": "./examples/SearchUpdateService.json" },
"SearchUpdateServiceToRemoveIdentity": { "$ref": "./examples/SearchUpdateServiceToRemoveIdentity.json" }
},
"description": "Updates an existing Search service in the given resource group.",
"externalDocs": {
Expand Down Expand Up @@ -1064,6 +1066,7 @@
"type": "string",
"description": "The identity type.",
"enum": [
"None",
Copy link
Member

Choose a reason for hiding this comment

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

@natinimni Adding a new enum value is a client-side breaking change, so make sure to bump the major version of the .NET Management SDK.

Copy link
Member

Choose a reason for hiding this comment

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

It also wouldn't hurt to ensure there's an example of using this value.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks @brjohnstmsft !
The .NET Mgmt SDK was never generated with the identity property, so it should not be a breaking change for it :)
I've added some examples.

Copy link
Member

Choose a reason for hiding this comment

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

Good to know. Thanks!

"SystemAssigned"
],
"x-ms-enum": {
Expand Down