# 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).

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
cims_client = oci.cims.IncidentClient(config)


# Send the request to service, some parameters are not required, see API
# doc for more info
create_incident_response = cims_client.create_incident(
    create_incident_details=oci.cims.models.CreateIncident(
        compartment_id="ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value",
        ticket=oci.cims.models.CreateTicketDetails(
            severity="HIGH",
            title="EXAMPLE-title-Value",
            description="EXAMPLE-description-Value",
            resource_list=[
                oci.cims.models.CreateResourceDetails(
                    item=oci.cims.models.CreateLimitItemDetails(
                        type="limit",
                        category=oci.cims.models.CreateCategoryDetails(
                            category_key="EXAMPLE-categoryKey-Value"),
                        sub_category=oci.cims.models.CreateSubCategoryDetails(
                            sub_category_key="EXAMPLE-subCategoryKey-Value"),
                        issue_type=oci.cims.models.CreateIssueTypeDetails(
                            issue_type_key="EXAMPLE-issueTypeKey-Value"),
                        name="EXAMPLE-name-Value",
                        current_limit=948,
                        current_usage=671,
                        requested_limit=41,
                        limit_status="NOT_APPROVED"),
                    region="INTEG_STABLE",
                    availability_domain="PHX_AD_1")],
            contextual_data=oci.cims.models.ContextualData(
                client_id="ocid1.test.oc1..<unique_ID>EXAMPLE-clientId-Value",
                schema_name="EXAMPLE-schemaName-Value",
                schema_version="EXAMPLE-schemaVersion-Value",
                payload="EXAMPLE-payload-Value")),
        problem_type="ACCOUNT",
        csi="EXAMPLE-csi-Value",
        contacts=[
            oci.cims.models.Contact(
                contact_name="EXAMPLE-contactName-Value",
                contact_email="EXAMPLE-contactEmail-Value",
                contact_phone="EXAMPLE-contactPhone-Value",
                contact_type="PRIMARY")],
        referrer="EXAMPLE-referrer-Value"),
    ocid="EXAMPLE-ocid-Value",
    opc_request_id="0XQQZMGRLPXECMN7M6IA<unique_ID>",
    homeregion="EXAMPLE-homeregion-Value")

# Get the data from response
print(create_incident_response.data)