Create an application resource
Creates or updates an application resource.
Creates an application resource with the specified name and description. If an application with the same name already exists, then its description is updated to the one indicated in this request.
Use network resources to provide public connectivity to the services of an application.
Request
Method | Request URI |
---|---|
PUT | /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/applications/{applicationName}?api-version=2018-07-01-preview |
Parameters
Name | Type | Required | Location |
---|---|---|---|
subscriptionId |
string | Yes | Path |
resourceGroupName |
string | Yes | Path |
applicationName |
string | Yes | Path |
api-version |
string | Yes | Query |
applicationResourceDescription |
ApplicationResourceDescription | Yes | Body |
subscriptionId
Type: string
Required: Yes
The customer subscription identifier
resourceGroupName
Type: string
Required: Yes
Azure resource group name
applicationName
Type: string
Required: Yes
The identity of the application.
api-version
Type: string
Required: Yes
Default: 2018-07-01-preview
The version of the API. This parameter is required and its value must be 2018-07-01-preview
.
applicationResourceDescription
Type: ApplicationResourceDescription
Required: Yes
Description for creating an application resource.
Responses
HTTP Status Code | Description | Response Schema |
---|---|---|
200 (OK) | Ok |
ApplicationResourceDescription |
201 (Created) | Created |
ApplicationResourceDescription |
All other status codes | Error |
ErrorModel |
Examples
ApplicationCreateOrUpdate
This example shows how to create or update an application resource.
Request
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/applications/helloWorldApp?api-version=2018-07-01-preview
Body
{
"properties": {
"description": "SeaBreeze HelloWorld Application!",
"services": [
{
"properties": {
"osType": "linux",
"codePackages": [
{
"name": "helloWorldCode",
"image": "seabreeze/sbz-helloworld:1.0-alpine",
"endpoints": [
{
"name": "helloWorldListener",
"port": "80"
}
],
"resources": {
"requests": {
"memoryInGB": "1",
"cpu": "1"
}
}
}
],
"description": "SeaBreeze Hello World Service.",
"replicaCount": "1"
},
"name": "helloWorldService"
}
]
},
"tags": {},
"location": "EastUS"
}
200 Response
Body
{
"type": "Microsoft.ServiceFabricMesh/applications",
"location": "EastUS",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/applications/myHelloWorldApp",
"name": "myHelloWorldApp",
"tags": {},
"properties": {
"provisioningState": "Succeeded",
"description": "SeaBreeze HelloWorld Application!",
"healthState": "Ok",
"serviceNames": [
"helloWorldService"
],
"status": "Invalid"
}
}
201 Response
Body
{
"type": "Microsoft.ServiceFabricMesh/applications",
"location": "EastUS",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/applications/myHelloWorldApp",
"name": "myHelloWorldApp",
"tags": {},
"properties": {
"provisioningState": "Updating",
"description": "SeaBreeze HelloWorld Application!",
"healthState": "Ok",
"serviceNames": [
"helloWorldService"
],
"status": "Invalid"
}
}