VSphereAutomation::Appliance::UpdatePendingApi
All URIs are relative to https://<vcenter>/rest
Method | HTTP request | Description |
---|---|---|
get | GET /appliance/update/pending/version | Gets update information |
install | POST /appliance/update/pending/version?action=install | Starts operation of installing the appliance update. Will fail is the update is not staged |
list | GET /appliance/update/pending | Checks if new updates are available. |
precheck | POST /appliance/update/pending/version | Runs update precheck |
stage | POST /appliance/update/pending/version?action=stage | Starts staging the appliance update. The updates are searched for in the following order: staged, CDROM, URL |
stage_and_install | POST /appliance/update/pending/version?action=stage-and-install | Starts operation of installing the appliance update. Will stage update if not already staged The updates are searched for in the following order: staged, CDROM, URL |
validate | POST /appliance/update/pending/version?action=validate | Validates the user provided data before the update installation. |
get
ApplianceUpdatePendingResult get(version)
Gets update information
Example
# load the gem
require 'vsphere-automation-appliance'
# setup authorization
VSphereAutomation::Configuration.new.tap do |config|
# Configure API key authorization: api_key
config.api_key['vmware-api-session-id'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['vmware-api-session-id'] = 'Bearer'
end
api_instance = VSphereAutomation::Appliance::UpdatePendingApi.new
version = 'version_example' # String | Update version
begin
#Gets update information
result = api_instance.get(version)
p result
rescue VSphereAutomation::ApiError => e
puts "Exception when calling UpdatePendingApi->get: #{e}"
end
Parameters
Name | Type | Description | Notes |
---|---|---|---|
version | String | Update version |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
install
install(version, request_body)
Starts operation of installing the appliance update. Will fail is the update is not staged
Example
# load the gem
require 'vsphere-automation-appliance'
# setup authorization
VSphereAutomation::Configuration.new.tap do |config|
# Configure API key authorization: api_key
config.api_key['vmware-api-session-id'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['vmware-api-session-id'] = 'Bearer'
end
api_instance = VSphereAutomation::Appliance::UpdatePendingApi.new
version = 'version_example' # String | Update version
request_body = Appliance::ApplianceUpdatePendingInstall.new # ApplianceUpdatePendingInstall |
begin
#Starts operation of installing the appliance update. Will fail is the update is not staged
api_instance.install(version, request_body)
rescue VSphereAutomation::ApiError => e
puts "Exception when calling UpdatePendingApi->install: #{e}"
end
Parameters
Name | Type | Description | Notes |
---|---|---|---|
version | String | Update version | |
request_body | ApplianceUpdatePendingInstall |
Return type
nil (empty response body)
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
list
ApplianceUpdatePendingListResult list(source_type, opts)
Checks if new updates are available.
Example
# load the gem
require 'vsphere-automation-appliance'
# setup authorization
VSphereAutomation::Configuration.new.tap do |config|
# Configure API key authorization: api_key
config.api_key['vmware-api-session-id'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['vmware-api-session-id'] = 'Bearer'
end
api_instance = VSphereAutomation::Appliance::UpdatePendingApi.new
source_type = 'source_type_example' # String | The {@name SourceType} {@term enumerated type} defines the supported types of sources of updates.
opts = {
url: 'url_example' # String | specific URL to check at
}
begin
#Checks if new updates are available.
result = api_instance.list(source_type, opts)
p result
rescue VSphereAutomation::ApiError => e
puts "Exception when calling UpdatePendingApi->list: #{e}"
end
Parameters
Name | Type | Description | Notes |
---|---|---|---|
source_type | String | The SourceType enumerated type defines the supported types of sources of updates. | |
url | String | specific URL to check at | [optional] |
Return type
ApplianceUpdatePendingListResult
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
precheck
ApplianceUpdatePendingPrecheckResult precheck(version, action)
Runs update precheck
Example
# load the gem
require 'vsphere-automation-appliance'
# setup authorization
VSphereAutomation::Configuration.new.tap do |config|
# Configure API key authorization: api_key
config.api_key['vmware-api-session-id'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['vmware-api-session-id'] = 'Bearer'
end
api_instance = VSphereAutomation::Appliance::UpdatePendingApi.new
version = 'version_example' # String | Update version
action = 'action_example' # String | action=precheck
begin
#Runs update precheck
result = api_instance.precheck(version, action)
p result
rescue VSphereAutomation::ApiError => e
puts "Exception when calling UpdatePendingApi->precheck: #{e}"
end
Parameters
Name | Type | Description | Notes |
---|---|---|---|
version | String | Update version | |
action | String | action=precheck |
Return type
ApplianceUpdatePendingPrecheckResult
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
stage
stage(version)
Starts staging the appliance update. The updates are searched for in the following order: staged, CDROM, URL
Example
# load the gem
require 'vsphere-automation-appliance'
# setup authorization
VSphereAutomation::Configuration.new.tap do |config|
# Configure API key authorization: api_key
config.api_key['vmware-api-session-id'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['vmware-api-session-id'] = 'Bearer'
end
api_instance = VSphereAutomation::Appliance::UpdatePendingApi.new
version = 'version_example' # String | Update version
begin
#Starts staging the appliance update. The updates are searched for in the following order: staged, CDROM, URL
api_instance.stage(version)
rescue VSphereAutomation::ApiError => e
puts "Exception when calling UpdatePendingApi->stage: #{e}"
end
Parameters
Name | Type | Description | Notes |
---|---|---|---|
version | String | Update version |
Return type
nil (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
stage_and_install
stage_and_install(version, request_body)
Starts operation of installing the appliance update. Will stage update if not already staged The updates are searched for in the following order: staged, CDROM, URL
Example
# load the gem
require 'vsphere-automation-appliance'
# setup authorization
VSphereAutomation::Configuration.new.tap do |config|
# Configure API key authorization: api_key
config.api_key['vmware-api-session-id'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['vmware-api-session-id'] = 'Bearer'
end
api_instance = VSphereAutomation::Appliance::UpdatePendingApi.new
version = 'version_example' # String | Update version
request_body = Appliance::ApplianceUpdatePendingStageAndInstall.new # ApplianceUpdatePendingStageAndInstall |
begin
#Starts operation of installing the appliance update. Will stage update if not already staged The updates are searched for in the following order: staged, CDROM, URL
api_instance.stage_and_install(version, request_body)
rescue VSphereAutomation::ApiError => e
puts "Exception when calling UpdatePendingApi->stage_and_install: #{e}"
end
Parameters
Name | Type | Description | Notes |
---|---|---|---|
version | String | Update version | |
request_body | ApplianceUpdatePendingStageAndInstall |
Return type
nil (empty response body)
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
validate
ApplianceUpdatePendingValidateResult validate(version, request_body)
Validates the user provided data before the update installation.
Example
# load the gem
require 'vsphere-automation-appliance'
# setup authorization
VSphereAutomation::Configuration.new.tap do |config|
# Configure API key authorization: api_key
config.api_key['vmware-api-session-id'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['vmware-api-session-id'] = 'Bearer'
end
api_instance = VSphereAutomation::Appliance::UpdatePendingApi.new
version = 'version_example' # String | Update version
request_body = Appliance::ApplianceUpdatePendingValidate.new # ApplianceUpdatePendingValidate |
begin
#Validates the user provided data before the update installation.
result = api_instance.validate(version, request_body)
p result
rescue VSphereAutomation::ApiError => e
puts "Exception when calling UpdatePendingApi->validate: #{e}"
end
Parameters
Name | Type | Description | Notes |
---|---|---|---|
version | String | Update version | |
request_body | ApplianceUpdatePendingValidate |
Return type
ApplianceUpdatePendingValidateResult
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json