deactivate_license ( $license_id, $capacity, $opt )

Deactivates a specific number of licenses. Deactivations can be done against a specific license ID after they have persisted for at least a 90-day period.

Access

public

Parameters

Parameter

Type

Required

Description

$license_id

string

Required

Specifies the ID for the specific license to deactivate against.

$capacity

integer

Required

Specifies the amount of capacity to deactivate against the license.

$opt

array

Optional

An associative array of parameters that can have the following keys:

  • curlopts - array - Optional - A set of values to pass directly into curl_setopt(), where the key is a pre-defined CURLOPT_* constant.
  • returnCurlHandle - boolean - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.

Returns

Type

Description

CFResponse

A CFResponse object containing a parsed HTTP response.

Examples

Deactivate a Microsoft® Windows® license.

$ec2 = new AmazonEC2();

$response = $ec2->deactivate_license('lic-1234abcd', 1);

var_dump($response->isOK());
Result:
bool(true)

Related Methods

Source

Method defined in services/ec2.class.php | Toggle source view (8 lines) | View on GitHub

public function deactivate_license($license_id, $capacity, $opt = null)
{
    if (!$opt) $opt = array();
    $opt['LicenseId'] = $license_id;
    $opt['Capacity'] = $capacity;
    
    return $this->authenticate('DeactivateLicense', $opt);
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback