or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

Files

docs

accounts.mdcreators.mdindex.mdoperations.md

creators.mddocs/

0

# Creator Resources

1

2

Management of Azure Maps Creator resources for uploading and managing custom map data, including indoor maps, floor plans, and custom geographic datasets. Creator resources enable advanced mapping scenarios beyond standard map services.

3

4

## Imports

5

6

```python

7

from azure.mgmt.maps.models import Creator, CreatorUpdateParameters, CreatorProperties

8

from typing import Union, IO

9

```

10

11

## Capabilities

12

13

### Creator Lifecycle Management

14

15

Create, update, delete, and retrieve Azure Maps Creator resources within Maps accounts.

16

17

```python { .api }

18

def create_or_update(

19

resource_group_name: str,

20

account_name: str,

21

creator_name: str,

22

creator_resource: Union[Creator, IO],

23

**kwargs

24

) -> Creator:

25

"""

26

Create or update a Creator resource.

27

28

Args:

29

resource_group_name: Name of the resource group

30

account_name: Name of the parent Maps account

31

creator_name: Name of the Creator resource

32

creator_resource: Creator resource object or JSON payload

33

34

Returns:

35

Creator: The created or updated Creator resource

36

37

Raises:

38

HttpResponseError: If the request fails

39

"""

40

41

def update(

42

resource_group_name: str,

43

account_name: str,

44

creator_name: str,

45

creator_update_parameters: Union[CreatorUpdateParameters, IO],

46

**kwargs

47

) -> Creator:

48

"""

49

Update an existing Creator resource.

50

51

Args:

52

resource_group_name: Name of the resource group

53

account_name: Name of the parent Maps account

54

creator_name: Name of the Creator resource

55

creator_update_parameters: Update parameters

56

57

Returns:

58

Creator: The updated Creator resource

59

"""

60

61

def delete(

62

resource_group_name: str,

63

account_name: str,

64

creator_name: str,

65

**kwargs

66

) -> None:

67

"""

68

Delete a Creator resource.

69

70

Args:

71

resource_group_name: Name of the resource group

72

account_name: Name of the parent Maps account

73

creator_name: Name of the Creator resource to delete

74

75

Raises:

76

HttpResponseError: If the request fails

77

"""

78

79

def get(

80

resource_group_name: str,

81

account_name: str,

82

creator_name: str,

83

**kwargs

84

) -> Creator:

85

"""

86

Get details of a Creator resource.

87

88

Args:

89

resource_group_name: Name of the resource group

90

account_name: Name of the parent Maps account

91

creator_name: Name of the Creator resource

92

93

Returns:

94

Creator: The Creator resource details

95

"""

96

```

97

98

Usage example:

99

100

```python

101

from azure.mgmt.maps.models import Creator, CreatorProperties

102

103

# Create a new Creator resource

104

creator = Creator(

105

location="eastus",

106

properties=CreatorProperties(

107

storage_units=10, # Storage capacity in units

108

consumed_storage_unit_size_in_bytes=0 # Read-only, will be populated

109

),

110

tags={"purpose": "indoor-mapping", "project": "office-floor-plans"}

111

)

112

113

created_creator = client.creators.create_or_update(

114

resource_group_name="my-rg",

115

account_name="my-maps-account",

116

creator_name="my-creator",

117

creator_resource=creator

118

)

119

120

print(f"Created Creator: {created_creator.name}")

121

print(f"Storage units: {created_creator.properties.storage_units}")

122

```

123

124

### Creator Discovery

125

126

List Creator resources associated with Maps accounts.

127

128

```python { .api }

129

def list_by_account(

130

resource_group_name: str,

131

account_name: str,

132

**kwargs

133

) -> Iterable[Creator]:

134

"""

135

List Creator resources for a Maps account.

136

137

Args:

138

resource_group_name: Name of the resource group

139

account_name: Name of the Maps account

140

141

Returns:

142

Iterable[Creator]: Iterator of Creator resources

143

"""

144

```

145

146

Usage example:

147

148

