# 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
from datetime import datetime
# 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
rover_client = oci.rover.RoverNodeClient(config)
# Send the request to service, some parameters are not required, see API
# doc for more info
create_rover_node_response = rover_client.create_rover_node(
create_rover_node_details=oci.rover.models.CreateRoverNodeDetails(
display_name="EXAMPLE-displayName-Value",
compartment_id="ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value",
shape="EXAMPLE-shape-Value",
customer_shipping_address=oci.rover.models.ShippingAddress(
addressee="EXAMPLE-addressee-Value",
address1="EXAMPLE-address1-Value",
city_or_locality="EXAMPLE-cityOrLocality-Value",
state_or_region="EXAMPLE-stateOrRegion-Value",
zipcode="EXAMPLE-zipcode-Value",
country="EXAMPLE-country-Value",
phone_number="EXAMPLE-phoneNumber-Value",
care_of="EXAMPLE-careOf-Value",
address2="EXAMPLE-address2-Value",
address3="EXAMPLE-address3-Value",
address4="EXAMPLE-address4-Value",
email="EXAMPLE-email-Value"),
node_workloads=[
oci.rover.models.RoverWorkload(
compartment_id="ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value",
id="ocid1.test.oc1..<unique_ID>EXAMPLE-id-Value",
workload_type="EXAMPLE-workloadType-Value",
name="EXAMPLE-name-Value",
size="EXAMPLE-size-Value",
object_count="EXAMPLE-objectCount-Value",
prefix="EXAMPLE-prefix-Value",
range_start="EXAMPLE-rangeStart-Value",
range_end="EXAMPLE-rangeEnd-Value",
work_request_id="ocid1.test.oc1..<unique_ID>EXAMPLE-workRequestId-Value")],
super_user_password="EXAMPLE-superUserPassword-Value",
unlock_passphrase="EXAMPLE-unlockPassphrase-Value",
point_of_contact="EXAMPLE-pointOfContact-Value",
point_of_contact_phone_number="EXAMPLE-pointOfContactPhoneNumber-Value",
shipping_preference="CUSTOMER_PICKUP",
shipping_vendor="EXAMPLE-shippingVendor-Value",
time_pickup_expected=datetime.strptime(
"2025-05-03T17:30:09.946Z",
"%Y-%m-%dT%H:%M:%S.%fZ"),
public_key="EXAMPLE-publicKey-Value",
time_return_window_starts=datetime.strptime(
"2019-05-12T07:28:59.824Z",
"%Y-%m-%dT%H:%M:%S.%fZ"),
time_return_window_ends=datetime.strptime(
"2008-09-03T10:46:24.405Z",
"%Y-%m-%dT%H:%M:%S.%fZ"),
lifecycle_state="DELETED",
enclosure_type="NON_RUGGADIZED",
lifecycle_state_details="EXAMPLE-lifecycleStateDetails-Value",
serial_number="EXAMPLE-serialNumber-Value",
oracle_shipping_tracking_url="EXAMPLE-oracleShippingTrackingUrl-Value",
is_import_requested=False,
import_compartment_id="ocid1.test.oc1..<unique_ID>EXAMPLE-importCompartmentId-Value",
import_file_bucket="EXAMPLE-importFileBucket-Value",
data_validation_code="EXAMPLE-dataValidationCode-Value",
master_key_id="ocid1.test.oc1..<unique_ID>EXAMPLE-masterKeyId-Value",
certificate_authority_id="ocid1.test.oc1..<unique_ID>EXAMPLE-certificateAuthorityId-Value",
time_cert_validity_end=datetime.strptime(
"2021-01-29T06:13:06.468Z",
"%Y-%m-%dT%H:%M:%S.%fZ"),
common_name="EXAMPLE-commonName-Value",
cert_compartment_id="ocid1.test.oc1..<unique_ID>EXAMPLE-certCompartmentId-Value",
cert_key_algorithm="ECDSA_P256",
cert_signature_algorithm="SHA256_WITH_RSA",
freeform_tags={
'EXAMPLE_KEY_d8Nq2': 'EXAMPLE_VALUE_D4L77BKlHSHGgOBVADXL'},
defined_tags={
'EXAMPLE_KEY_TrzTt': {
'EXAMPLE_KEY_dN9dN': 'EXAMPLE--Value'}},
system_tags={
'EXAMPLE_KEY_ViSSg': {
'EXAMPLE_KEY_eFm6X': 'EXAMPLE--Value'}}),
opc_retry_token="EXAMPLE-opcRetryToken-Value",
opc_request_id="HFFNRRCKHG9JX6NI4PKE<unique_ID>")
# Get the data from response
print(create_rover_node_response.data)