Share via


Fleets - Create Or Update

Creates or updates a Fleet.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}?api-version=2024-04-01

URI Parameters

Name In Required Type Description
fleetName
path True

string

minLength: 1
maxLength: 63
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$

The name of the Fleet resource.

resourceGroupName
path True

string

minLength: 1
maxLength: 90

The name of the resource group. The name is case insensitive.

subscriptionId
path True

string

minLength: 1

The ID of the target subscription.

api-version
query True

string

minLength: 1

The API version to use for this operation.

Request Header

Name Required Type Description
If-Match

string

The request should only proceed if an entity matches this string.

If-None-Match

string

The request should only proceed if no entity matches this string.

Request Body

Name Required Type Description
location True

string

The geo-location where the resource lives

identity

ManagedServiceIdentity

Managed identity.

properties.hubProfile

FleetHubProfile

The FleetHubProfile configures the Fleet's hub.

tags

object

Resource tags.

Responses

Name Type Description
200 OK

Fleet

Resource 'Fleet' update operation succeeded

201 Created

Fleet

Resource 'Fleet' create operation succeeded

Headers

Retry-After: integer

Other Status Codes

ErrorResponse

An unexpected error response.

Security

azure_auth

Azure Active Directory OAuth2 Flow.

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

Creates a Fleet resource with a long running operation.

Sample request

PUT https://management.azure.com/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.ContainerService/fleets/fleet1?api-version=2024-04-01

{
  "tags": {
    "tier": "production",
    "archv2": ""
  },
  "location": "East US",
  "properties": {
    "hubProfile": {
      "dnsPrefix": "dnsprefix1",
      "agentProfile": {
        "vmSize": "Standard_DS1"
      }
    }
  }
}

Sample response

ETag: 23ujdflewrj3=
Location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerService/locations/eastus/operations/00000000-0000-0000-0000-000000000000?api-version=2022-02-01
Azure-AsyncOperation: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerService/locations/eastus/operationResults/00000000-0000-0000-0000-000000000000?api-version=2022-02-01
{
  "id": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/fleets/fleet-1",
  "name": "fleet-1",
  "type": "Microsoft.ContainerService/fleets",
  "systemData": {
    "createdBy": "someUser",
    "createdByType": "User",
    "createdAt": "2022-03-23T05:40:40.657Z",
    "lastModifiedBy": "someOtherUser",
    "lastModifiedByType": "User",
    "lastModifiedAt": "2022-03-23T05:40:40.657Z"
  },
  "tags": {
    "tier": "production",
    "archv2": ""
  },
  "location": "East US",
  "eTag": "23ujdflewrj3=",
  "properties": {
    "hubProfile": {
      "dnsPrefix": "dnsprefix1",
      "fqdn": "dnsprefix1-abcd1234.flt.eastus.azmk8s.io",
      "portalFqdn": "dnsprefix1-abcd1234.flt.eastus.azmk8s.io",
      "kubernetesVersion": "1.22.4",
      "agentProfile": {
        "vmSize": "Standard_DS1"
      }
    },
    "provisioningState": "Updating"
  }
}
ETag: 23ujdflewrj3=
Location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerService/locations/eastus/operations/00000000-0000-0000-0000-000000000000?api-version=2022-02-01
Azure-AsyncOperation: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerService/locations/eastus/operationResults/00000000-0000-0000-0000-000000000000?api-version=2022-02-01
{
  "id": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/fleets/fleet1",
  "name": "fleet1",
  "type": "Microsoft.ContainerService/fleets",
  "systemData": {
    "createdBy": "someUser",
    "createdByType": "User",
    "createdAt": "2022-03-23T05:40:40.657Z",
    "lastModifiedBy": "someOtherUser",
    "lastModifiedByType": "User",
    "lastModifiedAt": "2022-03-23T05:40:40.657Z"
  },
  "tags": {
    "tier": "production",
    "archv2": ""
  },
  "location": "East US",
  "eTag": "23ujdflewrj3=",
  "properties": {
    "hubProfile": {
      "dnsPrefix": "dnsprefix1",
      "fqdn": "dnsprefix1-abcd1234.flt.eastus.azmk8s.io",
      "portalFqdn": "dnsprefix1-abcd1234.flt.eastus.azmk8s.io",
      "kubernetesVersion": "1.22.4",
      "agentProfile": {
        "vmSize": "Standard_DS1"
      }
    },
    "provisioningState": "Creating"
  }
}

