oci-cloudbridge 2.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +89 -0
- package/NOTICE.txt +1 -0
- package/README.md +22 -0
- package/THIRD_PARTY_LICENSES.txt +576 -0
- package/index.d.ts +31 -0
- package/index.js +54 -0
- package/index.js.map +1 -0
- package/lib/client.d.ts +781 -0
- package/lib/client.js +4202 -0
- package/lib/client.js.map +1 -0
- package/lib/common-waiter.d.ts +27 -0
- package/lib/common-waiter.js +44 -0
- package/lib/common-waiter.js.map +1 -0
- package/lib/discovery-waiter.d.ts +37 -0
- package/lib/discovery-waiter.js +77 -0
- package/lib/discovery-waiter.js.map +1 -0
- package/lib/inventory-waiter.d.ts +37 -0
- package/lib/inventory-waiter.js +77 -0
- package/lib/inventory-waiter.js.map +1 -0
- package/lib/model/action-type.d.ts +32 -0
- package/lib/model/action-type.js +43 -0
- package/lib/model/action-type.js.map +1 -0
- package/lib/model/add-agent-dependency-details.d.ts +25 -0
- package/lib/model/add-agent-dependency-details.js +29 -0
- package/lib/model/add-agent-dependency-details.js.map +1 -0
- package/lib/model/agent-collection.d.ts +26 -0
- package/lib/model/agent-collection.js +61 -0
- package/lib/model/agent-collection.js.map +1 -0
- package/lib/model/agent-dependency-collection.d.ts +26 -0
- package/lib/model/agent-dependency-collection.js +61 -0
- package/lib/model/agent-dependency-collection.js.map +1 -0
- package/lib/model/agent-dependency-summary.d.ts +108 -0
- package/lib/model/agent-dependency-summary.js +29 -0
- package/lib/model/agent-dependency-summary.js.map +1 -0
- package/lib/model/agent-dependency.d.ts +121 -0
- package/lib/model/agent-dependency.js +43 -0
- package/lib/model/agent-dependency.js.map +1 -0
- package/lib/model/agent-summary.d.ts +104 -0
- package/lib/model/agent-summary.js +29 -0
- package/lib/model/agent-summary.js.map +1 -0
- package/lib/model/agent.d.ts +148 -0
- package/lib/model/agent.js +95 -0
- package/lib/model/agent.js.map +1 -0
- package/lib/model/appliance-image-collection.d.ts +26 -0
- package/lib/model/appliance-image-collection.js +61 -0
- package/lib/model/appliance-image-collection.js.map +1 -0
- package/lib/model/appliance-image-summary.d.ts +102 -0
- package/lib/model/appliance-image-summary.js +43 -0
- package/lib/model/appliance-image-summary.js.map +1 -0
- package/lib/model/asset-aggregation-collection.d.ts +26 -0
- package/lib/model/asset-aggregation-collection.js +61 -0
- package/lib/model/asset-aggregation-collection.js.map +1 -0
- package/lib/model/asset-aggregation.d.ts +51 -0
- package/lib/model/asset-aggregation.js +29 -0
- package/lib/model/asset-aggregation.js.map +1 -0
- package/lib/model/asset-collection.d.ts +26 -0
- package/lib/model/asset-collection.js +61 -0
- package/lib/model/asset-collection.js.map +1 -0
- package/lib/model/asset-source-collection.d.ts +26 -0
- package/lib/model/asset-source-collection.js +61 -0
- package/lib/model/asset-source-collection.js.map +1 -0
- package/lib/model/asset-source-connection-collection.d.ts +26 -0
- package/lib/model/asset-source-connection-collection.js +61 -0
- package/lib/model/asset-source-connection-collection.js.map +1 -0
- package/lib/model/asset-source-connection-lifecycle-state.d.ts +31 -0
- package/lib/model/asset-source-connection-lifecycle-state.js +42 -0
- package/lib/model/asset-source-connection-lifecycle-state.js.map +1 -0
- package/lib/model/asset-source-connection-type.d.ts +28 -0
- package/lib/model/asset-source-connection-type.js +39 -0
- package/lib/model/asset-source-connection-type.js.map +1 -0
- package/lib/model/asset-source-connection.d.ts +42 -0
- package/lib/model/asset-source-connection.js +29 -0
- package/lib/model/asset-source-connection.js.map +1 -0
- package/lib/model/asset-source-credentials-type.d.ts +27 -0
- package/lib/model/asset-source-credentials-type.js +38 -0
- package/lib/model/asset-source-credentials-type.js.map +1 -0
- package/lib/model/asset-source-credentials.d.ts +33 -0
- package/lib/model/asset-source-credentials.js +29 -0
- package/lib/model/asset-source-credentials.js.map +1 -0
- package/lib/model/asset-source-lifecycle-state.d.ts +33 -0
- package/lib/model/asset-source-lifecycle-state.js +44 -0
- package/lib/model/asset-source-lifecycle-state.js.map +1 -0
- package/lib/model/asset-source-summary.d.ts +96 -0
- package/lib/model/asset-source-summary.js +68 -0
- package/lib/model/asset-source-summary.js.map +1 -0
- package/lib/model/asset-source-type.d.ts +27 -0
- package/lib/model/asset-source-type.js +38 -0
- package/lib/model/asset-source-type.js.map +1 -0
- package/lib/model/asset-source.d.ts +100 -0
- package/lib/model/asset-source.js +68 -0
- package/lib/model/asset-source.js.map +1 -0
- package/lib/model/asset-summary.d.ts +97 -0
- package/lib/model/asset-summary.js +29 -0
- package/lib/model/asset-summary.js.map +1 -0
- package/lib/model/asset-type.d.ts +28 -0
- package/lib/model/asset-type.js +39 -0
- package/lib/model/asset-type.js.map +1 -0
- package/lib/model/asset.d.ts +102 -0
- package/lib/model/asset.js +82 -0
- package/lib/model/asset.js.map +1 -0
- package/lib/model/change-agent-compartment-details.d.ts +27 -0
- package/lib/model/change-agent-compartment-details.js +29 -0
- package/lib/model/change-agent-compartment-details.js.map +1 -0
- package/lib/model/change-agent-dependency-compartment-details.d.ts +27 -0
- package/lib/model/change-agent-dependency-compartment-details.js +29 -0
- package/lib/model/change-agent-dependency-compartment-details.js.map +1 -0
- package/lib/model/change-asset-compartment-details.d.ts +25 -0
- package/lib/model/change-asset-compartment-details.js +29 -0
- package/lib/model/change-asset-compartment-details.js.map +1 -0
- package/lib/model/change-asset-source-compartment-details.d.ts +26 -0
- package/lib/model/change-asset-source-compartment-details.js +29 -0
- package/lib/model/change-asset-source-compartment-details.js.map +1 -0
- package/lib/model/change-asset-tags-details.d.ts +41 -0
- package/lib/model/change-asset-tags-details.js +29 -0
- package/lib/model/change-asset-tags-details.js.map +1 -0
- package/lib/model/change-discovery-schedule-compartment-details.d.ts +26 -0
- package/lib/model/change-discovery-schedule-compartment-details.js +29 -0
- package/lib/model/change-discovery-schedule-compartment-details.js.map +1 -0
- package/lib/model/change-environment-compartment-details.d.ts +27 -0
- package/lib/model/change-environment-compartment-details.js +29 -0
- package/lib/model/change-environment-compartment-details.js.map +1 -0
- package/lib/model/compute-properties.d.ts +132 -0
- package/lib/model/compute-properties.js +103 -0
- package/lib/model/compute-properties.js.map +1 -0
- package/lib/model/create-agent-dependency-details.d.ts +84 -0
- package/lib/model/create-agent-dependency-details.js +29 -0
- package/lib/model/create-agent-dependency-details.js.map +1 -0
- package/lib/model/create-agent-details.d.ts +65 -0
- package/lib/model/create-agent-details.js +29 -0
- package/lib/model/create-agent-details.js.map +1 -0
- package/lib/model/create-asset-details.d.ts +66 -0
- package/lib/model/create-asset-details.js +68 -0
- package/lib/model/create-asset-details.js.map +1 -0
- package/lib/model/create-asset-source-details.d.ts +80 -0
- package/lib/model/create-asset-source-details.js +68 -0
- package/lib/model/create-asset-source-details.js.map +1 -0
- package/lib/model/create-discovery-schedule-details.d.ts +56 -0
- package/lib/model/create-discovery-schedule-details.js +29 -0
- package/lib/model/create-discovery-schedule-details.js.map +1 -0
- package/lib/model/create-environment-details.d.ts +49 -0
- package/lib/model/create-environment-details.js +29 -0
- package/lib/model/create-environment-details.js.map +1 -0
- package/lib/model/create-inventory-details.d.ts +49 -0
- package/lib/model/create-inventory-details.js +29 -0
- package/lib/model/create-inventory-details.js.map +1 -0
- package/lib/model/create-vm-ware-asset-source-details.d.ts +38 -0
- package/lib/model/create-vm-ware-asset-source-details.js +68 -0
- package/lib/model/create-vm-ware-asset-source-details.js.map +1 -0
- package/lib/model/create-vmware-vm-asset-details.d.ts +28 -0
- package/lib/model/create-vmware-vm-asset-details.js +72 -0
- package/lib/model/create-vmware-vm-asset-details.js.map +1 -0
- package/lib/model/customer-tag.d.ts +29 -0
- package/lib/model/customer-tag.js +29 -0
- package/lib/model/customer-tag.js.map +1 -0
- package/lib/model/discovery-schedule-collection.d.ts +26 -0
- package/lib/model/discovery-schedule-collection.js +61 -0
- package/lib/model/discovery-schedule-collection.js.map +1 -0
- package/lib/model/discovery-schedule-lifecycle-state.d.ts +28 -0
- package/lib/model/discovery-schedule-lifecycle-state.js +39 -0
- package/lib/model/discovery-schedule-lifecycle-state.js.map +1 -0
- package/lib/model/discovery-schedule-summary.d.ts +83 -0
- package/lib/model/discovery-schedule-summary.js +29 -0
- package/lib/model/discovery-schedule-summary.js.map +1 -0
- package/lib/model/discovery-schedule.d.ts +87 -0
- package/lib/model/discovery-schedule.js +29 -0
- package/lib/model/discovery-schedule.js.map +1 -0
- package/lib/model/disk.d.ts +49 -0
- package/lib/model/disk.js +29 -0
- package/lib/model/disk.js.map +1 -0
- package/lib/model/environment-collection.d.ts +26 -0
- package/lib/model/environment-collection.js +61 -0
- package/lib/model/environment-collection.js.map +1 -0
- package/lib/model/environment-summary.d.ts +80 -0
- package/lib/model/environment-summary.js +29 -0
- package/lib/model/environment-summary.js.map +1 -0
- package/lib/model/environment.d.ts +93 -0
- package/lib/model/environment.js +43 -0
- package/lib/model/environment.js.map +1 -0
- package/lib/model/gpu-device.d.ts +41 -0
- package/lib/model/gpu-device.js +29 -0
- package/lib/model/gpu-device.js.map +1 -0
- package/lib/model/historical-metric-collection.d.ts +26 -0
- package/lib/model/historical-metric-collection.js +61 -0
- package/lib/model/historical-metric-collection.js.map +1 -0
- package/lib/model/historical-metric-summary.d.ts +41 -0
- package/lib/model/historical-metric-summary.js +29 -0
- package/lib/model/historical-metric-summary.js.map +1 -0
- package/lib/model/historical-metric.d.ts +33 -0
- package/lib/model/historical-metric.js +29 -0
- package/lib/model/historical-metric.js.map +1 -0
- package/lib/model/import-inventory-details.d.ts +46 -0
- package/lib/model/import-inventory-details.js +68 -0
- package/lib/model/import-inventory-details.js.map +1 -0
- package/lib/model/import-inventory-via-assets-details.d.ts +32 -0
- package/lib/model/import-inventory-via-assets-details.js +54 -0
- package/lib/model/import-inventory-via-assets-details.js.map +1 -0
- package/lib/model/index.d.ts +212 -0
- package/lib/model/index.js +236 -0
- package/lib/model/index.js.map +1 -0
- package/lib/model/inventory-collection.d.ts +26 -0
- package/lib/model/inventory-collection.js +61 -0
- package/lib/model/inventory-collection.js.map +1 -0
- package/lib/model/inventory-summary.d.ts +80 -0
- package/lib/model/inventory-summary.js +29 -0
- package/lib/model/inventory-summary.js.map +1 -0
- package/lib/model/inventory.d.ts +92 -0
- package/lib/model/inventory.js +42 -0
- package/lib/model/inventory.js.map +1 -0
- package/lib/model/nic.d.ts +45 -0
- package/lib/model/nic.js +29 -0
- package/lib/model/nic.js.map +1 -0
- package/lib/model/nvdimm-controller.d.ts +29 -0
- package/lib/model/nvdimm-controller.js +29 -0
- package/lib/model/nvdimm-controller.js.map +1 -0
- package/lib/model/nvdimm.d.ts +33 -0
- package/lib/model/nvdimm.js +29 -0
- package/lib/model/nvdimm.js.map +1 -0
- package/lib/model/operation-status.d.ts +33 -0
- package/lib/model/operation-status.js +44 -0
- package/lib/model/operation-status.js.map +1 -0
- package/lib/model/operation-type.d.ts +45 -0
- package/lib/model/operation-type.js +56 -0
- package/lib/model/operation-type.js.map +1 -0
- package/lib/model/plugin-summary.d.ts +69 -0
- package/lib/model/plugin-summary.js +29 -0
- package/lib/model/plugin-summary.js.map +1 -0
- package/lib/model/plugin.d.ts +105 -0
- package/lib/model/plugin.js +52 -0
- package/lib/model/plugin.js.map +1 -0
- package/lib/model/remove-agent-dependency-details.d.ts +25 -0
- package/lib/model/remove-agent-dependency-details.js +29 -0
- package/lib/model/remove-agent-dependency-details.js.map +1 -0
- package/lib/model/scsi-controller.d.ts +33 -0
- package/lib/model/scsi-controller.js +29 -0
- package/lib/model/scsi-controller.js.map +1 -0
- package/lib/model/sort-orders.d.ts +23 -0
- package/lib/model/sort-orders.js +34 -0
- package/lib/model/sort-orders.js.map +1 -0
- package/lib/model/submit-historical-metrics-details.d.ts +26 -0
- package/lib/model/submit-historical-metrics-details.js +61 -0
- package/lib/model/submit-historical-metrics-details.js.map +1 -0
- package/lib/model/update-agent-dependency-details.d.ts +80 -0
- package/lib/model/update-agent-dependency-details.js +29 -0
- package/lib/model/update-agent-dependency-details.js.map +1 -0
- package/lib/model/update-agent-details.d.ts +45 -0
- package/lib/model/update-agent-details.js +29 -0
- package/lib/model/update-agent-details.js.map +1 -0
- package/lib/model/update-asset-details.d.ts +50 -0
- package/lib/model/update-asset-details.js +72 -0
- package/lib/model/update-asset-details.js.map +1 -0
- package/lib/model/update-asset-source-details.d.ts +63 -0
- package/lib/model/update-asset-source-details.js +68 -0
- package/lib/model/update-asset-source-details.js.map +1 -0
- package/lib/model/update-discovery-schedule-details.d.ts +51 -0
- package/lib/model/update-discovery-schedule-details.js +29 -0
- package/lib/model/update-discovery-schedule-details.js.map +1 -0
- package/lib/model/update-environment-details.d.ts +45 -0
- package/lib/model/update-environment-details.js +29 -0
- package/lib/model/update-environment-details.js.map +1 -0
- package/lib/model/update-inventory-details.d.ts +45 -0
- package/lib/model/update-inventory-details.js +29 -0
- package/lib/model/update-inventory-details.js.map +1 -0
- package/lib/model/update-plugin-details.d.ts +25 -0
- package/lib/model/update-plugin-details.js +29 -0
- package/lib/model/update-plugin-details.js.map +1 -0
- package/lib/model/update-vm-asset-details.d.ts +24 -0
- package/lib/model/update-vm-asset-details.js +54 -0
- package/lib/model/update-vm-asset-details.js.map +1 -0
- package/lib/model/update-vm-ware-asset-source-details.d.ts +42 -0
- package/lib/model/update-vm-ware-asset-source-details.js +68 -0
- package/lib/model/update-vm-ware-asset-source-details.js.map +1 -0
- package/lib/model/update-vmware-vm-asset-details.d.ts +28 -0
- package/lib/model/update-vmware-vm-asset-details.js +72 -0
- package/lib/model/update-vmware-vm-asset-details.js.map +1 -0
- package/lib/model/vm-asset.d.ts +26 -0
- package/lib/model/vm-asset.js +58 -0
- package/lib/model/vm-asset.js.map +1 -0
- package/lib/model/vm-properties.d.ts +33 -0
- package/lib/model/vm-properties.js +29 -0
- package/lib/model/vm-properties.js.map +1 -0
- package/lib/model/vm-ware-asset-source-summary.d.ts +28 -0
- package/lib/model/vm-ware-asset-source-summary.js +54 -0
- package/lib/model/vm-ware-asset-source-summary.js.map +1 -0
- package/lib/model/vm-ware-asset-source.d.ts +38 -0
- package/lib/model/vm-ware-asset-source.js +66 -0
- package/lib/model/vm-ware-asset-source.js.map +1 -0
- package/lib/model/vmware-vcenter-properties.d.ts +33 -0
- package/lib/model/vmware-vcenter-properties.js +29 -0
- package/lib/model/vmware-vcenter-properties.js.map +1 -0
- package/lib/model/vmware-vm-asset.d.ts +28 -0
- package/lib/model/vmware-vm-asset.js +68 -0
- package/lib/model/vmware-vm-asset.js.map +1 -0
- package/lib/model/vmware-vm-properties.d.ts +68 -0
- package/lib/model/vmware-vm-properties.js +61 -0
- package/lib/model/vmware-vm-properties.js.map +1 -0
- package/lib/model/work-request-error-collection.d.ts +26 -0
- package/lib/model/work-request-error-collection.js +61 -0
- package/lib/model/work-request-error-collection.js.map +1 -0
- package/lib/model/work-request-error.d.ts +35 -0
- package/lib/model/work-request-error.js +29 -0
- package/lib/model/work-request-error.js.map +1 -0
- package/lib/model/work-request-log-entry-collection.d.ts +26 -0
- package/lib/model/work-request-log-entry-collection.js +61 -0
- package/lib/model/work-request-log-entry-collection.js.map +1 -0
- package/lib/model/work-request-log-entry.d.ts +29 -0
- package/lib/model/work-request-log-entry.js +29 -0
- package/lib/model/work-request-log-entry.js.map +1 -0
- package/lib/model/work-request-resource-metadata-key.d.ts +27 -0
- package/lib/model/work-request-resource-metadata-key.js +38 -0
- package/lib/model/work-request-resource-metadata-key.js.map +1 -0
- package/lib/model/work-request-resource.d.ts +48 -0
- package/lib/model/work-request-resource.js +29 -0
- package/lib/model/work-request-resource.js.map +1 -0
- package/lib/model/work-request-summary-collection.d.ts +26 -0
- package/lib/model/work-request-summary-collection.js +61 -0
- package/lib/model/work-request-summary-collection.js.map +1 -0
- package/lib/model/work-request-summary.d.ts +67 -0
- package/lib/model/work-request-summary.js +61 -0
- package/lib/model/work-request-summary.js.map +1 -0
- package/lib/model/work-request.d.ts +67 -0
- package/lib/model/work-request.js +61 -0
- package/lib/model/work-request.js.map +1 -0
- package/lib/ocbagentsvc-waiter.d.ts +53 -0
- package/lib/ocbagentsvc-waiter.js +101 -0
- package/lib/ocbagentsvc-waiter.js.map +1 -0
- package/lib/request/add-agent-dependency-request.d.ts +49 -0
- package/lib/request/add-agent-dependency-request.js +15 -0
- package/lib/request/add-agent-dependency-request.js.map +1 -0
- package/lib/request/analyze-assets-request.d.ts +67 -0
- package/lib/request/analyze-assets-request.js +15 -0
- package/lib/request/analyze-assets-request.js.map +1 -0
- package/lib/request/cancel-work-request-request.d.ts +35 -0
- package/lib/request/cancel-work-request-request.js +15 -0
- package/lib/request/cancel-work-request-request.js.map +1 -0
- package/lib/request/change-agent-compartment-request.d.ts +49 -0
- package/lib/request/change-agent-compartment-request.js +15 -0
- package/lib/request/change-agent-compartment-request.js.map +1 -0
- package/lib/request/change-agent-dependency-compartment-request.d.ts +49 -0
- package/lib/request/change-agent-dependency-compartment-request.js +15 -0
- package/lib/request/change-agent-dependency-compartment-request.js.map +1 -0
- package/lib/request/change-asset-compartment-request.d.ts +49 -0
- package/lib/request/change-asset-compartment-request.js +15 -0
- package/lib/request/change-asset-compartment-request.js.map +1 -0
- package/lib/request/change-asset-source-compartment-request.d.ts +49 -0
- package/lib/request/change-asset-source-compartment-request.js +15 -0
- package/lib/request/change-asset-source-compartment-request.js.map +1 -0
- package/lib/request/change-asset-tags-request.d.ts +49 -0
- package/lib/request/change-asset-tags-request.js +15 -0
- package/lib/request/change-asset-tags-request.js.map +1 -0
- package/lib/request/change-discovery-schedule-compartment-request.d.ts +49 -0
- package/lib/request/change-discovery-schedule-compartment-request.js +15 -0
- package/lib/request/change-discovery-schedule-compartment-request.js.map +1 -0
- package/lib/request/change-environment-compartment-request.d.ts +49 -0
- package/lib/request/change-environment-compartment-request.js +15 -0
- package/lib/request/change-environment-compartment-request.js.map +1 -0
- package/lib/request/create-agent-dependency-request.d.ts +36 -0
- package/lib/request/create-agent-dependency-request.js +15 -0
- package/lib/request/create-agent-dependency-request.js.map +1 -0
- package/lib/request/create-agent-request.d.ts +36 -0
- package/lib/request/create-agent-request.js +15 -0
- package/lib/request/create-agent-request.js.map +1 -0
- package/lib/request/create-asset-request.d.ts +36 -0
- package/lib/request/create-asset-request.js +15 -0
- package/lib/request/create-asset-request.js.map +1 -0
- package/lib/request/create-asset-source-request.d.ts +36 -0
- package/lib/request/create-asset-source-request.js +15 -0
- package/lib/request/create-asset-source-request.js.map +1 -0
- package/lib/request/create-discovery-schedule-request.d.ts +36 -0
- package/lib/request/create-discovery-schedule-request.js +15 -0
- package/lib/request/create-discovery-schedule-request.js.map +1 -0
- package/lib/request/create-environment-request.d.ts +36 -0
- package/lib/request/create-environment-request.js +15 -0
- package/lib/request/create-environment-request.js.map +1 -0
- package/lib/request/create-inventory-request.d.ts +36 -0
- package/lib/request/create-inventory-request.js +15 -0
- package/lib/request/create-inventory-request.js.map +1 -0
- package/lib/request/delete-agent-dependency-request.d.ts +35 -0
- package/lib/request/delete-agent-dependency-request.js +15 -0
- package/lib/request/delete-agent-dependency-request.js.map +1 -0
- package/lib/request/delete-agent-request.d.ts +44 -0
- package/lib/request/delete-agent-request.js +15 -0
- package/lib/request/delete-agent-request.js.map +1 -0
- package/lib/request/delete-asset-request.d.ts +35 -0
- package/lib/request/delete-asset-request.js +15 -0
- package/lib/request/delete-asset-request.js.map +1 -0
- package/lib/request/delete-asset-source-request.d.ts +35 -0
- package/lib/request/delete-asset-source-request.js +15 -0
- package/lib/request/delete-asset-source-request.js.map +1 -0
- package/lib/request/delete-discovery-schedule-request.d.ts +35 -0
- package/lib/request/delete-discovery-schedule-request.js +15 -0
- package/lib/request/delete-discovery-schedule-request.js.map +1 -0
- package/lib/request/delete-environment-request.d.ts +35 -0
- package/lib/request/delete-environment-request.js +15 -0
- package/lib/request/delete-environment-request.js.map +1 -0
- package/lib/request/delete-inventory-request.d.ts +35 -0
- package/lib/request/delete-inventory-request.js +15 -0
- package/lib/request/delete-inventory-request.js.map +1 -0
- package/lib/request/get-agent-dependency-request.d.ts +26 -0
- package/lib/request/get-agent-dependency-request.js +15 -0
- package/lib/request/get-agent-dependency-request.js.map +1 -0
- package/lib/request/get-agent-request.d.ts +26 -0
- package/lib/request/get-agent-request.js +15 -0
- package/lib/request/get-agent-request.js.map +1 -0
- package/lib/request/get-asset-request.d.ts +26 -0
- package/lib/request/get-asset-request.js +15 -0
- package/lib/request/get-asset-request.js.map +1 -0
- package/lib/request/get-asset-source-request.d.ts +26 -0
- package/lib/request/get-asset-source-request.js +15 -0
- package/lib/request/get-asset-source-request.js.map +1 -0
- package/lib/request/get-discovery-schedule-request.d.ts +26 -0
- package/lib/request/get-discovery-schedule-request.js +15 -0
- package/lib/request/get-discovery-schedule-request.js.map +1 -0
- package/lib/request/get-environment-request.d.ts +26 -0
- package/lib/request/get-environment-request.js +15 -0
- package/lib/request/get-environment-request.js.map +1 -0
- package/lib/request/get-inventory-request.d.ts +26 -0
- package/lib/request/get-inventory-request.js +15 -0
- package/lib/request/get-inventory-request.js.map +1 -0
- package/lib/request/get-plugin-request.d.ts +30 -0
- package/lib/request/get-plugin-request.js +15 -0
- package/lib/request/get-plugin-request.js.map +1 -0
- package/lib/request/get-work-request-request.d.ts +26 -0
- package/lib/request/get-work-request-request.js +15 -0
- package/lib/request/get-work-request-request.js.map +1 -0
- package/lib/request/import-inventory-request.d.ts +40 -0
- package/lib/request/import-inventory-request.js +15 -0
- package/lib/request/import-inventory-request.js.map +1 -0
- package/lib/request/index.d.ts +128 -0
- package/lib/request/index.js +59 -0
- package/lib/request/index.js.map +1 -0
- package/lib/request/list-agent-dependencies-request.d.ts +67 -0
- package/lib/request/list-agent-dependencies-request.js +25 -0
- package/lib/request/list-agent-dependencies-request.js.map +1 -0
- package/lib/request/list-agents-request.d.ts +67 -0
- package/lib/request/list-agents-request.js +25 -0
- package/lib/request/list-agents-request.js.map +1 -0
- package/lib/request/list-appliance-images-request.d.ts +55 -0
- package/lib/request/list-appliance-images-request.js +25 -0
- package/lib/request/list-appliance-images-request.js.map +1 -0
- package/lib/request/list-asset-source-connections-request.d.ts +34 -0
- package/lib/request/list-asset-source-connections-request.js +15 -0
- package/lib/request/list-asset-source-connections-request.js.map +1 -0
- package/lib/request/list-asset-sources-request.d.ts +62 -0
- package/lib/request/list-asset-sources-request.js +24 -0
- package/lib/request/list-asset-sources-request.js.map +1 -0
- package/lib/request/list-assets-request.d.ts +79 -0
- package/lib/request/list-assets-request.js +25 -0
- package/lib/request/list-assets-request.js.map +1 -0
- package/lib/request/list-discovery-schedules-request.d.ts +62 -0
- package/lib/request/list-discovery-schedules-request.js +24 -0
- package/lib/request/list-discovery-schedules-request.js.map +1 -0
- package/lib/request/list-environments-request.d.ts +63 -0
- package/lib/request/list-environments-request.js +25 -0
- package/lib/request/list-environments-request.js.map +1 -0
- package/lib/request/list-historical-metrics-request.d.ts +51 -0
- package/lib/request/list-historical-metrics-request.js +25 -0
- package/lib/request/list-historical-metrics-request.js.map +1 -0
- package/lib/request/list-inventories-request.d.ts +55 -0
- package/lib/request/list-inventories-request.js +25 -0
- package/lib/request/list-inventories-request.js.map +1 -0
- package/lib/request/list-work-request-errors-request.d.ts +49 -0
- package/lib/request/list-work-request-errors-request.js +23 -0
- package/lib/request/list-work-request-errors-request.js.map +1 -0
- package/lib/request/list-work-request-logs-request.d.ts +49 -0
- package/lib/request/list-work-request-logs-request.js +23 -0
- package/lib/request/list-work-request-logs-request.js.map +1 -0
- package/lib/request/list-work-requests-request.d.ts +61 -0
- package/lib/request/list-work-requests-request.js +23 -0
- package/lib/request/list-work-requests-request.js.map +1 -0
- package/lib/request/refresh-asset-source-request.d.ts +35 -0
- package/lib/request/refresh-asset-source-request.js +15 -0
- package/lib/request/refresh-asset-source-request.js.map +1 -0
- package/lib/request/remove-agent-dependency-request.d.ts +49 -0
- package/lib/request/remove-agent-dependency-request.js +15 -0
- package/lib/request/remove-agent-dependency-request.js.map +1 -0
- package/lib/request/submit-historical-metrics-request.d.ts +40 -0
- package/lib/request/submit-historical-metrics-request.js +15 -0
- package/lib/request/submit-historical-metrics-request.js.map +1 -0
- package/lib/request/update-agent-dependency-request.d.ts +49 -0
- package/lib/request/update-agent-dependency-request.js +15 -0
- package/lib/request/update-agent-dependency-request.js.map +1 -0
- package/lib/request/update-agent-request.d.ts +49 -0
- package/lib/request/update-agent-request.js +15 -0
- package/lib/request/update-agent-request.js.map +1 -0
- package/lib/request/update-asset-request.d.ts +40 -0
- package/lib/request/update-asset-request.js +15 -0
- package/lib/request/update-asset-request.js.map +1 -0
- package/lib/request/update-asset-source-request.d.ts +40 -0
- package/lib/request/update-asset-source-request.js +15 -0
- package/lib/request/update-asset-source-request.js.map +1 -0
- package/lib/request/update-discovery-schedule-request.d.ts +40 -0
- package/lib/request/update-discovery-schedule-request.js +15 -0
- package/lib/request/update-discovery-schedule-request.js.map +1 -0
- package/lib/request/update-environment-request.d.ts +49 -0
- package/lib/request/update-environment-request.js +15 -0
- package/lib/request/update-environment-request.js.map +1 -0
- package/lib/request/update-inventory-request.d.ts +40 -0
- package/lib/request/update-inventory-request.js +15 -0
- package/lib/request/update-inventory-request.js.map +1 -0
- package/lib/request/update-plugin-request.d.ts +44 -0
- package/lib/request/update-plugin-request.js +15 -0
- package/lib/request/update-plugin-request.js.map +1 -0
- package/lib/response/add-agent-dependency-response.d.ts +30 -0
- package/lib/response/add-agent-dependency-response.js +15 -0
- package/lib/response/add-agent-dependency-response.js.map +1 -0
- package/lib/response/analyze-assets-response.d.ts +32 -0
- package/lib/response/analyze-assets-response.js +15 -0
- package/lib/response/analyze-assets-response.js.map +1 -0
- package/lib/response/cancel-work-request-response.d.ts +20 -0
- package/lib/response/cancel-work-request-response.js +15 -0
- package/lib/response/cancel-work-request-response.js.map +1 -0
- package/lib/response/change-agent-compartment-response.d.ts +25 -0
- package/lib/response/change-agent-compartment-response.js +15 -0
- package/lib/response/change-agent-compartment-response.js.map +1 -0
- package/lib/response/change-agent-dependency-compartment-response.d.ts +20 -0
- package/lib/response/change-agent-dependency-compartment-response.js +15 -0
- package/lib/response/change-agent-dependency-compartment-response.js.map +1 -0
- package/lib/response/change-asset-compartment-response.d.ts +20 -0
- package/lib/response/change-asset-compartment-response.js +15 -0
- package/lib/response/change-asset-compartment-response.js.map +1 -0
- package/lib/response/change-asset-source-compartment-response.d.ts +20 -0
- package/lib/response/change-asset-source-compartment-response.js +15 -0
- package/lib/response/change-asset-source-compartment-response.js.map +1 -0
- package/lib/response/change-asset-tags-response.d.ts +30 -0
- package/lib/response/change-asset-tags-response.js +15 -0
- package/lib/response/change-asset-tags-response.js.map +1 -0
- package/lib/response/change-discovery-schedule-compartment-response.d.ts +20 -0
- package/lib/response/change-discovery-schedule-compartment-response.js +15 -0
- package/lib/response/change-discovery-schedule-compartment-response.js.map +1 -0
- package/lib/response/change-environment-compartment-response.d.ts +25 -0
- package/lib/response/change-environment-compartment-response.js +15 -0
- package/lib/response/change-environment-compartment-response.js.map +1 -0
- package/lib/response/create-agent-dependency-response.d.ts +34 -0
- package/lib/response/create-agent-dependency-response.js +15 -0
- package/lib/response/create-agent-dependency-response.js.map +1 -0
- package/lib/response/create-agent-response.d.ts +30 -0
- package/lib/response/create-agent-response.js +15 -0
- package/lib/response/create-agent-response.js.map +1 -0
- package/lib/response/create-asset-response.d.ts +30 -0
- package/lib/response/create-asset-response.js +15 -0
- package/lib/response/create-asset-response.js.map +1 -0
- package/lib/response/create-asset-source-response.d.ts +39 -0
- package/lib/response/create-asset-source-response.js +15 -0
- package/lib/response/create-asset-source-response.js.map +1 -0
- package/lib/response/create-discovery-schedule-response.d.ts +30 -0
- package/lib/response/create-discovery-schedule-response.js +15 -0
- package/lib/response/create-discovery-schedule-response.js.map +1 -0
- package/lib/response/create-environment-response.d.ts +30 -0
- package/lib/response/create-environment-response.js +15 -0
- package/lib/response/create-environment-response.js.map +1 -0
- package/lib/response/create-inventory-response.d.ts +25 -0
- package/lib/response/create-inventory-response.js +15 -0
- package/lib/response/create-inventory-response.js.map +1 -0
- package/lib/response/delete-agent-dependency-response.d.ts +20 -0
- package/lib/response/delete-agent-dependency-response.js +15 -0
- package/lib/response/delete-agent-dependency-response.js.map +1 -0
- package/lib/response/delete-agent-response.d.ts +20 -0
- package/lib/response/delete-agent-response.js +15 -0
- package/lib/response/delete-agent-response.js.map +1 -0
- package/lib/response/delete-asset-response.d.ts +20 -0
- package/lib/response/delete-asset-response.js +15 -0
- package/lib/response/delete-asset-response.js.map +1 -0
- package/lib/response/delete-asset-source-response.d.ts +25 -0
- package/lib/response/delete-asset-source-response.js +15 -0
- package/lib/response/delete-asset-source-response.js.map +1 -0
- package/lib/response/delete-discovery-schedule-response.d.ts +20 -0
- package/lib/response/delete-discovery-schedule-response.js +15 -0
- package/lib/response/delete-discovery-schedule-response.js.map +1 -0
- package/lib/response/delete-environment-response.d.ts +20 -0
- package/lib/response/delete-environment-response.js +15 -0
- package/lib/response/delete-environment-response.js.map +1 -0
- package/lib/response/delete-inventory-response.d.ts +25 -0
- package/lib/response/delete-inventory-response.js +15 -0
- package/lib/response/delete-inventory-response.js.map +1 -0
- package/lib/response/get-agent-dependency-response.d.ts +30 -0
- package/lib/response/get-agent-dependency-response.js +15 -0
- package/lib/response/get-agent-dependency-response.js.map +1 -0
- package/lib/response/get-agent-response.d.ts +30 -0
- package/lib/response/get-agent-response.js +15 -0
- package/lib/response/get-agent-response.js.map +1 -0
- package/lib/response/get-asset-response.d.ts +30 -0
- package/lib/response/get-asset-response.js +15 -0
- package/lib/response/get-asset-response.js.map +1 -0
- package/lib/response/get-asset-source-response.d.ts +30 -0
- package/lib/response/get-asset-source-response.js +15 -0
- package/lib/response/get-asset-source-response.js.map +1 -0
- package/lib/response/get-discovery-schedule-response.d.ts +30 -0
- package/lib/response/get-discovery-schedule-response.js +15 -0
- package/lib/response/get-discovery-schedule-response.js.map +1 -0
- package/lib/response/get-environment-response.d.ts +30 -0
- package/lib/response/get-environment-response.js +15 -0
- package/lib/response/get-environment-response.js.map +1 -0
- package/lib/response/get-inventory-response.d.ts +35 -0
- package/lib/response/get-inventory-response.js +15 -0
- package/lib/response/get-inventory-response.js.map +1 -0
- package/lib/response/get-plugin-response.d.ts +30 -0
- package/lib/response/get-plugin-response.js +15 -0
- package/lib/response/get-plugin-response.js.map +1 -0
- package/lib/response/get-work-request-response.d.ts +34 -0
- package/lib/response/get-work-request-response.js +15 -0
- package/lib/response/get-work-request-response.js.map +1 -0
- package/lib/response/import-inventory-response.d.ts +25 -0
- package/lib/response/import-inventory-response.js +15 -0
- package/lib/response/import-inventory-response.js.map +1 -0
- package/lib/response/index.d.ts +128 -0
- package/lib/response/index.js +15 -0
- package/lib/response/index.js.map +1 -0
- package/lib/response/list-agent-dependencies-response.d.ts +32 -0
- package/lib/response/list-agent-dependencies-response.js +15 -0
- package/lib/response/list-agent-dependencies-response.js.map +1 -0
- package/lib/response/list-agents-response.d.ts +32 -0
- package/lib/response/list-agents-response.js +15 -0
- package/lib/response/list-agents-response.js.map +1 -0
- package/lib/response/list-appliance-images-response.d.ts +32 -0
- package/lib/response/list-appliance-images-response.js +15 -0
- package/lib/response/list-appliance-images-response.js.map +1 -0
- package/lib/response/list-asset-source-connections-response.d.ts +32 -0
- package/lib/response/list-asset-source-connections-response.js +15 -0
- package/lib/response/list-asset-source-connections-response.js.map +1 -0
- package/lib/response/list-asset-sources-response.d.ts +32 -0
- package/lib/response/list-asset-sources-response.js +15 -0
- package/lib/response/list-asset-sources-response.js.map +1 -0
- package/lib/response/list-assets-response.d.ts +32 -0
- package/lib/response/list-assets-response.js +15 -0
- package/lib/response/list-assets-response.js.map +1 -0
- package/lib/response/list-discovery-schedules-response.d.ts +32 -0
- package/lib/response/list-discovery-schedules-response.js +15 -0
- package/lib/response/list-discovery-schedules-response.js.map +1 -0
- package/lib/response/list-environments-response.d.ts +32 -0
- package/lib/response/list-environments-response.js +15 -0
- package/lib/response/list-environments-response.js.map +1 -0
- package/lib/response/list-historical-metrics-response.d.ts +32 -0
- package/lib/response/list-historical-metrics-response.js +15 -0
- package/lib/response/list-historical-metrics-response.js.map +1 -0
- package/lib/response/list-inventories-response.d.ts +32 -0
- package/lib/response/list-inventories-response.js +15 -0
- package/lib/response/list-inventories-response.js.map +1 -0
- package/lib/response/list-work-request-errors-response.d.ts +32 -0
- package/lib/response/list-work-request-errors-response.js +15 -0
- package/lib/response/list-work-request-errors-response.js.map +1 -0
- package/lib/response/list-work-request-logs-response.d.ts +32 -0
- package/lib/response/list-work-request-logs-response.js +15 -0
- package/lib/response/list-work-request-logs-response.js.map +1 -0
- package/lib/response/list-work-requests-response.d.ts +32 -0
- package/lib/response/list-work-requests-response.js +15 -0
- package/lib/response/list-work-requests-response.js.map +1 -0
- package/lib/response/refresh-asset-source-response.d.ts +25 -0
- package/lib/response/refresh-asset-source-response.js +15 -0
- package/lib/response/refresh-asset-source-response.js.map +1 -0
- package/lib/response/remove-agent-dependency-response.d.ts +30 -0
- package/lib/response/remove-agent-dependency-response.js +15 -0
- package/lib/response/remove-agent-dependency-response.js.map +1 -0
- package/lib/response/submit-historical-metrics-response.d.ts +30 -0
- package/lib/response/submit-historical-metrics-response.js +15 -0
- package/lib/response/submit-historical-metrics-response.js.map +1 -0
- package/lib/response/update-agent-dependency-response.d.ts +25 -0
- package/lib/response/update-agent-dependency-response.js +15 -0
- package/lib/response/update-agent-dependency-response.js.map +1 -0
- package/lib/response/update-agent-response.d.ts +30 -0
- package/lib/response/update-agent-response.js +15 -0
- package/lib/response/update-agent-response.js.map +1 -0
- package/lib/response/update-asset-response.d.ts +30 -0
- package/lib/response/update-asset-response.js +15 -0
- package/lib/response/update-asset-response.js.map +1 -0
- package/lib/response/update-asset-source-response.d.ts +25 -0
- package/lib/response/update-asset-source-response.js +15 -0
- package/lib/response/update-asset-source-response.js.map +1 -0
- package/lib/response/update-discovery-schedule-response.d.ts +30 -0
- package/lib/response/update-discovery-schedule-response.js +15 -0
- package/lib/response/update-discovery-schedule-response.js.map +1 -0
- package/lib/response/update-environment-response.d.ts +30 -0
- package/lib/response/update-environment-response.js +15 -0
- package/lib/response/update-environment-response.js.map +1 -0
- package/lib/response/update-inventory-response.d.ts +30 -0
- package/lib/response/update-inventory-response.js +15 -0
- package/lib/response/update-inventory-response.js.map +1 -0
- package/lib/response/update-plugin-response.d.ts +30 -0
- package/lib/response/update-plugin-response.js +15 -0
- package/lib/response/update-plugin-response.js.map +1 -0
- package/package.json +29 -0
package/lib/client.js
ADDED
|
@@ -0,0 +1,4202 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Oracle Cloud Bridge API
|
|
4
|
+
* API for Oracle Cloud Bridge service.
|
|
5
|
+
* OpenAPI spec version: 20220509
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OracleSDKGenerator.
|
|
9
|
+
* Do not edit the class manually.
|
|
10
|
+
*
|
|
11
|
+
* Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
|
|
12
|
+
* This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
|
|
13
|
+
*/
|
|
14
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
15
|
+
if (k2 === undefined) k2 = k;
|
|
16
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
17
|
+
}) : (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
o[k2] = m[k];
|
|
20
|
+
}));
|
|
21
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
22
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
23
|
+
}) : function(o, v) {
|
|
24
|
+
o["default"] = v;
|
|
25
|
+
});
|
|
26
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
27
|
+
if (mod && mod.__esModule) return mod;
|
|
28
|
+
var result = {};
|
|
29
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
30
|
+
__setModuleDefault(result, mod);
|
|
31
|
+
return result;
|
|
32
|
+
};
|
|
33
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
34
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
35
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
36
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
37
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
38
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
39
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
43
|
+
exports.OcbAgentSvcClient = exports.OcbAgentSvcApiKeys = exports.InventoryClient = exports.InventoryApiKeys = exports.DiscoveryClient = exports.DiscoveryApiKeys = exports.CommonClient = exports.CommonApiKeys = void 0;
|
|
44
|
+
const common = require("oci-common");
|
|
45
|
+
const model = __importStar(require("./model"));
|
|
46
|
+
const common_waiter_1 = require("./common-waiter");
|
|
47
|
+
const discovery_waiter_1 = require("./discovery-waiter");
|
|
48
|
+
const inventory_waiter_1 = require("./inventory-waiter");
|
|
49
|
+
const ocbagentsvc_waiter_1 = require("./ocbagentsvc-waiter");
|
|
50
|
+
const oci_common_1 = require("oci-common");
|
|
51
|
+
// ===============================================
|
|
52
|
+
// This file is autogenerated - Please do not edit
|
|
53
|
+
// ===============================================
|
|
54
|
+
var CommonApiKeys;
|
|
55
|
+
(function (CommonApiKeys) {
|
|
56
|
+
})(CommonApiKeys = exports.CommonApiKeys || (exports.CommonApiKeys = {}));
|
|
57
|
+
/**
|
|
58
|
+
* This service client uses {@link common.CircuitBreaker.DefaultConfiguration} for all the operations by default if no circuit breaker configuration is defined by the user.
|
|
59
|
+
*/
|
|
60
|
+
class CommonClient {
|
|
61
|
+
constructor(params, clientConfiguration) {
|
|
62
|
+
this["_endpoint"] = "";
|
|
63
|
+
this["_defaultHeaders"] = {};
|
|
64
|
+
this._circuitBreaker = null;
|
|
65
|
+
this._httpOptions = undefined;
|
|
66
|
+
this.targetService = "Common";
|
|
67
|
+
const requestSigner = params.authenticationDetailsProvider
|
|
68
|
+
? new common.DefaultRequestSigner(params.authenticationDetailsProvider)
|
|
69
|
+
: null;
|
|
70
|
+
if (clientConfiguration) {
|
|
71
|
+
this._clientConfiguration = clientConfiguration;
|
|
72
|
+
this._circuitBreaker = clientConfiguration.circuitBreaker
|
|
73
|
+
? clientConfiguration.circuitBreaker.circuit
|
|
74
|
+
: null;
|
|
75
|
+
this._httpOptions = clientConfiguration.httpOptions
|
|
76
|
+
? clientConfiguration.httpOptions
|
|
77
|
+
: undefined;
|
|
78
|
+
}
|
|
79
|
+
// if circuit breaker is not created, check if circuit breaker system is enabled to use default circuit breaker
|
|
80
|
+
const specCircuitBreakerEnabled = true;
|
|
81
|
+
if (!this._circuitBreaker &&
|
|
82
|
+
common.utils.isCircuitBreakerSystemEnabled(clientConfiguration) &&
|
|
83
|
+
(specCircuitBreakerEnabled || common.CircuitBreaker.DefaultCircuitBreakerOverriden)) {
|
|
84
|
+
this._circuitBreaker = new common.CircuitBreaker().circuit;
|
|
85
|
+
}
|
|
86
|
+
this._httpClient =
|
|
87
|
+
params.httpClient ||
|
|
88
|
+
new common.FetchHttpClient(requestSigner, this._circuitBreaker, this._httpOptions);
|
|
89
|
+
if (params.authenticationDetailsProvider &&
|
|
90
|
+
common.isRegionProvider(params.authenticationDetailsProvider)) {
|
|
91
|
+
const provider = params.authenticationDetailsProvider;
|
|
92
|
+
if (provider.getRegion()) {
|
|
93
|
+
this.region = provider.getRegion();
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Get the endpoint that is being used to call (ex, https://www.example.com).
|
|
99
|
+
*/
|
|
100
|
+
get endpoint() {
|
|
101
|
+
return this._endpoint;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Sets the endpoint to call (ex, https://www.example.com).
|
|
105
|
+
* @param endpoint The endpoint of the service.
|
|
106
|
+
*/
|
|
107
|
+
set endpoint(endpoint) {
|
|
108
|
+
this._endpoint = endpoint;
|
|
109
|
+
this._endpoint = this._endpoint + "/20220509";
|
|
110
|
+
if (this.logger)
|
|
111
|
+
this.logger.info(`CommonClient endpoint set to ${this._endpoint}`);
|
|
112
|
+
}
|
|
113
|
+
get logger() {
|
|
114
|
+
return common.LOG.logger;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Sets the region to call (ex, Region.US_PHOENIX_1).
|
|
118
|
+
* Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.
|
|
119
|
+
* @param region The region of the service.
|
|
120
|
+
*/
|
|
121
|
+
set region(region) {
|
|
122
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegion(CommonClient.serviceEndpointTemplate, region, CommonClient.endpointServiceName);
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Sets the regionId to call (ex, 'us-phoenix-1').
|
|
126
|
+
*
|
|
127
|
+
* Note, this will first try to map the region ID to a known Region and call {@link #region(Region) region}.
|
|
128
|
+
* If no known Region could be determined, it will create an endpoint assuming its in default Realm OC1
|
|
129
|
+
* and then call {@link #endpoint(String) endpoint}.
|
|
130
|
+
* @param regionId The public region ID.
|
|
131
|
+
*/
|
|
132
|
+
set regionId(regionId) {
|
|
133
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(CommonClient.serviceEndpointTemplate, regionId, CommonClient.endpointServiceName);
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Creates a new CommonWaiter for resources for this service.
|
|
137
|
+
*
|
|
138
|
+
* @param config The waiter configuration for termination and delay strategy
|
|
139
|
+
* @return The service waiters.
|
|
140
|
+
*/
|
|
141
|
+
createWaiters(config) {
|
|
142
|
+
this._waiters = new common_waiter_1.CommonWaiter(this, config);
|
|
143
|
+
return this._waiters;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Gets the waiters available for resources for this service.
|
|
147
|
+
*
|
|
148
|
+
* @return The service waiters.
|
|
149
|
+
*/
|
|
150
|
+
getWaiters() {
|
|
151
|
+
if (this._waiters) {
|
|
152
|
+
return this._waiters;
|
|
153
|
+
}
|
|
154
|
+
throw Error("Waiters do not exist. Please create waiters.");
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Cancels the work request with the given ID.
|
|
158
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
159
|
+
* @param CancelWorkRequestRequest
|
|
160
|
+
* @return CancelWorkRequestResponse
|
|
161
|
+
* @throws OciError when an error occurs
|
|
162
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/CancelWorkRequest.ts.html |here} to see how to use CancelWorkRequest API.
|
|
163
|
+
*/
|
|
164
|
+
cancelWorkRequest(cancelWorkRequestRequest) {
|
|
165
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
166
|
+
if (this.logger)
|
|
167
|
+
this.logger.debug("Calling operation CommonClient#cancelWorkRequest.");
|
|
168
|
+
const operationName = "cancelWorkRequest";
|
|
169
|
+
const apiReferenceLink = "";
|
|
170
|
+
const pathParams = {
|
|
171
|
+
"{workRequestId}": cancelWorkRequestRequest.workRequestId
|
|
172
|
+
};
|
|
173
|
+
const queryParams = {};
|
|
174
|
+
let headerParams = {
|
|
175
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
176
|
+
"if-match": cancelWorkRequestRequest.ifMatch,
|
|
177
|
+
"opc-request-id": cancelWorkRequestRequest.opcRequestId
|
|
178
|
+
};
|
|
179
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
180
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, cancelWorkRequestRequest.retryConfiguration, specRetryConfiguration);
|
|
181
|
+
if (this.logger)
|
|
182
|
+
retrier.logger = this.logger;
|
|
183
|
+
const request = yield oci_common_1.composeRequest({
|
|
184
|
+
baseEndpoint: this._endpoint,
|
|
185
|
+
defaultHeaders: this._defaultHeaders,
|
|
186
|
+
path: "/workRequests/{workRequestId}",
|
|
187
|
+
method: "DELETE",
|
|
188
|
+
pathParams: pathParams,
|
|
189
|
+
headerParams: headerParams,
|
|
190
|
+
queryParams: queryParams
|
|
191
|
+
});
|
|
192
|
+
try {
|
|
193
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
194
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
195
|
+
responseObject: {},
|
|
196
|
+
responseHeaders: [
|
|
197
|
+
{
|
|
198
|
+
value: response.headers.get("opc-request-id"),
|
|
199
|
+
key: "opcRequestId",
|
|
200
|
+
dataType: "string"
|
|
201
|
+
}
|
|
202
|
+
]
|
|
203
|
+
});
|
|
204
|
+
return sdkResponse;
|
|
205
|
+
}
|
|
206
|
+
catch (err) {
|
|
207
|
+
throw err;
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Gets details of the work request with the given ID.
|
|
213
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
214
|
+
* @param GetWorkRequestRequest
|
|
215
|
+
* @return GetWorkRequestResponse
|
|
216
|
+
* @throws OciError when an error occurs
|
|
217
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/GetWorkRequest.ts.html |here} to see how to use GetWorkRequest API.
|
|
218
|
+
*/
|
|
219
|
+
getWorkRequest(getWorkRequestRequest) {
|
|
220
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
221
|
+
if (this.logger)
|
|
222
|
+
this.logger.debug("Calling operation CommonClient#getWorkRequest.");
|
|
223
|
+
const operationName = "getWorkRequest";
|
|
224
|
+
const apiReferenceLink = "";
|
|
225
|
+
const pathParams = {
|
|
226
|
+
"{workRequestId}": getWorkRequestRequest.workRequestId
|
|
227
|
+
};
|
|
228
|
+
const queryParams = {};
|
|
229
|
+
let headerParams = {
|
|
230
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
231
|
+
"opc-request-id": getWorkRequestRequest.opcRequestId
|
|
232
|
+
};
|
|
233
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
234
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getWorkRequestRequest.retryConfiguration, specRetryConfiguration);
|
|
235
|
+
if (this.logger)
|
|
236
|
+
retrier.logger = this.logger;
|
|
237
|
+
const request = yield oci_common_1.composeRequest({
|
|
238
|
+
baseEndpoint: this._endpoint,
|
|
239
|
+
defaultHeaders: this._defaultHeaders,
|
|
240
|
+
path: "/workRequests/{workRequestId}",
|
|
241
|
+
method: "GET",
|
|
242
|
+
pathParams: pathParams,
|
|
243
|
+
headerParams: headerParams,
|
|
244
|
+
queryParams: queryParams
|
|
245
|
+
});
|
|
246
|
+
try {
|
|
247
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
248
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
249
|
+
responseObject: {},
|
|
250
|
+
body: yield response.json(),
|
|
251
|
+
bodyKey: "workRequest",
|
|
252
|
+
bodyModel: model.WorkRequest,
|
|
253
|
+
type: "model.WorkRequest",
|
|
254
|
+
responseHeaders: [
|
|
255
|
+
{
|
|
256
|
+
value: response.headers.get("etag"),
|
|
257
|
+
key: "etag",
|
|
258
|
+
dataType: "string"
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
value: response.headers.get("opc-request-id"),
|
|
262
|
+
key: "opcRequestId",
|
|
263
|
+
dataType: "string"
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
value: response.headers.get("retry-after"),
|
|
267
|
+
key: "retryAfter",
|
|
268
|
+
dataType: "number"
|
|
269
|
+
}
|
|
270
|
+
]
|
|
271
|
+
});
|
|
272
|
+
return sdkResponse;
|
|
273
|
+
}
|
|
274
|
+
catch (err) {
|
|
275
|
+
throw err;
|
|
276
|
+
}
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* Returns a (paginated) list of errors for the work request with the given ID.
|
|
281
|
+
*
|
|
282
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
283
|
+
* @param ListWorkRequestErrorsRequest
|
|
284
|
+
* @return ListWorkRequestErrorsResponse
|
|
285
|
+
* @throws OciError when an error occurs
|
|
286
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/ListWorkRequestErrors.ts.html |here} to see how to use ListWorkRequestErrors API.
|
|
287
|
+
*/
|
|
288
|
+
listWorkRequestErrors(listWorkRequestErrorsRequest) {
|
|
289
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
290
|
+
if (this.logger)
|
|
291
|
+
this.logger.debug("Calling operation CommonClient#listWorkRequestErrors.");
|
|
292
|
+
const operationName = "listWorkRequestErrors";
|
|
293
|
+
const apiReferenceLink = "";
|
|
294
|
+
const pathParams = {
|
|
295
|
+
"{workRequestId}": listWorkRequestErrorsRequest.workRequestId
|
|
296
|
+
};
|
|
297
|
+
const queryParams = {
|
|
298
|
+
"page": listWorkRequestErrorsRequest.page,
|
|
299
|
+
"limit": listWorkRequestErrorsRequest.limit,
|
|
300
|
+
"sortBy": listWorkRequestErrorsRequest.sortBy,
|
|
301
|
+
"sortOrder": listWorkRequestErrorsRequest.sortOrder
|
|
302
|
+
};
|
|
303
|
+
let headerParams = {
|
|
304
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
305
|
+
"opc-request-id": listWorkRequestErrorsRequest.opcRequestId
|
|
306
|
+
};
|
|
307
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
308
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listWorkRequestErrorsRequest.retryConfiguration, specRetryConfiguration);
|
|
309
|
+
if (this.logger)
|
|
310
|
+
retrier.logger = this.logger;
|
|
311
|
+
const request = yield oci_common_1.composeRequest({
|
|
312
|
+
baseEndpoint: this._endpoint,
|
|
313
|
+
defaultHeaders: this._defaultHeaders,
|
|
314
|
+
path: "/workRequests/{workRequestId}/errors",
|
|
315
|
+
method: "GET",
|
|
316
|
+
pathParams: pathParams,
|
|
317
|
+
headerParams: headerParams,
|
|
318
|
+
queryParams: queryParams
|
|
319
|
+
});
|
|
320
|
+
try {
|
|
321
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
322
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
323
|
+
responseObject: {},
|
|
324
|
+
body: yield response.json(),
|
|
325
|
+
bodyKey: "workRequestErrorCollection",
|
|
326
|
+
bodyModel: model.WorkRequestErrorCollection,
|
|
327
|
+
type: "model.WorkRequestErrorCollection",
|
|
328
|
+
responseHeaders: [
|
|
329
|
+
{
|
|
330
|
+
value: response.headers.get("opc-next-page"),
|
|
331
|
+
key: "opcNextPage",
|
|
332
|
+
dataType: "string"
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
value: response.headers.get("opc-request-id"),
|
|
336
|
+
key: "opcRequestId",
|
|
337
|
+
dataType: "string"
|
|
338
|
+
}
|
|
339
|
+
]
|
|
340
|
+
});
|
|
341
|
+
return sdkResponse;
|
|
342
|
+
}
|
|
343
|
+
catch (err) {
|
|
344
|
+
throw err;
|
|
345
|
+
}
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* Returns a (paginated) list of logs for the work request with the given ID.
|
|
350
|
+
*
|
|
351
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
352
|
+
* @param ListWorkRequestLogsRequest
|
|
353
|
+
* @return ListWorkRequestLogsResponse
|
|
354
|
+
* @throws OciError when an error occurs
|
|
355
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/ListWorkRequestLogs.ts.html |here} to see how to use ListWorkRequestLogs API.
|
|
356
|
+
*/
|
|
357
|
+
listWorkRequestLogs(listWorkRequestLogsRequest) {
|
|
358
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
359
|
+
if (this.logger)
|
|
360
|
+
this.logger.debug("Calling operation CommonClient#listWorkRequestLogs.");
|
|
361
|
+
const operationName = "listWorkRequestLogs";
|
|
362
|
+
const apiReferenceLink = "";
|
|
363
|
+
const pathParams = {
|
|
364
|
+
"{workRequestId}": listWorkRequestLogsRequest.workRequestId
|
|
365
|
+
};
|
|
366
|
+
const queryParams = {
|
|
367
|
+
"page": listWorkRequestLogsRequest.page,
|
|
368
|
+
"limit": listWorkRequestLogsRequest.limit,
|
|
369
|
+
"sortBy": listWorkRequestLogsRequest.sortBy,
|
|
370
|
+
"sortOrder": listWorkRequestLogsRequest.sortOrder
|
|
371
|
+
};
|
|
372
|
+
let headerParams = {
|
|
373
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
374
|
+
"opc-request-id": listWorkRequestLogsRequest.opcRequestId
|
|
375
|
+
};
|
|
376
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
377
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listWorkRequestLogsRequest.retryConfiguration, specRetryConfiguration);
|
|
378
|
+
if (this.logger)
|
|
379
|
+
retrier.logger = this.logger;
|
|
380
|
+
const request = yield oci_common_1.composeRequest({
|
|
381
|
+
baseEndpoint: this._endpoint,
|
|
382
|
+
defaultHeaders: this._defaultHeaders,
|
|
383
|
+
path: "/workRequests/{workRequestId}/logs",
|
|
384
|
+
method: "GET",
|
|
385
|
+
pathParams: pathParams,
|
|
386
|
+
headerParams: headerParams,
|
|
387
|
+
queryParams: queryParams
|
|
388
|
+
});
|
|
389
|
+
try {
|
|
390
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
391
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
392
|
+
responseObject: {},
|
|
393
|
+
body: yield response.json(),
|
|
394
|
+
bodyKey: "workRequestLogEntryCollection",
|
|
395
|
+
bodyModel: model.WorkRequestLogEntryCollection,
|
|
396
|
+
type: "model.WorkRequestLogEntryCollection",
|
|
397
|
+
responseHeaders: [
|
|
398
|
+
{
|
|
399
|
+
value: response.headers.get("opc-next-page"),
|
|
400
|
+
key: "opcNextPage",
|
|
401
|
+
dataType: "string"
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
value: response.headers.get("opc-request-id"),
|
|
405
|
+
key: "opcRequestId",
|
|
406
|
+
dataType: "string"
|
|
407
|
+
}
|
|
408
|
+
]
|
|
409
|
+
});
|
|
410
|
+
return sdkResponse;
|
|
411
|
+
}
|
|
412
|
+
catch (err) {
|
|
413
|
+
throw err;
|
|
414
|
+
}
|
|
415
|
+
});
|
|
416
|
+
}
|
|
417
|
+
/**
|
|
418
|
+
* Lists the work requests in a compartment.
|
|
419
|
+
*
|
|
420
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
421
|
+
* @param ListWorkRequestsRequest
|
|
422
|
+
* @return ListWorkRequestsResponse
|
|
423
|
+
* @throws OciError when an error occurs
|
|
424
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/ListWorkRequests.ts.html |here} to see how to use ListWorkRequests API.
|
|
425
|
+
*/
|
|
426
|
+
listWorkRequests(listWorkRequestsRequest) {
|
|
427
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
428
|
+
if (this.logger)
|
|
429
|
+
this.logger.debug("Calling operation CommonClient#listWorkRequests.");
|
|
430
|
+
const operationName = "listWorkRequests";
|
|
431
|
+
const apiReferenceLink = "";
|
|
432
|
+
const pathParams = {};
|
|
433
|
+
const queryParams = {
|
|
434
|
+
"compartmentId": listWorkRequestsRequest.compartmentId,
|
|
435
|
+
"workRequestId": listWorkRequestsRequest.workRequestId,
|
|
436
|
+
"status": listWorkRequestsRequest.status,
|
|
437
|
+
"resourceId": listWorkRequestsRequest.resourceId,
|
|
438
|
+
"page": listWorkRequestsRequest.page,
|
|
439
|
+
"limit": listWorkRequestsRequest.limit,
|
|
440
|
+
"sortOrder": listWorkRequestsRequest.sortOrder,
|
|
441
|
+
"sortBy": listWorkRequestsRequest.sortBy
|
|
442
|
+
};
|
|
443
|
+
let headerParams = {
|
|
444
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
445
|
+
"opc-request-id": listWorkRequestsRequest.opcRequestId
|
|
446
|
+
};
|
|
447
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
448
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listWorkRequestsRequest.retryConfiguration, specRetryConfiguration);
|
|
449
|
+
if (this.logger)
|
|
450
|
+
retrier.logger = this.logger;
|
|
451
|
+
const request = yield oci_common_1.composeRequest({
|
|
452
|
+
baseEndpoint: this._endpoint,
|
|
453
|
+
defaultHeaders: this._defaultHeaders,
|
|
454
|
+
path: "/workRequests",
|
|
455
|
+
method: "GET",
|
|
456
|
+
pathParams: pathParams,
|
|
457
|
+
headerParams: headerParams,
|
|
458
|
+
queryParams: queryParams
|
|
459
|
+
});
|
|
460
|
+
try {
|
|
461
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
462
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
463
|
+
responseObject: {},
|
|
464
|
+
body: yield response.json(),
|
|
465
|
+
bodyKey: "workRequestSummaryCollection",
|
|
466
|
+
bodyModel: model.WorkRequestSummaryCollection,
|
|
467
|
+
type: "model.WorkRequestSummaryCollection",
|
|
468
|
+
responseHeaders: [
|
|
469
|
+
{
|
|
470
|
+
value: response.headers.get("opc-request-id"),
|
|
471
|
+
key: "opcRequestId",
|
|
472
|
+
dataType: "string"
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
value: response.headers.get("opc-next-page"),
|
|
476
|
+
key: "opcNextPage",
|
|
477
|
+
dataType: "string"
|
|
478
|
+
}
|
|
479
|
+
]
|
|
480
|
+
});
|
|
481
|
+
return sdkResponse;
|
|
482
|
+
}
|
|
483
|
+
catch (err) {
|
|
484
|
+
throw err;
|
|
485
|
+
}
|
|
486
|
+
});
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
exports.CommonClient = CommonClient;
|
|
490
|
+
CommonClient.serviceEndpointTemplate = "https://cloudbridge.{region}.oci.{secondLevelDomain}";
|
|
491
|
+
CommonClient.endpointServiceName = "";
|
|
492
|
+
var DiscoveryApiKeys;
|
|
493
|
+
(function (DiscoveryApiKeys) {
|
|
494
|
+
})(DiscoveryApiKeys = exports.DiscoveryApiKeys || (exports.DiscoveryApiKeys = {}));
|
|
495
|
+
/**
|
|
496
|
+
* This service client uses {@link common.CircuitBreaker.DefaultConfiguration} for all the operations by default if no circuit breaker configuration is defined by the user.
|
|
497
|
+
*/
|
|
498
|
+
class DiscoveryClient {
|
|
499
|
+
constructor(params, clientConfiguration) {
|
|
500
|
+
this["_endpoint"] = "";
|
|
501
|
+
this["_defaultHeaders"] = {};
|
|
502
|
+
this._circuitBreaker = null;
|
|
503
|
+
this._httpOptions = undefined;
|
|
504
|
+
this.targetService = "Discovery";
|
|
505
|
+
const requestSigner = params.authenticationDetailsProvider
|
|
506
|
+
? new common.DefaultRequestSigner(params.authenticationDetailsProvider)
|
|
507
|
+
: null;
|
|
508
|
+
if (clientConfiguration) {
|
|
509
|
+
this._clientConfiguration = clientConfiguration;
|
|
510
|
+
this._circuitBreaker = clientConfiguration.circuitBreaker
|
|
511
|
+
? clientConfiguration.circuitBreaker.circuit
|
|
512
|
+
: null;
|
|
513
|
+
this._httpOptions = clientConfiguration.httpOptions
|
|
514
|
+
? clientConfiguration.httpOptions
|
|
515
|
+
: undefined;
|
|
516
|
+
}
|
|
517
|
+
// if circuit breaker is not created, check if circuit breaker system is enabled to use default circuit breaker
|
|
518
|
+
const specCircuitBreakerEnabled = true;
|
|
519
|
+
if (!this._circuitBreaker &&
|
|
520
|
+
common.utils.isCircuitBreakerSystemEnabled(clientConfiguration) &&
|
|
521
|
+
(specCircuitBreakerEnabled || common.CircuitBreaker.DefaultCircuitBreakerOverriden)) {
|
|
522
|
+
this._circuitBreaker = new common.CircuitBreaker().circuit;
|
|
523
|
+
}
|
|
524
|
+
this._httpClient =
|
|
525
|
+
params.httpClient ||
|
|
526
|
+
new common.FetchHttpClient(requestSigner, this._circuitBreaker, this._httpOptions);
|
|
527
|
+
if (params.authenticationDetailsProvider &&
|
|
528
|
+
common.isRegionProvider(params.authenticationDetailsProvider)) {
|
|
529
|
+
const provider = params.authenticationDetailsProvider;
|
|
530
|
+
if (provider.getRegion()) {
|
|
531
|
+
this.region = provider.getRegion();
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
/**
|
|
536
|
+
* Get the endpoint that is being used to call (ex, https://www.example.com).
|
|
537
|
+
*/
|
|
538
|
+
get endpoint() {
|
|
539
|
+
return this._endpoint;
|
|
540
|
+
}
|
|
541
|
+
/**
|
|
542
|
+
* Sets the endpoint to call (ex, https://www.example.com).
|
|
543
|
+
* @param endpoint The endpoint of the service.
|
|
544
|
+
*/
|
|
545
|
+
set endpoint(endpoint) {
|
|
546
|
+
this._endpoint = endpoint;
|
|
547
|
+
this._endpoint = this._endpoint + "/20220509";
|
|
548
|
+
if (this.logger)
|
|
549
|
+
this.logger.info(`DiscoveryClient endpoint set to ${this._endpoint}`);
|
|
550
|
+
}
|
|
551
|
+
get logger() {
|
|
552
|
+
return common.LOG.logger;
|
|
553
|
+
}
|
|
554
|
+
/**
|
|
555
|
+
* Sets the region to call (ex, Region.US_PHOENIX_1).
|
|
556
|
+
* Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.
|
|
557
|
+
* @param region The region of the service.
|
|
558
|
+
*/
|
|
559
|
+
set region(region) {
|
|
560
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegion(DiscoveryClient.serviceEndpointTemplate, region, DiscoveryClient.endpointServiceName);
|
|
561
|
+
}
|
|
562
|
+
/**
|
|
563
|
+
* Sets the regionId to call (ex, 'us-phoenix-1').
|
|
564
|
+
*
|
|
565
|
+
* Note, this will first try to map the region ID to a known Region and call {@link #region(Region) region}.
|
|
566
|
+
* If no known Region could be determined, it will create an endpoint assuming its in default Realm OC1
|
|
567
|
+
* and then call {@link #endpoint(String) endpoint}.
|
|
568
|
+
* @param regionId The public region ID.
|
|
569
|
+
*/
|
|
570
|
+
set regionId(regionId) {
|
|
571
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(DiscoveryClient.serviceEndpointTemplate, regionId, DiscoveryClient.endpointServiceName);
|
|
572
|
+
}
|
|
573
|
+
/**
|
|
574
|
+
* Creates a new DiscoveryWaiter for resources for this service.
|
|
575
|
+
*
|
|
576
|
+
* @param config The waiter configuration for termination and delay strategy
|
|
577
|
+
* @return The service waiters.
|
|
578
|
+
*/
|
|
579
|
+
createWaiters(config) {
|
|
580
|
+
this._waiters = new discovery_waiter_1.DiscoveryWaiter(this, config);
|
|
581
|
+
return this._waiters;
|
|
582
|
+
}
|
|
583
|
+
/**
|
|
584
|
+
* Gets the waiters available for resources for this service.
|
|
585
|
+
*
|
|
586
|
+
* @return The service waiters.
|
|
587
|
+
*/
|
|
588
|
+
getWaiters() {
|
|
589
|
+
if (this._waiters) {
|
|
590
|
+
return this._waiters;
|
|
591
|
+
}
|
|
592
|
+
throw Error("Waiters do not exist. Please create waiters.");
|
|
593
|
+
}
|
|
594
|
+
/**
|
|
595
|
+
* Moves a resource into a different compartment. When provided, If-Match is checked against ETag values of the resource.
|
|
596
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
597
|
+
* @param ChangeAssetSourceCompartmentRequest
|
|
598
|
+
* @return ChangeAssetSourceCompartmentResponse
|
|
599
|
+
* @throws OciError when an error occurs
|
|
600
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/ChangeAssetSourceCompartment.ts.html |here} to see how to use ChangeAssetSourceCompartment API.
|
|
601
|
+
*/
|
|
602
|
+
changeAssetSourceCompartment(changeAssetSourceCompartmentRequest) {
|
|
603
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
604
|
+
if (this.logger)
|
|
605
|
+
this.logger.debug("Calling operation DiscoveryClient#changeAssetSourceCompartment.");
|
|
606
|
+
const operationName = "changeAssetSourceCompartment";
|
|
607
|
+
const apiReferenceLink = "";
|
|
608
|
+
const pathParams = {
|
|
609
|
+
"{assetSourceId}": changeAssetSourceCompartmentRequest.assetSourceId
|
|
610
|
+
};
|
|
611
|
+
const queryParams = {};
|
|
612
|
+
let headerParams = {
|
|
613
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
614
|
+
"if-match": changeAssetSourceCompartmentRequest.ifMatch,
|
|
615
|
+
"opc-request-id": changeAssetSourceCompartmentRequest.opcRequestId,
|
|
616
|
+
"opc-retry-token": changeAssetSourceCompartmentRequest.opcRetryToken
|
|
617
|
+
};
|
|
618
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
619
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, changeAssetSourceCompartmentRequest.retryConfiguration, specRetryConfiguration);
|
|
620
|
+
if (this.logger)
|
|
621
|
+
retrier.logger = this.logger;
|
|
622
|
+
const request = yield oci_common_1.composeRequest({
|
|
623
|
+
baseEndpoint: this._endpoint,
|
|
624
|
+
defaultHeaders: this._defaultHeaders,
|
|
625
|
+
path: "/assetSources/{assetSourceId}/actions/changeCompartment",
|
|
626
|
+
method: "POST",
|
|
627
|
+
bodyContent: common.ObjectSerializer.serialize(changeAssetSourceCompartmentRequest.changeAssetSourceCompartmentDetails, "ChangeAssetSourceCompartmentDetails", model.ChangeAssetSourceCompartmentDetails.getJsonObj),
|
|
628
|
+
pathParams: pathParams,
|
|
629
|
+
headerParams: headerParams,
|
|
630
|
+
queryParams: queryParams
|
|
631
|
+
});
|
|
632
|
+
try {
|
|
633
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
634
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
635
|
+
responseObject: {},
|
|
636
|
+
responseHeaders: [
|
|
637
|
+
{
|
|
638
|
+
value: response.headers.get("opc-request-id"),
|
|
639
|
+
key: "opcRequestId",
|
|
640
|
+
dataType: "string"
|
|
641
|
+
}
|
|
642
|
+
]
|
|
643
|
+
});
|
|
644
|
+
return sdkResponse;
|
|
645
|
+
}
|
|
646
|
+
catch (err) {
|
|
647
|
+
throw err;
|
|
648
|
+
}
|
|
649
|
+
});
|
|
650
|
+
}
|
|
651
|
+
/**
|
|
652
|
+
* Moves the specified discovery schedule into a different compartment. When provided, If-Match is checked against ETag values of the resource.
|
|
653
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
654
|
+
* @param ChangeDiscoveryScheduleCompartmentRequest
|
|
655
|
+
* @return ChangeDiscoveryScheduleCompartmentResponse
|
|
656
|
+
* @throws OciError when an error occurs
|
|
657
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/ChangeDiscoveryScheduleCompartment.ts.html |here} to see how to use ChangeDiscoveryScheduleCompartment API.
|
|
658
|
+
*/
|
|
659
|
+
changeDiscoveryScheduleCompartment(changeDiscoveryScheduleCompartmentRequest) {
|
|
660
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
661
|
+
if (this.logger)
|
|
662
|
+
this.logger.debug("Calling operation DiscoveryClient#changeDiscoveryScheduleCompartment.");
|
|
663
|
+
const operationName = "changeDiscoveryScheduleCompartment";
|
|
664
|
+
const apiReferenceLink = "";
|
|
665
|
+
const pathParams = {
|
|
666
|
+
"{discoveryScheduleId}": changeDiscoveryScheduleCompartmentRequest.discoveryScheduleId
|
|
667
|
+
};
|
|
668
|
+
const queryParams = {};
|
|
669
|
+
let headerParams = {
|
|
670
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
671
|
+
"if-match": changeDiscoveryScheduleCompartmentRequest.ifMatch,
|
|
672
|
+
"opc-request-id": changeDiscoveryScheduleCompartmentRequest.opcRequestId,
|
|
673
|
+
"opc-retry-token": changeDiscoveryScheduleCompartmentRequest.opcRetryToken
|
|
674
|
+
};
|
|
675
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
676
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, changeDiscoveryScheduleCompartmentRequest.retryConfiguration, specRetryConfiguration);
|
|
677
|
+
if (this.logger)
|
|
678
|
+
retrier.logger = this.logger;
|
|
679
|
+
const request = yield oci_common_1.composeRequest({
|
|
680
|
+
baseEndpoint: this._endpoint,
|
|
681
|
+
defaultHeaders: this._defaultHeaders,
|
|
682
|
+
path: "/discoverySchedules/{discoveryScheduleId}/actions/changeCompartment",
|
|
683
|
+
method: "POST",
|
|
684
|
+
bodyContent: common.ObjectSerializer.serialize(changeDiscoveryScheduleCompartmentRequest.changeDiscoveryScheduleCompartmentDetails, "ChangeDiscoveryScheduleCompartmentDetails", model.ChangeDiscoveryScheduleCompartmentDetails.getJsonObj),
|
|
685
|
+
pathParams: pathParams,
|
|
686
|
+
headerParams: headerParams,
|
|
687
|
+
queryParams: queryParams
|
|
688
|
+
});
|
|
689
|
+
try {
|
|
690
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
691
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
692
|
+
responseObject: {},
|
|
693
|
+
responseHeaders: [
|
|
694
|
+
{
|
|
695
|
+
value: response.headers.get("opc-request-id"),
|
|
696
|
+
key: "opcRequestId",
|
|
697
|
+
dataType: "string"
|
|
698
|
+
}
|
|
699
|
+
]
|
|
700
|
+
});
|
|
701
|
+
return sdkResponse;
|
|
702
|
+
}
|
|
703
|
+
catch (err) {
|
|
704
|
+
throw err;
|
|
705
|
+
}
|
|
706
|
+
});
|
|
707
|
+
}
|
|
708
|
+
/**
|
|
709
|
+
* Creates an asset source.
|
|
710
|
+
*
|
|
711
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
712
|
+
* @param CreateAssetSourceRequest
|
|
713
|
+
* @return CreateAssetSourceResponse
|
|
714
|
+
* @throws OciError when an error occurs
|
|
715
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/CreateAssetSource.ts.html |here} to see how to use CreateAssetSource API.
|
|
716
|
+
*/
|
|
717
|
+
createAssetSource(createAssetSourceRequest) {
|
|
718
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
719
|
+
if (this.logger)
|
|
720
|
+
this.logger.debug("Calling operation DiscoveryClient#createAssetSource.");
|
|
721
|
+
const operationName = "createAssetSource";
|
|
722
|
+
const apiReferenceLink = "";
|
|
723
|
+
const pathParams = {};
|
|
724
|
+
const queryParams = {};
|
|
725
|
+
let headerParams = {
|
|
726
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
727
|
+
"opc-retry-token": createAssetSourceRequest.opcRetryToken,
|
|
728
|
+
"opc-request-id": createAssetSourceRequest.opcRequestId
|
|
729
|
+
};
|
|
730
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
731
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, createAssetSourceRequest.retryConfiguration, specRetryConfiguration);
|
|
732
|
+
if (this.logger)
|
|
733
|
+
retrier.logger = this.logger;
|
|
734
|
+
const request = yield oci_common_1.composeRequest({
|
|
735
|
+
baseEndpoint: this._endpoint,
|
|
736
|
+
defaultHeaders: this._defaultHeaders,
|
|
737
|
+
path: "/assetSources",
|
|
738
|
+
method: "POST",
|
|
739
|
+
bodyContent: common.ObjectSerializer.serialize(createAssetSourceRequest.createAssetSourceDetails, "CreateAssetSourceDetails", model.CreateAssetSourceDetails.getJsonObj),
|
|
740
|
+
pathParams: pathParams,
|
|
741
|
+
headerParams: headerParams,
|
|
742
|
+
queryParams: queryParams
|
|
743
|
+
});
|
|
744
|
+
try {
|
|
745
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
746
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
747
|
+
responseObject: {},
|
|
748
|
+
body: yield response.json(),
|
|
749
|
+
bodyKey: "assetSource",
|
|
750
|
+
bodyModel: model.AssetSource,
|
|
751
|
+
type: "model.AssetSource",
|
|
752
|
+
responseHeaders: [
|
|
753
|
+
{
|
|
754
|
+
value: response.headers.get("etag"),
|
|
755
|
+
key: "etag",
|
|
756
|
+
dataType: "string"
|
|
757
|
+
},
|
|
758
|
+
{
|
|
759
|
+
value: response.headers.get("opc-request-id"),
|
|
760
|
+
key: "opcRequestId",
|
|
761
|
+
dataType: "string"
|
|
762
|
+
},
|
|
763
|
+
{
|
|
764
|
+
value: response.headers.get("opc-work-request-id"),
|
|
765
|
+
key: "opcWorkRequestId",
|
|
766
|
+
dataType: "string"
|
|
767
|
+
},
|
|
768
|
+
{
|
|
769
|
+
value: response.headers.get("Location"),
|
|
770
|
+
key: "location",
|
|
771
|
+
dataType: "string"
|
|
772
|
+
}
|
|
773
|
+
]
|
|
774
|
+
});
|
|
775
|
+
return sdkResponse;
|
|
776
|
+
}
|
|
777
|
+
catch (err) {
|
|
778
|
+
throw err;
|
|
779
|
+
}
|
|
780
|
+
});
|
|
781
|
+
}
|
|
782
|
+
/**
|
|
783
|
+
* Creates the discovery schedule.
|
|
784
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
785
|
+
* @param CreateDiscoveryScheduleRequest
|
|
786
|
+
* @return CreateDiscoveryScheduleResponse
|
|
787
|
+
* @throws OciError when an error occurs
|
|
788
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/CreateDiscoverySchedule.ts.html |here} to see how to use CreateDiscoverySchedule API.
|
|
789
|
+
*/
|
|
790
|
+
createDiscoverySchedule(createDiscoveryScheduleRequest) {
|
|
791
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
792
|
+
if (this.logger)
|
|
793
|
+
this.logger.debug("Calling operation DiscoveryClient#createDiscoverySchedule.");
|
|
794
|
+
const operationName = "createDiscoverySchedule";
|
|
795
|
+
const apiReferenceLink = "";
|
|
796
|
+
const pathParams = {};
|
|
797
|
+
const queryParams = {};
|
|
798
|
+
let headerParams = {
|
|
799
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
800
|
+
"opc-retry-token": createDiscoveryScheduleRequest.opcRetryToken,
|
|
801
|
+
"opc-request-id": createDiscoveryScheduleRequest.opcRequestId
|
|
802
|
+
};
|
|
803
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
804
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, createDiscoveryScheduleRequest.retryConfiguration, specRetryConfiguration);
|
|
805
|
+
if (this.logger)
|
|
806
|
+
retrier.logger = this.logger;
|
|
807
|
+
const request = yield oci_common_1.composeRequest({
|
|
808
|
+
baseEndpoint: this._endpoint,
|
|
809
|
+
defaultHeaders: this._defaultHeaders,
|
|
810
|
+
path: "/discoverySchedules",
|
|
811
|
+
method: "POST",
|
|
812
|
+
bodyContent: common.ObjectSerializer.serialize(createDiscoveryScheduleRequest.createDiscoveryScheduleDetails, "CreateDiscoveryScheduleDetails", model.CreateDiscoveryScheduleDetails.getJsonObj),
|
|
813
|
+
pathParams: pathParams,
|
|
814
|
+
headerParams: headerParams,
|
|
815
|
+
queryParams: queryParams
|
|
816
|
+
});
|
|
817
|
+
try {
|
|
818
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
819
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
820
|
+
responseObject: {},
|
|
821
|
+
body: yield response.json(),
|
|
822
|
+
bodyKey: "discoverySchedule",
|
|
823
|
+
bodyModel: model.DiscoverySchedule,
|
|
824
|
+
type: "model.DiscoverySchedule",
|
|
825
|
+
responseHeaders: [
|
|
826
|
+
{
|
|
827
|
+
value: response.headers.get("etag"),
|
|
828
|
+
key: "etag",
|
|
829
|
+
dataType: "string"
|
|
830
|
+
},
|
|
831
|
+
{
|
|
832
|
+
value: response.headers.get("opc-request-id"),
|
|
833
|
+
key: "opcRequestId",
|
|
834
|
+
dataType: "string"
|
|
835
|
+
}
|
|
836
|
+
]
|
|
837
|
+
});
|
|
838
|
+
return sdkResponse;
|
|
839
|
+
}
|
|
840
|
+
catch (err) {
|
|
841
|
+
throw err;
|
|
842
|
+
}
|
|
843
|
+
});
|
|
844
|
+
}
|
|
845
|
+
/**
|
|
846
|
+
* Deletes the asset source by ID.
|
|
847
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
848
|
+
* @param DeleteAssetSourceRequest
|
|
849
|
+
* @return DeleteAssetSourceResponse
|
|
850
|
+
* @throws OciError when an error occurs
|
|
851
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/DeleteAssetSource.ts.html |here} to see how to use DeleteAssetSource API.
|
|
852
|
+
*/
|
|
853
|
+
deleteAssetSource(deleteAssetSourceRequest) {
|
|
854
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
855
|
+
if (this.logger)
|
|
856
|
+
this.logger.debug("Calling operation DiscoveryClient#deleteAssetSource.");
|
|
857
|
+
const operationName = "deleteAssetSource";
|
|
858
|
+
const apiReferenceLink = "";
|
|
859
|
+
const pathParams = {
|
|
860
|
+
"{assetSourceId}": deleteAssetSourceRequest.assetSourceId
|
|
861
|
+
};
|
|
862
|
+
const queryParams = {};
|
|
863
|
+
let headerParams = {
|
|
864
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
865
|
+
"if-match": deleteAssetSourceRequest.ifMatch,
|
|
866
|
+
"opc-request-id": deleteAssetSourceRequest.opcRequestId
|
|
867
|
+
};
|
|
868
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
869
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, deleteAssetSourceRequest.retryConfiguration, specRetryConfiguration);
|
|
870
|
+
if (this.logger)
|
|
871
|
+
retrier.logger = this.logger;
|
|
872
|
+
const request = yield oci_common_1.composeRequest({
|
|
873
|
+
baseEndpoint: this._endpoint,
|
|
874
|
+
defaultHeaders: this._defaultHeaders,
|
|
875
|
+
path: "/assetSources/{assetSourceId}",
|
|
876
|
+
method: "DELETE",
|
|
877
|
+
pathParams: pathParams,
|
|
878
|
+
headerParams: headerParams,
|
|
879
|
+
queryParams: queryParams
|
|
880
|
+
});
|
|
881
|
+
try {
|
|
882
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
883
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
884
|
+
responseObject: {},
|
|
885
|
+
responseHeaders: [
|
|
886
|
+
{
|
|
887
|
+
value: response.headers.get("opc-request-id"),
|
|
888
|
+
key: "opcRequestId",
|
|
889
|
+
dataType: "string"
|
|
890
|
+
},
|
|
891
|
+
{
|
|
892
|
+
value: response.headers.get("opc-work-request-id"),
|
|
893
|
+
key: "opcWorkRequestId",
|
|
894
|
+
dataType: "string"
|
|
895
|
+
}
|
|
896
|
+
]
|
|
897
|
+
});
|
|
898
|
+
return sdkResponse;
|
|
899
|
+
}
|
|
900
|
+
catch (err) {
|
|
901
|
+
throw err;
|
|
902
|
+
}
|
|
903
|
+
});
|
|
904
|
+
}
|
|
905
|
+
/**
|
|
906
|
+
* Deletes the specified discovery schedule.
|
|
907
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
908
|
+
* @param DeleteDiscoveryScheduleRequest
|
|
909
|
+
* @return DeleteDiscoveryScheduleResponse
|
|
910
|
+
* @throws OciError when an error occurs
|
|
911
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/DeleteDiscoverySchedule.ts.html |here} to see how to use DeleteDiscoverySchedule API.
|
|
912
|
+
*/
|
|
913
|
+
deleteDiscoverySchedule(deleteDiscoveryScheduleRequest) {
|
|
914
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
915
|
+
if (this.logger)
|
|
916
|
+
this.logger.debug("Calling operation DiscoveryClient#deleteDiscoverySchedule.");
|
|
917
|
+
const operationName = "deleteDiscoverySchedule";
|
|
918
|
+
const apiReferenceLink = "";
|
|
919
|
+
const pathParams = {
|
|
920
|
+
"{discoveryScheduleId}": deleteDiscoveryScheduleRequest.discoveryScheduleId
|
|
921
|
+
};
|
|
922
|
+
const queryParams = {};
|
|
923
|
+
let headerParams = {
|
|
924
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
925
|
+
"if-match": deleteDiscoveryScheduleRequest.ifMatch,
|
|
926
|
+
"opc-request-id": deleteDiscoveryScheduleRequest.opcRequestId
|
|
927
|
+
};
|
|
928
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
929
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, deleteDiscoveryScheduleRequest.retryConfiguration, specRetryConfiguration);
|
|
930
|
+
if (this.logger)
|
|
931
|
+
retrier.logger = this.logger;
|
|
932
|
+
const request = yield oci_common_1.composeRequest({
|
|
933
|
+
baseEndpoint: this._endpoint,
|
|
934
|
+
defaultHeaders: this._defaultHeaders,
|
|
935
|
+
path: "/discoverySchedules/{discoveryScheduleId}",
|
|
936
|
+
method: "DELETE",
|
|
937
|
+
pathParams: pathParams,
|
|
938
|
+
headerParams: headerParams,
|
|
939
|
+
queryParams: queryParams
|
|
940
|
+
});
|
|
941
|
+
try {
|
|
942
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
943
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
944
|
+
responseObject: {},
|
|
945
|
+
responseHeaders: [
|
|
946
|
+
{
|
|
947
|
+
value: response.headers.get("opc-request-id"),
|
|
948
|
+
key: "opcRequestId",
|
|
949
|
+
dataType: "string"
|
|
950
|
+
}
|
|
951
|
+
]
|
|
952
|
+
});
|
|
953
|
+
return sdkResponse;
|
|
954
|
+
}
|
|
955
|
+
catch (err) {
|
|
956
|
+
throw err;
|
|
957
|
+
}
|
|
958
|
+
});
|
|
959
|
+
}
|
|
960
|
+
/**
|
|
961
|
+
* Gets the asset source by ID.
|
|
962
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
963
|
+
* @param GetAssetSourceRequest
|
|
964
|
+
* @return GetAssetSourceResponse
|
|
965
|
+
* @throws OciError when an error occurs
|
|
966
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/GetAssetSource.ts.html |here} to see how to use GetAssetSource API.
|
|
967
|
+
*/
|
|
968
|
+
getAssetSource(getAssetSourceRequest) {
|
|
969
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
970
|
+
if (this.logger)
|
|
971
|
+
this.logger.debug("Calling operation DiscoveryClient#getAssetSource.");
|
|
972
|
+
const operationName = "getAssetSource";
|
|
973
|
+
const apiReferenceLink = "";
|
|
974
|
+
const pathParams = {
|
|
975
|
+
"{assetSourceId}": getAssetSourceRequest.assetSourceId
|
|
976
|
+
};
|
|
977
|
+
const queryParams = {};
|
|
978
|
+
let headerParams = {
|
|
979
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
980
|
+
"opc-request-id": getAssetSourceRequest.opcRequestId
|
|
981
|
+
};
|
|
982
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
983
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getAssetSourceRequest.retryConfiguration, specRetryConfiguration);
|
|
984
|
+
if (this.logger)
|
|
985
|
+
retrier.logger = this.logger;
|
|
986
|
+
const request = yield oci_common_1.composeRequest({
|
|
987
|
+
baseEndpoint: this._endpoint,
|
|
988
|
+
defaultHeaders: this._defaultHeaders,
|
|
989
|
+
path: "/assetSources/{assetSourceId}",
|
|
990
|
+
method: "GET",
|
|
991
|
+
pathParams: pathParams,
|
|
992
|
+
headerParams: headerParams,
|
|
993
|
+
queryParams: queryParams
|
|
994
|
+
});
|
|
995
|
+
try {
|
|
996
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
997
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
998
|
+
responseObject: {},
|
|
999
|
+
body: yield response.json(),
|
|
1000
|
+
bodyKey: "assetSource",
|
|
1001
|
+
bodyModel: model.AssetSource,
|
|
1002
|
+
type: "model.AssetSource",
|
|
1003
|
+
responseHeaders: [
|
|
1004
|
+
{
|
|
1005
|
+
value: response.headers.get("etag"),
|
|
1006
|
+
key: "etag",
|
|
1007
|
+
dataType: "string"
|
|
1008
|
+
},
|
|
1009
|
+
{
|
|
1010
|
+
value: response.headers.get("opc-request-id"),
|
|
1011
|
+
key: "opcRequestId",
|
|
1012
|
+
dataType: "string"
|
|
1013
|
+
}
|
|
1014
|
+
]
|
|
1015
|
+
});
|
|
1016
|
+
return sdkResponse;
|
|
1017
|
+
}
|
|
1018
|
+
catch (err) {
|
|
1019
|
+
throw err;
|
|
1020
|
+
}
|
|
1021
|
+
});
|
|
1022
|
+
}
|
|
1023
|
+
/**
|
|
1024
|
+
* Reads information about the specified discovery schedule.
|
|
1025
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
1026
|
+
* @param GetDiscoveryScheduleRequest
|
|
1027
|
+
* @return GetDiscoveryScheduleResponse
|
|
1028
|
+
* @throws OciError when an error occurs
|
|
1029
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/GetDiscoverySchedule.ts.html |here} to see how to use GetDiscoverySchedule API.
|
|
1030
|
+
*/
|
|
1031
|
+
getDiscoverySchedule(getDiscoveryScheduleRequest) {
|
|
1032
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1033
|
+
if (this.logger)
|
|
1034
|
+
this.logger.debug("Calling operation DiscoveryClient#getDiscoverySchedule.");
|
|
1035
|
+
const operationName = "getDiscoverySchedule";
|
|
1036
|
+
const apiReferenceLink = "";
|
|
1037
|
+
const pathParams = {
|
|
1038
|
+
"{discoveryScheduleId}": getDiscoveryScheduleRequest.discoveryScheduleId
|
|
1039
|
+
};
|
|
1040
|
+
const queryParams = {};
|
|
1041
|
+
let headerParams = {
|
|
1042
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1043
|
+
"opc-request-id": getDiscoveryScheduleRequest.opcRequestId
|
|
1044
|
+
};
|
|
1045
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
1046
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getDiscoveryScheduleRequest.retryConfiguration, specRetryConfiguration);
|
|
1047
|
+
if (this.logger)
|
|
1048
|
+
retrier.logger = this.logger;
|
|
1049
|
+
const request = yield oci_common_1.composeRequest({
|
|
1050
|
+
baseEndpoint: this._endpoint,
|
|
1051
|
+
defaultHeaders: this._defaultHeaders,
|
|
1052
|
+
path: "/discoverySchedules/{discoveryScheduleId}",
|
|
1053
|
+
method: "GET",
|
|
1054
|
+
pathParams: pathParams,
|
|
1055
|
+
headerParams: headerParams,
|
|
1056
|
+
queryParams: queryParams
|
|
1057
|
+
});
|
|
1058
|
+
try {
|
|
1059
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1060
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1061
|
+
responseObject: {},
|
|
1062
|
+
body: yield response.json(),
|
|
1063
|
+
bodyKey: "discoverySchedule",
|
|
1064
|
+
bodyModel: model.DiscoverySchedule,
|
|
1065
|
+
type: "model.DiscoverySchedule",
|
|
1066
|
+
responseHeaders: [
|
|
1067
|
+
{
|
|
1068
|
+
value: response.headers.get("etag"),
|
|
1069
|
+
key: "etag",
|
|
1070
|
+
dataType: "string"
|
|
1071
|
+
},
|
|
1072
|
+
{
|
|
1073
|
+
value: response.headers.get("opc-request-id"),
|
|
1074
|
+
key: "opcRequestId",
|
|
1075
|
+
dataType: "string"
|
|
1076
|
+
}
|
|
1077
|
+
]
|
|
1078
|
+
});
|
|
1079
|
+
return sdkResponse;
|
|
1080
|
+
}
|
|
1081
|
+
catch (err) {
|
|
1082
|
+
throw err;
|
|
1083
|
+
}
|
|
1084
|
+
});
|
|
1085
|
+
}
|
|
1086
|
+
/**
|
|
1087
|
+
* Gets known connections to the asset source by the asset source ID.
|
|
1088
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
1089
|
+
* @param ListAssetSourceConnectionsRequest
|
|
1090
|
+
* @return ListAssetSourceConnectionsResponse
|
|
1091
|
+
* @throws OciError when an error occurs
|
|
1092
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/ListAssetSourceConnections.ts.html |here} to see how to use ListAssetSourceConnections API.
|
|
1093
|
+
*/
|
|
1094
|
+
listAssetSourceConnections(listAssetSourceConnectionsRequest) {
|
|
1095
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1096
|
+
if (this.logger)
|
|
1097
|
+
this.logger.debug("Calling operation DiscoveryClient#listAssetSourceConnections.");
|
|
1098
|
+
const operationName = "listAssetSourceConnections";
|
|
1099
|
+
const apiReferenceLink = "";
|
|
1100
|
+
const pathParams = {
|
|
1101
|
+
"{assetSourceId}": listAssetSourceConnectionsRequest.assetSourceId
|
|
1102
|
+
};
|
|
1103
|
+
const queryParams = {
|
|
1104
|
+
"limit": listAssetSourceConnectionsRequest.limit,
|
|
1105
|
+
"page": listAssetSourceConnectionsRequest.page
|
|
1106
|
+
};
|
|
1107
|
+
let headerParams = {
|
|
1108
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1109
|
+
"opc-request-id": listAssetSourceConnectionsRequest.opcRequestId
|
|
1110
|
+
};
|
|
1111
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
1112
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listAssetSourceConnectionsRequest.retryConfiguration, specRetryConfiguration);
|
|
1113
|
+
if (this.logger)
|
|
1114
|
+
retrier.logger = this.logger;
|
|
1115
|
+
const request = yield oci_common_1.composeRequest({
|
|
1116
|
+
baseEndpoint: this._endpoint,
|
|
1117
|
+
defaultHeaders: this._defaultHeaders,
|
|
1118
|
+
path: "/assetSources/{assetSourceId}/actions/listConnections",
|
|
1119
|
+
method: "POST",
|
|
1120
|
+
pathParams: pathParams,
|
|
1121
|
+
headerParams: headerParams,
|
|
1122
|
+
queryParams: queryParams
|
|
1123
|
+
});
|
|
1124
|
+
try {
|
|
1125
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1126
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1127
|
+
responseObject: {},
|
|
1128
|
+
body: yield response.json(),
|
|
1129
|
+
bodyKey: "assetSourceConnectionCollection",
|
|
1130
|
+
bodyModel: model.AssetSourceConnectionCollection,
|
|
1131
|
+
type: "model.AssetSourceConnectionCollection",
|
|
1132
|
+
responseHeaders: [
|
|
1133
|
+
{
|
|
1134
|
+
value: response.headers.get("opc-request-id"),
|
|
1135
|
+
key: "opcRequestId",
|
|
1136
|
+
dataType: "string"
|
|
1137
|
+
},
|
|
1138
|
+
{
|
|
1139
|
+
value: response.headers.get("opc-next-page"),
|
|
1140
|
+
key: "opcNextPage",
|
|
1141
|
+
dataType: "string"
|
|
1142
|
+
}
|
|
1143
|
+
]
|
|
1144
|
+
});
|
|
1145
|
+
return sdkResponse;
|
|
1146
|
+
}
|
|
1147
|
+
catch (err) {
|
|
1148
|
+
throw err;
|
|
1149
|
+
}
|
|
1150
|
+
});
|
|
1151
|
+
}
|
|
1152
|
+
/**
|
|
1153
|
+
* Returns a list of asset sources.
|
|
1154
|
+
*
|
|
1155
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
1156
|
+
* @param ListAssetSourcesRequest
|
|
1157
|
+
* @return ListAssetSourcesResponse
|
|
1158
|
+
* @throws OciError when an error occurs
|
|
1159
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/ListAssetSources.ts.html |here} to see how to use ListAssetSources API.
|
|
1160
|
+
*/
|
|
1161
|
+
listAssetSources(listAssetSourcesRequest) {
|
|
1162
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1163
|
+
if (this.logger)
|
|
1164
|
+
this.logger.debug("Calling operation DiscoveryClient#listAssetSources.");
|
|
1165
|
+
const operationName = "listAssetSources";
|
|
1166
|
+
const apiReferenceLink = "";
|
|
1167
|
+
const pathParams = {};
|
|
1168
|
+
const queryParams = {
|
|
1169
|
+
"assetSourceId": listAssetSourcesRequest.assetSourceId,
|
|
1170
|
+
"sortBy": listAssetSourcesRequest.sortBy,
|
|
1171
|
+
"lifecycleState": listAssetSourcesRequest.lifecycleState,
|
|
1172
|
+
"sortOrder": listAssetSourcesRequest.sortOrder,
|
|
1173
|
+
"displayName": listAssetSourcesRequest.displayName,
|
|
1174
|
+
"compartmentId": listAssetSourcesRequest.compartmentId,
|
|
1175
|
+
"limit": listAssetSourcesRequest.limit,
|
|
1176
|
+
"page": listAssetSourcesRequest.page
|
|
1177
|
+
};
|
|
1178
|
+
let headerParams = {
|
|
1179
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1180
|
+
"opc-request-id": listAssetSourcesRequest.opcRequestId
|
|
1181
|
+
};
|
|
1182
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
1183
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listAssetSourcesRequest.retryConfiguration, specRetryConfiguration);
|
|
1184
|
+
if (this.logger)
|
|
1185
|
+
retrier.logger = this.logger;
|
|
1186
|
+
const request = yield oci_common_1.composeRequest({
|
|
1187
|
+
baseEndpoint: this._endpoint,
|
|
1188
|
+
defaultHeaders: this._defaultHeaders,
|
|
1189
|
+
path: "/assetSources",
|
|
1190
|
+
method: "GET",
|
|
1191
|
+
pathParams: pathParams,
|
|
1192
|
+
headerParams: headerParams,
|
|
1193
|
+
queryParams: queryParams
|
|
1194
|
+
});
|
|
1195
|
+
try {
|
|
1196
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1197
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1198
|
+
responseObject: {},
|
|
1199
|
+
body: yield response.json(),
|
|
1200
|
+
bodyKey: "assetSourceCollection",
|
|
1201
|
+
bodyModel: model.AssetSourceCollection,
|
|
1202
|
+
type: "model.AssetSourceCollection",
|
|
1203
|
+
responseHeaders: [
|
|
1204
|
+
{
|
|
1205
|
+
value: response.headers.get("opc-request-id"),
|
|
1206
|
+
key: "opcRequestId",
|
|
1207
|
+
dataType: "string"
|
|
1208
|
+
},
|
|
1209
|
+
{
|
|
1210
|
+
value: response.headers.get("opc-next-page"),
|
|
1211
|
+
key: "opcNextPage",
|
|
1212
|
+
dataType: "string"
|
|
1213
|
+
}
|
|
1214
|
+
]
|
|
1215
|
+
});
|
|
1216
|
+
return sdkResponse;
|
|
1217
|
+
}
|
|
1218
|
+
catch (err) {
|
|
1219
|
+
throw err;
|
|
1220
|
+
}
|
|
1221
|
+
});
|
|
1222
|
+
}
|
|
1223
|
+
/**
|
|
1224
|
+
* Lists discovery schedules.
|
|
1225
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
1226
|
+
* @param ListDiscoverySchedulesRequest
|
|
1227
|
+
* @return ListDiscoverySchedulesResponse
|
|
1228
|
+
* @throws OciError when an error occurs
|
|
1229
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/ListDiscoverySchedules.ts.html |here} to see how to use ListDiscoverySchedules API.
|
|
1230
|
+
*/
|
|
1231
|
+
listDiscoverySchedules(listDiscoverySchedulesRequest) {
|
|
1232
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1233
|
+
if (this.logger)
|
|
1234
|
+
this.logger.debug("Calling operation DiscoveryClient#listDiscoverySchedules.");
|
|
1235
|
+
const operationName = "listDiscoverySchedules";
|
|
1236
|
+
const apiReferenceLink = "";
|
|
1237
|
+
const pathParams = {};
|
|
1238
|
+
const queryParams = {
|
|
1239
|
+
"discoveryScheduleId": listDiscoverySchedulesRequest.discoveryScheduleId,
|
|
1240
|
+
"lifecycleState": listDiscoverySchedulesRequest.lifecycleState,
|
|
1241
|
+
"sortBy": listDiscoverySchedulesRequest.sortBy,
|
|
1242
|
+
"sortOrder": listDiscoverySchedulesRequest.sortOrder,
|
|
1243
|
+
"displayName": listDiscoverySchedulesRequest.displayName,
|
|
1244
|
+
"compartmentId": listDiscoverySchedulesRequest.compartmentId,
|
|
1245
|
+
"limit": listDiscoverySchedulesRequest.limit,
|
|
1246
|
+
"page": listDiscoverySchedulesRequest.page
|
|
1247
|
+
};
|
|
1248
|
+
let headerParams = {
|
|
1249
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1250
|
+
"opc-request-id": listDiscoverySchedulesRequest.opcRequestId
|
|
1251
|
+
};
|
|
1252
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
1253
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listDiscoverySchedulesRequest.retryConfiguration, specRetryConfiguration);
|
|
1254
|
+
if (this.logger)
|
|
1255
|
+
retrier.logger = this.logger;
|
|
1256
|
+
const request = yield oci_common_1.composeRequest({
|
|
1257
|
+
baseEndpoint: this._endpoint,
|
|
1258
|
+
defaultHeaders: this._defaultHeaders,
|
|
1259
|
+
path: "/discoverySchedules",
|
|
1260
|
+
method: "GET",
|
|
1261
|
+
pathParams: pathParams,
|
|
1262
|
+
headerParams: headerParams,
|
|
1263
|
+
queryParams: queryParams
|
|
1264
|
+
});
|
|
1265
|
+
try {
|
|
1266
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1267
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1268
|
+
responseObject: {},
|
|
1269
|
+
body: yield response.json(),
|
|
1270
|
+
bodyKey: "discoveryScheduleCollection",
|
|
1271
|
+
bodyModel: model.DiscoveryScheduleCollection,
|
|
1272
|
+
type: "model.DiscoveryScheduleCollection",
|
|
1273
|
+
responseHeaders: [
|
|
1274
|
+
{
|
|
1275
|
+
value: response.headers.get("opc-request-id"),
|
|
1276
|
+
key: "opcRequestId",
|
|
1277
|
+
dataType: "string"
|
|
1278
|
+
},
|
|
1279
|
+
{
|
|
1280
|
+
value: response.headers.get("opc-next-page"),
|
|
1281
|
+
key: "opcNextPage",
|
|
1282
|
+
dataType: "string"
|
|
1283
|
+
}
|
|
1284
|
+
]
|
|
1285
|
+
});
|
|
1286
|
+
return sdkResponse;
|
|
1287
|
+
}
|
|
1288
|
+
catch (err) {
|
|
1289
|
+
throw err;
|
|
1290
|
+
}
|
|
1291
|
+
});
|
|
1292
|
+
}
|
|
1293
|
+
/**
|
|
1294
|
+
* Initiates the process of asset metadata synchronization with the related asset source.
|
|
1295
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
1296
|
+
* @param RefreshAssetSourceRequest
|
|
1297
|
+
* @return RefreshAssetSourceResponse
|
|
1298
|
+
* @throws OciError when an error occurs
|
|
1299
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/RefreshAssetSource.ts.html |here} to see how to use RefreshAssetSource API.
|
|
1300
|
+
*/
|
|
1301
|
+
refreshAssetSource(refreshAssetSourceRequest) {
|
|
1302
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1303
|
+
if (this.logger)
|
|
1304
|
+
this.logger.debug("Calling operation DiscoveryClient#refreshAssetSource.");
|
|
1305
|
+
const operationName = "refreshAssetSource";
|
|
1306
|
+
const apiReferenceLink = "";
|
|
1307
|
+
const pathParams = {
|
|
1308
|
+
"{assetSourceId}": refreshAssetSourceRequest.assetSourceId
|
|
1309
|
+
};
|
|
1310
|
+
const queryParams = {};
|
|
1311
|
+
let headerParams = {
|
|
1312
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1313
|
+
"opc-request-id": refreshAssetSourceRequest.opcRequestId,
|
|
1314
|
+
"opc-retry-token": refreshAssetSourceRequest.opcRetryToken
|
|
1315
|
+
};
|
|
1316
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
1317
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, refreshAssetSourceRequest.retryConfiguration, specRetryConfiguration);
|
|
1318
|
+
if (this.logger)
|
|
1319
|
+
retrier.logger = this.logger;
|
|
1320
|
+
const request = yield oci_common_1.composeRequest({
|
|
1321
|
+
baseEndpoint: this._endpoint,
|
|
1322
|
+
defaultHeaders: this._defaultHeaders,
|
|
1323
|
+
path: "/assetSources/{assetSourceId}/actions/refresh",
|
|
1324
|
+
method: "POST",
|
|
1325
|
+
pathParams: pathParams,
|
|
1326
|
+
headerParams: headerParams,
|
|
1327
|
+
queryParams: queryParams
|
|
1328
|
+
});
|
|
1329
|
+
try {
|
|
1330
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1331
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1332
|
+
responseObject: {},
|
|
1333
|
+
responseHeaders: [
|
|
1334
|
+
{
|
|
1335
|
+
value: response.headers.get("opc-request-id"),
|
|
1336
|
+
key: "opcRequestId",
|
|
1337
|
+
dataType: "string"
|
|
1338
|
+
},
|
|
1339
|
+
{
|
|
1340
|
+
value: response.headers.get("opc-work-request-id"),
|
|
1341
|
+
key: "opcWorkRequestId",
|
|
1342
|
+
dataType: "string"
|
|
1343
|
+
}
|
|
1344
|
+
]
|
|
1345
|
+
});
|
|
1346
|
+
return sdkResponse;
|
|
1347
|
+
}
|
|
1348
|
+
catch (err) {
|
|
1349
|
+
throw err;
|
|
1350
|
+
}
|
|
1351
|
+
});
|
|
1352
|
+
}
|
|
1353
|
+
/**
|
|
1354
|
+
* Updates the asset source.
|
|
1355
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
1356
|
+
* @param UpdateAssetSourceRequest
|
|
1357
|
+
* @return UpdateAssetSourceResponse
|
|
1358
|
+
* @throws OciError when an error occurs
|
|
1359
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/UpdateAssetSource.ts.html |here} to see how to use UpdateAssetSource API.
|
|
1360
|
+
*/
|
|
1361
|
+
updateAssetSource(updateAssetSourceRequest) {
|
|
1362
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1363
|
+
if (this.logger)
|
|
1364
|
+
this.logger.debug("Calling operation DiscoveryClient#updateAssetSource.");
|
|
1365
|
+
const operationName = "updateAssetSource";
|
|
1366
|
+
const apiReferenceLink = "";
|
|
1367
|
+
const pathParams = {
|
|
1368
|
+
"{assetSourceId}": updateAssetSourceRequest.assetSourceId
|
|
1369
|
+
};
|
|
1370
|
+
const queryParams = {};
|
|
1371
|
+
let headerParams = {
|
|
1372
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1373
|
+
"if-match": updateAssetSourceRequest.ifMatch,
|
|
1374
|
+
"opc-request-id": updateAssetSourceRequest.opcRequestId
|
|
1375
|
+
};
|
|
1376
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
1377
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, updateAssetSourceRequest.retryConfiguration, specRetryConfiguration);
|
|
1378
|
+
if (this.logger)
|
|
1379
|
+
retrier.logger = this.logger;
|
|
1380
|
+
const request = yield oci_common_1.composeRequest({
|
|
1381
|
+
baseEndpoint: this._endpoint,
|
|
1382
|
+
defaultHeaders: this._defaultHeaders,
|
|
1383
|
+
path: "/assetSources/{assetSourceId}",
|
|
1384
|
+
method: "PUT",
|
|
1385
|
+
bodyContent: common.ObjectSerializer.serialize(updateAssetSourceRequest.updateAssetSourceDetails, "UpdateAssetSourceDetails", model.UpdateAssetSourceDetails.getJsonObj),
|
|
1386
|
+
pathParams: pathParams,
|
|
1387
|
+
headerParams: headerParams,
|
|
1388
|
+
queryParams: queryParams
|
|
1389
|
+
});
|
|
1390
|
+
try {
|
|
1391
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1392
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1393
|
+
responseObject: {},
|
|
1394
|
+
responseHeaders: [
|
|
1395
|
+
{
|
|
1396
|
+
value: response.headers.get("opc-request-id"),
|
|
1397
|
+
key: "opcRequestId",
|
|
1398
|
+
dataType: "string"
|
|
1399
|
+
},
|
|
1400
|
+
{
|
|
1401
|
+
value: response.headers.get("opc-work-request-id"),
|
|
1402
|
+
key: "opcWorkRequestId",
|
|
1403
|
+
dataType: "string"
|
|
1404
|
+
}
|
|
1405
|
+
]
|
|
1406
|
+
});
|
|
1407
|
+
return sdkResponse;
|
|
1408
|
+
}
|
|
1409
|
+
catch (err) {
|
|
1410
|
+
throw err;
|
|
1411
|
+
}
|
|
1412
|
+
});
|
|
1413
|
+
}
|
|
1414
|
+
/**
|
|
1415
|
+
* Updates the specified discovery schedule.
|
|
1416
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
1417
|
+
* @param UpdateDiscoveryScheduleRequest
|
|
1418
|
+
* @return UpdateDiscoveryScheduleResponse
|
|
1419
|
+
* @throws OciError when an error occurs
|
|
1420
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/UpdateDiscoverySchedule.ts.html |here} to see how to use UpdateDiscoverySchedule API.
|
|
1421
|
+
*/
|
|
1422
|
+
updateDiscoverySchedule(updateDiscoveryScheduleRequest) {
|
|
1423
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1424
|
+
if (this.logger)
|
|
1425
|
+
this.logger.debug("Calling operation DiscoveryClient#updateDiscoverySchedule.");
|
|
1426
|
+
const operationName = "updateDiscoverySchedule";
|
|
1427
|
+
const apiReferenceLink = "";
|
|
1428
|
+
const pathParams = {
|
|
1429
|
+
"{discoveryScheduleId}": updateDiscoveryScheduleRequest.discoveryScheduleId
|
|
1430
|
+
};
|
|
1431
|
+
const queryParams = {};
|
|
1432
|
+
let headerParams = {
|
|
1433
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1434
|
+
"if-match": updateDiscoveryScheduleRequest.ifMatch,
|
|
1435
|
+
"opc-request-id": updateDiscoveryScheduleRequest.opcRequestId
|
|
1436
|
+
};
|
|
1437
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
1438
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, updateDiscoveryScheduleRequest.retryConfiguration, specRetryConfiguration);
|
|
1439
|
+
if (this.logger)
|
|
1440
|
+
retrier.logger = this.logger;
|
|
1441
|
+
const request = yield oci_common_1.composeRequest({
|
|
1442
|
+
baseEndpoint: this._endpoint,
|
|
1443
|
+
defaultHeaders: this._defaultHeaders,
|
|
1444
|
+
path: "/discoverySchedules/{discoveryScheduleId}",
|
|
1445
|
+
method: "PUT",
|
|
1446
|
+
bodyContent: common.ObjectSerializer.serialize(updateDiscoveryScheduleRequest.updateDiscoveryScheduleDetails, "UpdateDiscoveryScheduleDetails", model.UpdateDiscoveryScheduleDetails.getJsonObj),
|
|
1447
|
+
pathParams: pathParams,
|
|
1448
|
+
headerParams: headerParams,
|
|
1449
|
+
queryParams: queryParams
|
|
1450
|
+
});
|
|
1451
|
+
try {
|
|
1452
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1453
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1454
|
+
responseObject: {},
|
|
1455
|
+
body: yield response.json(),
|
|
1456
|
+
bodyKey: "discoverySchedule",
|
|
1457
|
+
bodyModel: model.DiscoverySchedule,
|
|
1458
|
+
type: "model.DiscoverySchedule",
|
|
1459
|
+
responseHeaders: [
|
|
1460
|
+
{
|
|
1461
|
+
value: response.headers.get("etag"),
|
|
1462
|
+
key: "etag",
|
|
1463
|
+
dataType: "string"
|
|
1464
|
+
},
|
|
1465
|
+
{
|
|
1466
|
+
value: response.headers.get("opc-request-id"),
|
|
1467
|
+
key: "opcRequestId",
|
|
1468
|
+
dataType: "string"
|
|
1469
|
+
}
|
|
1470
|
+
]
|
|
1471
|
+
});
|
|
1472
|
+
return sdkResponse;
|
|
1473
|
+
}
|
|
1474
|
+
catch (err) {
|
|
1475
|
+
throw err;
|
|
1476
|
+
}
|
|
1477
|
+
});
|
|
1478
|
+
}
|
|
1479
|
+
}
|
|
1480
|
+
exports.DiscoveryClient = DiscoveryClient;
|
|
1481
|
+
DiscoveryClient.serviceEndpointTemplate = "https://cloudbridge.{region}.oci.{secondLevelDomain}";
|
|
1482
|
+
DiscoveryClient.endpointServiceName = "";
|
|
1483
|
+
var InventoryApiKeys;
|
|
1484
|
+
(function (InventoryApiKeys) {
|
|
1485
|
+
})(InventoryApiKeys = exports.InventoryApiKeys || (exports.InventoryApiKeys = {}));
|
|
1486
|
+
/**
|
|
1487
|
+
* This service client uses {@link common.CircuitBreaker.DefaultConfiguration} for all the operations by default if no circuit breaker configuration is defined by the user.
|
|
1488
|
+
*/
|
|
1489
|
+
class InventoryClient {
|
|
1490
|
+
constructor(params, clientConfiguration) {
|
|
1491
|
+
this["_endpoint"] = "";
|
|
1492
|
+
this["_defaultHeaders"] = {};
|
|
1493
|
+
this._circuitBreaker = null;
|
|
1494
|
+
this._httpOptions = undefined;
|
|
1495
|
+
this.targetService = "Inventory";
|
|
1496
|
+
const requestSigner = params.authenticationDetailsProvider
|
|
1497
|
+
? new common.DefaultRequestSigner(params.authenticationDetailsProvider)
|
|
1498
|
+
: null;
|
|
1499
|
+
if (clientConfiguration) {
|
|
1500
|
+
this._clientConfiguration = clientConfiguration;
|
|
1501
|
+
this._circuitBreaker = clientConfiguration.circuitBreaker
|
|
1502
|
+
? clientConfiguration.circuitBreaker.circuit
|
|
1503
|
+
: null;
|
|
1504
|
+
this._httpOptions = clientConfiguration.httpOptions
|
|
1505
|
+
? clientConfiguration.httpOptions
|
|
1506
|
+
: undefined;
|
|
1507
|
+
}
|
|
1508
|
+
// if circuit breaker is not created, check if circuit breaker system is enabled to use default circuit breaker
|
|
1509
|
+
const specCircuitBreakerEnabled = true;
|
|
1510
|
+
if (!this._circuitBreaker &&
|
|
1511
|
+
common.utils.isCircuitBreakerSystemEnabled(clientConfiguration) &&
|
|
1512
|
+
(specCircuitBreakerEnabled || common.CircuitBreaker.DefaultCircuitBreakerOverriden)) {
|
|
1513
|
+
this._circuitBreaker = new common.CircuitBreaker().circuit;
|
|
1514
|
+
}
|
|
1515
|
+
this._httpClient =
|
|
1516
|
+
params.httpClient ||
|
|
1517
|
+
new common.FetchHttpClient(requestSigner, this._circuitBreaker, this._httpOptions);
|
|
1518
|
+
if (params.authenticationDetailsProvider &&
|
|
1519
|
+
common.isRegionProvider(params.authenticationDetailsProvider)) {
|
|
1520
|
+
const provider = params.authenticationDetailsProvider;
|
|
1521
|
+
if (provider.getRegion()) {
|
|
1522
|
+
this.region = provider.getRegion();
|
|
1523
|
+
}
|
|
1524
|
+
}
|
|
1525
|
+
}
|
|
1526
|
+
/**
|
|
1527
|
+
* Get the endpoint that is being used to call (ex, https://www.example.com).
|
|
1528
|
+
*/
|
|
1529
|
+
get endpoint() {
|
|
1530
|
+
return this._endpoint;
|
|
1531
|
+
}
|
|
1532
|
+
/**
|
|
1533
|
+
* Sets the endpoint to call (ex, https://www.example.com).
|
|
1534
|
+
* @param endpoint The endpoint of the service.
|
|
1535
|
+
*/
|
|
1536
|
+
set endpoint(endpoint) {
|
|
1537
|
+
this._endpoint = endpoint;
|
|
1538
|
+
this._endpoint = this._endpoint + "/20220509";
|
|
1539
|
+
if (this.logger)
|
|
1540
|
+
this.logger.info(`InventoryClient endpoint set to ${this._endpoint}`);
|
|
1541
|
+
}
|
|
1542
|
+
get logger() {
|
|
1543
|
+
return common.LOG.logger;
|
|
1544
|
+
}
|
|
1545
|
+
/**
|
|
1546
|
+
* Sets the region to call (ex, Region.US_PHOENIX_1).
|
|
1547
|
+
* Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.
|
|
1548
|
+
* @param region The region of the service.
|
|
1549
|
+
*/
|
|
1550
|
+
set region(region) {
|
|
1551
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegion(InventoryClient.serviceEndpointTemplate, region, InventoryClient.endpointServiceName);
|
|
1552
|
+
}
|
|
1553
|
+
/**
|
|
1554
|
+
* Sets the regionId to call (ex, 'us-phoenix-1').
|
|
1555
|
+
*
|
|
1556
|
+
* Note, this will first try to map the region ID to a known Region and call {@link #region(Region) region}.
|
|
1557
|
+
* If no known Region could be determined, it will create an endpoint assuming its in default Realm OC1
|
|
1558
|
+
* and then call {@link #endpoint(String) endpoint}.
|
|
1559
|
+
* @param regionId The public region ID.
|
|
1560
|
+
*/
|
|
1561
|
+
set regionId(regionId) {
|
|
1562
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(InventoryClient.serviceEndpointTemplate, regionId, InventoryClient.endpointServiceName);
|
|
1563
|
+
}
|
|
1564
|
+
/**
|
|
1565
|
+
* Creates a new InventoryWaiter for resources for this service.
|
|
1566
|
+
*
|
|
1567
|
+
* @param config The waiter configuration for termination and delay strategy
|
|
1568
|
+
* @return The service waiters.
|
|
1569
|
+
*/
|
|
1570
|
+
createWaiters(config) {
|
|
1571
|
+
this._waiters = new inventory_waiter_1.InventoryWaiter(this, config);
|
|
1572
|
+
return this._waiters;
|
|
1573
|
+
}
|
|
1574
|
+
/**
|
|
1575
|
+
* Gets the waiters available for resources for this service.
|
|
1576
|
+
*
|
|
1577
|
+
* @return The service waiters.
|
|
1578
|
+
*/
|
|
1579
|
+
getWaiters() {
|
|
1580
|
+
if (this._waiters) {
|
|
1581
|
+
return this._waiters;
|
|
1582
|
+
}
|
|
1583
|
+
throw Error("Waiters do not exist. Please create waiters.");
|
|
1584
|
+
}
|
|
1585
|
+
/**
|
|
1586
|
+
* Returns an aggregation of assets. Aggregation groups are sorted by groupBy property.
|
|
1587
|
+
* Default sort order is ascending, but can be overridden by the sortOrder parameter.
|
|
1588
|
+
*
|
|
1589
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
1590
|
+
* @param AnalyzeAssetsRequest
|
|
1591
|
+
* @return AnalyzeAssetsResponse
|
|
1592
|
+
* @throws OciError when an error occurs
|
|
1593
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/AnalyzeAssets.ts.html |here} to see how to use AnalyzeAssets API.
|
|
1594
|
+
*/
|
|
1595
|
+
analyzeAssets(analyzeAssetsRequest) {
|
|
1596
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1597
|
+
if (this.logger)
|
|
1598
|
+
this.logger.debug("Calling operation InventoryClient#analyzeAssets.");
|
|
1599
|
+
const operationName = "analyzeAssets";
|
|
1600
|
+
const apiReferenceLink = "";
|
|
1601
|
+
const pathParams = {};
|
|
1602
|
+
const queryParams = {
|
|
1603
|
+
"compartmentId": analyzeAssetsRequest.compartmentId,
|
|
1604
|
+
"limit": analyzeAssetsRequest.limit,
|
|
1605
|
+
"page": analyzeAssetsRequest.page,
|
|
1606
|
+
"lifecycleState": analyzeAssetsRequest.lifecycleState,
|
|
1607
|
+
"sourceKey": analyzeAssetsRequest.sourceKey,
|
|
1608
|
+
"externalAssetKey": analyzeAssetsRequest.externalAssetKey,
|
|
1609
|
+
"assetType": analyzeAssetsRequest.assetType,
|
|
1610
|
+
"sortOrder": analyzeAssetsRequest.sortOrder,
|
|
1611
|
+
"aggregationProperties": analyzeAssetsRequest.aggregationProperties,
|
|
1612
|
+
"groupBy": analyzeAssetsRequest.groupBy,
|
|
1613
|
+
"inventoryId": analyzeAssetsRequest.inventoryId
|
|
1614
|
+
};
|
|
1615
|
+
let headerParams = {
|
|
1616
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1617
|
+
"opc-request-id": analyzeAssetsRequest.opcRequestId
|
|
1618
|
+
};
|
|
1619
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
1620
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, analyzeAssetsRequest.retryConfiguration, specRetryConfiguration);
|
|
1621
|
+
if (this.logger)
|
|
1622
|
+
retrier.logger = this.logger;
|
|
1623
|
+
const request = yield oci_common_1.composeRequest({
|
|
1624
|
+
baseEndpoint: this._endpoint,
|
|
1625
|
+
defaultHeaders: this._defaultHeaders,
|
|
1626
|
+
path: "/assetAnalytics",
|
|
1627
|
+
method: "GET",
|
|
1628
|
+
pathParams: pathParams,
|
|
1629
|
+
headerParams: headerParams,
|
|
1630
|
+
queryParams: queryParams
|
|
1631
|
+
});
|
|
1632
|
+
try {
|
|
1633
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1634
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1635
|
+
responseObject: {},
|
|
1636
|
+
body: yield response.json(),
|
|
1637
|
+
bodyKey: "assetAggregationCollection",
|
|
1638
|
+
bodyModel: model.AssetAggregationCollection,
|
|
1639
|
+
type: "model.AssetAggregationCollection",
|
|
1640
|
+
responseHeaders: [
|
|
1641
|
+
{
|
|
1642
|
+
value: response.headers.get("opc-request-id"),
|
|
1643
|
+
key: "opcRequestId",
|
|
1644
|
+
dataType: "string"
|
|
1645
|
+
},
|
|
1646
|
+
{
|
|
1647
|
+
value: response.headers.get("opc-next-page"),
|
|
1648
|
+
key: "opcNextPage",
|
|
1649
|
+
dataType: "string"
|
|
1650
|
+
}
|
|
1651
|
+
]
|
|
1652
|
+
});
|
|
1653
|
+
return sdkResponse;
|
|
1654
|
+
}
|
|
1655
|
+
catch (err) {
|
|
1656
|
+
throw err;
|
|
1657
|
+
}
|
|
1658
|
+
});
|
|
1659
|
+
}
|
|
1660
|
+
/**
|
|
1661
|
+
* Moves an asset resource from one compartment to another. When provided, If-Match is checked against ETag values of the resource.
|
|
1662
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
1663
|
+
* @param ChangeAssetCompartmentRequest
|
|
1664
|
+
* @return ChangeAssetCompartmentResponse
|
|
1665
|
+
* @throws OciError when an error occurs
|
|
1666
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/ChangeAssetCompartment.ts.html |here} to see how to use ChangeAssetCompartment API.
|
|
1667
|
+
*/
|
|
1668
|
+
changeAssetCompartment(changeAssetCompartmentRequest) {
|
|
1669
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1670
|
+
if (this.logger)
|
|
1671
|
+
this.logger.debug("Calling operation InventoryClient#changeAssetCompartment.");
|
|
1672
|
+
const operationName = "changeAssetCompartment";
|
|
1673
|
+
const apiReferenceLink = "";
|
|
1674
|
+
const pathParams = {
|
|
1675
|
+
"{assetId}": changeAssetCompartmentRequest.assetId
|
|
1676
|
+
};
|
|
1677
|
+
const queryParams = {};
|
|
1678
|
+
let headerParams = {
|
|
1679
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1680
|
+
"if-match": changeAssetCompartmentRequest.ifMatch,
|
|
1681
|
+
"opc-request-id": changeAssetCompartmentRequest.opcRequestId,
|
|
1682
|
+
"opc-retry-token": changeAssetCompartmentRequest.opcRetryToken
|
|
1683
|
+
};
|
|
1684
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
1685
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, changeAssetCompartmentRequest.retryConfiguration, specRetryConfiguration);
|
|
1686
|
+
if (this.logger)
|
|
1687
|
+
retrier.logger = this.logger;
|
|
1688
|
+
const request = yield oci_common_1.composeRequest({
|
|
1689
|
+
baseEndpoint: this._endpoint,
|
|
1690
|
+
defaultHeaders: this._defaultHeaders,
|
|
1691
|
+
path: "/assets/{assetId}/actions/changeCompartment",
|
|
1692
|
+
method: "POST",
|
|
1693
|
+
bodyContent: common.ObjectSerializer.serialize(changeAssetCompartmentRequest.changeAssetCompartmentDetails, "ChangeAssetCompartmentDetails", model.ChangeAssetCompartmentDetails.getJsonObj),
|
|
1694
|
+
pathParams: pathParams,
|
|
1695
|
+
headerParams: headerParams,
|
|
1696
|
+
queryParams: queryParams
|
|
1697
|
+
});
|
|
1698
|
+
try {
|
|
1699
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1700
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1701
|
+
responseObject: {},
|
|
1702
|
+
responseHeaders: [
|
|
1703
|
+
{
|
|
1704
|
+
value: response.headers.get("opc-request-id"),
|
|
1705
|
+
key: "opcRequestId",
|
|
1706
|
+
dataType: "string"
|
|
1707
|
+
}
|
|
1708
|
+
]
|
|
1709
|
+
});
|
|
1710
|
+
return sdkResponse;
|
|
1711
|
+
}
|
|
1712
|
+
catch (err) {
|
|
1713
|
+
throw err;
|
|
1714
|
+
}
|
|
1715
|
+
});
|
|
1716
|
+
}
|
|
1717
|
+
/**
|
|
1718
|
+
* Change an asset's tag.
|
|
1719
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
1720
|
+
* @param ChangeAssetTagsRequest
|
|
1721
|
+
* @return ChangeAssetTagsResponse
|
|
1722
|
+
* @throws OciError when an error occurs
|
|
1723
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/ChangeAssetTags.ts.html |here} to see how to use ChangeAssetTags API.
|
|
1724
|
+
*/
|
|
1725
|
+
changeAssetTags(changeAssetTagsRequest) {
|
|
1726
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1727
|
+
if (this.logger)
|
|
1728
|
+
this.logger.debug("Calling operation InventoryClient#changeAssetTags.");
|
|
1729
|
+
const operationName = "changeAssetTags";
|
|
1730
|
+
const apiReferenceLink = "";
|
|
1731
|
+
const pathParams = {
|
|
1732
|
+
"{assetId}": changeAssetTagsRequest.assetId
|
|
1733
|
+
};
|
|
1734
|
+
const queryParams = {};
|
|
1735
|
+
let headerParams = {
|
|
1736
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1737
|
+
"if-match": changeAssetTagsRequest.ifMatch,
|
|
1738
|
+
"opc-request-id": changeAssetTagsRequest.opcRequestId,
|
|
1739
|
+
"opc-retry-token": changeAssetTagsRequest.opcRetryToken
|
|
1740
|
+
};
|
|
1741
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
1742
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, changeAssetTagsRequest.retryConfiguration, specRetryConfiguration);
|
|
1743
|
+
if (this.logger)
|
|
1744
|
+
retrier.logger = this.logger;
|
|
1745
|
+
const request = yield oci_common_1.composeRequest({
|
|
1746
|
+
baseEndpoint: this._endpoint,
|
|
1747
|
+
defaultHeaders: this._defaultHeaders,
|
|
1748
|
+
path: "/assets/{assetId}/actions/changeTags",
|
|
1749
|
+
method: "POST",
|
|
1750
|
+
bodyContent: common.ObjectSerializer.serialize(changeAssetTagsRequest.changeAssetTagsDetails, "ChangeAssetTagsDetails", model.ChangeAssetTagsDetails.getJsonObj),
|
|
1751
|
+
pathParams: pathParams,
|
|
1752
|
+
headerParams: headerParams,
|
|
1753
|
+
queryParams: queryParams
|
|
1754
|
+
});
|
|
1755
|
+
try {
|
|
1756
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1757
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1758
|
+
responseObject: {},
|
|
1759
|
+
body: yield response.json(),
|
|
1760
|
+
bodyKey: "asset",
|
|
1761
|
+
bodyModel: model.Asset,
|
|
1762
|
+
type: "model.Asset",
|
|
1763
|
+
responseHeaders: [
|
|
1764
|
+
{
|
|
1765
|
+
value: response.headers.get("etag"),
|
|
1766
|
+
key: "etag",
|
|
1767
|
+
dataType: "string"
|
|
1768
|
+
},
|
|
1769
|
+
{
|
|
1770
|
+
value: response.headers.get("opc-request-id"),
|
|
1771
|
+
key: "opcRequestId",
|
|
1772
|
+
dataType: "string"
|
|
1773
|
+
}
|
|
1774
|
+
]
|
|
1775
|
+
});
|
|
1776
|
+
return sdkResponse;
|
|
1777
|
+
}
|
|
1778
|
+
catch (err) {
|
|
1779
|
+
throw err;
|
|
1780
|
+
}
|
|
1781
|
+
});
|
|
1782
|
+
}
|
|
1783
|
+
/**
|
|
1784
|
+
* Creates an asset.
|
|
1785
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
1786
|
+
* @param CreateAssetRequest
|
|
1787
|
+
* @return CreateAssetResponse
|
|
1788
|
+
* @throws OciError when an error occurs
|
|
1789
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/CreateAsset.ts.html |here} to see how to use CreateAsset API.
|
|
1790
|
+
*/
|
|
1791
|
+
createAsset(createAssetRequest) {
|
|
1792
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1793
|
+
if (this.logger)
|
|
1794
|
+
this.logger.debug("Calling operation InventoryClient#createAsset.");
|
|
1795
|
+
const operationName = "createAsset";
|
|
1796
|
+
const apiReferenceLink = "";
|
|
1797
|
+
const pathParams = {};
|
|
1798
|
+
const queryParams = {};
|
|
1799
|
+
let headerParams = {
|
|
1800
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1801
|
+
"opc-request-id": createAssetRequest.opcRequestId,
|
|
1802
|
+
"opc-retry-token": createAssetRequest.opcRetryToken
|
|
1803
|
+
};
|
|
1804
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
1805
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, createAssetRequest.retryConfiguration, specRetryConfiguration);
|
|
1806
|
+
if (this.logger)
|
|
1807
|
+
retrier.logger = this.logger;
|
|
1808
|
+
const request = yield oci_common_1.composeRequest({
|
|
1809
|
+
baseEndpoint: this._endpoint,
|
|
1810
|
+
defaultHeaders: this._defaultHeaders,
|
|
1811
|
+
path: "/assets",
|
|
1812
|
+
method: "POST",
|
|
1813
|
+
bodyContent: common.ObjectSerializer.serialize(createAssetRequest.createAssetDetails, "CreateAssetDetails", model.CreateAssetDetails.getJsonObj),
|
|
1814
|
+
pathParams: pathParams,
|
|
1815
|
+
headerParams: headerParams,
|
|
1816
|
+
queryParams: queryParams
|
|
1817
|
+
});
|
|
1818
|
+
try {
|
|
1819
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1820
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1821
|
+
responseObject: {},
|
|
1822
|
+
body: yield response.json(),
|
|
1823
|
+
bodyKey: "asset",
|
|
1824
|
+
bodyModel: model.Asset,
|
|
1825
|
+
type: "model.Asset",
|
|
1826
|
+
responseHeaders: [
|
|
1827
|
+
{
|
|
1828
|
+
value: response.headers.get("etag"),
|
|
1829
|
+
key: "etag",
|
|
1830
|
+
dataType: "string"
|
|
1831
|
+
},
|
|
1832
|
+
{
|
|
1833
|
+
value: response.headers.get("opc-request-id"),
|
|
1834
|
+
key: "opcRequestId",
|
|
1835
|
+
dataType: "string"
|
|
1836
|
+
}
|
|
1837
|
+
]
|
|
1838
|
+
});
|
|
1839
|
+
return sdkResponse;
|
|
1840
|
+
}
|
|
1841
|
+
catch (err) {
|
|
1842
|
+
throw err;
|
|
1843
|
+
}
|
|
1844
|
+
});
|
|
1845
|
+
}
|
|
1846
|
+
/**
|
|
1847
|
+
* Creates an inventory.
|
|
1848
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
1849
|
+
* @param CreateInventoryRequest
|
|
1850
|
+
* @return CreateInventoryResponse
|
|
1851
|
+
* @throws OciError when an error occurs
|
|
1852
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/CreateInventory.ts.html |here} to see how to use CreateInventory API.
|
|
1853
|
+
*/
|
|
1854
|
+
createInventory(createInventoryRequest) {
|
|
1855
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1856
|
+
if (this.logger)
|
|
1857
|
+
this.logger.debug("Calling operation InventoryClient#createInventory.");
|
|
1858
|
+
const operationName = "createInventory";
|
|
1859
|
+
const apiReferenceLink = "";
|
|
1860
|
+
const pathParams = {};
|
|
1861
|
+
const queryParams = {};
|
|
1862
|
+
let headerParams = {
|
|
1863
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1864
|
+
"opc-request-id": createInventoryRequest.opcRequestId,
|
|
1865
|
+
"opc-retry-token": createInventoryRequest.opcRetryToken
|
|
1866
|
+
};
|
|
1867
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
1868
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, createInventoryRequest.retryConfiguration, specRetryConfiguration);
|
|
1869
|
+
if (this.logger)
|
|
1870
|
+
retrier.logger = this.logger;
|
|
1871
|
+
const request = yield oci_common_1.composeRequest({
|
|
1872
|
+
baseEndpoint: this._endpoint,
|
|
1873
|
+
defaultHeaders: this._defaultHeaders,
|
|
1874
|
+
path: "/inventories",
|
|
1875
|
+
method: "POST",
|
|
1876
|
+
bodyContent: common.ObjectSerializer.serialize(createInventoryRequest.createInventoryDetails, "CreateInventoryDetails", model.CreateInventoryDetails.getJsonObj),
|
|
1877
|
+
pathParams: pathParams,
|
|
1878
|
+
headerParams: headerParams,
|
|
1879
|
+
queryParams: queryParams
|
|
1880
|
+
});
|
|
1881
|
+
try {
|
|
1882
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1883
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1884
|
+
responseObject: {},
|
|
1885
|
+
responseHeaders: [
|
|
1886
|
+
{
|
|
1887
|
+
value: response.headers.get("opc-request-id"),
|
|
1888
|
+
key: "opcRequestId",
|
|
1889
|
+
dataType: "string"
|
|
1890
|
+
},
|
|
1891
|
+
{
|
|
1892
|
+
value: response.headers.get("opc-work-request-id"),
|
|
1893
|
+
key: "opcWorkRequestId",
|
|
1894
|
+
dataType: "string"
|
|
1895
|
+
}
|
|
1896
|
+
]
|
|
1897
|
+
});
|
|
1898
|
+
return sdkResponse;
|
|
1899
|
+
}
|
|
1900
|
+
catch (err) {
|
|
1901
|
+
throw err;
|
|
1902
|
+
}
|
|
1903
|
+
});
|
|
1904
|
+
}
|
|
1905
|
+
/**
|
|
1906
|
+
* Deletes an asset resource by identifier.
|
|
1907
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
1908
|
+
* @param DeleteAssetRequest
|
|
1909
|
+
* @return DeleteAssetResponse
|
|
1910
|
+
* @throws OciError when an error occurs
|
|
1911
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/DeleteAsset.ts.html |here} to see how to use DeleteAsset API.
|
|
1912
|
+
*/
|
|
1913
|
+
deleteAsset(deleteAssetRequest) {
|
|
1914
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1915
|
+
if (this.logger)
|
|
1916
|
+
this.logger.debug("Calling operation InventoryClient#deleteAsset.");
|
|
1917
|
+
const operationName = "deleteAsset";
|
|
1918
|
+
const apiReferenceLink = "";
|
|
1919
|
+
const pathParams = {
|
|
1920
|
+
"{assetId}": deleteAssetRequest.assetId
|
|
1921
|
+
};
|
|
1922
|
+
const queryParams = {};
|
|
1923
|
+
let headerParams = {
|
|
1924
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1925
|
+
"if-match": deleteAssetRequest.ifMatch,
|
|
1926
|
+
"opc-request-id": deleteAssetRequest.opcRequestId
|
|
1927
|
+
};
|
|
1928
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
1929
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, deleteAssetRequest.retryConfiguration, specRetryConfiguration);
|
|
1930
|
+
if (this.logger)
|
|
1931
|
+
retrier.logger = this.logger;
|
|
1932
|
+
const request = yield oci_common_1.composeRequest({
|
|
1933
|
+
baseEndpoint: this._endpoint,
|
|
1934
|
+
defaultHeaders: this._defaultHeaders,
|
|
1935
|
+
path: "/assets/{assetId}",
|
|
1936
|
+
method: "DELETE",
|
|
1937
|
+
pathParams: pathParams,
|
|
1938
|
+
headerParams: headerParams,
|
|
1939
|
+
queryParams: queryParams
|
|
1940
|
+
});
|
|
1941
|
+
try {
|
|
1942
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1943
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1944
|
+
responseObject: {},
|
|
1945
|
+
responseHeaders: [
|
|
1946
|
+
{
|
|
1947
|
+
value: response.headers.get("opc-request-id"),
|
|
1948
|
+
key: "opcRequestId",
|
|
1949
|
+
dataType: "string"
|
|
1950
|
+
}
|
|
1951
|
+
]
|
|
1952
|
+
});
|
|
1953
|
+
return sdkResponse;
|
|
1954
|
+
}
|
|
1955
|
+
catch (err) {
|
|
1956
|
+
throw err;
|
|
1957
|
+
}
|
|
1958
|
+
});
|
|
1959
|
+
}
|
|
1960
|
+
/**
|
|
1961
|
+
* Deletes an inventory resource by identifier.
|
|
1962
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
1963
|
+
* @param DeleteInventoryRequest
|
|
1964
|
+
* @return DeleteInventoryResponse
|
|
1965
|
+
* @throws OciError when an error occurs
|
|
1966
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/DeleteInventory.ts.html |here} to see how to use DeleteInventory API.
|
|
1967
|
+
*/
|
|
1968
|
+
deleteInventory(deleteInventoryRequest) {
|
|
1969
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1970
|
+
if (this.logger)
|
|
1971
|
+
this.logger.debug("Calling operation InventoryClient#deleteInventory.");
|
|
1972
|
+
const operationName = "deleteInventory";
|
|
1973
|
+
const apiReferenceLink = "";
|
|
1974
|
+
const pathParams = {
|
|
1975
|
+
"{inventoryId}": deleteInventoryRequest.inventoryId
|
|
1976
|
+
};
|
|
1977
|
+
const queryParams = {};
|
|
1978
|
+
let headerParams = {
|
|
1979
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1980
|
+
"if-match": deleteInventoryRequest.ifMatch,
|
|
1981
|
+
"opc-request-id": deleteInventoryRequest.opcRequestId
|
|
1982
|
+
};
|
|
1983
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
1984
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, deleteInventoryRequest.retryConfiguration, specRetryConfiguration);
|
|
1985
|
+
if (this.logger)
|
|
1986
|
+
retrier.logger = this.logger;
|
|
1987
|
+
const request = yield oci_common_1.composeRequest({
|
|
1988
|
+
baseEndpoint: this._endpoint,
|
|
1989
|
+
defaultHeaders: this._defaultHeaders,
|
|
1990
|
+
path: "/inventories/{inventoryId}",
|
|
1991
|
+
method: "DELETE",
|
|
1992
|
+
pathParams: pathParams,
|
|
1993
|
+
headerParams: headerParams,
|
|
1994
|
+
queryParams: queryParams
|
|
1995
|
+
});
|
|
1996
|
+
try {
|
|
1997
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1998
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1999
|
+
responseObject: {},
|
|
2000
|
+
responseHeaders: [
|
|
2001
|
+
{
|
|
2002
|
+
value: response.headers.get("opc-request-id"),
|
|
2003
|
+
key: "opcRequestId",
|
|
2004
|
+
dataType: "string"
|
|
2005
|
+
},
|
|
2006
|
+
{
|
|
2007
|
+
value: response.headers.get("opc-work-request-id"),
|
|
2008
|
+
key: "opcWorkRequestId",
|
|
2009
|
+
dataType: "string"
|
|
2010
|
+
}
|
|
2011
|
+
]
|
|
2012
|
+
});
|
|
2013
|
+
return sdkResponse;
|
|
2014
|
+
}
|
|
2015
|
+
catch (err) {
|
|
2016
|
+
throw err;
|
|
2017
|
+
}
|
|
2018
|
+
});
|
|
2019
|
+
}
|
|
2020
|
+
/**
|
|
2021
|
+
* Gets an asset by identifier.
|
|
2022
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
2023
|
+
* @param GetAssetRequest
|
|
2024
|
+
* @return GetAssetResponse
|
|
2025
|
+
* @throws OciError when an error occurs
|
|
2026
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/GetAsset.ts.html |here} to see how to use GetAsset API.
|
|
2027
|
+
*/
|
|
2028
|
+
getAsset(getAssetRequest) {
|
|
2029
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2030
|
+
if (this.logger)
|
|
2031
|
+
this.logger.debug("Calling operation InventoryClient#getAsset.");
|
|
2032
|
+
const operationName = "getAsset";
|
|
2033
|
+
const apiReferenceLink = "";
|
|
2034
|
+
const pathParams = {
|
|
2035
|
+
"{assetId}": getAssetRequest.assetId
|
|
2036
|
+
};
|
|
2037
|
+
const queryParams = {};
|
|
2038
|
+
let headerParams = {
|
|
2039
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
2040
|
+
"opc-request-id": getAssetRequest.opcRequestId
|
|
2041
|
+
};
|
|
2042
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
2043
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getAssetRequest.retryConfiguration, specRetryConfiguration);
|
|
2044
|
+
if (this.logger)
|
|
2045
|
+
retrier.logger = this.logger;
|
|
2046
|
+
const request = yield oci_common_1.composeRequest({
|
|
2047
|
+
baseEndpoint: this._endpoint,
|
|
2048
|
+
defaultHeaders: this._defaultHeaders,
|
|
2049
|
+
path: "/assets/{assetId}",
|
|
2050
|
+
method: "GET",
|
|
2051
|
+
pathParams: pathParams,
|
|
2052
|
+
headerParams: headerParams,
|
|
2053
|
+
queryParams: queryParams
|
|
2054
|
+
});
|
|
2055
|
+
try {
|
|
2056
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
2057
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
2058
|
+
responseObject: {},
|
|
2059
|
+
body: yield response.json(),
|
|
2060
|
+
bodyKey: "asset",
|
|
2061
|
+
bodyModel: model.Asset,
|
|
2062
|
+
type: "model.Asset",
|
|
2063
|
+
responseHeaders: [
|
|
2064
|
+
{
|
|
2065
|
+
value: response.headers.get("etag"),
|
|
2066
|
+
key: "etag",
|
|
2067
|
+
dataType: "string"
|
|
2068
|
+
},
|
|
2069
|
+
{
|
|
2070
|
+
value: response.headers.get("opc-request-id"),
|
|
2071
|
+
key: "opcRequestId",
|
|
2072
|
+
dataType: "string"
|
|
2073
|
+
}
|
|
2074
|
+
]
|
|
2075
|
+
});
|
|
2076
|
+
return sdkResponse;
|
|
2077
|
+
}
|
|
2078
|
+
catch (err) {
|
|
2079
|
+
throw err;
|
|
2080
|
+
}
|
|
2081
|
+
});
|
|
2082
|
+
}
|
|
2083
|
+
/**
|
|
2084
|
+
* Gets an inventory by identifier.
|
|
2085
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
2086
|
+
* @param GetInventoryRequest
|
|
2087
|
+
* @return GetInventoryResponse
|
|
2088
|
+
* @throws OciError when an error occurs
|
|
2089
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/GetInventory.ts.html |here} to see how to use GetInventory API.
|
|
2090
|
+
*/
|
|
2091
|
+
getInventory(getInventoryRequest) {
|
|
2092
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2093
|
+
if (this.logger)
|
|
2094
|
+
this.logger.debug("Calling operation InventoryClient#getInventory.");
|
|
2095
|
+
const operationName = "getInventory";
|
|
2096
|
+
const apiReferenceLink = "";
|
|
2097
|
+
const pathParams = {
|
|
2098
|
+
"{inventoryId}": getInventoryRequest.inventoryId
|
|
2099
|
+
};
|
|
2100
|
+
const queryParams = {};
|
|
2101
|
+
let headerParams = {
|
|
2102
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
2103
|
+
"opc-request-id": getInventoryRequest.opcRequestId
|
|
2104
|
+
};
|
|
2105
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
2106
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getInventoryRequest.retryConfiguration, specRetryConfiguration);
|
|
2107
|
+
if (this.logger)
|
|
2108
|
+
retrier.logger = this.logger;
|
|
2109
|
+
const request = yield oci_common_1.composeRequest({
|
|
2110
|
+
baseEndpoint: this._endpoint,
|
|
2111
|
+
defaultHeaders: this._defaultHeaders,
|
|
2112
|
+
path: "/inventories/{inventoryId}",
|
|
2113
|
+
method: "GET",
|
|
2114
|
+
pathParams: pathParams,
|
|
2115
|
+
headerParams: headerParams,
|
|
2116
|
+
queryParams: queryParams
|
|
2117
|
+
});
|
|
2118
|
+
try {
|
|
2119
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
2120
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
2121
|
+
responseObject: {},
|
|
2122
|
+
body: yield response.json(),
|
|
2123
|
+
bodyKey: "inventory",
|
|
2124
|
+
bodyModel: model.Inventory,
|
|
2125
|
+
type: "model.Inventory",
|
|
2126
|
+
responseHeaders: [
|
|
2127
|
+
{
|
|
2128
|
+
value: response.headers.get("etag"),
|
|
2129
|
+
key: "etag",
|
|
2130
|
+
dataType: "string"
|
|
2131
|
+
},
|
|
2132
|
+
{
|
|
2133
|
+
value: response.headers.get("opc-request-id"),
|
|
2134
|
+
key: "opcRequestId",
|
|
2135
|
+
dataType: "string"
|
|
2136
|
+
},
|
|
2137
|
+
{
|
|
2138
|
+
value: response.headers.get("opc-work-request-id"),
|
|
2139
|
+
key: "opcWorkRequestId",
|
|
2140
|
+
dataType: "string"
|
|
2141
|
+
}
|
|
2142
|
+
]
|
|
2143
|
+
});
|
|
2144
|
+
return sdkResponse;
|
|
2145
|
+
}
|
|
2146
|
+
catch (err) {
|
|
2147
|
+
throw err;
|
|
2148
|
+
}
|
|
2149
|
+
});
|
|
2150
|
+
}
|
|
2151
|
+
/**
|
|
2152
|
+
* Import resources in inventory.
|
|
2153
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
2154
|
+
* @param ImportInventoryRequest
|
|
2155
|
+
* @return ImportInventoryResponse
|
|
2156
|
+
* @throws OciError when an error occurs
|
|
2157
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/ImportInventory.ts.html |here} to see how to use ImportInventory API.
|
|
2158
|
+
*/
|
|
2159
|
+
importInventory(importInventoryRequest) {
|
|
2160
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2161
|
+
if (this.logger)
|
|
2162
|
+
this.logger.debug("Calling operation InventoryClient#importInventory.");
|
|
2163
|
+
const operationName = "importInventory";
|
|
2164
|
+
const apiReferenceLink = "";
|
|
2165
|
+
const pathParams = {
|
|
2166
|
+
"{inventoryId}": importInventoryRequest.inventoryId
|
|
2167
|
+
};
|
|
2168
|
+
const queryParams = {};
|
|
2169
|
+
let headerParams = {
|
|
2170
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
2171
|
+
"opc-retry-token": importInventoryRequest.opcRetryToken,
|
|
2172
|
+
"opc-request-id": importInventoryRequest.opcRequestId
|
|
2173
|
+
};
|
|
2174
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
2175
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, importInventoryRequest.retryConfiguration, specRetryConfiguration);
|
|
2176
|
+
if (this.logger)
|
|
2177
|
+
retrier.logger = this.logger;
|
|
2178
|
+
const request = yield oci_common_1.composeRequest({
|
|
2179
|
+
baseEndpoint: this._endpoint,
|
|
2180
|
+
defaultHeaders: this._defaultHeaders,
|
|
2181
|
+
path: "/inventories/{inventoryId}/actions/import",
|
|
2182
|
+
method: "POST",
|
|
2183
|
+
bodyContent: common.ObjectSerializer.serialize(importInventoryRequest.importInventoryDetails, "ImportInventoryDetails", model.ImportInventoryDetails.getJsonObj),
|
|
2184
|
+
pathParams: pathParams,
|
|
2185
|
+
headerParams: headerParams,
|
|
2186
|
+
queryParams: queryParams
|
|
2187
|
+
});
|
|
2188
|
+
try {
|
|
2189
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
2190
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
2191
|
+
responseObject: {},
|
|
2192
|
+
responseHeaders: [
|
|
2193
|
+
{
|
|
2194
|
+
value: response.headers.get("opc-request-id"),
|
|
2195
|
+
key: "opcRequestId",
|
|
2196
|
+
dataType: "string"
|
|
2197
|
+
},
|
|
2198
|
+
{
|
|
2199
|
+
value: response.headers.get("opc-work-request-id"),
|
|
2200
|
+
key: "opcWorkRequestId",
|
|
2201
|
+
dataType: "string"
|
|
2202
|
+
}
|
|
2203
|
+
]
|
|
2204
|
+
});
|
|
2205
|
+
return sdkResponse;
|
|
2206
|
+
}
|
|
2207
|
+
catch (err) {
|
|
2208
|
+
throw err;
|
|
2209
|
+
}
|
|
2210
|
+
});
|
|
2211
|
+
}
|
|
2212
|
+
/**
|
|
2213
|
+
* Returns a list of assets.
|
|
2214
|
+
*
|
|
2215
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
2216
|
+
* @param ListAssetsRequest
|
|
2217
|
+
* @return ListAssetsResponse
|
|
2218
|
+
* @throws OciError when an error occurs
|
|
2219
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/ListAssets.ts.html |here} to see how to use ListAssets API.
|
|
2220
|
+
*/
|
|
2221
|
+
listAssets(listAssetsRequest) {
|
|
2222
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2223
|
+
if (this.logger)
|
|
2224
|
+
this.logger.debug("Calling operation InventoryClient#listAssets.");
|
|
2225
|
+
const operationName = "listAssets";
|
|
2226
|
+
const apiReferenceLink = "";
|
|
2227
|
+
const pathParams = {};
|
|
2228
|
+
const queryParams = {
|
|
2229
|
+
"compartmentId": listAssetsRequest.compartmentId,
|
|
2230
|
+
"limit": listAssetsRequest.limit,
|
|
2231
|
+
"page": listAssetsRequest.page,
|
|
2232
|
+
"lifecycleState": listAssetsRequest.lifecycleState,
|
|
2233
|
+
"sourceKey": listAssetsRequest.sourceKey,
|
|
2234
|
+
"externalAssetKey": listAssetsRequest.externalAssetKey,
|
|
2235
|
+
"assetType": listAssetsRequest.assetType,
|
|
2236
|
+
"assetId": listAssetsRequest.assetId,
|
|
2237
|
+
"displayName": listAssetsRequest.displayName,
|
|
2238
|
+
"sortOrder": listAssetsRequest.sortOrder,
|
|
2239
|
+
"sortBy": listAssetsRequest.sortBy,
|
|
2240
|
+
"inventoryId": listAssetsRequest.inventoryId
|
|
2241
|
+
};
|
|
2242
|
+
let headerParams = {
|
|
2243
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
2244
|
+
"opc-request-id": listAssetsRequest.opcRequestId
|
|
2245
|
+
};
|
|
2246
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
2247
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listAssetsRequest.retryConfiguration, specRetryConfiguration);
|
|
2248
|
+
if (this.logger)
|
|
2249
|
+
retrier.logger = this.logger;
|
|
2250
|
+
const request = yield oci_common_1.composeRequest({
|
|
2251
|
+
baseEndpoint: this._endpoint,
|
|
2252
|
+
defaultHeaders: this._defaultHeaders,
|
|
2253
|
+
path: "/assets",
|
|
2254
|
+
method: "GET",
|
|
2255
|
+
pathParams: pathParams,
|
|
2256
|
+
headerParams: headerParams,
|
|
2257
|
+
queryParams: queryParams
|
|
2258
|
+
});
|
|
2259
|
+
try {
|
|
2260
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
2261
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
2262
|
+
responseObject: {},
|
|
2263
|
+
body: yield response.json(),
|
|
2264
|
+
bodyKey: "assetCollection",
|
|
2265
|
+
bodyModel: model.AssetCollection,
|
|
2266
|
+
type: "model.AssetCollection",
|
|
2267
|
+
responseHeaders: [
|
|
2268
|
+
{
|
|
2269
|
+
value: response.headers.get("opc-request-id"),
|
|
2270
|
+
key: "opcRequestId",
|
|
2271
|
+
dataType: "string"
|
|
2272
|
+
},
|
|
2273
|
+
{
|
|
2274
|
+
value: response.headers.get("opc-next-page"),
|
|
2275
|
+
key: "opcNextPage",
|
|
2276
|
+
dataType: "string"
|
|
2277
|
+
}
|
|
2278
|
+
]
|
|
2279
|
+
});
|
|
2280
|
+
return sdkResponse;
|
|
2281
|
+
}
|
|
2282
|
+
catch (err) {
|
|
2283
|
+
throw err;
|
|
2284
|
+
}
|
|
2285
|
+
});
|
|
2286
|
+
}
|
|
2287
|
+
/**
|
|
2288
|
+
* List asset historical metrics.
|
|
2289
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
2290
|
+
* @param ListHistoricalMetricsRequest
|
|
2291
|
+
* @return ListHistoricalMetricsResponse
|
|
2292
|
+
* @throws OciError when an error occurs
|
|
2293
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/ListHistoricalMetrics.ts.html |here} to see how to use ListHistoricalMetrics API.
|
|
2294
|
+
*/
|
|
2295
|
+
listHistoricalMetrics(listHistoricalMetricsRequest) {
|
|
2296
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2297
|
+
if (this.logger)
|
|
2298
|
+
this.logger.debug("Calling operation InventoryClient#listHistoricalMetrics.");
|
|
2299
|
+
const operationName = "listHistoricalMetrics";
|
|
2300
|
+
const apiReferenceLink = "";
|
|
2301
|
+
const pathParams = {
|
|
2302
|
+
"{assetId}": listHistoricalMetricsRequest.assetId
|
|
2303
|
+
};
|
|
2304
|
+
const queryParams = {
|
|
2305
|
+
"limit": listHistoricalMetricsRequest.limit,
|
|
2306
|
+
"page": listHistoricalMetricsRequest.page,
|
|
2307
|
+
"sortOrder": listHistoricalMetricsRequest.sortOrder,
|
|
2308
|
+
"sortBy": listHistoricalMetricsRequest.sortBy
|
|
2309
|
+
};
|
|
2310
|
+
let headerParams = {
|
|
2311
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
2312
|
+
"opc-request-id": listHistoricalMetricsRequest.opcRequestId
|
|
2313
|
+
};
|
|
2314
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
2315
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listHistoricalMetricsRequest.retryConfiguration, specRetryConfiguration);
|
|
2316
|
+
if (this.logger)
|
|
2317
|
+
retrier.logger = this.logger;
|
|
2318
|
+
const request = yield oci_common_1.composeRequest({
|
|
2319
|
+
baseEndpoint: this._endpoint,
|
|
2320
|
+
defaultHeaders: this._defaultHeaders,
|
|
2321
|
+
path: "/assets/{assetId}/historicalMetrics",
|
|
2322
|
+
method: "GET",
|
|
2323
|
+
pathParams: pathParams,
|
|
2324
|
+
headerParams: headerParams,
|
|
2325
|
+
queryParams: queryParams
|
|
2326
|
+
});
|
|
2327
|
+
try {
|
|
2328
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
2329
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
2330
|
+
responseObject: {},
|
|
2331
|
+
body: yield response.json(),
|
|
2332
|
+
bodyKey: "historicalMetricCollection",
|
|
2333
|
+
bodyModel: model.HistoricalMetricCollection,
|
|
2334
|
+
type: "model.HistoricalMetricCollection",
|
|
2335
|
+
responseHeaders: [
|
|
2336
|
+
{
|
|
2337
|
+
value: response.headers.get("opc-request-id"),
|
|
2338
|
+
key: "opcRequestId",
|
|
2339
|
+
dataType: "string"
|
|
2340
|
+
},
|
|
2341
|
+
{
|
|
2342
|
+
value: response.headers.get("opc-next-page"),
|
|
2343
|
+
key: "opcNextPage",
|
|
2344
|
+
dataType: "string"
|
|
2345
|
+
}
|
|
2346
|
+
]
|
|
2347
|
+
});
|
|
2348
|
+
return sdkResponse;
|
|
2349
|
+
}
|
|
2350
|
+
catch (err) {
|
|
2351
|
+
throw err;
|
|
2352
|
+
}
|
|
2353
|
+
});
|
|
2354
|
+
}
|
|
2355
|
+
/**
|
|
2356
|
+
* Returns a list of inventories.
|
|
2357
|
+
*
|
|
2358
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
2359
|
+
* @param ListInventoriesRequest
|
|
2360
|
+
* @return ListInventoriesResponse
|
|
2361
|
+
* @throws OciError when an error occurs
|
|
2362
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/ListInventories.ts.html |here} to see how to use ListInventories API.
|
|
2363
|
+
*/
|
|
2364
|
+
listInventories(listInventoriesRequest) {
|
|
2365
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2366
|
+
if (this.logger)
|
|
2367
|
+
this.logger.debug("Calling operation InventoryClient#listInventories.");
|
|
2368
|
+
const operationName = "listInventories";
|
|
2369
|
+
const apiReferenceLink = "";
|
|
2370
|
+
const pathParams = {};
|
|
2371
|
+
const queryParams = {
|
|
2372
|
+
"compartmentId": listInventoriesRequest.compartmentId,
|
|
2373
|
+
"sortOrder": listInventoriesRequest.sortOrder,
|
|
2374
|
+
"sortBy": listInventoriesRequest.sortBy,
|
|
2375
|
+
"limit": listInventoriesRequest.limit,
|
|
2376
|
+
"page": listInventoriesRequest.page,
|
|
2377
|
+
"lifecycleState": listInventoriesRequest.lifecycleState
|
|
2378
|
+
};
|
|
2379
|
+
let headerParams = {
|
|
2380
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
2381
|
+
"opc-request-id": listInventoriesRequest.opcRequestId
|
|
2382
|
+
};
|
|
2383
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
2384
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listInventoriesRequest.retryConfiguration, specRetryConfiguration);
|
|
2385
|
+
if (this.logger)
|
|
2386
|
+
retrier.logger = this.logger;
|
|
2387
|
+
const request = yield oci_common_1.composeRequest({
|
|
2388
|
+
baseEndpoint: this._endpoint,
|
|
2389
|
+
defaultHeaders: this._defaultHeaders,
|
|
2390
|
+
path: "/inventories",
|
|
2391
|
+
method: "GET",
|
|
2392
|
+
pathParams: pathParams,
|
|
2393
|
+
headerParams: headerParams,
|
|
2394
|
+
queryParams: queryParams
|
|
2395
|
+
});
|
|
2396
|
+
try {
|
|
2397
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
2398
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
2399
|
+
responseObject: {},
|
|
2400
|
+
body: yield response.json(),
|
|
2401
|
+
bodyKey: "inventoryCollection",
|
|
2402
|
+
bodyModel: model.InventoryCollection,
|
|
2403
|
+
type: "model.InventoryCollection",
|
|
2404
|
+
responseHeaders: [
|
|
2405
|
+
{
|
|
2406
|
+
value: response.headers.get("opc-request-id"),
|
|
2407
|
+
key: "opcRequestId",
|
|
2408
|
+
dataType: "string"
|
|
2409
|
+
},
|
|
2410
|
+
{
|
|
2411
|
+
value: response.headers.get("opc-next-page"),
|
|
2412
|
+
key: "opcNextPage",
|
|
2413
|
+
dataType: "string"
|
|
2414
|
+
}
|
|
2415
|
+
]
|
|
2416
|
+
});
|
|
2417
|
+
return sdkResponse;
|
|
2418
|
+
}
|
|
2419
|
+
catch (err) {
|
|
2420
|
+
throw err;
|
|
2421
|
+
}
|
|
2422
|
+
});
|
|
2423
|
+
}
|
|
2424
|
+
/**
|
|
2425
|
+
* Creates or updates all metrics related to the asset.
|
|
2426
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
2427
|
+
* @param SubmitHistoricalMetricsRequest
|
|
2428
|
+
* @return SubmitHistoricalMetricsResponse
|
|
2429
|
+
* @throws OciError when an error occurs
|
|
2430
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/SubmitHistoricalMetrics.ts.html |here} to see how to use SubmitHistoricalMetrics API.
|
|
2431
|
+
*/
|
|
2432
|
+
submitHistoricalMetrics(submitHistoricalMetricsRequest) {
|
|
2433
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2434
|
+
if (this.logger)
|
|
2435
|
+
this.logger.debug("Calling operation InventoryClient#submitHistoricalMetrics.");
|
|
2436
|
+
const operationName = "submitHistoricalMetrics";
|
|
2437
|
+
const apiReferenceLink = "";
|
|
2438
|
+
const pathParams = {
|
|
2439
|
+
"{assetId}": submitHistoricalMetricsRequest.assetId
|
|
2440
|
+
};
|
|
2441
|
+
const queryParams = {};
|
|
2442
|
+
let headerParams = {
|
|
2443
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
2444
|
+
"if-match": submitHistoricalMetricsRequest.ifMatch,
|
|
2445
|
+
"opc-request-id": submitHistoricalMetricsRequest.opcRequestId
|
|
2446
|
+
};
|
|
2447
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
2448
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, submitHistoricalMetricsRequest.retryConfiguration, specRetryConfiguration);
|
|
2449
|
+
if (this.logger)
|
|
2450
|
+
retrier.logger = this.logger;
|
|
2451
|
+
const request = yield oci_common_1.composeRequest({
|
|
2452
|
+
baseEndpoint: this._endpoint,
|
|
2453
|
+
defaultHeaders: this._defaultHeaders,
|
|
2454
|
+
path: "/assets/{assetId}/actions/submitHistoricalMetrics",
|
|
2455
|
+
method: "POST",
|
|
2456
|
+
bodyContent: common.ObjectSerializer.serialize(submitHistoricalMetricsRequest.submitHistoricalMetricsDetails, "SubmitHistoricalMetricsDetails", model.SubmitHistoricalMetricsDetails.getJsonObj),
|
|
2457
|
+
pathParams: pathParams,
|
|
2458
|
+
headerParams: headerParams,
|
|
2459
|
+
queryParams: queryParams
|
|
2460
|
+
});
|
|
2461
|
+
try {
|
|
2462
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
2463
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
2464
|
+
responseObject: {},
|
|
2465
|
+
body: yield response.json(),
|
|
2466
|
+
bodyKey: "historicalMetricCollection",
|
|
2467
|
+
bodyModel: model.HistoricalMetricCollection,
|
|
2468
|
+
type: "model.HistoricalMetricCollection",
|
|
2469
|
+
responseHeaders: [
|
|
2470
|
+
{
|
|
2471
|
+
value: response.headers.get("etag"),
|
|
2472
|
+
key: "etag",
|
|
2473
|
+
dataType: "string"
|
|
2474
|
+
},
|
|
2475
|
+
{
|
|
2476
|
+
value: response.headers.get("opc-request-id"),
|
|
2477
|
+
key: "opcRequestId",
|
|
2478
|
+
dataType: "string"
|
|
2479
|
+
}
|
|
2480
|
+
]
|
|
2481
|
+
});
|
|
2482
|
+
return sdkResponse;
|
|
2483
|
+
}
|
|
2484
|
+
catch (err) {
|
|
2485
|
+
throw err;
|
|
2486
|
+
}
|
|
2487
|
+
});
|
|
2488
|
+
}
|
|
2489
|
+
/**
|
|
2490
|
+
* Updates the asset.
|
|
2491
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
2492
|
+
* @param UpdateAssetRequest
|
|
2493
|
+
* @return UpdateAssetResponse
|
|
2494
|
+
* @throws OciError when an error occurs
|
|
2495
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/UpdateAsset.ts.html |here} to see how to use UpdateAsset API.
|
|
2496
|
+
*/
|
|
2497
|
+
updateAsset(updateAssetRequest) {
|
|
2498
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2499
|
+
if (this.logger)
|
|
2500
|
+
this.logger.debug("Calling operation InventoryClient#updateAsset.");
|
|
2501
|
+
const operationName = "updateAsset";
|
|
2502
|
+
const apiReferenceLink = "";
|
|
2503
|
+
const pathParams = {
|
|
2504
|
+
"{assetId}": updateAssetRequest.assetId
|
|
2505
|
+
};
|
|
2506
|
+
const queryParams = {};
|
|
2507
|
+
let headerParams = {
|
|
2508
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
2509
|
+
"if-match": updateAssetRequest.ifMatch,
|
|
2510
|
+
"opc-request-id": updateAssetRequest.opcRequestId
|
|
2511
|
+
};
|
|
2512
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
2513
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, updateAssetRequest.retryConfiguration, specRetryConfiguration);
|
|
2514
|
+
if (this.logger)
|
|
2515
|
+
retrier.logger = this.logger;
|
|
2516
|
+
const request = yield oci_common_1.composeRequest({
|
|
2517
|
+
baseEndpoint: this._endpoint,
|
|
2518
|
+
defaultHeaders: this._defaultHeaders,
|
|
2519
|
+
path: "/assets/{assetId}",
|
|
2520
|
+
method: "PUT",
|
|
2521
|
+
bodyContent: common.ObjectSerializer.serialize(updateAssetRequest.updateAssetDetails, "UpdateAssetDetails", model.UpdateAssetDetails.getJsonObj),
|
|
2522
|
+
pathParams: pathParams,
|
|
2523
|
+
headerParams: headerParams,
|
|
2524
|
+
queryParams: queryParams
|
|
2525
|
+
});
|
|
2526
|
+
try {
|
|
2527
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
2528
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
2529
|
+
responseObject: {},
|
|
2530
|
+
body: yield response.json(),
|
|
2531
|
+
bodyKey: "asset",
|
|
2532
|
+
bodyModel: model.Asset,
|
|
2533
|
+
type: "model.Asset",
|
|
2534
|
+
responseHeaders: [
|
|
2535
|
+
{
|
|
2536
|
+
value: response.headers.get("etag"),
|
|
2537
|
+
key: "etag",
|
|
2538
|
+
dataType: "string"
|
|
2539
|
+
},
|
|
2540
|
+
{
|
|
2541
|
+
value: response.headers.get("opc-request-id"),
|
|
2542
|
+
key: "opcRequestId",
|
|
2543
|
+
dataType: "string"
|
|
2544
|
+
}
|
|
2545
|
+
]
|
|
2546
|
+
});
|
|
2547
|
+
return sdkResponse;
|
|
2548
|
+
}
|
|
2549
|
+
catch (err) {
|
|
2550
|
+
throw err;
|
|
2551
|
+
}
|
|
2552
|
+
});
|
|
2553
|
+
}
|
|
2554
|
+
/**
|
|
2555
|
+
* Updates an inventory.
|
|
2556
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
2557
|
+
* @param UpdateInventoryRequest
|
|
2558
|
+
* @return UpdateInventoryResponse
|
|
2559
|
+
* @throws OciError when an error occurs
|
|
2560
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/UpdateInventory.ts.html |here} to see how to use UpdateInventory API.
|
|
2561
|
+
*/
|
|
2562
|
+
updateInventory(updateInventoryRequest) {
|
|
2563
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2564
|
+
if (this.logger)
|
|
2565
|
+
this.logger.debug("Calling operation InventoryClient#updateInventory.");
|
|
2566
|
+
const operationName = "updateInventory";
|
|
2567
|
+
const apiReferenceLink = "";
|
|
2568
|
+
const pathParams = {
|
|
2569
|
+
"{inventoryId}": updateInventoryRequest.inventoryId
|
|
2570
|
+
};
|
|
2571
|
+
const queryParams = {};
|
|
2572
|
+
let headerParams = {
|
|
2573
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
2574
|
+
"if-match": updateInventoryRequest.ifMatch,
|
|
2575
|
+
"opc-request-id": updateInventoryRequest.opcRequestId
|
|
2576
|
+
};
|
|
2577
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
2578
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, updateInventoryRequest.retryConfiguration, specRetryConfiguration);
|
|
2579
|
+
if (this.logger)
|
|
2580
|
+
retrier.logger = this.logger;
|
|
2581
|
+
const request = yield oci_common_1.composeRequest({
|
|
2582
|
+
baseEndpoint: this._endpoint,
|
|
2583
|
+
defaultHeaders: this._defaultHeaders,
|
|
2584
|
+
path: "/inventories/{inventoryId}",
|
|
2585
|
+
method: "PUT",
|
|
2586
|
+
bodyContent: common.ObjectSerializer.serialize(updateInventoryRequest.updateInventoryDetails, "UpdateInventoryDetails", model.UpdateInventoryDetails.getJsonObj),
|
|
2587
|
+
pathParams: pathParams,
|
|
2588
|
+
headerParams: headerParams,
|
|
2589
|
+
queryParams: queryParams
|
|
2590
|
+
});
|
|
2591
|
+
try {
|
|
2592
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
2593
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
2594
|
+
responseObject: {},
|
|
2595
|
+
body: yield response.json(),
|
|
2596
|
+
bodyKey: "inventory",
|
|
2597
|
+
bodyModel: model.Inventory,
|
|
2598
|
+
type: "model.Inventory",
|
|
2599
|
+
responseHeaders: [
|
|
2600
|
+
{
|
|
2601
|
+
value: response.headers.get("etag"),
|
|
2602
|
+
key: "etag",
|
|
2603
|
+
dataType: "string"
|
|
2604
|
+
},
|
|
2605
|
+
{
|
|
2606
|
+
value: response.headers.get("opc-request-id"),
|
|
2607
|
+
key: "opcRequestId",
|
|
2608
|
+
dataType: "string"
|
|
2609
|
+
}
|
|
2610
|
+
]
|
|
2611
|
+
});
|
|
2612
|
+
return sdkResponse;
|
|
2613
|
+
}
|
|
2614
|
+
catch (err) {
|
|
2615
|
+
throw err;
|
|
2616
|
+
}
|
|
2617
|
+
});
|
|
2618
|
+
}
|
|
2619
|
+
}
|
|
2620
|
+
exports.InventoryClient = InventoryClient;
|
|
2621
|
+
InventoryClient.serviceEndpointTemplate = "https://cloudbridge.{region}.oci.{secondLevelDomain}";
|
|
2622
|
+
InventoryClient.endpointServiceName = "";
|
|
2623
|
+
var OcbAgentSvcApiKeys;
|
|
2624
|
+
(function (OcbAgentSvcApiKeys) {
|
|
2625
|
+
})(OcbAgentSvcApiKeys = exports.OcbAgentSvcApiKeys || (exports.OcbAgentSvcApiKeys = {}));
|
|
2626
|
+
/**
|
|
2627
|
+
* This service client uses {@link common.CircuitBreaker.DefaultConfiguration} for all the operations by default if no circuit breaker configuration is defined by the user.
|
|
2628
|
+
*/
|
|
2629
|
+
class OcbAgentSvcClient {
|
|
2630
|
+
constructor(params, clientConfiguration) {
|
|
2631
|
+
this["_endpoint"] = "";
|
|
2632
|
+
this["_defaultHeaders"] = {};
|
|
2633
|
+
this._circuitBreaker = null;
|
|
2634
|
+
this._httpOptions = undefined;
|
|
2635
|
+
this.targetService = "OcbAgentSvc";
|
|
2636
|
+
const requestSigner = params.authenticationDetailsProvider
|
|
2637
|
+
? new common.DefaultRequestSigner(params.authenticationDetailsProvider)
|
|
2638
|
+
: null;
|
|
2639
|
+
if (clientConfiguration) {
|
|
2640
|
+
this._clientConfiguration = clientConfiguration;
|
|
2641
|
+
this._circuitBreaker = clientConfiguration.circuitBreaker
|
|
2642
|
+
? clientConfiguration.circuitBreaker.circuit
|
|
2643
|
+
: null;
|
|
2644
|
+
this._httpOptions = clientConfiguration.httpOptions
|
|
2645
|
+
? clientConfiguration.httpOptions
|
|
2646
|
+
: undefined;
|
|
2647
|
+
}
|
|
2648
|
+
// if circuit breaker is not created, check if circuit breaker system is enabled to use default circuit breaker
|
|
2649
|
+
const specCircuitBreakerEnabled = true;
|
|
2650
|
+
if (!this._circuitBreaker &&
|
|
2651
|
+
common.utils.isCircuitBreakerSystemEnabled(clientConfiguration) &&
|
|
2652
|
+
(specCircuitBreakerEnabled || common.CircuitBreaker.DefaultCircuitBreakerOverriden)) {
|
|
2653
|
+
this._circuitBreaker = new common.CircuitBreaker().circuit;
|
|
2654
|
+
}
|
|
2655
|
+
this._httpClient =
|
|
2656
|
+
params.httpClient ||
|
|
2657
|
+
new common.FetchHttpClient(requestSigner, this._circuitBreaker, this._httpOptions);
|
|
2658
|
+
if (params.authenticationDetailsProvider &&
|
|
2659
|
+
common.isRegionProvider(params.authenticationDetailsProvider)) {
|
|
2660
|
+
const provider = params.authenticationDetailsProvider;
|
|
2661
|
+
if (provider.getRegion()) {
|
|
2662
|
+
this.region = provider.getRegion();
|
|
2663
|
+
}
|
|
2664
|
+
}
|
|
2665
|
+
}
|
|
2666
|
+
/**
|
|
2667
|
+
* Get the endpoint that is being used to call (ex, https://www.example.com).
|
|
2668
|
+
*/
|
|
2669
|
+
get endpoint() {
|
|
2670
|
+
return this._endpoint;
|
|
2671
|
+
}
|
|
2672
|
+
/**
|
|
2673
|
+
* Sets the endpoint to call (ex, https://www.example.com).
|
|
2674
|
+
* @param endpoint The endpoint of the service.
|
|
2675
|
+
*/
|
|
2676
|
+
set endpoint(endpoint) {
|
|
2677
|
+
this._endpoint = endpoint;
|
|
2678
|
+
this._endpoint = this._endpoint + "/20220509";
|
|
2679
|
+
if (this.logger)
|
|
2680
|
+
this.logger.info(`OcbAgentSvcClient endpoint set to ${this._endpoint}`);
|
|
2681
|
+
}
|
|
2682
|
+
get logger() {
|
|
2683
|
+
return common.LOG.logger;
|
|
2684
|
+
}
|
|
2685
|
+
/**
|
|
2686
|
+
* Sets the region to call (ex, Region.US_PHOENIX_1).
|
|
2687
|
+
* Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.
|
|
2688
|
+
* @param region The region of the service.
|
|
2689
|
+
*/
|
|
2690
|
+
set region(region) {
|
|
2691
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegion(OcbAgentSvcClient.serviceEndpointTemplate, region, OcbAgentSvcClient.endpointServiceName);
|
|
2692
|
+
}
|
|
2693
|
+
/**
|
|
2694
|
+
* Sets the regionId to call (ex, 'us-phoenix-1').
|
|
2695
|
+
*
|
|
2696
|
+
* Note, this will first try to map the region ID to a known Region and call {@link #region(Region) region}.
|
|
2697
|
+
* If no known Region could be determined, it will create an endpoint assuming its in default Realm OC1
|
|
2698
|
+
* and then call {@link #endpoint(String) endpoint}.
|
|
2699
|
+
* @param regionId The public region ID.
|
|
2700
|
+
*/
|
|
2701
|
+
set regionId(regionId) {
|
|
2702
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(OcbAgentSvcClient.serviceEndpointTemplate, regionId, OcbAgentSvcClient.endpointServiceName);
|
|
2703
|
+
}
|
|
2704
|
+
/**
|
|
2705
|
+
* Creates a new OcbAgentSvcWaiter for resources for this service.
|
|
2706
|
+
*
|
|
2707
|
+
* @param config The waiter configuration for termination and delay strategy
|
|
2708
|
+
* @return The service waiters.
|
|
2709
|
+
*/
|
|
2710
|
+
createWaiters(config) {
|
|
2711
|
+
this._waiters = new ocbagentsvc_waiter_1.OcbAgentSvcWaiter(this, config);
|
|
2712
|
+
return this._waiters;
|
|
2713
|
+
}
|
|
2714
|
+
/**
|
|
2715
|
+
* Gets the waiters available for resources for this service.
|
|
2716
|
+
*
|
|
2717
|
+
* @return The service waiters.
|
|
2718
|
+
*/
|
|
2719
|
+
getWaiters() {
|
|
2720
|
+
if (this._waiters) {
|
|
2721
|
+
return this._waiters;
|
|
2722
|
+
}
|
|
2723
|
+
throw Error("Waiters do not exist. Please create waiters.");
|
|
2724
|
+
}
|
|
2725
|
+
/**
|
|
2726
|
+
* Add a dependency to the environment. When provided, If-Match is checked against ETag values of the resource.
|
|
2727
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
2728
|
+
* @param AddAgentDependencyRequest
|
|
2729
|
+
* @return AddAgentDependencyResponse
|
|
2730
|
+
* @throws OciError when an error occurs
|
|
2731
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/AddAgentDependency.ts.html |here} to see how to use AddAgentDependency API.
|
|
2732
|
+
*/
|
|
2733
|
+
addAgentDependency(addAgentDependencyRequest) {
|
|
2734
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2735
|
+
if (this.logger)
|
|
2736
|
+
this.logger.debug("Calling operation OcbAgentSvcClient#addAgentDependency.");
|
|
2737
|
+
const operationName = "addAgentDependency";
|
|
2738
|
+
const apiReferenceLink = "";
|
|
2739
|
+
const pathParams = {
|
|
2740
|
+
"{environmentId}": addAgentDependencyRequest.environmentId
|
|
2741
|
+
};
|
|
2742
|
+
const queryParams = {};
|
|
2743
|
+
let headerParams = {
|
|
2744
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
2745
|
+
"if-match": addAgentDependencyRequest.ifMatch,
|
|
2746
|
+
"opc-retry-token": addAgentDependencyRequest.opcRetryToken,
|
|
2747
|
+
"opc-request-id": addAgentDependencyRequest.opcRequestId
|
|
2748
|
+
};
|
|
2749
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
2750
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, addAgentDependencyRequest.retryConfiguration, specRetryConfiguration);
|
|
2751
|
+
if (this.logger)
|
|
2752
|
+
retrier.logger = this.logger;
|
|
2753
|
+
const request = yield oci_common_1.composeRequest({
|
|
2754
|
+
baseEndpoint: this._endpoint,
|
|
2755
|
+
defaultHeaders: this._defaultHeaders,
|
|
2756
|
+
path: "/environments/{environmentId}/actions/addAgentDependency",
|
|
2757
|
+
method: "POST",
|
|
2758
|
+
bodyContent: common.ObjectSerializer.serialize(addAgentDependencyRequest.addAgentDependencyDetails, "AddAgentDependencyDetails", model.AddAgentDependencyDetails.getJsonObj),
|
|
2759
|
+
pathParams: pathParams,
|
|
2760
|
+
headerParams: headerParams,
|
|
2761
|
+
queryParams: queryParams
|
|
2762
|
+
});
|
|
2763
|
+
try {
|
|
2764
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
2765
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
2766
|
+
responseObject: {},
|
|
2767
|
+
body: yield response.json(),
|
|
2768
|
+
bodyKey: "environment",
|
|
2769
|
+
bodyModel: model.Environment,
|
|
2770
|
+
type: "model.Environment",
|
|
2771
|
+
responseHeaders: [
|
|
2772
|
+
{
|
|
2773
|
+
value: response.headers.get("etag"),
|
|
2774
|
+
key: "etag",
|
|
2775
|
+
dataType: "string"
|
|
2776
|
+
},
|
|
2777
|
+
{
|
|
2778
|
+
value: response.headers.get("opc-request-id"),
|
|
2779
|
+
key: "opcRequestId",
|
|
2780
|
+
dataType: "string"
|
|
2781
|
+
}
|
|
2782
|
+
]
|
|
2783
|
+
});
|
|
2784
|
+
return sdkResponse;
|
|
2785
|
+
}
|
|
2786
|
+
catch (err) {
|
|
2787
|
+
throw err;
|
|
2788
|
+
}
|
|
2789
|
+
});
|
|
2790
|
+
}
|
|
2791
|
+
/**
|
|
2792
|
+
* Moves an Agent resource from one compartment identifier to another. When provided, If-Match is checked against ETag values of the resource.
|
|
2793
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
2794
|
+
* @param ChangeAgentCompartmentRequest
|
|
2795
|
+
* @return ChangeAgentCompartmentResponse
|
|
2796
|
+
* @throws OciError when an error occurs
|
|
2797
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/ChangeAgentCompartment.ts.html |here} to see how to use ChangeAgentCompartment API.
|
|
2798
|
+
*/
|
|
2799
|
+
changeAgentCompartment(changeAgentCompartmentRequest) {
|
|
2800
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2801
|
+
if (this.logger)
|
|
2802
|
+
this.logger.debug("Calling operation OcbAgentSvcClient#changeAgentCompartment.");
|
|
2803
|
+
const operationName = "changeAgentCompartment";
|
|
2804
|
+
const apiReferenceLink = "";
|
|
2805
|
+
const pathParams = {
|
|
2806
|
+
"{agentId}": changeAgentCompartmentRequest.agentId
|
|
2807
|
+
};
|
|
2808
|
+
const queryParams = {};
|
|
2809
|
+
let headerParams = {
|
|
2810
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
2811
|
+
"if-match": changeAgentCompartmentRequest.ifMatch,
|
|
2812
|
+
"opc-request-id": changeAgentCompartmentRequest.opcRequestId,
|
|
2813
|
+
"opc-retry-token": changeAgentCompartmentRequest.opcRetryToken
|
|
2814
|
+
};
|
|
2815
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
2816
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, changeAgentCompartmentRequest.retryConfiguration, specRetryConfiguration);
|
|
2817
|
+
if (this.logger)
|
|
2818
|
+
retrier.logger = this.logger;
|
|
2819
|
+
const request = yield oci_common_1.composeRequest({
|
|
2820
|
+
baseEndpoint: this._endpoint,
|
|
2821
|
+
defaultHeaders: this._defaultHeaders,
|
|
2822
|
+
path: "/agents/{agentId}/actions/changeCompartment",
|
|
2823
|
+
method: "POST",
|
|
2824
|
+
bodyContent: common.ObjectSerializer.serialize(changeAgentCompartmentRequest.changeAgentCompartmentDetails, "ChangeAgentCompartmentDetails", model.ChangeAgentCompartmentDetails.getJsonObj),
|
|
2825
|
+
pathParams: pathParams,
|
|
2826
|
+
headerParams: headerParams,
|
|
2827
|
+
queryParams: queryParams
|
|
2828
|
+
});
|
|
2829
|
+
try {
|
|
2830
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
2831
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
2832
|
+
responseObject: {},
|
|
2833
|
+
responseHeaders: [
|
|
2834
|
+
{
|
|
2835
|
+
value: response.headers.get("opc-work-request-id"),
|
|
2836
|
+
key: "opcWorkRequestId",
|
|
2837
|
+
dataType: "string"
|
|
2838
|
+
},
|
|
2839
|
+
{
|
|
2840
|
+
value: response.headers.get("opc-request-id"),
|
|
2841
|
+
key: "opcRequestId",
|
|
2842
|
+
dataType: "string"
|
|
2843
|
+
}
|
|
2844
|
+
]
|
|
2845
|
+
});
|
|
2846
|
+
return sdkResponse;
|
|
2847
|
+
}
|
|
2848
|
+
catch (err) {
|
|
2849
|
+
throw err;
|
|
2850
|
+
}
|
|
2851
|
+
});
|
|
2852
|
+
}
|
|
2853
|
+
/**
|
|
2854
|
+
* Moves a AgentDependency resource from one compartment identifier to another. When provided, If-Match is checked against ETag values of the resource.
|
|
2855
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
2856
|
+
* @param ChangeAgentDependencyCompartmentRequest
|
|
2857
|
+
* @return ChangeAgentDependencyCompartmentResponse
|
|
2858
|
+
* @throws OciError when an error occurs
|
|
2859
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/ChangeAgentDependencyCompartment.ts.html |here} to see how to use ChangeAgentDependencyCompartment API.
|
|
2860
|
+
*/
|
|
2861
|
+
changeAgentDependencyCompartment(changeAgentDependencyCompartmentRequest) {
|
|
2862
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2863
|
+
if (this.logger)
|
|
2864
|
+
this.logger.debug("Calling operation OcbAgentSvcClient#changeAgentDependencyCompartment.");
|
|
2865
|
+
const operationName = "changeAgentDependencyCompartment";
|
|
2866
|
+
const apiReferenceLink = "";
|
|
2867
|
+
const pathParams = {
|
|
2868
|
+
"{agentDependencyId}": changeAgentDependencyCompartmentRequest.agentDependencyId
|
|
2869
|
+
};
|
|
2870
|
+
const queryParams = {};
|
|
2871
|
+
let headerParams = {
|
|
2872
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
2873
|
+
"if-match": changeAgentDependencyCompartmentRequest.ifMatch,
|
|
2874
|
+
"opc-request-id": changeAgentDependencyCompartmentRequest.opcRequestId,
|
|
2875
|
+
"opc-retry-token": changeAgentDependencyCompartmentRequest.opcRetryToken
|
|
2876
|
+
};
|
|
2877
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
2878
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, changeAgentDependencyCompartmentRequest.retryConfiguration, specRetryConfiguration);
|
|
2879
|
+
if (this.logger)
|
|
2880
|
+
retrier.logger = this.logger;
|
|
2881
|
+
const request = yield oci_common_1.composeRequest({
|
|
2882
|
+
baseEndpoint: this._endpoint,
|
|
2883
|
+
defaultHeaders: this._defaultHeaders,
|
|
2884
|
+
path: "/agentDependencies/{agentDependencyId}/actions/changeCompartment",
|
|
2885
|
+
method: "POST",
|
|
2886
|
+
bodyContent: common.ObjectSerializer.serialize(changeAgentDependencyCompartmentRequest.changeAgentDependencyCompartmentDetails, "ChangeAgentDependencyCompartmentDetails", model.ChangeAgentDependencyCompartmentDetails.getJsonObj),
|
|
2887
|
+
pathParams: pathParams,
|
|
2888
|
+
headerParams: headerParams,
|
|
2889
|
+
queryParams: queryParams
|
|
2890
|
+
});
|
|
2891
|
+
try {
|
|
2892
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
2893
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
2894
|
+
responseObject: {},
|
|
2895
|
+
responseHeaders: [
|
|
2896
|
+
{
|
|
2897
|
+
value: response.headers.get("opc-request-id"),
|
|
2898
|
+
key: "opcRequestId",
|
|
2899
|
+
dataType: "string"
|
|
2900
|
+
}
|
|
2901
|
+
]
|
|
2902
|
+
});
|
|
2903
|
+
return sdkResponse;
|
|
2904
|
+
}
|
|
2905
|
+
catch (err) {
|
|
2906
|
+
throw err;
|
|
2907
|
+
}
|
|
2908
|
+
});
|
|
2909
|
+
}
|
|
2910
|
+
/**
|
|
2911
|
+
* Moves a source environment resource from one compartment identifier to another. When provided, If-Match is checked against ETag values of the resource.
|
|
2912
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
2913
|
+
* @param ChangeEnvironmentCompartmentRequest
|
|
2914
|
+
* @return ChangeEnvironmentCompartmentResponse
|
|
2915
|
+
* @throws OciError when an error occurs
|
|
2916
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/ChangeEnvironmentCompartment.ts.html |here} to see how to use ChangeEnvironmentCompartment API.
|
|
2917
|
+
*/
|
|
2918
|
+
changeEnvironmentCompartment(changeEnvironmentCompartmentRequest) {
|
|
2919
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2920
|
+
if (this.logger)
|
|
2921
|
+
this.logger.debug("Calling operation OcbAgentSvcClient#changeEnvironmentCompartment.");
|
|
2922
|
+
const operationName = "changeEnvironmentCompartment";
|
|
2923
|
+
const apiReferenceLink = "";
|
|
2924
|
+
const pathParams = {
|
|
2925
|
+
"{environmentId}": changeEnvironmentCompartmentRequest.environmentId
|
|
2926
|
+
};
|
|
2927
|
+
const queryParams = {};
|
|
2928
|
+
let headerParams = {
|
|
2929
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
2930
|
+
"if-match": changeEnvironmentCompartmentRequest.ifMatch,
|
|
2931
|
+
"opc-request-id": changeEnvironmentCompartmentRequest.opcRequestId,
|
|
2932
|
+
"opc-retry-token": changeEnvironmentCompartmentRequest.opcRetryToken
|
|
2933
|
+
};
|
|
2934
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
2935
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, changeEnvironmentCompartmentRequest.retryConfiguration, specRetryConfiguration);
|
|
2936
|
+
if (this.logger)
|
|
2937
|
+
retrier.logger = this.logger;
|
|
2938
|
+
const request = yield oci_common_1.composeRequest({
|
|
2939
|
+
baseEndpoint: this._endpoint,
|
|
2940
|
+
defaultHeaders: this._defaultHeaders,
|
|
2941
|
+
path: "/environments/{environmentId}/actions/changeCompartment",
|
|
2942
|
+
method: "POST",
|
|
2943
|
+
bodyContent: common.ObjectSerializer.serialize(changeEnvironmentCompartmentRequest.changeEnvironmentCompartmentDetails, "ChangeEnvironmentCompartmentDetails", model.ChangeEnvironmentCompartmentDetails.getJsonObj),
|
|
2944
|
+
pathParams: pathParams,
|
|
2945
|
+
headerParams: headerParams,
|
|
2946
|
+
queryParams: queryParams
|
|
2947
|
+
});
|
|
2948
|
+
try {
|
|
2949
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
2950
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
2951
|
+
responseObject: {},
|
|
2952
|
+
responseHeaders: [
|
|
2953
|
+
{
|
|
2954
|
+
value: response.headers.get("opc-work-request-id"),
|
|
2955
|
+
key: "opcWorkRequestId",
|
|
2956
|
+
dataType: "string"
|
|
2957
|
+
},
|
|
2958
|
+
{
|
|
2959
|
+
value: response.headers.get("opc-request-id"),
|
|
2960
|
+
key: "opcRequestId",
|
|
2961
|
+
dataType: "string"
|
|
2962
|
+
}
|
|
2963
|
+
]
|
|
2964
|
+
});
|
|
2965
|
+
return sdkResponse;
|
|
2966
|
+
}
|
|
2967
|
+
catch (err) {
|
|
2968
|
+
throw err;
|
|
2969
|
+
}
|
|
2970
|
+
});
|
|
2971
|
+
}
|
|
2972
|
+
/**
|
|
2973
|
+
* Creates an Agent.
|
|
2974
|
+
*
|
|
2975
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
2976
|
+
* @param CreateAgentRequest
|
|
2977
|
+
* @return CreateAgentResponse
|
|
2978
|
+
* @throws OciError when an error occurs
|
|
2979
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/CreateAgent.ts.html |here} to see how to use CreateAgent API.
|
|
2980
|
+
*/
|
|
2981
|
+
createAgent(createAgentRequest) {
|
|
2982
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2983
|
+
if (this.logger)
|
|
2984
|
+
this.logger.debug("Calling operation OcbAgentSvcClient#createAgent.");
|
|
2985
|
+
const operationName = "createAgent";
|
|
2986
|
+
const apiReferenceLink = "";
|
|
2987
|
+
const pathParams = {};
|
|
2988
|
+
const queryParams = {};
|
|
2989
|
+
let headerParams = {
|
|
2990
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
2991
|
+
"opc-retry-token": createAgentRequest.opcRetryToken,
|
|
2992
|
+
"opc-request-id": createAgentRequest.opcRequestId
|
|
2993
|
+
};
|
|
2994
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
2995
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, createAgentRequest.retryConfiguration, specRetryConfiguration);
|
|
2996
|
+
if (this.logger)
|
|
2997
|
+
retrier.logger = this.logger;
|
|
2998
|
+
const request = yield oci_common_1.composeRequest({
|
|
2999
|
+
baseEndpoint: this._endpoint,
|
|
3000
|
+
defaultHeaders: this._defaultHeaders,
|
|
3001
|
+
path: "/agents",
|
|
3002
|
+
method: "POST",
|
|
3003
|
+
bodyContent: common.ObjectSerializer.serialize(createAgentRequest.createAgentDetails, "CreateAgentDetails", model.CreateAgentDetails.getJsonObj),
|
|
3004
|
+
pathParams: pathParams,
|
|
3005
|
+
headerParams: headerParams,
|
|
3006
|
+
queryParams: queryParams
|
|
3007
|
+
});
|
|
3008
|
+
try {
|
|
3009
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
3010
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
3011
|
+
responseObject: {},
|
|
3012
|
+
body: yield response.json(),
|
|
3013
|
+
bodyKey: "agent",
|
|
3014
|
+
bodyModel: model.Agent,
|
|
3015
|
+
type: "model.Agent",
|
|
3016
|
+
responseHeaders: [
|
|
3017
|
+
{
|
|
3018
|
+
value: response.headers.get("etag"),
|
|
3019
|
+
key: "etag",
|
|
3020
|
+
dataType: "string"
|
|
3021
|
+
},
|
|
3022
|
+
{
|
|
3023
|
+
value: response.headers.get("opc-request-id"),
|
|
3024
|
+
key: "opcRequestId",
|
|
3025
|
+
dataType: "string"
|
|
3026
|
+
}
|
|
3027
|
+
]
|
|
3028
|
+
});
|
|
3029
|
+
return sdkResponse;
|
|
3030
|
+
}
|
|
3031
|
+
catch (err) {
|
|
3032
|
+
throw err;
|
|
3033
|
+
}
|
|
3034
|
+
});
|
|
3035
|
+
}
|
|
3036
|
+
/**
|
|
3037
|
+
* Creates an AgentDependency.
|
|
3038
|
+
*
|
|
3039
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
3040
|
+
* @param CreateAgentDependencyRequest
|
|
3041
|
+
* @return CreateAgentDependencyResponse
|
|
3042
|
+
* @throws OciError when an error occurs
|
|
3043
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/CreateAgentDependency.ts.html |here} to see how to use CreateAgentDependency API.
|
|
3044
|
+
*/
|
|
3045
|
+
createAgentDependency(createAgentDependencyRequest) {
|
|
3046
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3047
|
+
if (this.logger)
|
|
3048
|
+
this.logger.debug("Calling operation OcbAgentSvcClient#createAgentDependency.");
|
|
3049
|
+
const operationName = "createAgentDependency";
|
|
3050
|
+
const apiReferenceLink = "";
|
|
3051
|
+
const pathParams = {};
|
|
3052
|
+
const queryParams = {};
|
|
3053
|
+
let headerParams = {
|
|
3054
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
3055
|
+
"opc-retry-token": createAgentDependencyRequest.opcRetryToken,
|
|
3056
|
+
"opc-request-id": createAgentDependencyRequest.opcRequestId
|
|
3057
|
+
};
|
|
3058
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
3059
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, createAgentDependencyRequest.retryConfiguration, specRetryConfiguration);
|
|
3060
|
+
if (this.logger)
|
|
3061
|
+
retrier.logger = this.logger;
|
|
3062
|
+
const request = yield oci_common_1.composeRequest({
|
|
3063
|
+
baseEndpoint: this._endpoint,
|
|
3064
|
+
defaultHeaders: this._defaultHeaders,
|
|
3065
|
+
path: "/agentDependencies",
|
|
3066
|
+
method: "POST",
|
|
3067
|
+
bodyContent: common.ObjectSerializer.serialize(createAgentDependencyRequest.createAgentDependencyDetails, "CreateAgentDependencyDetails", model.CreateAgentDependencyDetails.getJsonObj),
|
|
3068
|
+
pathParams: pathParams,
|
|
3069
|
+
headerParams: headerParams,
|
|
3070
|
+
queryParams: queryParams
|
|
3071
|
+
});
|
|
3072
|
+
try {
|
|
3073
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
3074
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
3075
|
+
responseObject: {},
|
|
3076
|
+
body: yield response.json(),
|
|
3077
|
+
bodyKey: "agentDependency",
|
|
3078
|
+
bodyModel: model.AgentDependency,
|
|
3079
|
+
type: "model.AgentDependency",
|
|
3080
|
+
responseHeaders: [
|
|
3081
|
+
{
|
|
3082
|
+
value: response.headers.get("etag"),
|
|
3083
|
+
key: "etag",
|
|
3084
|
+
dataType: "string"
|
|
3085
|
+
},
|
|
3086
|
+
{
|
|
3087
|
+
value: response.headers.get("opc-request-id"),
|
|
3088
|
+
key: "opcRequestId",
|
|
3089
|
+
dataType: "string"
|
|
3090
|
+
},
|
|
3091
|
+
{
|
|
3092
|
+
value: response.headers.get("opc-work-request-id"),
|
|
3093
|
+
key: "opcWorkRequestId",
|
|
3094
|
+
dataType: "string"
|
|
3095
|
+
}
|
|
3096
|
+
]
|
|
3097
|
+
});
|
|
3098
|
+
return sdkResponse;
|
|
3099
|
+
}
|
|
3100
|
+
catch (err) {
|
|
3101
|
+
throw err;
|
|
3102
|
+
}
|
|
3103
|
+
});
|
|
3104
|
+
}
|
|
3105
|
+
/**
|
|
3106
|
+
* Creates a source environment.
|
|
3107
|
+
*
|
|
3108
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
3109
|
+
* @param CreateEnvironmentRequest
|
|
3110
|
+
* @return CreateEnvironmentResponse
|
|
3111
|
+
* @throws OciError when an error occurs
|
|
3112
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/CreateEnvironment.ts.html |here} to see how to use CreateEnvironment API.
|
|
3113
|
+
*/
|
|
3114
|
+
createEnvironment(createEnvironmentRequest) {
|
|
3115
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3116
|
+
if (this.logger)
|
|
3117
|
+
this.logger.debug("Calling operation OcbAgentSvcClient#createEnvironment.");
|
|
3118
|
+
const operationName = "createEnvironment";
|
|
3119
|
+
const apiReferenceLink = "";
|
|
3120
|
+
const pathParams = {};
|
|
3121
|
+
const queryParams = {};
|
|
3122
|
+
let headerParams = {
|
|
3123
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
3124
|
+
"opc-retry-token": createEnvironmentRequest.opcRetryToken,
|
|
3125
|
+
"opc-request-id": createEnvironmentRequest.opcRequestId
|
|
3126
|
+
};
|
|
3127
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
3128
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, createEnvironmentRequest.retryConfiguration, specRetryConfiguration);
|
|
3129
|
+
if (this.logger)
|
|
3130
|
+
retrier.logger = this.logger;
|
|
3131
|
+
const request = yield oci_common_1.composeRequest({
|
|
3132
|
+
baseEndpoint: this._endpoint,
|
|
3133
|
+
defaultHeaders: this._defaultHeaders,
|
|
3134
|
+
path: "/environments",
|
|
3135
|
+
method: "POST",
|
|
3136
|
+
bodyContent: common.ObjectSerializer.serialize(createEnvironmentRequest.createEnvironmentDetails, "CreateEnvironmentDetails", model.CreateEnvironmentDetails.getJsonObj),
|
|
3137
|
+
pathParams: pathParams,
|
|
3138
|
+
headerParams: headerParams,
|
|
3139
|
+
queryParams: queryParams
|
|
3140
|
+
});
|
|
3141
|
+
try {
|
|
3142
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
3143
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
3144
|
+
responseObject: {},
|
|
3145
|
+
body: yield response.json(),
|
|
3146
|
+
bodyKey: "environment",
|
|
3147
|
+
bodyModel: model.Environment,
|
|
3148
|
+
type: "model.Environment",
|
|
3149
|
+
responseHeaders: [
|
|
3150
|
+
{
|
|
3151
|
+
value: response.headers.get("etag"),
|
|
3152
|
+
key: "etag",
|
|
3153
|
+
dataType: "string"
|
|
3154
|
+
},
|
|
3155
|
+
{
|
|
3156
|
+
value: response.headers.get("opc-request-id"),
|
|
3157
|
+
key: "opcRequestId",
|
|
3158
|
+
dataType: "string"
|
|
3159
|
+
}
|
|
3160
|
+
]
|
|
3161
|
+
});
|
|
3162
|
+
return sdkResponse;
|
|
3163
|
+
}
|
|
3164
|
+
catch (err) {
|
|
3165
|
+
throw err;
|
|
3166
|
+
}
|
|
3167
|
+
});
|
|
3168
|
+
}
|
|
3169
|
+
/**
|
|
3170
|
+
* Deletes an Agent resource identified by an identifier.
|
|
3171
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
3172
|
+
* @param DeleteAgentRequest
|
|
3173
|
+
* @return DeleteAgentResponse
|
|
3174
|
+
* @throws OciError when an error occurs
|
|
3175
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/DeleteAgent.ts.html |here} to see how to use DeleteAgent API.
|
|
3176
|
+
*/
|
|
3177
|
+
deleteAgent(deleteAgentRequest) {
|
|
3178
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3179
|
+
if (this.logger)
|
|
3180
|
+
this.logger.debug("Calling operation OcbAgentSvcClient#deleteAgent.");
|
|
3181
|
+
const operationName = "deleteAgent";
|
|
3182
|
+
const apiReferenceLink = "";
|
|
3183
|
+
const pathParams = {
|
|
3184
|
+
"{agentId}": deleteAgentRequest.agentId
|
|
3185
|
+
};
|
|
3186
|
+
const queryParams = {};
|
|
3187
|
+
let headerParams = {
|
|
3188
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
3189
|
+
"if-match": deleteAgentRequest.ifMatch,
|
|
3190
|
+
"opc-request-id": deleteAgentRequest.opcRequestId,
|
|
3191
|
+
"opc-retry-token": deleteAgentRequest.opcRetryToken
|
|
3192
|
+
};
|
|
3193
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
3194
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, deleteAgentRequest.retryConfiguration, specRetryConfiguration);
|
|
3195
|
+
if (this.logger)
|
|
3196
|
+
retrier.logger = this.logger;
|
|
3197
|
+
const request = yield oci_common_1.composeRequest({
|
|
3198
|
+
baseEndpoint: this._endpoint,
|
|
3199
|
+
defaultHeaders: this._defaultHeaders,
|
|
3200
|
+
path: "/agents/{agentId}",
|
|
3201
|
+
method: "DELETE",
|
|
3202
|
+
pathParams: pathParams,
|
|
3203
|
+
headerParams: headerParams,
|
|
3204
|
+
queryParams: queryParams
|
|
3205
|
+
});
|
|
3206
|
+
try {
|
|
3207
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
3208
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
3209
|
+
responseObject: {},
|
|
3210
|
+
responseHeaders: [
|
|
3211
|
+
{
|
|
3212
|
+
value: response.headers.get("opc-request-id"),
|
|
3213
|
+
key: "opcRequestId",
|
|
3214
|
+
dataType: "string"
|
|
3215
|
+
}
|
|
3216
|
+
]
|
|
3217
|
+
});
|
|
3218
|
+
return sdkResponse;
|
|
3219
|
+
}
|
|
3220
|
+
catch (err) {
|
|
3221
|
+
throw err;
|
|
3222
|
+
}
|
|
3223
|
+
});
|
|
3224
|
+
}
|
|
3225
|
+
/**
|
|
3226
|
+
* Deletes the AgentDependency resource based on an identifier.
|
|
3227
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
3228
|
+
* @param DeleteAgentDependencyRequest
|
|
3229
|
+
* @return DeleteAgentDependencyResponse
|
|
3230
|
+
* @throws OciError when an error occurs
|
|
3231
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/DeleteAgentDependency.ts.html |here} to see how to use DeleteAgentDependency API.
|
|
3232
|
+
*/
|
|
3233
|
+
deleteAgentDependency(deleteAgentDependencyRequest) {
|
|
3234
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3235
|
+
if (this.logger)
|
|
3236
|
+
this.logger.debug("Calling operation OcbAgentSvcClient#deleteAgentDependency.");
|
|
3237
|
+
const operationName = "deleteAgentDependency";
|
|
3238
|
+
const apiReferenceLink = "";
|
|
3239
|
+
const pathParams = {
|
|
3240
|
+
"{agentDependencyId}": deleteAgentDependencyRequest.agentDependencyId
|
|
3241
|
+
};
|
|
3242
|
+
const queryParams = {};
|
|
3243
|
+
let headerParams = {
|
|
3244
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
3245
|
+
"if-match": deleteAgentDependencyRequest.ifMatch,
|
|
3246
|
+
"opc-request-id": deleteAgentDependencyRequest.opcRequestId
|
|
3247
|
+
};
|
|
3248
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
3249
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, deleteAgentDependencyRequest.retryConfiguration, specRetryConfiguration);
|
|
3250
|
+
if (this.logger)
|
|
3251
|
+
retrier.logger = this.logger;
|
|
3252
|
+
const request = yield oci_common_1.composeRequest({
|
|
3253
|
+
baseEndpoint: this._endpoint,
|
|
3254
|
+
defaultHeaders: this._defaultHeaders,
|
|
3255
|
+
path: "/agentDependencies/{agentDependencyId}",
|
|
3256
|
+
method: "DELETE",
|
|
3257
|
+
pathParams: pathParams,
|
|
3258
|
+
headerParams: headerParams,
|
|
3259
|
+
queryParams: queryParams
|
|
3260
|
+
});
|
|
3261
|
+
try {
|
|
3262
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
3263
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
3264
|
+
responseObject: {},
|
|
3265
|
+
responseHeaders: [
|
|
3266
|
+
{
|
|
3267
|
+
value: response.headers.get("opc-request-id"),
|
|
3268
|
+
key: "opcRequestId",
|
|
3269
|
+
dataType: "string"
|
|
3270
|
+
}
|
|
3271
|
+
]
|
|
3272
|
+
});
|
|
3273
|
+
return sdkResponse;
|
|
3274
|
+
}
|
|
3275
|
+
catch (err) {
|
|
3276
|
+
throw err;
|
|
3277
|
+
}
|
|
3278
|
+
});
|
|
3279
|
+
}
|
|
3280
|
+
/**
|
|
3281
|
+
* Deletes a the source environment resource identified by an identifier.
|
|
3282
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
3283
|
+
* @param DeleteEnvironmentRequest
|
|
3284
|
+
* @return DeleteEnvironmentResponse
|
|
3285
|
+
* @throws OciError when an error occurs
|
|
3286
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/DeleteEnvironment.ts.html |here} to see how to use DeleteEnvironment API.
|
|
3287
|
+
*/
|
|
3288
|
+
deleteEnvironment(deleteEnvironmentRequest) {
|
|
3289
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3290
|
+
if (this.logger)
|
|
3291
|
+
this.logger.debug("Calling operation OcbAgentSvcClient#deleteEnvironment.");
|
|
3292
|
+
const operationName = "deleteEnvironment";
|
|
3293
|
+
const apiReferenceLink = "";
|
|
3294
|
+
const pathParams = {
|
|
3295
|
+
"{environmentId}": deleteEnvironmentRequest.environmentId
|
|
3296
|
+
};
|
|
3297
|
+
const queryParams = {};
|
|
3298
|
+
let headerParams = {
|
|
3299
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
3300
|
+
"if-match": deleteEnvironmentRequest.ifMatch,
|
|
3301
|
+
"opc-request-id": deleteEnvironmentRequest.opcRequestId
|
|
3302
|
+
};
|
|
3303
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
3304
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, deleteEnvironmentRequest.retryConfiguration, specRetryConfiguration);
|
|
3305
|
+
if (this.logger)
|
|
3306
|
+
retrier.logger = this.logger;
|
|
3307
|
+
const request = yield oci_common_1.composeRequest({
|
|
3308
|
+
baseEndpoint: this._endpoint,
|
|
3309
|
+
defaultHeaders: this._defaultHeaders,
|
|
3310
|
+
path: "/environments/{environmentId}",
|
|
3311
|
+
method: "DELETE",
|
|
3312
|
+
pathParams: pathParams,
|
|
3313
|
+
headerParams: headerParams,
|
|
3314
|
+
queryParams: queryParams
|
|
3315
|
+
});
|
|
3316
|
+
try {
|
|
3317
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
3318
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
3319
|
+
responseObject: {},
|
|
3320
|
+
responseHeaders: [
|
|
3321
|
+
{
|
|
3322
|
+
value: response.headers.get("opc-request-id"),
|
|
3323
|
+
key: "opcRequestId",
|
|
3324
|
+
dataType: "string"
|
|
3325
|
+
}
|
|
3326
|
+
]
|
|
3327
|
+
});
|
|
3328
|
+
return sdkResponse;
|
|
3329
|
+
}
|
|
3330
|
+
catch (err) {
|
|
3331
|
+
throw err;
|
|
3332
|
+
}
|
|
3333
|
+
});
|
|
3334
|
+
}
|
|
3335
|
+
/**
|
|
3336
|
+
* Gets an Agent by identifier.
|
|
3337
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
3338
|
+
* @param GetAgentRequest
|
|
3339
|
+
* @return GetAgentResponse
|
|
3340
|
+
* @throws OciError when an error occurs
|
|
3341
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/GetAgent.ts.html |here} to see how to use GetAgent API.
|
|
3342
|
+
*/
|
|
3343
|
+
getAgent(getAgentRequest) {
|
|
3344
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3345
|
+
if (this.logger)
|
|
3346
|
+
this.logger.debug("Calling operation OcbAgentSvcClient#getAgent.");
|
|
3347
|
+
const operationName = "getAgent";
|
|
3348
|
+
const apiReferenceLink = "";
|
|
3349
|
+
const pathParams = {
|
|
3350
|
+
"{agentId}": getAgentRequest.agentId
|
|
3351
|
+
};
|
|
3352
|
+
const queryParams = {};
|
|
3353
|
+
let headerParams = {
|
|
3354
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
3355
|
+
"opc-request-id": getAgentRequest.opcRequestId
|
|
3356
|
+
};
|
|
3357
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
3358
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getAgentRequest.retryConfiguration, specRetryConfiguration);
|
|
3359
|
+
if (this.logger)
|
|
3360
|
+
retrier.logger = this.logger;
|
|
3361
|
+
const request = yield oci_common_1.composeRequest({
|
|
3362
|
+
baseEndpoint: this._endpoint,
|
|
3363
|
+
defaultHeaders: this._defaultHeaders,
|
|
3364
|
+
path: "/agents/{agentId}",
|
|
3365
|
+
method: "GET",
|
|
3366
|
+
pathParams: pathParams,
|
|
3367
|
+
headerParams: headerParams,
|
|
3368
|
+
queryParams: queryParams
|
|
3369
|
+
});
|
|
3370
|
+
try {
|
|
3371
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
3372
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
3373
|
+
responseObject: {},
|
|
3374
|
+
body: yield response.json(),
|
|
3375
|
+
bodyKey: "agent",
|
|
3376
|
+
bodyModel: model.Agent,
|
|
3377
|
+
type: "model.Agent",
|
|
3378
|
+
responseHeaders: [
|
|
3379
|
+
{
|
|
3380
|
+
value: response.headers.get("etag"),
|
|
3381
|
+
key: "etag",
|
|
3382
|
+
dataType: "string"
|
|
3383
|
+
},
|
|
3384
|
+
{
|
|
3385
|
+
value: response.headers.get("opc-request-id"),
|
|
3386
|
+
key: "opcRequestId",
|
|
3387
|
+
dataType: "string"
|
|
3388
|
+
}
|
|
3389
|
+
]
|
|
3390
|
+
});
|
|
3391
|
+
return sdkResponse;
|
|
3392
|
+
}
|
|
3393
|
+
catch (err) {
|
|
3394
|
+
throw err;
|
|
3395
|
+
}
|
|
3396
|
+
});
|
|
3397
|
+
}
|
|
3398
|
+
/**
|
|
3399
|
+
* Gets an AgentDependency by identifier.
|
|
3400
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
3401
|
+
* @param GetAgentDependencyRequest
|
|
3402
|
+
* @return GetAgentDependencyResponse
|
|
3403
|
+
* @throws OciError when an error occurs
|
|
3404
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/GetAgentDependency.ts.html |here} to see how to use GetAgentDependency API.
|
|
3405
|
+
*/
|
|
3406
|
+
getAgentDependency(getAgentDependencyRequest) {
|
|
3407
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3408
|
+
if (this.logger)
|
|
3409
|
+
this.logger.debug("Calling operation OcbAgentSvcClient#getAgentDependency.");
|
|
3410
|
+
const operationName = "getAgentDependency";
|
|
3411
|
+
const apiReferenceLink = "";
|
|
3412
|
+
const pathParams = {
|
|
3413
|
+
"{agentDependencyId}": getAgentDependencyRequest.agentDependencyId
|
|
3414
|
+
};
|
|
3415
|
+
const queryParams = {};
|
|
3416
|
+
let headerParams = {
|
|
3417
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
3418
|
+
"opc-request-id": getAgentDependencyRequest.opcRequestId
|
|
3419
|
+
};
|
|
3420
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
3421
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getAgentDependencyRequest.retryConfiguration, specRetryConfiguration);
|
|
3422
|
+
if (this.logger)
|
|
3423
|
+
retrier.logger = this.logger;
|
|
3424
|
+
const request = yield oci_common_1.composeRequest({
|
|
3425
|
+
baseEndpoint: this._endpoint,
|
|
3426
|
+
defaultHeaders: this._defaultHeaders,
|
|
3427
|
+
path: "/agentDependencies/{agentDependencyId}",
|
|
3428
|
+
method: "GET",
|
|
3429
|
+
pathParams: pathParams,
|
|
3430
|
+
headerParams: headerParams,
|
|
3431
|
+
queryParams: queryParams
|
|
3432
|
+
});
|
|
3433
|
+
try {
|
|
3434
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
3435
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
3436
|
+
responseObject: {},
|
|
3437
|
+
body: yield response.json(),
|
|
3438
|
+
bodyKey: "agentDependency",
|
|
3439
|
+
bodyModel: model.AgentDependency,
|
|
3440
|
+
type: "model.AgentDependency",
|
|
3441
|
+
responseHeaders: [
|
|
3442
|
+
{
|
|
3443
|
+
value: response.headers.get("etag"),
|
|
3444
|
+
key: "etag",
|
|
3445
|
+
dataType: "string"
|
|
3446
|
+
},
|
|
3447
|
+
{
|
|
3448
|
+
value: response.headers.get("opc-request-id"),
|
|
3449
|
+
key: "opcRequestId",
|
|
3450
|
+
dataType: "string"
|
|
3451
|
+
}
|
|
3452
|
+
]
|
|
3453
|
+
});
|
|
3454
|
+
return sdkResponse;
|
|
3455
|
+
}
|
|
3456
|
+
catch (err) {
|
|
3457
|
+
throw err;
|
|
3458
|
+
}
|
|
3459
|
+
});
|
|
3460
|
+
}
|
|
3461
|
+
/**
|
|
3462
|
+
* Gets a source environment by identifier.
|
|
3463
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
3464
|
+
* @param GetEnvironmentRequest
|
|
3465
|
+
* @return GetEnvironmentResponse
|
|
3466
|
+
* @throws OciError when an error occurs
|
|
3467
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/GetEnvironment.ts.html |here} to see how to use GetEnvironment API.
|
|
3468
|
+
*/
|
|
3469
|
+
getEnvironment(getEnvironmentRequest) {
|
|
3470
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3471
|
+
if (this.logger)
|
|
3472
|
+
this.logger.debug("Calling operation OcbAgentSvcClient#getEnvironment.");
|
|
3473
|
+
const operationName = "getEnvironment";
|
|
3474
|
+
const apiReferenceLink = "";
|
|
3475
|
+
const pathParams = {
|
|
3476
|
+
"{environmentId}": getEnvironmentRequest.environmentId
|
|
3477
|
+
};
|
|
3478
|
+
const queryParams = {};
|
|
3479
|
+
let headerParams = {
|
|
3480
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
3481
|
+
"opc-request-id": getEnvironmentRequest.opcRequestId
|
|
3482
|
+
};
|
|
3483
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
3484
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getEnvironmentRequest.retryConfiguration, specRetryConfiguration);
|
|
3485
|
+
if (this.logger)
|
|
3486
|
+
retrier.logger = this.logger;
|
|
3487
|
+
const request = yield oci_common_1.composeRequest({
|
|
3488
|
+
baseEndpoint: this._endpoint,
|
|
3489
|
+
defaultHeaders: this._defaultHeaders,
|
|
3490
|
+
path: "/environments/{environmentId}",
|
|
3491
|
+
method: "GET",
|
|
3492
|
+
pathParams: pathParams,
|
|
3493
|
+
headerParams: headerParams,
|
|
3494
|
+
queryParams: queryParams
|
|
3495
|
+
});
|
|
3496
|
+
try {
|
|
3497
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
3498
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
3499
|
+
responseObject: {},
|
|
3500
|
+
body: yield response.json(),
|
|
3501
|
+
bodyKey: "environment",
|
|
3502
|
+
bodyModel: model.Environment,
|
|
3503
|
+
type: "model.Environment",
|
|
3504
|
+
responseHeaders: [
|
|
3505
|
+
{
|
|
3506
|
+
value: response.headers.get("etag"),
|
|
3507
|
+
key: "etag",
|
|
3508
|
+
dataType: "string"
|
|
3509
|
+
},
|
|
3510
|
+
{
|
|
3511
|
+
value: response.headers.get("opc-request-id"),
|
|
3512
|
+
key: "opcRequestId",
|
|
3513
|
+
dataType: "string"
|
|
3514
|
+
}
|
|
3515
|
+
]
|
|
3516
|
+
});
|
|
3517
|
+
return sdkResponse;
|
|
3518
|
+
}
|
|
3519
|
+
catch (err) {
|
|
3520
|
+
throw err;
|
|
3521
|
+
}
|
|
3522
|
+
});
|
|
3523
|
+
}
|
|
3524
|
+
/**
|
|
3525
|
+
* Gets a plugin by identifier.
|
|
3526
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
3527
|
+
* @param GetPluginRequest
|
|
3528
|
+
* @return GetPluginResponse
|
|
3529
|
+
* @throws OciError when an error occurs
|
|
3530
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/GetPlugin.ts.html |here} to see how to use GetPlugin API.
|
|
3531
|
+
*/
|
|
3532
|
+
getPlugin(getPluginRequest) {
|
|
3533
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3534
|
+
if (this.logger)
|
|
3535
|
+
this.logger.debug("Calling operation OcbAgentSvcClient#getPlugin.");
|
|
3536
|
+
const operationName = "getPlugin";
|
|
3537
|
+
const apiReferenceLink = "";
|
|
3538
|
+
const pathParams = {
|
|
3539
|
+
"{agentId}": getPluginRequest.agentId,
|
|
3540
|
+
"{pluginName}": getPluginRequest.pluginName
|
|
3541
|
+
};
|
|
3542
|
+
const queryParams = {};
|
|
3543
|
+
let headerParams = {
|
|
3544
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
3545
|
+
"opc-request-id": getPluginRequest.opcRequestId
|
|
3546
|
+
};
|
|
3547
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
3548
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getPluginRequest.retryConfiguration, specRetryConfiguration);
|
|
3549
|
+
if (this.logger)
|
|
3550
|
+
retrier.logger = this.logger;
|
|
3551
|
+
const request = yield oci_common_1.composeRequest({
|
|
3552
|
+
baseEndpoint: this._endpoint,
|
|
3553
|
+
defaultHeaders: this._defaultHeaders,
|
|
3554
|
+
path: "/agents/{agentId}/plugins/{pluginName}",
|
|
3555
|
+
method: "GET",
|
|
3556
|
+
pathParams: pathParams,
|
|
3557
|
+
headerParams: headerParams,
|
|
3558
|
+
queryParams: queryParams
|
|
3559
|
+
});
|
|
3560
|
+
try {
|
|
3561
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
3562
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
3563
|
+
responseObject: {},
|
|
3564
|
+
body: yield response.json(),
|
|
3565
|
+
bodyKey: "plugin",
|
|
3566
|
+
bodyModel: model.Plugin,
|
|
3567
|
+
type: "model.Plugin",
|
|
3568
|
+
responseHeaders: [
|
|
3569
|
+
{
|
|
3570
|
+
value: response.headers.get("etag"),
|
|
3571
|
+
key: "etag",
|
|
3572
|
+
dataType: "string"
|
|
3573
|
+
},
|
|
3574
|
+
{
|
|
3575
|
+
value: response.headers.get("opc-request-id"),
|
|
3576
|
+
key: "opcRequestId",
|
|
3577
|
+
dataType: "string"
|
|
3578
|
+
}
|
|
3579
|
+
]
|
|
3580
|
+
});
|
|
3581
|
+
return sdkResponse;
|
|
3582
|
+
}
|
|
3583
|
+
catch (err) {
|
|
3584
|
+
throw err;
|
|
3585
|
+
}
|
|
3586
|
+
});
|
|
3587
|
+
}
|
|
3588
|
+
/**
|
|
3589
|
+
* Returns a list of AgentDependencies such as AgentDependencyCollection.
|
|
3590
|
+
*
|
|
3591
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
3592
|
+
* @param ListAgentDependenciesRequest
|
|
3593
|
+
* @return ListAgentDependenciesResponse
|
|
3594
|
+
* @throws OciError when an error occurs
|
|
3595
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/ListAgentDependencies.ts.html |here} to see how to use ListAgentDependencies API.
|
|
3596
|
+
*/
|
|
3597
|
+
listAgentDependencies(listAgentDependenciesRequest) {
|
|
3598
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3599
|
+
if (this.logger)
|
|
3600
|
+
this.logger.debug("Calling operation OcbAgentSvcClient#listAgentDependencies.");
|
|
3601
|
+
const operationName = "listAgentDependencies";
|
|
3602
|
+
const apiReferenceLink = "";
|
|
3603
|
+
const pathParams = {};
|
|
3604
|
+
const queryParams = {
|
|
3605
|
+
"compartmentId": listAgentDependenciesRequest.compartmentId,
|
|
3606
|
+
"agentId": listAgentDependenciesRequest.agentId,
|
|
3607
|
+
"environmentId": listAgentDependenciesRequest.environmentId,
|
|
3608
|
+
"lifecycleState": listAgentDependenciesRequest.lifecycleState,
|
|
3609
|
+
"displayName": listAgentDependenciesRequest.displayName,
|
|
3610
|
+
"limit": listAgentDependenciesRequest.limit,
|
|
3611
|
+
"page": listAgentDependenciesRequest.page,
|
|
3612
|
+
"sortOrder": listAgentDependenciesRequest.sortOrder,
|
|
3613
|
+
"sortBy": listAgentDependenciesRequest.sortBy
|
|
3614
|
+
};
|
|
3615
|
+
let headerParams = {
|
|
3616
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
3617
|
+
"opc-request-id": listAgentDependenciesRequest.opcRequestId
|
|
3618
|
+
};
|
|
3619
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
3620
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listAgentDependenciesRequest.retryConfiguration, specRetryConfiguration);
|
|
3621
|
+
if (this.logger)
|
|
3622
|
+
retrier.logger = this.logger;
|
|
3623
|
+
const request = yield oci_common_1.composeRequest({
|
|
3624
|
+
baseEndpoint: this._endpoint,
|
|
3625
|
+
defaultHeaders: this._defaultHeaders,
|
|
3626
|
+
path: "/agentDependencies",
|
|
3627
|
+
method: "GET",
|
|
3628
|
+
pathParams: pathParams,
|
|
3629
|
+
headerParams: headerParams,
|
|
3630
|
+
queryParams: queryParams
|
|
3631
|
+
});
|
|
3632
|
+
try {
|
|
3633
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
3634
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
3635
|
+
responseObject: {},
|
|
3636
|
+
body: yield response.json(),
|
|
3637
|
+
bodyKey: "agentDependencyCollection",
|
|
3638
|
+
bodyModel: model.AgentDependencyCollection,
|
|
3639
|
+
type: "model.AgentDependencyCollection",
|
|
3640
|
+
responseHeaders: [
|
|
3641
|
+
{
|
|
3642
|
+
value: response.headers.get("opc-request-id"),
|
|
3643
|
+
key: "opcRequestId",
|
|
3644
|
+
dataType: "string"
|
|
3645
|
+
},
|
|
3646
|
+
{
|
|
3647
|
+
value: response.headers.get("opc-next-page"),
|
|
3648
|
+
key: "opcNextPage",
|
|
3649
|
+
dataType: "string"
|
|
3650
|
+
}
|
|
3651
|
+
]
|
|
3652
|
+
});
|
|
3653
|
+
return sdkResponse;
|
|
3654
|
+
}
|
|
3655
|
+
catch (err) {
|
|
3656
|
+
throw err;
|
|
3657
|
+
}
|
|
3658
|
+
});
|
|
3659
|
+
}
|
|
3660
|
+
/**
|
|
3661
|
+
* Returns a list of Agents.
|
|
3662
|
+
*
|
|
3663
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
3664
|
+
* @param ListAgentsRequest
|
|
3665
|
+
* @return ListAgentsResponse
|
|
3666
|
+
* @throws OciError when an error occurs
|
|
3667
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/ListAgents.ts.html |here} to see how to use ListAgents API.
|
|
3668
|
+
*/
|
|
3669
|
+
listAgents(listAgentsRequest) {
|
|
3670
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3671
|
+
if (this.logger)
|
|
3672
|
+
this.logger.debug("Calling operation OcbAgentSvcClient#listAgents.");
|
|
3673
|
+
const operationName = "listAgents";
|
|
3674
|
+
const apiReferenceLink = "";
|
|
3675
|
+
const pathParams = {};
|
|
3676
|
+
const queryParams = {
|
|
3677
|
+
"compartmentId": listAgentsRequest.compartmentId,
|
|
3678
|
+
"environmentId": listAgentsRequest.environmentId,
|
|
3679
|
+
"lifecycleState": listAgentsRequest.lifecycleState,
|
|
3680
|
+
"displayName": listAgentsRequest.displayName,
|
|
3681
|
+
"agentId": listAgentsRequest.agentId,
|
|
3682
|
+
"limit": listAgentsRequest.limit,
|
|
3683
|
+
"page": listAgentsRequest.page,
|
|
3684
|
+
"sortOrder": listAgentsRequest.sortOrder,
|
|
3685
|
+
"sortBy": listAgentsRequest.sortBy
|
|
3686
|
+
};
|
|
3687
|
+
let headerParams = {
|
|
3688
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
3689
|
+
"opc-request-id": listAgentsRequest.opcRequestId
|
|
3690
|
+
};
|
|
3691
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
3692
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listAgentsRequest.retryConfiguration, specRetryConfiguration);
|
|
3693
|
+
if (this.logger)
|
|
3694
|
+
retrier.logger = this.logger;
|
|
3695
|
+
const request = yield oci_common_1.composeRequest({
|
|
3696
|
+
baseEndpoint: this._endpoint,
|
|
3697
|
+
defaultHeaders: this._defaultHeaders,
|
|
3698
|
+
path: "/agents",
|
|
3699
|
+
method: "GET",
|
|
3700
|
+
pathParams: pathParams,
|
|
3701
|
+
headerParams: headerParams,
|
|
3702
|
+
queryParams: queryParams
|
|
3703
|
+
});
|
|
3704
|
+
try {
|
|
3705
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
3706
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
3707
|
+
responseObject: {},
|
|
3708
|
+
body: yield response.json(),
|
|
3709
|
+
bodyKey: "agentCollection",
|
|
3710
|
+
bodyModel: model.AgentCollection,
|
|
3711
|
+
type: "model.AgentCollection",
|
|
3712
|
+
responseHeaders: [
|
|
3713
|
+
{
|
|
3714
|
+
value: response.headers.get("opc-request-id"),
|
|
3715
|
+
key: "opcRequestId",
|
|
3716
|
+
dataType: "string"
|
|
3717
|
+
},
|
|
3718
|
+
{
|
|
3719
|
+
value: response.headers.get("opc-next-page"),
|
|
3720
|
+
key: "opcNextPage",
|
|
3721
|
+
dataType: "string"
|
|
3722
|
+
}
|
|
3723
|
+
]
|
|
3724
|
+
});
|
|
3725
|
+
return sdkResponse;
|
|
3726
|
+
}
|
|
3727
|
+
catch (err) {
|
|
3728
|
+
throw err;
|
|
3729
|
+
}
|
|
3730
|
+
});
|
|
3731
|
+
}
|
|
3732
|
+
/**
|
|
3733
|
+
* Returns a list of Appliance Images.
|
|
3734
|
+
*
|
|
3735
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
3736
|
+
* @param ListApplianceImagesRequest
|
|
3737
|
+
* @return ListApplianceImagesResponse
|
|
3738
|
+
* @throws OciError when an error occurs
|
|
3739
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/ListApplianceImages.ts.html |here} to see how to use ListApplianceImages API.
|
|
3740
|
+
*/
|
|
3741
|
+
listApplianceImages(listApplianceImagesRequest) {
|
|
3742
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3743
|
+
if (this.logger)
|
|
3744
|
+
this.logger.debug("Calling operation OcbAgentSvcClient#listApplianceImages.");
|
|
3745
|
+
const operationName = "listApplianceImages";
|
|
3746
|
+
const apiReferenceLink = "";
|
|
3747
|
+
const pathParams = {};
|
|
3748
|
+
const queryParams = {
|
|
3749
|
+
"compartmentId": listApplianceImagesRequest.compartmentId,
|
|
3750
|
+
"displayName": listApplianceImagesRequest.displayName,
|
|
3751
|
+
"limit": listApplianceImagesRequest.limit,
|
|
3752
|
+
"page": listApplianceImagesRequest.page,
|
|
3753
|
+
"sortOrder": listApplianceImagesRequest.sortOrder,
|
|
3754
|
+
"sortBy": listApplianceImagesRequest.sortBy
|
|
3755
|
+
};
|
|
3756
|
+
let headerParams = {
|
|
3757
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
3758
|
+
"opc-request-id": listApplianceImagesRequest.opcRequestId
|
|
3759
|
+
};
|
|
3760
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
3761
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listApplianceImagesRequest.retryConfiguration, specRetryConfiguration);
|
|
3762
|
+
if (this.logger)
|
|
3763
|
+
retrier.logger = this.logger;
|
|
3764
|
+
const request = yield oci_common_1.composeRequest({
|
|
3765
|
+
baseEndpoint: this._endpoint,
|
|
3766
|
+
defaultHeaders: this._defaultHeaders,
|
|
3767
|
+
path: "/applianceImages",
|
|
3768
|
+
method: "GET",
|
|
3769
|
+
pathParams: pathParams,
|
|
3770
|
+
headerParams: headerParams,
|
|
3771
|
+
queryParams: queryParams
|
|
3772
|
+
});
|
|
3773
|
+
try {
|
|
3774
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
3775
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
3776
|
+
responseObject: {},
|
|
3777
|
+
body: yield response.json(),
|
|
3778
|
+
bodyKey: "applianceImageCollection",
|
|
3779
|
+
bodyModel: model.ApplianceImageCollection,
|
|
3780
|
+
type: "model.ApplianceImageCollection",
|
|
3781
|
+
responseHeaders: [
|
|
3782
|
+
{
|
|
3783
|
+
value: response.headers.get("opc-request-id"),
|
|
3784
|
+
key: "opcRequestId",
|
|
3785
|
+
dataType: "string"
|
|
3786
|
+
},
|
|
3787
|
+
{
|
|
3788
|
+
value: response.headers.get("opc-next-page"),
|
|
3789
|
+
key: "opcNextPage",
|
|
3790
|
+
dataType: "string"
|
|
3791
|
+
}
|
|
3792
|
+
]
|
|
3793
|
+
});
|
|
3794
|
+
return sdkResponse;
|
|
3795
|
+
}
|
|
3796
|
+
catch (err) {
|
|
3797
|
+
throw err;
|
|
3798
|
+
}
|
|
3799
|
+
});
|
|
3800
|
+
}
|
|
3801
|
+
/**
|
|
3802
|
+
* Returns a list of source environments.
|
|
3803
|
+
*
|
|
3804
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
3805
|
+
* @param ListEnvironmentsRequest
|
|
3806
|
+
* @return ListEnvironmentsResponse
|
|
3807
|
+
* @throws OciError when an error occurs
|
|
3808
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/ListEnvironments.ts.html |here} to see how to use ListEnvironments API.
|
|
3809
|
+
*/
|
|
3810
|
+
listEnvironments(listEnvironmentsRequest) {
|
|
3811
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3812
|
+
if (this.logger)
|
|
3813
|
+
this.logger.debug("Calling operation OcbAgentSvcClient#listEnvironments.");
|
|
3814
|
+
const operationName = "listEnvironments";
|
|
3815
|
+
const apiReferenceLink = "";
|
|
3816
|
+
const pathParams = {};
|
|
3817
|
+
const queryParams = {
|
|
3818
|
+
"compartmentId": listEnvironmentsRequest.compartmentId,
|
|
3819
|
+
"lifecycleState": listEnvironmentsRequest.lifecycleState,
|
|
3820
|
+
"displayName": listEnvironmentsRequest.displayName,
|
|
3821
|
+
"environmentId": listEnvironmentsRequest.environmentId,
|
|
3822
|
+
"limit": listEnvironmentsRequest.limit,
|
|
3823
|
+
"page": listEnvironmentsRequest.page,
|
|
3824
|
+
"sortOrder": listEnvironmentsRequest.sortOrder,
|
|
3825
|
+
"sortBy": listEnvironmentsRequest.sortBy
|
|
3826
|
+
};
|
|
3827
|
+
let headerParams = {
|
|
3828
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
3829
|
+
"opc-request-id": listEnvironmentsRequest.opcRequestId
|
|
3830
|
+
};
|
|
3831
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
3832
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listEnvironmentsRequest.retryConfiguration, specRetryConfiguration);
|
|
3833
|
+
if (this.logger)
|
|
3834
|
+
retrier.logger = this.logger;
|
|
3835
|
+
const request = yield oci_common_1.composeRequest({
|
|
3836
|
+
baseEndpoint: this._endpoint,
|
|
3837
|
+
defaultHeaders: this._defaultHeaders,
|
|
3838
|
+
path: "/environments",
|
|
3839
|
+
method: "GET",
|
|
3840
|
+
pathParams: pathParams,
|
|
3841
|
+
headerParams: headerParams,
|
|
3842
|
+
queryParams: queryParams
|
|
3843
|
+
});
|
|
3844
|
+
try {
|
|
3845
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
3846
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
3847
|
+
responseObject: {},
|
|
3848
|
+
body: yield response.json(),
|
|
3849
|
+
bodyKey: "environmentCollection",
|
|
3850
|
+
bodyModel: model.EnvironmentCollection,
|
|
3851
|
+
type: "model.EnvironmentCollection",
|
|
3852
|
+
responseHeaders: [
|
|
3853
|
+
{
|
|
3854
|
+
value: response.headers.get("opc-request-id"),
|
|
3855
|
+
key: "opcRequestId",
|
|
3856
|
+
dataType: "string"
|
|
3857
|
+
},
|
|
3858
|
+
{
|
|
3859
|
+
value: response.headers.get("opc-next-page"),
|
|
3860
|
+
key: "opcNextPage",
|
|
3861
|
+
dataType: "string"
|
|
3862
|
+
}
|
|
3863
|
+
]
|
|
3864
|
+
});
|
|
3865
|
+
return sdkResponse;
|
|
3866
|
+
}
|
|
3867
|
+
catch (err) {
|
|
3868
|
+
throw err;
|
|
3869
|
+
}
|
|
3870
|
+
});
|
|
3871
|
+
}
|
|
3872
|
+
/**
|
|
3873
|
+
* Adds a dependency to the source environment. When provided, If-Match is checked against ETag values of the resource.
|
|
3874
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
3875
|
+
* @param RemoveAgentDependencyRequest
|
|
3876
|
+
* @return RemoveAgentDependencyResponse
|
|
3877
|
+
* @throws OciError when an error occurs
|
|
3878
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/RemoveAgentDependency.ts.html |here} to see how to use RemoveAgentDependency API.
|
|
3879
|
+
*/
|
|
3880
|
+
removeAgentDependency(removeAgentDependencyRequest) {
|
|
3881
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3882
|
+
if (this.logger)
|
|
3883
|
+
this.logger.debug("Calling operation OcbAgentSvcClient#removeAgentDependency.");
|
|
3884
|
+
const operationName = "removeAgentDependency";
|
|
3885
|
+
const apiReferenceLink = "";
|
|
3886
|
+
const pathParams = {
|
|
3887
|
+
"{environmentId}": removeAgentDependencyRequest.environmentId
|
|
3888
|
+
};
|
|
3889
|
+
const queryParams = {};
|
|
3890
|
+
let headerParams = {
|
|
3891
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
3892
|
+
"if-match": removeAgentDependencyRequest.ifMatch,
|
|
3893
|
+
"opc-retry-token": removeAgentDependencyRequest.opcRetryToken,
|
|
3894
|
+
"opc-request-id": removeAgentDependencyRequest.opcRequestId
|
|
3895
|
+
};
|
|
3896
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
3897
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, removeAgentDependencyRequest.retryConfiguration, specRetryConfiguration);
|
|
3898
|
+
if (this.logger)
|
|
3899
|
+
retrier.logger = this.logger;
|
|
3900
|
+
const request = yield oci_common_1.composeRequest({
|
|
3901
|
+
baseEndpoint: this._endpoint,
|
|
3902
|
+
defaultHeaders: this._defaultHeaders,
|
|
3903
|
+
path: "/environments/{environmentId}/actions/removeAgentDependency",
|
|
3904
|
+
method: "POST",
|
|
3905
|
+
bodyContent: common.ObjectSerializer.serialize(removeAgentDependencyRequest.removeAgentDependencyDetails, "RemoveAgentDependencyDetails", model.RemoveAgentDependencyDetails.getJsonObj),
|
|
3906
|
+
pathParams: pathParams,
|
|
3907
|
+
headerParams: headerParams,
|
|
3908
|
+
queryParams: queryParams
|
|
3909
|
+
});
|
|
3910
|
+
try {
|
|
3911
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
3912
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
3913
|
+
responseObject: {},
|
|
3914
|
+
body: yield response.json(),
|
|
3915
|
+
bodyKey: "environment",
|
|
3916
|
+
bodyModel: model.Environment,
|
|
3917
|
+
type: "model.Environment",
|
|
3918
|
+
responseHeaders: [
|
|
3919
|
+
{
|
|
3920
|
+
value: response.headers.get("etag"),
|
|
3921
|
+
key: "etag",
|
|
3922
|
+
dataType: "string"
|
|
3923
|
+
},
|
|
3924
|
+
{
|
|
3925
|
+
value: response.headers.get("opc-request-id"),
|
|
3926
|
+
key: "opcRequestId",
|
|
3927
|
+
dataType: "string"
|
|
3928
|
+
}
|
|
3929
|
+
]
|
|
3930
|
+
});
|
|
3931
|
+
return sdkResponse;
|
|
3932
|
+
}
|
|
3933
|
+
catch (err) {
|
|
3934
|
+
throw err;
|
|
3935
|
+
}
|
|
3936
|
+
});
|
|
3937
|
+
}
|
|
3938
|
+
/**
|
|
3939
|
+
* Updates the Agent.
|
|
3940
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
3941
|
+
* @param UpdateAgentRequest
|
|
3942
|
+
* @return UpdateAgentResponse
|
|
3943
|
+
* @throws OciError when an error occurs
|
|
3944
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/UpdateAgent.ts.html |here} to see how to use UpdateAgent API.
|
|
3945
|
+
*/
|
|
3946
|
+
updateAgent(updateAgentRequest) {
|
|
3947
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3948
|
+
if (this.logger)
|
|
3949
|
+
this.logger.debug("Calling operation OcbAgentSvcClient#updateAgent.");
|
|
3950
|
+
const operationName = "updateAgent";
|
|
3951
|
+
const apiReferenceLink = "";
|
|
3952
|
+
const pathParams = {
|
|
3953
|
+
"{agentId}": updateAgentRequest.agentId
|
|
3954
|
+
};
|
|
3955
|
+
const queryParams = {};
|
|
3956
|
+
let headerParams = {
|
|
3957
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
3958
|
+
"if-match": updateAgentRequest.ifMatch,
|
|
3959
|
+
"opc-request-id": updateAgentRequest.opcRequestId,
|
|
3960
|
+
"opc-retry-token": updateAgentRequest.opcRetryToken
|
|
3961
|
+
};
|
|
3962
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
3963
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, updateAgentRequest.retryConfiguration, specRetryConfiguration);
|
|
3964
|
+
if (this.logger)
|
|
3965
|
+
retrier.logger = this.logger;
|
|
3966
|
+
const request = yield oci_common_1.composeRequest({
|
|
3967
|
+
baseEndpoint: this._endpoint,
|
|
3968
|
+
defaultHeaders: this._defaultHeaders,
|
|
3969
|
+
path: "/agents/{agentId}",
|
|
3970
|
+
method: "PUT",
|
|
3971
|
+
bodyContent: common.ObjectSerializer.serialize(updateAgentRequest.updateAgentDetails, "UpdateAgentDetails", model.UpdateAgentDetails.getJsonObj),
|
|
3972
|
+
pathParams: pathParams,
|
|
3973
|
+
headerParams: headerParams,
|
|
3974
|
+
queryParams: queryParams
|
|
3975
|
+
});
|
|
3976
|
+
try {
|
|
3977
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
3978
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
3979
|
+
responseObject: {},
|
|
3980
|
+
body: yield response.json(),
|
|
3981
|
+
bodyKey: "agent",
|
|
3982
|
+
bodyModel: model.Agent,
|
|
3983
|
+
type: "model.Agent",
|
|
3984
|
+
responseHeaders: [
|
|
3985
|
+
{
|
|
3986
|
+
value: response.headers.get("etag"),
|
|
3987
|
+
key: "etag",
|
|
3988
|
+
dataType: "string"
|
|
3989
|
+
},
|
|
3990
|
+
{
|
|
3991
|
+
value: response.headers.get("opc-request-id"),
|
|
3992
|
+
key: "opcRequestId",
|
|
3993
|
+
dataType: "string"
|
|
3994
|
+
}
|
|
3995
|
+
]
|
|
3996
|
+
});
|
|
3997
|
+
return sdkResponse;
|
|
3998
|
+
}
|
|
3999
|
+
catch (err) {
|
|
4000
|
+
throw err;
|
|
4001
|
+
}
|
|
4002
|
+
});
|
|
4003
|
+
}
|
|
4004
|
+
/**
|
|
4005
|
+
* Updates the AgentDependency.
|
|
4006
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
4007
|
+
* @param UpdateAgentDependencyRequest
|
|
4008
|
+
* @return UpdateAgentDependencyResponse
|
|
4009
|
+
* @throws OciError when an error occurs
|
|
4010
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/UpdateAgentDependency.ts.html |here} to see how to use UpdateAgentDependency API.
|
|
4011
|
+
*/
|
|
4012
|
+
updateAgentDependency(updateAgentDependencyRequest) {
|
|
4013
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4014
|
+
if (this.logger)
|
|
4015
|
+
this.logger.debug("Calling operation OcbAgentSvcClient#updateAgentDependency.");
|
|
4016
|
+
const operationName = "updateAgentDependency";
|
|
4017
|
+
const apiReferenceLink = "";
|
|
4018
|
+
const pathParams = {
|
|
4019
|
+
"{agentDependencyId}": updateAgentDependencyRequest.agentDependencyId
|
|
4020
|
+
};
|
|
4021
|
+
const queryParams = {};
|
|
4022
|
+
let headerParams = {
|
|
4023
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
4024
|
+
"if-match": updateAgentDependencyRequest.ifMatch,
|
|
4025
|
+
"opc-request-id": updateAgentDependencyRequest.opcRequestId,
|
|
4026
|
+
"opc-retry-token": updateAgentDependencyRequest.opcRetryToken
|
|
4027
|
+
};
|
|
4028
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
4029
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, updateAgentDependencyRequest.retryConfiguration, specRetryConfiguration);
|
|
4030
|
+
if (this.logger)
|
|
4031
|
+
retrier.logger = this.logger;
|
|
4032
|
+
const request = yield oci_common_1.composeRequest({
|
|
4033
|
+
baseEndpoint: this._endpoint,
|
|
4034
|
+
defaultHeaders: this._defaultHeaders,
|
|
4035
|
+
path: "/agentDependencies/{agentDependencyId}",
|
|
4036
|
+
method: "PUT",
|
|
4037
|
+
bodyContent: common.ObjectSerializer.serialize(updateAgentDependencyRequest.updateAgentDependencyDetails, "UpdateAgentDependencyDetails", model.UpdateAgentDependencyDetails.getJsonObj),
|
|
4038
|
+
pathParams: pathParams,
|
|
4039
|
+
headerParams: headerParams,
|
|
4040
|
+
queryParams: queryParams
|
|
4041
|
+
});
|
|
4042
|
+
try {
|
|
4043
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
4044
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
4045
|
+
responseObject: {},
|
|
4046
|
+
responseHeaders: [
|
|
4047
|
+
{
|
|
4048
|
+
value: response.headers.get("opc-work-request-id"),
|
|
4049
|
+
key: "opcWorkRequestId",
|
|
4050
|
+
dataType: "string"
|
|
4051
|
+
},
|
|
4052
|
+
{
|
|
4053
|
+
value: response.headers.get("opc-request-id"),
|
|
4054
|
+
key: "opcRequestId",
|
|
4055
|
+
dataType: "string"
|
|
4056
|
+
}
|
|
4057
|
+
]
|
|
4058
|
+
});
|
|
4059
|
+
return sdkResponse;
|
|
4060
|
+
}
|
|
4061
|
+
catch (err) {
|
|
4062
|
+
throw err;
|
|
4063
|
+
}
|
|
4064
|
+
});
|
|
4065
|
+
}
|
|
4066
|
+
/**
|
|
4067
|
+
* Updates the source environment.
|
|
4068
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
4069
|
+
* @param UpdateEnvironmentRequest
|
|
4070
|
+
* @return UpdateEnvironmentResponse
|
|
4071
|
+
* @throws OciError when an error occurs
|
|
4072
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/UpdateEnvironment.ts.html |here} to see how to use UpdateEnvironment API.
|
|
4073
|
+
*/
|
|
4074
|
+
updateEnvironment(updateEnvironmentRequest) {
|
|
4075
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4076
|
+
if (this.logger)
|
|
4077
|
+
this.logger.debug("Calling operation OcbAgentSvcClient#updateEnvironment.");
|
|
4078
|
+
const operationName = "updateEnvironment";
|
|
4079
|
+
const apiReferenceLink = "";
|
|
4080
|
+
const pathParams = {
|
|
4081
|
+
"{environmentId}": updateEnvironmentRequest.environmentId
|
|
4082
|
+
};
|
|
4083
|
+
const queryParams = {};
|
|
4084
|
+
let headerParams = {
|
|
4085
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
4086
|
+
"if-match": updateEnvironmentRequest.ifMatch,
|
|
4087
|
+
"opc-request-id": updateEnvironmentRequest.opcRequestId,
|
|
4088
|
+
"opc-retry-token": updateEnvironmentRequest.opcRetryToken
|
|
4089
|
+
};
|
|
4090
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
4091
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, updateEnvironmentRequest.retryConfiguration, specRetryConfiguration);
|
|
4092
|
+
if (this.logger)
|
|
4093
|
+
retrier.logger = this.logger;
|
|
4094
|
+
const request = yield oci_common_1.composeRequest({
|
|
4095
|
+
baseEndpoint: this._endpoint,
|
|
4096
|
+
defaultHeaders: this._defaultHeaders,
|
|
4097
|
+
path: "/environments/{environmentId}",
|
|
4098
|
+
method: "PUT",
|
|
4099
|
+
bodyContent: common.ObjectSerializer.serialize(updateEnvironmentRequest.updateEnvironmentDetails, "UpdateEnvironmentDetails", model.UpdateEnvironmentDetails.getJsonObj),
|
|
4100
|
+
pathParams: pathParams,
|
|
4101
|
+
headerParams: headerParams,
|
|
4102
|
+
queryParams: queryParams
|
|
4103
|
+
});
|
|
4104
|
+
try {
|
|
4105
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
4106
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
4107
|
+
responseObject: {},
|
|
4108
|
+
body: yield response.json(),
|
|
4109
|
+
bodyKey: "environment",
|
|
4110
|
+
bodyModel: model.Environment,
|
|
4111
|
+
type: "model.Environment",
|
|
4112
|
+
responseHeaders: [
|
|
4113
|
+
{
|
|
4114
|
+
value: response.headers.get("etag"),
|
|
4115
|
+
key: "etag",
|
|
4116
|
+
dataType: "string"
|
|
4117
|
+
},
|
|
4118
|
+
{
|
|
4119
|
+
value: response.headers.get("opc-request-id"),
|
|
4120
|
+
key: "opcRequestId",
|
|
4121
|
+
dataType: "string"
|
|
4122
|
+
}
|
|
4123
|
+
]
|
|
4124
|
+
});
|
|
4125
|
+
return sdkResponse;
|
|
4126
|
+
}
|
|
4127
|
+
catch (err) {
|
|
4128
|
+
throw err;
|
|
4129
|
+
}
|
|
4130
|
+
});
|
|
4131
|
+
}
|
|
4132
|
+
/**
|
|
4133
|
+
* Updates the plugin.
|
|
4134
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
4135
|
+
* @param UpdatePluginRequest
|
|
4136
|
+
* @return UpdatePluginResponse
|
|
4137
|
+
* @throws OciError when an error occurs
|
|
4138
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.43.0/cloudbridge/UpdatePlugin.ts.html |here} to see how to use UpdatePlugin API.
|
|
4139
|
+
*/
|
|
4140
|
+
updatePlugin(updatePluginRequest) {
|
|
4141
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4142
|
+
if (this.logger)
|
|
4143
|
+
this.logger.debug("Calling operation OcbAgentSvcClient#updatePlugin.");
|
|
4144
|
+
const operationName = "updatePlugin";
|
|
4145
|
+
const apiReferenceLink = "";
|
|
4146
|
+
const pathParams = {
|
|
4147
|
+
"{agentId}": updatePluginRequest.agentId,
|
|
4148
|
+
"{pluginName}": updatePluginRequest.pluginName
|
|
4149
|
+
};
|
|
4150
|
+
const queryParams = {};
|
|
4151
|
+
let headerParams = {
|
|
4152
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
4153
|
+
"if-match": updatePluginRequest.ifMatch,
|
|
4154
|
+
"opc-request-id": updatePluginRequest.opcRequestId
|
|
4155
|
+
};
|
|
4156
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
4157
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, updatePluginRequest.retryConfiguration, specRetryConfiguration);
|
|
4158
|
+
if (this.logger)
|
|
4159
|
+
retrier.logger = this.logger;
|
|
4160
|
+
const request = yield oci_common_1.composeRequest({
|
|
4161
|
+
baseEndpoint: this._endpoint,
|
|
4162
|
+
defaultHeaders: this._defaultHeaders,
|
|
4163
|
+
path: "/agents/{agentId}/plugins/{pluginName}",
|
|
4164
|
+
method: "PUT",
|
|
4165
|
+
bodyContent: common.ObjectSerializer.serialize(updatePluginRequest.updatePluginDetails, "UpdatePluginDetails", model.UpdatePluginDetails.getJsonObj),
|
|
4166
|
+
pathParams: pathParams,
|
|
4167
|
+
headerParams: headerParams,
|
|
4168
|
+
queryParams: queryParams
|
|
4169
|
+
});
|
|
4170
|
+
try {
|
|
4171
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
4172
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
4173
|
+
responseObject: {},
|
|
4174
|
+
body: yield response.json(),
|
|
4175
|
+
bodyKey: "plugin",
|
|
4176
|
+
bodyModel: model.Plugin,
|
|
4177
|
+
type: "model.Plugin",
|
|
4178
|
+
responseHeaders: [
|
|
4179
|
+
{
|
|
4180
|
+
value: response.headers.get("etag"),
|
|
4181
|
+
key: "etag",
|
|
4182
|
+
dataType: "string"
|
|
4183
|
+
},
|
|
4184
|
+
{
|
|
4185
|
+
value: response.headers.get("opc-request-id"),
|
|
4186
|
+
key: "opcRequestId",
|
|
4187
|
+
dataType: "string"
|
|
4188
|
+
}
|
|
4189
|
+
]
|
|
4190
|
+
});
|
|
4191
|
+
return sdkResponse;
|
|
4192
|
+
}
|
|
4193
|
+
catch (err) {
|
|
4194
|
+
throw err;
|
|
4195
|
+
}
|
|
4196
|
+
});
|
|
4197
|
+
}
|
|
4198
|
+
}
|
|
4199
|
+
exports.OcbAgentSvcClient = OcbAgentSvcClient;
|
|
4200
|
+
OcbAgentSvcClient.serviceEndpointTemplate = "https://cloudbridge.{region}.oci.{secondLevelDomain}";
|
|
4201
|
+
OcbAgentSvcClient.endpointServiceName = "";
|
|
4202
|
+
//# sourceMappingURL=client.js.map
|