Create Suspension Policy

Details

API DetailsRelease-Specific Information
CloudCenter Platform 4xCloudCenter Suite 5x
NameCreate Suspension Policy
Description

Creates a new suspension policy to specify schedules for when a deployment should be in Running state – at other times, the deployment is suspended

You also can specify one or more blockout dates, during which the deployment is suspended all day

Allowed Role(s)WM_USER
MethodPOST
URI

v2/suspensionPolicies

cloudcenter-ccm-backend/api/v2/suspensionPolicies

Sample Request
curl -k -X POST -H "Accept: application/json" -H "Content-Type: application/json" -u cliqradmin:40E45DBE57E35ECB "https://<HOST>:<PORT>/v2/suspensionPolicies"
curl -k -X POST -H "Accept: application/json" -H "Content-Type: application/json" -u cliqradmin:40E45DBE57E35ECB "https://<HOST>:<PORT>/cloudcenter-ccm-backend/api/v2/suspensionPolicies"
Release

Introduced in CloudCenter 4.8.2

Modified in CloudCenter Suite 5.0.0

Notes
  • Only resource owners and users with WRITE perms can view all the fields for this resource.
  • Other users can only view common fields like name, description, and so forth. See Permission Control for additional context.
  • You can add a suspension policy to a deployment when you launch the deployment or after the deployment is complete.
  • If Governance Rules are turned on, you can add a suspension policy to a deployment at launch time by using tags.
Back To LinksCloudCenter Platform 4x APIWorkload Manager API

ESB Header

action: create.suspensionPolicies

See the Enterprise Service Bus (ESB) section for additional context.

Not applicable

Sample Request Body

{
    "name": "Forth-policy1",
    "description": "Forth-policy-description1",
    "enabled": true,
    "schedules": [
        {
            "type": "DAILY",
            "days": [
                "WED"
            ],
            "startTime": "12:00",
            "endTime": "15:00",
            "repeats": "1"
        }
    ],
    "blockoutPeriods": [
        {
            "startDate": "2017-12-25",
            "endDate": "2017-12-31"
        }
    ],
    "resourcesMaps": []
}

Response

{
    "id": "9",
    "resource": "http://ccm/v2/suspensionPolicies/9",
    "perms": [
        "read"
    ],
    "name": "Forth-policy1",
    "description": "Forth-policy-description1",
    "enabled": true,
    "schedules": [
        {
            "type": "DAILY",
            "days": [
                "WED"
            ],
            "startTime": "12:00",
            "endTime": "15:00",
            "repeats": "1"
        }
    ],
    "blockoutPeriods": [
        {
            "startDate": "2017-12-25",
            "endDate": "2017-12-31"
        }
    ],
    "isPolicyActiveOnResources": false,
    "resourcesMaps": [
        {
            "resourceId": "11",
            "resourceType": "JOB",
            "appliedDate": 1505420501904,
            "resourceStartTime": null,
            "estimatedPolicyEndTime": null,
            "allowedCost": null,
            "accruedCost": null,
            "numberOfExtensionsUsed": 0,
            "isApprovalPending": false,
            "isPreviousExtensionDenied": false,
            "isPolicyReachingExpiry": false,
            "isPolicyReachingGraceExpiry": false
        }
    ],
    "priority": 1,
    "created": 1505194048950,
    "lastUpdated": 1505194048950
}

Request Attributes

name
  • DescriptionThe name assigned for this CloudCenter ResourceValid characters are letters, numbers, underscores, and spaces.

  • Type: String

description
  • DescriptionA brief description for this CloudCenter Resource.

  • Type: String

enabled
  • Description: Indicates that this resource has been enabled. The default differs based on the resource.

    • true = The resource has been enabled (v2 aging and suspension policies are enabled by default).

    • false = The resource has not been enabled.

  • Type: Boolean

