Docs.bmc.com will undergo a brief maintenance outage 27 March 2025. The site will be unavailable for ten minutes starting at 6:30 AM CDT/5 PM IST.

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

http://<TSPShostname:port#>/tsws/10.0/api/unifiedadmin/StagingPolicy/create

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

The syntax is  "agentIdentifier operator \"value\""
where,

  • agentIdentifier refers to the agent attributes, based on which the agent is identified. The supported identifiers are as follows:
    • agentName—Host name of the computer on which the BMC PATROL Agent is installed
    • agentPort—Port number through which the Integration Service connects with the agent
    • agentVersion—Version of the BMC PATROL Agent
    • agentOS—Operating system of the computer on which the BMC PATROL Agent is installed
    • agentIP—IP address of the computer on which the BMC PATROL Agent is installed
    • agentTag—Tag name of the BMC PATROL Agent
    • integrationService—Display name of the Integration Service
    • childServer—Host name of the Child Server that is registered with Central Monitoring Administration

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. 

The default value is 999.

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:

  • <nameOfTenant>—Indicates that the policy is applicable to the specified tenant
  • GLOBAL—Indicates that the policy is applicable to all agents
  • PROVIDER—Indicates that the policy is applicable to the cloud service provider and also to the agents that do not have any tenants

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:

  • blackout
  • monitoring
  • staging

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:

  • true
  • false

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