Apply Template¶
Overview¶
An application is a collection of config objects in BIG-IP which can be created and managed by BIG-IQ. Using this API, you can create, update or delete an application. You can also use this API to view the status of the task.
REST Endpoint: /mgmt/cm/global/tasks/apply-template¶
Requests¶
GET /mgmt/cm/global/tasks/apply-template/<id>¶
Request Parameters¶
None
Query Parameters¶
None
Response¶
HTTP/1.1 200 OK
Name | Type | Description |
---|---|---|
configSetName | string | Name of the application to be created |
configSetReference | reference | Reference to the created application |
link | string | URI link of the reference. |
partition | string | Name of the partition where the application will be created |
subPath | string | Name of the folder in the partition where the application will be created |
templateReference | reference | Template used to create or edit the application |
link | string | URI link of the reference. |
defaultDeviceReference | reference | BIG-IQ device on which the application will be deployed |
link | string | URI link of the reference. |
ssgReference | reference | SSG that was used to create the application. |
link | string | URI link of the reference. |
deploy | boolean | Value is true if to deploy application after it is created. If not provided the default is to deploy the application. |
addAnalytics | boolean | Value is true if users want to create an analytics http profile and associate it with application virtual servers. |
appDeployConfigTaskReference | reference | The app deploy task, this is set only when the deployment task fails and the application is in FAILED_DEPLOY status. |
link | string | URI link of the reference. |
resources | map_between_string_and_array_of_objects | Map between resource name and a list of objects that details how to create/update the resource. If the resource has a subcollection, the object also has subcollectionResources fields that describe the subcollection resources to instantiate/update with the parent resource |
name | string | A string literal provided by user to represent the resource name. This resource name must be defined in the template. |
parameters | map_between_string_and_string | Map between parameter name and parameter value that defines the parameters users want to modify from the prototype of the resource during application creation/update. Users are only allowed to modify parameters that already defined in the template’s parameters field |
parametersToRemove | array_of_strings | A list of parameter names that defines parameters need to be remove from the prototype of the resource during application creation/update. Users are only allowed to remove parameters that already defined in the template’s parameters field |
subcollectionResources | map_of_string_and_array_of_objects | A map between subcollection resource name and a list of objects that details how to create/update the subcollection resources. This field only applies when the resource has a subcollection |
name | string | A string literal provided by user to represent the subcollection resource name, this subcollection resource name must be defined in the template |
parameters | map_between_string_and_string | Map between parameter name and parameter value that defines the parameters users want to modify from the prototype of the subcollection resource during application creation/update. Users are only allowed to modify parameters that already defined in the template’s subcollection’s parameters field |
parametersToRemove | array_of_strings | A list of parameter names that defines parameters need to be removed from the prototype of the subcollection resource during application creation/update. Users are only allowed to remove parameters that already defined in the template’s subcollection’s parameters field |
domains | array_of_objects | List of the application domain names |
domainName | string | Application domain name |
protectionMode | string | Application protection mode |
currentStep | string | Current step of the task. |
mode | string | Mode of the task |
awsLoadBalancer | object | AWS load balancer used as tier1 for the application deployment. |
name | string | Name of the AWS load balancer |
description | string | Description of the AWS load balancer |
listeners | array_of_objects | Listeners of the AWS load balancer |
loadBalancerPort | number | Port of the AWS load balancer |
loadBalancerProtocol | string | Protocol of the AWS load balancer |
instancePort | number | Instance Port |
instanceProtocol | string | Instance protocol |
sslCipher | string | SSL Cipher. Use this field only when HTTPS or SSL is selected for loadBalancerProtocol. |
sslCertificate | string | The Amazon Resource Name (ARN) that represents a specific SSL Certificate. Use this field only when HTTPS or SSL is selected for loadBalancerProtocol. |
azureLoadBalancer | object | Azure load balancer used as tier1 for the application deployment. |
appName | string | Name of the app deployed |
listeners | array_of_objects | Listeners of the Azure load balancer |
loadBalancerPort | number | Port of the Azure load balancer |
instancePort | number | Instance Port |
Error Response¶
HTTP/1.1 400 Bad Request
This response status is related to error conditions. Detailed error message will be in the response.
HTTP/1.1 401 Unauthorized
This response happens when access is denied due to invalid credentials (no Permission).
HTTP/1.1 404 Not Found
This response happens when public URI path not registered.
Permissions¶
Role | Allow |
---|---|
Application_Editor | Yes |
Application_Manager | Yes |
POST /mgmt/cm/global/tasks/apply-template¶
Request Parameters¶
Name | Type | Required | Description |
---|---|---|---|
configSetName | string | True | Name of the application to be created |
partition | string | False | Name of the partition where the application will be created. Default is “Common” |
subPath | string | False | Name of the folder in the partition where the application will be created. Default is the configSetName |
templateReference | reference | True for CREATE mode | Template used to create or edit the application |
link | string | True | URI link of the reference. |
defaultDeviceReference | reference | True if ssgReference is not provided | BIG-IQ device on which the application will be created and deployed |
link | string | True | URI link of the reference. |
ssgReference | reference | True if defaultDeviceReference is not provided | SSG that was used to create and deploy the application |
link | string | True | URI link of the reference. |
deploy | boolean | False | Value is true if to deploy application after it is created. If not provided the default is to deploy the application. |
addAnalytics | boolean | False | Value is true if users want to create an analytics http profile and associate it with application virtual servers. |
resources | map_between_string_and_array_of_objects | True for CREATE mode | Map between resource name and a list of objects that details how to create/update the resource. If the resource has a subcollection, the object also has a subcollectionResources fields to detail the subcollection resources to instantiate/update with the parent resource |
name | string | False | A string literal provided by user to represent the resource name. This resource name must be defined in the template. |
parameters | map_between_string_and_string | False | Map between parameter name and parameter value that defines the parameters users want to modify from the prototype of the resource during application creation/update. Users are only allowed to modify parameters that already defined in the template’s parameters field |
parametersToRemove | array_of_strings | False | A list of parameter names that defines parameters need to be remove from the prototype of the resource during application creation/update. Users are only allowed to remove parameters that already defined in the template’s parameters field |
subcollectionResources | map_of_string_and_array_of_objects | False | A map between subcollection resource name and a list of objects that details how to create/update the subcollection resources. This field only applies when the resource has a subcollection |
name | string | False | A string literal provided by user to represent the subcollection resource name, this subcollection resource name must be defined in the template |
parameters | map_between_string_and_string | False | Map between parameter name and parameter value that defines the parameters users want to modify from the prototype of the subcollection resource during application creation/update. Users are only allowed to modify parameters that already defined in the template’s subcollection’s parameters field |
parametersToRemove | array_of_strings | False | A list of parameter names that defines parameters need to be removed from the prototype of the subcollection resource during application creation/update. Users are only allowed to remove parameters that already defined in the template’s subcollection’s parameters field |
domains | array_of_objects | False | List of the application domain names |
domainName | string | False | Application domain name |
protectionMode | string | False | Application protection mode |
mode | string | False | Mode of the task. The value can be “CREATE”, “UPDATE” and “DELETE”. Default is “CREATE”. |
awsLoadBalancer | object | True if the application will be created and deployed on AWS environment | AWS load balancer used as tier1 for the application deployment. |
name | string | False | Name of the AWS load balancer |
description | string | False | Description of the AWS load balancer |
listeners | array_of_objects | False | Listeners of the AWS load balancer |
loadBalancerPort | number | False | Port of the AWS load balancer |
loadBalancerProtocol | string | False | Protocol of the AWS load balancer |
instancePort | number | False | Instance Port |
instanceProtocol | string | False | Instance protocol |
sslCipher | string | False | SSL Cipher. Use this field only when HTTPS or SSL is selected for loadBalancerProtocol. |
sslCertificate | string | False | The Amazon Resource Name (ARN) that represents a specific SSL Certificate. Use this field only when HTTPS or SSL is selected for loadBalancerProtocol. |
Query Parameters¶
None
Response¶
HTTP/1.1 200 OK
Name | Type | Description |
---|---|---|
configSetName | string | Name of the application to be created |
configSetReference | reference | Reference to the created application |
link | string | URI link of the reference. |
partition | string | Name of the partition where the application will be created |
subPath | string | Name of the folder in the partition where the application will be created |
templateReference | reference | Template used to create or edit the application |
link | string | URI link of the reference. |
defaultDeviceReference | reference | BIG-IQ device on which the application will be deployed |
link | string | URI link of the reference. |
ssgReference | reference | SSG that was used to created the application. |
link | string | URI link of the reference. |
deploy | boolean | Value is true if to deploy application after it is created. If not provided the default is to deploy the application. |
addAnalytics | boolean | Value is true if users want to create an analytics http profile and associate it with application virtual servers. |
appDeployConfigTaskReference | reference | The app deploy task, this is set only when the deployment task fails and the application is in FAILED_DEPLOY status |
link | string | URI link of the reference. |
resources | map_between_string_and_array_of_objects | Map between resource name and a list of objects that details how to create/update the resource. If the resource has a subcollection, the object also has a subcollectionResources fields to detail the subcollection resources to instantiate/update with the parent resource |
name | string | A string literal provided by user to represent the resource name. This resource name must be defined in the template. |
parameters | map_between_string_and_string | Map between parameter name and parameter value that defines the parameters users want to modify from the prototype of the resource during application creation/update. Users are only allowed to modify parameters that already defined in the template’s parameters field |
parametersToRemove | array_of_strings | A list of parameter names that defines parameters need to be remove from the prototype of the resource during application creation/update. Users are only allowed to remove parameters that already defined in the template’s parameters field |
subcollectionResources | map_of_string_and_array_of_objects | A map between subcollection resource name and a list of objects that details how to create/update the subcollection resources. This field only applies when the resource has a subcollection |
name | string | A string literal provided by user to represent the subcollection resource name, this subcollection resource name must be defined in the template |
parameters | map_between_string_and_string | Map between parameter name and parameter value that defines the parameters users want to modify from the prototype of the subcollection resource during application creation/update. Users are only allowed to modify parameters that already defined in the template’s subcollection’s parameters field |
parametersToRemove | array_of_strings | A list of parameter names that defines parameters need to be removed from the prototype of the subcollection resource during application creation/update. Users are only allowed to remove parameters that already defined in the template’s subcollection’s parameters field |
domains | array_of_objects | List of the application domain names |
domainName | string | Application domain name |
protectionMode | string | Application protection mode |
currentStep | string | Current step of the task. |
mode | string | Mode of the task |
awsLoadBalancer | object | AWS load balancer used as tier1 for the application deployment. |
name | string | Name of the AWS load balancer |
description | string | Description of the AWS load balancer |
listeners | array_of_objects | Listeners of the AWS load balancer |
loadBalancerPort | number | Port of the AWS load balancer |
loadBalancerProtocol | string | Protocol of the AWS load balancer |
instancePort | number | Instance Port |
instanceProtocol | string | Instance protocol |
sslCipher | string | SSL Cipher. Use this field only when HTTPS or SSL is selected for loadBalancerProtocol. |
sslCertificate | string | The Amazon Resource Name (ARN) that represents a specific SSL Certificate. Use this field only when HTTPS or SSL is selected for loadBalancerProtocol. |
Error Response¶
HTTP/1.1 400 Bad Request
This response status is related to error conditions. Detailed error message will be in the response.
HTTP/1.1 401 Unauthorized
This response happens when access is denied due to invalid credentials (no Permission).
Permissions¶
Role | Allow |
---|---|
Application_Editor | Yes |
Application_Manager | Yes |
DELETE /mgmt/cm/global/tasks/apply-template/<id>¶
Request Parameters¶
None
Query Parameters¶
None
Response¶
HTTP/1.1 200 OK
Name | Type | Description |
---|---|---|
configSetName | string | Name of the application to be created |
configSetReference | reference | Reference to the created application |
link | string | URI link of the reference. |
partition | string | Name of the partition where the application will be created |
subPath | string | Name of the folder in the partition where the application will be created |
templateReference | reference | Template used to create or edit the application |
link | string | URI link of the reference. |
defaultDeviceReference | reference | BIG-IQ device on which the application will be deployed |
link | string | URI link of the reference. |
ssgReference | reference | SSG that was used to created the application. |
link | string | URI link of the reference. |
deploy | boolean | Value is true if to deploy application after it is created. If not provided the default is to deploy the application. |
addAnalytics | boolean | Value is true if users want to create an analytics http profile and associate it with application virtual servers. |
appDeployConfigTaskReference | reference | The app deploy task, this is set only when the deployment task fails and the application is in FAILED_DEPLOY status |
link | string | URI link of the reference. |
resources | map_between_string_and_array_of_objects | Map between resource name and a list of objects that details how to create/update the resource. If the resource has a subcollection, the object also has a subcollectionResources fields to detail the subcollection resources to instantiate/update with the parent resource |
name | string | A string literal provided by user to represent the resource name. This resource name must be defined in the template. |
parameters | map_between_string_and_string | Map between parameter name and parameter value that defines the parameters users want to modify from the prototype of the resource during application creation/update. Users are only allowed to modify parameters that already defined in the template’s parameters field |
parametersToRemove | array_of_strings | A list of parameter names that defines parameters need to be remove from the prototype of the resource during application creation/update. Users are only allowed to remove parameters that already defined in the template’s parameters field |
subcollectionResources | map_of_string_and_array_of_objects | A map between subcollection resource name and a list of objects that details how to create/update the subcollection resources. This field only applies when the resource has a subcollection |
name | string | A string literal provided by user to represent the subcollection resource name, this subcollection resource name must be defined in the template |
parameters | map_between_string_and_string | Map between parameter name and parameter value that defines the parameters users want to modify from the prototype of the subcollection resource during application creation/update. Users are only allowed to modify parameters that already defined in the template’s subcollection’s parameters field |
parametersToRemove | array_of_strings | A list of parameter names that defines parameters need to be removed from the prototype of the subcollection resource during application creation/update. Users are only allowed to remove parameters that already defined in the template’s subcollection’s parameters field |
domains | array_of_objects | List of the application domain names |
domainName | string | Application domain name |
protectionMode | string | Application protection mode |
currentStep | string | Current step of the task. |
mode | string | Mode of the task |
awsLoadBalancer | object | AWS load balancer used as tier1 for the application deployment. |
name | string | Name of the AWS load balancer |
description | string | Description of the AWS load balancer |
listeners | array_of_objects | Listeners of the AWS load balancer |
loadBalancerPort | number | Port of the AWS load balancer |
loadBalancerProtocol | string | Protocol of the AWS load balancer |
instancePort | number | Instance Port |
instanceProtocol | string | Instance protocol |
sslCipher | string | SSL Cipher. Use this field only when HTTPS or SSL is selected for loadBalancerProtocol. |
sslCertificate | string | The Amazon Resource Name (ARN) that represents a specific SSL Certificate. Use this field only when HTTPS or SSL is selected for loadBalancerProtocol. |
Error Response¶
HTTP/1.1 400 Bad Request
This response status is related to error conditions. Detailed error message will be in the response.
HTTP/1.1 401 Unauthorized
This response happens when access is denied due to invalid credentials (no Permission).
HTTP/1.1 404 Not Found
This response happens when public URI path not registered.
Permissions¶
Role | Allow |
---|---|
Application_Editor | Yes |
Application_Manager | Yes |
Examples¶
Response¶
HTTP/1.1 200 OK
{
"configSetName": "MyApp",
"configSetReference": {
"link": "https://localhost/mgmt/cm/global/config-sets/f786d993-b026-3759-8b58-e99743db3ccd"
},
"partition": "Common",
"subPath": "MyFolder",
"templateReference": {
"link": "https://localhost/mgmt/cm/global/templates/66f6181b-cb4c-3f4c-938f-bc804a036db6"
},
"defaultDeviceReference": {
"link": "https://localhost/mgmt/shared/resolver/device-groups/cm-bigip-allBigIpDevices/devices/35a18732-d42a-4507-bc81-cab532d75d56"
},
"appDeployConfigTaskReference": {
"link": "https://localhost/mgmt/cm/global/tasks/app-deploy/09bdc4dd-da8b-4d12-9966-5da087db388b"
},
"deploy": true,
"domains": [],
"addAnalytics": false,
"resources": {
"AppVirtualServerResource_1": [
{
"parameters": {
"name": "virtual",
"destinationAddress": "3.2.3.2",
"mask": "255.255.255.255",
"destinationPort": "80"
},
"parametersToRemove": [],
"subcollectionResources": {
"AppTcpProfileReferenceResource_1": [
{
"parameters": {},
"parametersToRemove": []
}
],
"AppHttpProfileReferenceResource_1": [
{
"parameters": {},
"parametersToRemove": []
}
]
}
}
],
"AppPoolResource_1": [
{
"parameters": {
"name": "pool_0"
},
"parametersToRemove": [],
"subcollectionResources": {
"AppPoolMemberResource_1": [
{
"parameters": {
"port": 80,
"nodeReference": {
"link": "#/resources/AppNodeResource_1/1.2.2.3",
"fullPath": "# 1.2.2.3"
}
},
"parametersToRemove": []
}
]
}
}
],
"AppNodeResource_1": [
{
"parameters": {
"name": "1.2.2.3",
"address": "1.2.2.3"
},
"parametersToRemove": []
}
],
"AppHttpMonitorResource_1": [
{
"parameters": {
"name": "monitor-http"
},
"parametersToRemove": []
}
],
"AppHttpProfileResource_1": [
{
"parameters": {
"name": "profile_http"
},
"parametersToRemove": []
}
]
},
"protectionMode": "Transparent",
"currentStep": "DONE",
"mode": "CREATE",
}
Response¶
HTTP/1.1 200 OK
{
"configSetName": "MyApp",
"configSetReference": {
"link": "https://localhost/mgmt/cm/global/config-sets/f786d993-b026-3759-8b58-e99743db3ccd"
},
"partition": "Common",
"subPath": "MyFolder",
"templateReference": {
"link": "https://localhost/mgmt/cm/global/templates/66f6181b-cb4c-3f4c-938f-bc804a036db6"
},
"defaultDeviceReference": {
"link": "https://localhost/mgmt/shared/resolver/device-groups/cm-bigip-allBigIpDevices/devices/35a18732-d42a-4507-bc81-cab532d75d56"
},
"appDeployConfigTaskReference": {
"link": "https://localhost/mgmt/cm/global/tasks/app-deploy/09bdc4dd-da8b-4d12-9966-5da087db388b"
},
"deploy": true,
"domains": [],
"addAnalytics": false,
"resources": {
"AppVirtualServerResource_1": [
{
"parameters": {
"name": "virtual",
"destinationAddress": "3.2.3.2",
"mask": "255.255.255.255",
"destinationPort": "80"
},
"parametersToRemove": [],
"subcollectionResources": {
"AppTcpProfileReferenceResource_1": [
{
"parameters": {},
"parametersToRemove": []
}
],
"AppHttpProfileReferenceResource_1": [
{
"parameters": {},
"parametersToRemove": []
}
]
}
}
],
"AppPoolResource_1": [
{
"parameters": {
"name": "pool_0"
},
"parametersToRemove": [],
"subcollectionResources": {
"AppPoolMemberResource_1": [
{
"parameters": {
"port": 80,
"nodeReference": {
"link": "#/resources/AppNodeResource_1/1.2.2.3",
"fullPath": "# 1.2.2.3"
}
},
"parametersToRemove": []
}
]
}
}
],
"AppNodeResource_1": [
{
"parameters": {
"name": "1.2.2.3",
"address": "1.2.2.3"
},
"parametersToRemove": []
}
],
"AppHttpMonitorResource_1": [
{
"parameters": {
"name": "monitor-http"
},
"parametersToRemove": []
}
],
"AppHttpProfileResource_1": [
{
"parameters": {
"name": "profile_http"
},
"parametersToRemove": []
}
]
},
"protectionMode": "Transparent",
"currentStep": "DONE",
"mode": "CREATE",
}
Response¶
HTTP/1.1 200 OK
{
"configSetName": "MyApp",
"configSetReference": {
"link": "https://localhost/mgmt/cm/global/config-sets/f786d993-b026-3759-8b58-e99743db3ccd"
},
"partition": "Common",
"subPath": "MyFolder",
"templateReference": {
"link": "https://localhost/mgmt/cm/global/templates/66f6181b-cb4c-3f4c-938f-bc804a036db6"
},
"ssgReference": {
"link": "https://localhost/mgmt/cm/cloud/service-scaling-groups/140b23e5-78fd-3c79-9dfd-42ce3546099a"
},
"appDeployConfigTaskReference": {
"link": "https://localhost/mgmt/cm/global/tasks/app-deploy/09bdc4dd-da8b-4d12-9966-5da087db388b"
},
"deploy": true,
"domains": [],
"addAnalytics": false,
"resources": {
"AppVirtualServerResource_1": [
{
"parameters": {
"name": "virtual",
"destinationAddress": "3.2.3.2",
"mask": "255.255.255.255",
"destinationPort": "80"
},
"parametersToRemove": [],
"subcollectionResources": {
"AppTcpProfileReferenceResource_1": [
{
"parameters": {},
"parametersToRemove": []
}
],
"AppHttpProfileReferenceResource_1": [
{
"parameters": {},
"parametersToRemove": []
}
]
}
}
],
"AppPoolResource_1": [
{
"parameters": {
"name": "pool_0"
},
"parametersToRemove": [],
"subcollectionResources": {
"AppPoolMemberResource_1": [
{
"parameters": {
"port": 80,
"nodeReference": {
"link": "#/resources/AppNodeResource_1/1.2.2.3",
"fullPath": "# 1.2.2.3"
}
},
"parametersToRemove": []
}
]
}
}
],
"AppNodeResource_1": [
{
"parameters": {
"name": "1.2.2.3",
"address": "1.2.2.3"
},
"parametersToRemove": []
}
],
"AppHttpMonitorResource_1": [
{
"parameters": {
"name": "monitor-http"
},
"parametersToRemove": []
}
],
"AppHttpProfileResource_1": [
{
"parameters": {
"name": "profile_http"
},
"parametersToRemove": []
}
]
},
"protectionMode": "Transparent",
"currentStep": "DONE",
"mode": "CREATE",
}