Skip to content
This repository has been archived by the owner on Oct 27, 2022. It is now read-only.

Latest commit

 

History

History
106 lines (73 loc) · 3.15 KB

MetadataPrivilegePackageApi.md

File metadata and controls

106 lines (73 loc) · 3.15 KB

VSphereAutomation::VAPI::MetadataPrivilegePackageApi

All URIs are relative to https://<vcenter>/rest

Method HTTP request Description
get GET /com/vmware/vapi/metadata/privilege/package/id:{package_id} Retrieves privilege information about the package element corresponding to {@param.name packageId}.
list GET /com/vmware/vapi/metadata/privilege/package Returns the identifiers for the package elements that have privilege information.

get

VapiMetadataPrivilegePackageResult get(package_id)

Retrieves privilege information about the package element corresponding to {@param.name packageId}.

Example

# load the gem
require 'vsphere-automation-vapi'
# 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::VAPI::MetadataPrivilegePackageApi.new
package_id = 'package_id_example' # String | Identifier of the package element.

begin
  #Retrieves privilege information about the package element corresponding to {@param.name packageId}.
  result = api_instance.get(package_id)
  p result
rescue VSphereAutomation::ApiError => e
  puts "Exception when calling MetadataPrivilegePackageApi->get: #{e}"
end

Parameters

Name Type Description Notes
package_id String Identifier of the package element.

Return type

VapiMetadataPrivilegePackageResult

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

list

VapiMetadataPrivilegePackageListResult list

Returns the identifiers for the package elements that have privilege information.

Example

# load the gem
require 'vsphere-automation-vapi'
# 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::VAPI::MetadataPrivilegePackageApi.new

begin
  #Returns the identifiers for the package elements that have privilege information.
  result = api_instance.list
  p result
rescue VSphereAutomation::ApiError => e
  puts "Exception when calling MetadataPrivilegePackageApi->list: #{e}"
end

Parameters

This endpoint does not need any parameter.

Return type

VapiMetadataPrivilegePackageListResult

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json