Example use case scenarios to create a staging policy
This section lists a few use case scenarios for the web service to create a staging policy. It can help you effectively use the create API. Each scenario is explained using an example URL and its subsequent response details.
Creating a staging policy to communicate with specified integration service in the policy
You can create a staging policy to configure patrol agent from a staging integration service to communicate with Infrastructure Management Server using specified integration service.
URL to create a staging policy
Input parameters to create a staging policy
"stagingPolicy": {
"integrationService": {
"name": "bmc-29.labs.bmc.com#12124",
"type": "IS"
},
"tag": "os:windows",
"name": "Prod_Staging",
"type": "staging",
"enabled": true,
"description": "Prod_Staging",
"precedence": 999,
"tenant": {
"name": "GLOBAL"
},
"agentSelectionCriteria": "agentTag EQUALS \"Windows_VM\" "
}
}
The following table lists the parameters that you must provide with the URL.
List of required parameters that must be provided to access the create API
Attributes | Description |
agentSelectionCriteria | Set of conditions based on which the agents are identified to apply the policy
|
precedence | Priority for the policy. The supported values are numbers between 0 and 999 with 999 being the lowest priority and 0 being the top priority. |
tenant | Details of the tenant who owns the policy. You can either provide name or the id of the tenant. |
name | Name of the tenant who owns the policy. The supported values are as follows:
|
enabled | Indicates whether the policy is enabled. The default value is true. |
name | Name of the policy |
type | Type of the policy. The supported types are as follows:
|
description | Brief description about the policy |
integrationService | Display name of the Integration Service(IS) that assists the Agent to communicate to the Infrastructure Management Server. This should be an existing IS/cluster. Ensure that the IS is created before calling the API. |
integrationService: type | The type of the integration service. The values can be IS or cluster. |
integrationService: name | Name of the IS or IS cluster. |
JSON response
A staging policy is created, and a sample response is as follows:
"response": [
{
"statusCode": "200",
"statusMsg": "OK",
"resourceId": "a4315c0c-cbf2-4b72-a06b-ba8d4e93f69d",
"resourceURI": null,
"resourceName": "Prod_Staging"
}
],
"statusCode": "200",
"statusMsg": "OK",
"responseTimeStamp": "2014-08-08T09:07:27"
}