Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[Microsoft.App] Planned Maintenance feature for managed environment #30769

Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
64247af
first iteration
jijohn14 Sep 27, 2024
6ea202d
Fix and update example
jijohn14 Sep 27, 2024
4faaf58
prettier fix
jijohn14 Sep 27, 2024
c830996
Update parameter references
jijohn14 Sep 27, 2024
38b2d62
Fix list reference
jijohn14 Sep 27, 2024
4aec5a9
Add definitions
jijohn14 Sep 27, 2024
1252dbf
Update reference to scheduled entries
jijohn14 Sep 27, 2024
d5b55c8
Use ScheduleEntries
jijohn14 Sep 27, 2024
1fa6f98
Another attempt
jijohn14 Sep 27, 2024
99a8db2
Fix typo
jijohn14 Sep 27, 2024
432be4b
Update readme
jijohn14 Sep 28, 2024
217aeb5
Remove ManagedEnvironmentScheduleList
jijohn14 Sep 28, 2024
c6a9def
Remove location and unwanted tags
jijohn14 Sep 28, 2024
f68d0e2
Remove un-needed code
jijohn14 Sep 28, 2024
5116288
Make it a proxy resource
jijohn14 Sep 28, 2024
e8bda80
Fix lint errors
jijohn14 Sep 28, 2024
18947b4
Use v5 type
jijohn14 Sep 28, 2024
9506f85
Fix json
jijohn14 Sep 28, 2024
0c5c6db
Fix sub example
jijohn14 Sep 28, 2024
984f8d4
Rename envelope variable
jijohn14 Sep 28, 2024
d874997
Fix name in example
jijohn14 Oct 2, 2024
fb0b083
Use weekday
jijohn14 Oct 3, 2024
7f82f72
Use scheduledEntries
jijohn14 Oct 3, 2024
986f27a
Merge branch 'release-app-Microsoft.App-2024-10-02-preview' into jiti…
jijohn14 Oct 14, 2024
ba8f802
Update specification/app/resource-manager/Microsoft.App/preview/2024-…
jijohn14 Oct 18, 2024
2cc2001
Update specification/app/resource-manager/Microsoft.App/preview/2024-…
jijohn14 Oct 18, 2024
af1c054
Update specification/app/resource-manager/Microsoft.App/preview/2024-…
jijohn14 Oct 18, 2024
ce5ed7b
Rename file
jijohn14 Oct 18, 2024
da6e238
Add main file
jijohn14 Oct 18, 2024
4a7cc14
Merge branch 'release-app-Microsoft.App-2024-10-02-preview' into jiti…
jijohn14 Oct 18, 2024
94a280e
Merge branch 'release-app-Microsoft.App-2024-10-02-preview' into jiti…
Juliehzl Oct 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,360 @@
{
"swagger": "2.0",
"info": {
"version": "2024-10-02-preview",
"title": "ContainerApps API Client"
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/maintenanceConfigurations": {
"get": {
"tags": [
"MaintenanceConfigurations"
],
"operationId": "MaintenanceConfigurations_ListByManagedEnvironmentResource",
jijohn14 marked this conversation as resolved.
Show resolved Hide resolved
"description": "Gets all maintenance configurations in the specified Managed Environment.",
"x-ms-examples": {
"ManagedEnvironmentMaintenanceConfigurationsList": {
"$ref": "./examples/ManagedEnvironment_MaintenanceConfigurations_List.json"
}
},
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter"
},
jijohn14 marked this conversation as resolved.
Show resolved Hide resolved
{
"name": "environmentName",
"description": "The name of the Managed Environment.",
"in": "path",
"required": true,
"type": "string",
"pattern": "^[-\\w\\._\\(\\)]+$"
},
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "Successfully got the current maintenance configurations",
"schema": {
"$ref": "#/definitions/MaintenanceConfigurationCollection"
}
},
"default": {
"description": "Common error response.",
"schema": {
"$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironment/{environmentName}/maintenanceConfigurations/{configName}": {
"put": {
Copy link
Contributor

@Juliehzl Juliehzl Oct 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it a long running operation? It is recommended to make it as an async call because the change from sync call to async will be complicated.

"tags": [
"MaintenanceConfigurations"
],
"operationId": "MaintenanceConfigurations_CreateOrUpdate",
"x-ms-examples": {
"ManagedEnvironmentMaintenanceConfigurationsCreateOrUpdate": {
"$ref": "./examples/ManagedEnvironment_MaintenanceConfigurations_CreateOrUpdate.json"
}
},
"description": "Create or replace the maintenance configuration for ManagedEnvironment.",
jijohn14 marked this conversation as resolved.
Show resolved Hide resolved
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter"
},
{
"name": "environmentName",
"description": "The name of the Managed Environment.",
"in": "path",
"required": true,
"type": "string",
"pattern": "^[-\\w\\._\\(\\)]+$"
},
{
"name": "configName",
"description": "The name of the maintenance configuration.",
"in": "path",
"required": true,
"type": "string",
"pattern": "^[-\\w\\._\\(\\)]+$"
},
{
"name": "maintenanceConfigurationEnvelope",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/MaintenanceConfigurationResource"
},
"description": "Parameters to set the maintenance configuration for ManagedEnvironment ."
},
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "The maintenance configuration was successfully updated.",
"schema": {
"$ref": "#/definitions/MaintenanceConfigurationResource"
}
},
"201": {
"description": "The maintenance configuration was successfully created.",
"schema": {
"$ref": "#/definitions/MaintenanceConfigurationResource"
}
},
"default": {
"description": "Common error response.",
"schema": {
"$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse"
}
}
}
},
"delete": {
jijohn14 marked this conversation as resolved.
Show resolved Hide resolved
"tags": [
"MaintenanceConfigurations"
],
"operationId": "MaintenanceConfigurations_Delete",
"x-ms-examples": {
"ManagedEnvironmentMaintenanceConfigurationsDelete": {
"$ref": "./examples/ManagedEnvironment_MaintenanceConfigurations_Delete.json"
}
},
"description": "Deletes the maintenance configuration of a ManagedEnvironment .",
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter"
},
{
"name": "environmentName",
"description": "The name of the Managed Environment.",
"in": "path",
"required": true,
"type": "string",
"pattern": "^[-\\w\\._\\(\\)]+$"
},
{
"name": "configName",
"description": "The name of the maintenance configuration.",
"in": "path",
"required": true,
"type": "string",
"pattern": "^[-\\w\\._\\(\\)]+$"
},
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "Success."
},
"204": {
"description": "Success."
jijohn14 marked this conversation as resolved.
Show resolved Hide resolved
},
"default": {
"description": "Common error response.",
"schema": {
"$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse"
}
}
}
},
"get": {
"tags": [
"MaintenanceConfigurations"
],
"operationId": "MaintenanceConfigurations_Get",
"x-ms-examples": {
"ManagedEnvironmentMaintenanceConfigurationsGet": {
"$ref": "./examples/ManagedEnvironment_MaintenanceConfigurations_Get.json"
}
},
"description": "Gets the maintenance configuration of a ManagedEnvironment .",
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter"
},
{
"name": "environmentName",
"description": "The name of the Managed Environment.",
"in": "path",
"required": true,
"type": "string",
"pattern": "^[-\\w\\._\\(\\)]+$"
},
{
"name": "configName",
"description": "The name of the maintenance configuration.",
"in": "path",
"required": true,
"type": "string",
"pattern": "^[-\\w\\._\\(\\)]+$"
},
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "Response of get maintenance configurations.",
"schema": {
"$ref": "#/definitions/MaintenanceConfigurationResource"
}
},
"default": {
"description": "Common error response.",
"schema": {
"$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse"
}
}
}
}
}
},
"definitions": {
"ScheduledEntry": {
"type": "object",
"description": "Maintenance schedule entry for a managed environment.",
"properties": {
"weekDay": {
"type": "string",
"description": "Day of the week when a managed environment can be patched.",
"enum": [
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
"Sunday",
"Everyday",
"Weekend"
],
"x-ms-enum": {
"name": "WeekDay",
"modelAsString": false
}
},
"startHourUtc": {
"type": "integer",
"format": "int32",
"description": "Start hour after which managed environment maintenance can start from 0 to 23 hour."
},
"durationHours": {
"type": "integer",
"format": "int32",
"description": "Length of maintenance window range from 8 to 24 hours."
}
},
"required": [
"weekDay",
"startHourUtc"
]
},
"ScheduledEntries": {
"type": "object",
"description": "List of maintenance schedules for a managed environment.",
"properties": {
"scheduledEntries": {
"x-ms-client-name": "ScheduledEntries",
"type": "array",
"items": {
"$ref": "#/definitions/ScheduledEntry"
},
"x-ms-identifiers": [],
"description": "List of maintenance schedules for a managed environment."
}
},
"required": [
"scheduledEntries"
]
},
"MaintenanceConfigurationResource": {
"type": "object",
"description": "Information about the Maintenance Configuration resource.",
"allOf": [
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource"
}
],
"properties": {
"properties": {
"$ref": "#/definitions/ScheduledEntries",
"description": "The resource-specific properties for this resource.",
"x-ms-client-flatten": true,
"x-ms-mutability": [
"read",
"create"
]
}
}
},
"MaintenanceConfigurationCollection": {
"type": "object",
"description": "The response of list maintenance configuration resources.",
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/MaintenanceConfigurationResource"
},
"description": "Results of the list maintenance configuration resources."
},
"nextLink": {
"type": "string",
"readOnly": true,
"description": "Link for next page of results."
}
}
}
},
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"description": "Azure Active Directory OAuth2 Flow",
"flow": "implicit",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
},
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
]
}
Loading