diff --git a/.vscode/cspell.json b/.vscode/cspell.json index 2aaf62684d1da..a9eff51f0b0d4 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -86,6 +86,7 @@ "lucene", "mgmt", "msal", + "Mtls", "northcentralus", "nunit", "odata", diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/CHANGELOG.md b/sdk/containerapps/Azure.ResourceManager.AppContainers/CHANGELOG.md index 24ddbc12a4d42..53fbce62b5881 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/CHANGELOG.md +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/CHANGELOG.md @@ -4,6 +4,17 @@ ### Features Added +- Upgrade to 2023-04-01-preview api version +- Add `runningState` and `runningStateDetails` for `ContainerAppReplica` +- Add `TerminationGracePeriodSeconds` and `ServicBinds`for `ContainerAppTemplate` +- Add `MountOptions` for `ContainerAppVolume` +- Add `SubPath` for `ContainerAppVolumeMount` +- Add Mtls Enabled for ContainerAppManagedEnvironment +- Add `Kind` for ContainerAppCredentials +- Add `GitHubPersonalAccessToken` for `ContainerAppGitHubActionConfiguration` +- Add `EventTriggerConfig` for JobConfiguration +- Rename `ContainerAppJobTriggerType` value from `Scheduled` to `Schedule` + ### Breaking Changes ### Bugs Fixed 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 f29cc2eb5e48f..49c43730de773 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 @@ -23,6 +23,7 @@ public static partial class AppContainersExtensions 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.ContainerAppJobExecutionResource GetContainerAppJobExecutionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { 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; } @@ -380,6 +381,39 @@ public ContainerAppJobData(Azure.Core.AzureLocation location) : base (default(Az public Azure.ResourceManager.AppContainers.Models.ContainerAppJobTemplate Template { get { throw null; } set { } } public string WorkloadProfileName { get { throw null; } set { } } } + public partial class ContainerAppJobExecutionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ContainerAppJobExecutionCollection() { } + public virtual Azure.Response Exists(string jobExecutionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string jobExecutionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string jobExecutionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string jobExecutionName, 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 ContainerAppJobExecutionData : Azure.ResourceManager.Models.ResourceData + { + internal ContainerAppJobExecutionData() { } + 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 ContainerAppJobExecutionResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ContainerAppJobExecutionResource() { } + public virtual Azure.ResourceManager.AppContainers.ContainerAppJobExecutionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string jobName, string jobExecutionName) { 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.ResourceManager.ArmOperation StopExecutionJob(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task StopExecutionJobAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class ContainerAppJobResource : Azure.ResourceManager.ArmResource { public static readonly Azure.Core.ResourceType ResourceType; @@ -393,20 +427,19 @@ protected ContainerAppJobResource() { } 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.Response GetContainerAppJobExecution(string jobExecutionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetContainerAppJobExecutionAsync(string jobExecutionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppContainers.ContainerAppJobExecutionCollection GetContainerAppJobExecutions() { 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 Start(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.Models.ContainerAppJobExecutionTemplate template = null, 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 = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation StopMultipleExecutions(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> StopMultipleExecutionsAsync(Azure.WaitUntil waitUntil, 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; } } @@ -543,6 +576,7 @@ public ContainerAppManagedEnvironmentData(Azure.Core.AzureLocation location) : b public string DeploymentErrors { get { throw null; } } public string EventStreamEndpoint { get { throw null; } } public string InfrastructureResourceGroup { get { throw null; } set { } } + public bool? IsMtlsEnabled { get { throw null; } set { } } public bool? IsZoneRedundant { get { throw null; } set { } } public string KedaVersion { get { throw null; } } public string Kind { get { throw null; } set { } } @@ -680,6 +714,9 @@ public partial class ContainerAppReplicaData : Azure.ResourceManager.Models.Reso public ContainerAppReplicaData() { } public System.Collections.Generic.IList Containers { get { throw null; } } public System.DateTimeOffset? CreatedOn { get { throw null; } } + public System.Collections.Generic.IList InitContainers { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.ContainerAppReplicaRunningState? RunningState { get { throw null; } } + public string RunningStateDetails { get { throw null; } } } public partial class ContainerAppReplicaResource : Azure.ResourceManager.ArmResource { @@ -730,6 +767,10 @@ protected ContainerAppResource() { } 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, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> StartAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Stop(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> StopAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.ContainerAppData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.ContainerAppData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } @@ -757,6 +798,7 @@ public ContainerAppRevisionData() { } public string ProvisioningError { get { throw null; } } public Azure.ResourceManager.AppContainers.Models.ContainerAppRevisionProvisioningState? ProvisioningState { get { throw null; } } public int? Replicas { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.RevisionRunningState? RunningState { get { throw null; } } public Azure.ResourceManager.AppContainers.Models.ContainerAppTemplate Template { get { throw null; } } public int? TrafficWeight { get { throw null; } } } @@ -885,15 +927,16 @@ public static partial class ArmAppContainersModelFactory public static Azure.ResourceManager.AppContainers.Models.ContainerAppEnvironmentAuthToken ContainerAppEnvironmentAuthToken(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string token = null, System.DateTimeOffset? expireOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.AppContainers.Models.ContainerAppIngressConfiguration ContainerAppIngressConfiguration(string fqdn = null, bool? external = default(bool?), int? targetPort = default(int?), int? exposedPort = default(int?), Azure.ResourceManager.AppContainers.Models.ContainerAppIngressTransportMethod? transport = default(Azure.ResourceManager.AppContainers.Models.ContainerAppIngressTransportMethod?), System.Collections.Generic.IEnumerable traffic = null, System.Collections.Generic.IEnumerable customDomains = null, bool? allowInsecure = default(bool?), System.Collections.Generic.IEnumerable ipSecurityRestrictions = null, Azure.ResourceManager.AppContainers.Models.Affinity? stickySessionsAffinity = default(Azure.ResourceManager.AppContainers.Models.Affinity?), Azure.ResourceManager.AppContainers.Models.ContainerAppIngressClientCertificateMode? clientCertificateMode = default(Azure.ResourceManager.AppContainers.Models.ContainerAppIngressClientCertificateMode?), Azure.ResourceManager.AppContainers.Models.ContainerAppCorsPolicy corsPolicy = null) { throw null; } public static Azure.ResourceManager.AppContainers.ContainerAppJobData ContainerAppJobData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.AppContainers.Models.ContainerAppJobProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.ContainerAppJobProvisioningState?), string environmentId = null, string workloadProfileName = null, Azure.ResourceManager.AppContainers.Models.ContainerAppJobConfiguration configuration = null, Azure.ResourceManager.AppContainers.Models.ContainerAppJobTemplate template = null, System.Collections.Generic.IEnumerable outboundIPAddresses = null, string eventStreamEndpoint = null) { throw null; } - public static Azure.ResourceManager.AppContainers.Models.ContainerAppJobExecution ContainerAppJobExecution(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppContainers.Models.JobExecutionRunningState? status = default(Azure.ResourceManager.AppContainers.Models.JobExecutionRunningState?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), Azure.ResourceManager.AppContainers.Models.ContainerAppJobExecutionTemplate template = null) { throw null; } - public static Azure.ResourceManager.AppContainers.Models.ContainerAppJobExecutions ContainerAppJobExecutions(System.Collections.Generic.IEnumerable value = null, string nextLink = null) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.ContainerAppJobExecutionBase ContainerAppJobExecutionBase(string name = null, string id = null) { throw null; } + public static Azure.ResourceManager.AppContainers.ContainerAppJobExecutionData ContainerAppJobExecutionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppContainers.Models.JobExecutionRunningState? status = default(Azure.ResourceManager.AppContainers.Models.JobExecutionRunningState?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), Azure.ResourceManager.AppContainers.Models.ContainerAppJobExecutionTemplate template = null) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.ContainerAppJobExecutions ContainerAppJobExecutions(System.Collections.Generic.IEnumerable value = null, string nextLink = null) { throw null; } public static Azure.ResourceManager.AppContainers.ContainerAppManagedCertificateData ContainerAppManagedCertificateData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.AppContainers.Models.ManagedCertificateProperties properties = null) { throw null; } - public static Azure.ResourceManager.AppContainers.ContainerAppManagedEnvironmentData ContainerAppManagedEnvironmentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string kind = null, Azure.ResourceManager.AppContainers.Models.ContainerAppEnvironmentProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.ContainerAppEnvironmentProvisioningState?), string daprAIInstrumentationKey = null, string daprAIConnectionString = null, Azure.ResourceManager.AppContainers.Models.ContainerAppVnetConfiguration vnetConfiguration = null, string deploymentErrors = null, string defaultDomain = null, System.Net.IPAddress staticIP = null, Azure.ResourceManager.AppContainers.Models.ContainerAppLogsConfiguration appLogsConfiguration = null, bool? isZoneRedundant = default(bool?), Azure.ResourceManager.AppContainers.Models.ContainerAppCustomDomainConfiguration customDomainConfiguration = null, string eventStreamEndpoint = null, System.Collections.Generic.IEnumerable workloadProfiles = null, string kedaVersion = null, string daprVersion = null, string infrastructureResourceGroup = null) { throw null; } + public static Azure.ResourceManager.AppContainers.ContainerAppManagedEnvironmentData ContainerAppManagedEnvironmentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string kind = null, Azure.ResourceManager.AppContainers.Models.ContainerAppEnvironmentProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.ContainerAppEnvironmentProvisioningState?), string daprAIInstrumentationKey = null, string daprAIConnectionString = null, Azure.ResourceManager.AppContainers.Models.ContainerAppVnetConfiguration vnetConfiguration = null, string deploymentErrors = null, string defaultDomain = null, System.Net.IPAddress staticIP = null, Azure.ResourceManager.AppContainers.Models.ContainerAppLogsConfiguration appLogsConfiguration = null, bool? isZoneRedundant = default(bool?), Azure.ResourceManager.AppContainers.Models.ContainerAppCustomDomainConfiguration customDomainConfiguration = null, string eventStreamEndpoint = null, System.Collections.Generic.IEnumerable workloadProfiles = null, string kedaVersion = null, string daprVersion = null, string infrastructureResourceGroup = null, bool? isMtlsEnabled = default(bool?)) { throw null; } public static Azure.ResourceManager.AppContainers.ContainerAppManagedEnvironmentStorageData ContainerAppManagedEnvironmentStorageData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppContainers.Models.ContainerAppAzureFileProperties managedEnvironmentStorageAzureFile = null) { throw null; } public static Azure.ResourceManager.AppContainers.Models.ContainerAppNameAvailabilityResult ContainerAppNameAvailabilityResult(bool? isNameAvailable = default(bool?), Azure.ResourceManager.AppContainers.Models.ContainerAppNameUnavailableReason? reason = default(Azure.ResourceManager.AppContainers.Models.ContainerAppNameUnavailableReason?), string message = null) { throw null; } - public static Azure.ResourceManager.AppContainers.Models.ContainerAppReplicaContainer ContainerAppReplicaContainer(string name = null, string containerId = null, bool? isReady = default(bool?), bool? isStarted = default(bool?), int? restartCount = default(int?), string logStreamEndpoint = null, string execEndpoint = null) { throw null; } - public static Azure.ResourceManager.AppContainers.ContainerAppReplicaData ContainerAppReplicaData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable containers = null) { throw null; } - public static Azure.ResourceManager.AppContainers.ContainerAppRevisionData ContainerAppRevisionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastActiveOn = default(System.DateTimeOffset?), string fqdn = null, Azure.ResourceManager.AppContainers.Models.ContainerAppTemplate template = null, bool? isActive = default(bool?), int? replicas = default(int?), int? trafficWeight = default(int?), string provisioningError = null, Azure.ResourceManager.AppContainers.Models.ContainerAppRevisionHealthState? healthState = default(Azure.ResourceManager.AppContainers.Models.ContainerAppRevisionHealthState?), Azure.ResourceManager.AppContainers.Models.ContainerAppRevisionProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.ContainerAppRevisionProvisioningState?)) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.ContainerAppReplicaContainer ContainerAppReplicaContainer(string name = null, string containerId = null, bool? isReady = default(bool?), bool? isStarted = default(bool?), int? restartCount = default(int?), Azure.ResourceManager.AppContainers.Models.ContainerAppContainerRunningState? runningState = default(Azure.ResourceManager.AppContainers.Models.ContainerAppContainerRunningState?), string runningStateDetails = null, string logStreamEndpoint = null, string execEndpoint = null) { throw null; } + public static Azure.ResourceManager.AppContainers.ContainerAppReplicaData ContainerAppReplicaData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.AppContainers.Models.ContainerAppReplicaRunningState? runningState = default(Azure.ResourceManager.AppContainers.Models.ContainerAppReplicaRunningState?), string runningStateDetails = null, System.Collections.Generic.IEnumerable containers = null, System.Collections.Generic.IEnumerable initContainers = null) { throw null; } + public static Azure.ResourceManager.AppContainers.ContainerAppRevisionData ContainerAppRevisionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastActiveOn = default(System.DateTimeOffset?), string fqdn = null, Azure.ResourceManager.AppContainers.Models.ContainerAppTemplate template = null, bool? isActive = default(bool?), int? replicas = default(int?), int? trafficWeight = default(int?), string provisioningError = null, Azure.ResourceManager.AppContainers.Models.ContainerAppRevisionHealthState? healthState = default(Azure.ResourceManager.AppContainers.Models.ContainerAppRevisionHealthState?), Azure.ResourceManager.AppContainers.Models.ContainerAppRevisionProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.ContainerAppRevisionProvisioningState?), Azure.ResourceManager.AppContainers.Models.RevisionRunningState? runningState = default(Azure.ResourceManager.AppContainers.Models.RevisionRunningState?)) { throw null; } public static Azure.ResourceManager.AppContainers.Models.ContainerAppSecret ContainerAppSecret(string name = null, string value = null, string identity = null, System.Uri keyVaultUri = null) { throw null; } public static Azure.ResourceManager.AppContainers.ContainerAppSourceControlData ContainerAppSourceControlData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppContainers.Models.ContainerAppSourceControlOperationState? operationState = default(Azure.ResourceManager.AppContainers.Models.ContainerAppSourceControlOperationState?), System.Uri repoUri = null, string branch = null, Azure.ResourceManager.AppContainers.Models.ContainerAppGitHubActionConfiguration gitHubActionConfiguration = null) { throw null; } public static Azure.ResourceManager.AppContainers.Models.ContainerAppWorkloadProfileState ContainerAppWorkloadProfileState(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppContainers.Models.ContainerAppWorkloadProfileStateProperties properties = null) { throw null; } @@ -1149,6 +1192,7 @@ public ContainerAppConfiguration() { } public int? MaxInactiveRevisions { get { throw null; } set { } } public System.Collections.Generic.IList Registries { get { throw null; } } public System.Collections.Generic.IList Secrets { get { throw null; } } + public string ServiceType { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ContainerAppConnectedEnvironmentProvisioningState : System.IEquatable @@ -1179,6 +1223,25 @@ public partial class ContainerAppContainer : Azure.ResourceManager.AppContainers public ContainerAppContainer() { } public System.Collections.Generic.IList Probes { get { throw null; } } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ContainerAppContainerRunningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ContainerAppContainerRunningState(string value) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.ContainerAppContainerRunningState Running { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.ContainerAppContainerRunningState Terminated { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.ContainerAppContainerRunningState Waiting { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppContainers.Models.ContainerAppContainerRunningState 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.ContainerAppContainerRunningState left, Azure.ResourceManager.AppContainers.Models.ContainerAppContainerRunningState right) { throw null; } + public static implicit operator Azure.ResourceManager.AppContainers.Models.ContainerAppContainerRunningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppContainers.Models.ContainerAppContainerRunningState left, Azure.ResourceManager.AppContainers.Models.ContainerAppContainerRunningState right) { throw null; } + public override string ToString() { throw null; } + } public partial class ContainerAppCookieExpiration { public ContainerAppCookieExpiration() { } @@ -1205,6 +1268,7 @@ public partial class ContainerAppCredentials public ContainerAppCredentials() { } public string ClientId { get { throw null; } set { } } public string ClientSecret { get { throw null; } set { } } + public string Kind { get { throw null; } set { } } public string SubscriptionId { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } set { } } } @@ -1505,6 +1569,7 @@ public partial class ContainerAppGitHubActionConfiguration public ContainerAppGitHubActionConfiguration() { } public Azure.ResourceManager.AppContainers.Models.ContainerAppCredentials AzureCredentials { get { throw null; } set { } } public string ContextPath { get { throw null; } set { } } + public string GitHubPersonalAccessToken { get { throw null; } set { } } public string Image { get { throw null; } set { } } public string OS { get { throw null; } set { } } public string PublishType { get { throw null; } set { } } @@ -1680,6 +1745,7 @@ public ContainerAppIPSecurityRestrictionRule(string name, string ipAddressRange, public partial class ContainerAppJobConfiguration { public ContainerAppJobConfiguration(Azure.ResourceManager.AppContainers.Models.ContainerAppJobTriggerType triggerType, int replicaTimeout) { } + public Azure.ResourceManager.AppContainers.Models.JobConfigurationEventTriggerConfig EventTriggerConfig { get { throw null; } set { } } 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 { } } @@ -1688,25 +1754,17 @@ public ContainerAppJobConfiguration(Azure.ResourceManager.AppContainers.Models.C 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 { } } + internal ContainerAppJobExecutionBase() { } + public string Id { get { throw null; } } + public string Name { get { throw null; } } } public partial class ContainerAppJobExecutions { internal ContainerAppJobExecutions() { } public string NextLink { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } } public partial class ContainerAppJobExecutionTemplate { @@ -1766,7 +1824,7 @@ public ContainerAppJobTemplate() { } 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 static Azure.ResourceManager.AppContainers.Models.ContainerAppJobTriggerType Schedule { 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; } @@ -2029,6 +2087,27 @@ public ContainerAppReplicaContainer() { } public string LogStreamEndpoint { get { throw null; } } public string Name { get { throw null; } set { } } public int? RestartCount { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.ContainerAppContainerRunningState? RunningState { get { throw null; } } + public string RunningStateDetails { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ContainerAppReplicaRunningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ContainerAppReplicaRunningState(string value) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.ContainerAppReplicaRunningState NotRunning { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.ContainerAppReplicaRunningState Running { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.ContainerAppReplicaRunningState Unknown { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppContainers.Models.ContainerAppReplicaRunningState 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.ContainerAppReplicaRunningState left, Azure.ResourceManager.AppContainers.Models.ContainerAppReplicaRunningState right) { throw null; } + public static implicit operator Azure.ResourceManager.AppContainers.Models.ContainerAppReplicaRunningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppContainers.Models.ContainerAppReplicaRunningState left, Azure.ResourceManager.AppContainers.Models.ContainerAppReplicaRunningState right) { throw null; } + public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ContainerAppRevisionHealthState : System.IEquatable @@ -2166,6 +2245,8 @@ public ContainerAppTemplate() { } public System.Collections.Generic.IList InitContainers { get { throw null; } } public string RevisionSuffix { get { throw null; } set { } } public Azure.ResourceManager.AppContainers.Models.ContainerAppScale Scale { get { throw null; } set { } } + public System.Collections.Generic.IList ServiceBinds { get { throw null; } } + public long? TerminationGracePeriodSeconds { get { throw null; } set { } } public System.Collections.Generic.IList Volumes { get { throw null; } } } public partial class ContainerAppTwitterConfiguration @@ -2205,6 +2286,7 @@ public ContainerAppVnetConfiguration() { } public partial class ContainerAppVolume { public ContainerAppVolume() { } + public string MountOptions { get { throw null; } set { } } public string Name { get { throw null; } set { } } public System.Collections.Generic.IList Secrets { get { throw null; } } public string StorageName { get { throw null; } set { } } @@ -2214,6 +2296,7 @@ public partial class ContainerAppVolumeMount { public ContainerAppVolumeMount() { } public string MountPath { get { throw null; } set { } } + public string SubPath { get { throw null; } set { } } public string VolumeName { get { throw null; } set { } } } public partial class ContainerAppWorkloadProfile @@ -2249,6 +2332,13 @@ public ContainerAppWritableSecret() { } public string Name { get { throw null; } set { } } public string Value { get { throw null; } set { } } } + public partial class JobConfigurationEventTriggerConfig + { + public JobConfigurationEventTriggerConfig() { } + public int? Parallelism { get { throw null; } set { } } + public int? ReplicaCompletionCount { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.JobScale Scale { get { throw null; } set { } } + } public partial class JobConfigurationManualTriggerConfig { public JobConfigurationManualTriggerConfig() { } @@ -2272,11 +2362,6 @@ public JobExecutionContainer() { } 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 { @@ -2300,6 +2385,22 @@ public JobExecutionNamesCollection(System.Collections.Generic.IEnumerable Rules { get { throw null; } } + } + public partial class JobScaleRule + { + public JobScaleRule() { } + public System.Collections.Generic.IList Auth { get { throw null; } } + public string JobScaleRuleType { get { throw null; } set { } } + public System.BinaryData Metadata { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ManagedCertificateDomainControlValidation : System.IEquatable { @@ -2328,10 +2429,38 @@ public ManagedCertificateProperties() { } public string SubjectName { get { throw null; } set { } } public string ValidationToken { get { throw null; } } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct RevisionRunningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public RevisionRunningState(string value) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.RevisionRunningState Degraded { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.RevisionRunningState Failed { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.RevisionRunningState Processing { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.RevisionRunningState Running { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.RevisionRunningState Stopped { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.RevisionRunningState Unknown { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppContainers.Models.RevisionRunningState 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.RevisionRunningState left, Azure.ResourceManager.AppContainers.Models.RevisionRunningState right) { throw null; } + public static implicit operator Azure.ResourceManager.AppContainers.Models.RevisionRunningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppContainers.Models.RevisionRunningState left, Azure.ResourceManager.AppContainers.Models.RevisionRunningState right) { throw null; } + public override string ToString() { throw null; } + } public partial class SecretVolumeItem { public SecretVolumeItem() { } public string Path { get { throw null; } set { } } public string SecretRef { get { throw null; } set { } } } + public partial class ServiceBind + { + public ServiceBind() { } + public string Name { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ServiceId { 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 86f60002adcc5..ad11499986de4 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/preview/2022-11-01-preview/examples/AuthConfigs_ListByContainer.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/AuthConfigs_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/AuthConfigs_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/AuthConfigs_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 b64449898f300..4d2f38307c3cb 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/preview/2022-11-01-preview/examples/AuthConfigs_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/AuthConfigs_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/AuthConfigs_Delete.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 72bebd3a4b46b..a80ec204fef03 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/preview/2022-11-01-preview/examples/ContainerApps_ListByResourceGroup.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/ContainerApps_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/ContainerApps_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/ContainerApps_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 @@ -219,6 +219,7 @@ public async Task CreateOrUpdate_CreateOrUpdateContainerApp() IsApiLoggingEnabled = true, }, MaxInactiveRevisions = 10, + ServiceType = "redis", }, Template = new ContainerAppTemplate() { @@ -288,6 +289,14 @@ public async Task CreateOrUpdate_CreateOrUpdateContainerApp() } }, }, + ServiceBinds = +{ +new ServiceBind() +{ +ServiceId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/redisService"), +Name = "redisService", +} +}, }, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, containerAppName, data); @@ -305,7 +314,7 @@ public async Task CreateOrUpdate_CreateOrUpdateContainerApp() [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 + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 @@ -403,7 +412,7 @@ public async Task CreateOrUpdate_CreateOrUpdateManagedByApp() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateTcpApp() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_TcpApp_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 93b59ffef6a71..b8a4375a79db2 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/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificate_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificate_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 f815135a0a8ca..c4a41e7a0ea37 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/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificate_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificate_Delete.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificates_Patch.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 750a99d19783e..92bbe763a2cdc 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/preview/2022-11-01-preview/examples/ConnectedEnvironments_ListByResourceGroup.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/ConnectedEnvironments_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/ConnectedEnvironments_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/ConnectedEnvironments_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 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 1c712048165e6..6a7c852ba939e 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/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_List.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 b8fe19f389dab..c2c676cb8b102 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/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_Delete.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 5e16d904195b9..6f40af16aca85 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/preview/2022-11-01-preview/examples/ConnectedEnvironments_ListBySubscription.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/ConnectedEnvironments_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/ConnectedEnvironments_Delete.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/ConnectedEnvironments_Patch.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 fcaabb16076de..f8c2de92f06d9 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/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_List.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 cd1bb7ba02495..9f338852caafa 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/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_Delete.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 06f7424f2f35f..eb3b545b4a02c 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/preview/2022-11-01-preview/examples/ContainerAppsDiagnostics_List.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/ContainerAppsDiagnostics_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/ContainerAppsDiagnostics_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 0e5191a27dd1a..dc6116098a6e5 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/preview/2022-11-01-preview/examples/ContainerApps_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 24da2be711677..dcf360274326c 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/preview/2022-11-01-preview/examples/Revisions_List.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/Revisions_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/Revisions_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 84a877594e644..3e960813e9bf0 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/preview/2022-11-01-preview/examples/Revisions_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 597311bf30f1e..04939b04c7967 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/preview/2022-11-01-preview/examples/ContainerAppsDiagnostics_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 index f1ec9176438f7..3dd1373bef06d 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppJobCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppJobCollection.cs @@ -6,6 +6,7 @@ #nullable disable using System; +using System.Collections.Generic; using System.Threading.Tasks; using Azure; using Azure.Core; @@ -24,7 +25,7 @@ public partial class Sample_ContainerAppJobCollection [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 + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 @@ -60,7 +61,7 @@ public async Task GetAll_ListContainerAppsJobsByResourceGroup() [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 + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 @@ -94,7 +95,7 @@ public async Task Get_GetContainerAppsJob() [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 + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 @@ -124,7 +125,7 @@ public async Task Exists_GetContainerAppsJob() [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 + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 @@ -215,5 +216,102 @@ public async Task CreateOrUpdate_CreateOrUpdateContainerAppsJob() // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + + // Create or Update Container Apps Job With Event Driven Trigger + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateContainerAppsJobWithEventDrivenTrigger() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/Job_CreateorUpdate_EventTrigger.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.Event, 10) + { + ReplicaRetryLimit = 10, + EventTriggerConfig = new JobConfigurationEventTriggerConfig() + { + ReplicaCompletionCount = 1, + Parallelism = 4, + Scale = new JobScale() + { + PollingInterval = 40, + MinExecutions = 1, + MaxExecutions = 5, + Rules = +{ +new JobScaleRule() +{ +Name = "servicebuscalingrule", +JobScaleRuleType = "azure-servicebus", +Metadata = BinaryData.FromObjectAsJson(new Dictionary() +{ +["topicName"] = "my-topic"}), +} +}, + }, + }, + }, + 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() +{ +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_ContainerAppJobExecutionCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppJobExecutionCollection.cs new file mode 100644 index 0000000000000..8013627940033 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppJobExecutionCollection.cs @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.AppContainers; + +namespace Azure.ResourceManager.AppContainers.Samples +{ + public partial class Sample_ContainerAppJobExecutionCollection + { + // Get a Container Apps Job Executions + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_GetAContainerAppsJobExecutions() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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); + + // get the collection of this ContainerAppJobExecutionResource + ContainerAppJobExecutionCollection collection = containerAppJob.GetContainerAppJobExecutions(); + + // invoke the operation and iterate over the result + await foreach (ContainerAppJobExecutionResource 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 + ContainerAppJobExecutionData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get a single Job Execution + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetASingleJobExecution() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/Job_Execution_Get.json + // this example is just showing the usage of "JobExecution" 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); + + // get the collection of this ContainerAppJobExecutionResource + ContainerAppJobExecutionCollection collection = containerAppJob.GetContainerAppJobExecutions(); + + // invoke the operation + string jobExecutionName = "jobExecution1"; + ContainerAppJobExecutionResource result = await collection.GetAsync(jobExecutionName); + + // 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 + ContainerAppJobExecutionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get a single Job Execution + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetASingleJobExecution() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/Job_Execution_Get.json + // this example is just showing the usage of "JobExecution" 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); + + // get the collection of this ContainerAppJobExecutionResource + ContainerAppJobExecutionCollection collection = containerAppJob.GetContainerAppJobExecutions(); + + // invoke the operation + string jobExecutionName = "jobExecution1"; + bool result = await collection.ExistsAsync(jobExecutionName); + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppJobExecutionResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppJobExecutionResource.cs new file mode 100644 index 0000000000000..8d915560d2f7a --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppJobExecutionResource.cs @@ -0,0 +1,80 @@ +// 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; + +namespace Azure.ResourceManager.AppContainers.Samples +{ + public partial class Sample_ContainerAppJobExecutionResource + { + // Terminate a Container Apps Job + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task StopExecutionJob_TerminateAContainerAppsJob() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 ContainerAppJobExecutionResource created on azure + // for more information of creating ContainerAppJobExecutionResource, please refer to the document of ContainerAppJobExecutionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string jobName = "testcontainerAppsJob0"; + string jobExecutionName = "jobExecution1"; + ResourceIdentifier containerAppJobExecutionResourceId = ContainerAppJobExecutionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, jobName, jobExecutionName); + ContainerAppJobExecutionResource containerAppJobExecution = client.GetContainerAppJobExecutionResource(containerAppJobExecutionResourceId); + + // invoke the operation + await containerAppJobExecution.StopExecutionJobAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // Get a single Job Execution + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetASingleJobExecution() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/Job_Execution_Get.json + // this example is just showing the usage of "JobExecution" 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 ContainerAppJobExecutionResource created on azure + // for more information of creating ContainerAppJobExecutionResource, please refer to the document of ContainerAppJobExecutionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string jobName = "testcontainerAppsJob0"; + string jobExecutionName = "jobExecution1"; + ResourceIdentifier containerAppJobExecutionResourceId = ContainerAppJobExecutionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, jobName, jobExecutionName); + ContainerAppJobExecutionResource containerAppJobExecution = client.GetContainerAppJobExecutionResource(containerAppJobExecutionResourceId); + + // invoke the operation + ContainerAppJobExecutionResource result = await containerAppJobExecution.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 + ContainerAppJobExecutionData 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 index 43f2e806c0569..f1a1896549b15 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppJobResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppJobResource.cs @@ -24,7 +24,7 @@ public partial class Sample_ContainerAppJobResource [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 + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 @@ -56,7 +56,7 @@ public async Task GetContainerAppJobs_ListContainerAppsJobsBySubscription() [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 + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 @@ -87,7 +87,7 @@ public async Task Get_GetContainerAppsJob() [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 + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 @@ -114,7 +114,7 @@ public async Task Delete_DeleteContainerAppsJob() [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 + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 @@ -210,7 +210,7 @@ public async Task Update_PatchContainerAppsJob() [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 + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 @@ -264,46 +264,18 @@ public async Task Start_RunAContainerAppsJob() } }, }; - ArmOperation lro = await containerAppJob.StartAsync(WaitUntil.Completed, template); + ArmOperation lro = await containerAppJob.StartAsync(WaitUntil.Completed, template: 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 + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 @@ -320,20 +292,7 @@ public async Task StopMultipleExecutions_TerminateMultipleContainerAppsJob() 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); + ArmOperation lro = await containerAppJob.StopMultipleExecutionsAsync(WaitUntil.Completed); ContainerAppJobExecutions result = lro.Value; Console.WriteLine($"Succeeded: {result}"); @@ -344,7 +303,7 @@ public async Task StopMultipleExecutions_TerminateMultipleContainerAppsJob() [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 + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 @@ -368,35 +327,5 @@ public async Task GetSecrets_ListContainerAppsJobSecrets() 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 index 2f1dd60cd4c18..84eedc3aa1cc7 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedCertificateCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedCertificateCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_ContainerAppManagedCertificateCollection [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 + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 @@ -58,7 +58,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/preview/2022-11-01-preview/examples/ManagedCertificate_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 @@ -89,7 +89,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/preview/2022-11-01-preview/examples/ManagedCertificate_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 @@ -133,7 +133,7 @@ public async Task CreateOrUpdate_CreateOrUpdateCertificate() [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 + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 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 index 697a1b60e6b66..f40d99c115595 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedCertificateResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/samples/Generated/Samples/Sample_ContainerAppManagedCertificateResource.cs @@ -23,7 +23,7 @@ public partial class Sample_ContainerAppManagedCertificateResource [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 + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 @@ -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/preview/2022-11-01-preview/examples/ManagedCertificate_Delete.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 @@ -83,7 +83,7 @@ public async Task Delete_DeleteCertificate() [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 + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 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 24440116c00e6..6703b34903afd 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/preview/2022-11-01-preview/examples/Certificates_ListByManagedEnvironment.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/Certificate_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/Certificate_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/Certificate_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 7907368535c22..671705cbb03cd 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/preview/2022-11-01-preview/examples/Certificate_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/Certificate_Delete.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/Certificates_Patch.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 10b0223ccf5e8..4a5455aeccf82 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 @@ -24,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/preview/2022-11-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 @@ -60,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/preview/2022-11-01-preview/examples/ManagedEnvironments_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 @@ -94,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/preview/2022-11-01-preview/examples/ManagedEnvironments_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 @@ -124,7 +124,7 @@ public async Task Exists_GetEnvironmentsByName() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateEnvironmentWithCustomInfrastructureResourceGroup() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_CustomInfrastructureResourceGroup_Create.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 @@ -199,7 +199,7 @@ public async Task CreateOrUpdate_CreateEnvironmentWithCustomInfrastructureResour [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 + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 @@ -257,6 +257,7 @@ public async Task CreateOrUpdate_CreateEnvironments() MaximumNodeCount = 6, },new ContainerAppWorkloadProfile("My-consumption-01","Consumption") }, + IsMtlsEnabled = true, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, environmentName, data); ContainerAppManagedEnvironmentResource result = lro.Value; 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 1bc1f6d0f808d..3b8f880d1915d 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/preview/2022-11-01-preview/examples/DaprComponents_List.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/DaprComponents_Get_SecretStoreComponent.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/DaprComponents_Get_SecretStoreComponent.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/DaprComponents_Get_Secrets.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/DaprComponents_Get_Secrets.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/DaprComponents_CreateOrUpdate_Secrets.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 b16e3ac29b5b7..3755beac170b5 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/preview/2022-11-01-preview/examples/DaprComponents_Get_SecretStoreComponent.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/DaprComponents_Get_Secrets.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/DaprComponents_CreateOrUpdate_Secrets.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/DaprComponents_Delete.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/DaprComponents_ListSecrets.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 9e0100118864e..3d6f80cbf1027 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/preview/2022-11-01-preview/examples/ManagedEnvironmentDiagnostics_List.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/ManagedEnvironmentDiagnostics_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/ManagedEnvironmentDiagnostics_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 c4458e7381e50..e859a5acca050 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/preview/2022-11-01-preview/examples/ManagedEnvironmentDiagnostics_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 24946683c4f80..e02c16f0374d2 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/preview/2022-11-01-preview/examples/ManagedEnvironments_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 7e57fa03e5038..8e420fe9eca1c 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/preview/2022-11-01-preview/examples/ManagedEnvironments_ListBySubscription.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/ManagedEnvironments_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/ManagedEnvironments_Delete.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/ManagedEnvironments_Patch.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/ManagedEnvironments_GetAuthToken.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/ManagedEnvironments_ListWorkloadProfileStates.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/Certificates_CheckNameAvailability.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/ContainerApps_CheckNameAvailability.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 a5ecc9ef38a50..e22067458d173 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/preview/2022-11-01-preview/examples/ManagedEnvironmentsStorages_List.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/ManagedEnvironmentsStorages_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/ManagedEnvironmentsStorages_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 4c5fe1d48725b..52ae63a108dd0 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/preview/2022-11-01-preview/examples/ManagedEnvironmentsStorages_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/ManagedEnvironmentsStorages_Delete.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 965b017d6d689..76467108c6be7 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/preview/2022-11-01-preview/examples/Replicas_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/Replicas_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/Replicas_List.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 8a5cf9328e924..496a1983fc486 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/preview/2022-11-01-preview/examples/Replicas_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 16cb776aeed9d..dd45409601d97 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/preview/2022-11-01-preview/examples/ContainerApps_ListBySubscription.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/ContainerApps_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/ContainerApps_Delete.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/ContainerApps_Patch.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 @@ -183,6 +183,7 @@ public async Task Update_PatchContainerApp() IsApiLoggingEnabled = true, }, MaxInactiveRevisions = 10, + ServiceType = "redis", }, Template = new ContainerAppTemplate() { @@ -244,6 +245,14 @@ public async Task Update_PatchContainerApp() } }, }, + ServiceBinds = +{ +new ServiceBind() +{ +ServiceId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/service"), +Name = "service", +} +}, }, Tags = { @@ -266,7 +275,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/preview/2022-11-01-preview/examples/ContainerApps_ListCustomHostNameAnalysis.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 @@ -294,7 +303,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/preview/2022-11-01-preview/examples/ContainerApps_ListSecrets.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 @@ -324,7 +333,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/preview/2022-11-01-preview/examples/ContainerApps_GetAuthToken.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 @@ -345,5 +354,69 @@ public async Task GetAuthToken_GetContainerAppAuthToken() Console.WriteLine($"Succeeded: {result}"); } + + // Start Container App + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Start_StartContainerApp() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ContainerApps_Start.json + // this example is just showing the usage of "ContainerApps_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 ContainerAppResource created on azure + // for more information of creating ContainerAppResource, please refer to the document of ContainerAppResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string containerAppName = "testWorkerApp0"; + ResourceIdentifier containerAppResourceId = ContainerAppResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, containerAppName); + ContainerAppResource containerApp = client.GetContainerAppResource(containerAppResourceId); + + // invoke the operation + ArmOperation lro = await containerApp.StartAsync(WaitUntil.Completed); + 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}"); + } + + // Stop Container App + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Stop_StopContainerApp() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ContainerApps_Stop.json + // this example is just showing the usage of "ContainerApps_Stop" 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 ContainerAppResource created on azure + // for more information of creating ContainerAppResource, please refer to the document of ContainerAppResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string containerAppName = "testWorkerApp0"; + ResourceIdentifier containerAppResourceId = ContainerAppResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, containerAppName); + ContainerAppResource containerApp = client.GetContainerAppResource(containerAppResourceId); + + // invoke the operation + ArmOperation lro = await containerApp.StopAsync(WaitUntil.Completed); + 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}"); + } } } 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 e136ab0b073c1..9e8fe6bb5aebd 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/preview/2022-11-01-preview/examples/Revisions_List.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/Revisions_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/Revisions_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 e3ffdc017952f..b31b2191d55b5 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/preview/2022-11-01-preview/examples/Revisions_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/Revisions_Activate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/Revisions_Deactivate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/Revisions_Restart.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 66f648591794f..62256763ba873 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/preview/2022-11-01-preview/examples/SourceControls_ListByContainer.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/SourceControls_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/SourceControls_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/SourceControls_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 @@ -155,8 +155,8 @@ public async Task CreateOrUpdate_CreateOrUpdateContainerAppSourceControl() { RegistryInfo = new ContainerAppRegistryInfo() { - RegistryServer = "xwang971reg.azurecr.io", - RegistryUserName = "xwang971reg", + RegistryServer = "test-registry.azurecr.io", + RegistryUserName = "test-registry", RegistryPassword = "", }, AzureCredentials = new ContainerAppCredentials() @@ -164,8 +164,10 @@ public async Task CreateOrUpdate_CreateOrUpdateContainerAppSourceControl() ClientId = "", ClientSecret = "", TenantId = Guid.Parse(""), + Kind = "feaderated", }, ContextPath = "./", + GitHubPersonalAccessToken = "test", Image = "image/tag", }, }; 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 d5b753b8627c9..db53be0a0f217 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/preview/2022-11-01-preview/examples/SourceControls_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/SourceControls_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 @@ -81,8 +81,8 @@ public async Task Update_CreateOrUpdateContainerAppSourceControl() { RegistryInfo = new ContainerAppRegistryInfo() { - RegistryServer = "xwang971reg.azurecr.io", - RegistryUserName = "xwang971reg", + RegistryServer = "test-registry.azurecr.io", + RegistryUserName = "test-registry", RegistryPassword = "", }, AzureCredentials = new ContainerAppCredentials() @@ -90,8 +90,10 @@ public async Task Update_CreateOrUpdateContainerAppSourceControl() ClientId = "", ClientSecret = "", TenantId = Guid.Parse(""), + Kind = "feaderated", }, ContextPath = "./", + GitHubPersonalAccessToken = "test", Image = "image/tag", }, }; @@ -110,7 +112,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/preview/2022-11-01-preview/examples/SourceControls_Delete.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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 6959c8e4a5b4c..ecaf5d59686d2 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/preview/2022-11-01-preview/examples/AvailableWorkloadProfiles_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/preview/2022-11-01-preview/examples/BillingMeters_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/preview/2023-04-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/Generated/ArmAppContainersModelFactory.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ArmAppContainersModelFactory.cs index fd99491e941be..53396b6b2a3c6 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ArmAppContainersModelFactory.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ArmAppContainersModelFactory.cs @@ -326,56 +326,6 @@ public static ContainerAppAuthToken ContainerAppAuthToken(ResourceIdentifier id return new ContainerAppAuthToken(id, name, resourceType, systemData, tags, location, token, expireOn); } - /// 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. - /// A new instance for mocking. - public static ContainerAppJobData ContainerAppJobData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, ContainerAppJobProvisioningState? provisioningState = null, string environmentId = null, string workloadProfileName = null, ContainerAppJobConfiguration configuration = null, ContainerAppJobTemplate template = null, IEnumerable outboundIPAddresses = null, string eventStreamEndpoint = null) - { - tags ??= new Dictionary(); - outboundIPAddresses ??= new List(); - - return new ContainerAppJobData(id, name, resourceType, systemData, tags, location, identity, provisioningState, environmentId, workloadProfileName, configuration, template, outboundIPAddresses?.ToList(), eventStreamEndpoint); - } - - /// Initializes a new instance of ContainerAppJobExecutions. - /// Collection of resources. - /// Link to next page of resources. - /// A new instance for mocking. - public static ContainerAppJobExecutions ContainerAppJobExecutions(IEnumerable value = null, string nextLink = null) - { - value ??= new List(); - - return new ContainerAppJobExecutions(value?.ToList(), nextLink); - } - - /// 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. - /// A new instance for mocking. - public static ContainerAppJobExecution ContainerAppJobExecution(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, JobExecutionRunningState? status = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, ContainerAppJobExecutionTemplate template = null) - { - return new ContainerAppJobExecution(id, name, resourceType, systemData, status, startOn, endOn, template); - } - /// Initializes a new instance of ContainerAppRevisionData. /// The id. /// The name. @@ -398,10 +348,11 @@ public static ContainerAppJobExecution ContainerAppJobExecution(ResourceIdentifi /// Optional Field - Platform Error Message. /// Current health State of the revision. /// Current provisioning State of the revision. + /// Current running state of the revision. /// A new instance for mocking. - public static ContainerAppRevisionData ContainerAppRevisionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DateTimeOffset? createdOn = null, DateTimeOffset? lastActiveOn = null, string fqdn = null, ContainerAppTemplate template = null, bool? isActive = null, int? replicas = null, int? trafficWeight = null, string provisioningError = null, ContainerAppRevisionHealthState? healthState = null, ContainerAppRevisionProvisioningState? provisioningState = null) + public static ContainerAppRevisionData ContainerAppRevisionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DateTimeOffset? createdOn = null, DateTimeOffset? lastActiveOn = null, string fqdn = null, ContainerAppTemplate template = null, bool? isActive = null, int? replicas = null, int? trafficWeight = null, string provisioningError = null, ContainerAppRevisionHealthState? healthState = null, ContainerAppRevisionProvisioningState? provisioningState = null, RevisionRunningState? runningState = null) { - return new ContainerAppRevisionData(id, name, resourceType, systemData, createdOn, lastActiveOn, fqdn, template, isActive, replicas, trafficWeight, provisioningError, healthState, provisioningState); + return new ContainerAppRevisionData(id, name, resourceType, systemData, createdOn, lastActiveOn, fqdn, template, isActive, replicas, trafficWeight, provisioningError, healthState, provisioningState, runningState); } /// Initializes a new instance of ContainerAppReplicaData. @@ -410,13 +361,17 @@ public static ContainerAppRevisionData ContainerAppRevisionData(ResourceIdentifi /// The resourceType. /// The systemData. /// Timestamp describing when the pod was created by controller. + /// Current running state of the replica. + /// The details of replica current running state. /// The containers collection under a replica. + /// The init containers collection under a replica. /// A new instance for mocking. - public static ContainerAppReplicaData ContainerAppReplicaData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DateTimeOffset? createdOn = null, IEnumerable containers = null) + public static ContainerAppReplicaData ContainerAppReplicaData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DateTimeOffset? createdOn = null, ContainerAppReplicaRunningState? runningState = null, string runningStateDetails = null, IEnumerable containers = null, IEnumerable initContainers = null) { containers ??= new List(); + initContainers ??= new List(); - return new ContainerAppReplicaData(id, name, resourceType, systemData, createdOn, containers?.ToList()); + return new ContainerAppReplicaData(id, name, resourceType, systemData, createdOn, runningState, runningStateDetails, containers?.ToList(), initContainers?.ToList()); } /// Initializes a new instance of ContainerAppReplicaContainer. @@ -425,12 +380,14 @@ public static ContainerAppReplicaData ContainerAppReplicaData(ResourceIdentifier /// The container ready status. /// The container start status. /// The container restart count. + /// Current running state of the container. + /// The details of container current running state. /// Log Stream endpoint. /// Container exec endpoint. /// A new instance for mocking. - public static ContainerAppReplicaContainer ContainerAppReplicaContainer(string name = null, string containerId = null, bool? isReady = null, bool? isStarted = null, int? restartCount = null, string logStreamEndpoint = null, string execEndpoint = null) + public static ContainerAppReplicaContainer ContainerAppReplicaContainer(string name = null, string containerId = null, bool? isReady = null, bool? isStarted = null, int? restartCount = null, ContainerAppContainerRunningState? runningState = null, string runningStateDetails = null, string logStreamEndpoint = null, string execEndpoint = null) { - return new ContainerAppReplicaContainer(name, containerId, isReady, isStarted, restartCount, logStreamEndpoint, execEndpoint); + return new ContainerAppReplicaContainer(name, containerId, isReady, isStarted, restartCount, runningState, runningStateDetails, logStreamEndpoint, execEndpoint); } /// Initializes a new instance of ContainerAppDiagnosticData. @@ -501,13 +458,73 @@ public static ContainerAppDiagnosticSupportTopic ContainerAppDiagnosticSupportTo /// 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. + /// Peer authentication settings for the Managed Environment. /// A new instance for mocking. - public static ContainerAppManagedEnvironmentData ContainerAppManagedEnvironmentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string kind = null, ContainerAppEnvironmentProvisioningState? provisioningState = null, string daprAIInstrumentationKey = null, string daprAIConnectionString = null, ContainerAppVnetConfiguration vnetConfiguration = null, string deploymentErrors = null, string defaultDomain = null, IPAddress staticIP = null, ContainerAppLogsConfiguration appLogsConfiguration = null, bool? isZoneRedundant = null, ContainerAppCustomDomainConfiguration customDomainConfiguration = null, string eventStreamEndpoint = null, IEnumerable workloadProfiles = null, string kedaVersion = null, string daprVersion = null, string infrastructureResourceGroup = null) + public static ContainerAppManagedEnvironmentData ContainerAppManagedEnvironmentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string kind = null, ContainerAppEnvironmentProvisioningState? provisioningState = null, string daprAIInstrumentationKey = null, string daprAIConnectionString = null, ContainerAppVnetConfiguration vnetConfiguration = null, string deploymentErrors = null, string defaultDomain = null, IPAddress staticIP = null, ContainerAppLogsConfiguration appLogsConfiguration = null, bool? isZoneRedundant = null, ContainerAppCustomDomainConfiguration customDomainConfiguration = null, string eventStreamEndpoint = null, IEnumerable workloadProfiles = null, string kedaVersion = null, string daprVersion = null, string infrastructureResourceGroup = null, bool? isMtlsEnabled = null) { tags ??= new Dictionary(); workloadProfiles ??= new List(); - return new ContainerAppManagedEnvironmentData(id, name, resourceType, systemData, tags, location, kind, provisioningState, daprAIInstrumentationKey, daprAIConnectionString, vnetConfiguration, deploymentErrors, defaultDomain, staticIP, appLogsConfiguration, isZoneRedundant, customDomainConfiguration, eventStreamEndpoint, workloadProfiles?.ToList(), kedaVersion != null ? new KedaConfiguration(kedaVersion) : null, daprVersion != null ? new DaprConfiguration(daprVersion) : null, infrastructureResourceGroup); + return new ContainerAppManagedEnvironmentData(id, name, resourceType, systemData, tags, location, kind, provisioningState, daprAIInstrumentationKey, daprAIConnectionString, vnetConfiguration, deploymentErrors, defaultDomain, staticIP, appLogsConfiguration, isZoneRedundant, customDomainConfiguration, eventStreamEndpoint, workloadProfiles?.ToList(), kedaVersion != null ? new KedaConfiguration(kedaVersion) : null, daprVersion != null ? new DaprConfiguration(daprVersion) : null, infrastructureResourceGroup, isMtlsEnabled != null ? new ManagedEnvironmentPropertiesPeerAuthentication(new Mtls(isMtlsEnabled)) : null); + } + + /// 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. + /// A new instance for mocking. + public static ContainerAppJobData ContainerAppJobData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, ContainerAppJobProvisioningState? provisioningState = null, string environmentId = null, string workloadProfileName = null, ContainerAppJobConfiguration configuration = null, ContainerAppJobTemplate template = null, IEnumerable outboundIPAddresses = null, string eventStreamEndpoint = null) + { + tags ??= new Dictionary(); + outboundIPAddresses ??= new List(); + + return new ContainerAppJobData(id, name, resourceType, systemData, tags, location, identity, provisioningState, environmentId, workloadProfileName, configuration, template, outboundIPAddresses?.ToList(), eventStreamEndpoint); + } + + /// Initializes a new instance of ContainerAppJobExecutionBase. + /// Job execution name. + /// Job execution Id. + /// A new instance for mocking. + public static ContainerAppJobExecutionBase ContainerAppJobExecutionBase(string name = null, string id = null) + { + return new ContainerAppJobExecutionBase(name, id); + } + + /// Initializes a new instance of ContainerAppJobExecutions. + /// Collection of resources. + /// Link to next page of resources. + /// A new instance for mocking. + public static ContainerAppJobExecutions ContainerAppJobExecutions(IEnumerable value = null, string nextLink = null) + { + value ??= new List(); + + return new ContainerAppJobExecutions(value?.ToList(), nextLink); + } + + /// Initializes a new instance of ContainerAppJobExecutionData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Current running State of the job. + /// Job execution start time. + /// Job execution end time. + /// Job's execution container. + /// A new instance for mocking. + public static ContainerAppJobExecutionData ContainerAppJobExecutionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, JobExecutionRunningState? status = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, ContainerAppJobExecutionTemplate template = null) + { + return new ContainerAppJobExecutionData(id, name, resourceType, systemData, status, startOn, endOn, template); } /// Initializes a new instance of ContainerAppManagedCertificateData. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobCollection.cs index 5d38b9213bec0..d56f2f20ef780 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobCollection.cs @@ -67,7 +67,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// 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. + /// Job Name. /// Properties used to create a container apps job. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -108,7 +108,7 @@ public virtual async Task> CreateOrUpdateA /// /// /// 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. + /// Job Name. /// Properties used to create a container apps job. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -148,7 +148,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wa /// /// /// - /// Name of the Container Apps Job. + /// Job Name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -185,7 +185,7 @@ public virtual async Task> GetAsync(string job /// /// /// - /// Name of the Container Apps Job. + /// Job Name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -266,7 +266,7 @@ public virtual Pageable GetAll(CancellationToken cancel /// /// /// - /// Name of the Container Apps Job. + /// Job Name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -301,7 +301,7 @@ public virtual async Task> ExistsAsync(string jobName, Cancellati /// /// /// - /// Name of the Container Apps Job. + /// Job Name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobExecutionCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobExecutionCollection.cs new file mode 100644 index 0000000000000..048bb67091ee7 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobExecutionCollection.cs @@ -0,0 +1,265 @@ +// 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 GetContainerAppJobExecutions method from an instance of . + /// + public partial class ContainerAppJobExecutionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _containerAppJobExecutionClientDiagnostics; + private readonly ContainerAppsAPIRestOperations _containerAppJobExecutionRestClient; + private readonly ClientDiagnostics _containerAppJobExecutionJobsExecutionsClientDiagnostics; + private readonly JobsExecutionsRestOperations _containerAppJobExecutionJobsExecutionsRestClient; + + /// Initializes a new instance of the class for mocking. + protected ContainerAppJobExecutionCollection() + { + } + + /// 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 ContainerAppJobExecutionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _containerAppJobExecutionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppContainers", ContainerAppJobExecutionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ContainerAppJobExecutionResource.ResourceType, out string containerAppJobExecutionApiVersion); + _containerAppJobExecutionRestClient = new ContainerAppsAPIRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, containerAppJobExecutionApiVersion); + _containerAppJobExecutionJobsExecutionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppContainers", ContainerAppJobExecutionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ContainerAppJobExecutionResource.ResourceType, out string containerAppJobExecutionJobsExecutionsApiVersion); + _containerAppJobExecutionJobsExecutionsRestClient = new JobsExecutionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, containerAppJobExecutionJobsExecutionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ContainerAppJobResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ContainerAppJobResource.ResourceType), nameof(id)); + } + + /// + /// Get details of a single job execution + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/executions/{jobExecutionName} + /// + /// + /// Operation Id + /// JobExecution + /// + /// + /// + /// 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> GetAsync(string jobExecutionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobExecutionName, nameof(jobExecutionName)); + + using var scope = _containerAppJobExecutionClientDiagnostics.CreateScope("ContainerAppJobExecutionCollection.Get"); + scope.Start(); + try + { + var response = await _containerAppJobExecutionRestClient.JobExecutionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, jobExecutionName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ContainerAppJobExecutionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get details of a single job execution + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/executions/{jobExecutionName} + /// + /// + /// Operation Id + /// JobExecution + /// + /// + /// + /// Job execution name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string jobExecutionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobExecutionName, nameof(jobExecutionName)); + + using var scope = _containerAppJobExecutionClientDiagnostics.CreateScope("ContainerAppJobExecutionCollection.Get"); + scope.Start(); + try + { + var response = _containerAppJobExecutionRestClient.JobExecution(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, jobExecutionName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ContainerAppJobExecutionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// 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 GetAllAsync(string filter = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _containerAppJobExecutionJobsExecutionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _containerAppJobExecutionJobsExecutionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ContainerAppJobExecutionResource(Client, ContainerAppJobExecutionData.DeserializeContainerAppJobExecutionData(e)), _containerAppJobExecutionJobsExecutionsClientDiagnostics, Pipeline, "ContainerAppJobExecutionCollection.GetAll", "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 GetAll(string filter = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _containerAppJobExecutionJobsExecutionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _containerAppJobExecutionJobsExecutionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ContainerAppJobExecutionResource(Client, ContainerAppJobExecutionData.DeserializeContainerAppJobExecutionData(e)), _containerAppJobExecutionJobsExecutionsClientDiagnostics, Pipeline, "ContainerAppJobExecutionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/executions/{jobExecutionName} + /// + /// + /// Operation Id + /// JobExecution + /// + /// + /// + /// 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> ExistsAsync(string jobExecutionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobExecutionName, nameof(jobExecutionName)); + + using var scope = _containerAppJobExecutionClientDiagnostics.CreateScope("ContainerAppJobExecutionCollection.Exists"); + scope.Start(); + try + { + var response = await _containerAppJobExecutionRestClient.JobExecutionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, jobExecutionName, 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}/executions/{jobExecutionName} + /// + /// + /// Operation Id + /// JobExecution + /// + /// + /// + /// Job execution name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string jobExecutionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobExecutionName, nameof(jobExecutionName)); + + using var scope = _containerAppJobExecutionClientDiagnostics.CreateScope("ContainerAppJobExecutionCollection.Exists"); + scope.Start(); + try + { + var response = _containerAppJobExecutionRestClient.JobExecution(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, jobExecutionName, 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/Models/ContainerAppJobExecution.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobExecutionData.cs similarity index 61% rename from sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobExecution.cs rename to sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobExecutionData.cs index e6fa51d172143..0f6a9c40389b0 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobExecution.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobExecutionData.cs @@ -7,28 +7,32 @@ using System; using Azure.Core; +using Azure.ResourceManager.AppContainers.Models; using Azure.ResourceManager.Models; -namespace Azure.ResourceManager.AppContainers.Models +namespace Azure.ResourceManager.AppContainers { - /// Container Apps Jobs execution. - public partial class ContainerAppJobExecution : ResourceData + /// + /// A class representing the ContainerAppJobExecution data model. + /// Container Apps Job execution. + /// + public partial class ContainerAppJobExecutionData : ResourceData { - /// Initializes a new instance of ContainerAppJobExecution. - internal ContainerAppJobExecution() + /// Initializes a new instance of ContainerAppJobExecutionData. + internal ContainerAppJobExecutionData() { } - /// Initializes a new instance of ContainerAppJobExecution. + /// Initializes a new instance of ContainerAppJobExecutionData. /// The id. /// The name. /// The resourceType. /// The systemData. /// Current running State of the job. /// Job execution start time. - /// Job execution start time. + /// Job execution end 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) + internal ContainerAppJobExecutionData(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; @@ -40,7 +44,7 @@ internal ContainerAppJobExecution(ResourceIdentifier id, string name, ResourceTy public JobExecutionRunningState? Status { get; } /// Job execution start time. public DateTimeOffset? StartOn { get; } - /// Job execution start time. + /// Job execution end time. public DateTimeOffset? EndOn { get; } /// Job's execution container. public ContainerAppJobExecutionTemplate Template { get; } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobExecutionResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobExecutionResource.cs new file mode 100644 index 0000000000000..ed2c28069deaa --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobExecutionResource.cs @@ -0,0 +1,226 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +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 ContainerAppJobExecution 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 GetContainerAppJobExecutionResource method. + /// Otherwise you can get one from its parent resource using the GetContainerAppJobExecution method. + /// + public partial class ContainerAppJobExecutionResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string jobName, string jobExecutionName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/executions/{jobExecutionName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _containerAppJobExecutionClientDiagnostics; + private readonly ContainerAppsAPIRestOperations _containerAppJobExecutionRestClient; + private readonly ClientDiagnostics _containerAppJobJobsClientDiagnostics; + private readonly JobsRestOperations _containerAppJobJobsRestClient; + private readonly ContainerAppJobExecutionData _data; + + /// Initializes a new instance of the class for mocking. + protected ContainerAppJobExecutionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ContainerAppJobExecutionResource(ArmClient client, ContainerAppJobExecutionData 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 ContainerAppJobExecutionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _containerAppJobExecutionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppContainers", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string containerAppJobExecutionApiVersion); + _containerAppJobExecutionRestClient = new ContainerAppsAPIRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, containerAppJobExecutionApiVersion); + _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 + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.App/jobs/executions"; + + /// 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 ContainerAppJobExecutionData 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 details of a single job execution + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/executions/{jobExecutionName} + /// + /// + /// Operation Id + /// JobExecution + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _containerAppJobExecutionClientDiagnostics.CreateScope("ContainerAppJobExecutionResource.Get"); + scope.Start(); + try + { + var response = await _containerAppJobExecutionRestClient.JobExecutionAsync(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 ContainerAppJobExecutionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get details of a single job execution + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/executions/{jobExecutionName} + /// + /// + /// Operation Id + /// JobExecution + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _containerAppJobExecutionClientDiagnostics.CreateScope("ContainerAppJobExecutionResource.Get"); + scope.Start(); + try + { + var response = _containerAppJobExecutionRestClient.JobExecution(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ContainerAppJobExecutionResource(Client, response.Value), response.GetRawResponse()); + } + 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. + /// The cancellation token to use. + public virtual async Task StopExecutionJobAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _containerAppJobJobsClientDiagnostics.CreateScope("ContainerAppJobExecutionResource.StopExecutionJob"); + scope.Start(); + try + { + var response = await _containerAppJobJobsRestClient.StopExecutionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppContainersArmOperation(_containerAppJobJobsClientDiagnostics, Pipeline, _containerAppJobJobsRestClient.CreateStopExecutionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, 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; + } + } + + /// + /// 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. + /// The cancellation token to use. + public virtual ArmOperation StopExecutionJob(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _containerAppJobJobsClientDiagnostics.CreateScope("ContainerAppJobExecutionResource.StopExecutionJob"); + scope.Start(); + try + { + var response = _containerAppJobJobsRestClient.StopExecution(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new AppContainersArmOperation(_containerAppJobJobsClientDiagnostics, Pipeline, _containerAppJobJobsRestClient.CreateStopExecutionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobResource.cs index ad32c92e8bc41..d6b16cdc8cd8c 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobResource.cs @@ -36,8 +36,6 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, 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. @@ -62,8 +60,6 @@ internal ContainerAppJobResource(ArmClient client, ResourceIdentifier id) : base _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 @@ -93,6 +89,59 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); } + /// Gets a collection of ContainerAppJobExecutionResources in the ContainerAppJob. + /// An object representing collection of ContainerAppJobExecutionResources and their operations over a ContainerAppJobExecutionResource. + public virtual ContainerAppJobExecutionCollection GetContainerAppJobExecutions() + { + return GetCachedClient(Client => new ContainerAppJobExecutionCollection(Client, Id)); + } + + /// + /// Get details of a single job execution + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/executions/{jobExecutionName} + /// + /// + /// Operation Id + /// JobExecution + /// + /// + /// + /// Job execution name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetContainerAppJobExecutionAsync(string jobExecutionName, CancellationToken cancellationToken = default) + { + return await GetContainerAppJobExecutions().GetAsync(jobExecutionName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get details of a single job execution + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/executions/{jobExecutionName} + /// + /// + /// Operation Id + /// JobExecution + /// + /// + /// + /// Job execution name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetContainerAppJobExecution(string jobExecutionName, CancellationToken cancellationToken = default) + { + return GetContainerAppJobExecutions().Get(jobExecutionName, cancellationToken); + } + /// /// Get the properties of a Container Apps Job. /// @@ -315,13 +364,10 @@ public virtual ArmOperation Update(WaitUntil waitUntil, /// /// /// 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. + /// Properties used to start a job execution. /// The cancellation token to use. - /// is null. - public virtual async Task> StartAsync(WaitUntil waitUntil, ContainerAppJobExecutionTemplate template, CancellationToken cancellationToken = default) + public virtual async Task> StartAsync(WaitUntil waitUntil, ContainerAppJobExecutionTemplate template = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(template, nameof(template)); - using var scope = _containerAppJobJobsClientDiagnostics.CreateScope("ContainerAppJobResource.Start"); scope.Start(); try @@ -353,13 +399,10 @@ public virtual async Task> StartAsync /// /// /// 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. + /// Properties used to start a job execution. /// The cancellation token to use. - /// is null. - public virtual ArmOperation Start(WaitUntil waitUntil, ContainerAppJobExecutionTemplate template, CancellationToken cancellationToken = default) + public virtual ArmOperation Start(WaitUntil waitUntil, ContainerAppJobExecutionTemplate template = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(template, nameof(template)); - using var scope = _containerAppJobJobsClientDiagnostics.CreateScope("ContainerAppJobResource.Start"); scope.Start(); try @@ -377,84 +420,6 @@ public virtual ArmOperation Start(WaitUntil waitUn } } - /// - /// 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 /// @@ -469,19 +434,15 @@ public virtual ArmOperation StopExecution(WaitUntil waitUntil, string jobExecuti /// /// /// 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) + public virtual async Task> StopMultipleExecutionsAsync(WaitUntil waitUntil, 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); + var response = await _containerAppJobJobsRestClient.StopMultipleExecutionsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppContainersArmOperation(new ContainerAppJobExecutionsOperationSource(), _containerAppJobJobsClientDiagnostics, Pipeline, _containerAppJobJobsRestClient.CreateStopMultipleExecutionsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -507,19 +468,15 @@ public virtual async Task> StopMultipleE /// /// /// 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) + public virtual ArmOperation StopMultipleExecutions(WaitUntil waitUntil, 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); + var response = _containerAppJobJobsRestClient.StopMultipleExecutions(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new AppContainersArmOperation(new ContainerAppJobExecutionsOperationSource(), _containerAppJobJobsClientDiagnostics, Pipeline, _containerAppJobJobsRestClient.CreateStopMultipleExecutionsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -573,52 +530,6 @@ public virtual Pageable GetSecrets(CancellationToken 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. /// diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentData.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentData.cs index 75cebd78197b9..9230f149f70ee 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentData.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentData.cs @@ -53,7 +53,8 @@ public ContainerAppManagedEnvironmentData(AzureLocation location) : base(locatio /// 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) + /// Peer authentication settings for the Managed Environment. + 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, ManagedEnvironmentPropertiesPeerAuthentication peerAuthentication) : base(id, name, resourceType, systemData, tags, location) { Kind = kind; ProvisioningState = provisioningState; @@ -71,6 +72,7 @@ internal ContainerAppManagedEnvironmentData(ResourceIdentifier id, string name, KedaConfiguration = kedaConfiguration; DaprConfiguration = daprConfiguration; InfrastructureResourceGroup = infrastructureResourceGroup; + PeerAuthentication = peerAuthentication; } /// Kind of the Environment. @@ -121,5 +123,18 @@ public string DaprVersion /// 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; } + /// Peer authentication settings for the Managed Environment. + internal ManagedEnvironmentPropertiesPeerAuthentication PeerAuthentication { get; set; } + /// Boolean indicating whether the mutual TLS authentication is enabled. + public bool? IsMtlsEnabled + { + get => PeerAuthentication is null ? default : PeerAuthentication.IsMtlsEnabled; + set + { + if (PeerAuthentication is null) + PeerAuthentication = new ManagedEnvironmentPropertiesPeerAuthentication(); + PeerAuthentication.IsMtlsEnabled = value; + } + } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppReplicaData.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppReplicaData.cs index f3024755188a1..46c1ac891475e 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppReplicaData.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppReplicaData.cs @@ -23,6 +23,7 @@ public partial class ContainerAppReplicaData : ResourceData public ContainerAppReplicaData() { Containers = new ChangeTrackingList(); + InitContainers = new ChangeTrackingList(); } /// Initializes a new instance of ContainerAppReplicaData. @@ -31,16 +32,28 @@ public ContainerAppReplicaData() /// The resourceType. /// The systemData. /// Timestamp describing when the pod was created by controller. + /// Current running state of the replica. + /// The details of replica current running state. /// The containers collection under a replica. - internal ContainerAppReplicaData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DateTimeOffset? createdOn, IList containers) : base(id, name, resourceType, systemData) + /// The init containers collection under a replica. + internal ContainerAppReplicaData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DateTimeOffset? createdOn, ContainerAppReplicaRunningState? runningState, string runningStateDetails, IList containers, IList initContainers) : base(id, name, resourceType, systemData) { CreatedOn = createdOn; + RunningState = runningState; + RunningStateDetails = runningStateDetails; Containers = containers; + InitContainers = initContainers; } /// Timestamp describing when the pod was created by controller. public DateTimeOffset? CreatedOn { get; } + /// Current running state of the replica. + public ContainerAppReplicaRunningState? RunningState { get; } + /// The details of replica current running state. + public string RunningStateDetails { get; } /// The containers collection under a replica. public IList Containers { get; } + /// The init containers collection under a replica. + public IList InitContainers { get; } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppResource.cs index 63039c6a01368..57d5f497ea563 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppResource.cs @@ -733,6 +733,142 @@ public virtual Response GetAuthToken(CancellationToken ca } } + /// + /// Start a container app + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/start + /// + /// + /// Operation Id + /// ContainerApps_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. + /// The cancellation token to use. + public virtual async Task> StartAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _containerAppClientDiagnostics.CreateScope("ContainerAppResource.Start"); + scope.Start(); + try + { + var response = await _containerAppRestClient.StartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppContainersArmOperation(new ContainerAppOperationSource(Client), _containerAppClientDiagnostics, Pipeline, _containerAppRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).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 app + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/start + /// + /// + /// Operation Id + /// ContainerApps_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. + /// The cancellation token to use. + public virtual ArmOperation Start(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _containerAppClientDiagnostics.CreateScope("ContainerAppResource.Start"); + scope.Start(); + try + { + var response = _containerAppRestClient.Start(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new AppContainersArmOperation(new ContainerAppOperationSource(Client), _containerAppClientDiagnostics, Pipeline, _containerAppRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stop a container app + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/stop + /// + /// + /// Operation Id + /// ContainerApps_Stop + /// + /// + /// + /// 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> StopAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _containerAppClientDiagnostics.CreateScope("ContainerAppResource.Stop"); + scope.Start(); + try + { + var response = await _containerAppRestClient.StopAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppContainersArmOperation(new ContainerAppOperationSource(Client), _containerAppClientDiagnostics, Pipeline, _containerAppRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stop a container app + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/stop + /// + /// + /// Operation Id + /// ContainerApps_Stop + /// + /// + /// + /// 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 Stop(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _containerAppClientDiagnostics.CreateScope("ContainerAppResource.Stop"); + scope.Start(); + try + { + var response = _containerAppRestClient.Stop(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new AppContainersArmOperation(new ContainerAppOperationSource(Client), _containerAppClientDiagnostics, Pipeline, _containerAppRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Add a tag to the current resource. /// diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppRevisionData.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppRevisionData.cs index 8b2e47894a81e..e178af9231f21 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppRevisionData.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppRevisionData.cs @@ -45,7 +45,8 @@ public ContainerAppRevisionData() /// Optional Field - Platform Error Message. /// Current health State of the revision. /// Current provisioning State of the revision. - internal ContainerAppRevisionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DateTimeOffset? createdOn, DateTimeOffset? lastActiveOn, string fqdn, ContainerAppTemplate template, bool? isActive, int? replicas, int? trafficWeight, string provisioningError, ContainerAppRevisionHealthState? healthState, ContainerAppRevisionProvisioningState? provisioningState) : base(id, name, resourceType, systemData) + /// Current running state of the revision. + internal ContainerAppRevisionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DateTimeOffset? createdOn, DateTimeOffset? lastActiveOn, string fqdn, ContainerAppTemplate template, bool? isActive, int? replicas, int? trafficWeight, string provisioningError, ContainerAppRevisionHealthState? healthState, ContainerAppRevisionProvisioningState? provisioningState, RevisionRunningState? runningState) : base(id, name, resourceType, systemData) { CreatedOn = createdOn; LastActiveOn = lastActiveOn; @@ -57,6 +58,7 @@ internal ContainerAppRevisionData(ResourceIdentifier id, string name, ResourceTy ProvisioningError = provisioningError; HealthState = healthState; ProvisioningState = provisioningState; + RunningState = runningState; } /// @@ -86,5 +88,7 @@ internal ContainerAppRevisionData(ResourceIdentifier id, string name, ResourceTy public ContainerAppRevisionHealthState? HealthState { get; } /// Current provisioning State of the revision. public ContainerAppRevisionProvisioningState? ProvisioningState { get; } + /// Current running state of the revision. + public RevisionRunningState? RunningState { get; } } } 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 e25fa4c2b30da..d13aae243be11 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Extensions/AppContainersExtensions.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Extensions/AppContainersExtensions.cs @@ -221,25 +221,6 @@ 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. @@ -373,6 +354,44 @@ public static ContainerAppManagedEnvironmentResource GetContainerAppManagedEnvir } #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 ContainerAppJobExecutionResource + /// + /// 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 ContainerAppJobExecutionResource GetContainerAppJobExecutionResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + ContainerAppJobExecutionResource.ValidateResourceId(id); + return new ContainerAppJobExecutionResource(client, id); + } + ); + } + #endregion + #region ContainerAppManagedCertificateResource /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. @@ -542,116 +561,116 @@ public static Response GetContainerApp(this ResourceGroupR return resourceGroupResource.GetContainerApps().Get(containerAppName, cancellationToken); } - /// Gets a collection of ContainerAppJobResources in the ResourceGroupResource. + /// Gets a collection of ContainerAppManagedEnvironmentResources 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) + /// An object representing collection of ContainerAppManagedEnvironmentResources and their operations over a ContainerAppManagedEnvironmentResource. + public static ContainerAppManagedEnvironmentCollection GetContainerAppManagedEnvironments(this ResourceGroupResource resourceGroupResource) { - return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetContainerAppJobs(); + return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetContainerAppManagedEnvironments(); } /// - /// Get the properties of a Container Apps Job. + /// Get the properties of a Managed Environment used to host container apps. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName} /// /// /// Operation Id - /// Jobs_Get + /// ManagedEnvironments_Get /// /// /// /// The instance the method will execute against. - /// Name of the Container Apps Job. + /// Name of the Environment. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// 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) + public static async Task> GetContainerAppManagedEnvironmentAsync(this ResourceGroupResource resourceGroupResource, string environmentName, CancellationToken cancellationToken = default) { - return await resourceGroupResource.GetContainerAppJobs().GetAsync(jobName, cancellationToken).ConfigureAwait(false); + return await resourceGroupResource.GetContainerAppManagedEnvironments().GetAsync(environmentName, cancellationToken).ConfigureAwait(false); } /// - /// Get the properties of a Container Apps Job. + /// Get the properties of a Managed Environment used to host container apps. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName} /// /// /// Operation Id - /// Jobs_Get + /// ManagedEnvironments_Get /// /// /// /// The instance the method will execute against. - /// Name of the Container Apps Job. + /// Name of the Environment. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// 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) + public static Response GetContainerAppManagedEnvironment(this ResourceGroupResource resourceGroupResource, string environmentName, CancellationToken cancellationToken = default) { - return resourceGroupResource.GetContainerAppJobs().Get(jobName, cancellationToken); + return resourceGroupResource.GetContainerAppManagedEnvironments().Get(environmentName, cancellationToken); } - /// Gets a collection of ContainerAppManagedEnvironmentResources in the ResourceGroupResource. + /// Gets a collection of ContainerAppJobResources in the ResourceGroupResource. /// The instance the method will execute against. - /// An object representing collection of ContainerAppManagedEnvironmentResources and their operations over a ContainerAppManagedEnvironmentResource. - public static ContainerAppManagedEnvironmentCollection GetContainerAppManagedEnvironments(this ResourceGroupResource resourceGroupResource) + /// An object representing collection of ContainerAppJobResources and their operations over a ContainerAppJobResource. + public static ContainerAppJobCollection GetContainerAppJobs(this ResourceGroupResource resourceGroupResource) { - return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetContainerAppManagedEnvironments(); + return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetContainerAppJobs(); } /// - /// Get the properties of a Managed Environment used to host container apps. + /// Get the properties of a Container Apps Job. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName} /// /// /// Operation Id - /// ManagedEnvironments_Get + /// Jobs_Get /// /// /// /// The instance the method will execute against. - /// Name of the Environment. + /// Job Name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public static async Task> GetContainerAppManagedEnvironmentAsync(this ResourceGroupResource resourceGroupResource, string environmentName, CancellationToken cancellationToken = default) + public static async Task> GetContainerAppJobAsync(this ResourceGroupResource resourceGroupResource, string jobName, CancellationToken cancellationToken = default) { - return await resourceGroupResource.GetContainerAppManagedEnvironments().GetAsync(environmentName, cancellationToken).ConfigureAwait(false); + return await resourceGroupResource.GetContainerAppJobs().GetAsync(jobName, cancellationToken).ConfigureAwait(false); } /// - /// Get the properties of a Managed Environment used to host container apps. + /// Get the properties of a Container Apps Job. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName} /// /// /// Operation Id - /// ManagedEnvironments_Get + /// Jobs_Get /// /// /// /// The instance the method will execute against. - /// Name of the Environment. + /// Job Name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public static Response GetContainerAppManagedEnvironment(this ResourceGroupResource resourceGroupResource, string environmentName, CancellationToken cancellationToken = default) + public static Response GetContainerAppJob(this ResourceGroupResource resourceGroupResource, string jobName, CancellationToken cancellationToken = default) { - return resourceGroupResource.GetContainerAppManagedEnvironments().Get(environmentName, cancellationToken); + return resourceGroupResource.GetContainerAppJobs().Get(jobName, cancellationToken); } /// 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 9e0f9540380db..58a4ecb3e499e 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs @@ -45,18 +45,18 @@ 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() { return GetCachedClient(Client => new ContainerAppManagedEnvironmentCollection(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)); + } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppConfiguration.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppConfiguration.Serialization.cs index 242ba40f60d73..d114dc9bb7946 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppConfiguration.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppConfiguration.Serialization.cs @@ -56,6 +56,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("maxInactiveRevisions"u8); writer.WriteNumberValue(MaxInactiveRevisions.Value); } + if (Optional.IsDefined(Service)) + { + writer.WritePropertyName("service"u8); + writer.WriteObjectValue(Service); + } writer.WriteEndObject(); } @@ -71,6 +76,7 @@ internal static ContainerAppConfiguration DeserializeContainerAppConfiguration(J Optional> registries = default; Optional dapr = default; Optional maxInactiveRevisions = default; + Optional service = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("secrets"u8)) @@ -137,8 +143,17 @@ internal static ContainerAppConfiguration DeserializeContainerAppConfiguration(J maxInactiveRevisions = property.Value.GetInt32(); continue; } + if (property.NameEquals("service"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + service = Service.DeserializeService(property.Value); + continue; + } } - return new ContainerAppConfiguration(Optional.ToList(secrets), Optional.ToNullable(activeRevisionsMode), ingress.Value, Optional.ToList(registries), dapr.Value, Optional.ToNullable(maxInactiveRevisions)); + return new ContainerAppConfiguration(Optional.ToList(secrets), Optional.ToNullable(activeRevisionsMode), ingress.Value, Optional.ToList(registries), dapr.Value, Optional.ToNullable(maxInactiveRevisions), service.Value); } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppConfiguration.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppConfiguration.cs index 0f882a0a1aed0..dfb76aed9b362 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppConfiguration.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppConfiguration.cs @@ -30,7 +30,8 @@ public ContainerAppConfiguration() /// Collection of private container registry credentials for containers used by the Container app. /// Dapr configuration for the Container App. /// Optional. Max inactive revisions a Container App can have. - internal ContainerAppConfiguration(IList secrets, ContainerAppActiveRevisionsMode? activeRevisionsMode, ContainerAppIngressConfiguration ingress, IList registries, ContainerAppDaprConfiguration dapr, int? maxInactiveRevisions) + /// Container App to be a dev Container App Service. + internal ContainerAppConfiguration(IList secrets, ContainerAppActiveRevisionsMode? activeRevisionsMode, ContainerAppIngressConfiguration ingress, IList registries, ContainerAppDaprConfiguration dapr, int? maxInactiveRevisions, Service service) { Secrets = secrets; ActiveRevisionsMode = activeRevisionsMode; @@ -38,6 +39,7 @@ internal ContainerAppConfiguration(IList secrets, Co Registries = registries; Dapr = dapr; MaxInactiveRevisions = maxInactiveRevisions; + Service = service; } /// Collection of secrets used by a Container app. @@ -55,5 +57,13 @@ internal ContainerAppConfiguration(IList secrets, Co public ContainerAppDaprConfiguration Dapr { get; set; } /// Optional. Max inactive revisions a Container App can have. public int? MaxInactiveRevisions { get; set; } + /// Container App to be a dev Container App Service. + internal Service Service { get; set; } + /// Dev ContainerApp service type. + public string ServiceType + { + get => Service is null ? default : Service.ServiceType; + set => Service = new Service(value); + } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppContainerRunningState.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppContainerRunningState.cs new file mode 100644 index 0000000000000..eaa96ba0095ad --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppContainerRunningState.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 +{ + /// Current running state of the container. + public readonly partial struct ContainerAppContainerRunningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ContainerAppContainerRunningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string RunningValue = "Running"; + private const string TerminatedValue = "Terminated"; + private const string WaitingValue = "Waiting"; + + /// Running. + public static ContainerAppContainerRunningState Running { get; } = new ContainerAppContainerRunningState(RunningValue); + /// Terminated. + public static ContainerAppContainerRunningState Terminated { get; } = new ContainerAppContainerRunningState(TerminatedValue); + /// Waiting. + public static ContainerAppContainerRunningState Waiting { get; } = new ContainerAppContainerRunningState(WaitingValue); + /// Determines if two values are the same. + public static bool operator ==(ContainerAppContainerRunningState left, ContainerAppContainerRunningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ContainerAppContainerRunningState left, ContainerAppContainerRunningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ContainerAppContainerRunningState(string value) => new ContainerAppContainerRunningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ContainerAppContainerRunningState other && Equals(other); + /// + public bool Equals(ContainerAppContainerRunningState 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/ContainerAppCredentials.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppCredentials.Serialization.cs index b917de92b6831..555a64a56418e 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppCredentials.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppCredentials.Serialization.cs @@ -31,6 +31,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("tenantId"u8); writer.WriteStringValue(TenantId.Value); } + if (Optional.IsDefined(Kind)) + { + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); + } if (Optional.IsDefined(SubscriptionId)) { writer.WritePropertyName("subscriptionId"u8); @@ -48,6 +53,7 @@ internal static ContainerAppCredentials DeserializeContainerAppCredentials(JsonE Optional clientId = default; Optional clientSecret = default; Optional tenantId = default; + Optional kind = default; Optional subscriptionId = default; foreach (var property in element.EnumerateObject()) { @@ -70,13 +76,18 @@ internal static ContainerAppCredentials DeserializeContainerAppCredentials(JsonE tenantId = property.Value.GetGuid(); continue; } + if (property.NameEquals("kind"u8)) + { + kind = property.Value.GetString(); + continue; + } if (property.NameEquals("subscriptionId"u8)) { subscriptionId = property.Value.GetString(); continue; } } - return new ContainerAppCredentials(clientId.Value, clientSecret.Value, Optional.ToNullable(tenantId), subscriptionId.Value); + return new ContainerAppCredentials(clientId.Value, clientSecret.Value, Optional.ToNullable(tenantId), kind.Value, subscriptionId.Value); } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppCredentials.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppCredentials.cs index 586c1e47a3c0c..5d9e4c11257f0 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppCredentials.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppCredentials.cs @@ -21,12 +21,14 @@ public ContainerAppCredentials() /// Client Id. /// Client Secret. /// Tenant Id. + /// Kind of auth github does for deploying the template. /// Subscription Id. - internal ContainerAppCredentials(string clientId, string clientSecret, Guid? tenantId, string subscriptionId) + internal ContainerAppCredentials(string clientId, string clientSecret, Guid? tenantId, string kind, string subscriptionId) { ClientId = clientId; ClientSecret = clientSecret; TenantId = tenantId; + Kind = kind; SubscriptionId = subscriptionId; } @@ -36,6 +38,8 @@ internal ContainerAppCredentials(string clientId, string clientSecret, Guid? ten public string ClientSecret { get; set; } /// Tenant Id. public Guid? TenantId { get; set; } + /// Kind of auth github does for deploying the template. + public string Kind { get; set; } /// Subscription Id. public string SubscriptionId { get; set; } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppGitHubActionConfiguration.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppGitHubActionConfiguration.Serialization.cs index 67536bb6691f7..9c943b2bde27f 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppGitHubActionConfiguration.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppGitHubActionConfiguration.Serialization.cs @@ -30,6 +30,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("contextPath"u8); writer.WriteStringValue(ContextPath); } + if (Optional.IsDefined(GitHubPersonalAccessToken)) + { + writer.WritePropertyName("githubPersonalAccessToken"u8); + writer.WriteStringValue(GitHubPersonalAccessToken); + } if (Optional.IsDefined(Image)) { writer.WritePropertyName("image"u8); @@ -67,6 +72,7 @@ internal static ContainerAppGitHubActionConfiguration DeserializeContainerAppGit Optional registryInfo = default; Optional azureCredentials = default; Optional contextPath = default; + Optional gitHubPersonalAccessToken = default; Optional image = default; Optional publishType = default; Optional os = default; @@ -97,6 +103,11 @@ internal static ContainerAppGitHubActionConfiguration DeserializeContainerAppGit contextPath = property.Value.GetString(); continue; } + if (property.NameEquals("githubPersonalAccessToken"u8)) + { + gitHubPersonalAccessToken = property.Value.GetString(); + continue; + } if (property.NameEquals("image"u8)) { image = property.Value.GetString(); @@ -123,7 +134,7 @@ internal static ContainerAppGitHubActionConfiguration DeserializeContainerAppGit continue; } } - return new ContainerAppGitHubActionConfiguration(registryInfo.Value, azureCredentials.Value, contextPath.Value, image.Value, publishType.Value, os.Value, runtimeStack.Value, runtimeVersion.Value); + return new ContainerAppGitHubActionConfiguration(registryInfo.Value, azureCredentials.Value, contextPath.Value, gitHubPersonalAccessToken.Value, image.Value, publishType.Value, os.Value, runtimeStack.Value, runtimeVersion.Value); } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppGitHubActionConfiguration.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppGitHubActionConfiguration.cs index 696c316b0bdd0..cfee2f7f44d64 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppGitHubActionConfiguration.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppGitHubActionConfiguration.cs @@ -19,16 +19,18 @@ public ContainerAppGitHubActionConfiguration() /// Registry configurations. /// AzureCredentials configurations. /// Context path. + /// One time Github PAT to configure github environment. /// Image name. /// Code or Image. /// Operation system. /// Runtime stack. /// Runtime version. - internal ContainerAppGitHubActionConfiguration(ContainerAppRegistryInfo registryInfo, ContainerAppCredentials azureCredentials, string contextPath, string image, string publishType, string os, string runtimeStack, string runtimeVersion) + internal ContainerAppGitHubActionConfiguration(ContainerAppRegistryInfo registryInfo, ContainerAppCredentials azureCredentials, string contextPath, string gitHubPersonalAccessToken, string image, string publishType, string os, string runtimeStack, string runtimeVersion) { RegistryInfo = registryInfo; AzureCredentials = azureCredentials; ContextPath = contextPath; + GitHubPersonalAccessToken = gitHubPersonalAccessToken; Image = image; PublishType = publishType; OS = os; @@ -42,6 +44,8 @@ internal ContainerAppGitHubActionConfiguration(ContainerAppRegistryInfo registry public ContainerAppCredentials AzureCredentials { get; set; } /// Context path. public string ContextPath { get; set; } + /// One time Github PAT to configure github environment. + public string GitHubPersonalAccessToken { get; set; } /// Image name. public string Image { get; set; } /// Code or Image. 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 index 8c0816db4101d..e09d020631dca 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobConfiguration.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobConfiguration.Serialization.cs @@ -45,6 +45,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("scheduleTriggerConfig"u8); writer.WriteObjectValue(ScheduleTriggerConfig); } + if (Optional.IsDefined(EventTriggerConfig)) + { + writer.WritePropertyName("eventTriggerConfig"u8); + writer.WriteObjectValue(EventTriggerConfig); + } if (Optional.IsCollectionDefined(Registries)) { writer.WritePropertyName("registries"u8); @@ -70,6 +75,7 @@ internal static ContainerAppJobConfiguration DeserializeContainerAppJobConfigura Optional replicaRetryLimit = default; Optional manualTriggerConfig = default; Optional scheduleTriggerConfig = default; + Optional eventTriggerConfig = default; Optional> registries = default; foreach (var property in element.EnumerateObject()) { @@ -124,6 +130,15 @@ internal static ContainerAppJobConfiguration DeserializeContainerAppJobConfigura scheduleTriggerConfig = JobConfigurationScheduleTriggerConfig.DeserializeJobConfigurationScheduleTriggerConfig(property.Value); continue; } + if (property.NameEquals("eventTriggerConfig"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + eventTriggerConfig = JobConfigurationEventTriggerConfig.DeserializeJobConfigurationEventTriggerConfig(property.Value); + continue; + } if (property.NameEquals("registries"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -139,7 +154,7 @@ internal static ContainerAppJobConfiguration DeserializeContainerAppJobConfigura continue; } } - return new ContainerAppJobConfiguration(Optional.ToList(secrets), triggerType, replicaTimeout, Optional.ToNullable(replicaRetryLimit), manualTriggerConfig.Value, scheduleTriggerConfig.Value, Optional.ToList(registries)); + return new ContainerAppJobConfiguration(Optional.ToList(secrets), triggerType, replicaTimeout, Optional.ToNullable(replicaRetryLimit), manualTriggerConfig.Value, scheduleTriggerConfig.Value, eventTriggerConfig.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 index d92c48888200c..55ff424af4ad6 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobConfiguration.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobConfiguration.cs @@ -31,8 +31,9 @@ public ContainerAppJobConfiguration(ContainerAppJobTriggerType triggerType, int /// 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. + /// Trigger configuration of an event driven job. /// 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) + internal ContainerAppJobConfiguration(IList secrets, ContainerAppJobTriggerType triggerType, int replicaTimeout, int? replicaRetryLimit, JobConfigurationManualTriggerConfig manualTriggerConfig, JobConfigurationScheduleTriggerConfig scheduleTriggerConfig, JobConfigurationEventTriggerConfig eventTriggerConfig, IList registries) { Secrets = secrets; TriggerType = triggerType; @@ -40,6 +41,7 @@ internal ContainerAppJobConfiguration(IList secrets, ReplicaRetryLimit = replicaRetryLimit; ManualTriggerConfig = manualTriggerConfig; ScheduleTriggerConfig = scheduleTriggerConfig; + EventTriggerConfig = eventTriggerConfig; Registries = registries; } @@ -55,6 +57,8 @@ internal ContainerAppJobConfiguration(IList secrets, 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; } + /// Trigger configuration of an event driven job. + public JobConfigurationEventTriggerConfig EventTriggerConfig { 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/ContainerAppJobExecutionBase.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobExecutionBase.Serialization.cs index 64c91f7bb429d..a2dc8e963063a 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobExecutionBase.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobExecutionBase.Serialization.cs @@ -10,24 +10,8 @@ namespace Azure.ResourceManager.AppContainers.Models { - public partial class ContainerAppJobExecutionBase : IUtf8JsonSerializable + public partial class ContainerAppJobExecutionBase { - 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) diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobExecutionBase.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobExecutionBase.cs index 531fd5087a598..7ee237cd42b69 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobExecutionBase.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobExecutionBase.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.AppContainers.Models public partial class ContainerAppJobExecutionBase { /// Initializes a new instance of ContainerAppJobExecutionBase. - public ContainerAppJobExecutionBase() + internal ContainerAppJobExecutionBase() { } @@ -25,8 +25,8 @@ internal ContainerAppJobExecutionBase(string name, string id) } /// Job execution name. - public string Name { get; set; } + public string Name { get; } /// Job execution Id. - public string Id { get; set; } + public string Id { get; } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobExecution.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobExecutionData.Serialization.cs similarity index 87% rename from sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobExecution.Serialization.cs rename to sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobExecutionData.Serialization.cs index aa943909d283a..04032dab973cd 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobExecution.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobExecutionData.Serialization.cs @@ -8,13 +8,14 @@ using System; using System.Text.Json; using Azure.Core; +using Azure.ResourceManager.AppContainers.Models; using Azure.ResourceManager.Models; -namespace Azure.ResourceManager.AppContainers.Models +namespace Azure.ResourceManager.AppContainers { - public partial class ContainerAppJobExecution + public partial class ContainerAppJobExecutionData { - internal static ContainerAppJobExecution DeserializeContainerAppJobExecution(JsonElement element) + internal static ContainerAppJobExecutionData DeserializeContainerAppJobExecutionData(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -91,7 +92,7 @@ internal static ContainerAppJobExecution DeserializeContainerAppJobExecution(Jso continue; } } - return new ContainerAppJobExecution(id, name, type, systemData.Value, Optional.ToNullable(status), Optional.ToNullable(startTime), Optional.ToNullable(endTime), template.Value); + return new ContainerAppJobExecutionData(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/ContainerAppJobExecutions.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobExecutions.Serialization.cs index c23dc0153c1cb..16d4867f7074e 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobExecutions.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobExecutions.Serialization.cs @@ -8,6 +8,7 @@ using System.Collections.Generic; using System.Text.Json; using Azure.Core; +using Azure.ResourceManager.AppContainers; namespace Azure.ResourceManager.AppContainers.Models { @@ -19,16 +20,16 @@ internal static ContainerAppJobExecutions DeserializeContainerAppJobExecutions(J { return null; } - IReadOnlyList value = default; + IReadOnlyList value = default; Optional nextLink = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(ContainerAppJobExecution.DeserializeContainerAppJobExecution(item)); + array.Add(ContainerAppJobExecutionData.DeserializeContainerAppJobExecutionData(item)); } value = array; continue; diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobExecutions.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobExecutions.cs index e4188f3548c55..6aacdf4a2337a 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobExecutions.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobExecutions.cs @@ -9,6 +9,7 @@ using System.Collections.Generic; using System.Linq; using Azure.Core; +using Azure.ResourceManager.AppContainers; namespace Azure.ResourceManager.AppContainers.Models { @@ -18,7 +19,7 @@ public partial class ContainerAppJobExecutions /// Initializes a new instance of ContainerAppJobExecutions. /// Collection of resources. /// is null. - internal ContainerAppJobExecutions(IEnumerable value) + internal ContainerAppJobExecutions(IEnumerable value) { Argument.AssertNotNull(value, nameof(value)); @@ -28,14 +29,14 @@ internal ContainerAppJobExecutions(IEnumerable value) /// Initializes a new instance of ContainerAppJobExecutions. /// Collection of resources. /// Link to next page of resources. - internal ContainerAppJobExecutions(IReadOnlyList value, string nextLink) + internal ContainerAppJobExecutions(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; } /// Collection of resources. - public IReadOnlyList Value { get; } + 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/ContainerAppJobTriggerType.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobTriggerType.cs index 2299a5b853ffd..7da68c8cebec0 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobTriggerType.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobTriggerType.cs @@ -22,12 +22,12 @@ public ContainerAppJobTriggerType(string value) _value = value ?? throw new ArgumentNullException(nameof(value)); } - private const string ScheduledValue = "Scheduled"; + private const string ScheduleValue = "Schedule"; private const string EventValue = "Event"; private const string ManualValue = "Manual"; - /// Scheduled. - public static ContainerAppJobTriggerType Scheduled { get; } = new ContainerAppJobTriggerType(ScheduledValue); + /// Schedule. + public static ContainerAppJobTriggerType Schedule { get; } = new ContainerAppJobTriggerType(ScheduleValue); /// Event. public static ContainerAppJobTriggerType Event { get; } = new ContainerAppJobTriggerType(EventValue); /// Manual. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppLogAnalyticsConfiguration.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppLogAnalyticsConfiguration.cs index 2e207bd996f1e..c60645e3d931c 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppLogAnalyticsConfiguration.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppLogAnalyticsConfiguration.cs @@ -7,7 +7,7 @@ namespace Azure.ResourceManager.AppContainers.Models { - /// Log analytics configuration. + /// Log Analytics configuration, must only be provided when destination is configured as 'log-analytics'. public partial class ContainerAppLogAnalyticsConfiguration { /// Initializes a new instance of ContainerAppLogAnalyticsConfiguration. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppLogsConfiguration.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppLogsConfiguration.cs index 9c360dac6dbe4..8d1d08f85df30 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppLogsConfiguration.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppLogsConfiguration.cs @@ -16,17 +16,17 @@ public ContainerAppLogsConfiguration() } /// Initializes a new instance of ContainerAppLogsConfiguration. - /// Logs destination. - /// Log Analytics configuration. + /// Logs destination, can be 'log-analytics', 'azure-monitor' or 'none'. + /// Log Analytics configuration, must only be provided when destination is configured as 'log-analytics'. internal ContainerAppLogsConfiguration(string destination, ContainerAppLogAnalyticsConfiguration logAnalyticsConfiguration) { Destination = destination; LogAnalyticsConfiguration = logAnalyticsConfiguration; } - /// Logs destination. + /// Logs destination, can be 'log-analytics', 'azure-monitor' or 'none'. public string Destination { get; set; } - /// Log Analytics configuration. + /// Log Analytics configuration, must only be provided when destination is configured as 'log-analytics'. public ContainerAppLogAnalyticsConfiguration LogAnalyticsConfiguration { get; set; } } } 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 0c20a522a4923..e3283cae239ce 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 @@ -94,6 +94,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("infrastructureResourceGroup"u8); writer.WriteStringValue(InfrastructureResourceGroup); } + if (Optional.IsDefined(PeerAuthentication)) + { + writer.WritePropertyName("peerAuthentication"u8); + writer.WriteObjectValue(PeerAuthentication); + } writer.WriteEndObject(); writer.WriteEndObject(); } @@ -126,6 +131,7 @@ internal static ContainerAppManagedEnvironmentData DeserializeContainerAppManage Optional kedaConfiguration = default; Optional daprConfiguration = default; Optional infrastructureResourceGroup = default; + Optional peerAuthentication = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("kind"u8)) @@ -301,11 +307,20 @@ internal static ContainerAppManagedEnvironmentData DeserializeContainerAppManage infrastructureResourceGroup = property0.Value.GetString(); continue; } + if (property0.NameEquals("peerAuthentication"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + peerAuthentication = ManagedEnvironmentPropertiesPeerAuthentication.DeserializeManagedEnvironmentPropertiesPeerAuthentication(property0.Value); + continue; + } } continue; } } - 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); + 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, peerAuthentication.Value); } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppReplicaContainer.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppReplicaContainer.Serialization.cs index c69dd7972f7f9..a18bc071060cd 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppReplicaContainer.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppReplicaContainer.Serialization.cs @@ -54,6 +54,8 @@ internal static ContainerAppReplicaContainer DeserializeContainerAppReplicaConta Optional ready = default; Optional started = default; Optional restartCount = default; + Optional runningState = default; + Optional runningStateDetails = default; Optional logStreamEndpoint = default; Optional execEndpoint = default; foreach (var property in element.EnumerateObject()) @@ -95,6 +97,20 @@ internal static ContainerAppReplicaContainer DeserializeContainerAppReplicaConta restartCount = property.Value.GetInt32(); continue; } + if (property.NameEquals("runningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + runningState = new ContainerAppContainerRunningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("runningStateDetails"u8)) + { + runningStateDetails = property.Value.GetString(); + continue; + } if (property.NameEquals("logStreamEndpoint"u8)) { logStreamEndpoint = property.Value.GetString(); @@ -106,7 +122,7 @@ internal static ContainerAppReplicaContainer DeserializeContainerAppReplicaConta continue; } } - return new ContainerAppReplicaContainer(name.Value, containerId.Value, Optional.ToNullable(ready), Optional.ToNullable(started), Optional.ToNullable(restartCount), logStreamEndpoint.Value, execEndpoint.Value); + return new ContainerAppReplicaContainer(name.Value, containerId.Value, Optional.ToNullable(ready), Optional.ToNullable(started), Optional.ToNullable(restartCount), Optional.ToNullable(runningState), runningStateDetails.Value, logStreamEndpoint.Value, execEndpoint.Value); } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppReplicaContainer.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppReplicaContainer.cs index e83ce5199ea33..7ad01e82c03f0 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppReplicaContainer.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppReplicaContainer.cs @@ -21,15 +21,19 @@ public ContainerAppReplicaContainer() /// The container ready status. /// The container start status. /// The container restart count. + /// Current running state of the container. + /// The details of container current running state. /// Log Stream endpoint. /// Container exec endpoint. - internal ContainerAppReplicaContainer(string name, string containerId, bool? isReady, bool? isStarted, int? restartCount, string logStreamEndpoint, string execEndpoint) + internal ContainerAppReplicaContainer(string name, string containerId, bool? isReady, bool? isStarted, int? restartCount, ContainerAppContainerRunningState? runningState, string runningStateDetails, string logStreamEndpoint, string execEndpoint) { Name = name; ContainerId = containerId; IsReady = isReady; IsStarted = isStarted; RestartCount = restartCount; + RunningState = runningState; + RunningStateDetails = runningStateDetails; LogStreamEndpoint = logStreamEndpoint; ExecEndpoint = execEndpoint; } @@ -44,6 +48,10 @@ internal ContainerAppReplicaContainer(string name, string containerId, bool? isR public bool? IsStarted { get; set; } /// The container restart count. public int? RestartCount { get; set; } + /// Current running state of the container. + public ContainerAppContainerRunningState? RunningState { get; } + /// The details of container current running state. + public string RunningStateDetails { get; } /// Log Stream endpoint. public string LogStreamEndpoint { get; } /// Container exec endpoint. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppReplicaData.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppReplicaData.Serialization.cs index abcd1ed72befd..d5ac6c17498db 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppReplicaData.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppReplicaData.Serialization.cs @@ -31,6 +31,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WriteEndArray(); } + if (Optional.IsCollectionDefined(InitContainers)) + { + writer.WritePropertyName("initContainers"u8); + writer.WriteStartArray(); + foreach (var item in InitContainers) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } writer.WriteEndObject(); writer.WriteEndObject(); } @@ -46,7 +56,10 @@ internal static ContainerAppReplicaData DeserializeContainerAppReplicaData(JsonE ResourceType type = default; Optional systemData = default; Optional createdTime = default; + Optional runningState = default; + Optional runningStateDetails = default; Optional> containers = default; + Optional> initContainers = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("id"u8)) @@ -91,6 +104,20 @@ internal static ContainerAppReplicaData DeserializeContainerAppReplicaData(JsonE createdTime = property0.Value.GetDateTimeOffset("O"); continue; } + if (property0.NameEquals("runningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + runningState = new ContainerAppReplicaRunningState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("runningStateDetails"u8)) + { + runningStateDetails = property0.Value.GetString(); + continue; + } if (property0.NameEquals("containers"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -105,11 +132,25 @@ internal static ContainerAppReplicaData DeserializeContainerAppReplicaData(JsonE containers = array; continue; } + if (property0.NameEquals("initContainers"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(ContainerAppReplicaContainer.DeserializeContainerAppReplicaContainer(item)); + } + initContainers = array; + continue; + } } continue; } } - return new ContainerAppReplicaData(id, name, type, systemData.Value, Optional.ToNullable(createdTime), Optional.ToList(containers)); + return new ContainerAppReplicaData(id, name, type, systemData.Value, Optional.ToNullable(createdTime), Optional.ToNullable(runningState), runningStateDetails.Value, Optional.ToList(containers), Optional.ToList(initContainers)); } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppReplicaRunningState.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppReplicaRunningState.cs new file mode 100644 index 0000000000000..e161682bd48a8 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppReplicaRunningState.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 +{ + /// Current running state of the replica. + public readonly partial struct ContainerAppReplicaRunningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ContainerAppReplicaRunningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string RunningValue = "Running"; + private const string NotRunningValue = "NotRunning"; + private const string UnknownValue = "Unknown"; + + /// Running. + public static ContainerAppReplicaRunningState Running { get; } = new ContainerAppReplicaRunningState(RunningValue); + /// NotRunning. + public static ContainerAppReplicaRunningState NotRunning { get; } = new ContainerAppReplicaRunningState(NotRunningValue); + /// Unknown. + public static ContainerAppReplicaRunningState Unknown { get; } = new ContainerAppReplicaRunningState(UnknownValue); + /// Determines if two values are the same. + public static bool operator ==(ContainerAppReplicaRunningState left, ContainerAppReplicaRunningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ContainerAppReplicaRunningState left, ContainerAppReplicaRunningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ContainerAppReplicaRunningState(string value) => new ContainerAppReplicaRunningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ContainerAppReplicaRunningState other && Equals(other); + /// + public bool Equals(ContainerAppReplicaRunningState 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/ContainerAppRevisionData.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppRevisionData.Serialization.cs index a9044d6e4db25..92ac2b06bc926 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppRevisionData.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppRevisionData.Serialization.cs @@ -44,6 +44,7 @@ internal static ContainerAppRevisionData DeserializeContainerAppRevisionData(Jso Optional provisioningError = default; Optional healthState = default; Optional provisioningState = default; + Optional runningState = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("id"u8)) @@ -161,11 +162,20 @@ internal static ContainerAppRevisionData DeserializeContainerAppRevisionData(Jso provisioningState = new ContainerAppRevisionProvisioningState(property0.Value.GetString()); continue; } + if (property0.NameEquals("runningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + runningState = new RevisionRunningState(property0.Value.GetString()); + continue; + } } continue; } } - return new ContainerAppRevisionData(id, name, type, systemData.Value, Optional.ToNullable(createdTime), Optional.ToNullable(lastActiveTime), fqdn.Value, template.Value, Optional.ToNullable(active), Optional.ToNullable(replicas), Optional.ToNullable(trafficWeight), provisioningError.Value, Optional.ToNullable(healthState), Optional.ToNullable(provisioningState)); + return new ContainerAppRevisionData(id, name, type, systemData.Value, Optional.ToNullable(createdTime), Optional.ToNullable(lastActiveTime), fqdn.Value, template.Value, Optional.ToNullable(active), Optional.ToNullable(replicas), Optional.ToNullable(trafficWeight), provisioningError.Value, Optional.ToNullable(healthState), Optional.ToNullable(provisioningState), Optional.ToNullable(runningState)); } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppScaleRuleAuth.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppScaleRuleAuth.cs index f970b3ad0c020..9c7c05a20fe5c 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppScaleRuleAuth.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppScaleRuleAuth.cs @@ -7,7 +7,7 @@ namespace Azure.ResourceManager.AppContainers.Models { - /// Auth Secrets for Container App Scale Rule. + /// Auth Secrets for Scale Rule. public partial class ContainerAppScaleRuleAuth { /// Initializes a new instance of ContainerAppScaleRuleAuth. @@ -16,7 +16,7 @@ public ContainerAppScaleRuleAuth() } /// Initializes a new instance of ContainerAppScaleRuleAuth. - /// Name of the Container App secret from which to pull the auth params. + /// Name of the secret from which to pull the auth params. /// Trigger Parameter that uses the secret. internal ContainerAppScaleRuleAuth(string secretRef, string triggerParameter) { @@ -24,7 +24,7 @@ internal ContainerAppScaleRuleAuth(string secretRef, string triggerParameter) TriggerParameter = triggerParameter; } - /// Name of the Container App secret from which to pull the auth params. + /// Name of the secret from which to pull the auth params. public string SecretRef { get; set; } /// Trigger Parameter that uses the secret. public string TriggerParameter { get; set; } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppTemplate.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppTemplate.Serialization.cs index 6950e9d520d4f..1f08d8bebaeef 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppTemplate.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppTemplate.Serialization.cs @@ -21,6 +21,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("revisionSuffix"u8); writer.WriteStringValue(RevisionSuffix); } + if (Optional.IsDefined(TerminationGracePeriodSeconds)) + { + writer.WritePropertyName("terminationGracePeriodSeconds"u8); + writer.WriteNumberValue(TerminationGracePeriodSeconds.Value); + } if (Optional.IsCollectionDefined(InitContainers)) { writer.WritePropertyName("initContainers"u8); @@ -56,6 +61,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WriteEndArray(); } + if (Optional.IsCollectionDefined(ServiceBinds)) + { + writer.WritePropertyName("serviceBinds"u8); + writer.WriteStartArray(); + foreach (var item in ServiceBinds) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } writer.WriteEndObject(); } @@ -66,10 +81,12 @@ internal static ContainerAppTemplate DeserializeContainerAppTemplate(JsonElement return null; } Optional revisionSuffix = default; + Optional terminationGracePeriodSeconds = default; Optional> initContainers = default; Optional> containers = default; Optional scale = default; Optional> volumes = default; + Optional> serviceBinds = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("revisionSuffix"u8)) @@ -77,6 +94,15 @@ internal static ContainerAppTemplate DeserializeContainerAppTemplate(JsonElement revisionSuffix = property.Value.GetString(); continue; } + if (property.NameEquals("terminationGracePeriodSeconds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + terminationGracePeriodSeconds = property.Value.GetInt64(); + continue; + } if (property.NameEquals("initContainers"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -128,8 +154,22 @@ internal static ContainerAppTemplate DeserializeContainerAppTemplate(JsonElement volumes = array; continue; } + if (property.NameEquals("serviceBinds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ServiceBind.DeserializeServiceBind(item)); + } + serviceBinds = array; + continue; + } } - return new ContainerAppTemplate(revisionSuffix.Value, Optional.ToList(initContainers), Optional.ToList(containers), scale.Value, Optional.ToList(volumes)); + return new ContainerAppTemplate(revisionSuffix.Value, Optional.ToNullable(terminationGracePeriodSeconds), Optional.ToList(initContainers), Optional.ToList(containers), scale.Value, Optional.ToList(volumes), Optional.ToList(serviceBinds)); } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppTemplate.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppTemplate.cs index d28165a976d1b..a5d5ff9bb8361 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppTemplate.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppTemplate.cs @@ -23,25 +23,32 @@ public ContainerAppTemplate() InitContainers = new ChangeTrackingList(); Containers = new ChangeTrackingList(); Volumes = new ChangeTrackingList(); + ServiceBinds = new ChangeTrackingList(); } /// Initializes a new instance of ContainerAppTemplate. /// User friendly suffix that is appended to the revision name. + /// Optional duration in seconds the Container App Instance needs to terminate gracefully. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). If this value is nil, the default grace period will be used instead. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. /// List of specialized containers that run before app containers. /// List of container definitions for the Container App. /// Scaling properties for the Container App. /// List of volume definitions for the Container App. - internal ContainerAppTemplate(string revisionSuffix, IList initContainers, IList containers, ContainerAppScale scale, IList volumes) + /// List of container app services bound to the app. + internal ContainerAppTemplate(string revisionSuffix, long? terminationGracePeriodSeconds, IList initContainers, IList containers, ContainerAppScale scale, IList volumes, IList serviceBinds) { RevisionSuffix = revisionSuffix; + TerminationGracePeriodSeconds = terminationGracePeriodSeconds; InitContainers = initContainers; Containers = containers; Scale = scale; Volumes = volumes; + ServiceBinds = serviceBinds; } /// User friendly suffix that is appended to the revision name. public string RevisionSuffix { get; set; } + /// Optional duration in seconds the Container App Instance needs to terminate gracefully. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). If this value is nil, the default grace period will be used instead. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. + public long? TerminationGracePeriodSeconds { get; set; } /// List of specialized containers that run before app containers. public IList InitContainers { get; } /// List of container definitions for the Container App. @@ -50,5 +57,7 @@ internal ContainerAppTemplate(string revisionSuffix, IList List of volume definitions for the Container App. public IList Volumes { get; } + /// List of container app services bound to the app. + public IList ServiceBinds { get; } } } 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 c1ae6e483bf18..0fdb9d2438a9f 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 @@ -41,6 +41,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WriteEndArray(); } + if (Optional.IsDefined(MountOptions)) + { + writer.WritePropertyName("mountOptions"u8); + writer.WriteStringValue(MountOptions); + } writer.WriteEndObject(); } @@ -54,6 +59,7 @@ internal static ContainerAppVolume DeserializeContainerAppVolume(JsonElement ele Optional storageType = default; Optional storageName = default; Optional> secrets = default; + Optional mountOptions = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("name"u8)) @@ -89,8 +95,13 @@ internal static ContainerAppVolume DeserializeContainerAppVolume(JsonElement ele secrets = array; continue; } + if (property.NameEquals("mountOptions"u8)) + { + mountOptions = property.Value.GetString(); + continue; + } } - return new ContainerAppVolume(name.Value, Optional.ToNullable(storageType), storageName.Value, Optional.ToList(secrets)); + return new ContainerAppVolume(name.Value, Optional.ToNullable(storageType), storageName.Value, Optional.ToList(secrets), mountOptions.Value); } } } 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 27cb3375e09dd..5b74a7943fb6c 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppVolume.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppVolume.cs @@ -24,12 +24,14 @@ public ContainerAppVolume() /// Storage type for the volume. If not provided, use EmptyDir. /// 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) + /// Mount options used while mounting the AzureFile. Must be a comma-separated string. + internal ContainerAppVolume(string name, ContainerAppStorageType? storageType, string storageName, IList secrets, string mountOptions) { Name = name; StorageType = storageType; StorageName = storageName; Secrets = secrets; + MountOptions = mountOptions; } /// Volume name. @@ -40,5 +42,7 @@ internal ContainerAppVolume(string name, ContainerAppStorageType? storageType, s 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; } + /// Mount options used while mounting the AzureFile. Must be a comma-separated string. + public string MountOptions { get; set; } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppVolumeMount.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppVolumeMount.Serialization.cs index 4c2c7c5a63275..8de3f38dbbcc9 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppVolumeMount.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppVolumeMount.Serialization.cs @@ -25,6 +25,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("mountPath"u8); writer.WriteStringValue(MountPath); } + if (Optional.IsDefined(SubPath)) + { + writer.WritePropertyName("subPath"u8); + writer.WriteStringValue(SubPath); + } writer.WriteEndObject(); } @@ -36,6 +41,7 @@ internal static ContainerAppVolumeMount DeserializeContainerAppVolumeMount(JsonE } Optional volumeName = default; Optional mountPath = default; + Optional subPath = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("volumeName"u8)) @@ -48,8 +54,13 @@ internal static ContainerAppVolumeMount DeserializeContainerAppVolumeMount(JsonE mountPath = property.Value.GetString(); continue; } + if (property.NameEquals("subPath"u8)) + { + subPath = property.Value.GetString(); + continue; + } } - return new ContainerAppVolumeMount(volumeName.Value, mountPath.Value); + return new ContainerAppVolumeMount(volumeName.Value, mountPath.Value, subPath.Value); } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppVolumeMount.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppVolumeMount.cs index 7071bc88db32e..e893573a3bfd3 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppVolumeMount.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppVolumeMount.cs @@ -18,15 +18,19 @@ public ContainerAppVolumeMount() /// Initializes a new instance of ContainerAppVolumeMount. /// This must match the Name of a Volume. /// Path within the container at which the volume should be mounted.Must not contain ':'. - internal ContainerAppVolumeMount(string volumeName, string mountPath) + /// Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). + internal ContainerAppVolumeMount(string volumeName, string mountPath, string subPath) { VolumeName = volumeName; MountPath = mountPath; + SubPath = subPath; } /// This must match the Name of a Volume. public string VolumeName { get; set; } /// Path within the container at which the volume should be mounted.Must not contain ':'. public string MountPath { get; set; } + /// Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). + public string SubPath { get; set; } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobConfigurationEventTriggerConfig.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobConfigurationEventTriggerConfig.Serialization.cs new file mode 100644 index 0000000000000..61f6340390fe1 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobConfigurationEventTriggerConfig.Serialization.cs @@ -0,0 +1,78 @@ +// 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 JobConfigurationEventTriggerConfig : 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); + } + if (Optional.IsDefined(Scale)) + { + writer.WritePropertyName("scale"u8); + writer.WriteObjectValue(Scale); + } + writer.WriteEndObject(); + } + + internal static JobConfigurationEventTriggerConfig DeserializeJobConfigurationEventTriggerConfig(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional replicaCompletionCount = default; + Optional parallelism = default; + Optional scale = 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; + } + if (property.NameEquals("scale"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scale = JobScale.DeserializeJobScale(property.Value); + continue; + } + } + return new JobConfigurationEventTriggerConfig(Optional.ToNullable(replicaCompletionCount), Optional.ToNullable(parallelism), scale.Value); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobConfigurationEventTriggerConfig.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobConfigurationEventTriggerConfig.cs new file mode 100644 index 0000000000000..ff7e36b4c5134 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobConfigurationEventTriggerConfig.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Trigger configuration of an event driven job. + public partial class JobConfigurationEventTriggerConfig + { + /// Initializes a new instance of JobConfigurationEventTriggerConfig. + public JobConfigurationEventTriggerConfig() + { + } + + /// Initializes a new instance of JobConfigurationEventTriggerConfig. + /// Minimum number of successful replica completions before overall job completion. + /// Number of parallel replicas of a job that can run at a given time. + /// Scaling configurations for event driven jobs. + internal JobConfigurationEventTriggerConfig(int? replicaCompletionCount, int? parallelism, JobScale scale) + { + ReplicaCompletionCount = replicaCompletionCount; + Parallelism = parallelism; + Scale = scale; + } + + /// 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; } + /// Scaling configurations for event driven jobs. + public JobScale Scale { 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 deleted file mode 100644 index 0fe213e099df1..0000000000000 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobExecutionNamesCollection.Serialization.cs +++ /dev/null @@ -1,28 +0,0 @@ -// 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 deleted file mode 100644 index b568b55fba22f..0000000000000 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobExecutionNamesCollection.cs +++ /dev/null @@ -1,31 +0,0 @@ -// 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/JobScale.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobScale.Serialization.cs new file mode 100644 index 0000000000000..3fd09748768d0 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobScale.Serialization.cs @@ -0,0 +1,104 @@ +// 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 JobScale : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(PollingInterval)) + { + writer.WritePropertyName("pollingInterval"u8); + writer.WriteNumberValue(PollingInterval.Value); + } + if (Optional.IsDefined(MinExecutions)) + { + writer.WritePropertyName("minExecutions"u8); + writer.WriteNumberValue(MinExecutions.Value); + } + if (Optional.IsDefined(MaxExecutions)) + { + writer.WritePropertyName("maxExecutions"u8); + writer.WriteNumberValue(MaxExecutions.Value); + } + if (Optional.IsCollectionDefined(Rules)) + { + writer.WritePropertyName("rules"u8); + writer.WriteStartArray(); + foreach (var item in Rules) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static JobScale DeserializeJobScale(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional pollingInterval = default; + Optional minExecutions = default; + Optional maxExecutions = default; + Optional> rules = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("pollingInterval"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + pollingInterval = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("minExecutions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + minExecutions = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("maxExecutions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxExecutions = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("rules"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(JobScaleRule.DeserializeJobScaleRule(item)); + } + rules = array; + continue; + } + } + return new JobScale(Optional.ToNullable(pollingInterval), Optional.ToNullable(minExecutions), Optional.ToNullable(maxExecutions), Optional.ToList(rules)); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobScale.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobScale.cs new file mode 100644 index 0000000000000..84588972913d5 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobScale.cs @@ -0,0 +1,44 @@ +// 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 +{ + /// Scaling configurations for event driven jobs. + public partial class JobScale + { + /// Initializes a new instance of JobScale. + public JobScale() + { + Rules = new ChangeTrackingList(); + } + + /// Initializes a new instance of JobScale. + /// Interval to check each event source in seconds. Defaults to 30s. + /// Minimum number of job executions that are created for a trigger, default 0. + /// Maximum number of job executions that are created for a trigger, default 100. + /// Scaling rules. + internal JobScale(int? pollingInterval, int? minExecutions, int? maxExecutions, IList rules) + { + PollingInterval = pollingInterval; + MinExecutions = minExecutions; + MaxExecutions = maxExecutions; + Rules = rules; + } + + /// Interval to check each event source in seconds. Defaults to 30s. + public int? PollingInterval { get; set; } + /// Minimum number of job executions that are created for a trigger, default 0. + public int? MinExecutions { get; set; } + /// Maximum number of job executions that are created for a trigger, default 100. + public int? MaxExecutions { get; set; } + /// Scaling rules. + public IList Rules { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobScaleRule.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobScaleRule.Serialization.cs new file mode 100644 index 0000000000000..70d9ba062a43a --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobScaleRule.Serialization.cs @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class JobScaleRule : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(JobScaleRuleType)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(JobScaleRuleType); + } + if (Optional.IsDefined(Metadata)) + { + writer.WritePropertyName("metadata"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Metadata); +#else + JsonSerializer.Serialize(writer, JsonDocument.Parse(Metadata.ToString()).RootElement); +#endif + } + if (Optional.IsCollectionDefined(Auth)) + { + writer.WritePropertyName("auth"u8); + writer.WriteStartArray(); + foreach (var item in Auth) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static JobScaleRule DeserializeJobScaleRule(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional name = default; + Optional type = default; + Optional metadata = default; + Optional> auth = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("metadata"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + metadata = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("auth"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ContainerAppScaleRuleAuth.DeserializeContainerAppScaleRuleAuth(item)); + } + auth = array; + continue; + } + } + return new JobScaleRule(name.Value, type.Value, metadata.Value, Optional.ToList(auth)); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobScaleRule.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobScaleRule.cs new file mode 100644 index 0000000000000..506337ee2ef20 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobScaleRule.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Scaling rule. + public partial class JobScaleRule + { + /// Initializes a new instance of JobScaleRule. + public JobScaleRule() + { + Auth = new ChangeTrackingList(); + } + + /// Initializes a new instance of JobScaleRule. + /// Scale Rule Name. + /// + /// Type of the scale rule + /// eg: azure-servicebus, redis etc. + /// + /// Metadata properties to describe the scale rule. + /// Authentication secrets for the scale rule. + internal JobScaleRule(string name, string jobScaleRuleType, BinaryData metadata, IList auth) + { + Name = name; + JobScaleRuleType = jobScaleRuleType; + Metadata = metadata; + Auth = auth; + } + + /// Scale Rule Name. + public string Name { get; set; } + /// + /// Type of the scale rule + /// eg: azure-servicebus, redis etc. + /// + public string JobScaleRuleType { get; set; } + /// + /// Metadata properties to describe the scale rule. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formated json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public BinaryData Metadata { get; set; } + /// Authentication secrets for the scale rule. + public IList Auth { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ManagedEnvironmentPropertiesPeerAuthentication.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ManagedEnvironmentPropertiesPeerAuthentication.Serialization.cs new file mode 100644 index 0000000000000..3c77dadd019cb --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ManagedEnvironmentPropertiesPeerAuthentication.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 ManagedEnvironmentPropertiesPeerAuthentication : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Mtls)) + { + writer.WritePropertyName("mtls"u8); + writer.WriteObjectValue(Mtls); + } + writer.WriteEndObject(); + } + + internal static ManagedEnvironmentPropertiesPeerAuthentication DeserializeManagedEnvironmentPropertiesPeerAuthentication(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional mtls = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("mtls"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + mtls = Mtls.DeserializeMtls(property.Value); + continue; + } + } + return new ManagedEnvironmentPropertiesPeerAuthentication(mtls.Value); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ManagedEnvironmentPropertiesPeerAuthentication.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ManagedEnvironmentPropertiesPeerAuthentication.cs new file mode 100644 index 0000000000000..16b52fb8fd420 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ManagedEnvironmentPropertiesPeerAuthentication.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Peer authentication settings for the Managed Environment. + internal partial class ManagedEnvironmentPropertiesPeerAuthentication + { + /// Initializes a new instance of ManagedEnvironmentPropertiesPeerAuthentication. + public ManagedEnvironmentPropertiesPeerAuthentication() + { + } + + /// Initializes a new instance of ManagedEnvironmentPropertiesPeerAuthentication. + /// Mutual TLS authentication settings for the Managed Environment. + internal ManagedEnvironmentPropertiesPeerAuthentication(Mtls mtls) + { + Mtls = mtls; + } + + /// Mutual TLS authentication settings for the Managed Environment. + internal Mtls Mtls { get; set; } + /// Boolean indicating whether the mutual TLS authentication is enabled. + public bool? IsMtlsEnabled + { + get => Mtls is null ? default : Mtls.IsMtlsEnabled; + set + { + if (Mtls is null) + Mtls = new Mtls(); + Mtls.IsMtlsEnabled = value; + } + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/Mtls.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/Mtls.Serialization.cs new file mode 100644 index 0000000000000..b91b8cb401a5d --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/Mtls.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 Mtls : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(IsMtlsEnabled)) + { + writer.WritePropertyName("enabled"u8); + writer.WriteBooleanValue(IsMtlsEnabled.Value); + } + writer.WriteEndObject(); + } + + internal static Mtls DeserializeMtls(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional enabled = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("enabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enabled = property.Value.GetBoolean(); + continue; + } + } + return new Mtls(Optional.ToNullable(enabled)); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/Mtls.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/Mtls.cs new file mode 100644 index 0000000000000..1bedc483f1372 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/Mtls.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 for mutual TLS authentication. + internal partial class Mtls + { + /// Initializes a new instance of Mtls. + public Mtls() + { + } + + /// Initializes a new instance of Mtls. + /// Boolean indicating whether the mutual TLS authentication is enabled. + internal Mtls(bool? isMtlsEnabled) + { + IsMtlsEnabled = isMtlsEnabled; + } + + /// Boolean indicating whether the mutual TLS authentication is enabled. + public bool? IsMtlsEnabled { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/RevisionRunningState.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/RevisionRunningState.cs new file mode 100644 index 0000000000000..80409d8552111 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/RevisionRunningState.cs @@ -0,0 +1,63 @@ +// 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 revision. + public readonly partial struct RevisionRunningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public RevisionRunningState(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"; + + /// Running. + public static RevisionRunningState Running { get; } = new RevisionRunningState(RunningValue); + /// Processing. + public static RevisionRunningState Processing { get; } = new RevisionRunningState(ProcessingValue); + /// Stopped. + public static RevisionRunningState Stopped { get; } = new RevisionRunningState(StoppedValue); + /// Degraded. + public static RevisionRunningState Degraded { get; } = new RevisionRunningState(DegradedValue); + /// Failed. + public static RevisionRunningState Failed { get; } = new RevisionRunningState(FailedValue); + /// Unknown. + public static RevisionRunningState Unknown { get; } = new RevisionRunningState(UnknownValue); + /// Determines if two values are the same. + public static bool operator ==(RevisionRunningState left, RevisionRunningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(RevisionRunningState left, RevisionRunningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator RevisionRunningState(string value) => new RevisionRunningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is RevisionRunningState other && Equals(other); + /// + public bool Equals(RevisionRunningState 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/Service.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/Service.Serialization.cs new file mode 100644 index 0000000000000..ff025e3b058b7 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/Service.Serialization.cs @@ -0,0 +1,41 @@ +// 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 Service : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ServiceType); + writer.WriteEndObject(); + } + + internal static Service DeserializeService(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string type = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + } + return new Service(type); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/Service.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/Service.cs new file mode 100644 index 0000000000000..0fcba34938017 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/Service.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Container App to be a dev service. + internal partial class Service + { + /// Initializes a new instance of Service. + /// Dev ContainerApp service type. + /// is null. + public Service(string serviceType) + { + Argument.AssertNotNull(serviceType, nameof(serviceType)); + + ServiceType = serviceType; + } + + /// Dev ContainerApp service type. + public string ServiceType { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ServiceBind.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ServiceBind.Serialization.cs new file mode 100644 index 0000000000000..84af1bb026a3d --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ServiceBind.Serialization.cs @@ -0,0 +1,59 @@ +// 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 ServiceBind : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ServiceId)) + { + writer.WritePropertyName("serviceId"u8); + writer.WriteStringValue(ServiceId); + } + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + writer.WriteEndObject(); + } + + internal static ServiceBind DeserializeServiceBind(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional serviceId = default; + Optional name = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("serviceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + serviceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + } + return new ServiceBind(serviceId.Value, name.Value); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ServiceBind.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ServiceBind.cs new file mode 100644 index 0000000000000..6becb006be943 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ServiceBind.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Configuration to bind a ContainerApp to a dev ContainerApp Service. + public partial class ServiceBind + { + /// Initializes a new instance of ServiceBind. + public ServiceBind() + { + } + + /// Initializes a new instance of ServiceBind. + /// Resource id of the target service. + /// Name of the service bind. + internal ServiceBind(ResourceIdentifier serviceId, string name) + { + ServiceId = serviceId; + Name = name; + } + + /// Resource id of the target service. + public ResourceIdentifier ServiceId { get; set; } + /// Name of the service bind. + public string Name { 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 754b29db127b2..67ff8d4817e50 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-11-01-preview"; + _apiVersion = apiVersion ?? "2023-04-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 320450f6f735e..3b3aea9b9fac6 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-11-01-preview"; + _apiVersion = apiVersion ?? "2023-04-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 43214aa45faa7..d419639afbf0c 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-11-01-preview"; + _apiVersion = apiVersion ?? "2023-04-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 0fc106fb3fc80..34099e118dcea 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-11-01-preview"; + _apiVersion = apiVersion ?? "2023-04-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 a4fe62f243ebf..48f9a1ce3284c 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-11-01-preview"; + _apiVersion = apiVersion ?? "2023-04-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 282bd68429189..189f83f57a443 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-11-01-preview"; + _apiVersion = apiVersion ?? "2023-04-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } 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 abffaaaee4a23..d32c7c5b1f872 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-11-01-preview"; + _apiVersion = apiVersion ?? "2023-04-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsAPIRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsAPIRestOperations.cs new file mode 100644 index 0000000000000..7d72eff8e164d --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsAPIRestOperations.cs @@ -0,0 +1,127 @@ +// 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; + +namespace Azure.ResourceManager.AppContainers +{ + internal partial class ContainerAppsAPIRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ContainerAppsAPIRestOperations. + /// 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 ContainerAppsAPIRestOperations(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 ?? "2023-04-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateJobExecutionRequest(string subscriptionId, string resourceGroupName, string jobName, string jobExecutionName) + { + 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.AppendPath(jobExecutionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get details of a single job execution. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Job Name. + /// 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> JobExecutionAsync(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 = CreateJobExecutionRequest(subscriptionId, resourceGroupName, jobName, jobExecutionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ContainerAppJobExecutionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ContainerAppJobExecutionData.DeserializeContainerAppJobExecutionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ContainerAppJobExecutionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get details of a single job execution. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Job Name. + /// 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 JobExecution(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 = CreateJobExecutionRequest(subscriptionId, resourceGroupName, jobName, jobExecutionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ContainerAppJobExecutionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ContainerAppJobExecutionData.DeserializeContainerAppJobExecutionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ContainerAppJobExecutionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + } +} 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 e992e00b2f871..22ee79b725b82 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-11-01-preview"; + _apiVersion = apiVersion ?? "2023-04-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 58fd68e7c812d..8768e4a1d67f2 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-11-01-preview"; + _apiVersion = apiVersion ?? "2023-04-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 934a7f994c51b..5240ea014492f 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-11-01-preview"; + _apiVersion = apiVersion ?? "2023-04-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -730,6 +730,148 @@ public Response GetAuthToken(string subscriptionId, strin } } + internal HttpMessage CreateStartRequest(string subscriptionId, string resourceGroupName, string containerAppName) + { + 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/containerApps/", false); + uri.AppendPath(containerAppName, true); + uri.AppendPath("/start", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Start a container app. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App. + /// 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 containerAppName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(containerAppName, nameof(containerAppName)); + + using var message = CreateStartRequest(subscriptionId, resourceGroupName, containerAppName); + 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 app. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App. + /// 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 containerAppName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(containerAppName, nameof(containerAppName)); + + using var message = CreateStartRequest(subscriptionId, resourceGroupName, containerAppName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateStopRequest(string subscriptionId, string resourceGroupName, string containerAppName) + { + 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/containerApps/", false); + uri.AppendPath(containerAppName, 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; + } + + /// Stop a container app. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task StopAsync(string subscriptionId, string resourceGroupName, string containerAppName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(containerAppName, nameof(containerAppName)); + + using var message = CreateStopRequest(subscriptionId, resourceGroupName, containerAppName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Stop a container app. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Stop(string subscriptionId, string resourceGroupName, string containerAppName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(containerAppName, nameof(containerAppName)); + + using var message = CreateStopRequest(subscriptionId, resourceGroupName, containerAppName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId) { var message = _pipeline.CreateMessage(); 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 30b8e1534bf47..e186d1e560c74 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-11-01-preview"; + _apiVersion = apiVersion ?? "2023-04-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 e702832231b94..7714df3e69986 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-11-01-preview"; + _apiVersion = apiVersion ?? "2023-04-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 88473ae9669db..fd7bdf4d934ac 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-11-01-preview"; + _apiVersion = apiVersion ?? "2023-04-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 64fb6e68b9791..00d02306716fc 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-11-01-preview"; + _apiVersion = apiVersion ?? "2023-04-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 index 27fbc45234990..7fbe65a6a6e7a 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/JobsExecutionsRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/JobsExecutionsRestOperations.cs @@ -33,7 +33,7 @@ public JobsExecutionsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-11-01-preview"; + _apiVersion = apiVersion ?? "2023-04-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -65,7 +65,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// 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. + /// Job Name. /// The filter to apply on the operation. /// The cancellation token to use. /// , or is null. @@ -95,7 +95,7 @@ public async Task> ListAsync(string subscrip /// 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. + /// Job Name. /// The filter to apply on the operation. /// The cancellation token to use. /// , or is null. @@ -140,7 +140,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// 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. + /// Job Name. /// The filter to apply on the operation. /// The cancellation token to use. /// , , or is null. @@ -172,7 +172,7 @@ public async Task> ListNextPageAsync(string /// 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. + /// Job Name. /// The filter to apply on the operation. /// The cancellation token to use. /// , , or is null. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/JobsRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/JobsRestOperations.cs index 17b0f1a342d66..99211dac946bf 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/JobsRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/JobsRestOperations.cs @@ -33,7 +33,7 @@ public JobsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpo { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-11-01-preview"; + _apiVersion = apiVersion ?? "2023-04-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -200,7 +200,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// 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. + /// Job Name. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -231,7 +231,7 @@ public async Task> GetAsync(string subscriptionId, /// 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. + /// Job Name. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -286,7 +286,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r /// 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. + /// Job Name. /// Properties used to create a container apps job. /// The cancellation token to use. /// , , or is null. @@ -313,7 +313,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re /// 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. + /// Job Name. /// Properties used to create a container apps job. /// The cancellation token to use. /// , , or is null. @@ -360,7 +360,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG /// 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. + /// Job Name. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -386,7 +386,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr /// 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. + /// Job Name. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -436,7 +436,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG /// 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. + /// Job Name. /// Properties used to create a container apps job. /// The cancellation token to use. /// , , or is null. @@ -463,7 +463,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr /// 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. + /// Job Name. /// Properties used to create a container apps job. /// The cancellation token to use. /// , , or is null. @@ -504,10 +504,13 @@ internal HttpMessage CreateStartRequest(string subscriptionId, string resourceGr 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; + if (template != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(template); + request.Content = content; + } _userAgent.Apply(message); return message; } @@ -515,17 +518,16 @@ internal HttpMessage CreateStartRequest(string subscriptionId, string resourceGr /// 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. + /// Job Name. + /// Properties used to start a job execution. /// The cancellation token to use. - /// , , or is null. + /// , 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) + public async Task StartAsync(string subscriptionId, string resourceGroupName, string jobName, ContainerAppJobExecutionTemplate template = null, 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); @@ -542,17 +544,16 @@ public async Task StartAsync(string subscriptionId, string resourceGro /// 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. + /// Job Name. + /// Properties used to start a job execution. /// The cancellation token to use. - /// , , or is null. + /// , 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) + public Response Start(string subscriptionId, string resourceGroupName, string jobName, ContainerAppJobExecutionTemplate template = null, 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); @@ -592,7 +593,7 @@ internal HttpMessage CreateStopExecutionRequest(string subscriptionId, string re /// 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 Name. /// Job execution name. /// The cancellation token to use. /// , , or is null. @@ -619,7 +620,7 @@ public async Task StopExecutionAsync(string subscriptionId, string res /// 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 Name. /// Job execution name. /// The cancellation token to use. /// , , or is null. @@ -643,7 +644,7 @@ public Response StopExecution(string subscriptionId, string resourceGroupName, s } } - internal HttpMessage CreateStopMultipleExecutionsRequest(string subscriptionId, string resourceGroupName, string jobName, JobExecutionNamesCollection jobExecutionName) + internal HttpMessage CreateStopMultipleExecutionsRequest(string subscriptionId, string resourceGroupName, string jobName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -660,10 +661,6 @@ internal HttpMessage CreateStopMultipleExecutionsRequest(string subscriptionId, 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; } @@ -671,19 +668,17 @@ internal HttpMessage CreateStopMultipleExecutionsRequest(string subscriptionId, /// 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. + /// Job Name. /// The cancellation token to use. - /// , , or is null. + /// , 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) + public async Task StopMultipleExecutionsAsync(string subscriptionId, string resourceGroupName, string jobName, 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); + using var message = CreateStopMultipleExecutionsRequest(subscriptionId, resourceGroupName, jobName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -698,19 +693,17 @@ public async Task StopMultipleExecutionsAsync(string subscriptionId, s /// 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. + /// Job Name. /// The cancellation token to use. - /// , , or is null. + /// , 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) + public Response StopMultipleExecutions(string subscriptionId, string resourceGroupName, string jobName, 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); + using var message = CreateStopMultipleExecutionsRequest(subscriptionId, resourceGroupName, jobName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -746,7 +739,7 @@ internal HttpMessage CreateListSecretsRequest(string subscriptionId, string reso /// 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. + /// Job Name. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -775,7 +768,7 @@ public async Task> ListSecretsAsync(string subscr /// 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. + /// Job Name. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedCertificatesRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedCertificatesRestOperations.cs index e19472fae914e..b494bc255af35 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedCertificatesRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedCertificatesRestOperations.cs @@ -33,7 +33,7 @@ public ManagedCertificatesRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-11-01-preview"; + _apiVersion = apiVersion ?? "2023-04-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } 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 a476446e0ed29..c4b5ee69d960c 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-11-01-preview"; + _apiVersion = apiVersion ?? "2023-04-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 169b9ea61a339..6ed221267ac2c 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-11-01-preview"; + _apiVersion = apiVersion ?? "2023-04-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 68a850901d65f..a48884d289554 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-11-01-preview"; + _apiVersion = apiVersion ?? "2023-04-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } 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 d07829b0fad66..be01f0d89a5bc 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-11-01-preview"; + _apiVersion = apiVersion ?? "2023-04-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 b06d9448aee3f..0acdb60f67986 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-11-01-preview"; + _apiVersion = apiVersion ?? "2023-04-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 643a7ea07a567..9a40873f40066 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/autorest.md +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/autorest.md @@ -7,7 +7,7 @@ azure-arm: true csharp: true library-name: AppContainers namespace: Azure.ResourceManager.AppContainers -require: https://github.com/Azure/azure-rest-api-specs/blob/905a9ad794ea9a1565ebe3857497b3a24872d553/specification/app/resource-manager/readme.md +require: https://github.com/Azure/azure-rest-api-specs/blob/6b0792baeaa1e26ebb9fe61dfc77297fc95325af/specification/app/resource-manager/readme.md output-folder: $(this-folder)/Generated clear-output-folder: true skip-csproj: true @@ -217,6 +217,7 @@ rename-mapping: Job: ContainerAppJob JobsCollection: ContainerAppJobsCollection ManagedCertificate: ContainerAppManagedCertificate + Mtls.enabled: IsMtlsEnabled request-path-to-resource-name: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/certificates/{certificateName}: ContainerAppConnectedEnvironmentCertificate @@ -231,7 +232,7 @@ override-operation-name: Namespaces_CheckNameAvailability: CheckContainerAppNameAvailability # mgmt-debug: -# show-serialized-names: true +# show-serialized-names: true directive: - from: swagger-document @@ -239,4 +240,8 @@ directive: transform: > if ($['type'] === 'boolean') $['x-ms-client-name'] = 'IsEnabled' + # Change type to ResourceIdentifier + - from: CommonDefinitions.json + where: $.definitions.ServiceBind.properties.serviceId + transform: $['x-ms-format'] = 'arm-id' ```