Server Trust Groups - Create Or Update

Creates or updates a server trust group.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/serverTrustGroups/{serverTrustGroupName}?api-version=2021-11-01

URI Parameters

Name In Required Type Description
locationName
path True

string

The name of the region where the resource is located.

resourceGroupName
path True

string

The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.

serverTrustGroupName
path True

string

The name of the server trust group.

subscriptionId
path True

string

The subscription ID that identifies an Azure subscription.

api-version
query True

string

The API version to use for the request.

Request Body

Name Required Type Description
properties.groupMembers True

ServerInfo[]

Group members information for the server trust group.

properties.trustScopes True

TrustScopes[]

Trust scope of the server trust group.

Responses

Name Type Description
200 OK

ServerTrustGroup

Successfully updated the server trust group.

201 Created

ServerTrustGroup

Successfully created the server trust group.

202 Accepted

Accepted

Other Status Codes

*** Error Responses: ***

  • 400 ServerTrustGroupCreateRequestInvalid - The resource or resource properties in the request body is empty or invalid

  • 400 ServerTrustGroupCreateRequestInvalidGroupMembers - The group members property in the request body is empty or invalid

  • 400 ServerTrustGroupCreateRequestInvalidGroupMembersCount - The group members property has an invalid number of servers

  • 400 ServerTrustGroupCreateRequestInvalidServer - The given serverId field in create server trust group request body is empty or invalid

  • 400 ServerTrustGroupCreateRequestDuplicateServer - One or more of the provided servers are duplicates.

  • 400 ServerTrustGroupCreateRequestInvalidTrustScopes - The trust scope property in the request body is empty or invalid.

  • 400 ServerTrustGroupCreateRequestInvalidTrustScopesValue - The trust scope property in the request body has an invalid value.

  • 400 ServerTrustGroupCreateRequestInvalidGroupMembersCount2 - The group members property has an invalid number of servers

  • 404 ServerTrustGroupNotFound - Server trust group with specified name does not exist.

  • 404 OperationIdNotFound - The operation with Id does not exist.

  • 404 ResourceNotFound - The requested resource was not found.

  • 404 OperationIdNotFound - The operation with Id does not exist.

  • 406 ServerTrustGroupMemberIsBusy - Group member '{0}' is not in a valid state and cannot perform Server trust group operation.

  • 406 ServerTrustGroupInInvalidState - SQL trust group '{0}' is busy and cannot perform requested operation.

  • 406 ServerTrustGroupMemberNotFound - Group member '{0}' is not found, therefore we cannot perform Server trust group operation.

  • 409 OperationCancelled - The operation has been cancelled by user.

  • 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.

  • 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.

  • 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.

  • 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.

  • 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.

Examples

Create server trust group

Sample request

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/Japan East/serverTrustGroups/server-trust-group-test?api-version=2021-11-01

{
  "properties": {
    "groupMembers": [
      {
        "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1"
      },
      {
        "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-2"
      }
    ],
    "trustScopes": [
      "GlobalTransactions",
      "ServiceBroker"
    ]
  }
}

Sample response

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/Japan East/serverTrustGroups/server-trust-group-test",
  "name": "server-trust-group-test",
  "properties": {
    "groupMembers": [
      {
        "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1"
      },
      {
        "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-2"
      }
    ],
    "trustScopes": [
      "GlobalTransactions",
      "ServiceBroker"
    ]
  },
  "type": "Microsoft.Sql/locations/serverTrustGroups"
}
{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/Japan East/serverTrustGroups/server-trust-group-test",
  "name": "server-trust-group-test",
  "properties": {
    "groupMembers": [
      {
        "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1"
      },
      {
        "serverId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-2"
      }
    ],
    "trustScopes": [
      "GlobalTransactions",
      "ServiceBroker"
    ]
  },
  "type": "Microsoft.Sql/locations/serverTrustGroups"
}

Definitions

Name Description
ServerInfo

Server info for the server trust group.

ServerTrustGroup

A server trust group.

TrustScopes

Trust scope of the server trust group.

ServerInfo

Server info for the server trust group.

Name Type Description
serverId

string

Server Id.

ServerTrustGroup

A server trust group.

Name Type Description
id

string

Resource ID.

name

string

Resource name.

properties.groupMembers

ServerInfo[]

Group members information for the server trust group.

properties.trustScopes

TrustScopes[]

Trust scope of the server trust group.

type

string

Resource type.

TrustScopes

Trust scope of the server trust group.

Name Type Description
GlobalTransactions

string

ServiceBroker

string