```python

149

# List all Creator resources for an account

150

creators = list(client.creators.list_by_account("my-rg", "my-maps-account"))

151

152

for creator in creators:

153

print(f"Creator: {creator.name}")

154

print(f"Location: {creator.location}")

155

print(f"Storage units: {creator.properties.storage_units}")

156

print(f"Consumed storage: {creator.properties.consumed_storage_unit_size_in_bytes} bytes")

157

print("---")

158

```

159

160

### Storage Management

161

162

Monitor and manage storage usage for Creator resources.

163

164

```python

165

# Check storage consumption across all creators

166

total_allocated = 0

167

total_consumed = 0

168

169

for creator in client.creators.list_by_account("my-rg", "my-account"):

170

allocated = creator.properties.storage_units or 0

171

consumed_bytes = creator.properties.consumed_storage_unit_size_in_bytes or 0

172

173

total_allocated += allocated

174

total_consumed += consumed_bytes

175

176

print(f"{creator.name}: {allocated} units allocated, {consumed_bytes:,} bytes used")

177

178

print(f"\nTotal: {total_allocated} units allocated, {total_consumed:,} bytes used")

179

```

180

181

## Creator Resource Types

182

183

### Core Creator Model

184

185

```python { .api }

186

class Creator:

187

"""Azure Maps Creator resource for custom map data management."""

188

# Azure resource properties

189

id: Optional[str] # Resource ID

190

name: Optional[str] # Creator name

191

type: Optional[str] # Resource type

192

location: Optional[str] # Azure region

193

tags: Optional[Dict[str, str]] # Resource tags

194

195

# Creator-specific configuration

196

properties: Optional[CreatorProperties] # Creator properties

197

system_data: Optional[SystemData] # System metadata

198

199

class CreatorProperties:

200

"""Creator resource properties and configuration."""

201

# Storage configuration

202

storage_units: Optional[int] # Allocated storage units

203

204

# Storage monitoring (read-only)

205

consumed_storage_unit_size_in_bytes: Optional[int] # Used storage in bytes

206

207

# Provisioning status (read-only)

208

provisioning_state: Optional[str] # Resource provisioning state

209

210

class CreatorUpdateParameters:

211

"""Parameters for updating Creator resources."""

212

properties: Optional[CreatorProperties] # Updated properties

213

tags: Optional[Dict[str, str]] # Updated tags

214

```

215

216

### Creator Collections

217

218

```python { .api }

219

class CreatorList:

220

"""Collection of Creator resources."""

221

value: Optional[List[Creator]] # List of Creator resources

222

next_link: Optional[str] # Link to next page of results

223

```

224

225

## Storage Units and Billing

226

227

Creator resources use storage units to manage capacity for custom map data:

228

229

- Each storage unit provides a specific amount of storage capacity

230

- Storage consumption is measured in bytes and reported via the `consumed_storage_unit_size_in_bytes` property

231

- Storage units can be scaled up or down by updating the Creator resource

232

- Billing is based on allocated storage units, not actual consumption

233

234

Common storage patterns:

235

236

```python

237

# Scale up storage for a Creator

238

from azure.mgmt.maps.models import CreatorUpdateParameters, CreatorProperties

239

240

# Update storage allocation

241

update_params = CreatorUpdateParameters(

242

properties=CreatorProperties(storage_units=20) # Increase to 20 units

243

)

244

245

updated_creator = client.creators.update(

246

resource_group_name="my-rg",

247

account_name="my-maps-account",

248

creator_name="my-creator",

249

creator_update_parameters=update_params

250

)

251

252

print(f"Updated storage to {updated_creator.properties.storage_units} units")

253

```

254

255

## Error Handling

256

257

Common error scenarios when working with Creator resources:

258

259

```python

260

from azure.core.exceptions import HttpResponseError, ResourceNotFoundError

261

262

try:

263

creator = client.creators.get("my-rg", "my-account", "nonexistent-creator")

264

except ResourceNotFoundError:

265

print("Creator not found")

266

except HttpResponseError as e:

267

print(f"HTTP error: {e.status_code} - {e.message}")

268

269

# Check if Creator exists before operations

270

try:

271

existing_creator = client.creators.get("my-rg", "my-account", "my-creator")

272

print(f"Creator exists: {existing_creator.name}")

273

except ResourceNotFoundError:

274

print("Creator does not exist, creating new one...")

275

# Create new Creator

276

```