# 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
identity_domains_client = oci.identity_domains.IdentityDomainsClient(
    config, "https://endpoint_of_this_service.com")


# Send the request to service, some parameters are not required, see API
# doc for more info
put_cloud_gate_response = identity_domains_client.put_cloud_gate(
    cloud_gate_id="ocid1.test.oc1..<unique_ID>EXAMPLE-cloudGateId-Value",
    authorization="EXAMPLE-authorization-Value",
    resource_type_schema_version="EXAMPLE-resourceTypeSchemaVersion-Value",
    attributes="EXAMPLE-attributes-Value",
    attribute_sets=["never"],
    cloud_gate=oci.identity_domains.models.CloudGate(
        schemas=["EXAMPLE--Value"],
        display_name="EXAMPLE-displayName-Value",
        id="ocid1.test.oc1..<unique_ID>EXAMPLE-id-Value",
        ocid="EXAMPLE-ocid-Value",
        meta=oci.identity_domains.models.Meta(
            resource_type="EXAMPLE-resourceType-Value",
            created="EXAMPLE-created-Value",
            last_modified="EXAMPLE-lastModified-Value",
            location="EXAMPLE-location-Value",
            version="EXAMPLE-version-Value"),
        idcs_created_by=oci.identity_domains.models.IdcsCreatedBy(
            value="EXAMPLE-value-Value",
            ref=None,
            type="App",
            display="EXAMPLE-display-Value",
            ocid="EXAMPLE-ocid-Value"),
        idcs_last_modified_by=oci.identity_domains.models.IdcsLastModifiedBy(
            value="EXAMPLE-value-Value",
            ref=None,
            type="App",
            display="EXAMPLE-display-Value",
            ocid="EXAMPLE-ocid-Value"),
        idcs_prevented_operations=["update"],
        tags=[
            oci.identity_domains.models.Tags(
                key="EXAMPLE-key-Value",
                value="EXAMPLE-value-Value")],
        delete_in_progress=False,
        idcs_last_upgraded_in_release="EXAMPLE-idcsLastUpgradedInRelease-Value",
        domain_ocid="EXAMPLE-domainOcid-Value",
        compartment_ocid="EXAMPLE-compartmentOcid-Value",
        tenancy_ocid="EXAMPLE-tenancyOcid-Value",
        is_opc_service=True,
        last_modified_time="EXAMPLE-lastModifiedTime-Value",
        description="EXAMPLE-description-Value",
        active=False,
        type="lbaas",
        upstream_server_groups=[
            oci.identity_domains.models.CloudGateExtUpstreamServerGroups(
                value="EXAMPLE-value-Value",
                display_name="EXAMPLE-displayName-Value",
                ref=None,
                nginx_settings="EXAMPLE-nginxSettings-Value",
                ssl=False)],
        upstream_servers=[
            oci.identity_domains.models.CloudGateExtUpstreamServers(
                value="EXAMPLE-value-Value",
                ref=None,
                host_name="EXAMPLE-hostName-Value",
                port=631,
                nginx_settings="EXAMPLE-nginxSettings-Value",
                group_id="ocid1.test.oc1..<unique_ID>EXAMPLE-groupId-Value",
                display_name="EXAMPLE-displayName-Value")],
        oauth_client=oci.identity_domains.models.CloudGateOauthClient(
            value="EXAMPLE-value-Value",
            ref=None,
            client_id="ocid1.test.oc1..<unique_ID>EXAMPLE-clientId-Value"),
        servers=[
            oci.identity_domains.models.CloudGateExtServers(
                host_name="EXAMPLE-hostName-Value",
                port=502,
                ssl=True,
                server_id="ocid1.test.oc1..<unique_ID>EXAMPLE-serverId-Value",
                nginx_settings="EXAMPLE-nginxSettings-Value")],
        mappings=[
            oci.identity_domains.models.CloudGateExtMappings(
                resource_prefix="EXAMPLE-resourcePrefix-Value",
                server_id="ocid1.test.oc1..<unique_ID>EXAMPLE-serverId-Value",
                mapping_id="ocid1.test.oc1..<unique_ID>EXAMPLE-mappingId-Value",
                proxy_pass="EXAMPLE-proxyPass-Value",
                nginx_settings="EXAMPLE-nginxSettings-Value",
                app_id="ocid1.test.oc1..<unique_ID>EXAMPLE-appId-Value",
                value="EXAMPLE-value-Value",
                name="EXAMPLE-name-Value",
                ref=None,
                policy_name="EXAMPLE-policyName-Value",
                upstream_server_group_id="ocid1.test.oc1..<unique_ID>EXAMPLE-upstreamServerGroupId-Value")]),
    if_match="EXAMPLE-ifMatch-Value",
    opc_retry_token="EXAMPLE-opcRetryToken-Value")

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