diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/Azure.ResourceManager.AppContainers.sln b/sdk/containerapps/Azure.ResourceManager.AppContainers/Azure.ResourceManager.AppContainers.sln index 12d133e20ee6..b4ab2cbc837c 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/Azure.ResourceManager.AppContainers.sln +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/Azure.ResourceManager.AppContainers.sln @@ -1,21 +1,15 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.30309.148 +# Visual Studio Version 17 +VisualStudioVersion = 17.5.33530.505 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{7532DC22-2997-4574-90A4-47E91F9A2B75}") = "Azure.ResourceManager.AppContainers", "src\Azure.ResourceManager.AppContainers.csproj", "{08FB3214-6D32-4CB2-B147-328D26991B0E}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.AppContainers", "src\Azure.ResourceManager.AppContainers.csproj", "{08FB3214-6D32-4CB2-B147-328D26991B0E}" EndProject -Project("{7532DC22-2997-4574-90A4-47E91F9A2B75}") = "Azure.ResourceManager.AppContainers.Tests", "tests\Azure.ResourceManager.AppContainers.Tests.csproj", "{F93F747E-06D9-4C84-B79A-0C288D854C9A}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.AppContainers.Tests", "tests\Azure.ResourceManager.AppContainers.Tests.csproj", "{F93F747E-06D9-4C84-B79A-0C288D854C9A}" EndProject -Project("{7532DC22-2997-4574-90A4-47E91F9A2B75}") = "Azure.ResourceManager.AppContainers.Samples", "samples\Azure.ResourceManager.AppContainers.Samples.csproj", "{7FAF05E5-856A-4706-AD86-B3BE4B0B5203}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.AppContainers.Samples", "samples\Azure.ResourceManager.AppContainers.Samples.csproj", "{7FAF05E5-856A-4706-AD86-B3BE4B0B5203}" EndProject Global - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {C513CCE4-D1E4-4E21-85B6-174F42CF53CF} - EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Debug|x64 = Debug|x64 @@ -49,5 +43,23 @@ Global {F93F747E-06D9-4C84-B79A-0C288D854C9A}.Release|x64.Build.0 = Release|Any CPU {F93F747E-06D9-4C84-B79A-0C288D854C9A}.Release|x86.ActiveCfg = Release|Any CPU {F93F747E-06D9-4C84-B79A-0C288D854C9A}.Release|x86.Build.0 = Release|Any CPU + {7FAF05E5-856A-4706-AD86-B3BE4B0B5203}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7FAF05E5-856A-4706-AD86-B3BE4B0B5203}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7FAF05E5-856A-4706-AD86-B3BE4B0B5203}.Debug|x64.ActiveCfg = Debug|Any CPU + {7FAF05E5-856A-4706-AD86-B3BE4B0B5203}.Debug|x64.Build.0 = Debug|Any CPU + {7FAF05E5-856A-4706-AD86-B3BE4B0B5203}.Debug|x86.ActiveCfg = Debug|Any CPU + {7FAF05E5-856A-4706-AD86-B3BE4B0B5203}.Debug|x86.Build.0 = Debug|Any CPU + {7FAF05E5-856A-4706-AD86-B3BE4B0B5203}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7FAF05E5-856A-4706-AD86-B3BE4B0B5203}.Release|Any CPU.Build.0 = Release|Any CPU + {7FAF05E5-856A-4706-AD86-B3BE4B0B5203}.Release|x64.ActiveCfg = Release|Any CPU + {7FAF05E5-856A-4706-AD86-B3BE4B0B5203}.Release|x64.Build.0 = Release|Any CPU + {7FAF05E5-856A-4706-AD86-B3BE4B0B5203}.Release|x86.ActiveCfg = Release|Any CPU + {7FAF05E5-856A-4706-AD86-B3BE4B0B5203}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {C513CCE4-D1E4-4E21-85B6-174F42CF53CF} EndGlobalSection EndGlobal diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/CHANGELOG.md b/sdk/containerapps/Azure.ResourceManager.AppContainers/CHANGELOG.md index 622e6cb2efd0..253eafa76e5b 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/CHANGELOG.md +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/CHANGELOG.md @@ -3,10 +3,18 @@ ## 1.1.0-beta.1 (Unreleased) ### Features Added - -### Breaking Changes +- Upgrade to 2022-11-01-preview api version +- Add API to start, stop and executions for ContainerAppJobs +- Support keyvault for container app secret +- Add managedBy for ContainerApps +- Add keda/dapr version support +- Add API to support ManagedCertificate +- Add AppState and LatestReadyRevisionName +- Add Client certificate mode for mTLS authentication and corsPolicy for Container App +- Add Friendly workload profile name support ### Bugs Fixed +- Fix certifaicte password format for environment custom domain ### Other Changes diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/api/Azure.ResourceManager.AppContainers.netstandard2.0.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/api/Azure.ResourceManager.AppContainers.netstandard2.0.cs index 7e58df1cc34f..46a4c4e71071 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/api/Azure.ResourceManager.AppContainers.netstandard2.0.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/api/Azure.ResourceManager.AppContainers.netstandard2.0.cs @@ -21,6 +21,13 @@ public static partial class AppContainersExtensions public static Azure.ResourceManager.AppContainers.ContainerAppDetectorPropertyResource GetContainerAppDetectorPropertyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppContainers.ContainerAppDetectorPropertyRevisionResource GetContainerAppDetectorPropertyRevisionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppContainers.ContainerAppDetectorResource GetContainerAppDetectorResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetContainerAppJob(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetContainerAppJobAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.AppContainers.ContainerAppJobResource GetContainerAppJobResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppContainers.ContainerAppJobCollection GetContainerAppJobs(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetContainerAppJobs(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetContainerAppJobsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.AppContainers.ContainerAppManagedCertificateResource GetContainerAppManagedCertificateResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetContainerAppManagedEnvironment(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string environmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetContainerAppManagedEnvironmentAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string environmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.AppContainers.ContainerAppManagedEnvironmentCertificateResource GetContainerAppManagedEnvironmentCertificateResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -273,6 +280,7 @@ public ContainerAppData(Azure.Core.AzureLocation location) : base (default(Azure public string LatestReadyRevisionName { get { throw null; } } public string LatestRevisionFqdn { get { throw null; } } public string LatestRevisionName { get { throw null; } } + public string ManagedBy { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ManagedEnvironmentId { get { throw null; } set { } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.ObsoleteAttribute("This property is obsolete and will be removed in a future release", false)] @@ -280,6 +288,8 @@ public ContainerAppData(Azure.Core.AzureLocation location) : base (default(Azure public System.Collections.Generic.IReadOnlyList OutboundIPAddressList { get { throw null; } } public Azure.ResourceManager.AppContainers.Models.ContainerAppProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.AppContainers.Models.ContainerAppTemplate Template { get { throw null; } set { } } + public string WorkloadProfileName { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public string WorkloadProfileType { get { throw null; } set { } } } public partial class ContainerAppDetectorCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable @@ -343,6 +353,103 @@ public partial class ContainerAppDiagnosticData : Azure.ResourceManager.Models.R public ContainerAppDiagnosticData() { } public Azure.ResourceManager.AppContainers.Models.ContainerAppDiagnosticsProperties Properties { get { throw null; } set { } } } + public partial class ContainerAppJobCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ContainerAppJobCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string jobName, Azure.ResourceManager.AppContainers.ContainerAppJobData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string jobName, Azure.ResourceManager.AppContainers.ContainerAppJobData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ContainerAppJobData : Azure.ResourceManager.Models.TrackedResourceData + { + public ContainerAppJobData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } + public Azure.ResourceManager.AppContainers.Models.ContainerAppJobConfiguration Configuration { get { throw null; } set { } } + public string EnvironmentId { get { throw null; } set { } } + public string EventStreamEndpoint { get { throw null; } } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList OutboundIPAddresses { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.ContainerAppJobProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.ContainerAppJobTemplate Template { get { throw null; } set { } } + public string WorkloadProfileName { get { throw null; } set { } } + } + public partial class ContainerAppJobResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ContainerAppJobResource() { } + public virtual Azure.ResourceManager.AppContainers.ContainerAppJobData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string jobName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetJobsExecutions(string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetJobsExecutionsAsync(string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetSecrets(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetSecretsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Start(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.Models.ContainerAppJobExecutionTemplate template, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> StartAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.Models.ContainerAppJobExecutionTemplate template, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation StopExecution(Azure.WaitUntil waitUntil, string jobExecutionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task StopExecutionAsync(Azure.WaitUntil waitUntil, string jobExecutionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation StopMultipleExecutions(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.Models.JobExecutionNamesCollection jobExecutionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> StopMultipleExecutionsAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.Models.JobExecutionNamesCollection jobExecutionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.Models.ContainerAppJobPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.Models.ContainerAppJobPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ContainerAppManagedCertificateCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ContainerAppManagedCertificateCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string managedCertificateName, Azure.ResourceManager.AppContainers.ContainerAppManagedCertificateData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string managedCertificateName, Azure.ResourceManager.AppContainers.ContainerAppManagedCertificateData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string managedCertificateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string managedCertificateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string managedCertificateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string managedCertificateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ContainerAppManagedCertificateData : Azure.ResourceManager.Models.TrackedResourceData + { + public ContainerAppManagedCertificateData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } + public Azure.ResourceManager.AppContainers.Models.ManagedCertificateProperties Properties { get { throw null; } set { } } + } + public partial class ContainerAppManagedCertificateResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ContainerAppManagedCertificateResource() { } + public virtual Azure.ResourceManager.AppContainers.ContainerAppManagedCertificateData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string environmentName, string managedCertificateName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Update(Azure.ResourceManager.AppContainers.Models.ContainerAppManagedCertificatePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.AppContainers.Models.ContainerAppManagedCertificatePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class ContainerAppManagedEnvironmentCertificateCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected ContainerAppManagedEnvironmentCertificateCollection() { } @@ -431,12 +538,16 @@ public ContainerAppManagedEnvironmentData(Azure.Core.AzureLocation location) : b public Azure.ResourceManager.AppContainers.Models.ContainerAppCustomDomainConfiguration CustomDomainConfiguration { get { throw null; } set { } } public string DaprAIConnectionString { get { throw null; } set { } } public string DaprAIInstrumentationKey { get { throw null; } set { } } + public string DaprVersion { get { throw null; } } public string DefaultDomain { get { throw null; } } public string DeploymentErrors { get { throw null; } } public string EventStreamEndpoint { get { throw null; } } + public string InfrastructureResourceGroup { get { throw null; } set { } } public bool? IsZoneRedundant { get { throw null; } set { } } + public string KedaVersion { get { throw null; } } public string Kind { get { throw null; } set { } } public Azure.ResourceManager.AppContainers.Models.ContainerAppEnvironmentProvisioningState? ProvisioningState { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.AppContainers.Models.AppContainersSkuName? SkuName { get { throw null; } set { } } public System.Net.IPAddress StaticIP { get { throw null; } } public Azure.ResourceManager.AppContainers.Models.ContainerAppVnetConfiguration VnetConfiguration { get { throw null; } set { } } @@ -492,6 +603,9 @@ protected ContainerAppManagedEnvironmentResource() { } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetAuthToken(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAuthTokenAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetContainerAppManagedCertificate(string managedCertificateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetContainerAppManagedCertificateAsync(string managedCertificateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppContainers.ContainerAppManagedCertificateCollection GetContainerAppManagedCertificates() { throw null; } public virtual Azure.Response GetContainerAppManagedEnvironmentCertificate(string certificateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetContainerAppManagedEnvironmentCertificateAsync(string certificateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppContainers.ContainerAppManagedEnvironmentCertificateCollection GetContainerAppManagedEnvironmentCertificates() { throw null; } @@ -705,6 +819,24 @@ protected ContainerAppSourceControlResource() { } } namespace Azure.ResourceManager.AppContainers.Models { + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct Affinity : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public Affinity(string value) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.Affinity None { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.Affinity Sticky { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppContainers.Models.Affinity other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppContainers.Models.Affinity left, Azure.ResourceManager.AppContainers.Models.Affinity right) { throw null; } + public static implicit operator Azure.ResourceManager.AppContainers.Models.Affinity (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppContainers.Models.Affinity left, Azure.ResourceManager.AppContainers.Models.Affinity right) { throw null; } + public override string ToString() { throw null; } + } public partial class AppContainerResources { public AppContainerResources() { } @@ -712,11 +844,10 @@ public AppContainerResources() { } public string EphemeralStorage { get { throw null; } } public string Memory { get { throw null; } set { } } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential, Size=1)] public readonly partial struct AppContainersSkuName : System.IEquatable { - private readonly object _dummy; - private readonly int _dummyPrimitive; public AppContainersSkuName(string value) { throw null; } public static Azure.ResourceManager.AppContainers.Models.AppContainersSkuName Consumption { get { throw null; } } public static Azure.ResourceManager.AppContainers.Models.AppContainersSkuName Premium { get { throw null; } } @@ -825,7 +956,9 @@ public partial class ContainerAppAvailableWorkloadProfileProperties { public ContainerAppAvailableWorkloadProfileProperties() { } public Azure.ResourceManager.AppContainers.Models.ContainerAppAvailableWorkloadProfileApplicability? Applicability { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.AppContainers.Models.ContainerAppBillingMeterCategory? BillingMeterCategory { get { throw null; } set { } } + public string Category { get { throw null; } set { } } public int? Cores { get { throw null; } set { } } public string DisplayName { get { throw null; } set { } } public int? MemoryInGiB { get { throw null; } set { } } @@ -893,6 +1026,7 @@ public ContainerAppBillingMeter() { } public Azure.Core.AzureLocation? Location { get { throw null; } set { } } public Azure.ResourceManager.AppContainers.Models.ContainerAppBillingMeterProperties Properties { get { throw null; } set { } } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ContainerAppBillingMeterCategory : System.IEquatable { @@ -915,9 +1049,11 @@ public ContainerAppBillingMeter() { } public partial class ContainerAppBillingMeterProperties { public ContainerAppBillingMeterProperties() { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.AppContainers.Models.ContainerAppBillingMeterCategory? Category { get { throw null; } set { } } public string DisplayName { get { throw null; } set { } } public string MeterType { get { throw null; } set { } } + public string WorkloadProfileCategory { get { throw null; } set { } } } public partial class ContainerAppCertificatePatch { @@ -1036,6 +1172,7 @@ public ContainerAppCredentials() { } } public partial class ContainerAppCustomDomain { + public ContainerAppCustomDomain(string name) { } public ContainerAppCustomDomain(string name, Azure.Core.ResourceIdentifier certificateId) { } public Azure.ResourceManager.AppContainers.Models.ContainerAppCustomDomainBindingType? BindingType { get { throw null; } set { } } public Azure.Core.ResourceIdentifier CertificateId { get { throw null; } set { } } @@ -1447,6 +1584,7 @@ public ContainerAppIngressConfiguration() { } public bool? External { get { throw null; } set { } } public string Fqdn { get { throw null; } } public System.Collections.Generic.IList IPSecurityRestrictions { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.Affinity? StickySessionsAffinity { get { throw null; } set { } } public int? TargetPort { get { throw null; } set { } } public System.Collections.Generic.IList Traffic { get { throw null; } } public Azure.ResourceManager.AppContainers.Models.ContainerAppIngressTransportMethod? Transport { get { throw null; } set { } } @@ -1501,6 +1639,106 @@ public ContainerAppIPSecurityRestrictionRule(string name, string ipAddressRange, public string IPAddressRange { get { throw null; } set { } } public string Name { get { throw null; } set { } } } + public partial class ContainerAppJobConfiguration + { + public ContainerAppJobConfiguration(Azure.ResourceManager.AppContainers.Models.ContainerAppJobTriggerType triggerType, int replicaTimeout) { } + public Azure.ResourceManager.AppContainers.Models.JobConfigurationManualTriggerConfig ManualTriggerConfig { get { throw null; } set { } } + public System.Collections.Generic.IList Registries { get { throw null; } } + public int? ReplicaRetryLimit { get { throw null; } set { } } + public int ReplicaTimeout { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.JobConfigurationScheduleTriggerConfig ScheduleTriggerConfig { get { throw null; } set { } } + public System.Collections.Generic.IList Secrets { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.ContainerAppJobTriggerType TriggerType { get { throw null; } set { } } + } + public partial class ContainerAppJobExecution : Azure.ResourceManager.Models.ResourceData + { + internal ContainerAppJobExecution() { } + public System.DateTimeOffset? EndOn { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.JobExecutionRunningState? Status { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.ContainerAppJobExecutionTemplate Template { get { throw null; } } + } + public partial class ContainerAppJobExecutionBase + { + public ContainerAppJobExecutionBase() { } + public string Id { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + } + public partial class ContainerAppJobExecutions + { + internal ContainerAppJobExecutions() { } + public string NextLink { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + } + public partial class ContainerAppJobExecutionTemplate + { + public ContainerAppJobExecutionTemplate() { } + public System.Collections.Generic.IList Containers { get { throw null; } } + public System.Collections.Generic.IList InitContainers { get { throw null; } } + } + public partial class ContainerAppJobPatch + { + public ContainerAppJobPatch() { } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.ContainerAppJobPatchProperties Properties { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + } + public partial class ContainerAppJobPatchProperties + { + public ContainerAppJobPatchProperties() { } + public Azure.ResourceManager.AppContainers.Models.ContainerAppJobConfiguration Configuration { get { throw null; } set { } } + public string EnvironmentId { get { throw null; } set { } } + public string EventStreamEndpoint { get { throw null; } set { } } + public System.Collections.Generic.IList OutboundIPAddresses { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.ContainerAppJobTemplate Template { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ContainerAppJobProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ContainerAppJobProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.ContainerAppJobProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.ContainerAppJobProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.ContainerAppJobProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.ContainerAppJobProvisioningState InProgress { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.ContainerAppJobProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppContainers.Models.ContainerAppJobProvisioningState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppContainers.Models.ContainerAppJobProvisioningState left, Azure.ResourceManager.AppContainers.Models.ContainerAppJobProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.AppContainers.Models.ContainerAppJobProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppContainers.Models.ContainerAppJobProvisioningState left, Azure.ResourceManager.AppContainers.Models.ContainerAppJobProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ContainerAppJobTemplate + { + public ContainerAppJobTemplate() { } + public System.Collections.Generic.IList Containers { get { throw null; } } + public System.Collections.Generic.IList InitContainers { get { throw null; } } + public System.Collections.Generic.IList Volumes { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ContainerAppJobTriggerType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ContainerAppJobTriggerType(string value) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.ContainerAppJobTriggerType Event { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.ContainerAppJobTriggerType Manual { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.ContainerAppJobTriggerType Scheduled { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppContainers.Models.ContainerAppJobTriggerType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppContainers.Models.ContainerAppJobTriggerType left, Azure.ResourceManager.AppContainers.Models.ContainerAppJobTriggerType right) { throw null; } + public static implicit operator Azure.ResourceManager.AppContainers.Models.ContainerAppJobTriggerType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppContainers.Models.ContainerAppJobTriggerType left, Azure.ResourceManager.AppContainers.Models.ContainerAppJobTriggerType right) { throw null; } + public override string ToString() { throw null; } + } public partial class ContainerAppJwtClaimChecks { public ContainerAppJwtClaimChecks() { } @@ -1534,12 +1772,19 @@ public ContainerAppLogsConfiguration() { } public string Destination { get { throw null; } set { } } public Azure.ResourceManager.AppContainers.Models.ContainerAppLogAnalyticsConfiguration LogAnalyticsConfiguration { get { throw null; } set { } } } + public partial class ContainerAppManagedCertificatePatch + { + public ContainerAppManagedCertificatePatch() { } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public partial class ContainerAppManagedEnvironmentOutboundSettings { public ContainerAppManagedEnvironmentOutboundSettings() { } public Azure.ResourceManager.AppContainers.Models.ContainerAppManagedEnvironmentOutBoundType? OutBoundType { get { throw null; } set { } } public System.Net.IPAddress VirtualNetworkApplianceIP { get { throw null; } set { } } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ContainerAppManagedEnvironmentOutBoundType : System.IEquatable { @@ -1820,6 +2065,8 @@ public ContainerAppScaleRuleAuth() { } public partial class ContainerAppSecret { internal ContainerAppSecret() { } + public string Identity { get { throw null; } } + public System.Uri KeyVaultUri { get { throw null; } } public string Name { get { throw null; } } public string Value { get { throw null; } } } @@ -1851,6 +2098,7 @@ internal ContainerAppSecret() { } public ContainerAppStorageType(string value) { throw null; } public static Azure.ResourceManager.AppContainers.Models.ContainerAppStorageType AzureFile { get { throw null; } } public static Azure.ResourceManager.AppContainers.Models.ContainerAppStorageType EmptyDir { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.ContainerAppStorageType Secret { get { throw null; } } public bool Equals(Azure.ResourceManager.AppContainers.Models.ContainerAppStorageType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } @@ -1907,15 +2155,20 @@ public ContainerAppVnetConfiguration() { } public string DockerBridgeCidr { get { throw null; } set { } } public Azure.Core.ResourceIdentifier InfrastructureSubnetId { get { throw null; } set { } } public bool? IsInternal { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.ObsoleteAttribute("This method is obsolete and will be removed in a future release", false)] public Azure.ResourceManager.AppContainers.Models.ContainerAppManagedEnvironmentOutboundSettings OutboundSettings { get { throw null; } set { } } public string PlatformReservedCidr { get { throw null; } set { } } public string PlatformReservedDnsIP { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.ObsoleteAttribute("This method is obsolete and will be removed in a future release", false)] public string RuntimeSubnetId { get { throw null; } set { } } } public partial class ContainerAppVolume { public ContainerAppVolume() { } public string Name { get { throw null; } set { } } + public System.Collections.Generic.IList Secrets { get { throw null; } } public string StorageName { get { throw null; } set { } } public Azure.ResourceManager.AppContainers.Models.ContainerAppStorageType? StorageType { get { throw null; } set { } } } @@ -1928,8 +2181,14 @@ public ContainerAppVolumeMount() { } public partial class ContainerAppWorkloadProfile { public ContainerAppWorkloadProfile(string workloadProfileType, int minimumCount, int maximumCount) { } + public ContainerAppWorkloadProfile(string name, string workloadProfileType) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public int MaximumCount { get { throw null; } set { } } + public int? MaximumNodeCount { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public int MinimumCount { get { throw null; } set { } } + public int? MinimumNodeCount { get { throw null; } set { } } + public string Name { get { throw null; } set { } } public string WorkloadProfileType { get { throw null; } set { } } } public partial class ContainerAppWorkloadProfileState : Azure.ResourceManager.Models.ResourceData @@ -1947,7 +2206,94 @@ public ContainerAppWorkloadProfileStateProperties() { } public partial class ContainerAppWritableSecret { public ContainerAppWritableSecret() { } + public string Identity { get { throw null; } set { } } + public System.Uri KeyVaultUri { get { throw null; } set { } } public string Name { get { throw null; } set { } } public string Value { get { throw null; } set { } } } + public partial class JobConfigurationManualTriggerConfig + { + public JobConfigurationManualTriggerConfig() { } + public int? Parallelism { get { throw null; } set { } } + public int? ReplicaCompletionCount { get { throw null; } set { } } + } + public partial class JobConfigurationScheduleTriggerConfig + { + public JobConfigurationScheduleTriggerConfig(string cronExpression) { } + public string CronExpression { get { throw null; } set { } } + public int? Parallelism { get { throw null; } set { } } + public int? ReplicaCompletionCount { get { throw null; } set { } } + } + public partial class JobExecutionContainer + { + public JobExecutionContainer() { } + public System.Collections.Generic.IList Args { get { throw null; } } + public System.Collections.Generic.IList Command { get { throw null; } } + public System.Collections.Generic.IList Env { get { throw null; } } + public string Image { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.AppContainerResources Resources { get { throw null; } set { } } + } + public partial class JobExecutionNamesCollection + { + public JobExecutionNamesCollection(System.Collections.Generic.IEnumerable value) { } + public System.Collections.Generic.IList Value { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct JobExecutionRunningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public JobExecutionRunningState(string value) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.JobExecutionRunningState Degraded { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.JobExecutionRunningState Failed { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.JobExecutionRunningState Processing { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.JobExecutionRunningState Running { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.JobExecutionRunningState Stopped { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.JobExecutionRunningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.JobExecutionRunningState Unknown { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppContainers.Models.JobExecutionRunningState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppContainers.Models.JobExecutionRunningState left, Azure.ResourceManager.AppContainers.Models.JobExecutionRunningState right) { throw null; } + public static implicit operator Azure.ResourceManager.AppContainers.Models.JobExecutionRunningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppContainers.Models.JobExecutionRunningState left, Azure.ResourceManager.AppContainers.Models.JobExecutionRunningState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ManagedCertificateDomainControlValidation : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ManagedCertificateDomainControlValidation(string value) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.ManagedCertificateDomainControlValidation Cname { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.ManagedCertificateDomainControlValidation Http { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.ManagedCertificateDomainControlValidation TXT { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppContainers.Models.ManagedCertificateDomainControlValidation other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppContainers.Models.ManagedCertificateDomainControlValidation left, Azure.ResourceManager.AppContainers.Models.ManagedCertificateDomainControlValidation right) { throw null; } + public static implicit operator Azure.ResourceManager.AppContainers.Models.ManagedCertificateDomainControlValidation (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppContainers.Models.ManagedCertificateDomainControlValidation left, Azure.ResourceManager.AppContainers.Models.ManagedCertificateDomainControlValidation right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ManagedCertificateProperties + { + public ManagedCertificateProperties() { } + public Azure.ResourceManager.AppContainers.Models.ManagedCertificateDomainControlValidation? DomainControlValidation { get { throw null; } set { } } + public string Error { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.ContainerAppCertificateProvisioningState? ProvisioningState { get { throw null; } } + public string SubjectName { get { throw null; } set { } } + public string ValidationToken { get { throw null; } } + } + public partial class SecretVolumeItem + { + public SecretVolumeItem() { } + public string Path { get { throw null; } set { } } + public string SecretRef { get { throw null; } set { } } + } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppAuthConfigCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppAuthConfigCollection.cs index cd55ed9e717a..86f60002adcc 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppAuthConfigCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppAuthConfigCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_ContainerAppAuthConfigCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAuthConfigsByContainerApps() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/AuthConfigs_ListByContainer.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AuthConfigs_ListByContainer.json // this example is just showing the usage of "ContainerAppsAuthConfigs_ListByContainerApp" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +60,7 @@ public async Task GetAll_ListAuthConfigsByContainerApps() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetContainerAppSAuthConfig() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/AuthConfigs_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AuthConfigs_Get.json // this example is just showing the usage of "ContainerAppsAuthConfigs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -95,7 +95,7 @@ public async Task Get_GetContainerAppSAuthConfig() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetContainerAppSAuthConfig() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/AuthConfigs_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AuthConfigs_Get.json // this example is just showing the usage of "ContainerAppsAuthConfigs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,7 +126,7 @@ public async Task Exists_GetContainerAppSAuthConfig() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateContainerAppAuthConfig() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/AuthConfigs_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AuthConfigs_CreateOrUpdate.json // this example is just showing the usage of "ContainerAppsAuthConfigs_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppAuthConfigResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppAuthConfigResource.cs index bb10a44676ba..b64449898f30 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppAuthConfigResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppAuthConfigResource.cs @@ -23,7 +23,7 @@ public partial class Sample_ContainerAppAuthConfigResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetContainerAppSAuthConfig() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/AuthConfigs_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AuthConfigs_Get.json // this example is just showing the usage of "ContainerAppsAuthConfigs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_GetContainerAppSAuthConfig() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateContainerAppAuthConfig() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/AuthConfigs_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AuthConfigs_CreateOrUpdate.json // this example is just showing the usage of "ContainerAppsAuthConfigs_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -110,7 +110,7 @@ public async Task Update_CreateOrUpdateContainerAppAuthConfig() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteContainerAppAuthConfig() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/AuthConfigs_Delete.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AuthConfigs_Delete.json // this example is just showing the usage of "ContainerAppsAuthConfigs_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppCollection.cs index e2de10b3d131..72bebd3a4b46 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppCollection.cs @@ -24,7 +24,7 @@ public partial class Sample_ContainerAppCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListContainerAppsByResourceGroup() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_ListByResourceGroup.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_ListByResourceGroup.json // this example is just showing the usage of "ContainerApps_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +60,7 @@ public async Task GetAll_ListContainerAppsByResourceGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetContainerApp() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_Get.json // this example is just showing the usage of "ContainerApps_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -94,7 +94,7 @@ public async Task Get_GetContainerApp() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetContainerApp() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_Get.json // this example is just showing the usage of "ContainerApps_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -124,7 +124,7 @@ public async Task Exists_GetContainerApp() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateContainerApp() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_CreateOrUpdate.json // this example is just showing the usage of "ContainerApps_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -147,7 +147,7 @@ public async Task CreateOrUpdate_CreateOrUpdateContainerApp() ContainerAppData data = new ContainerAppData(new AzureLocation("East US")) { EnvironmentId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube"), - WorkloadProfileType = "GeneralPurpose", + WorkloadProfileName = "My-GP-01", Configuration = new ContainerAppConfiguration() { Ingress = new ContainerAppIngressConfiguration() @@ -165,12 +165,14 @@ public async Task CreateOrUpdate_CreateOrUpdateContainerApp() }, CustomDomains = { -new ContainerAppCustomDomain("www.my-name.com",new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com")) +new ContainerAppCustomDomain("www.my-name.com") { BindingType = ContainerAppCustomDomainBindingType.SniEnabled, -},new ContainerAppCustomDomain("www.my-other-name.com",new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com")) +CertificateId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), +},new ContainerAppCustomDomain("www.my-other-name.com") { BindingType = ContainerAppCustomDomainBindingType.SniEnabled, +CertificateId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"), } }, IPSecurityRestrictions = @@ -183,6 +185,7 @@ public async Task CreateOrUpdate_CreateOrUpdateContainerApp() Description = "Allowing all IP's within the subnet below to access containerapp", } }, + StickySessionsAffinity = Affinity.Sticky, ClientCertificateMode = ContainerAppIngressClientCertificateMode.Accept, CorsPolicy = new ContainerAppCorsPolicy(new string[] { @@ -297,12 +300,110 @@ public async Task CreateOrUpdate_CreateOrUpdateContainerApp() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + // Create or Update ManagedBy App + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateManagedByApp() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_ManagedBy_CreateOrUpdate.json + // this example is just showing the usage of "ContainerApps_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ContainerAppResource + ContainerAppCollection collection = resourceGroupResource.GetContainerApps(); + + // invoke the operation + string containerAppName = "testcontainerAppManagedBy"; + ContainerAppData data = new ContainerAppData(new AzureLocation("East US")) + { + ManagedBy = "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.AppPlatform/Spring/springapp", + EnvironmentId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube"), + Configuration = new ContainerAppConfiguration() + { + Ingress = new ContainerAppIngressConfiguration() + { + External = true, + TargetPort = 3000, + ExposedPort = 4000, + Transport = ContainerAppIngressTransportMethod.Tcp, + Traffic = +{ +new ContainerAppRevisionTrafficWeight() +{ +RevisionName = "testcontainerAppManagedBy-ab1234", +Weight = 100, +} +}, + }, + }, + Template = new ContainerAppTemplate() + { + Containers = +{ +new ContainerAppContainer() +{ +Probes = +{ +new ContainerAppProbe() +{ +InitialDelaySeconds = 3, +PeriodSeconds = 3, +TcpSocket = new ContainerAppTcpSocketRequestInfo(8080), +ProbeType = ContainerAppProbeType.Liveness, +} +}, +Image = "repo/testcontainerAppManagedBy:v1", +Name = "testcontainerAppManagedBy", +} +}, + Scale = new ContainerAppScale() + { + MinReplicas = 1, + MaxReplicas = 5, + Rules = +{ +new ContainerAppScaleRule() +{ +Name = "tcpscalingrule", +Tcp = new ContainerAppTcpScaleRule() +{ +Metadata = +{ +["concurrentConnections"] = "50", +}, +}, +} +}, + }, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, containerAppName, data); + ContainerAppResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ContainerAppData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + // Create or Update Tcp App [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateTcpApp() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_TcpApp_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_TcpApp_CreateOrUpdate.json // this example is just showing the usage of "ContainerApps_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppConnectedEnvironmentCertificateCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppConnectedEnvironmentCertificateCollection.cs index d222eacc1f1e..93b59ffef6a7 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppConnectedEnvironmentCertificateCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppConnectedEnvironmentCertificateCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_ContainerAppConnectedEnvironmentCertificateCollectio [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListCertificatesByConnectedEnvironment() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json // this example is just showing the usage of "ConnectedEnvironmentsCertificates_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +60,7 @@ public async Task GetAll_ListCertificatesByConnectedEnvironment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetCertificate() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsCertificate_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificate_Get.json // this example is just showing the usage of "ConnectedEnvironmentsCertificates_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -95,7 +95,7 @@ public async Task Get_GetCertificate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetCertificate() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsCertificate_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificate_Get.json // this example is just showing the usage of "ConnectedEnvironmentsCertificates_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,7 +126,7 @@ public async Task Exists_GetCertificate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateCertificate() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json // this example is just showing the usage of "ConnectedEnvironmentsCertificates_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppConnectedEnvironmentCertificateResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppConnectedEnvironmentCertificateResource.cs index eab090a7f520..f815135a0a8c 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppConnectedEnvironmentCertificateResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppConnectedEnvironmentCertificateResource.cs @@ -23,7 +23,7 @@ public partial class Sample_ContainerAppConnectedEnvironmentCertificateResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetCertificate() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsCertificate_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificate_Get.json // this example is just showing the usage of "ConnectedEnvironmentsCertificates_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_GetCertificate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteCertificate() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsCertificate_Delete.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificate_Delete.json // this example is just showing the usage of "ConnectedEnvironmentsCertificates_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -83,7 +83,7 @@ public async Task Delete_DeleteCertificate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_PatchCertificate() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsCertificates_Patch.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificates_Patch.json // this example is just showing the usage of "ConnectedEnvironmentsCertificates_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppConnectedEnvironmentCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppConnectedEnvironmentCollection.cs index ad8c2772328c..750a99d19783 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppConnectedEnvironmentCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppConnectedEnvironmentCollection.cs @@ -25,7 +25,7 @@ public partial class Sample_ContainerAppConnectedEnvironmentCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListEnvironmentsByResourceGroup() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironments_ListByResourceGroup.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_ListByResourceGroup.json // this example is just showing the usage of "ConnectedEnvironments_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -61,7 +61,7 @@ public async Task GetAll_ListEnvironmentsByResourceGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetConnectedEnvironmentByConnectedEnvironmentName() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironments_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_Get.json // this example is just showing the usage of "ConnectedEnvironments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -95,7 +95,7 @@ public async Task Get_GetConnectedEnvironmentByConnectedEnvironmentName() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetConnectedEnvironmentByConnectedEnvironmentName() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironments_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_Get.json // this example is just showing the usage of "ConnectedEnvironments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -125,7 +125,7 @@ public async Task Exists_GetConnectedEnvironmentByConnectedEnvironmentName() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateKubeEnvironments() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironments_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_CreateOrUpdate.json // this example is just showing the usage of "ConnectedEnvironments_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -147,11 +147,6 @@ public async Task CreateOrUpdate_CreateKubeEnvironments() string connectedEnvironmentName = "testenv"; ContainerAppConnectedEnvironmentData data = new ContainerAppConnectedEnvironmentData(new AzureLocation("East US")) { - ExtendedLocation = new ContainerAppExtendedLocation() - { - Name = "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation", - ExtendedLocationType = ContainerAppExtendedLocationType.CustomLocation, - }, StaticIP = IPAddress.Parse("1.2.3.4"), DaprAIConnectionString = "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/", CustomDomainConfiguration = new ContainerAppCustomDomainConfiguration() diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppConnectedEnvironmentDaprComponentCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppConnectedEnvironmentDaprComponentCollection.cs index 83968136fcf1..1c712048165e 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppConnectedEnvironmentDaprComponentCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppConnectedEnvironmentDaprComponentCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_ContainerAppConnectedEnvironmentDaprComponentCollect [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListDaprComponents() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsDaprComponents_List.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_List.json // this example is just showing the usage of "ConnectedEnvironmentsDaprComponents_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +60,7 @@ public async Task GetAll_ListDaprComponents() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDaprComponent() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsDaprComponents_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_Get.json // this example is just showing the usage of "ConnectedEnvironmentsDaprComponents_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -95,7 +95,7 @@ public async Task Get_GetDaprComponent() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetDaprComponent() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsDaprComponents_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_Get.json // this example is just showing the usage of "ConnectedEnvironmentsDaprComponents_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,7 +126,7 @@ public async Task Exists_GetDaprComponent() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateDaprComponent() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json // this example is just showing the usage of "ConnectedEnvironmentsDaprComponents_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppConnectedEnvironmentDaprComponentResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppConnectedEnvironmentDaprComponentResource.cs index 3d5b78f88938..b8fe19f389da 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppConnectedEnvironmentDaprComponentResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppConnectedEnvironmentDaprComponentResource.cs @@ -23,7 +23,7 @@ public partial class Sample_ContainerAppConnectedEnvironmentDaprComponentResourc [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDaprComponent() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsDaprComponents_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_Get.json // this example is just showing the usage of "ConnectedEnvironmentsDaprComponents_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_GetDaprComponent() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateDaprComponent() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json // this example is just showing the usage of "ConnectedEnvironmentsDaprComponents_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -127,7 +127,7 @@ public async Task Update_CreateOrUpdateDaprComponent() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteDaprComponent() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsDaprComponents_Delete.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_Delete.json // this example is just showing the usage of "ConnectedEnvironmentsDaprComponents_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -155,7 +155,7 @@ public async Task Delete_DeleteDaprComponent() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetSecrets_ListContainerAppsSecrets() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json // this example is just showing the usage of "ConnectedEnvironmentsDaprComponents_ListSecrets" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppConnectedEnvironmentResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppConnectedEnvironmentResource.cs index 2b7d37191599..5e16d904195b 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppConnectedEnvironmentResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppConnectedEnvironmentResource.cs @@ -24,7 +24,7 @@ public partial class Sample_ContainerAppConnectedEnvironmentResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetContainerAppConnectedEnvironments_ListConnectedEnvironmentsBySubscription() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironments_ListBySubscription.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_ListBySubscription.json // this example is just showing the usage of "ConnectedEnvironments_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetContainerAppConnectedEnvironments_ListConnectedEnvironments [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetConnectedEnvironmentByConnectedEnvironmentName() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironments_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_Get.json // this example is just showing the usage of "ConnectedEnvironments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -87,7 +87,7 @@ public async Task Get_GetConnectedEnvironmentByConnectedEnvironmentName() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteConnectedEnvironmentByConnectedEnvironmentName() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironments_Delete.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_Delete.json // this example is just showing the usage of "ConnectedEnvironments_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -114,7 +114,7 @@ public async Task Delete_DeleteConnectedEnvironmentByConnectedEnvironmentName() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_PatchManagedEnvironment() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironments_Patch.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_Patch.json // this example is just showing the usage of "ConnectedEnvironments_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -145,7 +145,7 @@ public async Task Update_PatchManagedEnvironment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CheckNameAvailability_CertificatesCheckNameAvailability() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json // this example is just showing the usage of "ConnectedEnvironments_CheckNameAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppConnectedEnvironmentStorageCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppConnectedEnvironmentStorageCollection.cs index 7aa3cdd4d8de..fcaabb16076d 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppConnectedEnvironmentStorageCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppConnectedEnvironmentStorageCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_ContainerAppConnectedEnvironmentStorageCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListEnvironmentsStoragesBySubscription() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsStorages_List.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_List.json // this example is just showing the usage of "ConnectedEnvironmentsStorages_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +60,7 @@ public async Task GetAll_ListEnvironmentsStoragesBySubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAEnvironmentsStoragePropertiesBySubscription() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsStorages_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_Get.json // this example is just showing the usage of "ConnectedEnvironmentsStorages_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -95,7 +95,7 @@ public async Task Get_GetAEnvironmentsStoragePropertiesBySubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAEnvironmentsStoragePropertiesBySubscription() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsStorages_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_Get.json // this example is just showing the usage of "ConnectedEnvironmentsStorages_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,7 +126,7 @@ public async Task Exists_GetAEnvironmentsStoragePropertiesBySubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateEnvironmentsStorage() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json // this example is just showing the usage of "ConnectedEnvironmentsStorages_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppConnectedEnvironmentStorageResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppConnectedEnvironmentStorageResource.cs index ec66b5979aca..cd1bb7ba0249 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppConnectedEnvironmentStorageResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppConnectedEnvironmentStorageResource.cs @@ -23,7 +23,7 @@ public partial class Sample_ContainerAppConnectedEnvironmentStorageResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAEnvironmentsStoragePropertiesBySubscription() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsStorages_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_Get.json // this example is just showing the usage of "ConnectedEnvironmentsStorages_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_GetAEnvironmentsStoragePropertiesBySubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateEnvironmentsStorage() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json // this example is just showing the usage of "ConnectedEnvironmentsStorages_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -98,7 +98,7 @@ public async Task Update_CreateOrUpdateEnvironmentsStorage() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ListEnvironmentsStoragesBySubscription() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsStorages_Delete.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_Delete.json // this example is just showing the usage of "ConnectedEnvironmentsStorages_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppDetectorCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppDetectorCollection.cs index 82433f6bfbe9..06f7424f2f35 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppDetectorCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppDetectorCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_ContainerAppDetectorCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetTheListOfAvailableDiagnosticsForAGivenContainerApp() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerAppsDiagnostics_List.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerAppsDiagnostics_List.json // this example is just showing the usage of "ContainerAppsDiagnostics_ListDetectors" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,7 +58,7 @@ public async Task GetAll_GetTheListOfAvailableDiagnosticsForAGivenContainerApp() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetContainerAppSDiagnosticsInfo() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerAppsDiagnostics_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerAppsDiagnostics_Get.json // this example is just showing the usage of "ContainerAppsDiagnostics_GetDetector" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -93,7 +93,7 @@ public async Task Get_GetContainerAppSDiagnosticsInfo() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetContainerAppSDiagnosticsInfo() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerAppsDiagnostics_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerAppsDiagnostics_Get.json // this example is just showing the usage of "ContainerAppsDiagnostics_GetDetector" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppDetectorPropertyResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppDetectorPropertyResource.cs index 324a93879b98..0e5191a27dd1 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppDetectorPropertyResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppDetectorPropertyResource.cs @@ -21,7 +21,7 @@ public partial class Sample_ContainerAppDetectorPropertyResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetContainerApp() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_Get.json // this example is just showing the usage of "ContainerAppsDiagnostics_GetRoot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppDetectorPropertyRevisionCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppDetectorPropertyRevisionCollection.cs index 245315f5202d..24da2be71167 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppDetectorPropertyRevisionCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppDetectorPropertyRevisionCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_ContainerAppDetectorPropertyRevisionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListContainerAppSRevisions() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Revisions_List.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_List.json // this example is just showing the usage of "ContainerAppsDiagnostics_ListRevisions" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,7 +58,7 @@ public async Task GetAll_ListContainerAppSRevisions() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetContainerAppSRevision() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Revisions_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_Get.json // this example is just showing the usage of "ContainerAppsDiagnostics_GetRevision" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -93,7 +93,7 @@ public async Task Get_GetContainerAppSRevision() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetContainerAppSRevision() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Revisions_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_Get.json // this example is just showing the usage of "ContainerAppsDiagnostics_GetRevision" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppDetectorPropertyRevisionResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppDetectorPropertyRevisionResource.cs index 05b0a1a61346..84a877594e64 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppDetectorPropertyRevisionResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppDetectorPropertyRevisionResource.cs @@ -21,7 +21,7 @@ public partial class Sample_ContainerAppDetectorPropertyRevisionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetContainerAppSRevision() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Revisions_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_Get.json // this example is just showing the usage of "ContainerAppsDiagnostics_GetRevision" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppDetectorResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppDetectorResource.cs index e6499ed36360..597311bf30f1 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppDetectorResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppDetectorResource.cs @@ -21,7 +21,7 @@ public partial class Sample_ContainerAppDetectorResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetContainerAppSDiagnosticsInfo() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerAppsDiagnostics_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerAppsDiagnostics_Get.json // this example is just showing the usage of "ContainerAppsDiagnostics_GetDetector" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppJobCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppJobCollection.cs new file mode 100644 index 000000000000..f1ec9176438f --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppJobCollection.cs @@ -0,0 +1,219 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.AppContainers; +using Azure.ResourceManager.AppContainers.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.AppContainers.Samples +{ + public partial class Sample_ContainerAppJobCollection + { + // List Container Apps Jobs by resource group + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListContainerAppsJobsByResourceGroup() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Jobs_ListByResourceGroup.json + // this example is just showing the usage of "Jobs_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ContainerAppJobResource + ContainerAppJobCollection collection = resourceGroupResource.GetContainerAppJobs(); + + // invoke the operation and iterate over the result + await foreach (ContainerAppJobResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ContainerAppJobData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get Container Apps Job + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetContainerAppsJob() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Get.json + // this example is just showing the usage of "Jobs_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ContainerAppJobResource + ContainerAppJobCollection collection = resourceGroupResource.GetContainerAppJobs(); + + // invoke the operation + string jobName = "testcontainerAppsJob0"; + ContainerAppJobResource result = await collection.GetAsync(jobName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ContainerAppJobData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get Container Apps Job + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetContainerAppsJob() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Get.json + // this example is just showing the usage of "Jobs_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ContainerAppJobResource + ContainerAppJobCollection collection = resourceGroupResource.GetContainerAppJobs(); + + // invoke the operation + string jobName = "testcontainerAppsJob0"; + bool result = await collection.ExistsAsync(jobName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Create or Update Container Apps Job + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateContainerAppsJob() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_CreateorUpdate.json + // this example is just showing the usage of "Jobs_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ContainerAppJobResource + ContainerAppJobCollection collection = resourceGroupResource.GetContainerAppJobs(); + + // invoke the operation + string jobName = "testcontainerAppsJob0"; + ContainerAppJobData data = new ContainerAppJobData(new AzureLocation("East US")) + { + EnvironmentId = "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", + Configuration = new ContainerAppJobConfiguration(ContainerAppJobTriggerType.Manual, 10) + { + ReplicaRetryLimit = 10, + ManualTriggerConfig = new JobConfigurationManualTriggerConfig() + { + ReplicaCompletionCount = 1, + Parallelism = 4, + }, + }, + Template = new ContainerAppJobTemplate() + { + InitContainers = +{ +new ContainerAppInitContainer() +{ +Image = "repo/testcontainerAppsJob0:v4", +Name = "testinitcontainerAppsJob0", +Command = +{ +"/bin/sh" +}, +Args = +{ +"-c","while true; do echo hello; sleep 10;done" +}, +Resources = new AppContainerResources() +{ +Cpu = 0.2, +Memory = "100Mi", +}, +} +}, + Containers = +{ +new ContainerAppContainer() +{ +Probes = +{ +new ContainerAppProbe() +{ +HttpGet = new ContainerAppHttpRequestInfo(8080) +{ +HttpHeaders = +{ +new ContainerAppHttpHeaderInfo("Custom-Header","Awesome") +}, +Path = "/health", +}, +InitialDelaySeconds = 5, +PeriodSeconds = 3, +ProbeType = ContainerAppProbeType.Liveness, +} +}, +Image = "repo/testcontainerAppsJob0:v1", +Name = "testcontainerAppsJob0", +} +}, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, jobName, data); + ContainerAppJobResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ContainerAppJobData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppJobResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppJobResource.cs new file mode 100644 index 000000000000..43f2e806c056 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppJobResource.cs @@ -0,0 +1,402 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.AppContainers; +using Azure.ResourceManager.AppContainers.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.AppContainers.Samples +{ + public partial class Sample_ContainerAppJobResource + { + // List Container Apps Jobs by subscription + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetContainerAppJobs_ListContainerAppsJobsBySubscription() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Jobs_ListBySubscription.json + // this example is just showing the usage of "Jobs_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (ContainerAppJobResource item in subscriptionResource.GetContainerAppJobsAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ContainerAppJobData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get Container Apps Job + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetContainerAppsJob() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Get.json + // this example is just showing the usage of "Jobs_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppJobResource created on azure + // for more information of creating ContainerAppJobResource, please refer to the document of ContainerAppJobResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string jobName = "testcontainerAppsJob0"; + ResourceIdentifier containerAppJobResourceId = ContainerAppJobResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, jobName); + ContainerAppJobResource containerAppJob = client.GetContainerAppJobResource(containerAppJobResourceId); + + // invoke the operation + ContainerAppJobResource result = await containerAppJob.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ContainerAppJobData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Delete Container Apps Job + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteContainerAppsJob() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Delete.json + // this example is just showing the usage of "Jobs_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppJobResource created on azure + // for more information of creating ContainerAppJobResource, please refer to the document of ContainerAppJobResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string jobName = "testWorkerContainerAppsJob0"; + ResourceIdentifier containerAppJobResourceId = ContainerAppJobResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, jobName); + ContainerAppJobResource containerAppJob = client.GetContainerAppJobResource(containerAppJobResourceId); + + // invoke the operation + await containerAppJob.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // Patch Container Apps Job + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_PatchContainerAppsJob() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Patch.json + // this example is just showing the usage of "Jobs_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppJobResource created on azure + // for more information of creating ContainerAppJobResource, please refer to the document of ContainerAppJobResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string jobName = "testcontainerAppsJob0"; + ResourceIdentifier containerAppJobResourceId = ContainerAppJobResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, jobName); + ContainerAppJobResource containerAppJob = client.GetContainerAppJobResource(containerAppJobResourceId); + + // invoke the operation + ContainerAppJobPatch patch = new ContainerAppJobPatch() + { + Properties = new ContainerAppJobPatchProperties() + { + Configuration = new ContainerAppJobConfiguration(ContainerAppJobTriggerType.Manual, 10) + { + ReplicaRetryLimit = 10, + ManualTriggerConfig = new JobConfigurationManualTriggerConfig() + { + ReplicaCompletionCount = 1, + Parallelism = 4, + }, + }, + Template = new ContainerAppJobTemplate() + { + InitContainers = +{ +new ContainerAppInitContainer() +{ +Image = "repo/testcontainerAppsJob0:v4", +Name = "testinitcontainerAppsJob0", +Command = +{ +"/bin/sh" +}, +Args = +{ +"-c","while true; do echo hello; sleep 10;done" +}, +Resources = new AppContainerResources() +{ +Cpu = 0.2, +Memory = "100Mi", +}, +} +}, + Containers = +{ +new ContainerAppContainer() +{ +Probes = +{ +new ContainerAppProbe() +{ +HttpGet = new ContainerAppHttpRequestInfo(8080) +{ +HttpHeaders = +{ +new ContainerAppHttpHeaderInfo("Custom-Header","Awesome") +}, +Path = "/health", +}, +InitialDelaySeconds = 3, +PeriodSeconds = 3, +ProbeType = ContainerAppProbeType.Liveness, +} +}, +Image = "repo/testcontainerAppsJob0:v1", +Name = "testcontainerAppsJob0", +} +}, + }, + }, + }; + ArmOperation lro = await containerAppJob.UpdateAsync(WaitUntil.Completed, patch); + ContainerAppJobResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ContainerAppJobData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Run a Container Apps Job + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Start_RunAContainerAppsJob() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Start.json + // this example is just showing the usage of "Jobs_Start" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppJobResource created on azure + // for more information of creating ContainerAppJobResource, please refer to the document of ContainerAppJobResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string jobName = "testcontainerAppsJob0"; + ResourceIdentifier containerAppJobResourceId = ContainerAppJobResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, jobName); + ContainerAppJobResource containerAppJob = client.GetContainerAppJobResource(containerAppJobResourceId); + + // invoke the operation + ContainerAppJobExecutionTemplate template = new ContainerAppJobExecutionTemplate() + { + Containers = +{ +new JobExecutionContainer() +{ +Image = "repo/testcontainerAppsJob0:v4", +Name = "testcontainerAppsJob0", +Resources = new AppContainerResources() +{ +Cpu = 0.2, +Memory = "100Mi", +}, +} +}, + InitContainers = +{ +new JobExecutionContainer() +{ +Image = "repo/testcontainerAppsJob0:v4", +Name = "testinitcontainerAppsJob0", +Command = +{ +"/bin/sh" +}, +Args = +{ +"-c","while true; do echo hello; sleep 10;done" +}, +Resources = new AppContainerResources() +{ +Cpu = 0.2, +Memory = "100Mi", +}, +} +}, + }; + ArmOperation lro = await containerAppJob.StartAsync(WaitUntil.Completed, template); + ContainerAppJobExecutionBase result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + // Terminate a Container Apps Job + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task StopExecution_TerminateAContainerAppsJob() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Stop_Execution.json + // this example is just showing the usage of "Jobs_StopExecution" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppJobResource created on azure + // for more information of creating ContainerAppJobResource, please refer to the document of ContainerAppJobResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string jobName = "testcontainerAppsJob0"; + ResourceIdentifier containerAppJobResourceId = ContainerAppJobResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, jobName); + ContainerAppJobResource containerAppJob = client.GetContainerAppJobResource(containerAppJobResourceId); + + // invoke the operation + string jobExecutionName = "jobExecution1"; + await containerAppJob.StopExecutionAsync(WaitUntil.Completed, jobExecutionName); + + Console.WriteLine($"Succeeded"); + } + + // Terminate Multiple Container Apps Job + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task StopMultipleExecutions_TerminateMultipleContainerAppsJob() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Stop_Multiple.json + // this example is just showing the usage of "Jobs_StopMultipleExecutions" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppJobResource created on azure + // for more information of creating ContainerAppJobResource, please refer to the document of ContainerAppJobResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string jobName = "testcontainerAppsJob0"; + ResourceIdentifier containerAppJobResourceId = ContainerAppJobResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, jobName); + ContainerAppJobResource containerAppJob = client.GetContainerAppJobResource(containerAppJobResourceId); + + // invoke the operation + JobExecutionNamesCollection jobExecutionName = new JobExecutionNamesCollection(new ContainerAppJobExecutionBase[] + { +new ContainerAppJobExecutionBase() +{ +Name = "jobExecution-27944453", +},new ContainerAppJobExecutionBase() +{ +Name = "jobExecution-27944452", +},new ContainerAppJobExecutionBase() +{ +Name = "jobExecution-27944451", +} + }); + ArmOperation lro = await containerAppJob.StopMultipleExecutionsAsync(WaitUntil.Completed, jobExecutionName); + ContainerAppJobExecutions result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + // List Container Apps Job Secrets + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetSecrets_ListContainerAppsJobSecrets() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_ListSecrets.json + // this example is just showing the usage of "Jobs_ListSecrets" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppJobResource created on azure + // for more information of creating ContainerAppJobResource, please refer to the document of ContainerAppJobResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string jobName = "testcontainerAppsJob0"; + ResourceIdentifier containerAppJobResourceId = ContainerAppJobResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, jobName); + ContainerAppJobResource containerAppJob = client.GetContainerAppJobResource(containerAppJobResourceId); + + // invoke the operation and iterate over the result + await foreach (ContainerAppWritableSecret item in containerAppJob.GetSecretsAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get a Container Apps Job Executions + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetJobsExecutions_GetAContainerAppsJobExecutions() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Executions_Get.json + // this example is just showing the usage of "JobsExecutions_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppJobResource created on azure + // for more information of creating ContainerAppJobResource, please refer to the document of ContainerAppJobResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string jobName = "testcontainerAppsJob0"; + ResourceIdentifier containerAppJobResourceId = ContainerAppJobResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, jobName); + ContainerAppJobResource containerAppJob = client.GetContainerAppJobResource(containerAppJobResourceId); + + // invoke the operation and iterate over the result + await foreach (ContainerAppJobExecution item in containerAppJob.GetJobsExecutionsAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedCertificateCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedCertificateCollection.cs new file mode 100644 index 000000000000..2f1dd60cd4c1 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedCertificateCollection.cs @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.AppContainers; +using Azure.ResourceManager.AppContainers.Models; + +namespace Azure.ResourceManager.AppContainers.Samples +{ + public partial class Sample_ContainerAppManagedCertificateCollection + { + // Get Certificate + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetCertificate() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificate_Get.json + // this example is just showing the usage of "ManagedCertificates_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppManagedEnvironmentResource created on azure + // for more information of creating ContainerAppManagedEnvironmentResource, please refer to the document of ContainerAppManagedEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "examplerg"; + string environmentName = "testcontainerenv"; + ResourceIdentifier containerAppManagedEnvironmentResourceId = ContainerAppManagedEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName); + ContainerAppManagedEnvironmentResource containerAppManagedEnvironment = client.GetContainerAppManagedEnvironmentResource(containerAppManagedEnvironmentResourceId); + + // get the collection of this ContainerAppManagedCertificateResource + ContainerAppManagedCertificateCollection collection = containerAppManagedEnvironment.GetContainerAppManagedCertificates(); + + // invoke the operation + string managedCertificateName = "certificate-firendly-name"; + ContainerAppManagedCertificateResource result = await collection.GetAsync(managedCertificateName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ContainerAppManagedCertificateData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get Certificate + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetCertificate() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificate_Get.json + // this example is just showing the usage of "ManagedCertificates_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppManagedEnvironmentResource created on azure + // for more information of creating ContainerAppManagedEnvironmentResource, please refer to the document of ContainerAppManagedEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "examplerg"; + string environmentName = "testcontainerenv"; + ResourceIdentifier containerAppManagedEnvironmentResourceId = ContainerAppManagedEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName); + ContainerAppManagedEnvironmentResource containerAppManagedEnvironment = client.GetContainerAppManagedEnvironmentResource(containerAppManagedEnvironmentResourceId); + + // get the collection of this ContainerAppManagedCertificateResource + ContainerAppManagedCertificateCollection collection = containerAppManagedEnvironment.GetContainerAppManagedCertificates(); + + // invoke the operation + string managedCertificateName = "certificate-firendly-name"; + bool result = await collection.ExistsAsync(managedCertificateName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Create or Update Certificate + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateCertificate() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificate_CreateOrUpdate.json + // this example is just showing the usage of "ManagedCertificates_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppManagedEnvironmentResource created on azure + // for more information of creating ContainerAppManagedEnvironmentResource, please refer to the document of ContainerAppManagedEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "examplerg"; + string environmentName = "testcontainerenv"; + ResourceIdentifier containerAppManagedEnvironmentResourceId = ContainerAppManagedEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName); + ContainerAppManagedEnvironmentResource containerAppManagedEnvironment = client.GetContainerAppManagedEnvironmentResource(containerAppManagedEnvironmentResourceId); + + // get the collection of this ContainerAppManagedCertificateResource + ContainerAppManagedCertificateCollection collection = containerAppManagedEnvironment.GetContainerAppManagedCertificates(); + + // invoke the operation + string managedCertificateName = "certificate-firendly-name"; + ContainerAppManagedCertificateData data = new ContainerAppManagedCertificateData(new AzureLocation("East US")) + { + Properties = new ManagedCertificateProperties() + { + SubjectName = "my-subject-name.company.country.net", + DomainControlValidation = ManagedCertificateDomainControlValidation.Cname, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, managedCertificateName, data); + ContainerAppManagedCertificateResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ContainerAppManagedCertificateData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // List Managed Certificates by Managed Environment + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListManagedCertificatesByManagedEnvironment() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificates_ListByManagedEnvironment.json + // this example is just showing the usage of "ManagedCertificates_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppManagedEnvironmentResource created on azure + // for more information of creating ContainerAppManagedEnvironmentResource, please refer to the document of ContainerAppManagedEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "examplerg"; + string environmentName = "testcontainerenv"; + ResourceIdentifier containerAppManagedEnvironmentResourceId = ContainerAppManagedEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName); + ContainerAppManagedEnvironmentResource containerAppManagedEnvironment = client.GetContainerAppManagedEnvironmentResource(containerAppManagedEnvironmentResourceId); + + // get the collection of this ContainerAppManagedCertificateResource + ContainerAppManagedCertificateCollection collection = containerAppManagedEnvironment.GetContainerAppManagedCertificates(); + + // invoke the operation and iterate over the result + await foreach (ContainerAppManagedCertificateResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ContainerAppManagedCertificateData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedCertificateResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedCertificateResource.cs new file mode 100644 index 000000000000..697a1b60e6b6 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedCertificateResource.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.AppContainers; +using Azure.ResourceManager.AppContainers.Models; + +namespace Azure.ResourceManager.AppContainers.Samples +{ + public partial class Sample_ContainerAppManagedCertificateResource + { + // Get Certificate + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetCertificate() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificate_Get.json + // this example is just showing the usage of "ManagedCertificates_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppManagedCertificateResource created on azure + // for more information of creating ContainerAppManagedCertificateResource, please refer to the document of ContainerAppManagedCertificateResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "examplerg"; + string environmentName = "testcontainerenv"; + string managedCertificateName = "certificate-firendly-name"; + ResourceIdentifier containerAppManagedCertificateResourceId = ContainerAppManagedCertificateResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName, managedCertificateName); + ContainerAppManagedCertificateResource containerAppManagedCertificate = client.GetContainerAppManagedCertificateResource(containerAppManagedCertificateResourceId); + + // invoke the operation + ContainerAppManagedCertificateResource result = await containerAppManagedCertificate.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ContainerAppManagedCertificateData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Delete Certificate + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteCertificate() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificate_Delete.json + // this example is just showing the usage of "ManagedCertificates_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppManagedCertificateResource created on azure + // for more information of creating ContainerAppManagedCertificateResource, please refer to the document of ContainerAppManagedCertificateResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "examplerg"; + string environmentName = "testcontainerenv"; + string managedCertificateName = "certificate-firendly-name"; + ResourceIdentifier containerAppManagedCertificateResourceId = ContainerAppManagedCertificateResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName, managedCertificateName); + ContainerAppManagedCertificateResource containerAppManagedCertificate = client.GetContainerAppManagedCertificateResource(containerAppManagedCertificateResourceId); + + // invoke the operation + await containerAppManagedCertificate.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // Patch Managed Certificate + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_PatchManagedCertificate() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificates_Patch.json + // this example is just showing the usage of "ManagedCertificates_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppManagedCertificateResource created on azure + // for more information of creating ContainerAppManagedCertificateResource, please refer to the document of ContainerAppManagedCertificateResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "examplerg"; + string environmentName = "testcontainerenv"; + string managedCertificateName = "certificate-firendly-name"; + ResourceIdentifier containerAppManagedCertificateResourceId = ContainerAppManagedCertificateResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName, managedCertificateName); + ContainerAppManagedCertificateResource containerAppManagedCertificate = client.GetContainerAppManagedCertificateResource(containerAppManagedCertificateResourceId); + + // invoke the operation + ContainerAppManagedCertificatePatch patch = new ContainerAppManagedCertificatePatch() + { + Tags = +{ +["tag1"] = "value1", +["tag2"] = "value2", +}, + }; + ContainerAppManagedCertificateResource result = await containerAppManagedCertificate.UpdateAsync(patch); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ContainerAppManagedCertificateData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedEnvironmentCertificateCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedEnvironmentCertificateCollection.cs index b3068c24cc03..24440116c00e 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedEnvironmentCertificateCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedEnvironmentCertificateCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_ContainerAppManagedEnvironmentCertificateCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListCertificatesByManagedEnvironment() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Certificates_ListByManagedEnvironment.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Certificates_ListByManagedEnvironment.json // this example is just showing the usage of "Certificates_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +60,7 @@ public async Task GetAll_ListCertificatesByManagedEnvironment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetCertificate() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Certificate_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Certificate_Get.json // this example is just showing the usage of "Certificates_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -95,7 +95,7 @@ public async Task Get_GetCertificate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetCertificate() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Certificate_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Certificate_Get.json // this example is just showing the usage of "Certificates_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,7 +126,7 @@ public async Task Exists_GetCertificate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateCertificate() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Certificate_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Certificate_CreateOrUpdate.json // this example is just showing the usage of "Certificates_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedEnvironmentCertificateResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedEnvironmentCertificateResource.cs index a57f23f4f745..7907368535c2 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedEnvironmentCertificateResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedEnvironmentCertificateResource.cs @@ -23,7 +23,7 @@ public partial class Sample_ContainerAppManagedEnvironmentCertificateResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetCertificate() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Certificate_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Certificate_Get.json // this example is just showing the usage of "Certificates_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_GetCertificate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteCertificate() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Certificate_Delete.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Certificate_Delete.json // this example is just showing the usage of "Certificates_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -83,7 +83,7 @@ public async Task Delete_DeleteCertificate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_PatchCertificate() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Certificates_Patch.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Certificates_Patch.json // this example is just showing the usage of "Certificates_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedEnvironmentCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedEnvironmentCollection.cs index eba4e1af8544..10b0223ccf5e 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedEnvironmentCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedEnvironmentCollection.cs @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Net; using System.Threading.Tasks; using Azure; using Azure.Core; @@ -25,7 +24,7 @@ public partial class Sample_ContainerAppManagedEnvironmentCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListEnvironmentsByResourceGroup() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironments_ListByResourceGroup.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json // this example is just showing the usage of "ManagedEnvironments_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -61,7 +60,7 @@ public async Task GetAll_ListEnvironmentsByResourceGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetEnvironmentsByName() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironments_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_Get.json // this example is just showing the usage of "ManagedEnvironments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -95,7 +94,7 @@ public async Task Get_GetEnvironmentsByName() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetEnvironmentsByName() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironments_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_Get.json // this example is just showing the usage of "ManagedEnvironments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -120,12 +119,12 @@ public async Task Exists_GetEnvironmentsByName() Console.WriteLine($"Succeeded: {result}"); } - // Create environments + // Create environment with custom infrastructureResourceGroup [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CreateOrUpdate_CreateEnvironments() + public async Task CreateOrUpdate_CreateEnvironmentWithCustomInfrastructureResourceGroup() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironments_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_CustomInfrastructureResourceGroup_Create.json // this example is just showing the usage of "ManagedEnvironments_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -147,17 +146,86 @@ public async Task CreateOrUpdate_CreateEnvironments() string environmentName = "testcontainerenv"; ContainerAppManagedEnvironmentData data = new ContainerAppManagedEnvironmentData(new AzureLocation("East US")) { - Kind = "serverless", - SkuName = AppContainersSkuName.Premium, DaprAIConnectionString = "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/", VnetConfiguration = new ContainerAppVnetConfiguration() { - OutboundSettings = new ContainerAppManagedEnvironmentOutboundSettings() + InfrastructureSubnetId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/RGName/providers/Microsoft.Network/virtualNetworks/VNetName/subnets/subnetName1"), + }, + AppLogsConfiguration = new ContainerAppLogsConfiguration() + { + LogAnalyticsConfiguration = new ContainerAppLogAnalyticsConfiguration() { - OutBoundType = ContainerAppManagedEnvironmentOutBoundType.UserDefinedRouting, - VirtualNetworkApplianceIP = IPAddress.Parse("192.168.1.20"), + CustomerId = "string", + SharedKey = "string", }, }, + IsZoneRedundant = true, + CustomDomainConfiguration = new ContainerAppCustomDomainConfiguration() + { + DnsSuffix = "www.my-name.com", + CertificateValue = Convert.FromBase64String("Y2VydA=="), + CertificatePassword = "1234", + }, + WorkloadProfiles = +{ +new ContainerAppWorkloadProfile("My-GP-01","GeneralPurpose") +{ +MinimumNodeCount = 3, +MaximumNodeCount = 12, +},new ContainerAppWorkloadProfile("My-MO-01","MemoryOptimized") +{ +MinimumNodeCount = 3, +MaximumNodeCount = 6, +},new ContainerAppWorkloadProfile("My-CO-01","ComputeOptimized") +{ +MinimumNodeCount = 3, +MaximumNodeCount = 6, +},new ContainerAppWorkloadProfile("My-consumption-01","Consumption") +}, + InfrastructureResourceGroup = "myInfrastructureRgName", + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, environmentName, data); + ContainerAppManagedEnvironmentResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ContainerAppManagedEnvironmentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Create environments + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateEnvironments() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json + // this example is just showing the usage of "ManagedEnvironments_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "examplerg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ContainerAppManagedEnvironmentResource + ContainerAppManagedEnvironmentCollection collection = resourceGroupResource.GetContainerAppManagedEnvironments(); + + // invoke the operation + string environmentName = "testcontainerenv"; + ContainerAppManagedEnvironmentData data = new ContainerAppManagedEnvironmentData(new AzureLocation("East US")) + { + DaprAIConnectionString = "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/", + VnetConfiguration = new ContainerAppVnetConfiguration() + { + InfrastructureSubnetId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/RGName/providers/Microsoft.Network/virtualNetworks/VNetName/subnets/subnetName1"), + }, AppLogsConfiguration = new ContainerAppLogsConfiguration() { LogAnalyticsConfiguration = new ContainerAppLogAnalyticsConfiguration() @@ -171,11 +239,23 @@ public async Task CreateOrUpdate_CreateEnvironments() { DnsSuffix = "www.my-name.com", CertificateValue = Convert.FromBase64String("Y2VydA=="), - CertificatePassword = "private key password", + CertificatePassword = "1234", }, WorkloadProfiles = { -new ContainerAppWorkloadProfile("GeneralPurpose",3,12),new ContainerAppWorkloadProfile("MemoryOptimized",3,6),new ContainerAppWorkloadProfile("ComputeOptimized",3,6) +new ContainerAppWorkloadProfile("My-GP-01","GeneralPurpose") +{ +MinimumNodeCount = 3, +MaximumNodeCount = 12, +},new ContainerAppWorkloadProfile("My-MO-01","MemoryOptimized") +{ +MinimumNodeCount = 3, +MaximumNodeCount = 6, +},new ContainerAppWorkloadProfile("My-CO-01","ComputeOptimized") +{ +MinimumNodeCount = 3, +MaximumNodeCount = 6, +},new ContainerAppWorkloadProfile("My-consumption-01","Consumption") }, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, environmentName, data); diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedEnvironmentDaprComponentCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedEnvironmentDaprComponentCollection.cs index eea3ca7048a5..1bc1f6d0f808 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedEnvironmentDaprComponentCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedEnvironmentDaprComponentCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_ContainerAppManagedEnvironmentDaprComponentCollectio [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListDaprComponents() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/DaprComponents_List.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_List.json // this example is just showing the usage of "DaprComponents_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +60,7 @@ public async Task GetAll_ListDaprComponents() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDaprComponentWithSecretStoreComponent() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/DaprComponents_Get_SecretStoreComponent.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_Get_SecretStoreComponent.json // this example is just showing the usage of "DaprComponents_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -95,7 +95,7 @@ public async Task Get_GetDaprComponentWithSecretStoreComponent() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetDaprComponentWithSecretStoreComponent() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/DaprComponents_Get_SecretStoreComponent.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_Get_SecretStoreComponent.json // this example is just showing the usage of "DaprComponents_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,7 +126,7 @@ public async Task Exists_GetDaprComponentWithSecretStoreComponent() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDaprComponentWithSecrets() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/DaprComponents_Get_Secrets.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_Get_Secrets.json // this example is just showing the usage of "DaprComponents_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -161,7 +161,7 @@ public async Task Get_GetDaprComponentWithSecrets() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetDaprComponentWithSecrets() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/DaprComponents_Get_Secrets.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_Get_Secrets.json // this example is just showing the usage of "DaprComponents_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -192,7 +192,7 @@ public async Task Exists_GetDaprComponentWithSecrets() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateDaprComponentWithSecretStoreComponent() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json // this example is just showing the usage of "DaprComponents_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -260,7 +260,7 @@ public async Task CreateOrUpdate_CreateOrUpdateDaprComponentWithSecretStoreCompo [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateDaprComponentWithSecrets() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/DaprComponents_CreateOrUpdate_Secrets.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_CreateOrUpdate_Secrets.json // this example is just showing the usage of "DaprComponents_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedEnvironmentDaprComponentResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedEnvironmentDaprComponentResource.cs index 7c622d03c47b..b16e3ac29b5b 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedEnvironmentDaprComponentResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedEnvironmentDaprComponentResource.cs @@ -23,7 +23,7 @@ public partial class Sample_ContainerAppManagedEnvironmentDaprComponentResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDaprComponentWithSecretStoreComponent() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/DaprComponents_Get_SecretStoreComponent.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_Get_SecretStoreComponent.json // this example is just showing the usage of "DaprComponents_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_GetDaprComponentWithSecretStoreComponent() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDaprComponentWithSecrets() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/DaprComponents_Get_Secrets.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_Get_Secrets.json // this example is just showing the usage of "DaprComponents_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -87,7 +87,7 @@ public async Task Get_GetDaprComponentWithSecrets() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateDaprComponentWithSecretStoreComponent() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json // this example is just showing the usage of "DaprComponents_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -152,7 +152,7 @@ public async Task Update_CreateOrUpdateDaprComponentWithSecretStoreComponent() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateDaprComponentWithSecrets() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/DaprComponents_CreateOrUpdate_Secrets.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_CreateOrUpdate_Secrets.json // this example is just showing the usage of "DaprComponents_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -224,7 +224,7 @@ public async Task Update_CreateOrUpdateDaprComponentWithSecrets() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteDaprComponent() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/DaprComponents_Delete.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_Delete.json // this example is just showing the usage of "DaprComponents_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -252,7 +252,7 @@ public async Task Delete_DeleteDaprComponent() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetSecrets_ListContainerAppsSecrets() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/DaprComponents_ListSecrets.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_ListSecrets.json // this example is just showing the usage of "DaprComponents_ListSecrets" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedEnvironmentDetectorCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedEnvironmentDetectorCollection.cs index 7d9391015654..9e0100118864 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedEnvironmentDetectorCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedEnvironmentDetectorCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_ContainerAppManagedEnvironmentDetectorCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetTheListOfAvailableDiagnosticDataForAManagedEnvironments() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironmentDiagnostics_List.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentDiagnostics_List.json // this example is just showing the usage of "ManagedEnvironmentDiagnostics_ListDetectors" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,7 +58,7 @@ public async Task GetAll_GetTheListOfAvailableDiagnosticDataForAManagedEnvironme [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDiagnosticDataForAManagedEnvironments() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironmentDiagnostics_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentDiagnostics_Get.json // this example is just showing the usage of "ManagedEnvironmentDiagnostics_GetDetector" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -93,7 +93,7 @@ public async Task Get_GetDiagnosticDataForAManagedEnvironments() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetDiagnosticDataForAManagedEnvironments() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironmentDiagnostics_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentDiagnostics_Get.json // this example is just showing the usage of "ManagedEnvironmentDiagnostics_GetDetector" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedEnvironmentDetectorResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedEnvironmentDetectorResource.cs index 7ccd16ecce4d..c4458e7381e5 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedEnvironmentDetectorResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedEnvironmentDetectorResource.cs @@ -21,7 +21,7 @@ public partial class Sample_ContainerAppManagedEnvironmentDetectorResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDiagnosticDataForAManagedEnvironments() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironmentDiagnostics_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentDiagnostics_Get.json // this example is just showing the usage of "ManagedEnvironmentDiagnostics_GetDetector" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedEnvironmentDetectorResourcePropertyResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedEnvironmentDetectorResourcePropertyResource.cs index fc81920464bf..24946683c4f8 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedEnvironmentDetectorResourcePropertyResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedEnvironmentDetectorResourcePropertyResource.cs @@ -21,7 +21,7 @@ public partial class Sample_ContainerAppManagedEnvironmentDetectorResourceProper [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetEnvironmentsByName() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironments_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_Get.json // this example is just showing the usage of "ManagedEnvironmentsDiagnostics_GetRoot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedEnvironmentResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedEnvironmentResource.cs index 50ac30322cff..7e57fa03e503 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedEnvironmentResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedEnvironmentResource.cs @@ -24,7 +24,7 @@ public partial class Sample_ContainerAppManagedEnvironmentResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetContainerAppManagedEnvironments_ListEnvironmentsBySubscription() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironments_ListBySubscription.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_ListBySubscription.json // this example is just showing the usage of "ManagedEnvironments_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetContainerAppManagedEnvironments_ListEnvironmentsBySubscript [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetEnvironmentsByName() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironments_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_Get.json // this example is just showing the usage of "ManagedEnvironments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -87,7 +87,7 @@ public async Task Get_GetEnvironmentsByName() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteEnvironmentByName() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironments_Delete.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_Delete.json // this example is just showing the usage of "ManagedEnvironments_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -114,7 +114,7 @@ public async Task Delete_DeleteEnvironmentByName() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_PatchManagedEnvironment() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironments_Patch.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_Patch.json // this example is just showing the usage of "ManagedEnvironments_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -154,7 +154,7 @@ public async Task Update_PatchManagedEnvironment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAuthToken_GetManagedEnvironmentAuthToken() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironments_GetAuthToken.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_GetAuthToken.json // this example is just showing the usage of "ManagedEnvironments_GetAuthToken" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -181,7 +181,7 @@ public async Task GetAuthToken_GetManagedEnvironmentAuthToken() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetWorkloadProfileStates_ListEnvironmentsBySubscription() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironments_ListWorkloadProfileStates.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_ListWorkloadProfileStates.json // this example is just showing the usage of "ManagedEnvironments_ListWorkloadProfileStates" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -211,7 +211,7 @@ public async Task GetWorkloadProfileStates_ListEnvironmentsBySubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CheckContainerAppNameAvailability_CertificatesCheckNameAvailability() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Certificates_CheckNameAvailability.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Certificates_CheckNameAvailability.json // this example is just showing the usage of "Namespaces_CheckNameAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -243,7 +243,7 @@ public async Task CheckContainerAppNameAvailability_CertificatesCheckNameAvailab [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CheckContainerAppNameAvailability_ContainerAppsCheckNameAvailability() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_CheckNameAvailability.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_CheckNameAvailability.json // this example is just showing the usage of "Namespaces_CheckNameAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedEnvironmentStorageCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedEnvironmentStorageCollection.cs index 60ccdb308e4a..a5ecc9ef38a5 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedEnvironmentStorageCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedEnvironmentStorageCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_ContainerAppManagedEnvironmentStorageCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListEnvironmentsStoragesBySubscription() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironmentsStorages_List.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentsStorages_List.json // this example is just showing the usage of "ManagedEnvironmentsStorages_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +60,7 @@ public async Task GetAll_ListEnvironmentsStoragesBySubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAEnvironmentsStoragePropertiesBySubscription() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironmentsStorages_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentsStorages_Get.json // this example is just showing the usage of "ManagedEnvironmentsStorages_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -95,7 +95,7 @@ public async Task Get_GetAEnvironmentsStoragePropertiesBySubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAEnvironmentsStoragePropertiesBySubscription() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironmentsStorages_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentsStorages_Get.json // this example is just showing the usage of "ManagedEnvironmentsStorages_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,7 +126,7 @@ public async Task Exists_GetAEnvironmentsStoragePropertiesBySubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateEnvironmentsStorage() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json // this example is just showing the usage of "ManagedEnvironmentsStorages_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedEnvironmentStorageResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedEnvironmentStorageResource.cs index 816e9b45ce76..4c5fe1d48725 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedEnvironmentStorageResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedEnvironmentStorageResource.cs @@ -23,7 +23,7 @@ public partial class Sample_ContainerAppManagedEnvironmentStorageResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAEnvironmentsStoragePropertiesBySubscription() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironmentsStorages_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentsStorages_Get.json // this example is just showing the usage of "ManagedEnvironmentsStorages_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_GetAEnvironmentsStoragePropertiesBySubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateEnvironmentsStorage() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json // this example is just showing the usage of "ManagedEnvironmentsStorages_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -98,7 +98,7 @@ public async Task Update_CreateOrUpdateEnvironmentsStorage() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ListEnvironmentsStoragesBySubscription() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironmentsStorages_Delete.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentsStorages_Delete.json // this example is just showing the usage of "ManagedEnvironmentsStorages_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppReplicaCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppReplicaCollection.cs index dcf38a21d227..965b017d6d68 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppReplicaCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppReplicaCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_ContainerAppReplicaCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetContainerAppSRevisionReplica() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Replicas_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Replicas_Get.json // this example is just showing the usage of "ContainerAppsRevisionReplicas_GetReplica" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task Get_GetContainerAppSRevisionReplica() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetContainerAppSRevisionReplica() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Replicas_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Replicas_Get.json // this example is just showing the usage of "ContainerAppsRevisionReplicas_GetReplica" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -89,7 +89,7 @@ public async Task Exists_GetContainerAppSRevisionReplica() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListContainerAppSReplicas() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Replicas_List.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Replicas_List.json // this example is just showing the usage of "ContainerAppsRevisionReplicas_ListReplicas" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppReplicaResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppReplicaResource.cs index 4a31cd6d1359..8a5cf9328e92 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppReplicaResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppReplicaResource.cs @@ -21,7 +21,7 @@ public partial class Sample_ContainerAppReplicaResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetContainerAppSRevisionReplica() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Replicas_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Replicas_Get.json // this example is just showing the usage of "ContainerAppsRevisionReplicas_GetReplica" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppResource.cs index 62ce2c32877f..16cb776aeed9 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppResource.cs @@ -24,7 +24,7 @@ public partial class Sample_ContainerAppResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetContainerApps_ListContainerAppsBySubscription() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_ListBySubscription.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_ListBySubscription.json // this example is just showing the usage of "ContainerApps_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetContainerApps_ListContainerAppsBySubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetContainerApp() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_Get.json // this example is just showing the usage of "ContainerApps_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -87,7 +87,7 @@ public async Task Get_GetContainerApp() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteContainerApp() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_Delete.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_Delete.json // this example is just showing the usage of "ContainerApps_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -114,7 +114,7 @@ public async Task Delete_DeleteContainerApp() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_PatchContainerApp() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_Patch.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_Patch.json // this example is just showing the usage of "ContainerApps_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -150,12 +150,14 @@ public async Task Update_PatchContainerApp() }, CustomDomains = { -new ContainerAppCustomDomain("www.my-name.com",new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com")) +new ContainerAppCustomDomain("www.my-name.com") { BindingType = ContainerAppCustomDomainBindingType.SniEnabled, -},new ContainerAppCustomDomain("www.my-other-name.com",new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com")) +CertificateId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), +},new ContainerAppCustomDomain("www.my-other-name.com") { BindingType = ContainerAppCustomDomainBindingType.SniEnabled, +CertificateId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"), } }, IPSecurityRestrictions = @@ -168,6 +170,7 @@ public async Task Update_PatchContainerApp() Description = "Allowing all IP's within the subnet below to access containerapp", } }, + StickySessionsAffinity = Affinity.Sticky, }, Dapr = new ContainerAppDaprConfiguration() { @@ -263,7 +266,7 @@ public async Task Update_PatchContainerApp() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetCustomHostNameAnalysis_AnalyzeCustomHostname() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_ListCustomHostNameAnalysis.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_ListCustomHostNameAnalysis.json // this example is just showing the usage of "ContainerApps_ListCustomHostNameAnalysis" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -291,7 +294,7 @@ public async Task GetCustomHostNameAnalysis_AnalyzeCustomHostname() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetSecrets_ListContainerAppsSecrets() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_ListSecrets.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_ListSecrets.json // this example is just showing the usage of "ContainerApps_ListSecrets" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -321,7 +324,7 @@ public async Task GetSecrets_ListContainerAppsSecrets() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAuthToken_GetContainerAppAuthToken() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_GetAuthToken.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_GetAuthToken.json // this example is just showing the usage of "ContainerApps_GetAuthToken" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppRevisionCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppRevisionCollection.cs index b8e0fda0d64d..e136ab0b073c 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppRevisionCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppRevisionCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_ContainerAppRevisionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListContainerAppSRevisions() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Revisions_List.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_List.json // this example is just showing the usage of "ContainerAppsRevisions_ListRevisions" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,7 +58,7 @@ public async Task GetAll_ListContainerAppSRevisions() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetContainerAppSRevision() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Revisions_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_Get.json // this example is just showing the usage of "ContainerAppsRevisions_GetRevision" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -93,7 +93,7 @@ public async Task Get_GetContainerAppSRevision() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetContainerAppSRevision() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Revisions_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_Get.json // this example is just showing the usage of "ContainerAppsRevisions_GetRevision" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppRevisionResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppRevisionResource.cs index 65a481fb55f3..e3ffdc017952 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppRevisionResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppRevisionResource.cs @@ -21,7 +21,7 @@ public partial class Sample_ContainerAppRevisionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetContainerAppSRevision() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Revisions_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_Get.json // this example is just showing the usage of "ContainerAppsRevisions_GetRevision" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task Get_GetContainerAppSRevision() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task ActivateRevision_ActivateContainerAppSRevision() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Revisions_Activate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_Activate.json // this example is just showing the usage of "ContainerAppsRevisions_ActivateRevision" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -81,7 +81,7 @@ public async Task ActivateRevision_ActivateContainerAppSRevision() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task DeactivateRevision_DeactivateContainerAppSRevision() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Revisions_Deactivate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_Deactivate.json // this example is just showing the usage of "ContainerAppsRevisions_DeactivateRevision" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -109,7 +109,7 @@ public async Task DeactivateRevision_DeactivateContainerAppSRevision() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task RestartRevision_RestartContainerAppSRevision() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Revisions_Restart.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_Restart.json // this example is just showing the usage of "ContainerAppsRevisions_RestartRevision" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppSourceControlCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppSourceControlCollection.cs index 63e218bb8c0b..66f648591794 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppSourceControlCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppSourceControlCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_ContainerAppSourceControlCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAppSSourceControls() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/SourceControls_ListByContainer.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/SourceControls_ListByContainer.json // this example is just showing the usage of "ContainerAppsSourceControls_ListByContainerApp" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +60,7 @@ public async Task GetAll_ListAppSSourceControls() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetContainerAppSSourceControl() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/SourceControls_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/SourceControls_Get.json // this example is just showing the usage of "ContainerAppsSourceControls_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -95,7 +95,7 @@ public async Task Get_GetContainerAppSSourceControl() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetContainerAppSSourceControl() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/SourceControls_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/SourceControls_Get.json // this example is just showing the usage of "ContainerAppsSourceControls_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,7 +126,7 @@ public async Task Exists_GetContainerAppSSourceControl() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateContainerAppSourceControl() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/SourceControls_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/SourceControls_CreateOrUpdate.json // this example is just showing the usage of "ContainerAppsSourceControls_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppSourceControlResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppSourceControlResource.cs index e5a8393677d8..d5b753b8627c 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppSourceControlResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppSourceControlResource.cs @@ -23,7 +23,7 @@ public partial class Sample_ContainerAppSourceControlResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetContainerAppSSourceControl() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/SourceControls_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/SourceControls_Get.json // this example is just showing the usage of "ContainerAppsSourceControls_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_GetContainerAppSSourceControl() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateContainerAppSourceControl() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/SourceControls_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/SourceControls_CreateOrUpdate.json // this example is just showing the usage of "ContainerAppsSourceControls_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -110,7 +110,7 @@ public async Task Update_CreateOrUpdateContainerAppSourceControl() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteContainerAppSourceControl() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/SourceControls_Delete.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/SourceControls_Delete.json // this example is just showing the usage of "ContainerAppsSourceControls_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index e5498f69397b..6959c8e4a5b4 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -23,7 +23,7 @@ public partial class Sample_SubscriptionResourceExtensions [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAvailableWorkloadProfiles_BillingMetersGet() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/AvailableWorkloadProfiles_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AvailableWorkloadProfiles_Get.json // this example is just showing the usage of "AvailableWorkloadProfiles_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task GetAvailableWorkloadProfiles_BillingMetersGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetBillingMeters_BillingMetersGet() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/BillingMeters_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/BillingMeters_Get.json // this example is just showing the usage of "BillingMeters_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Custom/AppContainersSkuName.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Custom/AppContainersSkuName.cs new file mode 100644 index 000000000000..6a7ed7bc61c3 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Custom/AppContainersSkuName.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +//#nullable disable + +using System.ComponentModel; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// this class here is to keep the class public and add the AppContainersSkuName attribute + [EditorBrowsable(EditorBrowsableState.Never)] + public readonly partial struct AppContainersSkuName : System.IEquatable + { + /// SkuName for container app. + public AppContainersSkuName(string value) { throw null; } + + /// SkuName for container app. + public static bool operator ==(Azure.ResourceManager.AppContainers.Models.AppContainersSkuName left, Azure.ResourceManager.AppContainers.Models.AppContainersSkuName right) { throw null; } + + /// SkuName for container app. + public static implicit operator Azure.ResourceManager.AppContainers.Models.AppContainersSkuName(string value) { throw null; } + + /// SkuName for container app. + public static bool operator !=(Azure.ResourceManager.AppContainers.Models.AppContainersSkuName left, Azure.ResourceManager.AppContainers.Models.AppContainersSkuName right) { throw null; } + + /// SkuName for container app. + public static Azure.ResourceManager.AppContainers.Models.AppContainersSkuName Consumption { get { throw null; } } + + /// SkuName for container app. + public static Azure.ResourceManager.AppContainers.Models.AppContainersSkuName Premium { get { throw null; } } + + /// SkuName for container app. + public bool Equals(Azure.ResourceManager.AppContainers.Models.AppContainersSkuName other) { throw null; } + + /// SkuName for container app. + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + + /// SkuName for container app. + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + + /// SkuName for container app. + public override string ToString() { throw null; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Custom/ContainerAppAvailableWorkloadProfileProperties.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Custom/ContainerAppAvailableWorkloadProfileProperties.cs new file mode 100644 index 000000000000..1e67571cc437 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Custom/ContainerAppAvailableWorkloadProfileProperties.cs @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable enable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// A class representing the ContainerAppAvailableWorkloadProfileProperties data model. + public partial class ContainerAppAvailableWorkloadProfileProperties + { + /// billing category for container app. + [EditorBrowsable(EditorBrowsableState.Never)] + public Azure.ResourceManager.AppContainers.Models.ContainerAppBillingMeterCategory? BillingMeterCategory { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppBillingMeterCategory.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Custom/ContainerAppBillingMeterCategory.cs similarity index 98% rename from sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppBillingMeterCategory.cs rename to sdk/containerapps/Azure.ResourceManager.AppContainers/src/Custom/ContainerAppBillingMeterCategory.cs index dca10ece8957..489ec4a25d8f 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppBillingMeterCategory.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Custom/ContainerAppBillingMeterCategory.cs @@ -11,6 +11,7 @@ namespace Azure.ResourceManager.AppContainers.Models { /// Used to map workload profile types to billing meter. + [EditorBrowsable(EditorBrowsableState.Never)] public readonly partial struct ContainerAppBillingMeterCategory : IEquatable { private readonly string _value; diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Custom/ContainerAppBillingMeterProperties.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Custom/ContainerAppBillingMeterProperties.cs new file mode 100644 index 000000000000..cfe052725863 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Custom/ContainerAppBillingMeterProperties.cs @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Revision resource specific properties. + public partial class ContainerAppBillingMeterProperties + { + /// billing category for container app. + [EditorBrowsable(EditorBrowsableState.Never)] + public Azure.ResourceManager.AppContainers.Models.ContainerAppBillingMeterCategory? Category { get => WorkloadProfileCategory; set => WorkloadProfileCategory = value?.ToString(); } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Custom/ContainerAppCustomDomain.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Custom/ContainerAppCustomDomain.cs new file mode 100644 index 000000000000..788e75655f79 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Custom/ContainerAppCustomDomain.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using Azure.ResourceManager.AppContainers.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Custom Domain of a Container App. + public partial class ContainerAppCustomDomain + { + /// Initializes a new instance of ContainerAppCustomDomain. + /// Hostname. + /// Resource Id of the Certificate to be bound to this hostname. Must exist in the Managed Environment. + /// or is null. + public ContainerAppCustomDomain(string name, ResourceIdentifier certificateId) + { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(certificateId, nameof(certificateId)); + + Name = name; + CertificateId = certificateId; + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Custom/ContainerAppData.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Custom/ContainerAppData.cs index 47eb06d0baa2..bd5f9acf9cba 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Custom/ContainerAppData.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Custom/ContainerAppData.cs @@ -6,9 +6,6 @@ using System; using System.Collections.Generic; using System.ComponentModel; -using System.Linq; -using Azure.Core; -using Azure.ResourceManager.AppContainers.Models; using Azure.ResourceManager.Models; namespace Azure.ResourceManager.AppContainers @@ -20,5 +17,9 @@ public partial class ContainerAppData : TrackedResourceData [Obsolete("This property is obsolete and will be removed in a future release", false)] [EditorBrowsable(EditorBrowsableState.Never)] public IReadOnlyList OutboundIPAddresses { get; } + + /// WorkloadProfileType for container app. + [EditorBrowsable(EditorBrowsableState.Never)] + public string WorkloadProfileType { get; set; } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Custom/ContainerAppManagedEnvironmentData.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Custom/ContainerAppManagedEnvironmentData.cs new file mode 100644 index 000000000000..85ef5a4e2e36 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Custom/ContainerAppManagedEnvironmentData.cs @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable enable + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using Azure.Core; +using Azure.ResourceManager.AppContainers.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppContainers +{ + /// A class representing the ContainerAppManagedEnvironmentData data model. + public partial class ContainerAppManagedEnvironmentData : TrackedResourceData + { + /// SkuName for container app. + [EditorBrowsable(EditorBrowsableState.Never)] + public Azure.ResourceManager.AppContainers.Models.AppContainersSkuName? SkuName { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppManagedEnvironmentOutBoundType.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Custom/ContainerAppManagedEnvironmentOutBoundType.cs similarity index 98% rename from sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppManagedEnvironmentOutBoundType.cs rename to sdk/containerapps/Azure.ResourceManager.AppContainers/src/Custom/ContainerAppManagedEnvironmentOutBoundType.cs index ca293a9f7da4..24879bd882dc 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppManagedEnvironmentOutBoundType.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Custom/ContainerAppManagedEnvironmentOutBoundType.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -11,6 +9,7 @@ namespace Azure.ResourceManager.AppContainers.Models { /// Outbound type for the cluster. + [EditorBrowsable(EditorBrowsableState.Never)] public readonly partial struct ContainerAppManagedEnvironmentOutBoundType : IEquatable { private readonly string _value; diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppManagedEnvironmentOutboundSettings.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Custom/ContainerAppManagedEnvironmentOutboundSettings.cs similarity index 95% rename from sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppManagedEnvironmentOutboundSettings.cs rename to sdk/containerapps/Azure.ResourceManager.AppContainers/src/Custom/ContainerAppManagedEnvironmentOutboundSettings.cs index 1b89b4cf8e13..0cc06de75e61 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppManagedEnvironmentOutboundSettings.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Custom/ContainerAppManagedEnvironmentOutboundSettings.cs @@ -1,15 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable +using System.ComponentModel; using System.Net; namespace Azure.ResourceManager.AppContainers.Models { /// Configuration used to control the Environment Egress outbound traffic. + [EditorBrowsable(EditorBrowsableState.Never)] public partial class ContainerAppManagedEnvironmentOutboundSettings { /// Initializes a new instance of ContainerAppManagedEnvironmentOutboundSettings. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Custom/ContainerAppVnetConfiguration.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Custom/ContainerAppVnetConfiguration.cs new file mode 100644 index 000000000000..83b75d4e4885 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Custom/ContainerAppVnetConfiguration.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using Azure.Core; +using Azure.ResourceManager.AppContainers.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Configuration properties for apps environment to join a Virtual Network. + public partial class ContainerAppVnetConfiguration + { + /// Resource ID of a subnet that Container App containers are injected into. This subnet must be in the same VNET as the subnet defined in infrastructureSubnetId. Must not overlap with any other provided IP ranges. + [Obsolete("This method is obsolete and will be removed in a future release", false)] + [EditorBrowsable(EditorBrowsableState.Never)] + public string RuntimeSubnetId { get; set; } + + /// Configuration used to control the Environment Egress outbound traffic. + [Obsolete("This method is obsolete and will be removed in a future release", false)] + [EditorBrowsable(EditorBrowsableState.Never)] + public ContainerAppManagedEnvironmentOutboundSettings OutboundSettings { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Custom/ContainerAppWorkloadProfile.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Custom/ContainerAppWorkloadProfile.cs new file mode 100644 index 000000000000..28004881abe9 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Custom/ContainerAppWorkloadProfile.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.ComponentModel; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Workload profile to scope container app execution. + public partial class ContainerAppWorkloadProfile + { + /// SkuName for container app. + public ContainerAppWorkloadProfile(string workloadProfileType, int minimumCount, int maximumCount) + { + Argument.AssertNotNull(workloadProfileType, nameof(workloadProfileType)); + + WorkloadProfileType = workloadProfileType; + MinimumCount = minimumCount; + MaximumCount = maximumCount; + } + + /// SkuName for container app. + [EditorBrowsable(EditorBrowsableState.Never)] + public int MinimumCount { get => MinimumNodeCount ?? default; set => MinimumNodeCount = value; } + + /// SkuName for container app. + [EditorBrowsable(EditorBrowsableState.Never)] + public int MaximumCount { get => MaximumNodeCount ?? default; set => MaximumNodeCount = value; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppCollection.cs index 153af5621750..030da8045ca0 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppCollection.cs @@ -82,7 +82,7 @@ public virtual async Task> CreateOrUpdateAsyn try { var response = await _containerAppRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, containerAppName, data, cancellationToken).ConfigureAwait(false); - var operation = new AppContainersArmOperation(new ContainerAppOperationSource(Client), _containerAppClientDiagnostics, Pipeline, _containerAppRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, containerAppName, data).Request, response, OperationFinalStateVia.Location); + var operation = new AppContainersArmOperation(new ContainerAppOperationSource(Client), _containerAppClientDiagnostics, Pipeline, _containerAppRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, containerAppName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -123,7 +123,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitU try { var response = _containerAppRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, containerAppName, data, cancellationToken); - var operation = new AppContainersArmOperation(new ContainerAppOperationSource(Client), _containerAppClientDiagnostics, Pipeline, _containerAppRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, containerAppName, data).Request, response, OperationFinalStateVia.Location); + var operation = new AppContainersArmOperation(new ContainerAppOperationSource(Client), _containerAppClientDiagnostics, Pipeline, _containerAppRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, containerAppName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentCollection.cs index 67f40814a477..e733ea3083d7 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentCollection.cs @@ -58,7 +58,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName} /// /// /// Operation Id @@ -82,7 +82,7 @@ public virtual async Task try { var response = await _containerAppConnectedEnvironmentConnectedEnvironmentsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, connectedEnvironmentName, data, cancellationToken).ConfigureAwait(false); - var operation = new AppContainersArmOperation(new ContainerAppConnectedEnvironmentOperationSource(Client), _containerAppConnectedEnvironmentConnectedEnvironmentsClientDiagnostics, Pipeline, _containerAppConnectedEnvironmentConnectedEnvironmentsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, connectedEnvironmentName, data).Request, response, OperationFinalStateVia.Location); + var operation = new AppContainersArmOperation(new ContainerAppConnectedEnvironmentOperationSource(Client), _containerAppConnectedEnvironmentConnectedEnvironmentsClientDiagnostics, Pipeline, _containerAppConnectedEnvironmentConnectedEnvironmentsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, connectedEnvironmentName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -99,7 +99,7 @@ public virtual async Task /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName} /// /// /// Operation Id @@ -123,7 +123,7 @@ public virtual ArmOperation CreateOrUp try { var response = _containerAppConnectedEnvironmentConnectedEnvironmentsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, connectedEnvironmentName, data, cancellationToken); - var operation = new AppContainersArmOperation(new ContainerAppConnectedEnvironmentOperationSource(Client), _containerAppConnectedEnvironmentConnectedEnvironmentsClientDiagnostics, Pipeline, _containerAppConnectedEnvironmentConnectedEnvironmentsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, connectedEnvironmentName, data).Request, response, OperationFinalStateVia.Location); + var operation = new AppContainersArmOperation(new ContainerAppConnectedEnvironmentOperationSource(Client), _containerAppConnectedEnvironmentConnectedEnvironmentsClientDiagnostics, Pipeline, _containerAppConnectedEnvironmentConnectedEnvironmentsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, connectedEnvironmentName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -140,7 +140,7 @@ public virtual ArmOperation CreateOrUp /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName} /// /// /// Operation Id @@ -177,7 +177,7 @@ public virtual async Task> Ge /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName} /// /// /// Operation Id @@ -258,7 +258,7 @@ public virtual Pageable GetAll(Cancell /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName} /// /// /// Operation Id @@ -293,7 +293,7 @@ public virtual async Task> ExistsAsync(string connectedEnvironmen /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName} /// /// /// Operation Id diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentResource.cs index 262728cc8345..f839095b13ad 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentResource.cs @@ -29,7 +29,7 @@ public partial class ContainerAppConnectedEnvironmentResource : ArmResource /// Generate the resource identifier of a instance. public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string connectedEnvironmentName) { - var resourceId = $"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}"; + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}"; return new ResourceIdentifier(resourceId); } @@ -252,7 +252,7 @@ public virtual Response GetCont /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName} /// /// /// Operation Id @@ -284,7 +284,7 @@ public virtual async Task> Ge /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName} /// /// /// Operation Id @@ -316,7 +316,7 @@ public virtual Response Get(Cancellati /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName} /// /// /// Operation Id @@ -350,7 +350,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName} /// /// /// Operation Id @@ -384,7 +384,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName} /// /// /// Operation Id @@ -414,7 +414,7 @@ public virtual async Task> Up /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName} /// /// /// Operation Id diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppData.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppData.cs index 9f63dbcb3a98..c4fb126834a8 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppData.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppData.cs @@ -36,10 +36,11 @@ public ContainerAppData(AzureLocation location) : base(location) /// The location. /// The complex type of the extended location. /// managed identities for the Container App to interact with other Azure services without maintaining any secrets or credentials in code. + /// The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource. /// Provisioning state of the Container App. /// Deprecated. Resource ID of the Container App's environment. /// Resource ID of environment. - /// Workload profile type to pin for container app execution. + /// Workload profile name to pin for container app execution. /// Name of the latest revision of the Container App. /// Name of the latest ready revision of the Container App. /// Fully Qualified Domain Name of the latest revision of the Container App. @@ -48,14 +49,15 @@ public ContainerAppData(AzureLocation location) : base(location) /// Container App versioned application definition. /// Outbound IP Addresses for container app. /// The endpoint of the eventstream of the container app. - internal ContainerAppData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ContainerAppExtendedLocation extendedLocation, ManagedServiceIdentity identity, ContainerAppProvisioningState? provisioningState, ResourceIdentifier managedEnvironmentId, ResourceIdentifier environmentId, string workloadProfileType, string latestRevisionName, string latestReadyRevisionName, string latestRevisionFqdn, string customDomainVerificationId, ContainerAppConfiguration configuration, ContainerAppTemplate template, IReadOnlyList outboundIPAddressList, Uri eventStreamEndpoint) : base(id, name, resourceType, systemData, tags, location) + internal ContainerAppData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ContainerAppExtendedLocation extendedLocation, ManagedServiceIdentity identity, string managedBy, ContainerAppProvisioningState? provisioningState, ResourceIdentifier managedEnvironmentId, ResourceIdentifier environmentId, string workloadProfileName, string latestRevisionName, string latestReadyRevisionName, string latestRevisionFqdn, string customDomainVerificationId, ContainerAppConfiguration configuration, ContainerAppTemplate template, IReadOnlyList outboundIPAddressList, Uri eventStreamEndpoint) : base(id, name, resourceType, systemData, tags, location) { ExtendedLocation = extendedLocation; Identity = identity; + ManagedBy = managedBy; ProvisioningState = provisioningState; ManagedEnvironmentId = managedEnvironmentId; EnvironmentId = environmentId; - WorkloadProfileType = workloadProfileType; + WorkloadProfileName = workloadProfileName; LatestRevisionName = latestRevisionName; LatestReadyRevisionName = latestReadyRevisionName; LatestRevisionFqdn = latestRevisionFqdn; @@ -70,14 +72,16 @@ internal ContainerAppData(ResourceIdentifier id, string name, ResourceType resou public ContainerAppExtendedLocation ExtendedLocation { get; set; } /// managed identities for the Container App to interact with other Azure services without maintaining any secrets or credentials in code. public ManagedServiceIdentity Identity { get; set; } + /// The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource. + public string ManagedBy { get; set; } /// Provisioning state of the Container App. public ContainerAppProvisioningState? ProvisioningState { get; } /// Deprecated. Resource ID of the Container App's environment. public ResourceIdentifier ManagedEnvironmentId { get; set; } /// Resource ID of environment. public ResourceIdentifier EnvironmentId { get; set; } - /// Workload profile type to pin for container app execution. - public string WorkloadProfileType { get; set; } + /// Workload profile name to pin for container app execution. + public string WorkloadProfileName { get; set; } /// Name of the latest revision of the Container App. public string LatestRevisionName { get; } /// Name of the latest ready revision of the Container App. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobCollection.cs new file mode 100644 index 000000000000..5d38b9213bec --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobCollection.cs @@ -0,0 +1,341 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.AppContainers +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetContainerAppJobs method from an instance of . + /// + public partial class ContainerAppJobCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _containerAppJobJobsClientDiagnostics; + private readonly JobsRestOperations _containerAppJobJobsRestClient; + + /// Initializes a new instance of the class for mocking. + protected ContainerAppJobCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal ContainerAppJobCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _containerAppJobJobsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppContainers", ContainerAppJobResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ContainerAppJobResource.ResourceType, out string containerAppJobJobsApiVersion); + _containerAppJobJobsRestClient = new JobsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, containerAppJobJobsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceGroupResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); + } + + /// + /// Create or Update a Container Apps Job. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName} + /// + /// + /// Operation Id + /// Jobs_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the Container Apps Job. + /// Properties used to create a container apps job. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string jobName, ContainerAppJobData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _containerAppJobJobsClientDiagnostics.CreateScope("ContainerAppJobCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _containerAppJobJobsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, jobName, data, cancellationToken).ConfigureAwait(false); + var operation = new AppContainersArmOperation(new ContainerAppJobOperationSource(Client), _containerAppJobJobsClientDiagnostics, Pipeline, _containerAppJobJobsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, jobName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or Update a Container Apps Job. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName} + /// + /// + /// Operation Id + /// Jobs_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the Container Apps Job. + /// Properties used to create a container apps job. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string jobName, ContainerAppJobData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _containerAppJobJobsClientDiagnostics.CreateScope("ContainerAppJobCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _containerAppJobJobsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, jobName, data, cancellationToken); + var operation = new AppContainersArmOperation(new ContainerAppJobOperationSource(Client), _containerAppJobJobsClientDiagnostics, Pipeline, _containerAppJobJobsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, jobName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the properties of a Container Apps Job. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName} + /// + /// + /// Operation Id + /// Jobs_Get + /// + /// + /// + /// Name of the Container Apps Job. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string jobName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + + using var scope = _containerAppJobJobsClientDiagnostics.CreateScope("ContainerAppJobCollection.Get"); + scope.Start(); + try + { + var response = await _containerAppJobJobsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, jobName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ContainerAppJobResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the properties of a Container Apps Job. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName} + /// + /// + /// Operation Id + /// Jobs_Get + /// + /// + /// + /// Name of the Container Apps Job. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string jobName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + + using var scope = _containerAppJobJobsClientDiagnostics.CreateScope("ContainerAppJobCollection.Get"); + scope.Start(); + try + { + var response = _containerAppJobJobsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, jobName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ContainerAppJobResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the Container Apps Jobs in a given resource group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs + /// + /// + /// Operation Id + /// Jobs_ListByResourceGroup + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _containerAppJobJobsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _containerAppJobJobsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ContainerAppJobResource(Client, ContainerAppJobData.DeserializeContainerAppJobData(e)), _containerAppJobJobsClientDiagnostics, Pipeline, "ContainerAppJobCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Get the Container Apps Jobs in a given resource group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs + /// + /// + /// Operation Id + /// Jobs_ListByResourceGroup + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _containerAppJobJobsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _containerAppJobJobsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ContainerAppJobResource(Client, ContainerAppJobData.DeserializeContainerAppJobData(e)), _containerAppJobJobsClientDiagnostics, Pipeline, "ContainerAppJobCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName} + /// + /// + /// Operation Id + /// Jobs_Get + /// + /// + /// + /// Name of the Container Apps Job. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string jobName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + + using var scope = _containerAppJobJobsClientDiagnostics.CreateScope("ContainerAppJobCollection.Exists"); + scope.Start(); + try + { + var response = await _containerAppJobJobsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, jobName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName} + /// + /// + /// Operation Id + /// Jobs_Get + /// + /// + /// + /// Name of the Container Apps Job. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string jobName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + + using var scope = _containerAppJobJobsClientDiagnostics.CreateScope("ContainerAppJobCollection.Exists"); + scope.Start(); + try + { + var response = _containerAppJobJobsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, jobName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobData.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobData.cs new file mode 100644 index 000000000000..5d1f77a270f6 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobData.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.AppContainers.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppContainers +{ + /// + /// A class representing the ContainerAppJob data model. + /// Container App Job + /// + public partial class ContainerAppJobData : TrackedResourceData + { + /// Initializes a new instance of ContainerAppJobData. + /// The location. + public ContainerAppJobData(AzureLocation location) : base(location) + { + OutboundIPAddresses = new ChangeTrackingList(); + } + + /// Initializes a new instance of ContainerAppJobData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Managed identities needed by a container app job to interact with other Azure services to not maintain any secrets or credentials in code. + /// Provisioning state of the Container Apps Job. + /// Resource ID of environment. + /// Workload profile name to pin for container apps job execution. + /// Container Apps Job configuration properties. + /// Container Apps job definition. + /// Outbound IP Addresses of a container apps job. + /// The endpoint of the eventstream of the container apps job. + internal ContainerAppJobData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, ContainerAppJobProvisioningState? provisioningState, string environmentId, string workloadProfileName, ContainerAppJobConfiguration configuration, ContainerAppJobTemplate template, IReadOnlyList outboundIPAddresses, string eventStreamEndpoint) : base(id, name, resourceType, systemData, tags, location) + { + Identity = identity; + ProvisioningState = provisioningState; + EnvironmentId = environmentId; + WorkloadProfileName = workloadProfileName; + Configuration = configuration; + Template = template; + OutboundIPAddresses = outboundIPAddresses; + EventStreamEndpoint = eventStreamEndpoint; + } + + /// Managed identities needed by a container app job to interact with other Azure services to not maintain any secrets or credentials in code. + public ManagedServiceIdentity Identity { get; set; } + /// Provisioning state of the Container Apps Job. + public ContainerAppJobProvisioningState? ProvisioningState { get; } + /// Resource ID of environment. + public string EnvironmentId { get; set; } + /// Workload profile name to pin for container apps job execution. + public string WorkloadProfileName { get; set; } + /// Container Apps Job configuration properties. + public ContainerAppJobConfiguration Configuration { get; set; } + /// Container Apps job definition. + public ContainerAppJobTemplate Template { get; set; } + /// Outbound IP Addresses of a container apps job. + public IReadOnlyList OutboundIPAddresses { get; } + /// The endpoint of the eventstream of the container apps job. + public string EventStreamEndpoint { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobResource.cs new file mode 100644 index 000000000000..7bc0d106cf93 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobResource.cs @@ -0,0 +1,932 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.AppContainers.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.AppContainers +{ + /// + /// A Class representing a ContainerAppJob along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetContainerAppJobResource method. + /// Otherwise you can get one from its parent resource using the GetContainerAppJob method. + /// + public partial class ContainerAppJobResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string jobName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _containerAppJobJobsClientDiagnostics; + private readonly JobsRestOperations _containerAppJobJobsRestClient; + private readonly ClientDiagnostics _jobsExecutionsClientDiagnostics; + private readonly JobsExecutionsRestOperations _jobsExecutionsRestClient; + private readonly ContainerAppJobData _data; + + /// Initializes a new instance of the class for mocking. + protected ContainerAppJobResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ContainerAppJobResource(ArmClient client, ContainerAppJobData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal ContainerAppJobResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _containerAppJobJobsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppContainers", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string containerAppJobJobsApiVersion); + _containerAppJobJobsRestClient = new JobsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, containerAppJobJobsApiVersion); + _jobsExecutionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppContainers", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _jobsExecutionsRestClient = new JobsExecutionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.App/jobs"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual ContainerAppJobData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get the properties of a Container Apps Job. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName} + /// + /// + /// Operation Id + /// Jobs_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _containerAppJobJobsClientDiagnostics.CreateScope("ContainerAppJobResource.Get"); + scope.Start(); + try + { + var response = await _containerAppJobJobsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ContainerAppJobResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the properties of a Container Apps Job. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName} + /// + /// + /// Operation Id + /// Jobs_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _containerAppJobJobsClientDiagnostics.CreateScope("ContainerAppJobResource.Get"); + scope.Start(); + try + { + var response = _containerAppJobJobsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ContainerAppJobResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Container Apps Job. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName} + /// + /// + /// Operation Id + /// Jobs_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _containerAppJobJobsClientDiagnostics.CreateScope("ContainerAppJobResource.Delete"); + scope.Start(); + try + { + var response = await _containerAppJobJobsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppContainersArmOperation(_containerAppJobJobsClientDiagnostics, Pipeline, _containerAppJobJobsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Container Apps Job. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName} + /// + /// + /// Operation Id + /// Jobs_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _containerAppJobJobsClientDiagnostics.CreateScope("ContainerAppJobResource.Delete"); + scope.Start(); + try + { + var response = _containerAppJobJobsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new AppContainersArmOperation(_containerAppJobJobsClientDiagnostics, Pipeline, _containerAppJobJobsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Patches a Container Apps Job using JSON Merge Patch + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName} + /// + /// + /// Operation Id + /// Jobs_Update + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Properties used to create a container apps job. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, ContainerAppJobPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _containerAppJobJobsClientDiagnostics.CreateScope("ContainerAppJobResource.Update"); + scope.Start(); + try + { + var response = await _containerAppJobJobsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new AppContainersArmOperation(new ContainerAppJobOperationSource(Client), _containerAppJobJobsClientDiagnostics, Pipeline, _containerAppJobJobsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Patches a Container Apps Job using JSON Merge Patch + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName} + /// + /// + /// Operation Id + /// Jobs_Update + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Properties used to create a container apps job. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, ContainerAppJobPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _containerAppJobJobsClientDiagnostics.CreateScope("ContainerAppJobResource.Update"); + scope.Start(); + try + { + var response = _containerAppJobJobsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new AppContainersArmOperation(new ContainerAppJobOperationSource(Client), _containerAppJobJobsClientDiagnostics, Pipeline, _containerAppJobJobsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Start a Container Apps Job + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/start + /// + /// + /// Operation Id + /// Jobs_Start + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Properties used to start a job instance. + /// The cancellation token to use. + /// is null. + public virtual async Task> StartAsync(WaitUntil waitUntil, ContainerAppJobExecutionTemplate template, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(template, nameof(template)); + + using var scope = _containerAppJobJobsClientDiagnostics.CreateScope("ContainerAppJobResource.Start"); + scope.Start(); + try + { + var response = await _containerAppJobJobsRestClient.StartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, template, cancellationToken).ConfigureAwait(false); + var operation = new AppContainersArmOperation(new ContainerAppJobExecutionBaseOperationSource(), _containerAppJobJobsClientDiagnostics, Pipeline, _containerAppJobJobsRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, template).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Start a Container Apps Job + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/start + /// + /// + /// Operation Id + /// Jobs_Start + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Properties used to start a job instance. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Start(WaitUntil waitUntil, ContainerAppJobExecutionTemplate template, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(template, nameof(template)); + + using var scope = _containerAppJobJobsClientDiagnostics.CreateScope("ContainerAppJobResource.Start"); + scope.Start(); + try + { + var response = _containerAppJobJobsRestClient.Start(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, template, cancellationToken); + var operation = new AppContainersArmOperation(new ContainerAppJobExecutionBaseOperationSource(), _containerAppJobJobsClientDiagnostics, Pipeline, _containerAppJobJobsRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, template).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Terminates execution of a running container apps job + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/executions/{jobExecutionName}/stop + /// + /// + /// Operation Id + /// Jobs_StopExecution + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Job execution name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task StopExecutionAsync(WaitUntil waitUntil, string jobExecutionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobExecutionName, nameof(jobExecutionName)); + + using var scope = _containerAppJobJobsClientDiagnostics.CreateScope("ContainerAppJobResource.StopExecution"); + scope.Start(); + try + { + var response = await _containerAppJobJobsRestClient.StopExecutionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, jobExecutionName, cancellationToken).ConfigureAwait(false); + var operation = new AppContainersArmOperation(_containerAppJobJobsClientDiagnostics, Pipeline, _containerAppJobJobsRestClient.CreateStopExecutionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, jobExecutionName).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Terminates execution of a running container apps job + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/executions/{jobExecutionName}/stop + /// + /// + /// Operation Id + /// Jobs_StopExecution + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Job execution name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual ArmOperation StopExecution(WaitUntil waitUntil, string jobExecutionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobExecutionName, nameof(jobExecutionName)); + + using var scope = _containerAppJobJobsClientDiagnostics.CreateScope("ContainerAppJobResource.StopExecution"); + scope.Start(); + try + { + var response = _containerAppJobJobsRestClient.StopExecution(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, jobExecutionName, cancellationToken); + var operation = new AppContainersArmOperation(_containerAppJobJobsClientDiagnostics, Pipeline, _containerAppJobJobsRestClient.CreateStopExecutionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, jobExecutionName).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Terminates execution of a running container apps job + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/stop + /// + /// + /// Operation Id + /// Jobs_StopMultipleExecutions + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// List of all job executions that should be stopped. + /// The cancellation token to use. + /// is null. + public virtual async Task> StopMultipleExecutionsAsync(WaitUntil waitUntil, JobExecutionNamesCollection jobExecutionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(jobExecutionName, nameof(jobExecutionName)); + + using var scope = _containerAppJobJobsClientDiagnostics.CreateScope("ContainerAppJobResource.StopMultipleExecutions"); + scope.Start(); + try + { + var response = await _containerAppJobJobsRestClient.StopMultipleExecutionsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, jobExecutionName, cancellationToken).ConfigureAwait(false); + var operation = new AppContainersArmOperation(new ContainerAppJobExecutionsOperationSource(), _containerAppJobJobsClientDiagnostics, Pipeline, _containerAppJobJobsRestClient.CreateStopMultipleExecutionsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, jobExecutionName).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Terminates execution of a running container apps job + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/stop + /// + /// + /// Operation Id + /// Jobs_StopMultipleExecutions + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// List of all job executions that should be stopped. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation StopMultipleExecutions(WaitUntil waitUntil, JobExecutionNamesCollection jobExecutionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(jobExecutionName, nameof(jobExecutionName)); + + using var scope = _containerAppJobJobsClientDiagnostics.CreateScope("ContainerAppJobResource.StopMultipleExecutions"); + scope.Start(); + try + { + var response = _containerAppJobJobsRestClient.StopMultipleExecutions(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, jobExecutionName, cancellationToken); + var operation = new AppContainersArmOperation(new ContainerAppJobExecutionsOperationSource(), _containerAppJobJobsClientDiagnostics, Pipeline, _containerAppJobJobsRestClient.CreateStopMultipleExecutionsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, jobExecutionName).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List secrets for a container apps job + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/listSecrets + /// + /// + /// Operation Id + /// Jobs_ListSecrets + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetSecretsAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _containerAppJobJobsRestClient.CreateListSecretsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, null, ContainerAppWritableSecret.DeserializeContainerAppWritableSecret, _containerAppJobJobsClientDiagnostics, Pipeline, "ContainerAppJobResource.GetSecrets", "value", null, cancellationToken); + } + + /// + /// List secrets for a container apps job + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/listSecrets + /// + /// + /// Operation Id + /// Jobs_ListSecrets + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetSecrets(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _containerAppJobJobsRestClient.CreateListSecretsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return PageableHelpers.CreatePageable(FirstPageRequest, null, ContainerAppWritableSecret.DeserializeContainerAppWritableSecret, _containerAppJobJobsClientDiagnostics, Pipeline, "ContainerAppJobResource.GetSecrets", "value", null, cancellationToken); + } + + /// + /// Get a Container Apps Job's executions + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/executions + /// + /// + /// Operation Id + /// JobsExecutions_List + /// + /// + /// + /// The filter to apply on the operation. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetJobsExecutionsAsync(string filter = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _jobsExecutionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _jobsExecutionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, ContainerAppJobExecution.DeserializeContainerAppJobExecution, _jobsExecutionsClientDiagnostics, Pipeline, "ContainerAppJobResource.GetJobsExecutions", "value", "nextLink", cancellationToken); + } + + /// + /// Get a Container Apps Job's executions + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/executions + /// + /// + /// Operation Id + /// JobsExecutions_List + /// + /// + /// + /// The filter to apply on the operation. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetJobsExecutions(string filter = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _jobsExecutionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _jobsExecutionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, ContainerAppJobExecution.DeserializeContainerAppJobExecution, _jobsExecutionsClientDiagnostics, Pipeline, "ContainerAppJobResource.GetJobsExecutions", "value", "nextLink", cancellationToken); + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName} + /// + /// + /// Operation Id + /// Jobs_Get + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _containerAppJobJobsClientDiagnostics.CreateScope("ContainerAppJobResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _containerAppJobJobsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ContainerAppJobResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new ContainerAppJobPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName} + /// + /// + /// Operation Id + /// Jobs_Get + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _containerAppJobJobsClientDiagnostics.CreateScope("ContainerAppJobResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _containerAppJobJobsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new ContainerAppJobResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new ContainerAppJobPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName} + /// + /// + /// Operation Id + /// Jobs_Get + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _containerAppJobJobsClientDiagnostics.CreateScope("ContainerAppJobResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _containerAppJobJobsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ContainerAppJobResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new ContainerAppJobPatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName} + /// + /// + /// Operation Id + /// Jobs_Get + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _containerAppJobJobsClientDiagnostics.CreateScope("ContainerAppJobResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _containerAppJobJobsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new ContainerAppJobResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new ContainerAppJobPatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName} + /// + /// + /// Operation Id + /// Jobs_Get + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _containerAppJobJobsClientDiagnostics.CreateScope("ContainerAppJobResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _containerAppJobJobsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ContainerAppJobResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new ContainerAppJobPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName} + /// + /// + /// Operation Id + /// Jobs_Get + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _containerAppJobJobsClientDiagnostics.CreateScope("ContainerAppJobResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _containerAppJobJobsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new ContainerAppJobResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new ContainerAppJobPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedCertificateCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedCertificateCollection.cs new file mode 100644 index 000000000000..cb64f022e1d1 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedCertificateCollection.cs @@ -0,0 +1,340 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.AppContainers +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetContainerAppManagedCertificates method from an instance of . + /// + public partial class ContainerAppManagedCertificateCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _containerAppManagedCertificateManagedCertificatesClientDiagnostics; + private readonly ManagedCertificatesRestOperations _containerAppManagedCertificateManagedCertificatesRestClient; + + /// Initializes a new instance of the class for mocking. + protected ContainerAppManagedCertificateCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal ContainerAppManagedCertificateCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _containerAppManagedCertificateManagedCertificatesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppContainers", ContainerAppManagedCertificateResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ContainerAppManagedCertificateResource.ResourceType, out string containerAppManagedCertificateManagedCertificatesApiVersion); + _containerAppManagedCertificateManagedCertificatesRestClient = new ManagedCertificatesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, containerAppManagedCertificateManagedCertificatesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ContainerAppManagedEnvironmentResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ContainerAppManagedEnvironmentResource.ResourceType), nameof(id)); + } + + /// + /// Create or Update a Managed Certificate. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates/{managedCertificateName} + /// + /// + /// Operation Id + /// ManagedCertificates_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the Managed Certificate. + /// Managed Certificate to be created or updated. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string managedCertificateName, ContainerAppManagedCertificateData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(managedCertificateName, nameof(managedCertificateName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _containerAppManagedCertificateManagedCertificatesClientDiagnostics.CreateScope("ContainerAppManagedCertificateCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _containerAppManagedCertificateManagedCertificatesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedCertificateName, data, cancellationToken).ConfigureAwait(false); + var operation = new AppContainersArmOperation(new ContainerAppManagedCertificateOperationSource(Client), _containerAppManagedCertificateManagedCertificatesClientDiagnostics, Pipeline, _containerAppManagedCertificateManagedCertificatesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedCertificateName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or Update a Managed Certificate. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates/{managedCertificateName} + /// + /// + /// Operation Id + /// ManagedCertificates_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the Managed Certificate. + /// Managed Certificate to be created or updated. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string managedCertificateName, ContainerAppManagedCertificateData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(managedCertificateName, nameof(managedCertificateName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _containerAppManagedCertificateManagedCertificatesClientDiagnostics.CreateScope("ContainerAppManagedCertificateCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _containerAppManagedCertificateManagedCertificatesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedCertificateName, data, cancellationToken); + var operation = new AppContainersArmOperation(new ContainerAppManagedCertificateOperationSource(Client), _containerAppManagedCertificateManagedCertificatesClientDiagnostics, Pipeline, _containerAppManagedCertificateManagedCertificatesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedCertificateName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the specified Managed Certificate. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates/{managedCertificateName} + /// + /// + /// Operation Id + /// ManagedCertificates_Get + /// + /// + /// + /// Name of the Managed Certificate. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string managedCertificateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(managedCertificateName, nameof(managedCertificateName)); + + using var scope = _containerAppManagedCertificateManagedCertificatesClientDiagnostics.CreateScope("ContainerAppManagedCertificateCollection.Get"); + scope.Start(); + try + { + var response = await _containerAppManagedCertificateManagedCertificatesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedCertificateName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ContainerAppManagedCertificateResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the specified Managed Certificate. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates/{managedCertificateName} + /// + /// + /// Operation Id + /// ManagedCertificates_Get + /// + /// + /// + /// Name of the Managed Certificate. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string managedCertificateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(managedCertificateName, nameof(managedCertificateName)); + + using var scope = _containerAppManagedCertificateManagedCertificatesClientDiagnostics.CreateScope("ContainerAppManagedCertificateCollection.Get"); + scope.Start(); + try + { + var response = _containerAppManagedCertificateManagedCertificatesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedCertificateName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ContainerAppManagedCertificateResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the Managed Certificates in a given managed environment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates + /// + /// + /// Operation Id + /// ManagedCertificates_List + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _containerAppManagedCertificateManagedCertificatesRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _containerAppManagedCertificateManagedCertificatesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ContainerAppManagedCertificateResource(Client, ContainerAppManagedCertificateData.DeserializeContainerAppManagedCertificateData(e)), _containerAppManagedCertificateManagedCertificatesClientDiagnostics, Pipeline, "ContainerAppManagedCertificateCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Get the Managed Certificates in a given managed environment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates + /// + /// + /// Operation Id + /// ManagedCertificates_List + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _containerAppManagedCertificateManagedCertificatesRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _containerAppManagedCertificateManagedCertificatesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ContainerAppManagedCertificateResource(Client, ContainerAppManagedCertificateData.DeserializeContainerAppManagedCertificateData(e)), _containerAppManagedCertificateManagedCertificatesClientDiagnostics, Pipeline, "ContainerAppManagedCertificateCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates/{managedCertificateName} + /// + /// + /// Operation Id + /// ManagedCertificates_Get + /// + /// + /// + /// Name of the Managed Certificate. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string managedCertificateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(managedCertificateName, nameof(managedCertificateName)); + + using var scope = _containerAppManagedCertificateManagedCertificatesClientDiagnostics.CreateScope("ContainerAppManagedCertificateCollection.Exists"); + scope.Start(); + try + { + var response = await _containerAppManagedCertificateManagedCertificatesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedCertificateName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates/{managedCertificateName} + /// + /// + /// Operation Id + /// ManagedCertificates_Get + /// + /// + /// + /// Name of the Managed Certificate. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string managedCertificateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(managedCertificateName, nameof(managedCertificateName)); + + using var scope = _containerAppManagedCertificateManagedCertificatesClientDiagnostics.CreateScope("ContainerAppManagedCertificateCollection.Exists"); + scope.Start(); + try + { + var response = _containerAppManagedCertificateManagedCertificatesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedCertificateName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedCertificateData.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedCertificateData.cs new file mode 100644 index 000000000000..96b8e1e7edcc --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedCertificateData.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.AppContainers.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppContainers +{ + /// + /// A class representing the ContainerAppManagedCertificate data model. + /// Managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment + /// + public partial class ContainerAppManagedCertificateData : TrackedResourceData + { + /// Initializes a new instance of ContainerAppManagedCertificateData. + /// The location. + public ContainerAppManagedCertificateData(AzureLocation location) : base(location) + { + } + + /// Initializes a new instance of ContainerAppManagedCertificateData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Certificate resource specific properties. + internal ContainerAppManagedCertificateData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedCertificateProperties properties) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + } + + /// Certificate resource specific properties. + public ManagedCertificateProperties Properties { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedCertificateResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedCertificateResource.cs new file mode 100644 index 000000000000..246be4403998 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedCertificateResource.cs @@ -0,0 +1,601 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.AppContainers.Models; + +namespace Azure.ResourceManager.AppContainers +{ + /// + /// A Class representing a ContainerAppManagedCertificate along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetContainerAppManagedCertificateResource method. + /// Otherwise you can get one from its parent resource using the GetContainerAppManagedCertificate method. + /// + public partial class ContainerAppManagedCertificateResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string environmentName, string managedCertificateName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates/{managedCertificateName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _containerAppManagedCertificateManagedCertificatesClientDiagnostics; + private readonly ManagedCertificatesRestOperations _containerAppManagedCertificateManagedCertificatesRestClient; + private readonly ContainerAppManagedCertificateData _data; + + /// Initializes a new instance of the class for mocking. + protected ContainerAppManagedCertificateResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ContainerAppManagedCertificateResource(ArmClient client, ContainerAppManagedCertificateData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal ContainerAppManagedCertificateResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _containerAppManagedCertificateManagedCertificatesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppContainers", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string containerAppManagedCertificateManagedCertificatesApiVersion); + _containerAppManagedCertificateManagedCertificatesRestClient = new ManagedCertificatesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, containerAppManagedCertificateManagedCertificatesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.App/managedEnvironments/managedCertificates"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual ContainerAppManagedCertificateData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get the specified Managed Certificate. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates/{managedCertificateName} + /// + /// + /// Operation Id + /// ManagedCertificates_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _containerAppManagedCertificateManagedCertificatesClientDiagnostics.CreateScope("ContainerAppManagedCertificateResource.Get"); + scope.Start(); + try + { + var response = await _containerAppManagedCertificateManagedCertificatesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ContainerAppManagedCertificateResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the specified Managed Certificate. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates/{managedCertificateName} + /// + /// + /// Operation Id + /// ManagedCertificates_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _containerAppManagedCertificateManagedCertificatesClientDiagnostics.CreateScope("ContainerAppManagedCertificateResource.Get"); + scope.Start(); + try + { + var response = _containerAppManagedCertificateManagedCertificatesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ContainerAppManagedCertificateResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the specified Managed Certificate. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates/{managedCertificateName} + /// + /// + /// Operation Id + /// ManagedCertificates_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _containerAppManagedCertificateManagedCertificatesClientDiagnostics.CreateScope("ContainerAppManagedCertificateResource.Delete"); + scope.Start(); + try + { + var response = await _containerAppManagedCertificateManagedCertificatesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppContainersArmOperation(response); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the specified Managed Certificate. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates/{managedCertificateName} + /// + /// + /// Operation Id + /// ManagedCertificates_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _containerAppManagedCertificateManagedCertificatesClientDiagnostics.CreateScope("ContainerAppManagedCertificateResource.Delete"); + scope.Start(); + try + { + var response = _containerAppManagedCertificateManagedCertificatesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new AppContainersArmOperation(response); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Patches a managed certificate. Oly patching of tags is supported + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates/{managedCertificateName} + /// + /// + /// Operation Id + /// ManagedCertificates_Update + /// + /// + /// + /// Properties of a managed certificate that need to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(ContainerAppManagedCertificatePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _containerAppManagedCertificateManagedCertificatesClientDiagnostics.CreateScope("ContainerAppManagedCertificateResource.Update"); + scope.Start(); + try + { + var response = await _containerAppManagedCertificateManagedCertificatesRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ContainerAppManagedCertificateResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Patches a managed certificate. Oly patching of tags is supported + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates/{managedCertificateName} + /// + /// + /// Operation Id + /// ManagedCertificates_Update + /// + /// + /// + /// Properties of a managed certificate that need to be updated. + /// The cancellation token to use. + /// is null. + public virtual Response Update(ContainerAppManagedCertificatePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _containerAppManagedCertificateManagedCertificatesClientDiagnostics.CreateScope("ContainerAppManagedCertificateResource.Update"); + scope.Start(); + try + { + var response = _containerAppManagedCertificateManagedCertificatesRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); + return Response.FromValue(new ContainerAppManagedCertificateResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates/{managedCertificateName} + /// + /// + /// Operation Id + /// ManagedCertificates_Get + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _containerAppManagedCertificateManagedCertificatesClientDiagnostics.CreateScope("ContainerAppManagedCertificateResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _containerAppManagedCertificateManagedCertificatesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ContainerAppManagedCertificateResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new ContainerAppManagedCertificatePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates/{managedCertificateName} + /// + /// + /// Operation Id + /// ManagedCertificates_Get + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _containerAppManagedCertificateManagedCertificatesClientDiagnostics.CreateScope("ContainerAppManagedCertificateResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _containerAppManagedCertificateManagedCertificatesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new ContainerAppManagedCertificateResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new ContainerAppManagedCertificatePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates/{managedCertificateName} + /// + /// + /// Operation Id + /// ManagedCertificates_Get + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _containerAppManagedCertificateManagedCertificatesClientDiagnostics.CreateScope("ContainerAppManagedCertificateResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _containerAppManagedCertificateManagedCertificatesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ContainerAppManagedCertificateResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new ContainerAppManagedCertificatePatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates/{managedCertificateName} + /// + /// + /// Operation Id + /// ManagedCertificates_Get + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _containerAppManagedCertificateManagedCertificatesClientDiagnostics.CreateScope("ContainerAppManagedCertificateResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _containerAppManagedCertificateManagedCertificatesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new ContainerAppManagedCertificateResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new ContainerAppManagedCertificatePatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates/{managedCertificateName} + /// + /// + /// Operation Id + /// ManagedCertificates_Get + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _containerAppManagedCertificateManagedCertificatesClientDiagnostics.CreateScope("ContainerAppManagedCertificateResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _containerAppManagedCertificateManagedCertificatesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ContainerAppManagedCertificateResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new ContainerAppManagedCertificatePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates/{managedCertificateName} + /// + /// + /// Operation Id + /// ManagedCertificates_Get + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _containerAppManagedCertificateManagedCertificatesClientDiagnostics.CreateScope("ContainerAppManagedCertificateResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _containerAppManagedCertificateManagedCertificatesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new ContainerAppManagedCertificateResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new ContainerAppManagedCertificatePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentData.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentData.cs index 7772b9128d4c..bc53677936bb 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentData.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentData.cs @@ -34,7 +34,6 @@ public ContainerAppManagedEnvironmentData(AzureLocation location) : base(locatio /// The tags. /// The location. /// Kind of the Environment. - /// SKU properties of the Environment. /// Provisioning state of the Environment. /// Azure Monitor instrumentation key used by Dapr to export Service to Service communication telemetry. /// Application Insights connection string used by Dapr to export Service to Service communication telemetry. @@ -51,10 +50,12 @@ public ContainerAppManagedEnvironmentData(AzureLocation location) : base(locatio /// Custom domain configuration for the environment. /// The endpoint of the eventstream of the Environment. /// Workload profiles configured for the Managed Environment. - internal ContainerAppManagedEnvironmentData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string kind, EnvironmentSkuProperties sku, ContainerAppEnvironmentProvisioningState? provisioningState, string daprAIInstrumentationKey, string daprAIConnectionString, ContainerAppVnetConfiguration vnetConfiguration, string deploymentErrors, string defaultDomain, IPAddress staticIP, ContainerAppLogsConfiguration appLogsConfiguration, bool? isZoneRedundant, ContainerAppCustomDomainConfiguration customDomainConfiguration, string eventStreamEndpoint, IList workloadProfiles) : base(id, name, resourceType, systemData, tags, location) + /// The configuration of Keda component. + /// The configuration of Dapr component. + /// Name of the platform-managed resource group created for the Managed Environment to host infrastructure resources. If a subnet ID is provided, this resource group will be created in the same subscription as the subnet. + internal ContainerAppManagedEnvironmentData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string kind, ContainerAppEnvironmentProvisioningState? provisioningState, string daprAIInstrumentationKey, string daprAIConnectionString, ContainerAppVnetConfiguration vnetConfiguration, string deploymentErrors, string defaultDomain, IPAddress staticIP, ContainerAppLogsConfiguration appLogsConfiguration, bool? isZoneRedundant, ContainerAppCustomDomainConfiguration customDomainConfiguration, string eventStreamEndpoint, IList workloadProfiles, KedaConfiguration kedaConfiguration, DaprConfiguration daprConfiguration, string infrastructureResourceGroup) : base(id, name, resourceType, systemData, tags, location) { Kind = kind; - Sku = sku; ProvisioningState = provisioningState; DaprAIInstrumentationKey = daprAIInstrumentationKey; DaprAIConnectionString = daprAIConnectionString; @@ -67,22 +68,13 @@ internal ContainerAppManagedEnvironmentData(ResourceIdentifier id, string name, CustomDomainConfiguration = customDomainConfiguration; EventStreamEndpoint = eventStreamEndpoint; WorkloadProfiles = workloadProfiles; + KedaConfiguration = kedaConfiguration; + DaprConfiguration = daprConfiguration; + InfrastructureResourceGroup = infrastructureResourceGroup; } /// Kind of the Environment. public string Kind { get; set; } - /// SKU properties of the Environment. - internal EnvironmentSkuProperties Sku { get; set; } - /// Name of the Sku. - public AppContainersSkuName? SkuName - { - get => Sku is null ? default(AppContainersSkuName?) : Sku.Name; - set - { - Sku = value.HasValue ? new EnvironmentSkuProperties(value.Value) : null; - } - } - /// Provisioning state of the Environment. public ContainerAppEnvironmentProvisioningState? ProvisioningState { get; } /// Azure Monitor instrumentation key used by Dapr to export Service to Service communication telemetry. @@ -111,5 +103,23 @@ public AppContainersSkuName? SkuName public string EventStreamEndpoint { get; } /// Workload profiles configured for the Managed Environment. public IList WorkloadProfiles { get; } + /// The configuration of Keda component. + internal KedaConfiguration KedaConfiguration { get; set; } + /// The version of Keda. + public string KedaVersion + { + get => KedaConfiguration is null ? default : KedaConfiguration.Version; + } + + /// The configuration of Dapr component. + internal DaprConfiguration DaprConfiguration { get; set; } + /// The version of Dapr. + public string DaprVersion + { + get => DaprConfiguration is null ? default : DaprConfiguration.Version; + } + + /// Name of the platform-managed resource group created for the Managed Environment to host infrastructure resources. If a subnet ID is provided, this resource group will be created in the same subscription as the subnet. + public string InfrastructureResourceGroup { get; set; } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentResource.cs index 75a83b36227a..4592b2be2efc 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentResource.cs @@ -259,6 +259,59 @@ public virtual ContainerAppManagedEnvironmentDetectorResourcePropertyResource Ge return new ContainerAppManagedEnvironmentDetectorResourcePropertyResource(Client, Id.AppendChildResource("detectorProperties", "rootApi")); } + /// Gets a collection of ContainerAppManagedCertificateResources in the ContainerAppManagedEnvironment. + /// An object representing collection of ContainerAppManagedCertificateResources and their operations over a ContainerAppManagedCertificateResource. + public virtual ContainerAppManagedCertificateCollection GetContainerAppManagedCertificates() + { + return GetCachedClient(Client => new ContainerAppManagedCertificateCollection(Client, Id)); + } + + /// + /// Get the specified Managed Certificate. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates/{managedCertificateName} + /// + /// + /// Operation Id + /// ManagedCertificates_Get + /// + /// + /// + /// Name of the Managed Certificate. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetContainerAppManagedCertificateAsync(string managedCertificateName, CancellationToken cancellationToken = default) + { + return await GetContainerAppManagedCertificates().GetAsync(managedCertificateName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the specified Managed Certificate. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates/{managedCertificateName} + /// + /// + /// Operation Id + /// ManagedCertificates_Get + /// + /// + /// + /// Name of the Managed Certificate. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetContainerAppManagedCertificate(string managedCertificateName, CancellationToken cancellationToken = default) + { + return GetContainerAppManagedCertificates().Get(managedCertificateName, cancellationToken); + } + /// Gets a collection of ContainerAppManagedEnvironmentStorageResources in the ContainerAppManagedEnvironment. /// An object representing collection of ContainerAppManagedEnvironmentStorageResources and their operations over a ContainerAppManagedEnvironmentStorageResource. public virtual ContainerAppManagedEnvironmentStorageCollection GetContainerAppManagedEnvironmentStorages() @@ -581,7 +634,7 @@ public virtual Response GetAuthToken(Cancellat } /// - /// Get all workload Profile States for a Premium Managed Environment. + /// Get all workload Profile States for a Managed Environment. /// /// /// Request Path @@ -603,7 +656,7 @@ public virtual AsyncPageable GetWorkloadProfil } /// - /// Get all workload Profile States for a Premium Managed Environment. + /// Get all workload Profile States for a Managed Environment. /// /// /// Request Path diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Extensions/AppContainersExtensions.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Extensions/AppContainersExtensions.cs index 40b1682c93a2..e25fa4c2b30d 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Extensions/AppContainersExtensions.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Extensions/AppContainersExtensions.cs @@ -221,6 +221,25 @@ public static ContainerAppDetectorPropertyResource GetContainerAppDetectorProper } #endregion + #region ContainerAppJobResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static ContainerAppJobResource GetContainerAppJobResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + ContainerAppJobResource.ValidateResourceId(id); + return new ContainerAppJobResource(client, id); + } + ); + } + #endregion + #region ContainerAppRevisionResource /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. @@ -354,6 +373,25 @@ public static ContainerAppManagedEnvironmentResource GetContainerAppManagedEnvir } #endregion + #region ContainerAppManagedCertificateResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static ContainerAppManagedCertificateResource GetContainerAppManagedCertificateResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + ContainerAppManagedCertificateResource.ValidateResourceId(id); + return new ContainerAppManagedCertificateResource(client, id); + } + ); + } + #endregion + #region ContainerAppManagedEnvironmentStorageResource /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. @@ -405,7 +443,7 @@ public static ContainerAppConnectedEnvironmentCollection GetContainerAppConnecte /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName} /// /// /// Operation Id @@ -429,7 +467,7 @@ public static async Task> Get /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName} /// /// /// Operation Id @@ -504,6 +542,62 @@ public static Response GetContainerApp(this ResourceGroupR return resourceGroupResource.GetContainerApps().Get(containerAppName, cancellationToken); } + /// Gets a collection of ContainerAppJobResources in the ResourceGroupResource. + /// The instance the method will execute against. + /// An object representing collection of ContainerAppJobResources and their operations over a ContainerAppJobResource. + public static ContainerAppJobCollection GetContainerAppJobs(this ResourceGroupResource resourceGroupResource) + { + return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetContainerAppJobs(); + } + + /// + /// Get the properties of a Container Apps Job. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName} + /// + /// + /// Operation Id + /// Jobs_Get + /// + /// + /// + /// The instance the method will execute against. + /// Name of the Container Apps Job. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public static async Task> GetContainerAppJobAsync(this ResourceGroupResource resourceGroupResource, string jobName, CancellationToken cancellationToken = default) + { + return await resourceGroupResource.GetContainerAppJobs().GetAsync(jobName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the properties of a Container Apps Job. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName} + /// + /// + /// Operation Id + /// Jobs_Get + /// + /// + /// + /// The instance the method will execute against. + /// Name of the Container Apps Job. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public static Response GetContainerAppJob(this ResourceGroupResource resourceGroupResource, string jobName, CancellationToken cancellationToken = default) + { + return resourceGroupResource.GetContainerAppJobs().Get(jobName, cancellationToken); + } + /// Gets a collection of ContainerAppManagedEnvironmentResources in the ResourceGroupResource. /// The instance the method will execute against. /// An object representing collection of ContainerAppManagedEnvironmentResources and their operations over a ContainerAppManagedEnvironmentResource. @@ -732,6 +826,48 @@ public static Pageable GetContainerApps(this SubscriptionR return GetSubscriptionResourceExtensionClient(subscriptionResource).GetContainerApps(cancellationToken); } + /// + /// Get the Container Apps Jobs in a given subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.App/jobs + /// + /// + /// Operation Id + /// Jobs_ListBySubscription + /// + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetContainerAppJobsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetContainerAppJobsAsync(cancellationToken); + } + + /// + /// Get the Container Apps Jobs in a given subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.App/jobs + /// + /// + /// Operation Id + /// Jobs_ListBySubscription + /// + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetContainerAppJobs(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetContainerAppJobs(cancellationToken); + } + /// /// Get all Managed Environments for a subscription. /// diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs index 46d71d3cd903..9e0f9540380d 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs @@ -45,6 +45,13 @@ public virtual ContainerAppCollection GetContainerApps() return GetCachedClient(Client => new ContainerAppCollection(Client, Id)); } + /// Gets a collection of ContainerAppJobResources in the ResourceGroupResource. + /// An object representing collection of ContainerAppJobResources and their operations over a ContainerAppJobResource. + public virtual ContainerAppJobCollection GetContainerAppJobs() + { + return GetCachedClient(Client => new ContainerAppJobCollection(Client, Id)); + } + /// Gets a collection of ContainerAppManagedEnvironmentResources in the ResourceGroupResource. /// An object representing collection of ContainerAppManagedEnvironmentResources and their operations over a ContainerAppManagedEnvironmentResource. public virtual ContainerAppManagedEnvironmentCollection GetContainerAppManagedEnvironments() diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs index c3214f373105..1d60294e7bf0 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs @@ -25,6 +25,8 @@ internal partial class SubscriptionResourceExtensionClient : ArmResource private ConnectedEnvironmentsRestOperations _containerAppConnectedEnvironmentConnectedEnvironmentsRestClient; private ClientDiagnostics _containerAppClientDiagnostics; private ContainerAppsRestOperations _containerAppRestClient; + private ClientDiagnostics _containerAppJobJobsClientDiagnostics; + private JobsRestOperations _containerAppJobJobsRestClient; private ClientDiagnostics _containerAppManagedEnvironmentManagedEnvironmentsClientDiagnostics; private ManagedEnvironmentsRestOperations _containerAppManagedEnvironmentManagedEnvironmentsRestClient; @@ -48,6 +50,8 @@ internal SubscriptionResourceExtensionClient(ArmClient client, ResourceIdentifie private ConnectedEnvironmentsRestOperations ContainerAppConnectedEnvironmentConnectedEnvironmentsRestClient => _containerAppConnectedEnvironmentConnectedEnvironmentsRestClient ??= new ConnectedEnvironmentsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(ContainerAppConnectedEnvironmentResource.ResourceType)); private ClientDiagnostics ContainerAppClientDiagnostics => _containerAppClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.AppContainers", ContainerAppResource.ResourceType.Namespace, Diagnostics); private ContainerAppsRestOperations ContainerAppRestClient => _containerAppRestClient ??= new ContainerAppsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(ContainerAppResource.ResourceType)); + private ClientDiagnostics ContainerAppJobJobsClientDiagnostics => _containerAppJobJobsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.AppContainers", ContainerAppJobResource.ResourceType.Namespace, Diagnostics); + private JobsRestOperations ContainerAppJobJobsRestClient => _containerAppJobJobsRestClient ??= new JobsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(ContainerAppJobResource.ResourceType)); private ClientDiagnostics ContainerAppManagedEnvironmentManagedEnvironmentsClientDiagnostics => _containerAppManagedEnvironmentManagedEnvironmentsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.AppContainers", ContainerAppManagedEnvironmentResource.ResourceType.Namespace, Diagnostics); private ManagedEnvironmentsRestOperations ContainerAppManagedEnvironmentManagedEnvironmentsRestClient => _containerAppManagedEnvironmentManagedEnvironmentsRestClient ??= new ManagedEnvironmentsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(ContainerAppManagedEnvironmentResource.ResourceType)); @@ -235,6 +239,50 @@ public virtual Pageable GetContainerApps(CancellationToken return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ContainerAppResource(Client, ContainerAppData.DeserializeContainerAppData(e)), ContainerAppClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetContainerApps", "value", "nextLink", cancellationToken); } + /// + /// Get the Container Apps Jobs in a given subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.App/jobs + /// + /// + /// Operation Id + /// Jobs_ListBySubscription + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetContainerAppJobsAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => ContainerAppJobJobsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ContainerAppJobJobsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ContainerAppJobResource(Client, ContainerAppJobData.DeserializeContainerAppJobData(e)), ContainerAppJobJobsClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetContainerAppJobs", "value", "nextLink", cancellationToken); + } + + /// + /// Get the Container Apps Jobs in a given subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.App/jobs + /// + /// + /// Operation Id + /// Jobs_ListBySubscription + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetContainerAppJobs(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => ContainerAppJobJobsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ContainerAppJobJobsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ContainerAppJobResource(Client, ContainerAppJobData.DeserializeContainerAppJobData(e)), ContainerAppJobJobsClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetContainerAppJobs", "value", "nextLink", cancellationToken); + } + /// /// Get all Managed Environments for a subscription. /// diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LongRunningOperation/ContainerAppJobExecutionBaseOperationSource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LongRunningOperation/ContainerAppJobExecutionBaseOperationSource.cs new file mode 100644 index 000000000000..4d43cae4d439 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LongRunningOperation/ContainerAppJobExecutionBaseOperationSource.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager.AppContainers.Models; + +namespace Azure.ResourceManager.AppContainers +{ + internal class ContainerAppJobExecutionBaseOperationSource : IOperationSource + { + ContainerAppJobExecutionBase IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + return ContainerAppJobExecutionBase.DeserializeContainerAppJobExecutionBase(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + return ContainerAppJobExecutionBase.DeserializeContainerAppJobExecutionBase(document.RootElement); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LongRunningOperation/ContainerAppJobExecutionsOperationSource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LongRunningOperation/ContainerAppJobExecutionsOperationSource.cs new file mode 100644 index 000000000000..5d2aeeecb62d --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LongRunningOperation/ContainerAppJobExecutionsOperationSource.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager.AppContainers.Models; + +namespace Azure.ResourceManager.AppContainers +{ + internal class ContainerAppJobExecutionsOperationSource : IOperationSource + { + ContainerAppJobExecutions IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + return ContainerAppJobExecutions.DeserializeContainerAppJobExecutions(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + return ContainerAppJobExecutions.DeserializeContainerAppJobExecutions(document.RootElement); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LongRunningOperation/ContainerAppJobOperationSource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LongRunningOperation/ContainerAppJobOperationSource.cs new file mode 100644 index 000000000000..fd88858c1633 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LongRunningOperation/ContainerAppJobOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.AppContainers +{ + internal class ContainerAppJobOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal ContainerAppJobOperationSource(ArmClient client) + { + _client = client; + } + + ContainerAppJobResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = ContainerAppJobData.DeserializeContainerAppJobData(document.RootElement); + return new ContainerAppJobResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = ContainerAppJobData.DeserializeContainerAppJobData(document.RootElement); + return new ContainerAppJobResource(_client, data); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LongRunningOperation/ContainerAppManagedCertificateOperationSource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LongRunningOperation/ContainerAppManagedCertificateOperationSource.cs new file mode 100644 index 000000000000..314bfbdd12b2 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LongRunningOperation/ContainerAppManagedCertificateOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.AppContainers +{ + internal class ContainerAppManagedCertificateOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal ContainerAppManagedCertificateOperationSource(ArmClient client) + { + _client = client; + } + + ContainerAppManagedCertificateResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = ContainerAppManagedCertificateData.DeserializeContainerAppManagedCertificateData(document.RootElement); + return new ContainerAppManagedCertificateResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = ContainerAppManagedCertificateData.DeserializeContainerAppManagedCertificateData(document.RootElement); + return new ContainerAppManagedCertificateResource(_client, data); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/Affinity.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/Affinity.cs new file mode 100644 index 000000000000..d0544c51fd41 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/Affinity.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Sticky Session Affinity. + public readonly partial struct Affinity : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public Affinity(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string StickyValue = "sticky"; + private const string NoneValue = "none"; + + /// sticky. + public static Affinity Sticky { get; } = new Affinity(StickyValue); + /// none. + public static Affinity None { get; } = new Affinity(NoneValue); + /// Determines if two values are the same. + public static bool operator ==(Affinity left, Affinity right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(Affinity left, Affinity right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator Affinity(string value) => new Affinity(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is Affinity other && Equals(other); + /// + public bool Equals(Affinity other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/AppContainersSkuName.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/AppContainersSkuName.cs deleted file mode 100644 index 619e1a93817b..000000000000 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/AppContainersSkuName.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.AppContainers.Models -{ - /// Name of the Sku. - public readonly partial struct AppContainersSkuName : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public AppContainersSkuName(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ConsumptionValue = "Consumption"; - private const string PremiumValue = "Premium"; - - /// Consumption SKU of Managed Environment. - public static AppContainersSkuName Consumption { get; } = new AppContainersSkuName(ConsumptionValue); - /// Premium SKU of Managed Environment. - public static AppContainersSkuName Premium { get; } = new AppContainersSkuName(PremiumValue); - /// Determines if two values are the same. - public static bool operator ==(AppContainersSkuName left, AppContainersSkuName right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(AppContainersSkuName left, AppContainersSkuName right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator AppContainersSkuName(string value) => new AppContainersSkuName(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is AppContainersSkuName other && Equals(other); - /// - public bool Equals(AppContainersSkuName other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BillingMeterCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BillingMeterCollection.cs index 43ec171e636d..06af4afd0286 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BillingMeterCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BillingMeterCollection.cs @@ -12,7 +12,7 @@ namespace Azure.ResourceManager.AppContainers.Models { - /// Collection of premium workload billing meters. + /// Collection of billing meters. internal partial class BillingMeterCollection { /// Initializes a new instance of BillingMeterCollection. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppAvailableWorkloadProfile.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppAvailableWorkloadProfile.cs index 5b066f711fcd..b9c41af213c8 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppAvailableWorkloadProfile.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppAvailableWorkloadProfile.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.AppContainers.Models { - /// A premium workload profile. + /// A workload profile with specific hardware configure to run container apps. public partial class ContainerAppAvailableWorkloadProfile : ResourceData { /// Initializes a new instance of ContainerAppAvailableWorkloadProfile. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppAvailableWorkloadProfileProperties.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppAvailableWorkloadProfileProperties.Serialization.cs index db96d8cce1f2..b641d2ff2e23 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppAvailableWorkloadProfileProperties.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppAvailableWorkloadProfileProperties.Serialization.cs @@ -15,10 +15,10 @@ public partial class ContainerAppAvailableWorkloadProfileProperties : IUtf8JsonS void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(BillingMeterCategory)) + if (Optional.IsDefined(Category)) { - writer.WritePropertyName("billingMeterCategory"u8); - writer.WriteStringValue(BillingMeterCategory.Value.ToString()); + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category); } if (Optional.IsDefined(Applicability)) { @@ -49,20 +49,16 @@ internal static ContainerAppAvailableWorkloadProfileProperties DeserializeContai { return null; } - Optional billingMeterCategory = default; + Optional category = default; Optional applicability = default; Optional cores = default; Optional memoryGiB = default; Optional displayName = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("billingMeterCategory"u8)) + if (property.NameEquals("category"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - billingMeterCategory = new ContainerAppBillingMeterCategory(property.Value.GetString()); + category = property.Value.GetString(); continue; } if (property.NameEquals("applicability"u8)) @@ -98,7 +94,7 @@ internal static ContainerAppAvailableWorkloadProfileProperties DeserializeContai continue; } } - return new ContainerAppAvailableWorkloadProfileProperties(Optional.ToNullable(billingMeterCategory), Optional.ToNullable(applicability), Optional.ToNullable(cores), Optional.ToNullable(memoryGiB), displayName.Value); + return new ContainerAppAvailableWorkloadProfileProperties(category.Value, Optional.ToNullable(applicability), Optional.ToNullable(cores), Optional.ToNullable(memoryGiB), displayName.Value); } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppAvailableWorkloadProfileProperties.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppAvailableWorkloadProfileProperties.cs index f9f71fbf2d25..b3a58ebf7399 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppAvailableWorkloadProfileProperties.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppAvailableWorkloadProfileProperties.cs @@ -16,22 +16,22 @@ public ContainerAppAvailableWorkloadProfileProperties() } /// Initializes a new instance of ContainerAppAvailableWorkloadProfileProperties. - /// Used to map workload profile types to billing meter. + /// Used to categorize workload profiles. /// indicates whether the profile is default for the location. /// Number of cores in CPU. /// Memory in GiB. /// The everyday name of the workload profile. - internal ContainerAppAvailableWorkloadProfileProperties(ContainerAppBillingMeterCategory? billingMeterCategory, ContainerAppAvailableWorkloadProfileApplicability? applicability, int? cores, int? memoryInGiB, string displayName) + internal ContainerAppAvailableWorkloadProfileProperties(string category, ContainerAppAvailableWorkloadProfileApplicability? applicability, int? cores, int? memoryInGiB, string displayName) { - BillingMeterCategory = billingMeterCategory; + Category = category; Applicability = applicability; Cores = cores; MemoryInGiB = memoryInGiB; DisplayName = displayName; } - /// Used to map workload profile types to billing meter. - public ContainerAppBillingMeterCategory? BillingMeterCategory { get; set; } + /// Used to categorize workload profiles. + public string Category { get; set; } /// indicates whether the profile is default for the location. public ContainerAppAvailableWorkloadProfileApplicability? Applicability { get; set; } /// Number of cores in CPU. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppBillingMeter.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppBillingMeter.cs index 5ca3d5c7e67e..a903e72a6fd6 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppBillingMeter.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppBillingMeter.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.AppContainers.Models { - /// A premium billing meter. + /// Billing meter. public partial class ContainerAppBillingMeter : ResourceData { /// Initializes a new instance of ContainerAppBillingMeter. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppBillingMeterProperties.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppBillingMeterProperties.Serialization.cs index 66620c9c8f57..19567e9bfa68 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppBillingMeterProperties.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppBillingMeterProperties.Serialization.cs @@ -15,10 +15,10 @@ public partial class ContainerAppBillingMeterProperties : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(Category)) + if (Optional.IsDefined(WorkloadProfileCategory)) { writer.WritePropertyName("category"u8); - writer.WriteStringValue(Category.Value.ToString()); + writer.WriteStringValue(WorkloadProfileCategory); } if (Optional.IsDefined(MeterType)) { @@ -39,18 +39,14 @@ internal static ContainerAppBillingMeterProperties DeserializeContainerAppBillin { return null; } - Optional category = default; + Optional category = default; Optional meterType = default; Optional displayName = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("category"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - category = new ContainerAppBillingMeterCategory(property.Value.GetString()); + category = property.Value.GetString(); continue; } if (property.NameEquals("meterType"u8)) @@ -64,7 +60,7 @@ internal static ContainerAppBillingMeterProperties DeserializeContainerAppBillin continue; } } - return new ContainerAppBillingMeterProperties(Optional.ToNullable(category), meterType.Value, displayName.Value); + return new ContainerAppBillingMeterProperties(category.Value, meterType.Value, displayName.Value); } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppBillingMeterProperties.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppBillingMeterProperties.cs index 990d600c4676..d52369d4fabd 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppBillingMeterProperties.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppBillingMeterProperties.cs @@ -16,18 +16,18 @@ public ContainerAppBillingMeterProperties() } /// Initializes a new instance of ContainerAppBillingMeterProperties. - /// Used to map workload profile types to billing meter. + /// Used to categorize billing meters. /// Billing meter type. /// The everyday name of the billing meter. - internal ContainerAppBillingMeterProperties(ContainerAppBillingMeterCategory? category, string meterType, string displayName) + internal ContainerAppBillingMeterProperties(string workloadProfileCategory, string meterType, string displayName) { - Category = category; + WorkloadProfileCategory = workloadProfileCategory; MeterType = meterType; DisplayName = displayName; } - /// Used to map workload profile types to billing meter. - public ContainerAppBillingMeterCategory? Category { get; set; } + /// Used to categorize billing meters. + public string WorkloadProfileCategory { get; set; } /// Billing meter type. public string MeterType { get; set; } /// The everyday name of the billing meter. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppCorsPolicy.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppCorsPolicy.cs index c07e750315ca..cdfb0b2e4ae0 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppCorsPolicy.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppCorsPolicy.cs @@ -16,7 +16,7 @@ namespace Azure.ResourceManager.AppContainers.Models public partial class ContainerAppCorsPolicy { /// Initializes a new instance of ContainerAppCorsPolicy. - /// allowed origins. + /// Specifies the content for the access-control-allow-origins header. /// is null. public ContainerAppCorsPolicy(IEnumerable allowedOrigins) { @@ -29,12 +29,12 @@ public ContainerAppCorsPolicy(IEnumerable allowedOrigins) } /// Initializes a new instance of ContainerAppCorsPolicy. - /// allowed origins. - /// allowed HTTP methods. - /// allowed HTTP headers. - /// expose HTTP headers. - /// max time client can cache the result. - /// allow credential or not. + /// Specifies the content for the access-control-allow-origins header. + /// Specifies the content for the access-control-allow-methods header. + /// Specifies the content for the access-control-allow-headers header. + /// Specifies the content for the access-control-expose-headers header. + /// Specifies the content for the access-control-max-age header. + /// Specifies whether the resource allows credentials. internal ContainerAppCorsPolicy(IList allowedOrigins, IList allowedMethods, IList allowedHeaders, IList exposeHeaders, int? maxAge, bool? allowCredentials) { AllowedOrigins = allowedOrigins; @@ -45,17 +45,17 @@ internal ContainerAppCorsPolicy(IList allowedOrigins, IList allo AllowCredentials = allowCredentials; } - /// allowed origins. + /// Specifies the content for the access-control-allow-origins header. public IList AllowedOrigins { get; } - /// allowed HTTP methods. + /// Specifies the content for the access-control-allow-methods header. public IList AllowedMethods { get; } - /// allowed HTTP headers. + /// Specifies the content for the access-control-allow-headers header. public IList AllowedHeaders { get; } - /// expose HTTP headers. + /// Specifies the content for the access-control-expose-headers header. public IList ExposeHeaders { get; } - /// max time client can cache the result. + /// Specifies the content for the access-control-max-age header. public int? MaxAge { get; set; } - /// allow credential or not. + /// Specifies whether the resource allows credentials. public bool? AllowCredentials { get; set; } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppCustomDomain.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppCustomDomain.Serialization.cs index a08e9bce48fa..fcd5a6ad9626 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppCustomDomain.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppCustomDomain.Serialization.cs @@ -22,8 +22,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("bindingType"u8); writer.WriteStringValue(BindingType.Value.ToString()); } - writer.WritePropertyName("certificateId"u8); - writer.WriteStringValue(CertificateId); + if (Optional.IsDefined(CertificateId)) + { + writer.WritePropertyName("certificateId"u8); + writer.WriteStringValue(CertificateId); + } writer.WriteEndObject(); } @@ -35,7 +38,7 @@ internal static ContainerAppCustomDomain DeserializeContainerAppCustomDomain(Jso } string name = default; Optional bindingType = default; - ResourceIdentifier certificateId = default; + Optional certificateId = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("name"u8)) @@ -54,11 +57,15 @@ internal static ContainerAppCustomDomain DeserializeContainerAppCustomDomain(Jso } if (property.NameEquals("certificateId"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } certificateId = new ResourceIdentifier(property.Value.GetString()); continue; } } - return new ContainerAppCustomDomain(name, Optional.ToNullable(bindingType), certificateId); + return new ContainerAppCustomDomain(name, Optional.ToNullable(bindingType), certificateId.Value); } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppCustomDomain.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppCustomDomain.cs index fe202036aa94..656c32d18604 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppCustomDomain.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppCustomDomain.cs @@ -15,15 +15,12 @@ public partial class ContainerAppCustomDomain { /// Initializes a new instance of ContainerAppCustomDomain. /// Hostname. - /// Resource Id of the Certificate to be bound to this hostname. Must exist in the Managed Environment. - /// or is null. - public ContainerAppCustomDomain(string name, ResourceIdentifier certificateId) + /// is null. + public ContainerAppCustomDomain(string name) { Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(certificateId, nameof(certificateId)); Name = name; - CertificateId = certificateId; } /// Initializes a new instance of ContainerAppCustomDomain. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppData.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppData.Serialization.cs index 14f8445c04fc..5cc1f26833c6 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppData.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppData.Serialization.cs @@ -31,6 +31,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } + if (Optional.IsDefined(ManagedBy)) + { + writer.WritePropertyName("managedBy"u8); + writer.WriteStringValue(ManagedBy); + } if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -56,10 +61,10 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("environmentId"u8); writer.WriteStringValue(EnvironmentId); } - if (Optional.IsDefined(WorkloadProfileType)) + if (Optional.IsDefined(WorkloadProfileName)) { - writer.WritePropertyName("workloadProfileType"u8); - writer.WriteStringValue(WorkloadProfileType); + writer.WritePropertyName("workloadProfileName"u8); + writer.WriteStringValue(WorkloadProfileName); } if (Optional.IsDefined(Configuration)) { @@ -83,6 +88,7 @@ internal static ContainerAppData DeserializeContainerAppData(JsonElement element } Optional extendedLocation = default; Optional identity = default; + Optional managedBy = default; Optional> tags = default; AzureLocation location = default; ResourceIdentifier id = default; @@ -92,7 +98,7 @@ internal static ContainerAppData DeserializeContainerAppData(JsonElement element Optional provisioningState = default; Optional managedEnvironmentId = default; Optional environmentId = default; - Optional workloadProfileType = default; + Optional workloadProfileName = default; Optional latestRevisionName = default; Optional latestReadyRevisionName = default; Optional latestRevisionFqdn = default; @@ -122,6 +128,11 @@ internal static ContainerAppData DeserializeContainerAppData(JsonElement element identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); continue; } + if (property.NameEquals("managedBy"u8)) + { + managedBy = property.Value.GetString(); + continue; + } if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -201,9 +212,9 @@ internal static ContainerAppData DeserializeContainerAppData(JsonElement element environmentId = new ResourceIdentifier(property0.Value.GetString()); continue; } - if (property0.NameEquals("workloadProfileType"u8)) + if (property0.NameEquals("workloadProfileName"u8)) { - workloadProfileType = property0.Value.GetString(); + workloadProfileName = property0.Value.GetString(); continue; } if (property0.NameEquals("latestRevisionName"u8)) @@ -278,7 +289,7 @@ internal static ContainerAppData DeserializeContainerAppData(JsonElement element continue; } } - return new ContainerAppData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, extendedLocation.Value, identity, Optional.ToNullable(provisioningState), managedEnvironmentId.Value, environmentId.Value, workloadProfileType.Value, latestRevisionName.Value, latestReadyRevisionName.Value, latestRevisionFqdn.Value, customDomainVerificationId.Value, configuration.Value, template.Value, Optional.ToList(outboundIPAddresses), eventStreamEndpoint.Value); + return new ContainerAppData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, extendedLocation.Value, identity, managedBy.Value, Optional.ToNullable(provisioningState), managedEnvironmentId.Value, environmentId.Value, workloadProfileName.Value, latestRevisionName.Value, latestReadyRevisionName.Value, latestRevisionFqdn.Value, customDomainVerificationId.Value, configuration.Value, template.Value, Optional.ToList(outboundIPAddresses), eventStreamEndpoint.Value); } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppIngressConfiguration.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppIngressConfiguration.Serialization.cs index 9e4d7e9fcbb3..5290c6acc49c 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppIngressConfiguration.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppIngressConfiguration.Serialization.cs @@ -71,6 +71,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WriteEndArray(); } + if (Optional.IsDefined(StickySessions)) + { + writer.WritePropertyName("stickySessions"u8); + writer.WriteObjectValue(StickySessions); + } if (Optional.IsDefined(ClientCertificateMode)) { writer.WritePropertyName("clientCertificateMode"u8); @@ -99,6 +104,7 @@ internal static ContainerAppIngressConfiguration DeserializeContainerAppIngressC Optional> customDomains = default; Optional allowInsecure = default; Optional> ipSecurityRestrictions = default; + Optional stickySessions = default; Optional clientCertificateMode = default; Optional corsPolicy = default; foreach (var property in element.EnumerateObject()) @@ -195,6 +201,15 @@ internal static ContainerAppIngressConfiguration DeserializeContainerAppIngressC ipSecurityRestrictions = array; continue; } + if (property.NameEquals("stickySessions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + stickySessions = IngressStickySessions.DeserializeIngressStickySessions(property.Value); + continue; + } if (property.NameEquals("clientCertificateMode"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -214,7 +229,7 @@ internal static ContainerAppIngressConfiguration DeserializeContainerAppIngressC continue; } } - return new ContainerAppIngressConfiguration(fqdn.Value, Optional.ToNullable(external), Optional.ToNullable(targetPort), Optional.ToNullable(exposedPort), Optional.ToNullable(transport), Optional.ToList(traffic), Optional.ToList(customDomains), Optional.ToNullable(allowInsecure), Optional.ToList(ipSecurityRestrictions), Optional.ToNullable(clientCertificateMode), corsPolicy.Value); + return new ContainerAppIngressConfiguration(fqdn.Value, Optional.ToNullable(external), Optional.ToNullable(targetPort), Optional.ToNullable(exposedPort), Optional.ToNullable(transport), Optional.ToList(traffic), Optional.ToList(customDomains), Optional.ToNullable(allowInsecure), Optional.ToList(ipSecurityRestrictions), stickySessions.Value, Optional.ToNullable(clientCertificateMode), corsPolicy.Value); } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppIngressConfiguration.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppIngressConfiguration.cs index 92cb5bdc48a4..29dd3e569b77 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppIngressConfiguration.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppIngressConfiguration.cs @@ -31,9 +31,10 @@ public ContainerAppIngressConfiguration() /// custom domain bindings for Container Apps' hostnames. /// Bool indicating if HTTP connections to is allowed. If set to false HTTP connections are automatically redirected to HTTPS connections. /// Rules to restrict incoming IP address. + /// Sticky Sessions for Single Revision Mode. /// Client certificate mode for mTLS authentication. Ignore indicates server drops client certificate on forwarding. Accept indicates server forwards client certificate but does not require a client certificate. Require indicates server requires a client certificate. /// CORS policy for container app. - internal ContainerAppIngressConfiguration(string fqdn, bool? external, int? targetPort, int? exposedPort, ContainerAppIngressTransportMethod? transport, IList traffic, IList customDomains, bool? allowInsecure, IList ipSecurityRestrictions, ContainerAppIngressClientCertificateMode? clientCertificateMode, ContainerAppCorsPolicy corsPolicy) + internal ContainerAppIngressConfiguration(string fqdn, bool? external, int? targetPort, int? exposedPort, ContainerAppIngressTransportMethod? transport, IList traffic, IList customDomains, bool? allowInsecure, IList ipSecurityRestrictions, IngressStickySessions stickySessions, ContainerAppIngressClientCertificateMode? clientCertificateMode, ContainerAppCorsPolicy corsPolicy) { Fqdn = fqdn; External = external; @@ -44,6 +45,7 @@ internal ContainerAppIngressConfiguration(string fqdn, bool? external, int? targ CustomDomains = customDomains; AllowInsecure = allowInsecure; IPSecurityRestrictions = ipSecurityRestrictions; + StickySessions = stickySessions; ClientCertificateMode = clientCertificateMode; CorsPolicy = corsPolicy; } @@ -66,6 +68,20 @@ internal ContainerAppIngressConfiguration(string fqdn, bool? external, int? targ public bool? AllowInsecure { get; set; } /// Rules to restrict incoming IP address. public IList IPSecurityRestrictions { get; } + /// Sticky Sessions for Single Revision Mode. + internal IngressStickySessions StickySessions { get; set; } + /// Sticky Session Affinity. + public Affinity? StickySessionsAffinity + { + get => StickySessions is null ? default : StickySessions.Affinity; + set + { + if (StickySessions is null) + StickySessions = new IngressStickySessions(); + StickySessions.Affinity = value; + } + } + /// Client certificate mode for mTLS authentication. Ignore indicates server drops client certificate on forwarding. Accept indicates server forwards client certificate but does not require a client certificate. Require indicates server requires a client certificate. public ContainerAppIngressClientCertificateMode? ClientCertificateMode { get; set; } /// CORS policy for container app. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobConfiguration.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobConfiguration.Serialization.cs new file mode 100644 index 000000000000..8c0816db4101 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobConfiguration.Serialization.cs @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class ContainerAppJobConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Secrets)) + { + writer.WritePropertyName("secrets"u8); + writer.WriteStartArray(); + foreach (var item in Secrets) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("triggerType"u8); + writer.WriteStringValue(TriggerType.ToString()); + writer.WritePropertyName("replicaTimeout"u8); + writer.WriteNumberValue(ReplicaTimeout); + if (Optional.IsDefined(ReplicaRetryLimit)) + { + writer.WritePropertyName("replicaRetryLimit"u8); + writer.WriteNumberValue(ReplicaRetryLimit.Value); + } + if (Optional.IsDefined(ManualTriggerConfig)) + { + writer.WritePropertyName("manualTriggerConfig"u8); + writer.WriteObjectValue(ManualTriggerConfig); + } + if (Optional.IsDefined(ScheduleTriggerConfig)) + { + writer.WritePropertyName("scheduleTriggerConfig"u8); + writer.WriteObjectValue(ScheduleTriggerConfig); + } + if (Optional.IsCollectionDefined(Registries)) + { + writer.WritePropertyName("registries"u8); + writer.WriteStartArray(); + foreach (var item in Registries) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static ContainerAppJobConfiguration DeserializeContainerAppJobConfiguration(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> secrets = default; + ContainerAppJobTriggerType triggerType = default; + int replicaTimeout = default; + Optional replicaRetryLimit = default; + Optional manualTriggerConfig = default; + Optional scheduleTriggerConfig = default; + Optional> registries = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("secrets"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ContainerAppWritableSecret.DeserializeContainerAppWritableSecret(item)); + } + secrets = array; + continue; + } + if (property.NameEquals("triggerType"u8)) + { + triggerType = new ContainerAppJobTriggerType(property.Value.GetString()); + continue; + } + if (property.NameEquals("replicaTimeout"u8)) + { + replicaTimeout = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("replicaRetryLimit"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + replicaRetryLimit = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("manualTriggerConfig"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + manualTriggerConfig = JobConfigurationManualTriggerConfig.DeserializeJobConfigurationManualTriggerConfig(property.Value); + continue; + } + if (property.NameEquals("scheduleTriggerConfig"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scheduleTriggerConfig = JobConfigurationScheduleTriggerConfig.DeserializeJobConfigurationScheduleTriggerConfig(property.Value); + continue; + } + if (property.NameEquals("registries"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ContainerAppRegistryCredentials.DeserializeContainerAppRegistryCredentials(item)); + } + registries = array; + continue; + } + } + return new ContainerAppJobConfiguration(Optional.ToList(secrets), triggerType, replicaTimeout, Optional.ToNullable(replicaRetryLimit), manualTriggerConfig.Value, scheduleTriggerConfig.Value, Optional.ToList(registries)); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobConfiguration.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobConfiguration.cs new file mode 100644 index 000000000000..b83049f56081 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobConfiguration.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Non versioned Container Apps Job configuration properties. + public partial class ContainerAppJobConfiguration + { + /// Initializes a new instance of ContainerAppJobConfiguration. + /// Trigger type of the job. + /// Maximum number of seconds a replica is allowed to run. + public ContainerAppJobConfiguration(ContainerAppJobTriggerType triggerType, int replicaTimeout) + { + Secrets = new ChangeTrackingList(); + TriggerType = triggerType; + ReplicaTimeout = replicaTimeout; + Registries = new ChangeTrackingList(); + } + + /// Initializes a new instance of ContainerAppJobConfiguration. + /// Collection of secrets used by a Container Apps Job. + /// Trigger type of the job. + /// Maximum number of seconds a replica is allowed to run. + /// Maximum number of retries before failing the job. + /// Manual trigger configuration for a single execution job. Properties replicaCompletionCount and parallelism would be set to 1 by default. + /// Cron formatted repeating trigger schedule ("* * * * *") for cronjobs. Properties completions and parallelism would be set to 1 by default. + /// Collection of private container registry credentials used by a Container apps job. + internal ContainerAppJobConfiguration(IList secrets, ContainerAppJobTriggerType triggerType, int replicaTimeout, int? replicaRetryLimit, JobConfigurationManualTriggerConfig manualTriggerConfig, JobConfigurationScheduleTriggerConfig scheduleTriggerConfig, IList registries) + { + Secrets = secrets; + TriggerType = triggerType; + ReplicaTimeout = replicaTimeout; + ReplicaRetryLimit = replicaRetryLimit; + ManualTriggerConfig = manualTriggerConfig; + ScheduleTriggerConfig = scheduleTriggerConfig; + Registries = registries; + } + + /// Collection of secrets used by a Container Apps Job. + public IList Secrets { get; } + /// Trigger type of the job. + public ContainerAppJobTriggerType TriggerType { get; set; } + /// Maximum number of seconds a replica is allowed to run. + public int ReplicaTimeout { get; set; } + /// Maximum number of retries before failing the job. + public int? ReplicaRetryLimit { get; set; } + /// Manual trigger configuration for a single execution job. Properties replicaCompletionCount and parallelism would be set to 1 by default. + public JobConfigurationManualTriggerConfig ManualTriggerConfig { get; set; } + /// Cron formatted repeating trigger schedule ("* * * * *") for cronjobs. Properties completions and parallelism would be set to 1 by default. + public JobConfigurationScheduleTriggerConfig ScheduleTriggerConfig { get; set; } + /// Collection of private container registry credentials used by a Container apps job. + public IList Registries { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobData.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobData.Serialization.cs new file mode 100644 index 000000000000..36c1ada0c6fe --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobData.Serialization.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppContainers.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppContainers +{ + public partial class ContainerAppJobData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + JsonSerializer.Serialize(writer, Identity, serializeOptions); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(EnvironmentId)) + { + writer.WritePropertyName("environmentId"u8); + writer.WriteStringValue(EnvironmentId); + } + if (Optional.IsDefined(WorkloadProfileName)) + { + writer.WritePropertyName("workloadProfileName"u8); + writer.WriteStringValue(WorkloadProfileName); + } + if (Optional.IsDefined(Configuration)) + { + writer.WritePropertyName("configuration"u8); + writer.WriteObjectValue(Configuration); + } + if (Optional.IsDefined(Template)) + { + writer.WritePropertyName("template"u8); + writer.WriteObjectValue(Template); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + + internal static ContainerAppJobData DeserializeContainerAppJobData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional identity = default; + Optional> tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + Optional provisioningState = default; + Optional environmentId = default; + Optional workloadProfileName = default; + Optional configuration = default; + Optional template = default; + Optional> outboundIPAddresses = default; + Optional eventStreamEndpoint = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ContainerAppJobProvisioningState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("environmentId"u8)) + { + environmentId = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("workloadProfileName"u8)) + { + workloadProfileName = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("configuration"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + configuration = ContainerAppJobConfiguration.DeserializeContainerAppJobConfiguration(property0.Value); + continue; + } + if (property0.NameEquals("template"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + template = ContainerAppJobTemplate.DeserializeContainerAppJobTemplate(property0.Value); + continue; + } + if (property0.NameEquals("outboundIpAddresses"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + outboundIPAddresses = array; + continue; + } + if (property0.NameEquals("eventStreamEndpoint"u8)) + { + eventStreamEndpoint = property0.Value.GetString(); + continue; + } + } + continue; + } + } + return new ContainerAppJobData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, identity, Optional.ToNullable(provisioningState), environmentId.Value, workloadProfileName.Value, configuration.Value, template.Value, Optional.ToList(outboundIPAddresses), eventStreamEndpoint.Value); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobExecution.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobExecution.Serialization.cs new file mode 100644 index 000000000000..aa943909d283 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobExecution.Serialization.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class ContainerAppJobExecution + { + internal static ContainerAppJobExecution DeserializeContainerAppJobExecution(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional status = default; + Optional startTime = default; + Optional endTime = default; + Optional template = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new JobExecutionRunningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("startTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("template"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + template = ContainerAppJobExecutionTemplate.DeserializeContainerAppJobExecutionTemplate(property.Value); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + } + return new ContainerAppJobExecution(id, name, type, systemData.Value, Optional.ToNullable(status), Optional.ToNullable(startTime), Optional.ToNullable(endTime), template.Value); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobExecution.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobExecution.cs new file mode 100644 index 000000000000..ea7733bba123 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobExecution.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Container Apps Jobs execution. + public partial class ContainerAppJobExecution : ResourceData + { + /// Initializes a new instance of ContainerAppJobExecution. + internal ContainerAppJobExecution() + { + } + + /// Initializes a new instance of ContainerAppJobExecution. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Current running State of the job. + /// Job execution start time. + /// Job execution start time. + /// Job's execution container. + internal ContainerAppJobExecution(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, JobExecutionRunningState? status, DateTimeOffset? startOn, DateTimeOffset? endOn, ContainerAppJobExecutionTemplate template) : base(id, name, resourceType, systemData) + { + Status = status; + StartOn = startOn; + EndOn = endOn; + Template = template; + } + + /// Current running State of the job. + public JobExecutionRunningState? Status { get; } + /// Job execution start time. + public DateTimeOffset? StartOn { get; } + /// Job execution start time. + public DateTimeOffset? EndOn { get; } + /// Job's execution container. + public ContainerAppJobExecutionTemplate Template { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobExecutionBase.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobExecutionBase.Serialization.cs new file mode 100644 index 000000000000..64c91f7bb429 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobExecutionBase.Serialization.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class ContainerAppJobExecutionBase : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + writer.WriteEndObject(); + } + + internal static ContainerAppJobExecutionBase DeserializeContainerAppJobExecutionBase(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional name = default; + Optional id = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + } + return new ContainerAppJobExecutionBase(name.Value, id.Value); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobExecutionBase.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobExecutionBase.cs new file mode 100644 index 000000000000..dc0061226f32 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobExecutionBase.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Container App's Job execution name. + public partial class ContainerAppJobExecutionBase + { + /// Initializes a new instance of ContainerAppJobExecutionBase. + public ContainerAppJobExecutionBase() + { + } + + /// Initializes a new instance of ContainerAppJobExecutionBase. + /// Job execution name. + /// Job execution Id. + internal ContainerAppJobExecutionBase(string name, string id) + { + Name = name; + Id = id; + } + + /// Job execution name. + public string Name { get; set; } + /// Job execution Id. + public string Id { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobExecutionTemplate.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobExecutionTemplate.Serialization.cs new file mode 100644 index 000000000000..810dd90a5f59 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobExecutionTemplate.Serialization.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class ContainerAppJobExecutionTemplate : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Containers)) + { + writer.WritePropertyName("containers"u8); + writer.WriteStartArray(); + foreach (var item in Containers) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(InitContainers)) + { + writer.WritePropertyName("initContainers"u8); + writer.WriteStartArray(); + foreach (var item in InitContainers) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static ContainerAppJobExecutionTemplate DeserializeContainerAppJobExecutionTemplate(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> containers = default; + Optional> initContainers = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("containers"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(JobExecutionContainer.DeserializeJobExecutionContainer(item)); + } + containers = array; + continue; + } + if (property.NameEquals("initContainers"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(JobExecutionContainer.DeserializeJobExecutionContainer(item)); + } + initContainers = array; + continue; + } + } + return new ContainerAppJobExecutionTemplate(Optional.ToList(containers), Optional.ToList(initContainers)); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobExecutionTemplate.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobExecutionTemplate.cs new file mode 100644 index 000000000000..5e98b04febdc --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobExecutionTemplate.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Job's execution template, containing container configuration for a job's execution. + public partial class ContainerAppJobExecutionTemplate + { + /// Initializes a new instance of ContainerAppJobExecutionTemplate. + public ContainerAppJobExecutionTemplate() + { + Containers = new ChangeTrackingList(); + InitContainers = new ChangeTrackingList(); + } + + /// Initializes a new instance of ContainerAppJobExecutionTemplate. + /// List of container definitions for the Container Apps Job. + /// List of specialized containers that run before job containers. + internal ContainerAppJobExecutionTemplate(IList containers, IList initContainers) + { + Containers = containers; + InitContainers = initContainers; + } + + /// List of container definitions for the Container Apps Job. + public IList Containers { get; } + /// List of specialized containers that run before job containers. + public IList InitContainers { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobExecutions.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobExecutions.Serialization.cs new file mode 100644 index 000000000000..c23dc0153c1c --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobExecutions.Serialization.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class ContainerAppJobExecutions + { + internal static ContainerAppJobExecutions DeserializeContainerAppJobExecutions(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ContainerAppJobExecution.DeserializeContainerAppJobExecution(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new ContainerAppJobExecutions(value, nextLink.Value); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobExecutions.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobExecutions.cs new file mode 100644 index 000000000000..e4188f3548c5 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobExecutions.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Container App executions collection ARM resource. + public partial class ContainerAppJobExecutions + { + /// Initializes a new instance of ContainerAppJobExecutions. + /// Collection of resources. + /// is null. + internal ContainerAppJobExecutions(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of ContainerAppJobExecutions. + /// Collection of resources. + /// Link to next page of resources. + internal ContainerAppJobExecutions(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// Collection of resources. + public IReadOnlyList Value { get; } + /// Link to next page of resources. + public string NextLink { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobPatch.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobPatch.Serialization.cs new file mode 100644 index 000000000000..0a1157b75d48 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobPatch.Serialization.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class ContainerAppJobPatch : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + JsonSerializer.Serialize(writer, Identity, serializeOptions); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobPatch.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobPatch.cs new file mode 100644 index 000000000000..4854e0af2493 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobPatch.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Container Apps Job resource specific properties. + public partial class ContainerAppJobPatch + { + /// Initializes a new instance of ContainerAppJobPatch. + public ContainerAppJobPatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Managed identities needed by a container app job to interact with other Azure services to not maintain any secrets or credentials in code. + public ManagedServiceIdentity Identity { get; set; } + /// Resource tags. + public IDictionary Tags { get; } + /// Gets or sets the properties. + public ContainerAppJobPatchProperties Properties { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobPatchProperties.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobPatchProperties.Serialization.cs new file mode 100644 index 000000000000..8a5e1d6a352a --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobPatchProperties.Serialization.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class ContainerAppJobPatchProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(EnvironmentId)) + { + writer.WritePropertyName("environmentId"u8); + writer.WriteStringValue(EnvironmentId); + } + if (Optional.IsDefined(Configuration)) + { + writer.WritePropertyName("configuration"u8); + writer.WriteObjectValue(Configuration); + } + if (Optional.IsDefined(Template)) + { + writer.WritePropertyName("template"u8); + writer.WriteObjectValue(Template); + } + if (Optional.IsCollectionDefined(OutboundIPAddresses)) + { + writer.WritePropertyName("outboundIpAddresses"u8); + writer.WriteStartArray(); + foreach (var item in OutboundIPAddresses) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(EventStreamEndpoint)) + { + writer.WritePropertyName("eventStreamEndpoint"u8); + writer.WriteStringValue(EventStreamEndpoint); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobPatchProperties.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobPatchProperties.cs new file mode 100644 index 000000000000..143200f42fe2 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobPatchProperties.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// The ContainerAppJobPatchProperties. + public partial class ContainerAppJobPatchProperties + { + /// Initializes a new instance of ContainerAppJobPatchProperties. + public ContainerAppJobPatchProperties() + { + OutboundIPAddresses = new ChangeTrackingList(); + } + + /// Resource ID of environment. + public string EnvironmentId { get; set; } + /// Container Apps Job configuration properties. + public ContainerAppJobConfiguration Configuration { get; set; } + /// Container Apps job definition. + public ContainerAppJobTemplate Template { get; set; } + /// Outbound IP Addresses of a container apps job. + public IList OutboundIPAddresses { get; } + /// The endpoint of the eventstream of the container apps job. + public string EventStreamEndpoint { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobProvisioningState.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobProvisioningState.cs new file mode 100644 index 000000000000..ef59c0591eea --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobProvisioningState.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Provisioning state of the Container Apps Job. + public readonly partial struct ContainerAppJobProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ContainerAppJobProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string InProgressValue = "InProgress"; + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + private const string DeletingValue = "Deleting"; + + /// InProgress. + public static ContainerAppJobProvisioningState InProgress { get; } = new ContainerAppJobProvisioningState(InProgressValue); + /// Succeeded. + public static ContainerAppJobProvisioningState Succeeded { get; } = new ContainerAppJobProvisioningState(SucceededValue); + /// Failed. + public static ContainerAppJobProvisioningState Failed { get; } = new ContainerAppJobProvisioningState(FailedValue); + /// Canceled. + public static ContainerAppJobProvisioningState Canceled { get; } = new ContainerAppJobProvisioningState(CanceledValue); + /// Deleting. + public static ContainerAppJobProvisioningState Deleting { get; } = new ContainerAppJobProvisioningState(DeletingValue); + /// Determines if two values are the same. + public static bool operator ==(ContainerAppJobProvisioningState left, ContainerAppJobProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ContainerAppJobProvisioningState left, ContainerAppJobProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ContainerAppJobProvisioningState(string value) => new ContainerAppJobProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ContainerAppJobProvisioningState other && Equals(other); + /// + public bool Equals(ContainerAppJobProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobTemplate.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobTemplate.Serialization.cs new file mode 100644 index 000000000000..4b33137a2baa --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobTemplate.Serialization.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class ContainerAppJobTemplate : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(InitContainers)) + { + writer.WritePropertyName("initContainers"u8); + writer.WriteStartArray(); + foreach (var item in InitContainers) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Containers)) + { + writer.WritePropertyName("containers"u8); + writer.WriteStartArray(); + foreach (var item in Containers) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Volumes)) + { + writer.WritePropertyName("volumes"u8); + writer.WriteStartArray(); + foreach (var item in Volumes) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static ContainerAppJobTemplate DeserializeContainerAppJobTemplate(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> initContainers = default; + Optional> containers = default; + Optional> volumes = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("initContainers"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ContainerAppInitContainer.DeserializeContainerAppInitContainer(item)); + } + initContainers = array; + continue; + } + if (property.NameEquals("containers"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ContainerAppContainer.DeserializeContainerAppContainer(item)); + } + containers = array; + continue; + } + if (property.NameEquals("volumes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ContainerAppVolume.DeserializeContainerAppVolume(item)); + } + volumes = array; + continue; + } + } + return new ContainerAppJobTemplate(Optional.ToList(initContainers), Optional.ToList(containers), Optional.ToList(volumes)); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobTemplate.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobTemplate.cs new file mode 100644 index 000000000000..8b8c7b59c417 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobTemplate.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Container Apps Job versioned application definition. Defines the desired state of an immutable revision. Any changes to this section Will result in a new revision being created. + public partial class ContainerAppJobTemplate + { + /// Initializes a new instance of ContainerAppJobTemplate. + public ContainerAppJobTemplate() + { + InitContainers = new ChangeTrackingList(); + Containers = new ChangeTrackingList(); + Volumes = new ChangeTrackingList(); + } + + /// Initializes a new instance of ContainerAppJobTemplate. + /// List of specialized containers that run before app containers. + /// List of container definitions for the Container App. + /// List of volume definitions for the Container App. + internal ContainerAppJobTemplate(IList initContainers, IList containers, IList volumes) + { + InitContainers = initContainers; + Containers = containers; + Volumes = volumes; + } + + /// List of specialized containers that run before app containers. + public IList InitContainers { get; } + /// List of container definitions for the Container App. + public IList Containers { get; } + /// List of volume definitions for the Container App. + public IList Volumes { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobTriggerType.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobTriggerType.cs new file mode 100644 index 000000000000..2299a5b853ff --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobTriggerType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Trigger type of the job. + public readonly partial struct ContainerAppJobTriggerType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ContainerAppJobTriggerType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ScheduledValue = "Scheduled"; + private const string EventValue = "Event"; + private const string ManualValue = "Manual"; + + /// Scheduled. + public static ContainerAppJobTriggerType Scheduled { get; } = new ContainerAppJobTriggerType(ScheduledValue); + /// Event. + public static ContainerAppJobTriggerType Event { get; } = new ContainerAppJobTriggerType(EventValue); + /// Manual. + public static ContainerAppJobTriggerType Manual { get; } = new ContainerAppJobTriggerType(ManualValue); + /// Determines if two values are the same. + public static bool operator ==(ContainerAppJobTriggerType left, ContainerAppJobTriggerType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ContainerAppJobTriggerType left, ContainerAppJobTriggerType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ContainerAppJobTriggerType(string value) => new ContainerAppJobTriggerType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ContainerAppJobTriggerType other && Equals(other); + /// + public bool Equals(ContainerAppJobTriggerType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobsCollection.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobsCollection.Serialization.cs new file mode 100644 index 000000000000..d2fd732efd9b --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobsCollection.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppContainers; + +namespace Azure.ResourceManager.AppContainers.Models +{ + internal partial class ContainerAppJobsCollection + { + internal static ContainerAppJobsCollection DeserializeContainerAppJobsCollection(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ContainerAppJobData.DeserializeContainerAppJobData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new ContainerAppJobsCollection(value, nextLink.Value); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobsCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobsCollection.cs new file mode 100644 index 000000000000..56d95140e7bf --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobsCollection.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; +using Azure.ResourceManager.AppContainers; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Container Apps Jobs collection ARM resource. + internal partial class ContainerAppJobsCollection + { + /// Initializes a new instance of ContainerAppJobsCollection. + /// Collection of resources. + /// is null. + internal ContainerAppJobsCollection(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of ContainerAppJobsCollection. + /// Collection of resources. + /// Link to next page of resources. + internal ContainerAppJobsCollection(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// Collection of resources. + public IReadOnlyList Value { get; } + /// Link to next page of resources. + public string NextLink { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppManagedCertificateData.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppManagedCertificateData.Serialization.cs new file mode 100644 index 000000000000..ccedfec1af21 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppManagedCertificateData.Serialization.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppContainers.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppContainers +{ + public partial class ContainerAppManagedCertificateData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + writer.WriteEndObject(); + } + + internal static ContainerAppManagedCertificateData DeserializeContainerAppManagedCertificateData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional properties = default; + Optional> tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = ManagedCertificateProperties.DeserializeManagedCertificateProperties(property.Value); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + } + return new ContainerAppManagedCertificateData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, properties.Value); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppManagedCertificatePatch.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppManagedCertificatePatch.Serialization.cs new file mode 100644 index 000000000000..10259dece6a1 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppManagedCertificatePatch.Serialization.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class ContainerAppManagedCertificatePatch : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppManagedCertificatePatch.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppManagedCertificatePatch.cs new file mode 100644 index 000000000000..09118a579498 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppManagedCertificatePatch.cs @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// A managed certificate to update. + public partial class ContainerAppManagedCertificatePatch + { + /// Initializes a new instance of ContainerAppManagedCertificatePatch. + public ContainerAppManagedCertificatePatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Application-specific metadata in the form of key-value pairs. + public IDictionary Tags { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppManagedEnvironmentData.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppManagedEnvironmentData.Serialization.cs index f3b3f7da1896..0c20a522a492 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppManagedEnvironmentData.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppManagedEnvironmentData.Serialization.cs @@ -24,11 +24,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind); } - if (Optional.IsDefined(Sku)) - { - writer.WritePropertyName("sku"u8); - writer.WriteObjectValue(Sku); - } if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -84,6 +79,21 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WriteEndArray(); } + if (Optional.IsDefined(KedaConfiguration)) + { + writer.WritePropertyName("kedaConfiguration"u8); + writer.WriteObjectValue(KedaConfiguration); + } + if (Optional.IsDefined(DaprConfiguration)) + { + writer.WritePropertyName("daprConfiguration"u8); + writer.WriteObjectValue(DaprConfiguration); + } + if (Optional.IsDefined(InfrastructureResourceGroup)) + { + writer.WritePropertyName("infrastructureResourceGroup"u8); + writer.WriteStringValue(InfrastructureResourceGroup); + } writer.WriteEndObject(); writer.WriteEndObject(); } @@ -95,7 +105,6 @@ internal static ContainerAppManagedEnvironmentData DeserializeContainerAppManage return null; } Optional kind = default; - Optional sku = default; Optional> tags = default; AzureLocation location = default; ResourceIdentifier id = default; @@ -114,6 +123,9 @@ internal static ContainerAppManagedEnvironmentData DeserializeContainerAppManage Optional customDomainConfiguration = default; Optional eventStreamEndpoint = default; Optional> workloadProfiles = default; + Optional kedaConfiguration = default; + Optional daprConfiguration = default; + Optional infrastructureResourceGroup = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("kind"u8)) @@ -121,15 +133,6 @@ internal static ContainerAppManagedEnvironmentData DeserializeContainerAppManage kind = property.Value.GetString(); continue; } - if (property.NameEquals("sku"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sku = EnvironmentSkuProperties.DeserializeEnvironmentSkuProperties(property.Value); - continue; - } if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -275,11 +278,34 @@ internal static ContainerAppManagedEnvironmentData DeserializeContainerAppManage workloadProfiles = array; continue; } + if (property0.NameEquals("kedaConfiguration"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + kedaConfiguration = KedaConfiguration.DeserializeKedaConfiguration(property0.Value); + continue; + } + if (property0.NameEquals("daprConfiguration"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + daprConfiguration = DaprConfiguration.DeserializeDaprConfiguration(property0.Value); + continue; + } + if (property0.NameEquals("infrastructureResourceGroup"u8)) + { + infrastructureResourceGroup = property0.Value.GetString(); + continue; + } } continue; } } - return new ContainerAppManagedEnvironmentData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, kind.Value, sku.Value, Optional.ToNullable(provisioningState), daprAIInstrumentationKey.Value, daprAIConnectionString.Value, vnetConfiguration.Value, deploymentErrors.Value, defaultDomain.Value, staticIP.Value, appLogsConfiguration.Value, Optional.ToNullable(zoneRedundant), customDomainConfiguration.Value, eventStreamEndpoint.Value, Optional.ToList(workloadProfiles)); + return new ContainerAppManagedEnvironmentData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, kind.Value, Optional.ToNullable(provisioningState), daprAIInstrumentationKey.Value, daprAIConnectionString.Value, vnetConfiguration.Value, deploymentErrors.Value, defaultDomain.Value, staticIP.Value, appLogsConfiguration.Value, Optional.ToNullable(zoneRedundant), customDomainConfiguration.Value, eventStreamEndpoint.Value, Optional.ToList(workloadProfiles), kedaConfiguration.Value, daprConfiguration.Value, infrastructureResourceGroup.Value); } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppManagedEnvironmentOutboundSettings.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppManagedEnvironmentOutboundSettings.Serialization.cs deleted file mode 100644 index 04ab0ba50932..000000000000 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppManagedEnvironmentOutboundSettings.Serialization.cs +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Net; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.AppContainers.Models -{ - public partial class ContainerAppManagedEnvironmentOutboundSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(OutBoundType)) - { - writer.WritePropertyName("outBoundType"u8); - writer.WriteStringValue(OutBoundType.Value.ToString()); - } - if (Optional.IsDefined(VirtualNetworkApplianceIP)) - { - writer.WritePropertyName("virtualNetworkApplianceIp"u8); - writer.WriteStringValue(VirtualNetworkApplianceIP.ToString()); - } - writer.WriteEndObject(); - } - - internal static ContainerAppManagedEnvironmentOutboundSettings DeserializeContainerAppManagedEnvironmentOutboundSettings(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional outBoundType = default; - Optional virtualNetworkApplianceIP = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("outBoundType"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - outBoundType = new ContainerAppManagedEnvironmentOutBoundType(property.Value.GetString()); - continue; - } - if (property.NameEquals("virtualNetworkApplianceIp"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - virtualNetworkApplianceIP = IPAddress.Parse(property.Value.GetString()); - continue; - } - } - return new ContainerAppManagedEnvironmentOutboundSettings(Optional.ToNullable(outBoundType), virtualNetworkApplianceIP.Value); - } - } -} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppSecret.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppSecret.Serialization.cs index 6fda32419421..2918b06c6210 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppSecret.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppSecret.Serialization.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Text.Json; using Azure.Core; @@ -20,6 +21,8 @@ internal static ContainerAppSecret DeserializeContainerAppSecret(JsonElement ele } Optional name = default; Optional value = default; + Optional identity = default; + Optional keyVaultUrl = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("name"u8)) @@ -32,8 +35,22 @@ internal static ContainerAppSecret DeserializeContainerAppSecret(JsonElement ele value = property.Value.GetString(); continue; } + if (property.NameEquals("identity"u8)) + { + identity = property.Value.GetString(); + continue; + } + if (property.NameEquals("keyVaultUrl"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + keyVaultUrl = new Uri(property.Value.GetString()); + continue; + } } - return new ContainerAppSecret(name.Value, value.Value); + return new ContainerAppSecret(name.Value, value.Value, identity.Value, keyVaultUrl.Value); } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppSecret.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppSecret.cs index 83156ebba96c..1a326c03a39b 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppSecret.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppSecret.cs @@ -5,6 +5,8 @@ #nullable disable +using System; + namespace Azure.ResourceManager.AppContainers.Models { /// Container App Secret. @@ -18,15 +20,23 @@ internal ContainerAppSecret() /// Initializes a new instance of ContainerAppSecret. /// Secret Name. /// Secret Value. - internal ContainerAppSecret(string name, string value) + /// Resource ID of a managed identity to authenticate with Azure Key Vault, or System to use a system-assigned identity. + /// Azure Key Vault URL pointing to the secret referenced by the container app. + internal ContainerAppSecret(string name, string value, string identity, Uri keyVaultUri) { Name = name; Value = value; + Identity = identity; + KeyVaultUri = keyVaultUri; } /// Secret Name. public string Name { get; } /// Secret Value. public string Value { get; } + /// Resource ID of a managed identity to authenticate with Azure Key Vault, or System to use a system-assigned identity. + public string Identity { get; } + /// Azure Key Vault URL pointing to the secret referenced by the container app. + public Uri KeyVaultUri { get; } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppStorageType.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppStorageType.cs index 436728aab3c7..f875aaeb5156 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppStorageType.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppStorageType.cs @@ -24,11 +24,14 @@ public ContainerAppStorageType(string value) private const string AzureFileValue = "AzureFile"; private const string EmptyDirValue = "EmptyDir"; + private const string SecretValue = "Secret"; /// AzureFile. public static ContainerAppStorageType AzureFile { get; } = new ContainerAppStorageType(AzureFileValue); /// EmptyDir. public static ContainerAppStorageType EmptyDir { get; } = new ContainerAppStorageType(EmptyDirValue); + /// Secret. + public static ContainerAppStorageType Secret { get; } = new ContainerAppStorageType(SecretValue); /// Determines if two values are the same. public static bool operator ==(ContainerAppStorageType left, ContainerAppStorageType right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppVnetConfiguration.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppVnetConfiguration.Serialization.cs index 4b85b1ca3fce..ccd651e62c46 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppVnetConfiguration.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppVnetConfiguration.Serialization.cs @@ -25,11 +25,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("infrastructureSubnetId"u8); writer.WriteStringValue(InfrastructureSubnetId); } - if (Optional.IsDefined(RuntimeSubnetId)) - { - writer.WritePropertyName("runtimeSubnetId"u8); - writer.WriteStringValue(RuntimeSubnetId); - } if (Optional.IsDefined(DockerBridgeCidr)) { writer.WritePropertyName("dockerBridgeCidr"u8); @@ -45,11 +40,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("platformReservedDnsIP"u8); writer.WriteStringValue(PlatformReservedDnsIP); } - if (Optional.IsDefined(OutboundSettings)) - { - writer.WritePropertyName("outboundSettings"u8); - writer.WriteObjectValue(OutboundSettings); - } writer.WriteEndObject(); } @@ -61,11 +51,9 @@ internal static ContainerAppVnetConfiguration DeserializeContainerAppVnetConfigu } Optional @internal = default; Optional infrastructureSubnetId = default; - Optional runtimeSubnetId = default; Optional dockerBridgeCidr = default; Optional platformReservedCidr = default; Optional platformReservedDnsIP = default; - Optional outboundSettings = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("internal"u8)) @@ -86,11 +74,6 @@ internal static ContainerAppVnetConfiguration DeserializeContainerAppVnetConfigu infrastructureSubnetId = new ResourceIdentifier(property.Value.GetString()); continue; } - if (property.NameEquals("runtimeSubnetId"u8)) - { - runtimeSubnetId = property.Value.GetString(); - continue; - } if (property.NameEquals("dockerBridgeCidr"u8)) { dockerBridgeCidr = property.Value.GetString(); @@ -106,17 +89,8 @@ internal static ContainerAppVnetConfiguration DeserializeContainerAppVnetConfigu platformReservedDnsIP = property.Value.GetString(); continue; } - if (property.NameEquals("outboundSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - outboundSettings = ContainerAppManagedEnvironmentOutboundSettings.DeserializeContainerAppManagedEnvironmentOutboundSettings(property.Value); - continue; - } } - return new ContainerAppVnetConfiguration(Optional.ToNullable(@internal), infrastructureSubnetId.Value, runtimeSubnetId.Value, dockerBridgeCidr.Value, platformReservedCidr.Value, platformReservedDnsIP.Value, outboundSettings.Value); + return new ContainerAppVnetConfiguration(Optional.ToNullable(@internal), infrastructureSubnetId.Value, dockerBridgeCidr.Value, platformReservedCidr.Value, platformReservedDnsIP.Value); } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppVnetConfiguration.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppVnetConfiguration.cs index 75f593bca361..d51b7f617dd8 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppVnetConfiguration.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppVnetConfiguration.cs @@ -18,37 +18,29 @@ public ContainerAppVnetConfiguration() } /// Initializes a new instance of ContainerAppVnetConfiguration. - /// Boolean indicating the environment only has an internal load balancer. These environments do not have a public static IP resource. They must provide runtimeSubnetId and infrastructureSubnetId if enabling this property. - /// Resource ID of a subnet for infrastructure components. This subnet must be in the same VNET as the subnet defined in runtimeSubnetId. Must not overlap with any other provided IP ranges. - /// Resource ID of a subnet that Container App containers are injected into. This subnet must be in the same VNET as the subnet defined in infrastructureSubnetId. Must not overlap with any other provided IP ranges. + /// Boolean indicating the environment only has an internal load balancer. These environments do not have a public static IP resource. They must provide infrastructureSubnetId if enabling this property. + /// Resource ID of a subnet for infrastructure components. Must not overlap with any other provided IP ranges. /// CIDR notation IP range assigned to the Docker bridge, network. Must not overlap with any other provided IP ranges. /// IP range in CIDR notation that can be reserved for environment infrastructure IP addresses. Must not overlap with any other provided IP ranges. /// An IP address from the IP range defined by platformReservedCidr that will be reserved for the internal DNS server. - /// Configuration used to control the Environment Egress outbound traffic. - internal ContainerAppVnetConfiguration(bool? isInternal, ResourceIdentifier infrastructureSubnetId, string runtimeSubnetId, string dockerBridgeCidr, string platformReservedCidr, string platformReservedDnsIP, ContainerAppManagedEnvironmentOutboundSettings outboundSettings) + internal ContainerAppVnetConfiguration(bool? isInternal, ResourceIdentifier infrastructureSubnetId, string dockerBridgeCidr, string platformReservedCidr, string platformReservedDnsIP) { IsInternal = isInternal; InfrastructureSubnetId = infrastructureSubnetId; - RuntimeSubnetId = runtimeSubnetId; DockerBridgeCidr = dockerBridgeCidr; PlatformReservedCidr = platformReservedCidr; PlatformReservedDnsIP = platformReservedDnsIP; - OutboundSettings = outboundSettings; } - /// Boolean indicating the environment only has an internal load balancer. These environments do not have a public static IP resource. They must provide runtimeSubnetId and infrastructureSubnetId if enabling this property. + /// Boolean indicating the environment only has an internal load balancer. These environments do not have a public static IP resource. They must provide infrastructureSubnetId if enabling this property. public bool? IsInternal { get; set; } - /// Resource ID of a subnet for infrastructure components. This subnet must be in the same VNET as the subnet defined in runtimeSubnetId. Must not overlap with any other provided IP ranges. + /// Resource ID of a subnet for infrastructure components. Must not overlap with any other provided IP ranges. public ResourceIdentifier InfrastructureSubnetId { get; set; } - /// Resource ID of a subnet that Container App containers are injected into. This subnet must be in the same VNET as the subnet defined in infrastructureSubnetId. Must not overlap with any other provided IP ranges. - public string RuntimeSubnetId { get; set; } /// CIDR notation IP range assigned to the Docker bridge, network. Must not overlap with any other provided IP ranges. public string DockerBridgeCidr { get; set; } /// IP range in CIDR notation that can be reserved for environment infrastructure IP addresses. Must not overlap with any other provided IP ranges. public string PlatformReservedCidr { get; set; } /// An IP address from the IP range defined by platformReservedCidr that will be reserved for the internal DNS server. public string PlatformReservedDnsIP { get; set; } - /// Configuration used to control the Environment Egress outbound traffic. - public ContainerAppManagedEnvironmentOutboundSettings OutboundSettings { get; set; } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppVolume.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppVolume.Serialization.cs index 2b32d0a284d3..c1ae6e483bf1 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppVolume.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppVolume.Serialization.cs @@ -5,6 +5,7 @@ #nullable disable +using System.Collections.Generic; using System.Text.Json; using Azure.Core; @@ -30,6 +31,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("storageName"u8); writer.WriteStringValue(StorageName); } + if (Optional.IsCollectionDefined(Secrets)) + { + writer.WritePropertyName("secrets"u8); + writer.WriteStartArray(); + foreach (var item in Secrets) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } writer.WriteEndObject(); } @@ -42,6 +53,7 @@ internal static ContainerAppVolume DeserializeContainerAppVolume(JsonElement ele Optional name = default; Optional storageType = default; Optional storageName = default; + Optional> secrets = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("name"u8)) @@ -63,8 +75,22 @@ internal static ContainerAppVolume DeserializeContainerAppVolume(JsonElement ele storageName = property.Value.GetString(); continue; } + if (property.NameEquals("secrets"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SecretVolumeItem.DeserializeSecretVolumeItem(item)); + } + secrets = array; + continue; + } } - return new ContainerAppVolume(name.Value, Optional.ToNullable(storageType), storageName.Value); + return new ContainerAppVolume(name.Value, Optional.ToNullable(storageType), storageName.Value, Optional.ToList(secrets)); } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppVolume.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppVolume.cs index 07c5af4f0275..27cb3375e09d 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppVolume.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppVolume.cs @@ -5,6 +5,9 @@ #nullable disable +using System.Collections.Generic; +using Azure.Core; + namespace Azure.ResourceManager.AppContainers.Models { /// Volume definitions for the Container App. @@ -13,24 +16,29 @@ public partial class ContainerAppVolume /// Initializes a new instance of ContainerAppVolume. public ContainerAppVolume() { + Secrets = new ChangeTrackingList(); } /// Initializes a new instance of ContainerAppVolume. /// Volume name. /// Storage type for the volume. If not provided, use EmptyDir. - /// Name of storage resource. No need to provide for EmptyDir. - internal ContainerAppVolume(string name, ContainerAppStorageType? storageType, string storageName) + /// Name of storage resource. No need to provide for EmptyDir and Secret. + /// List of secrets to be added in volume. If no secrets are provided, all secrets in collection will be added to volume. + internal ContainerAppVolume(string name, ContainerAppStorageType? storageType, string storageName, IList secrets) { Name = name; StorageType = storageType; StorageName = storageName; + Secrets = secrets; } /// Volume name. public string Name { get; set; } /// Storage type for the volume. If not provided, use EmptyDir. public ContainerAppStorageType? StorageType { get; set; } - /// Name of storage resource. No need to provide for EmptyDir. + /// Name of storage resource. No need to provide for EmptyDir and Secret. public string StorageName { get; set; } + /// List of secrets to be added in volume. If no secrets are provided, all secrets in collection will be added to volume. + public IList Secrets { get; } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppWorkloadProfile.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppWorkloadProfile.Serialization.cs index 0ab19d22ce50..2e8fca66caf1 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppWorkloadProfile.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppWorkloadProfile.Serialization.cs @@ -15,12 +15,20 @@ public partial class ContainerAppWorkloadProfile : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); writer.WritePropertyName("workloadProfileType"u8); writer.WriteStringValue(WorkloadProfileType); - writer.WritePropertyName("minimumCount"u8); - writer.WriteNumberValue(MinimumCount); - writer.WritePropertyName("maximumCount"u8); - writer.WriteNumberValue(MaximumCount); + if (Optional.IsDefined(MinimumNodeCount)) + { + writer.WritePropertyName("minimumCount"u8); + writer.WriteNumberValue(MinimumNodeCount.Value); + } + if (Optional.IsDefined(MaximumNodeCount)) + { + writer.WritePropertyName("maximumCount"u8); + writer.WriteNumberValue(MaximumNodeCount.Value); + } writer.WriteEndObject(); } @@ -30,11 +38,17 @@ internal static ContainerAppWorkloadProfile DeserializeContainerAppWorkloadProfi { return null; } + string name = default; string workloadProfileType = default; - int minimumCount = default; - int maximumCount = default; + Optional minimumCount = default; + Optional maximumCount = default; foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } if (property.NameEquals("workloadProfileType"u8)) { workloadProfileType = property.Value.GetString(); @@ -42,16 +56,24 @@ internal static ContainerAppWorkloadProfile DeserializeContainerAppWorkloadProfi } if (property.NameEquals("minimumCount"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } minimumCount = property.Value.GetInt32(); continue; } if (property.NameEquals("maximumCount"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } maximumCount = property.Value.GetInt32(); continue; } } - return new ContainerAppWorkloadProfile(workloadProfileType, minimumCount, maximumCount); + return new ContainerAppWorkloadProfile(name, workloadProfileType, Optional.ToNullable(minimumCount), Optional.ToNullable(maximumCount)); } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppWorkloadProfile.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppWorkloadProfile.cs index 9aa766787b3c..2ad57d2b2e2a 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppWorkloadProfile.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppWorkloadProfile.cs @@ -14,24 +14,38 @@ namespace Azure.ResourceManager.AppContainers.Models public partial class ContainerAppWorkloadProfile { /// Initializes a new instance of ContainerAppWorkloadProfile. + /// Workload profile type for the workloads to run on. /// Workload profile type for the workloads to run on. - /// The minimum capacity. - /// The maximum capacity. - /// is null. - public ContainerAppWorkloadProfile(string workloadProfileType, int minimumCount, int maximumCount) + /// or is null. + public ContainerAppWorkloadProfile(string name, string workloadProfileType) { + Argument.AssertNotNull(name, nameof(name)); Argument.AssertNotNull(workloadProfileType, nameof(workloadProfileType)); + Name = name; WorkloadProfileType = workloadProfileType; - MinimumCount = minimumCount; - MaximumCount = maximumCount; } + /// Initializes a new instance of ContainerAppWorkloadProfile. + /// Workload profile type for the workloads to run on. + /// Workload profile type for the workloads to run on. + /// The minimum capacity. + /// The maximum capacity. + internal ContainerAppWorkloadProfile(string name, string workloadProfileType, int? minimumNodeCount, int? maximumNodeCount) + { + Name = name; + WorkloadProfileType = workloadProfileType; + MinimumNodeCount = minimumNodeCount; + MaximumNodeCount = maximumNodeCount; + } + + /// Workload profile type for the workloads to run on. + public string Name { get; set; } /// Workload profile type for the workloads to run on. public string WorkloadProfileType { get; set; } /// The minimum capacity. - public int MinimumCount { get; set; } + public int? MinimumNodeCount { get; set; } /// The maximum capacity. - public int MaximumCount { get; set; } + public int? MaximumNodeCount { get; set; } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppWorkloadProfileState.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppWorkloadProfileState.cs index 3aa9349c4a50..80d825d08940 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppWorkloadProfileState.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppWorkloadProfileState.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.AppContainers.Models { - /// Collection of all the workload Profile States for a Premium Managed Environment.. + /// Collection of all the workload Profile States for a Managed Environment.. public partial class ContainerAppWorkloadProfileState : ResourceData { /// Initializes a new instance of ContainerAppWorkloadProfileState. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppWritableSecret.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppWritableSecret.Serialization.cs index c20b9d1f1588..53731af9e017 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppWritableSecret.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppWritableSecret.Serialization.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Text.Json; using Azure.Core; @@ -25,6 +26,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("value"u8); writer.WriteStringValue(Value); } + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + writer.WriteStringValue(Identity); + } + if (Optional.IsDefined(KeyVaultUri)) + { + writer.WritePropertyName("keyVaultUrl"u8); + writer.WriteStringValue(KeyVaultUri.AbsoluteUri); + } writer.WriteEndObject(); } @@ -36,6 +47,8 @@ internal static ContainerAppWritableSecret DeserializeContainerAppWritableSecret } Optional name = default; Optional value = default; + Optional identity = default; + Optional keyVaultUrl = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("name"u8)) @@ -48,8 +61,22 @@ internal static ContainerAppWritableSecret DeserializeContainerAppWritableSecret value = property.Value.GetString(); continue; } + if (property.NameEquals("identity"u8)) + { + identity = property.Value.GetString(); + continue; + } + if (property.NameEquals("keyVaultUrl"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + keyVaultUrl = new Uri(property.Value.GetString()); + continue; + } } - return new ContainerAppWritableSecret(name.Value, value.Value); + return new ContainerAppWritableSecret(name.Value, value.Value, identity.Value, keyVaultUrl.Value); } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppWritableSecret.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppWritableSecret.cs index 9625a0c48d29..a6e4f0ac8466 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppWritableSecret.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppWritableSecret.cs @@ -5,6 +5,8 @@ #nullable disable +using System; + namespace Azure.ResourceManager.AppContainers.Models { /// Secret definition. @@ -18,15 +20,23 @@ public ContainerAppWritableSecret() /// Initializes a new instance of ContainerAppWritableSecret. /// Secret Name. /// Secret Value. - internal ContainerAppWritableSecret(string name, string value) + /// Resource ID of a managed identity to authenticate with Azure Key Vault, or System to use a system-assigned identity. + /// Azure Key Vault URL pointing to the secret referenced by the container app. + internal ContainerAppWritableSecret(string name, string value, string identity, Uri keyVaultUri) { Name = name; Value = value; + Identity = identity; + KeyVaultUri = keyVaultUri; } /// Secret Name. public string Name { get; set; } /// Secret Value. public string Value { get; set; } + /// Resource ID of a managed identity to authenticate with Azure Key Vault, or System to use a system-assigned identity. + public string Identity { get; set; } + /// Azure Key Vault URL pointing to the secret referenced by the container app. + public Uri KeyVaultUri { get; set; } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/EnvironmentSkuProperties.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprConfiguration.Serialization.cs similarity index 57% rename from sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/EnvironmentSkuProperties.Serialization.cs rename to sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprConfiguration.Serialization.cs index 1af4f5b1ee77..220d1e487bbd 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/EnvironmentSkuProperties.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprConfiguration.Serialization.cs @@ -10,32 +10,30 @@ namespace Azure.ResourceManager.AppContainers.Models { - internal partial class EnvironmentSkuProperties : IUtf8JsonSerializable + internal partial class DaprConfiguration : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name.ToString()); writer.WriteEndObject(); } - internal static EnvironmentSkuProperties DeserializeEnvironmentSkuProperties(JsonElement element) + internal static DaprConfiguration DeserializeDaprConfiguration(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - AppContainersSkuName name = default; + Optional version = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("name"u8)) + if (property.NameEquals("version"u8)) { - name = new AppContainersSkuName(property.Value.GetString()); + version = property.Value.GetString(); continue; } } - return new EnvironmentSkuProperties(name); + return new DaprConfiguration(version.Value); } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprConfiguration.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprConfiguration.cs new file mode 100644 index 000000000000..d1ea8fc2fc1a --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprConfiguration.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Configuration properties Dapr component. + internal partial class DaprConfiguration + { + /// Initializes a new instance of DaprConfiguration. + public DaprConfiguration() + { + } + + /// Initializes a new instance of DaprConfiguration. + /// The version of Dapr. + internal DaprConfiguration(string version) + { + Version = version; + } + + /// The version of Dapr. + public string Version { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/EnvironmentSkuProperties.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/EnvironmentSkuProperties.cs deleted file mode 100644 index f18985cdded2..000000000000 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/EnvironmentSkuProperties.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.AppContainers.Models -{ - /// Managed Environment resource SKU properties. - internal partial class EnvironmentSkuProperties - { - /// Initializes a new instance of EnvironmentSkuProperties. - /// Name of the Sku. - public EnvironmentSkuProperties(AppContainersSkuName name) - { - Name = name; - } - - /// Name of the Sku. - public AppContainersSkuName Name { get; set; } - } -} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/IngressStickySessions.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/IngressStickySessions.Serialization.cs new file mode 100644 index 000000000000..5b9df6a3f0f8 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/IngressStickySessions.Serialization.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + internal partial class IngressStickySessions : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Affinity)) + { + writer.WritePropertyName("affinity"u8); + writer.WriteStringValue(Affinity.Value.ToString()); + } + writer.WriteEndObject(); + } + + internal static IngressStickySessions DeserializeIngressStickySessions(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional affinity = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("affinity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + affinity = new Affinity(property.Value.GetString()); + continue; + } + } + return new IngressStickySessions(Optional.ToNullable(affinity)); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/IngressStickySessions.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/IngressStickySessions.cs new file mode 100644 index 000000000000..01020e49a7ec --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/IngressStickySessions.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Sticky Sessions for Single Revision Mode. + internal partial class IngressStickySessions + { + /// Initializes a new instance of IngressStickySessions. + public IngressStickySessions() + { + } + + /// Initializes a new instance of IngressStickySessions. + /// Sticky Session Affinity. + internal IngressStickySessions(Affinity? affinity) + { + Affinity = affinity; + } + + /// Sticky Session Affinity. + public Affinity? Affinity { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobConfigurationManualTriggerConfig.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobConfigurationManualTriggerConfig.Serialization.cs new file mode 100644 index 000000000000..cf8392c29b75 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobConfigurationManualTriggerConfig.Serialization.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class JobConfigurationManualTriggerConfig : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ReplicaCompletionCount)) + { + writer.WritePropertyName("replicaCompletionCount"u8); + writer.WriteNumberValue(ReplicaCompletionCount.Value); + } + if (Optional.IsDefined(Parallelism)) + { + writer.WritePropertyName("parallelism"u8); + writer.WriteNumberValue(Parallelism.Value); + } + writer.WriteEndObject(); + } + + internal static JobConfigurationManualTriggerConfig DeserializeJobConfigurationManualTriggerConfig(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional replicaCompletionCount = default; + Optional parallelism = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("replicaCompletionCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + replicaCompletionCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("parallelism"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + parallelism = property.Value.GetInt32(); + continue; + } + } + return new JobConfigurationManualTriggerConfig(Optional.ToNullable(replicaCompletionCount), Optional.ToNullable(parallelism)); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobConfigurationManualTriggerConfig.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobConfigurationManualTriggerConfig.cs new file mode 100644 index 000000000000..011f93dcd379 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobConfigurationManualTriggerConfig.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Manual trigger configuration for a single execution job. Properties replicaCompletionCount and parallelism would be set to 1 by default. + public partial class JobConfigurationManualTriggerConfig + { + /// Initializes a new instance of JobConfigurationManualTriggerConfig. + public JobConfigurationManualTriggerConfig() + { + } + + /// Initializes a new instance of JobConfigurationManualTriggerConfig. + /// Minimum number of successful replica completions before overall job completion. + /// Number of parallel replicas of a job that can run at a given time. + internal JobConfigurationManualTriggerConfig(int? replicaCompletionCount, int? parallelism) + { + ReplicaCompletionCount = replicaCompletionCount; + Parallelism = parallelism; + } + + /// Minimum number of successful replica completions before overall job completion. + public int? ReplicaCompletionCount { get; set; } + /// Number of parallel replicas of a job that can run at a given time. + public int? Parallelism { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobConfigurationScheduleTriggerConfig.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobConfigurationScheduleTriggerConfig.Serialization.cs new file mode 100644 index 000000000000..74f07e8244b0 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobConfigurationScheduleTriggerConfig.Serialization.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class JobConfigurationScheduleTriggerConfig : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ReplicaCompletionCount)) + { + writer.WritePropertyName("replicaCompletionCount"u8); + writer.WriteNumberValue(ReplicaCompletionCount.Value); + } + writer.WritePropertyName("cronExpression"u8); + writer.WriteStringValue(CronExpression); + if (Optional.IsDefined(Parallelism)) + { + writer.WritePropertyName("parallelism"u8); + writer.WriteNumberValue(Parallelism.Value); + } + writer.WriteEndObject(); + } + + internal static JobConfigurationScheduleTriggerConfig DeserializeJobConfigurationScheduleTriggerConfig(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional replicaCompletionCount = default; + string cronExpression = default; + Optional parallelism = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("replicaCompletionCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + replicaCompletionCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("cronExpression"u8)) + { + cronExpression = property.Value.GetString(); + continue; + } + if (property.NameEquals("parallelism"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + parallelism = property.Value.GetInt32(); + continue; + } + } + return new JobConfigurationScheduleTriggerConfig(Optional.ToNullable(replicaCompletionCount), cronExpression, Optional.ToNullable(parallelism)); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobConfigurationScheduleTriggerConfig.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobConfigurationScheduleTriggerConfig.cs new file mode 100644 index 000000000000..352caa6a4081 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobConfigurationScheduleTriggerConfig.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Cron formatted repeating trigger schedule ("* * * * *") for cronjobs. Properties completions and parallelism would be set to 1 by default. + public partial class JobConfigurationScheduleTriggerConfig + { + /// Initializes a new instance of JobConfigurationScheduleTriggerConfig. + /// Cron formatted repeating schedule ("* * * * *") of a Cron Job. + /// is null. + public JobConfigurationScheduleTriggerConfig(string cronExpression) + { + Argument.AssertNotNull(cronExpression, nameof(cronExpression)); + + CronExpression = cronExpression; + } + + /// Initializes a new instance of JobConfigurationScheduleTriggerConfig. + /// Minimum number of successful replica completions before overall job completion. + /// Cron formatted repeating schedule ("* * * * *") of a Cron Job. + /// Number of parallel replicas of a job that can run at a given time. + internal JobConfigurationScheduleTriggerConfig(int? replicaCompletionCount, string cronExpression, int? parallelism) + { + ReplicaCompletionCount = replicaCompletionCount; + CronExpression = cronExpression; + Parallelism = parallelism; + } + + /// Minimum number of successful replica completions before overall job completion. + public int? ReplicaCompletionCount { get; set; } + /// Cron formatted repeating schedule ("* * * * *") of a Cron Job. + public string CronExpression { get; set; } + /// Number of parallel replicas of a job that can run at a given time. + public int? Parallelism { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobExecutionContainer.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobExecutionContainer.Serialization.cs new file mode 100644 index 000000000000..49858a56b042 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobExecutionContainer.Serialization.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class JobExecutionContainer : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Image)) + { + writer.WritePropertyName("image"u8); + writer.WriteStringValue(Image); + } + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsCollectionDefined(Command)) + { + writer.WritePropertyName("command"u8); + writer.WriteStartArray(); + foreach (var item in Command) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Args)) + { + writer.WritePropertyName("args"u8); + writer.WriteStartArray(); + foreach (var item in Args) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Env)) + { + writer.WritePropertyName("env"u8); + writer.WriteStartArray(); + foreach (var item in Env) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Resources)) + { + writer.WritePropertyName("resources"u8); + writer.WriteObjectValue(Resources); + } + writer.WriteEndObject(); + } + + internal static JobExecutionContainer DeserializeJobExecutionContainer(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional image = default; + Optional name = default; + Optional> command = default; + Optional> args = default; + Optional> env = default; + Optional resources = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("image"u8)) + { + image = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("command"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + command = array; + continue; + } + if (property.NameEquals("args"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + args = array; + continue; + } + if (property.NameEquals("env"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ContainerAppEnvironmentVariable.DeserializeContainerAppEnvironmentVariable(item)); + } + env = array; + continue; + } + if (property.NameEquals("resources"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resources = AppContainerResources.DeserializeAppContainerResources(property.Value); + continue; + } + } + return new JobExecutionContainer(image.Value, name.Value, Optional.ToList(command), Optional.ToList(args), Optional.ToList(env), resources.Value); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobExecutionContainer.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobExecutionContainer.cs new file mode 100644 index 000000000000..c0ee98203a66 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobExecutionContainer.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Container Apps Jobs execution container definition. + public partial class JobExecutionContainer + { + /// Initializes a new instance of JobExecutionContainer. + public JobExecutionContainer() + { + Command = new ChangeTrackingList(); + Args = new ChangeTrackingList(); + Env = new ChangeTrackingList(); + } + + /// Initializes a new instance of JobExecutionContainer. + /// Container image tag. + /// Custom container name. + /// Container start command. + /// Container start command arguments. + /// Container environment variables. + /// Container resource requirements. + internal JobExecutionContainer(string image, string name, IList command, IList args, IList env, AppContainerResources resources) + { + Image = image; + Name = name; + Command = command; + Args = args; + Env = env; + Resources = resources; + } + + /// Container image tag. + public string Image { get; set; } + /// Custom container name. + public string Name { get; set; } + /// Container start command. + public IList Command { get; } + /// Container start command arguments. + public IList Args { get; } + /// Container environment variables. + public IList Env { get; } + /// Container resource requirements. + public AppContainerResources Resources { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobExecutionNamesCollection.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobExecutionNamesCollection.Serialization.cs new file mode 100644 index 000000000000..0fe213e099df --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobExecutionNamesCollection.Serialization.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class JobExecutionNamesCollection : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + writer.WriteEndObject(); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobExecutionNamesCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobExecutionNamesCollection.cs new file mode 100644 index 000000000000..b568b55fba22 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobExecutionNamesCollection.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Container App executions names list. + public partial class JobExecutionNamesCollection + { + /// Initializes a new instance of JobExecutionNamesCollection. + /// Collection of resources. + /// is null. + public JobExecutionNamesCollection(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Collection of resources. + public IList Value { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobExecutionRunningState.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobExecutionRunningState.cs new file mode 100644 index 000000000000..a77796623c7c --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobExecutionRunningState.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Current running State of the job. + public readonly partial struct JobExecutionRunningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public JobExecutionRunningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string RunningValue = "Running"; + private const string ProcessingValue = "Processing"; + private const string StoppedValue = "Stopped"; + private const string DegradedValue = "Degraded"; + private const string FailedValue = "Failed"; + private const string UnknownValue = "Unknown"; + private const string SucceededValue = "Succeeded"; + + /// Running. + public static JobExecutionRunningState Running { get; } = new JobExecutionRunningState(RunningValue); + /// Processing. + public static JobExecutionRunningState Processing { get; } = new JobExecutionRunningState(ProcessingValue); + /// Stopped. + public static JobExecutionRunningState Stopped { get; } = new JobExecutionRunningState(StoppedValue); + /// Degraded. + public static JobExecutionRunningState Degraded { get; } = new JobExecutionRunningState(DegradedValue); + /// Failed. + public static JobExecutionRunningState Failed { get; } = new JobExecutionRunningState(FailedValue); + /// Unknown. + public static JobExecutionRunningState Unknown { get; } = new JobExecutionRunningState(UnknownValue); + /// Succeeded. + public static JobExecutionRunningState Succeeded { get; } = new JobExecutionRunningState(SucceededValue); + /// Determines if two values are the same. + public static bool operator ==(JobExecutionRunningState left, JobExecutionRunningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(JobExecutionRunningState left, JobExecutionRunningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator JobExecutionRunningState(string value) => new JobExecutionRunningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is JobExecutionRunningState other && Equals(other); + /// + public bool Equals(JobExecutionRunningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobSecretsCollection.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobSecretsCollection.Serialization.cs new file mode 100644 index 000000000000..c249f668ca09 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobSecretsCollection.Serialization.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + internal partial class JobSecretsCollection + { + internal static JobSecretsCollection DeserializeJobSecretsCollection(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ContainerAppWritableSecret.DeserializeContainerAppWritableSecret(item)); + } + value = array; + continue; + } + } + return new JobSecretsCollection(value); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobSecretsCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobSecretsCollection.cs new file mode 100644 index 000000000000..9801901eabcd --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobSecretsCollection.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Container Apps Job Secrets Collection ARM resource. + internal partial class JobSecretsCollection + { + /// Initializes a new instance of JobSecretsCollection. + /// Collection of resources. + /// is null. + internal JobSecretsCollection(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of JobSecretsCollection. + /// Collection of resources. + internal JobSecretsCollection(IReadOnlyList value) + { + Value = value; + } + + /// Collection of resources. + public IReadOnlyList Value { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/KedaConfiguration.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/KedaConfiguration.Serialization.cs new file mode 100644 index 000000000000..af805830d873 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/KedaConfiguration.Serialization.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + internal partial class KedaConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WriteEndObject(); + } + + internal static KedaConfiguration DeserializeKedaConfiguration(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional version = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("version"u8)) + { + version = property.Value.GetString(); + continue; + } + } + return new KedaConfiguration(version.Value); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/KedaConfiguration.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/KedaConfiguration.cs new file mode 100644 index 000000000000..bbd75aca76ee --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/KedaConfiguration.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Configuration properties Keda component. + internal partial class KedaConfiguration + { + /// Initializes a new instance of KedaConfiguration. + public KedaConfiguration() + { + } + + /// Initializes a new instance of KedaConfiguration. + /// The version of Keda. + internal KedaConfiguration(string version) + { + Version = version; + } + + /// The version of Keda. + public string Version { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ManagedCertificateCollection.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ManagedCertificateCollection.Serialization.cs new file mode 100644 index 000000000000..8c2b86649f77 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ManagedCertificateCollection.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppContainers; + +namespace Azure.ResourceManager.AppContainers.Models +{ + internal partial class ManagedCertificateCollection + { + internal static ManagedCertificateCollection DeserializeManagedCertificateCollection(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ContainerAppManagedCertificateData.DeserializeContainerAppManagedCertificateData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new ManagedCertificateCollection(value, nextLink.Value); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ManagedCertificateCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ManagedCertificateCollection.cs new file mode 100644 index 000000000000..889fbdfaf35d --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ManagedCertificateCollection.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; +using Azure.ResourceManager.AppContainers; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Collection of Managed Certificates. + internal partial class ManagedCertificateCollection + { + /// Initializes a new instance of ManagedCertificateCollection. + /// Collection of resources. + /// is null. + internal ManagedCertificateCollection(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of ManagedCertificateCollection. + /// Collection of resources. + /// Link to next page of resources. + internal ManagedCertificateCollection(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// Collection of resources. + public IReadOnlyList Value { get; } + /// Link to next page of resources. + public string NextLink { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ManagedCertificateDomainControlValidation.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ManagedCertificateDomainControlValidation.cs new file mode 100644 index 000000000000..87f9eb7668b7 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ManagedCertificateDomainControlValidation.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Selected type of domain control validation for managed certificates. + public readonly partial struct ManagedCertificateDomainControlValidation : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ManagedCertificateDomainControlValidation(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CnameValue = "CNAME"; + private const string HttpValue = "HTTP"; + private const string TXTValue = "TXT"; + + /// CNAME. + public static ManagedCertificateDomainControlValidation Cname { get; } = new ManagedCertificateDomainControlValidation(CnameValue); + /// HTTP. + public static ManagedCertificateDomainControlValidation Http { get; } = new ManagedCertificateDomainControlValidation(HttpValue); + /// TXT. + public static ManagedCertificateDomainControlValidation TXT { get; } = new ManagedCertificateDomainControlValidation(TXTValue); + /// Determines if two values are the same. + public static bool operator ==(ManagedCertificateDomainControlValidation left, ManagedCertificateDomainControlValidation right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ManagedCertificateDomainControlValidation left, ManagedCertificateDomainControlValidation right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ManagedCertificateDomainControlValidation(string value) => new ManagedCertificateDomainControlValidation(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ManagedCertificateDomainControlValidation other && Equals(other); + /// + public bool Equals(ManagedCertificateDomainControlValidation other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ManagedCertificateProperties.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ManagedCertificateProperties.Serialization.cs new file mode 100644 index 000000000000..d061c4533b79 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ManagedCertificateProperties.Serialization.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class ManagedCertificateProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(SubjectName)) + { + writer.WritePropertyName("subjectName"u8); + writer.WriteStringValue(SubjectName); + } + if (Optional.IsDefined(DomainControlValidation)) + { + writer.WritePropertyName("domainControlValidation"u8); + writer.WriteStringValue(DomainControlValidation.Value.ToString()); + } + writer.WriteEndObject(); + } + + internal static ManagedCertificateProperties DeserializeManagedCertificateProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional provisioningState = default; + Optional subjectName = default; + Optional error = default; + Optional domainControlValidation = default; + Optional validationToken = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ContainerAppCertificateProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("subjectName"u8)) + { + subjectName = property.Value.GetString(); + continue; + } + if (property.NameEquals("error"u8)) + { + error = property.Value.GetString(); + continue; + } + if (property.NameEquals("domainControlValidation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + domainControlValidation = new ManagedCertificateDomainControlValidation(property.Value.GetString()); + continue; + } + if (property.NameEquals("validationToken"u8)) + { + validationToken = property.Value.GetString(); + continue; + } + } + return new ManagedCertificateProperties(Optional.ToNullable(provisioningState), subjectName.Value, error.Value, Optional.ToNullable(domainControlValidation), validationToken.Value); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ManagedCertificateProperties.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ManagedCertificateProperties.cs new file mode 100644 index 000000000000..a5262d02ef60 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ManagedCertificateProperties.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Certificate resource specific properties. + public partial class ManagedCertificateProperties + { + /// Initializes a new instance of ManagedCertificateProperties. + public ManagedCertificateProperties() + { + } + + /// Initializes a new instance of ManagedCertificateProperties. + /// Provisioning state of the certificate. + /// Subject name of the certificate. + /// Any error occurred during the certificate provision. + /// Selected type of domain control validation for managed certificates. + /// A TXT token used for DNS TXT domain control validation when issuing this type of managed certificates. + internal ManagedCertificateProperties(ContainerAppCertificateProvisioningState? provisioningState, string subjectName, string error, ManagedCertificateDomainControlValidation? domainControlValidation, string validationToken) + { + ProvisioningState = provisioningState; + SubjectName = subjectName; + Error = error; + DomainControlValidation = domainControlValidation; + ValidationToken = validationToken; + } + + /// Provisioning state of the certificate. + public ContainerAppCertificateProvisioningState? ProvisioningState { get; } + /// Subject name of the certificate. + public string SubjectName { get; set; } + /// Any error occurred during the certificate provision. + public string Error { get; } + /// Selected type of domain control validation for managed certificates. + public ManagedCertificateDomainControlValidation? DomainControlValidation { get; set; } + /// A TXT token used for DNS TXT domain control validation when issuing this type of managed certificates. + public string ValidationToken { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SecretVolumeItem.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SecretVolumeItem.Serialization.cs new file mode 100644 index 000000000000..6ac37893bc2e --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SecretVolumeItem.Serialization.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class SecretVolumeItem : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(SecretRef)) + { + writer.WritePropertyName("secretRef"u8); + writer.WriteStringValue(SecretRef); + } + if (Optional.IsDefined(Path)) + { + writer.WritePropertyName("path"u8); + writer.WriteStringValue(Path); + } + writer.WriteEndObject(); + } + + internal static SecretVolumeItem DeserializeSecretVolumeItem(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional secretRef = default; + Optional path = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("secretRef"u8)) + { + secretRef = property.Value.GetString(); + continue; + } + if (property.NameEquals("path"u8)) + { + path = property.Value.GetString(); + continue; + } + } + return new SecretVolumeItem(secretRef.Value, path.Value); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SecretVolumeItem.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SecretVolumeItem.cs new file mode 100644 index 000000000000..07dd6afe7d3f --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SecretVolumeItem.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Secret to be added to volume. + public partial class SecretVolumeItem + { + /// Initializes a new instance of SecretVolumeItem. + public SecretVolumeItem() + { + } + + /// Initializes a new instance of SecretVolumeItem. + /// Name of the Container App secret from which to pull the secret value. + /// Path to project secret to. If no path is provided, path defaults to name of secret listed in secretRef. + internal SecretVolumeItem(string secretRef, string path) + { + SecretRef = secretRef; + Path = path; + } + + /// Name of the Container App secret from which to pull the secret value. + public string SecretRef { get; set; } + /// Path to project secret to. If no path is provided, path defaults to name of secret listed in secretRef. + public string Path { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/AvailableWorkloadProfilesRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/AvailableWorkloadProfilesRestOperations.cs index fcc71adb2538..754b29db127b 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/AvailableWorkloadProfilesRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/AvailableWorkloadProfilesRestOperations.cs @@ -33,7 +33,7 @@ public AvailableWorkloadProfilesRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-10-01"; + _apiVersion = apiVersion ?? "2022-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/BillingMetersRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/BillingMetersRestOperations.cs index ca48db5e74c9..320450f6f735 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/BillingMetersRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/BillingMetersRestOperations.cs @@ -33,7 +33,7 @@ public BillingMetersRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-10-01"; + _apiVersion = apiVersion ?? "2022-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/CertificatesRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/CertificatesRestOperations.cs index 8aa3fc44a339..43214aa45faa 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/CertificatesRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/CertificatesRestOperations.cs @@ -33,7 +33,7 @@ public CertificatesRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-10-01"; + _apiVersion = apiVersion ?? "2022-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ConnectedEnvironmentsCertificatesRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ConnectedEnvironmentsCertificatesRestOperations.cs index e68f9c03e5b4..0fc106fb3fc8 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ConnectedEnvironmentsCertificatesRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ConnectedEnvironmentsCertificatesRestOperations.cs @@ -33,7 +33,7 @@ public ConnectedEnvironmentsCertificatesRestOperations(HttpPipeline pipeline, st { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-10-01"; + _apiVersion = apiVersion ?? "2022-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ConnectedEnvironmentsDaprComponentsRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ConnectedEnvironmentsDaprComponentsRestOperations.cs index 3bcf872b37d6..a4fe62f243eb 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ConnectedEnvironmentsDaprComponentsRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ConnectedEnvironmentsDaprComponentsRestOperations.cs @@ -33,7 +33,7 @@ public ConnectedEnvironmentsDaprComponentsRestOperations(HttpPipeline pipeline, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-10-01"; + _apiVersion = apiVersion ?? "2022-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ConnectedEnvironmentsRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ConnectedEnvironmentsRestOperations.cs index 48dd78a33bb9..282bd6842918 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ConnectedEnvironmentsRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ConnectedEnvironmentsRestOperations.cs @@ -33,7 +33,7 @@ public ConnectedEnvironmentsRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-10-01"; + _apiVersion = apiVersion ?? "2022-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -186,7 +186,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourcegroups/", false); + uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.App/connectedEnvironments/", false); uri.AppendPath(connectedEnvironmentName, true); @@ -268,7 +268,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourcegroups/", false); + uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.App/connectedEnvironments/", false); uri.AppendPath(connectedEnvironmentName, true); @@ -346,7 +346,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourcegroups/", false); + uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.App/connectedEnvironments/", false); uri.AppendPath(connectedEnvironmentName, true); @@ -418,7 +418,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourcegroups/", false); + uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.App/connectedEnvironments/", false); uri.AppendPath(connectedEnvironmentName, true); diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ConnectedEnvironmentsStoragesRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ConnectedEnvironmentsStoragesRestOperations.cs index 8b0d1eb6fd4b..abffaaaee4a2 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ConnectedEnvironmentsStoragesRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ConnectedEnvironmentsStoragesRestOperations.cs @@ -33,7 +33,7 @@ public ConnectedEnvironmentsStoragesRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-10-01"; + _apiVersion = apiVersion ?? "2022-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsAuthConfigsRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsAuthConfigsRestOperations.cs index 08728f5059e9..e992e00b2f87 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsAuthConfigsRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsAuthConfigsRestOperations.cs @@ -33,7 +33,7 @@ public ContainerAppsAuthConfigsRestOperations(HttpPipeline pipeline, string appl { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-10-01"; + _apiVersion = apiVersion ?? "2022-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsDiagnosticsRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsDiagnosticsRestOperations.cs index dff63afc0d72..58fd68e7c812 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsDiagnosticsRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsDiagnosticsRestOperations.cs @@ -33,7 +33,7 @@ public ContainerAppsDiagnosticsRestOperations(HttpPipeline pipeline, string appl { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-10-01"; + _apiVersion = apiVersion ?? "2022-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsRestOperations.cs index c2c342356b01..934a7f994c51 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsRestOperations.cs @@ -33,7 +33,7 @@ public ContainerAppsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-10-01"; + _apiVersion = apiVersion ?? "2022-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsRevisionReplicasRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsRevisionReplicasRestOperations.cs index 260ddbe37202..30b8e1534bf4 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsRevisionReplicasRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsRevisionReplicasRestOperations.cs @@ -33,7 +33,7 @@ public ContainerAppsRevisionReplicasRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-10-01"; + _apiVersion = apiVersion ?? "2022-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsRevisionsRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsRevisionsRestOperations.cs index 3b7666c9b46f..e702832231b9 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsRevisionsRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsRevisionsRestOperations.cs @@ -33,7 +33,7 @@ public ContainerAppsRevisionsRestOperations(HttpPipeline pipeline, string applic { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-10-01"; + _apiVersion = apiVersion ?? "2022-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsSourceControlsRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsSourceControlsRestOperations.cs index 63f4184cc7b2..88473ae9669d 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsSourceControlsRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsSourceControlsRestOperations.cs @@ -33,7 +33,7 @@ public ContainerAppsSourceControlsRestOperations(HttpPipeline pipeline, string a { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-10-01"; + _apiVersion = apiVersion ?? "2022-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/DaprComponentsRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/DaprComponentsRestOperations.cs index cede79aaf826..64fb6e68b979 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/DaprComponentsRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/DaprComponentsRestOperations.cs @@ -33,7 +33,7 @@ public DaprComponentsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-10-01"; + _apiVersion = apiVersion ?? "2022-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/JobsExecutionsRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/JobsExecutionsRestOperations.cs new file mode 100644 index 000000000000..7d198d91f6ea --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/JobsExecutionsRestOperations.cs @@ -0,0 +1,203 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppContainers.Models; + +namespace Azure.ResourceManager.AppContainers +{ + internal partial class JobsExecutionsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of JobsExecutionsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public JobsExecutionsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2022-11-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string jobName, string filter) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/jobs/", false); + uri.AppendPath(jobName, true); + uri.AppendPath("/executions", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a Container Apps Job's executions. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container Apps Job. + /// The filter to apply on the operation. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string jobName, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, jobName, filter); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ContainerAppJobExecutions value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ContainerAppJobExecutions.DeserializeContainerAppJobExecutions(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a Container Apps Job's executions. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container Apps Job. + /// The filter to apply on the operation. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string jobName, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, jobName, filter); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ContainerAppJobExecutions value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ContainerAppJobExecutions.DeserializeContainerAppJobExecutions(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string jobName, string filter) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a Container Apps Job's executions. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container Apps Job. + /// The filter to apply on the operation. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string jobName, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, jobName, filter); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ContainerAppJobExecutions value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ContainerAppJobExecutions.DeserializeContainerAppJobExecutions(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a Container Apps Job's executions. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container Apps Job. + /// The filter to apply on the operation. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string jobName, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, jobName, filter); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ContainerAppJobExecutions value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ContainerAppJobExecutions.DeserializeContainerAppJobExecutions(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/JobsRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/JobsRestOperations.cs new file mode 100644 index 000000000000..17b0f1a342d6 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/JobsRestOperations.cs @@ -0,0 +1,944 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppContainers.Models; + +namespace Azure.ResourceManager.AppContainers +{ + internal partial class JobsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of JobsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public JobsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2022-11-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.App/jobs", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the Container Apps Jobs in a given subscription. + /// The ID of the target subscription. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ContainerAppJobsCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ContainerAppJobsCollection.DeserializeContainerAppJobsCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the Container Apps Jobs in a given subscription. + /// The ID of the target subscription. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscription(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ContainerAppJobsCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ContainerAppJobsCollection.DeserializeContainerAppJobsCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/jobs", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the Container Apps Jobs in a given resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ContainerAppJobsCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ContainerAppJobsCollection.DeserializeContainerAppJobsCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the Container Apps Jobs in a given resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ContainerAppJobsCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ContainerAppJobsCollection.DeserializeContainerAppJobsCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string jobName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/jobs/", false); + uri.AppendPath(jobName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the properties of a Container Apps Job. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container Apps Job. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string jobName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, jobName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ContainerAppJobData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ContainerAppJobData.DeserializeContainerAppJobData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ContainerAppJobData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the properties of a Container Apps Job. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container Apps Job. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string jobName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, jobName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ContainerAppJobData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ContainerAppJobData.DeserializeContainerAppJobData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ContainerAppJobData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string jobName, ContainerAppJobData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/jobs/", false); + uri.AppendPath(jobName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create or Update a Container Apps Job. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container Apps Job. + /// Properties used to create a container apps job. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string jobName, ContainerAppJobData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, jobName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or Update a Container Apps Job. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container Apps Job. + /// Properties used to create a container apps job. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string jobName, ContainerAppJobData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, jobName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string jobName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/jobs/", false); + uri.AppendPath(jobName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a Container Apps Job. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container Apps Job. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string jobName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, jobName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a Container Apps Job. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container Apps Job. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string jobName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, jobName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string jobName, ContainerAppJobPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/jobs/", false); + uri.AppendPath(jobName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Patches a Container Apps Job using JSON Merge Patch. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container Apps Job. + /// Properties used to create a container apps job. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string jobName, ContainerAppJobPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, jobName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Patches a Container Apps Job using JSON Merge Patch. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container Apps Job. + /// Properties used to create a container apps job. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string jobName, ContainerAppJobPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, jobName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateStartRequest(string subscriptionId, string resourceGroupName, string jobName, ContainerAppJobExecutionTemplate template) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/jobs/", false); + uri.AppendPath(jobName, true); + uri.AppendPath("/start", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(template); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Start a Container Apps Job. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container Apps Job. + /// Properties used to start a job instance. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task StartAsync(string subscriptionId, string resourceGroupName, string jobName, ContainerAppJobExecutionTemplate template, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + Argument.AssertNotNull(template, nameof(template)); + + using var message = CreateStartRequest(subscriptionId, resourceGroupName, jobName, template); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Start a Container Apps Job. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container Apps Job. + /// Properties used to start a job instance. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Start(string subscriptionId, string resourceGroupName, string jobName, ContainerAppJobExecutionTemplate template, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + Argument.AssertNotNull(template, nameof(template)); + + using var message = CreateStartRequest(subscriptionId, resourceGroupName, jobName, template); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateStopExecutionRequest(string subscriptionId, string resourceGroupName, string jobName, string jobExecutionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/jobs/", false); + uri.AppendPath(jobName, true); + uri.AppendPath("/executions/", false); + uri.AppendPath(jobExecutionName, true); + uri.AppendPath("/stop", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Terminates execution of a running container apps job. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container Apps Job. + /// Job execution name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task StopExecutionAsync(string subscriptionId, string resourceGroupName, string jobName, string jobExecutionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + Argument.AssertNotNullOrEmpty(jobExecutionName, nameof(jobExecutionName)); + + using var message = CreateStopExecutionRequest(subscriptionId, resourceGroupName, jobName, jobExecutionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Terminates execution of a running container apps job. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container Apps Job. + /// Job execution name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response StopExecution(string subscriptionId, string resourceGroupName, string jobName, string jobExecutionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + Argument.AssertNotNullOrEmpty(jobExecutionName, nameof(jobExecutionName)); + + using var message = CreateStopExecutionRequest(subscriptionId, resourceGroupName, jobName, jobExecutionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateStopMultipleExecutionsRequest(string subscriptionId, string resourceGroupName, string jobName, JobExecutionNamesCollection jobExecutionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/jobs/", false); + uri.AppendPath(jobName, true); + uri.AppendPath("/stop", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(jobExecutionName); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Terminates execution of a running container apps job. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container Apps Job. + /// List of all job executions that should be stopped. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task StopMultipleExecutionsAsync(string subscriptionId, string resourceGroupName, string jobName, JobExecutionNamesCollection jobExecutionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + Argument.AssertNotNull(jobExecutionName, nameof(jobExecutionName)); + + using var message = CreateStopMultipleExecutionsRequest(subscriptionId, resourceGroupName, jobName, jobExecutionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Terminates execution of a running container apps job. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container Apps Job. + /// List of all job executions that should be stopped. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response StopMultipleExecutions(string subscriptionId, string resourceGroupName, string jobName, JobExecutionNamesCollection jobExecutionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + Argument.AssertNotNull(jobExecutionName, nameof(jobExecutionName)); + + using var message = CreateStopMultipleExecutionsRequest(subscriptionId, resourceGroupName, jobName, jobExecutionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListSecretsRequest(string subscriptionId, string resourceGroupName, string jobName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/jobs/", false); + uri.AppendPath(jobName, true); + uri.AppendPath("/listSecrets", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List secrets for a container apps job. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container Apps Job. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListSecretsAsync(string subscriptionId, string resourceGroupName, string jobName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + + using var message = CreateListSecretsRequest(subscriptionId, resourceGroupName, jobName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + JobSecretsCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = JobSecretsCollection.DeserializeJobSecretsCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List secrets for a container apps job. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container Apps Job. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListSecrets(string subscriptionId, string resourceGroupName, string jobName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + + using var message = CreateListSecretsRequest(subscriptionId, resourceGroupName, jobName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + JobSecretsCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = JobSecretsCollection.DeserializeJobSecretsCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the Container Apps Jobs in a given subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ContainerAppJobsCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ContainerAppJobsCollection.DeserializeContainerAppJobsCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the Container Apps Jobs in a given subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ContainerAppJobsCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ContainerAppJobsCollection.DeserializeContainerAppJobsCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the Container Apps Jobs in a given resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ContainerAppJobsCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ContainerAppJobsCollection.DeserializeContainerAppJobsCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the Container Apps Jobs in a given resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ContainerAppJobsCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ContainerAppJobsCollection.DeserializeContainerAppJobsCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedCertificatesRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedCertificatesRestOperations.cs new file mode 100644 index 000000000000..e19472fae914 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedCertificatesRestOperations.cs @@ -0,0 +1,535 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppContainers.Models; + +namespace Azure.ResourceManager.AppContainers +{ + internal partial class ManagedCertificatesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ManagedCertificatesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public ManagedCertificatesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2022-11-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string environmentName, string managedCertificateName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/managedEnvironments/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/managedCertificates/", false); + uri.AppendPath(managedCertificateName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the specified Managed Certificate. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Managed Environment. + /// Name of the Managed Certificate. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string environmentName, string managedCertificateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(managedCertificateName, nameof(managedCertificateName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, environmentName, managedCertificateName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ContainerAppManagedCertificateData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ContainerAppManagedCertificateData.DeserializeContainerAppManagedCertificateData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ContainerAppManagedCertificateData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the specified Managed Certificate. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Managed Environment. + /// Name of the Managed Certificate. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string environmentName, string managedCertificateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(managedCertificateName, nameof(managedCertificateName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, environmentName, managedCertificateName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ContainerAppManagedCertificateData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ContainerAppManagedCertificateData.DeserializeContainerAppManagedCertificateData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ContainerAppManagedCertificateData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string environmentName, string managedCertificateName, ContainerAppManagedCertificateData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/managedEnvironments/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/managedCertificates/", false); + uri.AppendPath(managedCertificateName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create or Update a Managed Certificate. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Managed Environment. + /// Name of the Managed Certificate. + /// Managed Certificate to be created or updated. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string environmentName, string managedCertificateName, ContainerAppManagedCertificateData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(managedCertificateName, nameof(managedCertificateName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, environmentName, managedCertificateName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or Update a Managed Certificate. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Managed Environment. + /// Name of the Managed Certificate. + /// Managed Certificate to be created or updated. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string environmentName, string managedCertificateName, ContainerAppManagedCertificateData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(managedCertificateName, nameof(managedCertificateName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, environmentName, managedCertificateName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string environmentName, string managedCertificateName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/managedEnvironments/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/managedCertificates/", false); + uri.AppendPath(managedCertificateName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes the specified Managed Certificate. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Managed Environment. + /// Name of the Managed Certificate. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string environmentName, string managedCertificateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(managedCertificateName, nameof(managedCertificateName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, environmentName, managedCertificateName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes the specified Managed Certificate. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Managed Environment. + /// Name of the Managed Certificate. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string environmentName, string managedCertificateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(managedCertificateName, nameof(managedCertificateName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, environmentName, managedCertificateName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string environmentName, string managedCertificateName, ContainerAppManagedCertificatePatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/managedEnvironments/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/managedCertificates/", false); + uri.AppendPath(managedCertificateName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Patches a managed certificate. Oly patching of tags is supported. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Managed Environment. + /// Name of the Managed Certificate. + /// Properties of a managed certificate that need to be updated. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string environmentName, string managedCertificateName, ContainerAppManagedCertificatePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(managedCertificateName, nameof(managedCertificateName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, environmentName, managedCertificateName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ContainerAppManagedCertificateData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ContainerAppManagedCertificateData.DeserializeContainerAppManagedCertificateData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Patches a managed certificate. Oly patching of tags is supported. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Managed Environment. + /// Name of the Managed Certificate. + /// Properties of a managed certificate that need to be updated. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string environmentName, string managedCertificateName, ContainerAppManagedCertificatePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(managedCertificateName, nameof(managedCertificateName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, environmentName, managedCertificateName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ContainerAppManagedCertificateData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ContainerAppManagedCertificateData.DeserializeContainerAppManagedCertificateData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string environmentName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/managedEnvironments/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/managedCertificates", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the Managed Certificates in a given managed environment. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Managed Environment. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string environmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, environmentName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ManagedCertificateCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ManagedCertificateCollection.DeserializeManagedCertificateCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the Managed Certificates in a given managed environment. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Managed Environment. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string environmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, environmentName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ManagedCertificateCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ManagedCertificateCollection.DeserializeManagedCertificateCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string environmentName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the Managed Certificates in a given managed environment. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Managed Environment. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string environmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, environmentName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ManagedCertificateCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ManagedCertificateCollection.DeserializeManagedCertificateCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the Managed Certificates in a given managed environment. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Managed Environment. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string environmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, environmentName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ManagedCertificateCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ManagedCertificateCollection.DeserializeManagedCertificateCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedEnvironmentDiagnosticsRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedEnvironmentDiagnosticsRestOperations.cs index c7dfd4211a6e..a476446e0ed2 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedEnvironmentDiagnosticsRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedEnvironmentDiagnosticsRestOperations.cs @@ -33,7 +33,7 @@ public ManagedEnvironmentDiagnosticsRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-10-01"; + _apiVersion = apiVersion ?? "2022-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedEnvironmentsDiagnosticsRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedEnvironmentsDiagnosticsRestOperations.cs index 5a88e126c1f6..169b9ea61a33 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedEnvironmentsDiagnosticsRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedEnvironmentsDiagnosticsRestOperations.cs @@ -32,7 +32,7 @@ public ManagedEnvironmentsDiagnosticsRestOperations(HttpPipeline pipeline, strin { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-10-01"; + _apiVersion = apiVersion ?? "2022-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedEnvironmentsRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedEnvironmentsRestOperations.cs index 37e94f3ff297..68a850901d65 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedEnvironmentsRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedEnvironmentsRestOperations.cs @@ -33,7 +33,7 @@ public ManagedEnvironmentsRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-10-01"; + _apiVersion = apiVersion ?? "2022-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -587,7 +587,7 @@ internal HttpMessage CreateListWorkloadProfileStatesRequest(string subscriptionI return message; } - /// Get all workload Profile States for a Premium Managed Environment. + /// Get all workload Profile States for a Managed Environment. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. @@ -616,7 +616,7 @@ public async Task> ListWorkloadProfile } } - /// Get all workload Profile States for a Premium Managed Environment. + /// Get all workload Profile States for a Managed Environment. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. @@ -799,7 +799,7 @@ internal HttpMessage CreateListWorkloadProfileStatesNextPageRequest(string nextL return message; } - /// Get all workload Profile States for a Premium Managed Environment. + /// Get all workload Profile States for a Managed Environment. /// The URL to the next page of results. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. @@ -830,7 +830,7 @@ public async Task> ListWorkloadProfile } } - /// Get all workload Profile States for a Premium Managed Environment. + /// Get all workload Profile States for a Managed Environment. /// The URL to the next page of results. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedEnvironmentsStoragesRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedEnvironmentsStoragesRestOperations.cs index e841252461fd..d07829b0fad6 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedEnvironmentsStoragesRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedEnvironmentsStoragesRestOperations.cs @@ -33,7 +33,7 @@ public ManagedEnvironmentsStoragesRestOperations(HttpPipeline pipeline, string a { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-10-01"; + _apiVersion = apiVersion ?? "2022-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/NamespacesRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/NamespacesRestOperations.cs index 4cedb7c9d600..b06d9448aee3 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/NamespacesRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/NamespacesRestOperations.cs @@ -33,7 +33,7 @@ public NamespacesRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-10-01"; + _apiVersion = apiVersion ?? "2022-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/autorest.md b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/autorest.md index 21a820003b0b..10fbf67f345b 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/autorest.md +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/autorest.md @@ -8,7 +8,7 @@ generate-model-factory: false csharp: true library-name: AppContainers namespace: Azure.ResourceManager.AppContainers -require: https://github.com/Azure/azure-rest-api-specs/blob/e812b54127fad6c9bc2407b33980b0fe385b7717/specification/app/resource-manager/readme.md +require: https://github.com/Azure/azure-rest-api-specs/blob/905a9ad794ea9a1565ebe3857497b3a24872d553/specification/app/resource-manager/readme.md output-folder: $(this-folder)/Generated clear-output-folder: true skip-csproj: true @@ -204,6 +204,20 @@ rename-mapping: Scheme: ContainerAppHttpScheme ContainerAppProbeHttpGetHttpHeadersItem: ContainerAppHttpHeaderInfo RegistryInfo.registryUrl: RegistryServer + WorkloadProfile.maximumCount: MaximumNodeCount + WorkloadProfile.minimumCount: MinimumNodeCount + BillingMeterProperties.category: WorkloadProfileCategory + TriggerType: ContainerAppJobTriggerType + JobTemplate: ContainerAppJobTemplate + JobProvisioningState: ContainerAppJobProvisioningState + JobPatchPropertiesProperties: ContainerAppJobPatchProperties + JobExecution: ContainerAppJobExecution + JobExecutionBase: ContainerAppJobExecutionBase + JobExecutionTemplate: ContainerAppJobExecutionTemplate + JobConfiguration: ContainerAppJobConfiguration + Job: ContainerAppJob + JobsCollection: ContainerAppJobsCollection + ManagedCertificate: ContainerAppManagedCertificate request-path-to-resource-name: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/certificates/{certificateName}: ContainerAppConnectedEnvironmentCertificate