Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Next Next commit
Initial parameter types
  • Loading branch information
markcowl committed Jun 25, 2025
commit b6b8efd54f1c1ba6551294f4850d68843f00f3cd
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ import "./managed-identity.tsp";
import "./decorator.tsp";
import "./operations.tsp";
import "./interfaces.tsp";
import "./extension.tsp";

namespace Azure.ResourceManager.Legacy;
Empty file.
1 change: 1 addition & 0 deletions packages/typespec-azure-resource-manager/lib/arm.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import "@azure-tools/typespec-azure-core";
import "./foundations/arm.foundations.tsp";
import "./Legacy/arm.legacy.tsp";
import "./common-types/common-types.tsp";
import "./extension/extension.tsp";
import "./backcompat.tsp";
import "./private.decorators.tsp";
import "./models.tsp";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ enum ResourceHome {

@doc("The resource is bound to an extension")
Extension,

@doc("The resource is built in")
BuiltIn,
}

/** Alias of keyEncryptionKeyIdentity for back compatibility. Please change to keyEncryptionKeyIdentity. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ extern dec armCommonTypesVersion(
*
* @param propertiesType: The type of the resource properties.
*/
extern dec armVirtualResource(target: Model);
extern dec armVirtualResource(target: Model, provider?: valueof string);

/**
* This decorator sets the base type of the given resource.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import "@azure-tools/typespec-azure-core";
import "./models.tsp";
import "./operations.tsp";
import "./parameters.tsp";
import "./private.decorators.tsp";

namespace Azure.resourceManager.Extension;
26 changes: 26 additions & 0 deletions packages/typespec-azure-resource-manager/lib/extension/models.tsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using Http;
using Rest;
using Azure.Core;
using Azure.ResourceManager.Private;

namespace Azure.ResourceManager.Extension;

/** Represents an extension resource group */
@parentResource(Subscription)
@Private.builtInResource
model ResourceGroup is CommonTypes.ResourceGroupNameParameter;

@Private.builtInResource
model Subscription is CommonTypes.SubscriptionIdParameter;

/** Represents a management group */
@tenantResource
@armVirtualResource("Microsoft.Management")
model ManagementGroup {
@path
@minLength(1)
@segment("managementGroups")
@key
@doc("The management group ID.")
managementGroupName: string;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
using Http;
using Rest;
using Azure.Core;

namespace Azure.ResourceManager.Extension;
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
using Http;
using Rest;
using Azure.Core;

namespace Azure.ResourceManager.Extension;
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using Http;
using Rest;
using Azure.Core;
using Reflection;

namespace Azure.ResourceManager.Extension.Private;

/**
* `@builtInResource` marks a model as built-in to Azure ResourceManager
*
* @param target - The model that is marked as built-in.
*/
extern dec builtInResource(target: Model);