Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing correct name for managed identity and customer managed key, updated enum to union #400

Merged
merged 23 commits into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
bb31769
Fixing correct name for managed identity and customer managed key, up…
allenjzhang Mar 11, 2024
498c013
adding change log
allenjzhang Mar 11, 2024
1f190e5
Merge branch 'main' of https://github.com/Azure/typespec-azure into a…
allenjzhang Mar 11, 2024
6e687d4
Fixing test failures
allenjzhang Mar 13, 2024
253e6b3
Merge branch 'main' into azhang_fixManagedIdentity
allenjzhang Mar 14, 2024
29e5bc1
Update packages/typespec-azure-resource-manager/lib/arm.foundations.tsp
allenjzhang Mar 20, 2024
aed6572
Update packages/typespec-azure-resource-manager/src/private.decorator…
allenjzhang Mar 20, 2024
fc513c4
Merge branch 'main' into azhang_fixManagedIdentity
allenjzhang Mar 20, 2024
36408e9
Merge branch 'main' of https://github.com/Azure/typespec-azure into a…
allenjzhang Mar 22, 2024
14ba7e6
format
timotheeguerin Mar 22, 2024
34c712e
Adding string to open union
allenjzhang Mar 26, 2024
be5bfa4
Merge branch 'main' of https://github.com/Azure/typespec-azure into a…
allenjzhang Mar 26, 2024
ab56d68
Updating to open union
allenjzhang Mar 26, 2024
384de33
Merge branch 'azhang_fixManagedIdentity' of https://github.com/allenj…
allenjzhang Mar 26, 2024
f8bff67
Merge branch 'main' into azhang_fixManagedIdentity
allenjzhang Mar 26, 2024
f276cd4
Revert changes as we kept the internal enum
allenjzhang Mar 26, 2024
60f036e
Merge branch 'main' of https://github.com/Azure/typespec-azure into a…
allenjzhang Apr 15, 2024
e90d327
Update config
allenjzhang Apr 15, 2024
e9096e0
Merge branch 'main' of https://github.com/Azure/typespec-azure into a…
allenjzhang Apr 15, 2024
88426eb
Revert lock file
allenjzhang Apr 15, 2024
e1e6600
Update .chronus/changes/azhang_fixManagedIdentity-2024-2-11-13-47-14.md
allenjzhang Apr 15, 2024
90c9a38
Remove ModelAsString doc
allenjzhang Apr 15, 2024
7c99af3
Merge branch 'azhang_fixManagedIdentity' of https://github.com/allenj…
allenjzhang Apr 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
changeKind: fix
packages:
- "@azure-tools/typespec-azure-resource-manager"
---

Updated ManagedIndentity and CustomerManagedKey TypeSpec model definition to be consistent with Swagger commont-types
allenjzhang marked this conversation as resolved.
Show resolved Hide resolved
116 changes: 58 additions & 58 deletions docs/libraries/azure-resource-manager/reference/data-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -387,12 +387,12 @@ model Azure.ResourceManager.CustomerManagedKeyEncryption

#### Properties

