or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

Files

docs

asset-management.mdasset-tracks.mdcontent-delivery-streaming.mdcontent-protection.mdencoding-transforms.mdindex.mdlive-streaming.mdlocation-management.mdmedia-filters.mdmedia-services-management.mdnetwork-security.mdoperations-monitoring.md

location-management.mddocs/

0

# Resource Location Management

1

2

Azure resource location validation and name availability checking for Media Services resources across Azure regions. This capability ensures that Media Services account names are unique and available before attempting to create new resources.

3

4

## Capabilities

5

6

### Name Availability Checking

7

8

Check whether a Media Services account name is available in a specific Azure region before attempting resource creation.

9

10

```python { .api }

11

def check_name_availability(

12

location_name: str,

13

parameters: CheckNameAvailabilityInput

14

) -> EntityNameAvailabilityCheckOutput:

15

"""

16

Check if a Media Services account name is available in a specific Azure region.

17

18

Parameters:

19

- location_name: The Azure region name where availability should be checked (str)

20

- parameters: Name availability check request parameters (CheckNameAvailabilityInput)

21

22

Returns:

23

EntityNameAvailabilityCheckOutput containing availability status and reason if unavailable

24

"""

25

```

26

27

### Usage Example

28

29

```python

30

from azure.mgmt.media import AzureMediaServices

31

from azure.mgmt.media.models import CheckNameAvailabilityInput

32

from azure.identity import DefaultAzureCredential

33

34

credential = DefaultAzureCredential()

35

client = AzureMediaServices(credential, subscription_id)

36

37

# Check if a media service name is available in East US

38

check_request = CheckNameAvailabilityInput(

39

name="my-media-service-name",

40

type="Microsoft.Media/mediaservices"

41

)

42

43

result = client.locations.check_name_availability(

44

location_name="eastus",

45

parameters=check_request

46

)

47

48

if result.name_available:

49

print(f"Name '{result.name}' is available")

50

else:

51

print(f"Name unavailable: {result.reason} - {result.message}")

52

```

53

54

## Data Types

55

56

```python { .api }

57

class CheckNameAvailabilityInput:

58

"""Request parameters for name availability checking."""

59

60

def __init__(

61

self,

62

name: str = None,

63

type: str = None

64

):

65

"""

66

Initialize name availability check request.

67

68

Parameters:

69

- name: The resource name to check for availability (str)

70

- type: The resource type (typically "Microsoft.Media/mediaservices") (str)

71

"""

72

73

class EntityNameAvailabilityCheckOutput:

74

"""Response containing name availability results."""

75

76

name_available: bool

77

"""Whether the name is available for use."""

78

79

reason: str

80

"""Reason why the name is not available (if name_available is False)."""

81

82

message: str

83

"""Detailed message explaining availability status."""

84

```