0
# Resource Information
1
2
Operations for retrieving resource usage, quotas, available SKUs, and API operation information. These operations provide metadata and capacity information about Azure Data Migration Service resources and capabilities.
3
4
## Capabilities
5
6
### Available SKUs
7
8
Lists available SKUs for Data Migration Service resources.
9
10
```python { .api }
11
def list_skus(**kwargs) -> ItemPaged[ResourceSku]:
12
"""
13
Lists available SKUs for Data Migration services.
14
15
Returns:
16
Paged collection of ResourceSku objects with pricing and capability information
17
"""
18
```
19
20
**Usage Example:**
21
22
```python
23
# List all available SKUs
24
skus = client.resource_skus.list_skus()
25
26
for sku in skus:
27
print(f"SKU: {sku.name}")
28
print(f" Tier: {sku.tier}")
29
print(f" Size: {sku.size}")
30
print(f" Locations: {sku.locations}")
31
print(f" Capabilities:")
32
for capability in sku.capabilities:
33
print(f" {capability.name}: {capability.value}")
34
```
35
36
### Usage and Quotas
37
38
Lists resource usage and quota information for a specific location.
39
40
```python { .api }
41
def list(location: str, **kwargs) -> ItemPaged[Quota]:
42
"""
43
Lists resource usage and quotas for a location.
44
45
Parameters:
46
- location: Azure region to query quotas for
47
48
Returns:
49
Paged collection of Quota objects showing current usage and limits
50
"""
51
```
52
53
**Usage Example:**
54
55
```python
56
# Get quota information for East US region
57
quotas = client.usages.list(location="eastus")
58
59
for quota in quotas:
60
print(f"Resource: {quota.name.localized_value}")
61
print(f" Current: {quota.current_value}")
62
print(f" Limit: {quota.limit}")
63
print(f" Unit: {quota.unit}")
64
```
65
66
### Available API Operations
67
68
Lists all available REST API operations for the Data Migration service.
69
70
```python { .api }
71
def list(**kwargs) -> ItemPaged[ServiceOperation]:
72
"""
73
Lists available Data Migration service operations.
74
75
Returns:
76
Paged collection of ServiceOperation objects describing available APIs
77
"""
78
```
79
80
**Usage Example:**
81
82
```python
83
# List all available operations
84
operations = client.operations.list()
85
86
for operation in operations:
87
print(f"Operation: {operation.name}")
88
print(f" Display Name: {operation.display.operation}")
89
print(f" Provider: {operation.display.provider}")
90
print(f" Resource: {operation.display.resource}")
91
print(f" Description: {operation.display.description}")
92
```
93
94
## Resource Types
95
96
### ResourceSku
97
98
```python { .api }
99
class ResourceSku:
100
"""Data Migration Service SKU information."""
101
102
# Properties
103
resource_type: str # Resource type (e.g., "services")
104
name: str # SKU name (e.g., "Standard_1vCore")
105
tier: str # SKU tier (e.g., "Standard")
106
size: str # SKU size description
107
family: str # SKU family
108
kind: str # SKU kind
109
capacity: ResourceSkuCapacity # Capacity information
110
locations: List[str] # Available Azure regions
111
location_info: List[ResourceSkuLocationInfo] # Location-specific details
112
api_versions: List[str] # Supported API versions
113
costs: List[ResourceSkuCosts] # Cost information
114
capabilities: List[ResourceSkuCapabilities] # SKU capabilities
115
restrictions: List[ResourceSkuRestrictions] # Usage restrictions
116
```
117
118
### ResourceSkuCapabilities
119
120
```python { .api }
121
class ResourceSkuCapabilities:
122
"""SKU capability information."""
123
124
# Properties
125
name: str # Capability name (e.g., "vCores", "MaxDatabases")
126
value: str # Capability value
127
```
128
129
### ResourceSkuCapacity
130
131
```python { .api }
132
class ResourceSkuCapacity:
133
"""SKU capacity information."""
134
135
# Properties
136
minimum: int # Minimum capacity
137
maximum: int # Maximum capacity
138
default: int # Default capacity
139
scale_type: str # Scale type (Manual, Automatic, None)
140
```
141
142
### ResourceSkuCosts
143
144
```python { .api }
145
class ResourceSkuCosts:
146
"""SKU cost information."""
147
148
# Properties
149
meter_id: str # Billing meter ID
150
quantity: int # Billing quantity
151
extended_unit: str # Extended billing unit
152
```
153
154
### Quota Information Types
155
156
```python { .api }
157
class Quota:
158
"""Resource quota information."""
159
160
# Properties
161
current_value: int # Current resource usage
162
id: str # Quota ID
163
limit: int # Maximum allowed usage
164
name: QuotaName # Quota name information
165
unit: str # Measurement unit
166
167
class QuotaName:
168
"""Quota name information."""
169
170
# Properties
171
localized_value: str # Localized display name
172
value: str # Internal name value
173
```
174
175
### Service Operation Types
176
177
```python { .api }
178
class ServiceOperation:
179
"""Data Migration service operation information."""
180
181
# Properties
182
name: str # Operation name (e.g., "Microsoft.DataMigration/services/read")
183
display: ServiceOperationDisplay # Display information
184
origin: str # Operation origin
185
properties: Dict[str, Any] # Additional properties
186
187
class ServiceOperationDisplay:
188
"""Service operation display information."""
189
190
# Properties
191
provider: str # Resource provider name
192
resource: str # Resource type
193
operation: str # Operation display name
194
description: str # Operation description
195
```
196
197
## Usage Examples
198
199
### SKU Selection Helper
200
201
```python
202
def find_suitable_sku(client, location, min_vcores=1):
203
"""Find suitable SKUs for given requirements."""
204
205
suitable_skus = []
206
skus = client.resource_skus.list_skus()
207
208
for sku in skus:
209
# Check if SKU is available in desired location
210
if location not in sku.locations:
211
continue
212
213
# Check vCore capability
214
vcores = None
215
for capability in sku.capabilities:
216
if capability.name.lower() == "vcores":
217
try:
218
vcores = int(capability.value)
219
break
220
except ValueError:
221
continue
222
223
if vcores and vcores >= min_vcores:
224
suitable_skus.append({
225
'name': sku.name,
226
'tier': sku.tier,
227
'vcores': vcores,
228
'locations': sku.locations
229
})
230
231
return suitable_skus
232
233
# Find SKUs with at least 2 vCores in East US
234
suitable_skus = find_suitable_sku(client, "eastus", min_vcores=2)
235
for sku in suitable_skus:
236
print(f"SKU: {sku['name']} ({sku['tier']}) - {sku['vcores']} vCores")
237
```
238
239
### Quota Monitoring
240
241
```python
242
def check_quota_availability(client, location, resource_type):
243
"""Check if quota is available for new resources."""
244
245
quotas = client.usages.list(location=location)
246
247
for quota in quotas:
248
if resource_type.lower() in quota.name.value.lower():
249
usage_percentage = (quota.current_value / quota.limit) * 100
250
remaining = quota.limit - quota.current_value
251
252
print(f"Quota: {quota.name.localized_value}")
253
print(f" Usage: {quota.current_value}/{quota.limit} ({usage_percentage:.1f}%)")
254
print(f" Remaining: {remaining}")
255
256
if remaining > 0:
257
return True, remaining
258
else:
259
return False, 0
260
261
return None, 0
262
263
# Check quota for Data Migration services
264
available, remaining = check_quota_availability(client, "eastus", "services")
265
if available:
266
print(f"Can create {remaining} more Data Migration services")
267
else:
268
print("No quota available for new services")
269
```
270
271
### Operation Discovery
272
273
```python
274
def list_operations_by_resource(client, resource_type):
275
"""List operations available for a specific resource type."""
276
277
operations = client.operations.list()
278
filtered_ops = []
279
280
for operation in operations:
281
if resource_type.lower() in operation.display.resource.lower():
282
filtered_ops.append({
283
'name': operation.name,
284
'operation': operation.display.operation,
285
'description': operation.display.description
286
})
287
288
return filtered_ops
289
290
# Get all operations for services
291
service_operations = list_operations_by_resource(client, "services")
292
for op in service_operations:
293
print(f"{op['operation']}: {op['description']}")
294
```
295
296
## Regional Availability
297
298
Different SKUs and capabilities may be available in different Azure regions. Always check:
299
300
1. **SKU availability** in your target region
301
2. **Feature support** for specific migration scenarios
302
3. **Quota limits** for your subscription and region
303
4. **Cost implications** across different regions
304
305
## Capacity Planning
306
307
Use the resource information APIs to:
308
309
- **Select appropriate SKUs** based on workload requirements
310
- **Monitor quota usage** to avoid deployment failures
311
- **Plan capacity scaling** for large migration projects
312
- **Estimate costs** across different SKU options
313
- **Validate feature availability** for specific migration scenarios
314
315
These APIs provide essential information for properly sizing and planning Data Migration Service deployments in Azure environments.