| Name | Type | Description |
| ------------------------------- | -------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| keyEncryptionIdentity? | [`KeyEncryptionIdentity`](./data-types.md#Azure.ResourceManager.KeyEncryptionIdentity) | The type of identity to use. Values can be systemAssignedIdentity, userAssignedIdentity, or delegatedResourceIdentity. |
| userAssignedIdentityResourceId? | [`ResourceIdentifier`](#Azure.ResourceManager.ResourceIdentifier) | User assigned identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/<resource group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. Mutually exclusive with identityType systemAssignedIdentity. |
| federatedClientId? | `Core.uuid` | application client identity to use for accessing key encryption key Url in a different tenant. Ex: f83c6b1b-4d34-47e4-bb34-9d83df58b540 |
| delegatedIdentityClientId | `Core.uuid` | delegated identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/<resource group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. Mutually exclusive with identityType systemAssignedIdentity and userAssignedIdentity - internal use only. |
| Name | Type | Description |
| ------------------------------- | -------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| keyEncryptionKeyIdentity? | [`KeyEncryptionKeyIdentity`](./data-types.md#Azure.ResourceManager.KeyEncryptionKeyIdentity) | The type of identity to use. Values can be systemAssignedIdentity, userAssignedIdentity, or delegatedResourceIdentity. |
| userAssignedIdentityResourceId? | [`ResourceIdentifier`](#Azure.ResourceManager.ResourceIdentifier) | User assigned identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/<resource group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. Mutually exclusive with identityType systemAssignedIdentity. |
| federatedClientId? | `Core.uuid` | application client identity to use for accessing key encryption key Url in a different tenant. Ex: f83c6b1b-4d34-47e4-bb34-9d83df58b540 |
| delegatedIdentityClientId | `Core.uuid` | delegated identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/<resource group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. Mutually exclusive with identityType systemAssignedIdentity and userAssignedIdentity - internal use only. |

### `DefaultProvisioningStateProperty` {#Azure.ResourceManager.DefaultProvisioningStateProperty}

Expand Down Expand Up @@ -1090,22 +1090,6 @@ model Azure.ResourceManager.TrackedResource<Properties>
| ----------- | ------------ | ----------- |
| properties? | `Properties` | |

### `InfrastructureEncryption` {#Azure.ResourceManager.InfrastructureEncryption}

(Optional) Discouraged to include in resource definition. Only needed where it is possible to disable platform (AKA infrastructure) encryption. Azure SQL TDE is an example of this. Values are enabled and disabled.

```typespec
enum Azure.ResourceManager.InfrastructureEncryption
```

### `KeyEncryptionIdentity` {#Azure.ResourceManager.KeyEncryptionIdentity}

The type of identity to use.

```typespec
enum Azure.ResourceManager.KeyEncryptionIdentity
```

### `PrivateEndpointConnectionProvisioningState` {#Azure.ResourceManager.PrivateEndpointConnectionProvisioningState}

The provisioning state of the connection
Expand Down Expand Up @@ -1151,6 +1135,22 @@ Supported versions of Azure.ResourceManager building blocks.
enum Azure.ResourceManager.Versions
```

### `InfrastructureEncryption` {#Azure.ResourceManager.InfrastructureEncryption}

(Optional) Discouraged to include in resource definition. Only needed where it is possible to disable platform (AKA infrastructure) encryption. Azure SQL TDE is an example of this. Values are enabled and disabled.

```typespec
union Azure.ResourceManager.InfrastructureEncryption
```

### `KeyEncryptionKeyIdentity` {#Azure.ResourceManager.KeyEncryptionKeyIdentity}

The type of identity to use.

```typespec
union Azure.ResourceManager.KeyEncryptionKeyIdentity
```

### `ResourceIdentifier` {#Azure.ResourceManager.ResourceIdentifier}

A type definition that refers the id to an Azure Resource Manager resource.
Expand Down Expand Up @@ -1432,12 +1432,12 @@ model Azure.ResourceManager.Foundations.ManagedIdentityProperties

#### Properties

| Name | Type | Description |
| ----------------------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------- |
| tenantId? | `string` | The Active Directory tenant id of the principal. |
| principalId? | `string` | The active directory identifier of this principal. |
| type | [`ManagedIdentityType`](./data-types.md#Azure.ResourceManager.Foundations.ManagedIdentityType) | The type of managed identity assigned to this resource. |
| userAssignedIdentities? | `Record<ResourceManager.Foundations.UserAssignedIdentity>` | The identities assigned to this resource by the user. |
| Name | Type | Description |
| ----------------------- | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------- |
| tenantId? | `string` | The Active Directory tenant id of the principal. |
| principalId? | `string` | The active directory identifier of this principal. |
| type | [`ManagedServiceIdentityType`](./data-types.md#Azure.ResourceManager.Foundations.ManagedServiceIdentityType) | The type of managed identity assigned to this resource. |
| userAssignedIdentities? | `Record<ResourceManager.Foundations.UserAssignedIdentity>` | The identities assigned to this resource by the user. |

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

Expand All @@ -1449,11 +1449,11 @@ model Azure.ResourceManager.Foundations.ManagedSystemIdentityProperties

#### Properties

| Name | Type | Description |
| ------------ | ---------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- |
| tenantId? | `string` | The Active Directory tenant id of the principal. |
| principalId? | `string` | The active directory identifier of this principal. |
| type | [`ManagedSystemIdentityType`](./data-types.md#Azure.ResourceManager.Foundations.ManagedSystemIdentityType) | The type of managed identity assigned to this resource. |
| Name | Type | Description |
| ------------ | -------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- |
| tenantId? | `string` | The Active Directory tenant id of the principal. |
| principalId? | `string` | The active directory identifier of this principal. |
| type | [`SystemAssignedServiceIdentityType`](./data-types.md#Azure.ResourceManager.Foundations.SystemAssignedServiceIdentityType) | The type of managed identity assigned to this resource. |

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

Expand All @@ -1471,7 +1471,7 @@ model Azure.ResourceManager.Foundations.Operation
| isDataAction? | `boolean` | Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure Resource Manager/control-plane operations. |
| display? | [`OperationDisplay`](./data-types.md#Azure.ResourceManager.Foundations.OperationDisplay) | Localized display information for this particular operation. |
| origin? | [`Origin`](./data-types.md#Azure.ResourceManager.Foundations.Origin) | The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" |
| actionType? | [`ActionType`](./data-types.md#Azure.ResourceManager.Foundations.ActionType) | Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. |
| actionType? | [`ActionType`](./data-types.md#Azure.ResourceManager.Foundations.ActionType) | Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. |

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

Expand Down Expand Up @@ -1833,66 +1833,66 @@ model Azure.ResourceManager.Foundations.UserAssignedIdentity
| clientId? | `string` | The active directory client identifier for this principal. |
| principalId? | `string` | The active directory identifier for this principal. |

### `ActionType` {#Azure.ResourceManager.Foundations.ActionType}
### `ResourceHome` {#Azure.ResourceManager.Foundations.ResourceHome}

Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
An internal enum to indicate the resource support for various path types

```typespec
enum Azure.ResourceManager.Foundations.ActionType
enum Azure.ResourceManager.Foundations.ResourceHome
```

### `CheckNameAvailabilityReason` {#Azure.ResourceManager.Foundations.CheckNameAvailabilityReason}
### `SkuTier` {#Azure.ResourceManager.Foundations.SkuTier}

Possible reasons for a name not being available.
Available service tiers for the SKU.

```typespec
enum Azure.ResourceManager.Foundations.CheckNameAvailabilityReason
enum Azure.ResourceManager.Foundations.SkuTier
```

### `createdByType` {#Azure.ResourceManager.Foundations.createdByType}
### `ActionType` {#Azure.ResourceManager.Foundations.ActionType}

The kind of entity that created the resource.
Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.

```typespec
enum Azure.ResourceManager.Foundations.createdByType
union Azure.ResourceManager.Foundations.ActionType
```

### `ManagedIdentityType` {#Azure.ResourceManager.Foundations.ManagedIdentityType}
### `CheckNameAvailabilityReason` {#Azure.ResourceManager.Foundations.CheckNameAvailabilityReason}

The kind of managed identity assigned to this resource.
Possible reasons for a name not being available.

```typespec
enum Azure.ResourceManager.Foundations.ManagedIdentityType
union Azure.ResourceManager.Foundations.CheckNameAvailabilityReason
```

### `ManagedSystemIdentityType` {#Azure.ResourceManager.Foundations.ManagedSystemIdentityType}
### `createdByType` {#Azure.ResourceManager.Foundations.createdByType}

The kind of managemed identity assigned to this resource.
The kind of entity that created the resource.

```typespec
enum Azure.ResourceManager.Foundations.ManagedSystemIdentityType
union Azure.ResourceManager.Foundations.createdByType
```

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

The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system"
The kind of managed identity assigned to this resource.

```typespec
enum Azure.ResourceManager.Foundations.Origin
union Azure.ResourceManager.Foundations.ManagedServiceIdentityType
```

### `ResourceHome` {#Azure.ResourceManager.Foundations.ResourceHome}
### `Origin` {#Azure.ResourceManager.Foundations.Origin}

An internal enum to indicate the resource support for various path types
The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system"

```typespec
enum Azure.ResourceManager.Foundations.ResourceHome
union Azure.ResourceManager.Foundations.Origin
```

### `SkuTier` {#Azure.ResourceManager.Foundations.SkuTier}
### `SystemAssignedServiceIdentityType` {#Azure.ResourceManager.Foundations.SystemAssignedServiceIdentityType}

Available service tiers for the SKU.
The kind of managemed identity assigned to this resource.

```typespec
enum Azure.ResourceManager.Foundations.SkuTier
union Azure.ResourceManager.Foundations.SystemAssignedServiceIdentityType
```
Loading
Loading