schedules
  • Description: Schedule settings for this policy.

  • Type: Sequence of schedule details

    type
    • Description: Identifies the frequency of the suspension.

    • Type: Enumeration

      EnumerationDescription
      DAILYThe policy should put the deployment in the Running state every day during the designated start time through end time period.
      WEEKLYIdentifies specific days during the week when the policy should put the deployment in the Running state.

    days
    • Description: Identifies the frequency of the weekly suspension based on the identified day(s).

    • Type: Enumeration

      EnumerationDescription
      MONIdentifies that the policy should put the deployment in the Running state each Monday.
      TUEIdentifies that the policy should put the deployment in the Running state each Tuesday.
      WEDIdentifies that the policy should put the deployment in the Running state each Wednesday.
      THURIdentifies that the policy should put the deployment in the Running state each Thursday.
      FRIIdentifies that the policy should put the deployment in the Running state each Friday.
      SATIdentifies that the policy should put the deployment in the Running state each Saturday.
      SUNIdentifies that the policy should put the deployment in the Running state each Sunday.

    startTime

    endTime

    repeats
    • Description: Identifies the number of times to repeat requests in JMeter.
    • Type: Long

blockoutPeriods

resourcesMaps
  • Description: Identifies details about the resource that needs to be configured for this policy.

  • Type: Sequence of resource details

    resourceId
    • Description: Unique identifier for a CloudCenter Resource managed by ACLs. This ID is generated automatically by the CloudCenter platform when the resource is created.  
    • Type: String

    resourceType
    • Description: The data type for a CloudCenter Resource.

    • Type: Enumeration

      StringCategory
      JOBIdentifies the resource to be a job or deployment

    appliedDate
    • Description: The date that is applied to the policy associated with this resource.

    • Type: Long

    resourceStartTime
    • Description:The start time for the policy enforcement for this resource.

    • Type: Long

    estimatedPolicyEndTime
    • Description:The estimated end time for the policy enforcement for this resource.

    • Type: Long

    allowedCost
    • Description: For a policy that is to terminate a deployment after a designated deployment cost, this attribute identifies the additional cost that is allowed for each extension

    • Type: Decimal

    accruedCost
    • Description: For a policy that is to terminate a deployment after a designated deployment cost, this attribute identifies the additional cost that is accrued.

      If a policy specifies a time or cost that is less that what has accrued for the deployment, the policy is not available.

    • Type: Decimal

    numberOfExtensionsUsed
    • Description: If one or more extensions are configured for the policy, the number of extensions appears, followed by the time length or cost limit of each extension, in parentheses

    • Type: Integer

    isApprovalPending
    • Description: Identifies if approvals is pending for a deployment submission or action.

    • Type: Boolean

      • true =Approval is pending

      • false =Default. Approval is not pending

    isPreviousExtensionDenied
    • Description:You also can add  extensions to a policy, which allows deployments to keep running as needed. This field identifies if one such request for an extension was denied.

    • Type: Boolean

      • true = A precious request for an extension was denied

      • false =Default. No extension was denied.

    isPolicyReachingExpiry
    • Description: Identifies if a policy is reaching it expiry date after the deployment has been running for a designated period of time term 

    • Type: Boolean

      • true = They policy  is going to expire

      • false =Default. The policy expiration is not in effect.

    isPolicyReachingGraceExpiry
    • Description:You can configure how far in advance of a termination or grace period expiration the system sends the message, and you can send additional messages as reminders. This field identifies if a configured grace period for a policy is going to expire.

    • Type: Boolean

      • true = They policy's grace period is going to expire

      • false =Default. The policy's grace period is not in effect.

Response Attributes

policyId
  • DescriptionUnique, system-generated identifier for the policy.  
    • If used as a request parameter, pass the Policy ID based on the context.
    • Pass the aging policy as a top-level policy and the scaling policy at the child job level.
    • The Policy ID is required if configured in your application profile. 
  • Type: String

resource
  • Description: Unique URL to access this resource.
  • Type: String

perms (click for additional details)

name
  • DescriptionThe name assigned for this CloudCenter ResourceValid characters are letters, numbers, underscores, and spaces.

  • Type: String

description
  • DescriptionA brief description for this CloudCenter Resource.

  • Type: String

enabled
  • Description: Indicates that this resource has been enabled. The default differs based on the resource.

    • true = The resource has been enabled (v2 aging and suspension policies are enabled by default).

    • false = The resource has not been enabled.

  • Type: Boolean