Definitions

Name Description
AgentProfile

Agent profile for the Fleet hub.

APIServerAccessProfile

Access profile for the Fleet hub API server.

createdByType

The type of identity that created the resource.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

Fleet

The Fleet resource.

FleetHubProfile

The FleetHubProfile configures the fleet hub.

FleetProvisioningState

The provisioning state of the last accepted operation.

ManagedServiceIdentity

Managed service identity (system assigned and/or user assigned identities)

ManagedServiceIdentityType

Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).

systemData

Metadata pertaining to creation and last modification of the resource.

UserAssignedIdentity

User assigned identity properties

AgentProfile

Agent profile for the Fleet hub.

Name Type Description
subnetId

string (arm-id)

The ID of the subnet which the Fleet hub node will join on startup. If this is not specified, a vnet and subnet will be generated and used.

vmSize

string

The virtual machine size of the Fleet hub.

APIServerAccessProfile

Access profile for the Fleet hub API server.

Name Type Description
enablePrivateCluster

boolean

Whether to create the Fleet hub as a private cluster or not.

createdByType

The type of identity that created the resource.

Value Description
User
Application
ManagedIdentity
Key

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

Fleet

The Fleet resource.

Name Type Description
eTag

string

If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.

id

string

Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

identity

ManagedServiceIdentity

Managed identity.

location

string

The geo-location where the resource lives

name

string

The name of the resource

properties.hubProfile

FleetHubProfile

The FleetHubProfile configures the Fleet's hub.

properties.provisioningState

FleetProvisioningState

The status of the last operation.

systemData

systemData

Azure Resource Manager metadata containing createdBy and modifiedBy information.

tags

object

Resource tags.

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

FleetHubProfile

The FleetHubProfile configures the fleet hub.

Name Type Description
agentProfile

AgentProfile

The agent profile for the Fleet hub.

apiServerAccessProfile

APIServerAccessProfile

The access profile for the Fleet hub API server.

dnsPrefix

string

minLength: 1
maxLength: 54
pattern: ^[a-zA-Z0-9]$|^[a-zA-Z0-9][a-zA-Z0-9-]{0,52}[a-zA-Z0-9]$

DNS prefix used to create the FQDN for the Fleet hub.

fqdn

string

The FQDN of the Fleet hub.

kubernetesVersion

string

The Kubernetes version of the Fleet hub.

portalFqdn

string

The Azure Portal FQDN of the Fleet hub.

FleetProvisioningState

The provisioning state of the last accepted operation.

Value Description
Succeeded

Resource has been created.

Failed

Resource creation failed.

Canceled

Resource creation was canceled.

Creating

The provisioning state of a fleet being created.

Updating

The provisioning state of a fleet being updated.

Deleting

The provisioning state of a fleet being deleted.

ManagedServiceIdentity

Managed service identity (system assigned and/or user assigned identities)

Name Type Description
principalId

string (uuid)

The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity.

tenantId

string (uuid)

The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.

type

ManagedServiceIdentityType

Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).

userAssignedIdentities

<string,  UserAssignedIdentity>

User-Assigned Identities
The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests.

ManagedServiceIdentityType

Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).

Value Description
None
SystemAssigned
UserAssigned
SystemAssigned, UserAssigned

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string (date-time)

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string (date-time)

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.

UserAssignedIdentity

User assigned identity properties

Name Type Description
clientId

string (uuid)

The client ID of the assigned identity.

principalId

string (uuid)

The principal ID of the assigned identity.