# 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.FleetAppsManagementCatalogClient(
config)
# Send the request to service, some parameters are not required, see API
# doc for more info
create_catalog_item_response = fleet_apps_management_client.create_catalog_item(
create_catalog_item_details=oci.fleet_apps_management.models.CreateCatalogItemDetails(
compartment_id="ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value",
config_source_type="GIT_CATALOG_SOURCE",
description="EXAMPLE-description-Value",
display_name="EXAMPLE-displayName-Value",
package_type="NON_TF_PACKAGE",
version_description="EXAMPLE-versionDescription-Value",
short_description="EXAMPLE-shortDescription-Value",
time_released=datetime.strptime(
"2023-02-08T08:46:08.353Z",
"%Y-%m-%dT%H:%M:%S.%fZ"),
catalog_source_payload=oci.fleet_apps_management.models.CatalogMarketplaceSourceConfig(
config_source_type="MARKETPLACE_CATALOG_SOURCE",
working_directory="EXAMPLE-workingDirectory-Value",
listing_id="ocid1.test.oc1..<unique_ID>EXAMPLE-listingId-Value",
version="EXAMPLE-version-Value"),
listing_id="ocid1.test.oc1..<unique_ID>EXAMPLE-listingId-Value",
listing_version="EXAMPLE-listingVersion-Value",
is_item_locked=True,
freeform_tags={
'EXAMPLE_KEY_xYfWF': 'EXAMPLE_VALUE_Iw6g6WKT5MfJWUlf8zi5'},
defined_tags={
'EXAMPLE_KEY_3EIi0': {
'EXAMPLE_KEY_rnjqx': 'EXAMPLE--Value'}}),
opc_retry_token="EXAMPLE-opcRetryToken-Value",
opc_request_id="LG9ODJPB2CRZ8VWWVEU1<unique_ID>")
# Get the data from response
print(create_catalog_item_response.data)