# This is an automatically generated code sample.
# To make this code sample work in your Oracle Cloud tenancy,
# please replace the values for any parameters whose current values do not fit
# your use case (such as resource IDs, strings containing ‘EXAMPLE’ or ‘unique_id’, and
# boolean, number, and enum parameters with values not fitting your use case).
from datetime import datetime
import oci
# Create a default config using DEFAULT profile in default location
# Refer to
# https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm#SDK_and_CLI_Configuration_File
# for more info
config = oci.config.from_file()
# Initialize service client with default config file
fleet_apps_management_client = oci.fleet_apps_management.FleetAppsManagementOperationsClient(
config)
# Send the request to service, some parameters are not required, see API
# doc for more info
update_patch_response = fleet_apps_management_client.update_patch(
patch_id="ocid1.test.oc1..<unique_ID>EXAMPLE-patchId-Value",
update_patch_details=oci.fleet_apps_management.models.UpdatePatchDetails(
description="EXAMPLE-description-Value",
patch_type=oci.fleet_apps_management.models.PatchType(
platform_configuration_id="ocid1.test.oc1..<unique_ID>EXAMPLE-platformConfigurationId-Value"),
severity="LOW",
time_released=datetime.strptime(
"2046-05-18T12:37:14.373Z",
"%Y-%m-%dT%H:%M:%S.%fZ"),
artifact_details=oci.fleet_apps_management.models.GenericArtifactDetails(
category="GENERIC",
artifact=oci.fleet_apps_management.models.GenericArtifact(
content=oci.fleet_apps_management.models.ObjectStorageBucketContentDetails(
source_type="OBJECT_STORAGE_BUCKET",
namespace_name="EXAMPLE-namespaceName-Value",
bucket_name="EXAMPLE-bucketName-Value",
object_name="EXAMPLE-objectName-Value",
checksum="EXAMPLE-checksum-Value"))),
product=oci.fleet_apps_management.models.PatchProduct(
platform_configuration_id="ocid1.test.oc1..<unique_ID>EXAMPLE-platformConfigurationId-Value",
version="EXAMPLE-version-Value"),
dependent_patches=[
oci.fleet_apps_management.models.DependentPatchDetails(
id="ocid1.test.oc1..<unique_ID>EXAMPLE-id-Value")],
compartment_id="ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value",
freeform_tags={
'EXAMPLE_KEY_PfZrt': 'EXAMPLE_VALUE_6Rk0ohAqlS5Orz9dbeut'},
defined_tags={
'EXAMPLE_KEY_G8QoA': {
'EXAMPLE_KEY_Rfucj': 'EXAMPLE--Value'}}),
if_match="EXAMPLE-ifMatch-Value",
opc_request_id="ALBLXTUZYE3M15WVY7ID<unique_ID>")
# Get the data from response
print(update_patch_response.headers)