schedules
  • Description: Schedule settings for this policy.

  • Type: Sequence of schedule details

    type
    • Description: Identifies the frequency of the suspension.

    • Type: Enumeration

      EnumerationDescription
      DAILYThe policy should put the deployment in the Running state every day during the designated start time through end time period.
      WEEKLYIdentifies specific days during the week when the policy should put the deployment in the Running state.

    days
    • Description: Identifies the frequency of the weekly suspension based on the identified day(s).

    • Type: Enumeration

      EnumerationDescription
      MONIdentifies that the policy should put the deployment in the Running state each Monday.
      TUEIdentifies that the policy should put the deployment in the Running state each Tuesday.
      WEDIdentifies that the policy should put the deployment in the Running state each Wednesday.
      THURIdentifies that the policy should put the deployment in the Running state each Thursday.
      FRIIdentifies that the policy should put the deployment in the Running state each Friday.
      SATIdentifies that the policy should put the deployment in the Running state each Saturday.
      SUNIdentifies that the policy should put the deployment in the Running state each Sunday.

    startTime

    endTime

    repeats
    • Description: Identifies the number of times to repeat requests in JMeter.
    • Type: Long

blockoutPeriods

isPolicyActiveOnResources
  • Description: Identifies if the policy is active for the resource for which the policy is enforced

  • Type:

    • true = The policy is active for resources.

    • false = Default. The policy is not active for resources.

resourcesMaps
  • Description: Identifies details about the resource that needs to be configured for this policy.

  • Type: Sequence of resource details

    resourceId
    • Description: Unique identifier for a CloudCenter Resource managed by ACLs. This ID is generated automatically by the CloudCenter platform when the resource is created.  
    • Type: String

    resourceType
    • Description: The data type for a CloudCenter Resource.

    • Type: Enumeration

      StringCategory
      JOBIdentifies the resource to be a job or deployment

    appliedDate
    • Description: The date that is applied to the policy associated with this resource.

    • Type: Long

    resourceStartTime
    • Description:The start time for the policy enforcement for this resource.

    • Type: Long

    estimatedPolicyEndTime
    • Description:The estimated end time for the policy enforcement for this resource.

    • Type: Long

    allowedCost
    • Description: For a policy that is to terminate a deployment after a designated deployment cost, this attribute identifies the additional cost that is allowed for each extension

    • Type: Decimal

    accruedCost
    • Description: For a policy that is to terminate a deployment after a designated deployment cost, this attribute identifies the additional cost that is accrued.

      If a policy specifies a time or cost that is less that what has accrued for the deployment, the policy is not available.

    • Type: Decimal

    numberOfExtensionsUsed
    • Description: If one or more extensions are configured for the policy, the number of extensions appears, followed by the time length or cost limit of each extension, in parentheses

    • Type: Integer

    isApprovalPending
    • Description: Identifies if approvals is pending for a deployment submission or action.

    • Type: Boolean

      • true =Approval is pending

      • false =Default. Approval is not pending

    isPreviousExtensionDenied
    • Description:You also can add  extensions to a policy, which allows deployments to keep running as needed. This field identifies if one such request for an extension was denied.

    • Type: Boolean

      • true = A precious request for an extension was denied

      • false =Default. No extension was denied.

    isPolicyReachingExpiry
    • Description: Identifies if a policy is reaching it expiry date after the deployment has been running for a designated period of time term 

    • Type: Boolean

      • true = They policy  is going to expire

      • false =Default. The policy expiration is not in effect.

    isPolicyReachingGraceExpiry
    • Description:You can configure how far in advance of a termination or grace period expiration the system sends the message, and you can send additional messages as reminders. This field identifies if a configured grace period for a policy is going to expire.

    • Type: Boolean

      • true = They policy's grace period is going to expire

      • false =Default. The policy's grace period is not in effect.

priority
  • Description: When you associate System Tags with an application deployment tier, the CloudCenter platform evaluates all rules that are mapped to the system tags to choose the aging policy. If more than one aging policy is available, the rule evaluation chooses the aging policy with the highest priority. This option is available only if Governance Rules is turned on. A value of 1 represents the highest priority

  • Type: long

created
  • Description: The date that this resource or favorite was created (system generated). This is a read-only attribute and cannot be configured.
  • Type: Long

lastUpdated
  • Description: Date that this resource was last updated. This attribute is the same as the lastUpdatedTime attribute.

  • Type: Long

© 2017-2019 Cisco Systems, Inc. All rights reserved