Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,12 @@ interface Applications {
* The application resource properties.
*/
model ApplicationResourceProperties {
/**
* List of user assigned identities for the application, each mapped to a friendly name.
*/
@OpenAPI.extension("x-ms-identifiers", #[])
managedIdentities?: ApplicationUserAssignedIdentity[];

/**
* The current deployment or provisioning state, which only appears in the response
*/
Expand All @@ -154,12 +160,6 @@ model ApplicationResourceProperties {
* Describes the policy for a monitored application upgrade.
*/
upgradePolicy?: ApplicationUpgradePolicy;

/**
* List of user assigned identities for the application, each mapped to a friendly name.
*/
@identifiers(#[])
managedIdentities?: ApplicationUserAssignedIdentity[];
}

/**
Expand Down Expand Up @@ -278,37 +278,37 @@ model RollingUpgradeMonitoringPolicy {
/**
* The amount of time to wait after completing an upgrade domain before applying health policies. It is interpreted as a string representing an ISO 8601 duration with following format "hh:mm:ss.fff".
*/
#suppress "@azure-tools/typespec-azure-core/no-openapi" "Day 0 property"
@OpenAPI.extension("x-ms-format", "duration-constant")
healthCheckWaitDuration: string;
#suppress "@azure-tools/typespec-azure-core/known-encoding" "Backwards compatibility with non-standard duration encoding in c#"
@encode("duration-constant")
healthCheckWaitDuration: duration;

/**
* The amount of time that the application or cluster must remain healthy before the upgrade proceeds to the next upgrade domain. It is interpreted as a string representing an ISO 8601 duration with following format "hh:mm:ss.fff".
*/
#suppress "@azure-tools/typespec-azure-core/no-openapi" "Day 0 property"
@OpenAPI.extension("x-ms-format", "duration-constant")
healthCheckStableDuration: string;
#suppress "@azure-tools/typespec-azure-core/known-encoding" "Backwards compatibility with non-standard duration encoding in c#"
@encode("duration-constant")
healthCheckStableDuration: duration;

/**
* The amount of time to retry health evaluation when the application or cluster is unhealthy before FailureAction is executed. It is interpreted as a string representing an ISO 8601 duration with following format "hh:mm:ss.fff".
*/
#suppress "@azure-tools/typespec-azure-core/no-openapi" "Day 0 property"
@OpenAPI.extension("x-ms-format", "duration-constant")
healthCheckRetryTimeout: string;
#suppress "@azure-tools/typespec-azure-core/known-encoding" "Backwards compatibility with non-standard duration encoding in c#"
@encode("duration-constant")
healthCheckRetryTimeout: duration;

/**
* The amount of time the overall upgrade has to complete before FailureAction is executed. Cannot be larger than 12 hours. It is interpreted as a string representing an ISO 8601 duration with following format "hh:mm:ss.fff".
*/
#suppress "@azure-tools/typespec-azure-core/no-openapi" "Day 0 property"
@OpenAPI.extension("x-ms-format", "duration-constant")
upgradeTimeout: string;
#suppress "@azure-tools/typespec-azure-core/known-encoding" "Backwards compatibility with non-standard duration encoding in c#"
@encode("duration-constant")
upgradeTimeout: duration;

/**
* The amount of time each upgrade domain has to complete before FailureAction is executed. Cannot be larger than 12 hours. It is interpreted as a string representing an ISO 8601 duration with following format "hh:mm:ss.fff".
*/
#suppress "@azure-tools/typespec-azure-core/no-openapi" "Day 0 property"
@OpenAPI.extension("x-ms-format", "duration-constant")
upgradeDomainTimeout: string;
#suppress "@azure-tools/typespec-azure-core/known-encoding" "Backwards compatibility with non-standard duration encoding in c#"
@encode("duration-constant")
upgradeDomainTimeout: duration;
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";
import "@azure-tools/typespec-client-generator-core";
import "@typespec/openapi";
import "@typespec/rest";
import "@typespec/versioning";
import "./models.tsp";

using Azure.Core;
using TypeSpec.Rest;
using Azure.ResourceManager;
using Azure.ClientGenerator.Core;
using TypeSpec.Http;
using TypeSpec.OpenAPI;
using TypeSpec.Versioning;
Expand Down Expand Up @@ -215,6 +218,7 @@ model ManagedClusterProperties {
* A service generated unique identifier for the cluster resource.
*/
@visibility(Lifecycle.Read)
@deserializeEmptyStringAsNull
clusterId?: string;

/**
Expand Down Expand Up @@ -644,6 +648,7 @@ model Subnet {
/**
* Subnet name.
*/
@deserializeEmptyStringAsNull
name: string;

/**
Expand All @@ -664,6 +669,7 @@ model Subnet {
/**
* Full resource id for the network security group.
*/
@deserializeEmptyStringAsNull
networkSecurityGroupId?: string;
}

Expand Down Expand Up @@ -793,16 +799,16 @@ model ClusterMonitoringPolicy {
/**
* The length of time to wait after completing an upgrade domain before performing health checks. The duration can be in either hh:mm:ss or in d.hh:mm:ss.ms format.
*/
#suppress "@azure-tools/typespec-azure-core/no-openapi" "Day 0 property"
@OpenAPI.extension("x-ms-format", "duration-constant")
healthCheckWaitDuration: string;
#suppress "@azure-tools/typespec-azure-core/known-encoding" "Backwards compatibility with non-standard duration encoding in c#"
@encode("duration-constant")
healthCheckWaitDuration: duration;

/**
* The amount of time that the application or cluster must remain healthy before the upgrade proceeds to the next upgrade domain. The duration can be in either hh:mm:ss or in d.hh:mm:ss.ms format.
*/
#suppress "@azure-tools/typespec-azure-core/no-openapi" "Day 0 property"
@OpenAPI.extension("x-ms-format", "duration-constant")
healthCheckStableDuration: string;
#suppress "@azure-tools/typespec-azure-core/known-encoding" "Backwards compatibility with non-standard duration encoding in c#"
@encode("duration-constant")
healthCheckStableDuration: duration;

/**
* The amount of time to retry health evaluation when the application or cluster is unhealthy before the upgrade rolls back. The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";
import "@azure-tools/typespec-client-generator-core";
import "@typespec/openapi";
import "@typespec/rest";
import "./models.tsp";

using TypeSpec.Rest;
using Azure.Core;
using Azure.ResourceManager;
using Azure.ClientGenerator.Core;
using TypeSpec.Http;

namespace Microsoft.ServiceFabric;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,30 +196,30 @@ model StatefulServiceProperties extends ServiceResourceProperties {
/**
* The duration between when a replica goes down and when a new replica is created, represented in ISO 8601 format "hh:mm:ss".
*/
#suppress "@azure-tools/typespec-azure-core/no-openapi" "Day 0 property"
@OpenAPI.extension("x-ms-format", "duration-constant")
replicaRestartWaitDuration?: string;
#suppress "@azure-tools/typespec-azure-core/known-encoding" "Backwards compatibility with non-standard duration encoding in c#"
@encode("duration-constant")
replicaRestartWaitDuration?: duration;

/**
* The maximum duration for which a partition is allowed to be in a state of quorum loss, represented in ISO 8601 format "hh:mm:ss".
*/
#suppress "@azure-tools/typespec-azure-core/no-openapi" "Day 0 property"
@OpenAPI.extension("x-ms-format", "duration-constant")
quorumLossWaitDuration?: string;
#suppress "@azure-tools/typespec-azure-core/known-encoding" "Backwards compatibility with non-standard duration encoding in c#"
@encode("duration-constant")
quorumLossWaitDuration?: duration;

/**
* The definition on how long StandBy replicas should be maintained before being removed, represented in ISO 8601 format "hh:mm:ss".
*/
#suppress "@azure-tools/typespec-azure-core/no-openapi" "Day 0 property"
@OpenAPI.extension("x-ms-format", "duration-constant")
standByReplicaKeepDuration?: string;
#suppress "@azure-tools/typespec-azure-core/known-encoding" "Backwards compatibility with non-standard duration encoding in c#"
@encode("duration-constant")
standByReplicaKeepDuration?: duration;

/**
* The duration for which replicas can stay InBuild before reporting that build is stuck, represented in ISO 8601 format "hh:mm:ss".
*/
#suppress "@azure-tools/typespec-azure-core/no-openapi" "Day 0 property"
@OpenAPI.extension("x-ms-format", "duration-constant")
servicePlacementTimeLimit?: string;
#suppress "@azure-tools/typespec-azure-core/known-encoding" "Backwards compatibility with non-standard duration encoding in c#"
@encode("duration-constant")
servicePlacementTimeLimit?: duration;

/**
* The kind of service (Stateless or Stateful).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,6 @@ using Microsoft.ServiceFabric;
"IsRdpAccessAllowed",
"csharp"
);
@@clientName(ManagedClusterProperties.clusterCertificateThumbprints,
"-|any",
"csharp"
);
@@clientName(ManagedClusterProperties.clusterId, "-|uuid", "csharp");
@@clientName(ManagedClusterProperties.enableAutoOSUpgrade,
"IsAutoOSUpgradeEnabled",
"csharp"
Expand Down Expand Up @@ -134,7 +129,6 @@ using Microsoft.ServiceFabric;
"csharp"
);
@@clientName(ServiceEndpoint, "ManagedClusterServiceEndpoint", "csharp");
@@clientName(ServiceEndpoint.locations, "-|azure-location", "csharp");
@@clientName(NodeType, "ServiceFabricManagedNodeType", "csharp");
@@clientName(NodeTypeProperties.dataDiskSizeGB, "DataDiskSizeInGB", "csharp");
@@clientName(NodeTypeProperties.enableAcceleratedNetworking,
Expand Down Expand Up @@ -170,7 +164,6 @@ using Microsoft.ServiceFabric;
@@clientName(VaultCertificate, "NodeTypeVaultCertificate", "csharp");
@@clientName(DiskType, "ServiceFabricManagedDataDiskType", "csharp");
@@clientName(FrontendConfiguration, "NodeTypeFrontendConfiguration", "csharp");
@@clientName(VmManagedIdentity.userAssignedIdentities, "-|arm-id", "csharp");
@@clientName(NodeTypeActionParameters, "NodeTypeActionContent", "csharp");
@@clientName(NodeTypeActionParameters.force, "IsForced", "csharp");
@@clientName(ServiceResource, "ServiceFabricManagedService", "csharp");
Expand Down Expand Up @@ -205,7 +198,6 @@ using Microsoft.ServiceFabric;
@@clientName(Partition, "ManagedServicePartitionScheme", "csharp");
@@clientName(NsgProtocol, "ServiceFabricManagedNsgProtocol", "csharp");
@@clientName(NsgProtocol.ah, "AH", "csharp");
@@clientName(NodeTypeAvailableSku.resourceType, "-|resource-type", "csharp");
@@clientName(PartitionInstanceCountScaleMechanism,
"PartitionInstanceCountScalingMechanism",
"csharp"
Expand Down Expand Up @@ -242,7 +234,6 @@ using Microsoft.ServiceFabric;
"csharp"
);
@@clientName(EvictionPolicyType, "SpotNodeVmEvictionPolicyType", "csharp");
@@clientName(ResourceAzStatus.resourceType, "-|resource-type", "csharp");
@@clientName(SecurityType, "ServiceFabricManagedClusterSecurityType", "csharp");
@@clientName(UpdateType, "ServiceFabricManagedClusterUpdateType", "csharp");
@@clientName(ClusterHealthPolicy, "ManagedClusterHealthPolicy", "csharp");
Expand Down Expand Up @@ -283,8 +274,44 @@ using Microsoft.ServiceFabric;
"LastWindowEndOn",
"csharp"
);
@@clientName(VMSSExtensionProperties.type,
"vmssExtensionPropertiesType",
"csharp"
);
@@clientName(DiskType.Standard_LRS, "StandardLrs", "csharp");
@@clientName(DiskType.StandardSSD_LRS, "StandardSsdLrs", "csharp");
@@clientName(DiskType.Premium_LRS, "PremiumLrs", "csharp");
@@clientName(DiskType.StandardSSD_ZRS, "PremiumV2Lrs", "csharp");
@@clientName(DiskType.StandardSSD_ZRS, "StandardSsdZrs", "csharp");
@@clientName(DiskType.StandardSSD_ZRS, "PremiumZrs", "csharp");

@@alternateType(ManagedClusterVersion.list::parameters.location,
azureLocation,
"csharp"
);
@@alternateType(ManagedClusterVersion.get::parameters.location,
azureLocation,
"csharp"
);
@@alternateType(ManagedClusterVersion.getByEnvironment::parameters.location,
azureLocation,
"csharp"
);
@@alternateType(ManagedClusterVersion.listByEnvironment::parameters.location,
azureLocation,
"csharp"
);
@@alternateType(ManagedUnsupportedVMSizes.get::parameters.location,
azureLocation,
"csharp"
);
@@alternateType(ManagedUnsupportedVMSizes.list::parameters.location,
azureLocation,
"csharp"
);

@@alternateType(ManagedClusterProperties.clusterId, uuid, "csharp");
@@alternateType(ManagedCluster.etag, eTag, "csharp");
@@alternateType(ManagedClusterProperties.ipv4Address, ipV4Address, "csharp");
@@alternateType(ManagedClusterProperties.ipv6Address, ipV6Address, "csharp");
@@alternateType(Subnet.networkSecurityGroupId, armResourceIdentifier, "csharp");
Expand All @@ -304,3 +331,16 @@ using Microsoft.ServiceFabric;
);
@@alternateType(AzureActiveDirectory.tenantId, uuid, "csharp");
@@alternateType(VaultCertificate.certificateUrl, url, "csharp");
@@alternateType(ServiceEndpoint.locations, azureLocation[], "csharp");
@@alternateType(ManagedClusterProperties.clusterCertificateThumbprints,
unknown[],
"csharp"
);
@@alternateType(ClientCertificate.thumbprint, unknown, "csharp");
@@alternateType(ClientCertificate.issuerThumbprint, unknown, "csharp");
@@alternateType(VMSSExtensionProperties.settings, unknown, "csharp");
@@alternateType(VMSSExtensionProperties.protectedSettings, unknown, "csharp");
@@alternateType(VmManagedIdentity.userAssignedIdentities,
armResourceIdentifier[],
"csharp"
);
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ options:
model-namespace: false
namespace: "{package-dir}"
flavor: azure
suppress-abstract-base-class:
- "ManagedServiceProperties"
"@azure-tools/typespec-python":
package-dir: "azure-mgmt-servicefabricmanagedclusters"
package-name: "azure-mgmt-servicefabricmanagedclusters"
Expand Down
Loading