Example use case scenarios to create a staging policy
You can create a staging policy to configure a PATROL Agent from a staging Integration Service to communicate with Infrastructure Management Server using specified Integration Service. This topic provides a use case scenario for the web service to create a staging policy. It can help you effectively use the create API. The scenario provides an example URL and its subsequent response details.
URL to create a staging policy
Input parameters to create a staging policy
{
"stagingPolicy": {
"id": "6844b76e-96f6-430a-a3a5-fecfe5f1636f",
"name": "Staging4",
"type": "staging",
"description": "",
"tenant": {
"name": "tenant1",
"id": "tenant1"
},
"precedence": 12,
"agentSelectionCriteria": "agentOS CONTAINS \"windows\" ",
"associatedUserGroup": "BMCTenantAdmin",
"owner": "test3",
"tag" : "win:win",
"integrationService": {
"type": "IS",
"name": "clm-pun-008635.clm-mgmt.clm.bmc.com#12124",
"id": null
},
"enabled": true,
"shared": false
}
}
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. |
enabled | Specifies whether the policy is enabled. The supported values are as follows:
The default value is true. |
associatedUserGroup | Name of the user group with which you want to associate the policy |
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"
}
Related topics
Creating-a-policy-using-web-services
Managing-policies-using-web-services
Performing-Central-Monitoring-Administration-functions-with-web-services