@@ -15,16 +15,16 @@ Create a Fleet.
15
15
### CreateExpanded (Default)
16
16
```
17
17
New-AzFleet -Name <String> -ResourceGroupName <String> -Location <String> [-SubscriptionId <String>]
18
- [-IfMatch <String>] [-IfNoneMatch <String>] [-IdentityType <String> ] [-Tag <Hashtable>]
19
- [-UserAssignedIdentity <Hashtable >] [-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-Confirm] [-WhatIf]
18
+ [-IfMatch <String>] [-IfNoneMatch <String>] [-EnableSystemAssignedIdentity ] [-Tag <Hashtable>]
19
+ [-UserAssignedIdentity <String[] >] [-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-Confirm] [-WhatIf]
20
20
[<CommonParameters>]
21
21
```
22
22
23
23
### CreateViaIdentityExpanded
24
24
```
25
25
New-AzFleet -InputObject <IFleetIdentity> -Location <String> [-IfMatch <String>] [-IfNoneMatch <String>]
26
- [-IdentityType <String> ] [-Tag <Hashtable>] [-UserAssignedIdentity <Hashtable>] [-DefaultProfile <PSObject >]
27
- [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [<CommonParameters>]
26
+ [-EnableSystemAssignedIdentity ] [-Tag <Hashtable>] [-UserAssignedIdentity <String[] >]
27
+ [-DefaultProfile <PSObject>] [- AsJob] [-NoWait] [-Confirm] [-WhatIf] [<CommonParameters>]
28
28
```
29
29
30
30
### CreateViaJsonFilePath
@@ -46,7 +46,7 @@ Create a Fleet.
46
46
47
47
## EXAMPLES
48
48
49
- ### Example 1: Creates a Fleet resource
49
+ ### Example 1: Creates a Fleet resource with none identity type
50
50
``` powershell
51
51
New-AzFleet -Name sss -ResourceGroupName ps1-test -Location eastus
52
52
```
@@ -74,6 +74,73 @@ Tag : {
74
74
Type : Microsoft.ContainerService/fleets
75
75
```
76
76
77
+ This command creates a Fleet resource with none identity type.
78
+
79
+ ### Example 2: Creates a Fleet resource with EnableSystemAssignedIdentity
80
+ ``` powershell
81
+ New-AzFleet -Name testfleet02 -ResourceGroupName joyer-test -Location eastus -Tag @{"456"="asd"} -EnableSystemAssignedIdentity
82
+ ```
83
+
84
+ ``` output
85
+ ETag : "0a006dc9-0000-0100-0000-661cd4f70000"
86
+ Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/joyer-test/providers/Microsoft.ContainerService/fleets/testfleet02
87
+ IdentityPrincipalId : 978528a9-fa0f-4cdb-8282-95b3b30bb883
88
+ IdentityTenantId : 72f988bf-86f1-41af-91ab-2d7cd011db47
89
+ IdentityType : SystemAssigned
90
+ IdentityUserAssignedIdentity : {
91
+ }
92
+ Location : eastus
93
+ Name : testfleet02
94
+ ProvisioningState : Succeeded
95
+ ResourceGroupName : joyer-test
96
+ SystemDataCreatedAt : 4/15/2024 7:19:15 AM
97
+ SystemDataCreatedBy : [email protected]
98
+ SystemDataCreatedByType : User
99
+ SystemDataLastModifiedAt : 4/15/2024 7:19:15 AM
100
+ SystemDataLastModifiedBy : [email protected]
101
+ SystemDataLastModifiedByType : User
102
+ Tag : {
103
+ "456": "asd"
104
+ }
105
+ Type : Microsoft.ContainerService/fleets
106
+ ```
107
+
108
+ This command creates a Fleet resource with system assigned identity type.
109
+
110
+ ### Example 3: Creates a Fleet resource with user assigned identity type
111
+ ``` powershell
112
+ $mi = Get-AzUserAssignedIdentity -Name testUserAssignedMI -ResourceGroupName joyer-test
113
+ New-AzFleet -Name testfleet03 -ResourceGroupName joyer-test -Location eastus -Tag @{"789"="asd"} -UserAssignedIdentity $mi.Id
114
+ ```
115
+
116
+ ``` output
117
+ ETag : "0a00e0c9-0000-0100-0000-661cd8010000"
118
+ Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/joyer-test/providers/Microsoft.ContainerService/fleets/testflee
119
+ t03
120
+ IdentityPrincipalId :
121
+ IdentityTenantId :
122
+ IdentityType : UserAssigned
123
+ IdentityUserAssignedIdentity : {
124
+ "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/joyer-test/providers/Microsoft.ManagedIdentity/userAssignedI
125
+ dentities/testUserAssignedMI": {
126
+ }
127
+ }
128
+ Location : eastus
129
+ Name : testfleet03
130
+ ProvisioningState : Succeeded
131
+ ResourceGroupName : joyer-test
132
+ SystemDataCreatedAt : 4/15/2024 7:32:16 AM
133
+ SystemDataCreatedBy : [email protected]
134
+ SystemDataCreatedByType : User
135
+ SystemDataLastModifiedAt : 4/15/2024 7:32:16 AM
136
+ SystemDataLastModifiedBy : [email protected]
137
+ SystemDataLastModifiedByType : User
138
+ Tag : {
139
+ "789": "asd"
140
+ }
141
+ Type : Microsoft.ContainerService/fleets
142
+ ```
143
+
77
144
This command creates a Fleet resource with a long running operation.
78
145
79
146
## PARAMETERS
@@ -109,11 +176,11 @@ Accept pipeline input: False
109
176
Accept wildcard characters : False
110
177
` ` `
111
178
112
- ### -IdentityType
113
- Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed) .
179
+ ### -EnableSystemAssignedIdentity
180
+ Decides if enable a system assigned identity for the resource .
114
181
115
182
` ` ` yaml
116
- Type : System.String
183
+ Type : System.Management.Automation.SwitchParameter
117
184
Parameter Sets : CreateExpanded, CreateViaIdentityExpanded
118
185
Aliases :
119
186
@@ -291,12 +358,11 @@ Accept wildcard characters: False
291
358
` ` `
292
359
293
360
### -UserAssignedIdentity
294
- The set of user assigned identities associated with the resource.
295
- The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.
296
- The dictionary values can be empty objects ({}) in requests.
361
+ The array of user assigned identities associated with the resource.
362
+ The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.'
297
363
298
364
` ` ` yaml
299
- Type : System.Collections.Hashtable
365
+ Type : System.String[]
300
366
Parameter Sets : CreateExpanded, CreateViaIdentityExpanded
301
367
Aliases :
302
368
0 commit comments