Skip to content

Commit

Permalink
Adding arm extended location and re-organize common type definitions (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
allenjzhang authored Apr 26, 2024
1 parent 4c7a78a commit 5c42da8
Show file tree
Hide file tree
Showing 14 changed files with 682 additions and 558 deletions.
7 changes: 7 additions & 0 deletions .chronus/changes/main-2024-3-24-14-31-54.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
changeKind: feature
packages:
- "@azure-tools/typespec-azure-resource-manager"
---

Adding standard ExtendedLocation definition for ARM library
46 changes: 46 additions & 0 deletions docs/libraries/azure-resource-manager/reference/data-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,29 @@ model Azure.ResourceManager.ErrorResponse
| ------ | ------------------------------------------------------------------------------ | ----------------- |
| error? | [`ErrorDetail`](./data-types.md#Azure.ResourceManager.Foundations.ErrorDetail) | The error object. |

### `ExtendedLocationProperty` {#Azure.ResourceManager.ExtendedLocationProperty}

The standard evenlop definition of ExtendedLocation.

```typespec
model Azure.ResourceManager.ExtendedLocationProperty
```

#### Examples

```typespec
model Employee is TrackedResource<EmployeeProperties> {
...ResourceNameParameter<Employee>;
...ExtendedLocationProperty;
}
```

#### Properties

| Name | Type | Description |
| ---------------- | ---------------------------------------------------------------------------------------- | ----------- |
| extendedLocation | [`ExtendedLocation`](./data-types.md#Azure.ResourceManager.Foundations.ExtendedLocation) | |

### `ExtensionResource` {#Azure.ResourceManager.ExtensionResource}

Concrete extension resource types can be created by aliasing this type using a specific property type.
Expand Down Expand Up @@ -1305,6 +1328,21 @@ model Azure.ResourceManager.Foundations.ErrorDetail
| details? | `ResourceManager.Foundations.ErrorDetail[]` | The error details. |
| additionalInfo? | `ResourceManager.Foundations.ErrorAdditionalInfo[]` | The error additional info. |

### `ExtendedLocation` {#Azure.ResourceManager.Foundations.ExtendedLocation}

The complex type of the extended location.

```typespec
model Azure.ResourceManager.Foundations.ExtendedLocation
```

#### Properties

| Name | Type | Description |
| ---- | ------------------------------------------------------------------------------------------------ | ---------------------------------- |
| name | `string` | The name of the extended location. |
| type | [`ExtendedLocationType`](./data-types.md#Azure.ResourceManager.Foundations.ExtendedLocationType) | The type of the extended location. |

### `ExtensionBaseParameters` {#Azure.ResourceManager.Foundations.ExtensionBaseParameters}

The static parameters for an extension resource
Expand Down Expand Up @@ -1844,6 +1882,14 @@ The kind of entity that created the resource.
union Azure.ResourceManager.Foundations.createdByType
```

### `ExtendedLocationType` {#Azure.ResourceManager.Foundations.ExtendedLocationType}

The supported ExtendedLocation types.

```typespec
union Azure.ResourceManager.Foundations.ExtendedLocationType
```

### `ManagedServiceIdentityType` {#Azure.ResourceManager.Foundations.ManagedServiceIdentityType}

The kind of managed identity assigned to this resource.
Expand Down
2 changes: 2 additions & 0 deletions docs/libraries/azure-resource-manager/reference/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ npm install --save-peer @azure-tools/typespec-azure-resource-manager
- [`EncryptionConfiguration`](./data-types.md#Azure.ResourceManager.EncryptionConfiguration)
- [`EntityTag`](./data-types.md#Azure.ResourceManager.EntityTag)
- [`ErrorResponse`](./data-types.md#Azure.ResourceManager.ErrorResponse)
- [`ExtendedLocationProperty`](./data-types.md#Azure.ResourceManager.ExtendedLocationProperty)
- [`ExtensionResource`](./data-types.md#Azure.ResourceManager.ExtensionResource)
- [`KeysOf`](./data-types.md#Azure.ResourceManager.KeysOf)
- [`LocationParameter`](./data-types.md#Azure.ResourceManager.LocationParameter)
Expand Down Expand Up @@ -197,6 +198,7 @@ npm install --save-peer @azure-tools/typespec-azure-resource-manager
- [`DefaultBaseParameters`](./data-types.md#Azure.ResourceManager.Foundations.DefaultBaseParameters)
- [`ErrorAdditionalInfo`](./data-types.md#Azure.ResourceManager.Foundations.ErrorAdditionalInfo)
- [`ErrorDetail`](./data-types.md#Azure.ResourceManager.Foundations.ErrorDetail)
- [`ExtendedLocation`](./data-types.md#Azure.ResourceManager.Foundations.ExtendedLocation)
- [`ExtensionBaseParameters`](./data-types.md#Azure.ResourceManager.Foundations.ExtensionBaseParameters)
- [`ExtensionResourceBase`](./data-types.md#Azure.ResourceManager.Foundations.ExtensionResourceBase)
- [`ExtensionScope`](./data-types.md#Azure.ResourceManager.Foundations.ExtensionScope)
Expand Down
Loading

0 comments on commit 5c42da8

Please sign in to comment.