oci 2.135.0__py3-none-any.whl → 2.135.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- oci/__init__.py +2 -2
- oci/access_governance_cp/access_governance_cp_client.py +8 -8
- oci/adm/application_dependency_management_client.py +36 -36
- oci/ai_anomaly_detection/anomaly_detection_client.py +36 -36
- oci/ai_document/ai_service_document_client.py +26 -26
- oci/ai_language/ai_service_language_client.py +44 -44
- oci/ai_speech/ai_service_speech_client.py +19 -19
- oci/ai_vision/ai_service_vision_client.py +25 -25
- oci/analytics/analytics_client.py +24 -24
- oci/announcements_service/announcement_client.py +5 -5
- oci/announcements_service/announcement_subscription_client.py +9 -9
- oci/announcements_service/announcements_preferences_client.py +4 -4
- oci/announcements_service/service_client.py +1 -1
- oci/apigateway/api_gateway_client.py +21 -21
- oci/apigateway/deployment_client.py +6 -6
- oci/apigateway/gateway_client.py +6 -6
- oci/apigateway/subscribers_client.py +6 -6
- oci/apigateway/usage_plans_client.py +6 -6
- oci/apigateway/work_requests_client.py +5 -5
- oci/apm_config/config_client.py +9 -9
- oci/apm_control_plane/apm_domain_client.py +14 -14
- oci/apm_synthetics/apm_synthetic_client.py +28 -28
- oci/apm_traces/attributes_client.py +8 -8
- oci/apm_traces/query_client.py +2 -2
- oci/apm_traces/trace_client.py +4 -4
- oci/appmgmt_control/appmgmt_control_client.py +8 -8
- oci/artifacts/artifacts_client.py +32 -32
- oci/audit/audit_client.py +3 -3
- oci/autoscaling/auto_scaling_client.py +11 -11
- oci/bastion/bastion_client.py +15 -15
- oci/bds/bds_client.py +72 -72
- oci/blockchain/blockchain_platform_client.py +27 -27
- oci/budget/budget_client.py +10 -10
- oci/capacity_management/capacity_management_client.py +32 -32
- oci/certificates/certificates_client.py +5 -5
- oci/certificates_management/certificates_management_client.py +32 -32
- oci/cims/incident_client.py +8 -8
- oci/cims/user_client.py +1 -1
- oci/cloud_bridge/common_client.py +5 -5
- oci/cloud_bridge/discovery_client.py +14 -14
- oci/cloud_bridge/inventory_client.py +16 -16
- oci/cloud_bridge/ocb_agent_svc_client.py +23 -23
- oci/cloud_guard/cloud_guard_client.py +155 -155
- oci/cloud_migrations/migration_client.py +43 -43
- oci/cluster_placement_groups/cluster_placement_groups_cp_client.py +13 -13
- oci/compute_cloud_at_customer/compute_cloud_at_customer_client.py +12 -12
- oci/compute_instance_agent/compute_instance_agent_client.py +6 -6
- oci/compute_instance_agent/plugin_client.py +2 -2
- oci/compute_instance_agent/pluginconfig_client.py +1 -1
- oci/container_engine/container_engine_client.py +98 -94
- oci/container_engine/models/cluster.py +6 -2
- oci/container_engine/models/cluster_summary.py +6 -2
- oci/container_engine/models/node.py +6 -2
- oci/container_engine/models/node_pool.py +6 -2
- oci/container_engine/models/node_pool_summary.py +6 -2
- oci/container_engine/models/start_credential_rotation_details.py +2 -2
- oci/container_engine/models/work_request.py +7 -3
- oci/container_engine/models/work_request_summary.py +7 -3
- oci/container_engine/models/workload_mapping.py +35 -2
- oci/container_engine/models/workload_mapping_summary.py +35 -2
- oci/container_instances/container_instance_client.py +18 -18
- oci/core/blockstorage_client.py +60 -60
- oci/core/compute_client.py +108 -102
- oci/core/compute_management_client.py +32 -32
- oci/core/models/__init__.py +2 -0
- oci/core/models/add_network_security_group_security_rules_details.py +6 -2
- oci/core/models/create_service_gateway_details.py +2 -2
- oci/core/models/create_vcn_details.py +35 -0
- oci/core/models/create_vnic_details.py +35 -0
- oci/core/models/instance.py +82 -0
- oci/core/models/instance_configuration_create_vnic_details.py +35 -0
- oci/core/models/instance_configuration_launch_instance_details.py +35 -0
- oci/core/models/launch_attach_paravirtualized_volume_details.py +123 -0
- oci/core/models/launch_attach_volume_details.py +4 -0
- oci/core/models/launch_instance_details.py +35 -0
- oci/core/models/service_gateway.py +4 -4
- oci/core/models/update_instance_details.py +35 -0
- oci/core/models/update_vcn_details.py +37 -2
- oci/core/models/update_vnic_details.py +35 -0
- oci/core/models/vcn.py +35 -0
- oci/core/models/vnic.py +35 -0
- oci/core/virtual_network_client.py +253 -250
- oci/dashboard_service/dashboard_client.py +6 -6
- oci/dashboard_service/dashboard_group_client.py +6 -6
- oci/data_catalog/data_catalog_client.py +149 -149
- oci/data_flow/data_flow_client.py +42 -42
- oci/data_integration/data_integration_client.py +163 -163
- oci/data_labeling_service/data_labeling_management_client.py +17 -17
- oci/data_labeling_service_dataplane/data_labeling_client.py +15 -15
- oci/data_safe/data_safe_client.py +292 -292
- oci/data_science/data_science_client.py +91 -91
- oci/database/database_client.py +396 -396
- oci/database/models/autonomous_database.py +39 -0
- oci/database/models/autonomous_database_summary.py +39 -0
- oci/database/models/cloud_autonomous_vm_cluster.py +39 -0
- oci/database/models/cloud_autonomous_vm_cluster_summary.py +39 -0
- oci/database/models/cloud_vm_cluster.py +68 -2
- oci/database/models/cloud_vm_cluster_summary.py +68 -2
- oci/database/models/create_autonomous_database_base.py +39 -0
- oci/database/models/create_autonomous_database_clone_details.py +7 -0
- oci/database/models/create_autonomous_database_details.py +7 -0
- oci/database/models/create_autonomous_database_from_backup_details.py +7 -0
- oci/database/models/create_autonomous_database_from_backup_timestamp_details.py +7 -0
- oci/database/models/create_cloud_autonomous_vm_cluster_details.py +41 -2
- oci/database/models/create_cloud_vm_cluster_details.py +68 -2
- oci/database/models/create_cross_region_autonomous_database_data_guard_details.py +7 -0
- oci/database/models/create_cross_region_disaster_recovery_details.py +7 -0
- oci/database/models/create_cross_tenancy_disaster_recovery_details.py +7 -0
- oci/database/models/create_data_guard_association_with_new_db_system_details.py +39 -0
- oci/database/models/create_exadb_vm_cluster_details.py +39 -0
- oci/database/models/create_refreshable_autonomous_database_clone_details.py +7 -0
- oci/database/models/create_vm_cluster_details.py +29 -2
- oci/database/models/db_system.py +39 -0
- oci/database/models/db_system_summary.py +39 -0
- oci/database/models/exadb_vm_cluster.py +39 -0
- oci/database/models/exadb_vm_cluster_summary.py +39 -0
- oci/database/models/launch_db_system_base.py +39 -0
- oci/database/models/launch_db_system_details.py +7 -0
- oci/database/models/launch_db_system_from_backup_details.py +7 -0
- oci/database/models/launch_db_system_from_database_details.py +7 -0
- oci/database/models/launch_db_system_from_db_system_details.py +7 -0
- oci/database/models/undelete_autonomous_database_details.py +7 -0
- oci/database/models/update_autonomous_database_details.py +39 -0
- oci/database/models/update_cloud_autonomous_vm_cluster_details.py +41 -2
- oci/database/models/update_cloud_vm_cluster_details.py +68 -2
- oci/database/models/update_db_system_details.py +39 -0
- oci/database/models/update_exadb_vm_cluster_details.py +39 -0
- oci/database/models/update_vm_cluster_details.py +29 -2
- oci/database/models/vm_cluster.py +29 -2
- oci/database/models/vm_cluster_summary.py +29 -2
- oci/database_management/db_management_client.py +211 -211
- oci/database_management/diagnosability_client.py +4 -4
- oci/database_management/managed_my_sql_databases_client.py +7 -7
- oci/database_management/perfhub_client.py +1 -1
- oci/database_management/sql_tuning_client.py +17 -17
- oci/database_migration/database_migration_client.py +42 -42
- oci/database_tools/database_tools_client.py +23 -23
- oci/delegate_access_control/delegate_access_control_client.py +26 -26
- oci/delegate_access_control/work_request_client.py +4 -4
- oci/demand_signal/occ_demand_signal_client.py +7 -7
- oci/desktops/desktop_service_client.py +33 -22
- oci/desktops/models/__init__.py +18 -0
- oci/desktops/models/create_desktop_pool_desktop_session_lifecycle_actions.py +95 -0
- oci/desktops/models/create_desktop_pool_details.py +136 -4
- oci/desktops/models/create_desktop_pool_private_access_details.py +142 -0
- oci/desktops/models/create_desktop_pool_shape_config_details.py +170 -0
- oci/desktops/models/desktop_image.py +33 -2
- oci/desktops/models/desktop_network_configuration.py +14 -4
- oci/desktops/models/desktop_pool.py +136 -4
- oci/desktops/models/desktop_pool_private_access_details.py +212 -0
- oci/desktops/models/desktop_pool_shape_config.py +170 -0
- oci/desktops/models/desktop_session_lifecycle_actions.py +95 -0
- oci/desktops/models/disconnect_config.py +121 -0
- oci/desktops/models/inactivity_config.py +121 -0
- oci/desktops/models/update_desktop_pool_desktop_session_lifecycle_actions.py +95 -0
- oci/desktops/models/update_desktop_pool_details.py +29 -2
- oci/devops/devops_client.py +141 -141
- oci/disaster_recovery/disaster_recovery_client.py +29 -29
- oci/dns/dns_client.py +52 -52
- oci/dts/appliance_export_job_client.py +6 -6
- oci/dts/shipping_vendors_client.py +1 -1
- oci/dts/transfer_appliance_client.py +8 -8
- oci/dts/transfer_appliance_entitlement_client.py +3 -3
- oci/dts/transfer_device_client.py +5 -5
- oci/dts/transfer_job_client.py +6 -6
- oci/dts/transfer_package_client.py +7 -7
- oci/em_warehouse/em_data_lake_client.py +13 -13
- oci/em_warehouse/em_warehouse_client.py +13 -13
- oci/email/email_client.py +31 -31
- oci/email_data_plane/email_dp_client.py +1 -1
- oci/events/events_client.py +6 -6
- oci/file_storage/file_storage_client.py +54 -54
- oci/fleet_apps_management/fleet_apps_management_admin_client.py +8 -8
- oci/fleet_apps_management/fleet_apps_management_client.py +35 -35
- oci/fleet_apps_management/fleet_apps_management_maintenance_window_client.py +5 -5
- oci/fleet_apps_management/fleet_apps_management_operations_client.py +13 -13
- oci/fleet_apps_management/fleet_apps_management_runbooks_client.py +4 -4
- oci/fleet_software_update/fleet_software_update_client.py +46 -46
- oci/functions/functions_invoke_client.py +1 -1
- oci/functions/functions_management_client.py +16 -16
- oci/fusion_apps/data_masking_activity_client.py +3 -3
- oci/fusion_apps/fusion_applications_client.py +42 -42
- oci/fusion_apps/fusion_environment_client.py +15 -15
- oci/fusion_apps/fusion_environment_family_client.py +8 -8
- oci/fusion_apps/models/create_fusion_environment_admin_user_details.py +1 -1
- oci/fusion_apps/refresh_activity_client.py +4 -4
- oci/fusion_apps/scheduled_activity_client.py +2 -2
- oci/fusion_apps/service_attachment_client.py +2 -2
- oci/generative_ai/generative_ai_client.py +22 -22
- oci/generative_ai_agent/generative_ai_agent_client.py +33 -33
- oci/generative_ai_agent_runtime/generative_ai_agent_runtime_client.py +5 -5
- oci/generative_ai_inference/generative_ai_inference_client.py +4 -4
- oci/generic_artifacts_content/generic_artifacts_content_client.py +3 -3
- oci/globally_distributed_database/sharded_database_service_client.py +30 -30
- oci/golden_gate/golden_gate_client.py +68 -68
- oci/governance_rules_control_plane/governance_rule_client.py +15 -15
- oci/governance_rules_control_plane/work_request_client.py +5 -5
- oci/healthchecks/health_checks_client.py +17 -17
- oci/identity/identity_client.py +145 -145
- oci/identity_data_plane/dataplane_client.py +2 -2
- oci/identity_domains/identity_domains_client.py +307 -307
- oci/integration/integration_instance_client.py +137 -18
- oci/integration/integration_instance_client_composite_operations.py +39 -0
- oci/integration/models/__init__.py +4 -0
- oci/integration/models/create_integration_instance_details.py +31 -0
- oci/integration/models/cross_region_integration_instance_details.py +185 -0
- oci/integration/models/disaster_recovery_details.py +150 -0
- oci/integration/models/integration_instance.py +89 -0
- oci/integration/models/integration_instance_summary.py +62 -0
- oci/integration/models/work_request.py +7 -3
- oci/integration/models/work_request_summary.py +7 -3
- oci/jms/java_management_service_client.py +75 -75
- oci/jms_java_downloads/java_download_client.py +25 -25
- oci/key_management/ekm_client.py +5 -5
- oci/key_management/kms_crypto_client.py +6 -6
- oci/key_management/kms_hsm_cluster_client.py +12 -12
- oci/key_management/kms_management_client.py +21 -21
- oci/key_management/kms_vault_client.py +14 -14
- oci/license_manager/license_manager_client.py +18 -18
- oci/limits/limits_client.py +4 -4
- oci/limits/quotas_client.py +7 -7
- oci/load_balancer/load_balancer_client.py +61 -61
- oci/load_balancer/models/connection_configuration.py +47 -2
- oci/load_balancer/models/create_load_balancer_details.py +35 -0
- oci/load_balancer/models/load_balancer.py +35 -0
- oci/load_balancer/models/update_load_balancer_details.py +37 -2
- oci/lockbox/lockbox_client.py +24 -24
- oci/log_analytics/log_analytics_client.py +193 -193
- oci/logging/logging_management_client.py +30 -30
- oci/loggingingestion/logging_client.py +1 -1
- oci/loggingsearch/log_search_client.py +1 -1
- oci/management_agent/management_agent_client.py +28 -28
- oci/management_dashboard/dashx_apis_client.py +14 -14
- oci/marketplace/account_client.py +2 -2
- oci/marketplace/marketplace_client.py +30 -30
- oci/marketplace_private_offer/attachment_client.py +5 -5
- oci/marketplace_private_offer/offer_client.py +6 -6
- oci/marketplace_publisher/attachment_client.py +5 -5
- oci/marketplace_publisher/marketplace_publisher_client.py +71 -71
- oci/marketplace_publisher/offer_client.py +6 -6
- oci/media_services/media_services_client.py +60 -60
- oci/media_services/media_stream_client.py +2 -2
- oci/monitoring/monitoring_client.py +18 -18
- oci/mysql/channels_client.py +7 -7
- oci/mysql/db_backups_client.py +7 -7
- oci/mysql/db_system_client.py +17 -17
- oci/mysql/mysqlaas_client.py +7 -7
- oci/mysql/replicas_client.py +5 -5
- oci/mysql/work_requests_client.py +4 -4
- oci/network_firewall/network_firewall_client.py +86 -86
- oci/network_load_balancer/models/create_network_load_balancer_details.py +43 -2
- oci/network_load_balancer/models/network_load_balancer.py +41 -0
- oci/network_load_balancer/models/network_load_balancer_summary.py +41 -0
- oci/network_load_balancer/models/update_network_load_balancer_details.py +43 -2
- oci/network_load_balancer/network_load_balancer_client.py +34 -34
- oci/nosql/nosql_client.py +24 -24
- oci/object_storage/object_storage_client.py +55 -55
- oci/oce/oce_instance_client.py +10 -10
- oci/oci_control_center/occ_metrics_client.py +3 -3
- oci/ocvp/cluster_client.py +5 -5
- oci/ocvp/esxi_host_client.py +8 -8
- oci/ocvp/sddc_client.py +14 -14
- oci/ocvp/work_request_client.py +4 -4
- oci/oda/management_client.py +59 -59
- oci/oda/oda_client.py +17 -17
- oci/oda/odapackage_client.py +7 -7
- oci/onesubscription/billing_schedule_client.py +1 -1
- oci/onesubscription/commitment_client.py +2 -2
- oci/onesubscription/computed_usage_client.py +3 -3
- oci/onesubscription/invoice_summary_client.py +2 -2
- oci/onesubscription/organization_subscription_client.py +1 -1
- oci/onesubscription/ratecard_client.py +1 -1
- oci/onesubscription/subscribed_service_client.py +2 -2
- oci/onesubscription/subscription_client.py +1 -1
- oci/ons/notification_control_plane_client.py +6 -6
- oci/ons/notification_data_plane_client.py +10 -10
- oci/opa/opa_instance_client.py +13 -13
- oci/opensearch/opensearch_cluster_backup_client.py +4 -4
- oci/opensearch/opensearch_cluster_client.py +14 -14
- oci/operator_access_control/access_requests_client.py +10 -10
- oci/operator_access_control/operator_actions_client.py +2 -2
- oci/operator_access_control/operator_control_assignment_client.py +8 -8
- oci/operator_access_control/operator_control_client.py +6 -6
- oci/opsi/models/__init__.py +6 -0
- oci/opsi/models/create_autonomous_database_insight_details.py +291 -0
- oci/opsi/models/create_database_insight_details.py +4 -0
- oci/opsi/models/credential_by_iam.py +58 -0
- oci/opsi/models/credential_by_vault.py +1 -1
- oci/opsi/models/credential_details.py +13 -5
- oci/opsi/models/credentials_by_source.py +1 -1
- oci/opsi/models/enable_autonomous_database_insight_details.py +301 -0
- oci/opsi/models/enable_database_insight_details.py +4 -0
- oci/opsi/operations_insights_client.py +179 -179
- oci/optimizer/optimizer_client.py +26 -26
- oci/os_management/event_client.py +8 -8
- oci/os_management/os_management_client.py +69 -69
- oci/os_management_hub/event_client.py +8 -8
- oci/os_management_hub/lifecycle_environment_client.py +12 -12
- oci/os_management_hub/managed_instance_client.py +31 -31
- oci/os_management_hub/managed_instance_group_client.py +25 -25
- oci/os_management_hub/management_station_client.py +10 -10
- oci/os_management_hub/onboarding_client.py +6 -6
- oci/os_management_hub/reporting_managed_instance_client.py +3 -3
- oci/os_management_hub/scheduled_job_client.py +7 -7
- oci/os_management_hub/software_source_client.py +27 -27
- oci/os_management_hub/work_request_client.py +4 -4
- oci/osp_gateway/address_rule_service_client.py +1 -1
- oci/osp_gateway/address_service_client.py +2 -2
- oci/osp_gateway/invoice_service_client.py +5 -5
- oci/osp_gateway/subscription_service_client.py +5 -5
- oci/osub_billing_schedule/billing_schedule_client.py +1 -1
- oci/osub_organization_subscription/organization_subscription_client.py +1 -1
- oci/osub_subscription/commitment_client.py +2 -2
- oci/osub_subscription/ratecard_client.py +1 -1
- oci/osub_subscription/subscription_client.py +1 -1
- oci/osub_usage/computed_usage_client.py +3 -3
- oci/psql/postgresql_client.py +33 -33
- oci/queue/queue_admin_client.py +11 -11
- oci/queue/queue_client.py +8 -8
- oci/recovery/database_recovery_client.py +26 -26
- oci/redis/redis_cluster_client.py +12 -12
- oci/regions_definitions.py +8 -0
- oci/resource_manager/resource_manager_client.py +52 -52
- oci/resource_scheduler/schedule_client.py +13 -13
- oci/resource_search/resource_search_client.py +3 -3
- oci/rover/rover_bundle_client.py +8 -8
- oci/rover/rover_cluster_client.py +8 -8
- oci/rover/rover_entitlement_client.py +6 -6
- oci/rover/rover_node_client.py +15 -15
- oci/rover/shape_client.py +1 -1
- oci/rover/work_requests_client.py +5 -5
- oci/sch/connector_plugins_client.py +2 -2
- oci/sch/service_connector_client.py +12 -12
- oci/secrets/secrets_client.py +3 -3
- oci/security_attribute/__init__.py +14 -0
- oci/security_attribute/models/__init__.py +54 -0
- oci/security_attribute/models/base_security_attribute_validator.py +122 -0
- oci/security_attribute/models/bulk_delete_security_attributes_details.py +72 -0
- oci/security_attribute/models/bulk_edit_resource.py +134 -0
- oci/security_attribute/models/bulk_edit_security_attribute_details.py +134 -0
- oci/security_attribute/models/bulk_edit_security_attribute_operation_details.py +147 -0
- oci/security_attribute/models/change_security_attribute_namespace_compartment_details.py +72 -0
- oci/security_attribute/models/create_security_attribute_details.py +132 -0
- oci/security_attribute/models/create_security_attribute_namespace_details.py +216 -0
- oci/security_attribute/models/default_security_attribute_validator.py +53 -0
- oci/security_attribute/models/enum_security_attribute_validator.py +85 -0
- oci/security_attribute/models/security_attribute.py +421 -0
- oci/security_attribute/models/security_attribute_namespace.py +446 -0
- oci/security_attribute/models/security_attribute_namespace_summary.py +410 -0
- oci/security_attribute/models/security_attribute_summary.py +361 -0
- oci/security_attribute/models/security_attribute_work_request.py +387 -0
- oci/security_attribute/models/security_attribute_work_request_error_summary.py +136 -0
- oci/security_attribute/models/security_attribute_work_request_log_summary.py +105 -0
- oci/security_attribute/models/security_attribute_work_request_summary.py +386 -0
- oci/security_attribute/models/update_security_attribute_details.py +136 -0
- oci/security_attribute/models/update_security_attribute_namespace_details.py +191 -0
- oci/security_attribute/models/work_request_resource.py +197 -0
- oci/security_attribute/security_attribute_client.py +2321 -0
- oci/security_attribute/security_attribute_client_composite_operations.py +265 -0
- oci/service_catalog/service_catalog_client.py +26 -26
- oci/service_manager_proxy/service_manager_proxy_client.py +2 -2
- oci/service_mesh/service_mesh_client.py +48 -48
- oci/stack_monitoring/models/__init__.py +20 -0
- oci/stack_monitoring/models/create_maintenance_window_details.py +196 -0
- oci/stack_monitoring/models/create_maintenance_window_resource_details.py +111 -0
- oci/stack_monitoring/models/maintenance_window.py +439 -0
- oci/stack_monitoring/models/maintenance_window_collection.py +72 -0
- oci/stack_monitoring/models/maintenance_window_schedule.py +109 -0
- oci/stack_monitoring/models/maintenance_window_summary.py +519 -0
- oci/stack_monitoring/models/monitored_resource_details.py +171 -0
- oci/stack_monitoring/models/one_time_maintenance_window_schedule.py +113 -0
- oci/stack_monitoring/models/recurrent_maintenance_window_schedule.py +191 -0
- oci/stack_monitoring/models/update_maintenance_window_details.py +130 -0
- oci/stack_monitoring/models/work_request.py +19 -3
- oci/stack_monitoring/models/work_request_summary.py +19 -3
- oci/stack_monitoring/stack_monitoring_client.py +921 -113
- oci/stack_monitoring/stack_monitoring_client_composite_operations.py +214 -0
- oci/streaming/stream_admin_client.py +18 -18
- oci/streaming/stream_client.py +8 -8
- oci/tenant_manager_control_plane/domain_client.py +5 -5
- oci/tenant_manager_control_plane/domain_governance_client.py +5 -5
- oci/tenant_manager_control_plane/governance_client.py +2 -2
- oci/tenant_manager_control_plane/link_client.py +3 -3
- oci/tenant_manager_control_plane/orders_client.py +2 -2
- oci/tenant_manager_control_plane/organization_client.py +10 -10
- oci/tenant_manager_control_plane/recipient_invitation_client.py +5 -5
- oci/tenant_manager_control_plane/sender_invitation_client.py +5 -5
- oci/tenant_manager_control_plane/subscription_client.py +11 -11
- oci/tenant_manager_control_plane/work_request_client.py +4 -4
- oci/threat_intelligence/threatintel_client.py +5 -5
- oci/usage/resources_client.py +2 -2
- oci/usage/rewards_client.py +6 -6
- oci/usage/usagelimits_client.py +1 -1
- oci/usage_api/usageapi_client.py +33 -33
- oci/vault/vaults_client.py +13 -13
- oci/vbs_inst/vbs_instance_client.py +10 -10
- oci/version.py +1 -1
- oci/visual_builder/vb_instance_client.py +13 -13
- oci/vn_monitoring/vn_monitoring_client.py +12 -12
- oci/vulnerability_scanning/vulnerability_scanning_client.py +58 -58
- oci/waa/waa_client.py +13 -13
- oci/waa/work_request_client.py +4 -4
- oci/waas/redirect_client.py +6 -6
- oci/waas/waas_client.py +66 -66
- oci/waf/waf_client.py +24 -24
- oci/work_requests/work_request_client.py +4 -4
- oci/zpr/__init__.py +14 -0
- oci/zpr/models/__init__.py +42 -0
- oci/zpr/models/configuration.py +449 -0
- oci/zpr/models/create_configuration_details.py +189 -0
- oci/zpr/models/create_zpr_policy_details.py +251 -0
- oci/zpr/models/update_zpr_policy_details.py +185 -0
- oci/zpr/models/work_request.py +459 -0
- oci/zpr/models/work_request_error.py +146 -0
- oci/zpr/models/work_request_error_collection.py +72 -0
- oci/zpr/models/work_request_log_entry.py +109 -0
- oci/zpr/models/work_request_log_entry_collection.py +72 -0
- oci/zpr/models/work_request_resource.py +238 -0
- oci/zpr/models/work_request_summary.py +457 -0
- oci/zpr/models/work_request_summary_collection.py +72 -0
- oci/zpr/models/zpr_policy.py +505 -0
- oci/zpr/models/zpr_policy_collection.py +72 -0
- oci/zpr/models/zpr_policy_summary.py +463 -0
- oci/zpr/zpr_client.py +2123 -0
- oci/zpr/zpr_client_composite_operations.py +197 -0
- {oci-2.135.0.dist-info → oci-2.135.2.dist-info}/METADATA +2 -2
- {oci-2.135.0.dist-info → oci-2.135.2.dist-info}/RECORD +431 -362
- {oci-2.135.0.dist-info → oci-2.135.2.dist-info}/LICENSE.txt +0 -0
- {oci-2.135.0.dist-info → oci-2.135.2.dist-info}/THIRD_PARTY_LICENSES.txt +0 -0
- {oci-2.135.0.dist-info → oci-2.135.2.dist-info}/WHEEL +0 -0
- {oci-2.135.0.dist-info → oci-2.135.2.dist-info}/top_level.txt +0 -0
oci/zpr/zpr_client.py
ADDED
@@ -0,0 +1,2123 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved.
|
3
|
+
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
|
4
|
+
|
5
|
+
# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20240301
|
6
|
+
|
7
|
+
from __future__ import absolute_import
|
8
|
+
|
9
|
+
from oci._vendor import requests # noqa: F401
|
10
|
+
from oci._vendor import six
|
11
|
+
|
12
|
+
from oci import retry, circuit_breaker # noqa: F401
|
13
|
+
from oci.base_client import BaseClient
|
14
|
+
from oci.config import get_config_value_or_default, validate_config
|
15
|
+
from oci.signer import Signer
|
16
|
+
from oci.util import Sentinel, get_signer_from_authentication_type, AUTHENTICATION_TYPE_FIELD_NAME
|
17
|
+
from oci.exceptions import InvalidAlloyConfig
|
18
|
+
from oci.alloy import OCI_SDK_ENABLED_SERVICES_SET
|
19
|
+
from .models import zpr_type_mapping
|
20
|
+
missing = Sentinel("Missing")
|
21
|
+
|
22
|
+
|
23
|
+
class ZprClient(object):
|
24
|
+
"""
|
25
|
+
Use the Zero Trust Packet Routing Control Plane API to manage ZPR configuration and policy. See the [Zero Trust Packet Routing](/iaas/Content/zero-trust-packet-routing/home.htm) documentation for more information.
|
26
|
+
"""
|
27
|
+
|
28
|
+
def __init__(self, config, **kwargs):
|
29
|
+
"""
|
30
|
+
Creates a new service client
|
31
|
+
|
32
|
+
:param dict config:
|
33
|
+
Configuration keys and values as per `SDK and Tool Configuration <https://docs.cloud.oracle.com/Content/API/Concepts/sdkconfig.htm>`__.
|
34
|
+
The :py:meth:`~oci.config.from_file` method can be used to load configuration from a file. Alternatively, a ``dict`` can be passed. You can validate_config
|
35
|
+
the dict using :py:meth:`~oci.config.validate_config`
|
36
|
+
|
37
|
+
:param str service_endpoint: (optional)
|
38
|
+
The endpoint of the service to call using this client. For example ``https://iaas.us-ashburn-1.oraclecloud.com``. If this keyword argument is
|
39
|
+
not provided then it will be derived using the region in the config parameter. You should only provide this keyword argument if you have an explicit
|
40
|
+
need to specify a service endpoint.
|
41
|
+
|
42
|
+
:param timeout: (optional)
|
43
|
+
The connection and read timeouts for the client. The default values are connection timeout 10 seconds and read timeout 60 seconds. This keyword argument can be provided
|
44
|
+
as a single float, in which case the value provided is used for both the read and connection timeouts, or as a tuple of two floats. If
|
45
|
+
a tuple is provided then the first value is used as the connection timeout and the second value as the read timeout.
|
46
|
+
:type timeout: float or tuple(float, float)
|
47
|
+
|
48
|
+
:param signer: (optional)
|
49
|
+
The signer to use when signing requests made by the service client. The default is to use a :py:class:`~oci.signer.Signer` based on the values
|
50
|
+
provided in the config parameter.
|
51
|
+
|
52
|
+
One use case for this parameter is for `Instance Principals authentication <https://docs.cloud.oracle.com/Content/Identity/Tasks/callingservicesfrominstances.htm>`__
|
53
|
+
by passing an instance of :py:class:`~oci.auth.signers.InstancePrincipalsSecurityTokenSigner` as the value for this keyword argument
|
54
|
+
:type signer: :py:class:`~oci.signer.AbstractBaseSigner`
|
55
|
+
|
56
|
+
:param obj retry_strategy: (optional)
|
57
|
+
A retry strategy to apply to all calls made by this service client (i.e. at the client level). There is no retry strategy applied by default.
|
58
|
+
Retry strategies can also be applied at the operation level by passing a ``retry_strategy`` keyword argument as part of calling the operation.
|
59
|
+
Any value provided at the operation level will override whatever is specified at the client level.
|
60
|
+
|
61
|
+
This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY`
|
62
|
+
is also available. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
|
63
|
+
|
64
|
+
:param obj circuit_breaker_strategy: (optional)
|
65
|
+
A circuit breaker strategy to apply to all calls made by this service client (i.e. at the client level).
|
66
|
+
This client uses :py:data:`~oci.circuit_breaker.DEFAULT_CIRCUIT_BREAKER_STRATEGY` as default if no circuit breaker strategy is provided.
|
67
|
+
The specifics of circuit breaker strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/circuit_breakers.html>`__.
|
68
|
+
|
69
|
+
:param function circuit_breaker_callback: (optional)
|
70
|
+
Callback function to receive any exceptions triggerred by the circuit breaker.
|
71
|
+
|
72
|
+
:param bool client_level_realm_specific_endpoint_template_enabled: (optional)
|
73
|
+
A boolean flag to indicate whether or not this client should be created with realm specific endpoint template enabled or disable. By default, this will be set as None.
|
74
|
+
|
75
|
+
:param allow_control_chars: (optional)
|
76
|
+
allow_control_chars is a boolean to indicate whether or not this client should allow control characters in the response object. By default, the client will not
|
77
|
+
allow control characters to be in the response object.
|
78
|
+
"""
|
79
|
+
if not OCI_SDK_ENABLED_SERVICES_SET.is_service_enabled("zpr"):
|
80
|
+
raise InvalidAlloyConfig("The Alloy configuration has disabled this service, this behavior is controlled by OCI_SDK_ENABLED_SERVICES_SET variable. Please check if your local alloy-config file configured the service you're targeting or contact the cloud provider on the availability of this service")
|
81
|
+
|
82
|
+
validate_config(config, signer=kwargs.get('signer'))
|
83
|
+
if 'signer' in kwargs:
|
84
|
+
signer = kwargs['signer']
|
85
|
+
|
86
|
+
elif AUTHENTICATION_TYPE_FIELD_NAME in config:
|
87
|
+
signer = get_signer_from_authentication_type(config)
|
88
|
+
|
89
|
+
else:
|
90
|
+
signer = Signer(
|
91
|
+
tenancy=config["tenancy"],
|
92
|
+
user=config["user"],
|
93
|
+
fingerprint=config["fingerprint"],
|
94
|
+
private_key_file_location=config.get("key_file"),
|
95
|
+
pass_phrase=get_config_value_or_default(config, "pass_phrase"),
|
96
|
+
private_key_content=config.get("key_content")
|
97
|
+
)
|
98
|
+
|
99
|
+
base_client_init_kwargs = {
|
100
|
+
'regional_client': True,
|
101
|
+
'service_endpoint': kwargs.get('service_endpoint'),
|
102
|
+
'base_path': '/20240301',
|
103
|
+
'service_endpoint_template': 'https://zpr.{region}.oci.{secondLevelDomain}',
|
104
|
+
'service_endpoint_template_per_realm': { }, # noqa: E201 E202
|
105
|
+
'skip_deserialization': kwargs.get('skip_deserialization', False),
|
106
|
+
'circuit_breaker_strategy': kwargs.get('circuit_breaker_strategy', circuit_breaker.GLOBAL_CIRCUIT_BREAKER_STRATEGY),
|
107
|
+
'client_level_realm_specific_endpoint_template_enabled': kwargs.get('client_level_realm_specific_endpoint_template_enabled')
|
108
|
+
}
|
109
|
+
if 'timeout' in kwargs:
|
110
|
+
base_client_init_kwargs['timeout'] = kwargs.get('timeout')
|
111
|
+
if base_client_init_kwargs.get('circuit_breaker_strategy') is None:
|
112
|
+
base_client_init_kwargs['circuit_breaker_strategy'] = circuit_breaker.DEFAULT_CIRCUIT_BREAKER_STRATEGY
|
113
|
+
if 'allow_control_chars' in kwargs:
|
114
|
+
base_client_init_kwargs['allow_control_chars'] = kwargs.get('allow_control_chars')
|
115
|
+
self.base_client = BaseClient("zpr", config, signer, zpr_type_mapping, **base_client_init_kwargs)
|
116
|
+
self.retry_strategy = kwargs.get('retry_strategy')
|
117
|
+
self.circuit_breaker_callback = kwargs.get('circuit_breaker_callback')
|
118
|
+
|
119
|
+
def create_configuration(self, create_configuration_details, **kwargs):
|
120
|
+
"""
|
121
|
+
Initiates the process to onboard ZPR
|
122
|
+
in a root compartment (the root compartment is the tenancy). It creates an object of ZPR configuration as part of onboarding.
|
123
|
+
|
124
|
+
|
125
|
+
:param oci.zpr.models.CreateConfigurationDetails create_configuration_details: (required)
|
126
|
+
Details for ZPR configuration in the tenancy.
|
127
|
+
|
128
|
+
:param str opc_request_id: (optional)
|
129
|
+
Unique Oracle-assigned identifier for the request. If you need to contact
|
130
|
+
Oracle about a particular request, please provide the request ID.
|
131
|
+
The only valid characters for request IDs are letters, numbers,
|
132
|
+
underscore, and dash.
|
133
|
+
|
134
|
+
:param str opc_retry_token: (optional)
|
135
|
+
A token that uniquely identifies a request so it can be retried in case of a timeout or
|
136
|
+
server error without risk of running that same action again. Retry tokens expire after 24
|
137
|
+
hours, but can be invalidated before then due to conflicting operations. For example, if a resource
|
138
|
+
has been deleted and removed from the system, then a retry of the original creation request
|
139
|
+
might be rejected.
|
140
|
+
|
141
|
+
:param bool opc_dry_run: (optional)
|
142
|
+
Indicates that the request is a dry run, if set to \"true\". A dry run request does not modify the
|
143
|
+
configuration item details and is used only to perform validation on the submitted data.
|
144
|
+
|
145
|
+
:param obj retry_strategy: (optional)
|
146
|
+
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
|
147
|
+
|
148
|
+
This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
|
149
|
+
The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
|
150
|
+
|
151
|
+
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
|
152
|
+
|
153
|
+
:param bool allow_control_chars: (optional)
|
154
|
+
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
|
155
|
+
By default, the response will not allow control characters in strings
|
156
|
+
|
157
|
+
:return: A :class:`~oci.response.Response` object with data of type None
|
158
|
+
:rtype: :class:`~oci.response.Response`
|
159
|
+
|
160
|
+
:example:
|
161
|
+
Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.135.2/zpr/create_configuration.py.html>`__ to see an example of how to use create_configuration API.
|
162
|
+
"""
|
163
|
+
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
|
164
|
+
required_arguments = []
|
165
|
+
resource_path = "/configuration"
|
166
|
+
method = "POST"
|
167
|
+
operation_name = "create_configuration"
|
168
|
+
api_reference_link = ""
|
169
|
+
|
170
|
+
# Don't accept unknown kwargs
|
171
|
+
expected_kwargs = [
|
172
|
+
"allow_control_chars",
|
173
|
+
"retry_strategy",
|
174
|
+
"opc_request_id",
|
175
|
+
"opc_retry_token",
|
176
|
+
"opc_dry_run"
|
177
|
+
]
|
178
|
+
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
|
179
|
+
if extra_kwargs:
|
180
|
+
raise ValueError(
|
181
|
+
f"create_configuration got unknown kwargs: {extra_kwargs!r}")
|
182
|
+
|
183
|
+
header_params = {
|
184
|
+
"accept": "application/json",
|
185
|
+
"content-type": "application/json",
|
186
|
+
"opc-request-id": kwargs.get("opc_request_id", missing),
|
187
|
+
"opc-retry-token": kwargs.get("opc_retry_token", missing),
|
188
|
+
"opc-dry-run": kwargs.get("opc_dry_run", missing)
|
189
|
+
}
|
190
|
+
header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
|
191
|
+
|
192
|
+
retry_strategy = self.base_client.get_preferred_retry_strategy(
|
193
|
+
operation_retry_strategy=kwargs.get('retry_strategy'),
|
194
|
+
client_retry_strategy=self.retry_strategy
|
195
|
+
)
|
196
|
+
if retry_strategy is None:
|
197
|
+
retry_strategy = retry.DEFAULT_RETRY_STRATEGY
|
198
|
+
|
199
|
+
if retry_strategy:
|
200
|
+
if not isinstance(retry_strategy, retry.NoneRetryStrategy):
|
201
|
+
self.base_client.add_opc_retry_token_if_needed(header_params)
|
202
|
+
self.base_client.add_opc_client_retries_header(header_params)
|
203
|
+
retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
|
204
|
+
return retry_strategy.make_retrying_call(
|
205
|
+
self.base_client.call_api,
|
206
|
+
resource_path=resource_path,
|
207
|
+
method=method,
|
208
|
+
header_params=header_params,
|
209
|
+
body=create_configuration_details,
|
210
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
211
|
+
operation_name=operation_name,
|
212
|
+
api_reference_link=api_reference_link,
|
213
|
+
required_arguments=required_arguments)
|
214
|
+
else:
|
215
|
+
return self.base_client.call_api(
|
216
|
+
resource_path=resource_path,
|
217
|
+
method=method,
|
218
|
+
header_params=header_params,
|
219
|
+
body=create_configuration_details,
|
220
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
221
|
+
operation_name=operation_name,
|
222
|
+
api_reference_link=api_reference_link,
|
223
|
+
required_arguments=required_arguments)
|
224
|
+
|
225
|
+
def create_zpr_policy(self, create_zpr_policy_details, **kwargs):
|
226
|
+
"""
|
227
|
+
Creates a ZprPolicy.
|
228
|
+
|
229
|
+
|
230
|
+
:param oci.zpr.models.CreateZprPolicyDetails create_zpr_policy_details: (required)
|
231
|
+
Details for the new ZprPolicy.
|
232
|
+
|
233
|
+
:param str opc_retry_token: (optional)
|
234
|
+
A token that uniquely identifies a request so it can be retried in case of a timeout or
|
235
|
+
server error without risk of running that same action again. Retry tokens expire after 24
|
236
|
+
hours, but can be invalidated before then due to conflicting operations. For example, if a resource
|
237
|
+
has been deleted and removed from the system, then a retry of the original creation request
|
238
|
+
might be rejected.
|
239
|
+
|
240
|
+
:param str opc_request_id: (optional)
|
241
|
+
Unique Oracle-assigned identifier for the request. If you need to contact
|
242
|
+
Oracle about a particular request, please provide the request ID.
|
243
|
+
The only valid characters for request IDs are letters, numbers,
|
244
|
+
underscore, and dash.
|
245
|
+
|
246
|
+
:param bool opc_dry_run: (optional)
|
247
|
+
Indicates that the request is a dry run, if set to \"true\". A dry run request does not modify the
|
248
|
+
configuration item details and is used only to perform validation on the submitted data.
|
249
|
+
|
250
|
+
:param obj retry_strategy: (optional)
|
251
|
+
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
|
252
|
+
|
253
|
+
This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
|
254
|
+
The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
|
255
|
+
|
256
|
+
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
|
257
|
+
|
258
|
+
:param bool allow_control_chars: (optional)
|
259
|
+
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
|
260
|
+
By default, the response will not allow control characters in strings
|
261
|
+
|
262
|
+
:return: A :class:`~oci.response.Response` object with data of type :class:`~oci.zpr.models.ZprPolicy`
|
263
|
+
:rtype: :class:`~oci.response.Response`
|
264
|
+
|
265
|
+
:example:
|
266
|
+
Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.135.2/zpr/create_zpr_policy.py.html>`__ to see an example of how to use create_zpr_policy API.
|
267
|
+
"""
|
268
|
+
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
|
269
|
+
required_arguments = []
|
270
|
+
resource_path = "/zprPolicies"
|
271
|
+
method = "POST"
|
272
|
+
operation_name = "create_zpr_policy"
|
273
|
+
api_reference_link = ""
|
274
|
+
|
275
|
+
# Don't accept unknown kwargs
|
276
|
+
expected_kwargs = [
|
277
|
+
"allow_control_chars",
|
278
|
+
"retry_strategy",
|
279
|
+
"opc_retry_token",
|
280
|
+
"opc_request_id",
|
281
|
+
"opc_dry_run"
|
282
|
+
]
|
283
|
+
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
|
284
|
+
if extra_kwargs:
|
285
|
+
raise ValueError(
|
286
|
+
f"create_zpr_policy got unknown kwargs: {extra_kwargs!r}")
|
287
|
+
|
288
|
+
header_params = {
|
289
|
+
"accept": "application/json",
|
290
|
+
"content-type": "application/json",
|
291
|
+
"opc-retry-token": kwargs.get("opc_retry_token", missing),
|
292
|
+
"opc-request-id": kwargs.get("opc_request_id", missing),
|
293
|
+
"opc-dry-run": kwargs.get("opc_dry_run", missing)
|
294
|
+
}
|
295
|
+
header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
|
296
|
+
|
297
|
+
retry_strategy = self.base_client.get_preferred_retry_strategy(
|
298
|
+
operation_retry_strategy=kwargs.get('retry_strategy'),
|
299
|
+
client_retry_strategy=self.retry_strategy
|
300
|
+
)
|
301
|
+
if retry_strategy is None:
|
302
|
+
retry_strategy = retry.DEFAULT_RETRY_STRATEGY
|
303
|
+
|
304
|
+
if retry_strategy:
|
305
|
+
if not isinstance(retry_strategy, retry.NoneRetryStrategy):
|
306
|
+
self.base_client.add_opc_retry_token_if_needed(header_params)
|
307
|
+
self.base_client.add_opc_client_retries_header(header_params)
|
308
|
+
retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
|
309
|
+
return retry_strategy.make_retrying_call(
|
310
|
+
self.base_client.call_api,
|
311
|
+
resource_path=resource_path,
|
312
|
+
method=method,
|
313
|
+
header_params=header_params,
|
314
|
+
body=create_zpr_policy_details,
|
315
|
+
response_type="ZprPolicy",
|
316
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
317
|
+
operation_name=operation_name,
|
318
|
+
api_reference_link=api_reference_link,
|
319
|
+
required_arguments=required_arguments)
|
320
|
+
else:
|
321
|
+
return self.base_client.call_api(
|
322
|
+
resource_path=resource_path,
|
323
|
+
method=method,
|
324
|
+
header_params=header_params,
|
325
|
+
body=create_zpr_policy_details,
|
326
|
+
response_type="ZprPolicy",
|
327
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
328
|
+
operation_name=operation_name,
|
329
|
+
api_reference_link=api_reference_link,
|
330
|
+
required_arguments=required_arguments)
|
331
|
+
|
332
|
+
def delete_zpr_policy(self, zpr_policy_id, **kwargs):
|
333
|
+
"""
|
334
|
+
Deletes a ZprPolicy.
|
335
|
+
|
336
|
+
|
337
|
+
:param str zpr_policy_id: (required)
|
338
|
+
The `OCID`__ of the ZprPolicy.
|
339
|
+
|
340
|
+
__ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
|
341
|
+
|
342
|
+
:param str if_match: (optional)
|
343
|
+
For optimistic concurrency control. In the PUT or DELETE call for a resource, set the
|
344
|
+
`if-match` parameter to the value of the etag from a previous GET or POST response for
|
345
|
+
that resource. The resource will be updated or deleted only if the etag you provide
|
346
|
+
matches the resource's current etag value.
|
347
|
+
|
348
|
+
:param str opc_request_id: (optional)
|
349
|
+
Unique Oracle-assigned identifier for the request. If you need to contact
|
350
|
+
Oracle about a particular request, please provide the request ID.
|
351
|
+
The only valid characters for request IDs are letters, numbers,
|
352
|
+
underscore, and dash.
|
353
|
+
|
354
|
+
:param bool opc_dry_run: (optional)
|
355
|
+
Indicates that the request is a dry run, if set to \"true\". A dry run request does not modify the
|
356
|
+
configuration item details and is used only to perform validation on the submitted data.
|
357
|
+
|
358
|
+
:param obj retry_strategy: (optional)
|
359
|
+
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
|
360
|
+
|
361
|
+
This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
|
362
|
+
The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
|
363
|
+
|
364
|
+
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
|
365
|
+
|
366
|
+
:param bool allow_control_chars: (optional)
|
367
|
+
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
|
368
|
+
By default, the response will not allow control characters in strings
|
369
|
+
|
370
|
+
:return: A :class:`~oci.response.Response` object with data of type None
|
371
|
+
:rtype: :class:`~oci.response.Response`
|
372
|
+
|
373
|
+
:example:
|
374
|
+
Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.135.2/zpr/delete_zpr_policy.py.html>`__ to see an example of how to use delete_zpr_policy API.
|
375
|
+
"""
|
376
|
+
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
|
377
|
+
required_arguments = ['zprPolicyId']
|
378
|
+
resource_path = "/zprPolicies/{zprPolicyId}"
|
379
|
+
method = "DELETE"
|
380
|
+
operation_name = "delete_zpr_policy"
|
381
|
+
api_reference_link = ""
|
382
|
+
|
383
|
+
# Don't accept unknown kwargs
|
384
|
+
expected_kwargs = [
|
385
|
+
"allow_control_chars",
|
386
|
+
"retry_strategy",
|
387
|
+
"if_match",
|
388
|
+
"opc_request_id",
|
389
|
+
"opc_dry_run"
|
390
|
+
]
|
391
|
+
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
|
392
|
+
if extra_kwargs:
|
393
|
+
raise ValueError(
|
394
|
+
f"delete_zpr_policy got unknown kwargs: {extra_kwargs!r}")
|
395
|
+
|
396
|
+
path_params = {
|
397
|
+
"zprPolicyId": zpr_policy_id
|
398
|
+
}
|
399
|
+
|
400
|
+
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
|
401
|
+
|
402
|
+
for (k, v) in six.iteritems(path_params):
|
403
|
+
if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
|
404
|
+
raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
|
405
|
+
|
406
|
+
header_params = {
|
407
|
+
"accept": "application/json",
|
408
|
+
"content-type": "application/json",
|
409
|
+
"if-match": kwargs.get("if_match", missing),
|
410
|
+
"opc-request-id": kwargs.get("opc_request_id", missing),
|
411
|
+
"opc-dry-run": kwargs.get("opc_dry_run", missing)
|
412
|
+
}
|
413
|
+
header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
|
414
|
+
|
415
|
+
retry_strategy = self.base_client.get_preferred_retry_strategy(
|
416
|
+
operation_retry_strategy=kwargs.get('retry_strategy'),
|
417
|
+
client_retry_strategy=self.retry_strategy
|
418
|
+
)
|
419
|
+
if retry_strategy is None:
|
420
|
+
retry_strategy = retry.DEFAULT_RETRY_STRATEGY
|
421
|
+
|
422
|
+
if retry_strategy:
|
423
|
+
if not isinstance(retry_strategy, retry.NoneRetryStrategy):
|
424
|
+
self.base_client.add_opc_client_retries_header(header_params)
|
425
|
+
retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
|
426
|
+
return retry_strategy.make_retrying_call(
|
427
|
+
self.base_client.call_api,
|
428
|
+
resource_path=resource_path,
|
429
|
+
method=method,
|
430
|
+
path_params=path_params,
|
431
|
+
header_params=header_params,
|
432
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
433
|
+
operation_name=operation_name,
|
434
|
+
api_reference_link=api_reference_link,
|
435
|
+
required_arguments=required_arguments)
|
436
|
+
else:
|
437
|
+
return self.base_client.call_api(
|
438
|
+
resource_path=resource_path,
|
439
|
+
method=method,
|
440
|
+
path_params=path_params,
|
441
|
+
header_params=header_params,
|
442
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
443
|
+
operation_name=operation_name,
|
444
|
+
api_reference_link=api_reference_link,
|
445
|
+
required_arguments=required_arguments)
|
446
|
+
|
447
|
+
def get_configuration(self, **kwargs):
|
448
|
+
"""
|
449
|
+
Retrieves the ZPR configuration details for the root compartment (the root compartment is the tenancy).
|
450
|
+
Returns ZPR configuration for root compartment (the root compartment is the tenancy).
|
451
|
+
|
452
|
+
|
453
|
+
:param str compartment_id: (optional)
|
454
|
+
The `OCID`__ of the compartment in which to list resources.
|
455
|
+
|
456
|
+
__ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
|
457
|
+
|
458
|
+
:param str opc_request_id: (optional)
|
459
|
+
Unique Oracle-assigned identifier for the request. If you need to contact
|
460
|
+
Oracle about a particular request, please provide the request ID.
|
461
|
+
The only valid characters for request IDs are letters, numbers,
|
462
|
+
underscore, and dash.
|
463
|
+
|
464
|
+
:param obj retry_strategy: (optional)
|
465
|
+
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
|
466
|
+
|
467
|
+
This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
|
468
|
+
The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
|
469
|
+
|
470
|
+
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
|
471
|
+
|
472
|
+
:param bool allow_control_chars: (optional)
|
473
|
+
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
|
474
|
+
By default, the response will not allow control characters in strings
|
475
|
+
|
476
|
+
:return: A :class:`~oci.response.Response` object with data of type :class:`~oci.zpr.models.Configuration`
|
477
|
+
:rtype: :class:`~oci.response.Response`
|
478
|
+
|
479
|
+
:example:
|
480
|
+
Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.135.2/zpr/get_configuration.py.html>`__ to see an example of how to use get_configuration API.
|
481
|
+
"""
|
482
|
+
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
|
483
|
+
required_arguments = []
|
484
|
+
resource_path = "/configuration"
|
485
|
+
method = "GET"
|
486
|
+
operation_name = "get_configuration"
|
487
|
+
api_reference_link = ""
|
488
|
+
|
489
|
+
# Don't accept unknown kwargs
|
490
|
+
expected_kwargs = [
|
491
|
+
"allow_control_chars",
|
492
|
+
"retry_strategy",
|
493
|
+
"compartment_id",
|
494
|
+
"opc_request_id"
|
495
|
+
]
|
496
|
+
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
|
497
|
+
if extra_kwargs:
|
498
|
+
raise ValueError(
|
499
|
+
f"get_configuration got unknown kwargs: {extra_kwargs!r}")
|
500
|
+
|
501
|
+
query_params = {
|
502
|
+
"compartmentId": kwargs.get("compartment_id", missing)
|
503
|
+
}
|
504
|
+
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
|
505
|
+
|
506
|
+
header_params = {
|
507
|
+
"accept": "application/json",
|
508
|
+
"content-type": "application/json",
|
509
|
+
"opc-request-id": kwargs.get("opc_request_id", missing)
|
510
|
+
}
|
511
|
+
header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
|
512
|
+
|
513
|
+
retry_strategy = self.base_client.get_preferred_retry_strategy(
|
514
|
+
operation_retry_strategy=kwargs.get('retry_strategy'),
|
515
|
+
client_retry_strategy=self.retry_strategy
|
516
|
+
)
|
517
|
+
if retry_strategy is None:
|
518
|
+
retry_strategy = retry.DEFAULT_RETRY_STRATEGY
|
519
|
+
|
520
|
+
if retry_strategy:
|
521
|
+
if not isinstance(retry_strategy, retry.NoneRetryStrategy):
|
522
|
+
self.base_client.add_opc_client_retries_header(header_params)
|
523
|
+
retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
|
524
|
+
return retry_strategy.make_retrying_call(
|
525
|
+
self.base_client.call_api,
|
526
|
+
resource_path=resource_path,
|
527
|
+
method=method,
|
528
|
+
query_params=query_params,
|
529
|
+
header_params=header_params,
|
530
|
+
response_type="Configuration",
|
531
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
532
|
+
operation_name=operation_name,
|
533
|
+
api_reference_link=api_reference_link,
|
534
|
+
required_arguments=required_arguments)
|
535
|
+
else:
|
536
|
+
return self.base_client.call_api(
|
537
|
+
resource_path=resource_path,
|
538
|
+
method=method,
|
539
|
+
query_params=query_params,
|
540
|
+
header_params=header_params,
|
541
|
+
response_type="Configuration",
|
542
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
543
|
+
operation_name=operation_name,
|
544
|
+
api_reference_link=api_reference_link,
|
545
|
+
required_arguments=required_arguments)
|
546
|
+
|
547
|
+
def get_zpr_configuration_work_request(self, work_request_id, **kwargs):
|
548
|
+
"""
|
549
|
+
Gets the details of a work request.
|
550
|
+
|
551
|
+
|
552
|
+
:param str work_request_id: (required)
|
553
|
+
The `OCID`__ of the asynchronous work request.
|
554
|
+
|
555
|
+
__ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
|
556
|
+
|
557
|
+
:param str opc_request_id: (optional)
|
558
|
+
Unique Oracle-assigned identifier for the request. If you need to contact
|
559
|
+
Oracle about a particular request, please provide the request ID.
|
560
|
+
The only valid characters for request IDs are letters, numbers,
|
561
|
+
underscore, and dash.
|
562
|
+
|
563
|
+
:param obj retry_strategy: (optional)
|
564
|
+
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
|
565
|
+
|
566
|
+
This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
|
567
|
+
The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
|
568
|
+
|
569
|
+
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
|
570
|
+
|
571
|
+
:param bool allow_control_chars: (optional)
|
572
|
+
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
|
573
|
+
By default, the response will not allow control characters in strings
|
574
|
+
|
575
|
+
:return: A :class:`~oci.response.Response` object with data of type :class:`~oci.zpr.models.WorkRequest`
|
576
|
+
:rtype: :class:`~oci.response.Response`
|
577
|
+
|
578
|
+
:example:
|
579
|
+
Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.135.2/zpr/get_zpr_configuration_work_request.py.html>`__ to see an example of how to use get_zpr_configuration_work_request API.
|
580
|
+
"""
|
581
|
+
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
|
582
|
+
required_arguments = ['workRequestId']
|
583
|
+
resource_path = "/zprConfigurationWorkRequests/{workRequestId}"
|
584
|
+
method = "GET"
|
585
|
+
operation_name = "get_zpr_configuration_work_request"
|
586
|
+
api_reference_link = ""
|
587
|
+
|
588
|
+
# Don't accept unknown kwargs
|
589
|
+
expected_kwargs = [
|
590
|
+
"allow_control_chars",
|
591
|
+
"retry_strategy",
|
592
|
+
"opc_request_id"
|
593
|
+
]
|
594
|
+
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
|
595
|
+
if extra_kwargs:
|
596
|
+
raise ValueError(
|
597
|
+
f"get_zpr_configuration_work_request got unknown kwargs: {extra_kwargs!r}")
|
598
|
+
|
599
|
+
path_params = {
|
600
|
+
"workRequestId": work_request_id
|
601
|
+
}
|
602
|
+
|
603
|
+
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
|
604
|
+
|
605
|
+
for (k, v) in six.iteritems(path_params):
|
606
|
+
if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
|
607
|
+
raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
|
608
|
+
|
609
|
+
header_params = {
|
610
|
+
"accept": "application/json",
|
611
|
+
"content-type": "application/json",
|
612
|
+
"opc-request-id": kwargs.get("opc_request_id", missing)
|
613
|
+
}
|
614
|
+
header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
|
615
|
+
|
616
|
+
retry_strategy = self.base_client.get_preferred_retry_strategy(
|
617
|
+
operation_retry_strategy=kwargs.get('retry_strategy'),
|
618
|
+
client_retry_strategy=self.retry_strategy
|
619
|
+
)
|
620
|
+
if retry_strategy is None:
|
621
|
+
retry_strategy = retry.DEFAULT_RETRY_STRATEGY
|
622
|
+
|
623
|
+
if retry_strategy:
|
624
|
+
if not isinstance(retry_strategy, retry.NoneRetryStrategy):
|
625
|
+
self.base_client.add_opc_client_retries_header(header_params)
|
626
|
+
retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
|
627
|
+
return retry_strategy.make_retrying_call(
|
628
|
+
self.base_client.call_api,
|
629
|
+
resource_path=resource_path,
|
630
|
+
method=method,
|
631
|
+
path_params=path_params,
|
632
|
+
header_params=header_params,
|
633
|
+
response_type="WorkRequest",
|
634
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
635
|
+
operation_name=operation_name,
|
636
|
+
api_reference_link=api_reference_link,
|
637
|
+
required_arguments=required_arguments)
|
638
|
+
else:
|
639
|
+
return self.base_client.call_api(
|
640
|
+
resource_path=resource_path,
|
641
|
+
method=method,
|
642
|
+
path_params=path_params,
|
643
|
+
header_params=header_params,
|
644
|
+
response_type="WorkRequest",
|
645
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
646
|
+
operation_name=operation_name,
|
647
|
+
api_reference_link=api_reference_link,
|
648
|
+
required_arguments=required_arguments)
|
649
|
+
|
650
|
+
def get_zpr_policy(self, zpr_policy_id, **kwargs):
|
651
|
+
"""
|
652
|
+
Gets information about a ZprPolicy.
|
653
|
+
|
654
|
+
|
655
|
+
:param str zpr_policy_id: (required)
|
656
|
+
The `OCID`__ of the ZprPolicy.
|
657
|
+
|
658
|
+
__ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
|
659
|
+
|
660
|
+
:param str opc_request_id: (optional)
|
661
|
+
Unique Oracle-assigned identifier for the request. If you need to contact
|
662
|
+
Oracle about a particular request, please provide the request ID.
|
663
|
+
The only valid characters for request IDs are letters, numbers,
|
664
|
+
underscore, and dash.
|
665
|
+
|
666
|
+
:param obj retry_strategy: (optional)
|
667
|
+
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
|
668
|
+
|
669
|
+
This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
|
670
|
+
The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
|
671
|
+
|
672
|
+
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
|
673
|
+
|
674
|
+
:param bool allow_control_chars: (optional)
|
675
|
+
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
|
676
|
+
By default, the response will not allow control characters in strings
|
677
|
+
|
678
|
+
:return: A :class:`~oci.response.Response` object with data of type :class:`~oci.zpr.models.ZprPolicy`
|
679
|
+
:rtype: :class:`~oci.response.Response`
|
680
|
+
|
681
|
+
:example:
|
682
|
+
Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.135.2/zpr/get_zpr_policy.py.html>`__ to see an example of how to use get_zpr_policy API.
|
683
|
+
"""
|
684
|
+
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
|
685
|
+
required_arguments = ['zprPolicyId']
|
686
|
+
resource_path = "/zprPolicies/{zprPolicyId}"
|
687
|
+
method = "GET"
|
688
|
+
operation_name = "get_zpr_policy"
|
689
|
+
api_reference_link = ""
|
690
|
+
|
691
|
+
# Don't accept unknown kwargs
|
692
|
+
expected_kwargs = [
|
693
|
+
"allow_control_chars",
|
694
|
+
"retry_strategy",
|
695
|
+
"opc_request_id"
|
696
|
+
]
|
697
|
+
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
|
698
|
+
if extra_kwargs:
|
699
|
+
raise ValueError(
|
700
|
+
f"get_zpr_policy got unknown kwargs: {extra_kwargs!r}")
|
701
|
+
|
702
|
+
path_params = {
|
703
|
+
"zprPolicyId": zpr_policy_id
|
704
|
+
}
|
705
|
+
|
706
|
+
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
|
707
|
+
|
708
|
+
for (k, v) in six.iteritems(path_params):
|
709
|
+
if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
|
710
|
+
raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
|
711
|
+
|
712
|
+
header_params = {
|
713
|
+
"accept": "application/json",
|
714
|
+
"content-type": "application/json",
|
715
|
+
"opc-request-id": kwargs.get("opc_request_id", missing)
|
716
|
+
}
|
717
|
+
header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
|
718
|
+
|
719
|
+
retry_strategy = self.base_client.get_preferred_retry_strategy(
|
720
|
+
operation_retry_strategy=kwargs.get('retry_strategy'),
|
721
|
+
client_retry_strategy=self.retry_strategy
|
722
|
+
)
|
723
|
+
if retry_strategy is None:
|
724
|
+
retry_strategy = retry.DEFAULT_RETRY_STRATEGY
|
725
|
+
|
726
|
+
if retry_strategy:
|
727
|
+
if not isinstance(retry_strategy, retry.NoneRetryStrategy):
|
728
|
+
self.base_client.add_opc_client_retries_header(header_params)
|
729
|
+
retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
|
730
|
+
return retry_strategy.make_retrying_call(
|
731
|
+
self.base_client.call_api,
|
732
|
+
resource_path=resource_path,
|
733
|
+
method=method,
|
734
|
+
path_params=path_params,
|
735
|
+
header_params=header_params,
|
736
|
+
response_type="ZprPolicy",
|
737
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
738
|
+
operation_name=operation_name,
|
739
|
+
api_reference_link=api_reference_link,
|
740
|
+
required_arguments=required_arguments)
|
741
|
+
else:
|
742
|
+
return self.base_client.call_api(
|
743
|
+
resource_path=resource_path,
|
744
|
+
method=method,
|
745
|
+
path_params=path_params,
|
746
|
+
header_params=header_params,
|
747
|
+
response_type="ZprPolicy",
|
748
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
749
|
+
operation_name=operation_name,
|
750
|
+
api_reference_link=api_reference_link,
|
751
|
+
required_arguments=required_arguments)
|
752
|
+
|
753
|
+
def get_zpr_policy_work_request(self, work_request_id, **kwargs):
|
754
|
+
"""
|
755
|
+
Gets the details of a work request.
|
756
|
+
|
757
|
+
|
758
|
+
:param str work_request_id: (required)
|
759
|
+
The `OCID`__ of the asynchronous work request.
|
760
|
+
|
761
|
+
__ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
|
762
|
+
|
763
|
+
:param str opc_request_id: (optional)
|
764
|
+
Unique Oracle-assigned identifier for the request. If you need to contact
|
765
|
+
Oracle about a particular request, please provide the request ID.
|
766
|
+
The only valid characters for request IDs are letters, numbers,
|
767
|
+
underscore, and dash.
|
768
|
+
|
769
|
+
:param obj retry_strategy: (optional)
|
770
|
+
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
|
771
|
+
|
772
|
+
This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
|
773
|
+
The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
|
774
|
+
|
775
|
+
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
|
776
|
+
|
777
|
+
:param bool allow_control_chars: (optional)
|
778
|
+
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
|
779
|
+
By default, the response will not allow control characters in strings
|
780
|
+
|
781
|
+
:return: A :class:`~oci.response.Response` object with data of type :class:`~oci.zpr.models.WorkRequest`
|
782
|
+
:rtype: :class:`~oci.response.Response`
|
783
|
+
|
784
|
+
:example:
|
785
|
+
Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.135.2/zpr/get_zpr_policy_work_request.py.html>`__ to see an example of how to use get_zpr_policy_work_request API.
|
786
|
+
"""
|
787
|
+
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
|
788
|
+
required_arguments = ['workRequestId']
|
789
|
+
resource_path = "/zprPolicyWorkRequests/{workRequestId}"
|
790
|
+
method = "GET"
|
791
|
+
operation_name = "get_zpr_policy_work_request"
|
792
|
+
api_reference_link = ""
|
793
|
+
|
794
|
+
# Don't accept unknown kwargs
|
795
|
+
expected_kwargs = [
|
796
|
+
"allow_control_chars",
|
797
|
+
"retry_strategy",
|
798
|
+
"opc_request_id"
|
799
|
+
]
|
800
|
+
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
|
801
|
+
if extra_kwargs:
|
802
|
+
raise ValueError(
|
803
|
+
f"get_zpr_policy_work_request got unknown kwargs: {extra_kwargs!r}")
|
804
|
+
|
805
|
+
path_params = {
|
806
|
+
"workRequestId": work_request_id
|
807
|
+
}
|
808
|
+
|
809
|
+
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
|
810
|
+
|
811
|
+
for (k, v) in six.iteritems(path_params):
|
812
|
+
if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
|
813
|
+
raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
|
814
|
+
|
815
|
+
header_params = {
|
816
|
+
"accept": "application/json",
|
817
|
+
"content-type": "application/json",
|
818
|
+
"opc-request-id": kwargs.get("opc_request_id", missing)
|
819
|
+
}
|
820
|
+
header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
|
821
|
+
|
822
|
+
retry_strategy = self.base_client.get_preferred_retry_strategy(
|
823
|
+
operation_retry_strategy=kwargs.get('retry_strategy'),
|
824
|
+
client_retry_strategy=self.retry_strategy
|
825
|
+
)
|
826
|
+
if retry_strategy is None:
|
827
|
+
retry_strategy = retry.DEFAULT_RETRY_STRATEGY
|
828
|
+
|
829
|
+
if retry_strategy:
|
830
|
+
if not isinstance(retry_strategy, retry.NoneRetryStrategy):
|
831
|
+
self.base_client.add_opc_client_retries_header(header_params)
|
832
|
+
retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
|
833
|
+
return retry_strategy.make_retrying_call(
|
834
|
+
self.base_client.call_api,
|
835
|
+
resource_path=resource_path,
|
836
|
+
method=method,
|
837
|
+
path_params=path_params,
|
838
|
+
header_params=header_params,
|
839
|
+
response_type="WorkRequest",
|
840
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
841
|
+
operation_name=operation_name,
|
842
|
+
api_reference_link=api_reference_link,
|
843
|
+
required_arguments=required_arguments)
|
844
|
+
else:
|
845
|
+
return self.base_client.call_api(
|
846
|
+
resource_path=resource_path,
|
847
|
+
method=method,
|
848
|
+
path_params=path_params,
|
849
|
+
header_params=header_params,
|
850
|
+
response_type="WorkRequest",
|
851
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
852
|
+
operation_name=operation_name,
|
853
|
+
api_reference_link=api_reference_link,
|
854
|
+
required_arguments=required_arguments)
|
855
|
+
|
856
|
+
def list_zpr_configuration_work_request_errors(self, work_request_id, **kwargs):
|
857
|
+
"""
|
858
|
+
Lists the errors for a work request.
|
859
|
+
|
860
|
+
|
861
|
+
:param str work_request_id: (required)
|
862
|
+
The `OCID`__ of the asynchronous work request.
|
863
|
+
|
864
|
+
__ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
|
865
|
+
|
866
|
+
:param str opc_request_id: (optional)
|
867
|
+
Unique Oracle-assigned identifier for the request. If you need to contact
|
868
|
+
Oracle about a particular request, please provide the request ID.
|
869
|
+
The only valid characters for request IDs are letters, numbers,
|
870
|
+
underscore, and dash.
|
871
|
+
|
872
|
+
:param str page: (optional)
|
873
|
+
For list pagination. The value of the opc-next-page response header from the previous
|
874
|
+
\"List\" call. For important details about how pagination works, see
|
875
|
+
`List Pagination`__.
|
876
|
+
|
877
|
+
__ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
|
878
|
+
|
879
|
+
:param int limit: (optional)
|
880
|
+
For list pagination. The maximum number of results per page, or items to return in a
|
881
|
+
paginated \"List\" call. For important details about how pagination works, see
|
882
|
+
`List Pagination`__.
|
883
|
+
|
884
|
+
__ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
|
885
|
+
|
886
|
+
:param str sort_by: (optional)
|
887
|
+
The field to sort by. Only one sort order may be provided. Default order for `timestamp` is descending.
|
888
|
+
|
889
|
+
Allowed values are: "timestamp"
|
890
|
+
|
891
|
+
:param str sort_order: (optional)
|
892
|
+
The sort order to use, either ascending (`ASC`) or descending (`DESC`).
|
893
|
+
|
894
|
+
Allowed values are: "ASC", "DESC"
|
895
|
+
|
896
|
+
:param obj retry_strategy: (optional)
|
897
|
+
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
|
898
|
+
|
899
|
+
This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
|
900
|
+
The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
|
901
|
+
|
902
|
+
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
|
903
|
+
|
904
|
+
:param bool allow_control_chars: (optional)
|
905
|
+
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
|
906
|
+
By default, the response will not allow control characters in strings
|
907
|
+
|
908
|
+
:return: A :class:`~oci.response.Response` object with data of type :class:`~oci.zpr.models.WorkRequestErrorCollection`
|
909
|
+
:rtype: :class:`~oci.response.Response`
|
910
|
+
|
911
|
+
:example:
|
912
|
+
Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.135.2/zpr/list_zpr_configuration_work_request_errors.py.html>`__ to see an example of how to use list_zpr_configuration_work_request_errors API.
|
913
|
+
"""
|
914
|
+
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
|
915
|
+
required_arguments = ['workRequestId']
|
916
|
+
resource_path = "/zprConfigurationWorkRequests/{workRequestId}/errors"
|
917
|
+
method = "GET"
|
918
|
+
operation_name = "list_zpr_configuration_work_request_errors"
|
919
|
+
api_reference_link = ""
|
920
|
+
|
921
|
+
# Don't accept unknown kwargs
|
922
|
+
expected_kwargs = [
|
923
|
+
"allow_control_chars",
|
924
|
+
"retry_strategy",
|
925
|
+
"opc_request_id",
|
926
|
+
"page",
|
927
|
+
"limit",
|
928
|
+
"sort_by",
|
929
|
+
"sort_order"
|
930
|
+
]
|
931
|
+
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
|
932
|
+
if extra_kwargs:
|
933
|
+
raise ValueError(
|
934
|
+
f"list_zpr_configuration_work_request_errors got unknown kwargs: {extra_kwargs!r}")
|
935
|
+
|
936
|
+
path_params = {
|
937
|
+
"workRequestId": work_request_id
|
938
|
+
}
|
939
|
+
|
940
|
+
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
|
941
|
+
|
942
|
+
for (k, v) in six.iteritems(path_params):
|
943
|
+
if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
|
944
|
+
raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
|
945
|
+
|
946
|
+
if 'sort_by' in kwargs:
|
947
|
+
sort_by_allowed_values = ["timestamp"]
|
948
|
+
if kwargs['sort_by'] not in sort_by_allowed_values:
|
949
|
+
raise ValueError(
|
950
|
+
f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
|
951
|
+
)
|
952
|
+
|
953
|
+
if 'sort_order' in kwargs:
|
954
|
+
sort_order_allowed_values = ["ASC", "DESC"]
|
955
|
+
if kwargs['sort_order'] not in sort_order_allowed_values:
|
956
|
+
raise ValueError(
|
957
|
+
f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
|
958
|
+
)
|
959
|
+
|
960
|
+
query_params = {
|
961
|
+
"page": kwargs.get("page", missing),
|
962
|
+
"limit": kwargs.get("limit", missing),
|
963
|
+
"sortBy": kwargs.get("sort_by", missing),
|
964
|
+
"sortOrder": kwargs.get("sort_order", missing)
|
965
|
+
}
|
966
|
+
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
|
967
|
+
|
968
|
+
header_params = {
|
969
|
+
"accept": "application/json",
|
970
|
+
"content-type": "application/json",
|
971
|
+
"opc-request-id": kwargs.get("opc_request_id", missing)
|
972
|
+
}
|
973
|
+
header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
|
974
|
+
|
975
|
+
retry_strategy = self.base_client.get_preferred_retry_strategy(
|
976
|
+
operation_retry_strategy=kwargs.get('retry_strategy'),
|
977
|
+
client_retry_strategy=self.retry_strategy
|
978
|
+
)
|
979
|
+
if retry_strategy is None:
|
980
|
+
retry_strategy = retry.DEFAULT_RETRY_STRATEGY
|
981
|
+
|
982
|
+
if retry_strategy:
|
983
|
+
if not isinstance(retry_strategy, retry.NoneRetryStrategy):
|
984
|
+
self.base_client.add_opc_client_retries_header(header_params)
|
985
|
+
retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
|
986
|
+
return retry_strategy.make_retrying_call(
|
987
|
+
self.base_client.call_api,
|
988
|
+
resource_path=resource_path,
|
989
|
+
method=method,
|
990
|
+
path_params=path_params,
|
991
|
+
query_params=query_params,
|
992
|
+
header_params=header_params,
|
993
|
+
response_type="WorkRequestErrorCollection",
|
994
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
995
|
+
operation_name=operation_name,
|
996
|
+
api_reference_link=api_reference_link,
|
997
|
+
required_arguments=required_arguments)
|
998
|
+
else:
|
999
|
+
return self.base_client.call_api(
|
1000
|
+
resource_path=resource_path,
|
1001
|
+
method=method,
|
1002
|
+
path_params=path_params,
|
1003
|
+
query_params=query_params,
|
1004
|
+
header_params=header_params,
|
1005
|
+
response_type="WorkRequestErrorCollection",
|
1006
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
1007
|
+
operation_name=operation_name,
|
1008
|
+
api_reference_link=api_reference_link,
|
1009
|
+
required_arguments=required_arguments)
|
1010
|
+
|
1011
|
+
def list_zpr_configuration_work_request_logs(self, work_request_id, **kwargs):
|
1012
|
+
"""
|
1013
|
+
Lists the logs for a work request.
|
1014
|
+
|
1015
|
+
|
1016
|
+
:param str work_request_id: (required)
|
1017
|
+
The `OCID`__ of the asynchronous work request.
|
1018
|
+
|
1019
|
+
__ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
|
1020
|
+
|
1021
|
+
:param str opc_request_id: (optional)
|
1022
|
+
Unique Oracle-assigned identifier for the request. If you need to contact
|
1023
|
+
Oracle about a particular request, please provide the request ID.
|
1024
|
+
The only valid characters for request IDs are letters, numbers,
|
1025
|
+
underscore, and dash.
|
1026
|
+
|
1027
|
+
:param str page: (optional)
|
1028
|
+
For list pagination. The value of the opc-next-page response header from the previous
|
1029
|
+
\"List\" call. For important details about how pagination works, see
|
1030
|
+
`List Pagination`__.
|
1031
|
+
|
1032
|
+
__ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
|
1033
|
+
|
1034
|
+
:param int limit: (optional)
|
1035
|
+
For list pagination. The maximum number of results per page, or items to return in a
|
1036
|
+
paginated \"List\" call. For important details about how pagination works, see
|
1037
|
+
`List Pagination`__.
|
1038
|
+
|
1039
|
+
__ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
|
1040
|
+
|
1041
|
+
:param str sort_by: (optional)
|
1042
|
+
The field to sort by. Only one sort order may be provided. Default order for `timestamp` is descending.
|
1043
|
+
|
1044
|
+
Allowed values are: "timestamp"
|
1045
|
+
|
1046
|
+
:param str sort_order: (optional)
|
1047
|
+
The sort order to use, either ascending (`ASC`) or descending (`DESC`).
|
1048
|
+
|
1049
|
+
Allowed values are: "ASC", "DESC"
|
1050
|
+
|
1051
|
+
:param obj retry_strategy: (optional)
|
1052
|
+
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
|
1053
|
+
|
1054
|
+
This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
|
1055
|
+
The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
|
1056
|
+
|
1057
|
+
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
|
1058
|
+
|
1059
|
+
:param bool allow_control_chars: (optional)
|
1060
|
+
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
|
1061
|
+
By default, the response will not allow control characters in strings
|
1062
|
+
|
1063
|
+
:return: A :class:`~oci.response.Response` object with data of type :class:`~oci.zpr.models.WorkRequestLogEntryCollection`
|
1064
|
+
:rtype: :class:`~oci.response.Response`
|
1065
|
+
|
1066
|
+
:example:
|
1067
|
+
Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.135.2/zpr/list_zpr_configuration_work_request_logs.py.html>`__ to see an example of how to use list_zpr_configuration_work_request_logs API.
|
1068
|
+
"""
|
1069
|
+
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
|
1070
|
+
required_arguments = ['workRequestId']
|
1071
|
+
resource_path = "/zprConfigurationWorkRequests/{workRequestId}/logs"
|
1072
|
+
method = "GET"
|
1073
|
+
operation_name = "list_zpr_configuration_work_request_logs"
|
1074
|
+
api_reference_link = ""
|
1075
|
+
|
1076
|
+
# Don't accept unknown kwargs
|
1077
|
+
expected_kwargs = [
|
1078
|
+
"allow_control_chars",
|
1079
|
+
"retry_strategy",
|
1080
|
+
"opc_request_id",
|
1081
|
+
"page",
|
1082
|
+
"limit",
|
1083
|
+
"sort_by",
|
1084
|
+
"sort_order"
|
1085
|
+
]
|
1086
|
+
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
|
1087
|
+
if extra_kwargs:
|
1088
|
+
raise ValueError(
|
1089
|
+
f"list_zpr_configuration_work_request_logs got unknown kwargs: {extra_kwargs!r}")
|
1090
|
+
|
1091
|
+
path_params = {
|
1092
|
+
"workRequestId": work_request_id
|
1093
|
+
}
|
1094
|
+
|
1095
|
+
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
|
1096
|
+
|
1097
|
+
for (k, v) in six.iteritems(path_params):
|
1098
|
+
if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
|
1099
|
+
raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
|
1100
|
+
|
1101
|
+
if 'sort_by' in kwargs:
|
1102
|
+
sort_by_allowed_values = ["timestamp"]
|
1103
|
+
if kwargs['sort_by'] not in sort_by_allowed_values:
|
1104
|
+
raise ValueError(
|
1105
|
+
f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
|
1106
|
+
)
|
1107
|
+
|
1108
|
+
if 'sort_order' in kwargs:
|
1109
|
+
sort_order_allowed_values = ["ASC", "DESC"]
|
1110
|
+
if kwargs['sort_order'] not in sort_order_allowed_values:
|
1111
|
+
raise ValueError(
|
1112
|
+
f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
|
1113
|
+
)
|
1114
|
+
|
1115
|
+
query_params = {
|
1116
|
+
"page": kwargs.get("page", missing),
|
1117
|
+
"limit": kwargs.get("limit", missing),
|
1118
|
+
"sortBy": kwargs.get("sort_by", missing),
|
1119
|
+
"sortOrder": kwargs.get("sort_order", missing)
|
1120
|
+
}
|
1121
|
+
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
|
1122
|
+
|
1123
|
+
header_params = {
|
1124
|
+
"accept": "application/json",
|
1125
|
+
"content-type": "application/json",
|
1126
|
+
"opc-request-id": kwargs.get("opc_request_id", missing)
|
1127
|
+
}
|
1128
|
+
header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
|
1129
|
+
|
1130
|
+
retry_strategy = self.base_client.get_preferred_retry_strategy(
|
1131
|
+
operation_retry_strategy=kwargs.get('retry_strategy'),
|
1132
|
+
client_retry_strategy=self.retry_strategy
|
1133
|
+
)
|
1134
|
+
if retry_strategy is None:
|
1135
|
+
retry_strategy = retry.DEFAULT_RETRY_STRATEGY
|
1136
|
+
|
1137
|
+
if retry_strategy:
|
1138
|
+
if not isinstance(retry_strategy, retry.NoneRetryStrategy):
|
1139
|
+
self.base_client.add_opc_client_retries_header(header_params)
|
1140
|
+
retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
|
1141
|
+
return retry_strategy.make_retrying_call(
|
1142
|
+
self.base_client.call_api,
|
1143
|
+
resource_path=resource_path,
|
1144
|
+
method=method,
|
1145
|
+
path_params=path_params,
|
1146
|
+
query_params=query_params,
|
1147
|
+
header_params=header_params,
|
1148
|
+
response_type="WorkRequestLogEntryCollection",
|
1149
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
1150
|
+
operation_name=operation_name,
|
1151
|
+
api_reference_link=api_reference_link,
|
1152
|
+
required_arguments=required_arguments)
|
1153
|
+
else:
|
1154
|
+
return self.base_client.call_api(
|
1155
|
+
resource_path=resource_path,
|
1156
|
+
method=method,
|
1157
|
+
path_params=path_params,
|
1158
|
+
query_params=query_params,
|
1159
|
+
header_params=header_params,
|
1160
|
+
response_type="WorkRequestLogEntryCollection",
|
1161
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
1162
|
+
operation_name=operation_name,
|
1163
|
+
api_reference_link=api_reference_link,
|
1164
|
+
required_arguments=required_arguments)
|
1165
|
+
|
1166
|
+
def list_zpr_configuration_work_requests(self, **kwargs):
|
1167
|
+
"""
|
1168
|
+
Lists the work requests in a compartment.
|
1169
|
+
|
1170
|
+
|
1171
|
+
:param str compartment_id: (optional)
|
1172
|
+
The `OCID`__ of the compartment in which to list resources.
|
1173
|
+
|
1174
|
+
__ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
|
1175
|
+
|
1176
|
+
:param str work_request_id: (optional)
|
1177
|
+
The `OCID`__ of the asynchronous work request.
|
1178
|
+
|
1179
|
+
__ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
|
1180
|
+
|
1181
|
+
:param str status: (optional)
|
1182
|
+
A filter to return only the resources that match the given lifecycle state.
|
1183
|
+
|
1184
|
+
Allowed values are: "ACCEPTED", "IN_PROGRESS", "WAITING", "NEEDS_ATTENTION", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"
|
1185
|
+
|
1186
|
+
:param str resource_id: (optional)
|
1187
|
+
The `OCID`__ of the resource affected by the work request.
|
1188
|
+
|
1189
|
+
__ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
|
1190
|
+
|
1191
|
+
:param str opc_request_id: (optional)
|
1192
|
+
Unique Oracle-assigned identifier for the request. If you need to contact
|
1193
|
+
Oracle about a particular request, please provide the request ID.
|
1194
|
+
The only valid characters for request IDs are letters, numbers,
|
1195
|
+
underscore, and dash.
|
1196
|
+
|
1197
|
+
:param str page: (optional)
|
1198
|
+
For list pagination. The value of the opc-next-page response header from the previous
|
1199
|
+
\"List\" call. For important details about how pagination works, see
|
1200
|
+
`List Pagination`__.
|
1201
|
+
|
1202
|
+
__ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
|
1203
|
+
|
1204
|
+
:param int limit: (optional)
|
1205
|
+
For list pagination. The maximum number of results per page, or items to return in a
|
1206
|
+
paginated \"List\" call. For important details about how pagination works, see
|
1207
|
+
`List Pagination`__.
|
1208
|
+
|
1209
|
+
__ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
|
1210
|
+
|
1211
|
+
:param str sort_order: (optional)
|
1212
|
+
The sort order to use, either ascending (`ASC`) or descending (`DESC`).
|
1213
|
+
|
1214
|
+
Allowed values are: "ASC", "DESC"
|
1215
|
+
|
1216
|
+
:param str sort_by: (optional)
|
1217
|
+
The field to sort by. Only one sort order may be provided. Default order for `timeAccepted` is descending.
|
1218
|
+
|
1219
|
+
Allowed values are: "timeAccepted"
|
1220
|
+
|
1221
|
+
:param obj retry_strategy: (optional)
|
1222
|
+
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
|
1223
|
+
|
1224
|
+
This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
|
1225
|
+
The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
|
1226
|
+
|
1227
|
+
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
|
1228
|
+
|
1229
|
+
:param bool allow_control_chars: (optional)
|
1230
|
+
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
|
1231
|
+
By default, the response will not allow control characters in strings
|
1232
|
+
|
1233
|
+
:return: A :class:`~oci.response.Response` object with data of type :class:`~oci.zpr.models.WorkRequestSummaryCollection`
|
1234
|
+
:rtype: :class:`~oci.response.Response`
|
1235
|
+
|
1236
|
+
:example:
|
1237
|
+
Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.135.2/zpr/list_zpr_configuration_work_requests.py.html>`__ to see an example of how to use list_zpr_configuration_work_requests API.
|
1238
|
+
"""
|
1239
|
+
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
|
1240
|
+
required_arguments = []
|
1241
|
+
resource_path = "/zprConfigurationWorkRequests"
|
1242
|
+
method = "GET"
|
1243
|
+
operation_name = "list_zpr_configuration_work_requests"
|
1244
|
+
api_reference_link = ""
|
1245
|
+
|
1246
|
+
# Don't accept unknown kwargs
|
1247
|
+
expected_kwargs = [
|
1248
|
+
"allow_control_chars",
|
1249
|
+
"retry_strategy",
|
1250
|
+
"compartment_id",
|
1251
|
+
"work_request_id",
|
1252
|
+
"status",
|
1253
|
+
"resource_id",
|
1254
|
+
"opc_request_id",
|
1255
|
+
"page",
|
1256
|
+
"limit",
|
1257
|
+
"sort_order",
|
1258
|
+
"sort_by"
|
1259
|
+
]
|
1260
|
+
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
|
1261
|
+
if extra_kwargs:
|
1262
|
+
raise ValueError(
|
1263
|
+
f"list_zpr_configuration_work_requests got unknown kwargs: {extra_kwargs!r}")
|
1264
|
+
|
1265
|
+
if 'status' in kwargs:
|
1266
|
+
status_allowed_values = ["ACCEPTED", "IN_PROGRESS", "WAITING", "NEEDS_ATTENTION", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]
|
1267
|
+
if kwargs['status'] not in status_allowed_values:
|
1268
|
+
raise ValueError(
|
1269
|
+
f"Invalid value for `status`, must be one of { status_allowed_values }"
|
1270
|
+
)
|
1271
|
+
|
1272
|
+
if 'sort_order' in kwargs:
|
1273
|
+
sort_order_allowed_values = ["ASC", "DESC"]
|
1274
|
+
if kwargs['sort_order'] not in sort_order_allowed_values:
|
1275
|
+
raise ValueError(
|
1276
|
+
f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
|
1277
|
+
)
|
1278
|
+
|
1279
|
+
if 'sort_by' in kwargs:
|
1280
|
+
sort_by_allowed_values = ["timeAccepted"]
|
1281
|
+
if kwargs['sort_by'] not in sort_by_allowed_values:
|
1282
|
+
raise ValueError(
|
1283
|
+
f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
|
1284
|
+
)
|
1285
|
+
|
1286
|
+
query_params = {
|
1287
|
+
"compartmentId": kwargs.get("compartment_id", missing),
|
1288
|
+
"workRequestId": kwargs.get("work_request_id", missing),
|
1289
|
+
"status": kwargs.get("status", missing),
|
1290
|
+
"resourceId": kwargs.get("resource_id", missing),
|
1291
|
+
"page": kwargs.get("page", missing),
|
1292
|
+
"limit": kwargs.get("limit", missing),
|
1293
|
+
"sortOrder": kwargs.get("sort_order", missing),
|
1294
|
+
"sortBy": kwargs.get("sort_by", missing)
|
1295
|
+
}
|
1296
|
+
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
|
1297
|
+
|
1298
|
+
header_params = {
|
1299
|
+
"accept": "application/json",
|
1300
|
+
"content-type": "application/json",
|
1301
|
+
"opc-request-id": kwargs.get("opc_request_id", missing)
|
1302
|
+
}
|
1303
|
+
header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
|
1304
|
+
|
1305
|
+
retry_strategy = self.base_client.get_preferred_retry_strategy(
|
1306
|
+
operation_retry_strategy=kwargs.get('retry_strategy'),
|
1307
|
+
client_retry_strategy=self.retry_strategy
|
1308
|
+
)
|
1309
|
+
if retry_strategy is None:
|
1310
|
+
retry_strategy = retry.DEFAULT_RETRY_STRATEGY
|
1311
|
+
|
1312
|
+
if retry_strategy:
|
1313
|
+
if not isinstance(retry_strategy, retry.NoneRetryStrategy):
|
1314
|
+
self.base_client.add_opc_client_retries_header(header_params)
|
1315
|
+
retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
|
1316
|
+
return retry_strategy.make_retrying_call(
|
1317
|
+
self.base_client.call_api,
|
1318
|
+
resource_path=resource_path,
|
1319
|
+
method=method,
|
1320
|
+
query_params=query_params,
|
1321
|
+
header_params=header_params,
|
1322
|
+
response_type="WorkRequestSummaryCollection",
|
1323
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
1324
|
+
operation_name=operation_name,
|
1325
|
+
api_reference_link=api_reference_link,
|
1326
|
+
required_arguments=required_arguments)
|
1327
|
+
else:
|
1328
|
+
return self.base_client.call_api(
|
1329
|
+
resource_path=resource_path,
|
1330
|
+
method=method,
|
1331
|
+
query_params=query_params,
|
1332
|
+
header_params=header_params,
|
1333
|
+
response_type="WorkRequestSummaryCollection",
|
1334
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
1335
|
+
operation_name=operation_name,
|
1336
|
+
api_reference_link=api_reference_link,
|
1337
|
+
required_arguments=required_arguments)
|
1338
|
+
|
1339
|
+
def list_zpr_policies(self, **kwargs):
|
1340
|
+
"""
|
1341
|
+
Gets a list of ZprPolicies.
|
1342
|
+
|
1343
|
+
|
1344
|
+
:param str compartment_id: (optional)
|
1345
|
+
The `OCID`__ of the compartment in which to list resources.
|
1346
|
+
|
1347
|
+
__ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
|
1348
|
+
|
1349
|
+
:param str lifecycle_state: (optional)
|
1350
|
+
A filter to return only resources that match the given lifecycle state. The
|
1351
|
+
state value is case-insensitive.
|
1352
|
+
|
1353
|
+
Allowed values are: "ACTIVE", "CREATING", "FAILED", "UPDATING", "DELETING", "DELETED", "NEEDS_ATTENTION"
|
1354
|
+
|
1355
|
+
:param str name: (optional)
|
1356
|
+
A filter to return only resources that match the entire display name given.
|
1357
|
+
|
1358
|
+
:param str id: (optional)
|
1359
|
+
The `OCID`__ of the ZprPolicy.
|
1360
|
+
|
1361
|
+
__ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
|
1362
|
+
|
1363
|
+
:param int limit: (optional)
|
1364
|
+
For list pagination. The maximum number of results per page, or items to return in a
|
1365
|
+
paginated \"List\" call. For important details about how pagination works, see
|
1366
|
+
`List Pagination`__.
|
1367
|
+
|
1368
|
+
__ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
|
1369
|
+
|
1370
|
+
:param str page: (optional)
|
1371
|
+
For list pagination. The value of the opc-next-page response header from the previous
|
1372
|
+
\"List\" call. For important details about how pagination works, see
|
1373
|
+
`List Pagination`__.
|
1374
|
+
|
1375
|
+
__ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
|
1376
|
+
|
1377
|
+
:param str sort_order: (optional)
|
1378
|
+
The sort order to use, either ascending (`ASC`) or descending (`DESC`).
|
1379
|
+
|
1380
|
+
Allowed values are: "ASC", "DESC"
|
1381
|
+
|
1382
|
+
:param str sort_by: (optional)
|
1383
|
+
The field to sort by. You can provide only one sort order. Default order for `timeCreated`
|
1384
|
+
is descending. Default order for `name` is ascending.
|
1385
|
+
|
1386
|
+
Allowed values are: "timeCreated", "name"
|
1387
|
+
|
1388
|
+
:param str opc_request_id: (optional)
|
1389
|
+
Unique Oracle-assigned identifier for the request. If you need to contact
|
1390
|
+
Oracle about a particular request, please provide the request ID.
|
1391
|
+
The only valid characters for request IDs are letters, numbers,
|
1392
|
+
underscore, and dash.
|
1393
|
+
|
1394
|
+
:param obj retry_strategy: (optional)
|
1395
|
+
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
|
1396
|
+
|
1397
|
+
This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
|
1398
|
+
The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
|
1399
|
+
|
1400
|
+
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
|
1401
|
+
|
1402
|
+
:param bool allow_control_chars: (optional)
|
1403
|
+
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
|
1404
|
+
By default, the response will not allow control characters in strings
|
1405
|
+
|
1406
|
+
:return: A :class:`~oci.response.Response` object with data of type :class:`~oci.zpr.models.ZprPolicyCollection`
|
1407
|
+
:rtype: :class:`~oci.response.Response`
|
1408
|
+
|
1409
|
+
:example:
|
1410
|
+
Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.135.2/zpr/list_zpr_policies.py.html>`__ to see an example of how to use list_zpr_policies API.
|
1411
|
+
"""
|
1412
|
+
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
|
1413
|
+
required_arguments = []
|
1414
|
+
resource_path = "/zprPolicies"
|
1415
|
+
method = "GET"
|
1416
|
+
operation_name = "list_zpr_policies"
|
1417
|
+
api_reference_link = ""
|
1418
|
+
|
1419
|
+
# Don't accept unknown kwargs
|
1420
|
+
expected_kwargs = [
|
1421
|
+
"allow_control_chars",
|
1422
|
+
"retry_strategy",
|
1423
|
+
"compartment_id",
|
1424
|
+
"lifecycle_state",
|
1425
|
+
"name",
|
1426
|
+
"id",
|
1427
|
+
"limit",
|
1428
|
+
"page",
|
1429
|
+
"sort_order",
|
1430
|
+
"sort_by",
|
1431
|
+
"opc_request_id"
|
1432
|
+
]
|
1433
|
+
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
|
1434
|
+
if extra_kwargs:
|
1435
|
+
raise ValueError(
|
1436
|
+
f"list_zpr_policies got unknown kwargs: {extra_kwargs!r}")
|
1437
|
+
|
1438
|
+
if 'lifecycle_state' in kwargs:
|
1439
|
+
lifecycle_state_allowed_values = ["ACTIVE", "CREATING", "FAILED", "UPDATING", "DELETING", "DELETED", "NEEDS_ATTENTION"]
|
1440
|
+
if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
|
1441
|
+
raise ValueError(
|
1442
|
+
f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
|
1443
|
+
)
|
1444
|
+
|
1445
|
+
if 'sort_order' in kwargs:
|
1446
|
+
sort_order_allowed_values = ["ASC", "DESC"]
|
1447
|
+
if kwargs['sort_order'] not in sort_order_allowed_values:
|
1448
|
+
raise ValueError(
|
1449
|
+
f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
|
1450
|
+
)
|
1451
|
+
|
1452
|
+
if 'sort_by' in kwargs:
|
1453
|
+
sort_by_allowed_values = ["timeCreated", "name"]
|
1454
|
+
if kwargs['sort_by'] not in sort_by_allowed_values:
|
1455
|
+
raise ValueError(
|
1456
|
+
f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
|
1457
|
+
)
|
1458
|
+
|
1459
|
+
query_params = {
|
1460
|
+
"compartmentId": kwargs.get("compartment_id", missing),
|
1461
|
+
"lifecycleState": kwargs.get("lifecycle_state", missing),
|
1462
|
+
"name": kwargs.get("name", missing),
|
1463
|
+
"id": kwargs.get("id", missing),
|
1464
|
+
"limit": kwargs.get("limit", missing),
|
1465
|
+
"page": kwargs.get("page", missing),
|
1466
|
+
"sortOrder": kwargs.get("sort_order", missing),
|
1467
|
+
"sortBy": kwargs.get("sort_by", missing)
|
1468
|
+
}
|
1469
|
+
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
|
1470
|
+
|
1471
|
+
header_params = {
|
1472
|
+
"accept": "application/json",
|
1473
|
+
"content-type": "application/json",
|
1474
|
+
"opc-request-id": kwargs.get("opc_request_id", missing)
|
1475
|
+
}
|
1476
|
+
header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
|
1477
|
+
|
1478
|
+
retry_strategy = self.base_client.get_preferred_retry_strategy(
|
1479
|
+
operation_retry_strategy=kwargs.get('retry_strategy'),
|
1480
|
+
client_retry_strategy=self.retry_strategy
|
1481
|
+
)
|
1482
|
+
if retry_strategy is None:
|
1483
|
+
retry_strategy = retry.DEFAULT_RETRY_STRATEGY
|
1484
|
+
|
1485
|
+
if retry_strategy:
|
1486
|
+
if not isinstance(retry_strategy, retry.NoneRetryStrategy):
|
1487
|
+
self.base_client.add_opc_client_retries_header(header_params)
|
1488
|
+
retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
|
1489
|
+
return retry_strategy.make_retrying_call(
|
1490
|
+
self.base_client.call_api,
|
1491
|
+
resource_path=resource_path,
|
1492
|
+
method=method,
|
1493
|
+
query_params=query_params,
|
1494
|
+
header_params=header_params,
|
1495
|
+
response_type="ZprPolicyCollection",
|
1496
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
1497
|
+
operation_name=operation_name,
|
1498
|
+
api_reference_link=api_reference_link,
|
1499
|
+
required_arguments=required_arguments)
|
1500
|
+
else:
|
1501
|
+
return self.base_client.call_api(
|
1502
|
+
resource_path=resource_path,
|
1503
|
+
method=method,
|
1504
|
+
query_params=query_params,
|
1505
|
+
header_params=header_params,
|
1506
|
+
response_type="ZprPolicyCollection",
|
1507
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
1508
|
+
operation_name=operation_name,
|
1509
|
+
api_reference_link=api_reference_link,
|
1510
|
+
required_arguments=required_arguments)
|
1511
|
+
|
1512
|
+
def list_zpr_policy_work_request_errors(self, work_request_id, **kwargs):
|
1513
|
+
"""
|
1514
|
+
Lists the errors for a work request.
|
1515
|
+
|
1516
|
+
|
1517
|
+
:param str work_request_id: (required)
|
1518
|
+
The `OCID`__ of the asynchronous work request.
|
1519
|
+
|
1520
|
+
__ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
|
1521
|
+
|
1522
|
+
:param str opc_request_id: (optional)
|
1523
|
+
Unique Oracle-assigned identifier for the request. If you need to contact
|
1524
|
+
Oracle about a particular request, please provide the request ID.
|
1525
|
+
The only valid characters for request IDs are letters, numbers,
|
1526
|
+
underscore, and dash.
|
1527
|
+
|
1528
|
+
:param str page: (optional)
|
1529
|
+
For list pagination. The value of the opc-next-page response header from the previous
|
1530
|
+
\"List\" call. For important details about how pagination works, see
|
1531
|
+
`List Pagination`__.
|
1532
|
+
|
1533
|
+
__ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
|
1534
|
+
|
1535
|
+
:param int limit: (optional)
|
1536
|
+
For list pagination. The maximum number of results per page, or items to return in a
|
1537
|
+
paginated \"List\" call. For important details about how pagination works, see
|
1538
|
+
`List Pagination`__.
|
1539
|
+
|
1540
|
+
__ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
|
1541
|
+
|
1542
|
+
:param str sort_by: (optional)
|
1543
|
+
The field to sort by. Only one sort order may be provided. Default order for `timestamp` is descending.
|
1544
|
+
|
1545
|
+
Allowed values are: "timestamp"
|
1546
|
+
|
1547
|
+
:param str sort_order: (optional)
|
1548
|
+
The sort order to use, either ascending (`ASC`) or descending (`DESC`).
|
1549
|
+
|
1550
|
+
Allowed values are: "ASC", "DESC"
|
1551
|
+
|
1552
|
+
:param obj retry_strategy: (optional)
|
1553
|
+
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
|
1554
|
+
|
1555
|
+
This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
|
1556
|
+
The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
|
1557
|
+
|
1558
|
+
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
|
1559
|
+
|
1560
|
+
:param bool allow_control_chars: (optional)
|
1561
|
+
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
|
1562
|
+
By default, the response will not allow control characters in strings
|
1563
|
+
|
1564
|
+
:return: A :class:`~oci.response.Response` object with data of type :class:`~oci.zpr.models.WorkRequestErrorCollection`
|
1565
|
+
:rtype: :class:`~oci.response.Response`
|
1566
|
+
|
1567
|
+
:example:
|
1568
|
+
Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.135.2/zpr/list_zpr_policy_work_request_errors.py.html>`__ to see an example of how to use list_zpr_policy_work_request_errors API.
|
1569
|
+
"""
|
1570
|
+
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
|
1571
|
+
required_arguments = ['workRequestId']
|
1572
|
+
resource_path = "/zprPolicyWorkRequests/{workRequestId}/errors"
|
1573
|
+
method = "GET"
|
1574
|
+
operation_name = "list_zpr_policy_work_request_errors"
|
1575
|
+
api_reference_link = ""
|
1576
|
+
|
1577
|
+
# Don't accept unknown kwargs
|
1578
|
+
expected_kwargs = [
|
1579
|
+
"allow_control_chars",
|
1580
|
+
"retry_strategy",
|
1581
|
+
"opc_request_id",
|
1582
|
+
"page",
|
1583
|
+
"limit",
|
1584
|
+
"sort_by",
|
1585
|
+
"sort_order"
|
1586
|
+
]
|
1587
|
+
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
|
1588
|
+
if extra_kwargs:
|
1589
|
+
raise ValueError(
|
1590
|
+
f"list_zpr_policy_work_request_errors got unknown kwargs: {extra_kwargs!r}")
|
1591
|
+
|
1592
|
+
path_params = {
|
1593
|
+
"workRequestId": work_request_id
|
1594
|
+
}
|
1595
|
+
|
1596
|
+
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
|
1597
|
+
|
1598
|
+
for (k, v) in six.iteritems(path_params):
|
1599
|
+
if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
|
1600
|
+
raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
|
1601
|
+
|
1602
|
+
if 'sort_by' in kwargs:
|
1603
|
+
sort_by_allowed_values = ["timestamp"]
|
1604
|
+
if kwargs['sort_by'] not in sort_by_allowed_values:
|
1605
|
+
raise ValueError(
|
1606
|
+
f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
|
1607
|
+
)
|
1608
|
+
|
1609
|
+
if 'sort_order' in kwargs:
|
1610
|
+
sort_order_allowed_values = ["ASC", "DESC"]
|
1611
|
+
if kwargs['sort_order'] not in sort_order_allowed_values:
|
1612
|
+
raise ValueError(
|
1613
|
+
f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
|
1614
|
+
)
|
1615
|
+
|
1616
|
+
query_params = {
|
1617
|
+
"page": kwargs.get("page", missing),
|
1618
|
+
"limit": kwargs.get("limit", missing),
|
1619
|
+
"sortBy": kwargs.get("sort_by", missing),
|
1620
|
+
"sortOrder": kwargs.get("sort_order", missing)
|
1621
|
+
}
|
1622
|
+
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
|
1623
|
+
|
1624
|
+
header_params = {
|
1625
|
+
"accept": "application/json",
|
1626
|
+
"content-type": "application/json",
|
1627
|
+
"opc-request-id": kwargs.get("opc_request_id", missing)
|
1628
|
+
}
|
1629
|
+
header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
|
1630
|
+
|
1631
|
+
retry_strategy = self.base_client.get_preferred_retry_strategy(
|
1632
|
+
operation_retry_strategy=kwargs.get('retry_strategy'),
|
1633
|
+
client_retry_strategy=self.retry_strategy
|
1634
|
+
)
|
1635
|
+
if retry_strategy is None:
|
1636
|
+
retry_strategy = retry.DEFAULT_RETRY_STRATEGY
|
1637
|
+
|
1638
|
+
if retry_strategy:
|
1639
|
+
if not isinstance(retry_strategy, retry.NoneRetryStrategy):
|
1640
|
+
self.base_client.add_opc_client_retries_header(header_params)
|
1641
|
+
retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
|
1642
|
+
return retry_strategy.make_retrying_call(
|
1643
|
+
self.base_client.call_api,
|
1644
|
+
resource_path=resource_path,
|
1645
|
+
method=method,
|
1646
|
+
path_params=path_params,
|
1647
|
+
query_params=query_params,
|
1648
|
+
header_params=header_params,
|
1649
|
+
response_type="WorkRequestErrorCollection",
|
1650
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
1651
|
+
operation_name=operation_name,
|
1652
|
+
api_reference_link=api_reference_link,
|
1653
|
+
required_arguments=required_arguments)
|
1654
|
+
else:
|
1655
|
+
return self.base_client.call_api(
|
1656
|
+
resource_path=resource_path,
|
1657
|
+
method=method,
|
1658
|
+
path_params=path_params,
|
1659
|
+
query_params=query_params,
|
1660
|
+
header_params=header_params,
|
1661
|
+
response_type="WorkRequestErrorCollection",
|
1662
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
1663
|
+
operation_name=operation_name,
|
1664
|
+
api_reference_link=api_reference_link,
|
1665
|
+
required_arguments=required_arguments)
|
1666
|
+
|
1667
|
+
def list_zpr_policy_work_request_logs(self, work_request_id, **kwargs):
|
1668
|
+
"""
|
1669
|
+
Lists the logs for a work request.
|
1670
|
+
|
1671
|
+
|
1672
|
+
:param str work_request_id: (required)
|
1673
|
+
The `OCID`__ of the asynchronous work request.
|
1674
|
+
|
1675
|
+
__ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
|
1676
|
+
|
1677
|
+
:param str opc_request_id: (optional)
|
1678
|
+
Unique Oracle-assigned identifier for the request. If you need to contact
|
1679
|
+
Oracle about a particular request, please provide the request ID.
|
1680
|
+
The only valid characters for request IDs are letters, numbers,
|
1681
|
+
underscore, and dash.
|
1682
|
+
|
1683
|
+
:param str page: (optional)
|
1684
|
+
For list pagination. The value of the opc-next-page response header from the previous
|
1685
|
+
\"List\" call. For important details about how pagination works, see
|
1686
|
+
`List Pagination`__.
|
1687
|
+
|
1688
|
+
__ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
|
1689
|
+
|
1690
|
+
:param int limit: (optional)
|
1691
|
+
For list pagination. The maximum number of results per page, or items to return in a
|
1692
|
+
paginated \"List\" call. For important details about how pagination works, see
|
1693
|
+
`List Pagination`__.
|
1694
|
+
|
1695
|
+
__ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
|
1696
|
+
|
1697
|
+
:param str sort_by: (optional)
|
1698
|
+
The field to sort by. Only one sort order may be provided. Default order for `timestamp` is descending.
|
1699
|
+
|
1700
|
+
Allowed values are: "timestamp"
|
1701
|
+
|
1702
|
+
:param str sort_order: (optional)
|
1703
|
+
The sort order to use, either ascending (`ASC`) or descending (`DESC`).
|
1704
|
+
|
1705
|
+
Allowed values are: "ASC", "DESC"
|
1706
|
+
|
1707
|
+
:param obj retry_strategy: (optional)
|
1708
|
+
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
|
1709
|
+
|
1710
|
+
This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
|
1711
|
+
The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
|
1712
|
+
|
1713
|
+
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
|
1714
|
+
|
1715
|
+
:param bool allow_control_chars: (optional)
|
1716
|
+
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
|
1717
|
+
By default, the response will not allow control characters in strings
|
1718
|
+
|
1719
|
+
:return: A :class:`~oci.response.Response` object with data of type :class:`~oci.zpr.models.WorkRequestLogEntryCollection`
|
1720
|
+
:rtype: :class:`~oci.response.Response`
|
1721
|
+
|
1722
|
+
:example:
|
1723
|
+
Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.135.2/zpr/list_zpr_policy_work_request_logs.py.html>`__ to see an example of how to use list_zpr_policy_work_request_logs API.
|
1724
|
+
"""
|
1725
|
+
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
|
1726
|
+
required_arguments = ['workRequestId']
|
1727
|
+
resource_path = "/zprPolicyWorkRequests/{workRequestId}/logs"
|
1728
|
+
method = "GET"
|
1729
|
+
operation_name = "list_zpr_policy_work_request_logs"
|
1730
|
+
api_reference_link = ""
|
1731
|
+
|
1732
|
+
# Don't accept unknown kwargs
|
1733
|
+
expected_kwargs = [
|
1734
|
+
"allow_control_chars",
|
1735
|
+
"retry_strategy",
|
1736
|
+
"opc_request_id",
|
1737
|
+
"page",
|
1738
|
+
"limit",
|
1739
|
+
"sort_by",
|
1740
|
+
"sort_order"
|
1741
|
+
]
|
1742
|
+
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
|
1743
|
+
if extra_kwargs:
|
1744
|
+
raise ValueError(
|
1745
|
+
f"list_zpr_policy_work_request_logs got unknown kwargs: {extra_kwargs!r}")
|
1746
|
+
|
1747
|
+
path_params = {
|
1748
|
+
"workRequestId": work_request_id
|
1749
|
+
}
|
1750
|
+
|
1751
|
+
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
|
1752
|
+
|
1753
|
+
for (k, v) in six.iteritems(path_params):
|
1754
|
+
if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
|
1755
|
+
raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
|
1756
|
+
|
1757
|
+
if 'sort_by' in kwargs:
|
1758
|
+
sort_by_allowed_values = ["timestamp"]
|
1759
|
+
if kwargs['sort_by'] not in sort_by_allowed_values:
|
1760
|
+
raise ValueError(
|
1761
|
+
f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
|
1762
|
+
)
|
1763
|
+
|
1764
|
+
if 'sort_order' in kwargs:
|
1765
|
+
sort_order_allowed_values = ["ASC", "DESC"]
|
1766
|
+
if kwargs['sort_order'] not in sort_order_allowed_values:
|
1767
|
+
raise ValueError(
|
1768
|
+
f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
|
1769
|
+
)
|
1770
|
+
|
1771
|
+
query_params = {
|
1772
|
+
"page": kwargs.get("page", missing),
|
1773
|
+
"limit": kwargs.get("limit", missing),
|
1774
|
+
"sortBy": kwargs.get("sort_by", missing),
|
1775
|
+
"sortOrder": kwargs.get("sort_order", missing)
|
1776
|
+
}
|
1777
|
+
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
|
1778
|
+
|
1779
|
+
header_params = {
|
1780
|
+
"accept": "application/json",
|
1781
|
+
"content-type": "application/json",
|
1782
|
+
"opc-request-id": kwargs.get("opc_request_id", missing)
|
1783
|
+
}
|
1784
|
+
header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
|
1785
|
+
|
1786
|
+
retry_strategy = self.base_client.get_preferred_retry_strategy(
|
1787
|
+
operation_retry_strategy=kwargs.get('retry_strategy'),
|
1788
|
+
client_retry_strategy=self.retry_strategy
|
1789
|
+
)
|
1790
|
+
if retry_strategy is None:
|
1791
|
+
retry_strategy = retry.DEFAULT_RETRY_STRATEGY
|
1792
|
+
|
1793
|
+
if retry_strategy:
|
1794
|
+
if not isinstance(retry_strategy, retry.NoneRetryStrategy):
|
1795
|
+
self.base_client.add_opc_client_retries_header(header_params)
|
1796
|
+
retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
|
1797
|
+
return retry_strategy.make_retrying_call(
|
1798
|
+
self.base_client.call_api,
|
1799
|
+
resource_path=resource_path,
|
1800
|
+
method=method,
|
1801
|
+
path_params=path_params,
|
1802
|
+
query_params=query_params,
|
1803
|
+
header_params=header_params,
|
1804
|
+
response_type="WorkRequestLogEntryCollection",
|
1805
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
1806
|
+
operation_name=operation_name,
|
1807
|
+
api_reference_link=api_reference_link,
|
1808
|
+
required_arguments=required_arguments)
|
1809
|
+
else:
|
1810
|
+
return self.base_client.call_api(
|
1811
|
+
resource_path=resource_path,
|
1812
|
+
method=method,
|
1813
|
+
path_params=path_params,
|
1814
|
+
query_params=query_params,
|
1815
|
+
header_params=header_params,
|
1816
|
+
response_type="WorkRequestLogEntryCollection",
|
1817
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
1818
|
+
operation_name=operation_name,
|
1819
|
+
api_reference_link=api_reference_link,
|
1820
|
+
required_arguments=required_arguments)
|
1821
|
+
|
1822
|
+
def list_zpr_policy_work_requests(self, **kwargs):
|
1823
|
+
"""
|
1824
|
+
Lists the work requests in a compartment.
|
1825
|
+
|
1826
|
+
|
1827
|
+
:param str compartment_id: (optional)
|
1828
|
+
The `OCID`__ of the compartment in which to list resources.
|
1829
|
+
|
1830
|
+
__ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
|
1831
|
+
|
1832
|
+
:param str work_request_id: (optional)
|
1833
|
+
The `OCID`__ of the asynchronous work request.
|
1834
|
+
|
1835
|
+
__ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
|
1836
|
+
|
1837
|
+
:param str status: (optional)
|
1838
|
+
A filter to return only the resources that match the given lifecycle state.
|
1839
|
+
|
1840
|
+
Allowed values are: "ACCEPTED", "IN_PROGRESS", "WAITING", "NEEDS_ATTENTION", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"
|
1841
|
+
|
1842
|
+
:param str resource_id: (optional)
|
1843
|
+
The `OCID`__ of the resource affected by the work request.
|
1844
|
+
|
1845
|
+
__ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
|
1846
|
+
|
1847
|
+
:param str opc_request_id: (optional)
|
1848
|
+
Unique Oracle-assigned identifier for the request. If you need to contact
|
1849
|
+
Oracle about a particular request, please provide the request ID.
|
1850
|
+
The only valid characters for request IDs are letters, numbers,
|
1851
|
+
underscore, and dash.
|
1852
|
+
|
1853
|
+
:param str page: (optional)
|
1854
|
+
For list pagination. The value of the opc-next-page response header from the previous
|
1855
|
+
\"List\" call. For important details about how pagination works, see
|
1856
|
+
`List Pagination`__.
|
1857
|
+
|
1858
|
+
__ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
|
1859
|
+
|
1860
|
+
:param int limit: (optional)
|
1861
|
+
For list pagination. The maximum number of results per page, or items to return in a
|
1862
|
+
paginated \"List\" call. For important details about how pagination works, see
|
1863
|
+
`List Pagination`__.
|
1864
|
+
|
1865
|
+
__ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
|
1866
|
+
|
1867
|
+
:param str sort_order: (optional)
|
1868
|
+
The sort order to use, either ascending (`ASC`) or descending (`DESC`).
|
1869
|
+
|
1870
|
+
Allowed values are: "ASC", "DESC"
|
1871
|
+
|
1872
|
+
:param str sort_by: (optional)
|
1873
|
+
The field to sort by. Only one sort order may be provided. Default order for `timeAccepted` is descending.
|
1874
|
+
|
1875
|
+
Allowed values are: "timeAccepted"
|
1876
|
+
|
1877
|
+
:param obj retry_strategy: (optional)
|
1878
|
+
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
|
1879
|
+
|
1880
|
+
This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
|
1881
|
+
The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
|
1882
|
+
|
1883
|
+
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
|
1884
|
+
|
1885
|
+
:param bool allow_control_chars: (optional)
|
1886
|
+
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
|
1887
|
+
By default, the response will not allow control characters in strings
|
1888
|
+
|
1889
|
+
:return: A :class:`~oci.response.Response` object with data of type :class:`~oci.zpr.models.WorkRequestSummaryCollection`
|
1890
|
+
:rtype: :class:`~oci.response.Response`
|
1891
|
+
|
1892
|
+
:example:
|
1893
|
+
Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.135.2/zpr/list_zpr_policy_work_requests.py.html>`__ to see an example of how to use list_zpr_policy_work_requests API.
|
1894
|
+
"""
|
1895
|
+
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
|
1896
|
+
required_arguments = []
|
1897
|
+
resource_path = "/zprPolicyWorkRequests"
|
1898
|
+
method = "GET"
|
1899
|
+
operation_name = "list_zpr_policy_work_requests"
|
1900
|
+
api_reference_link = ""
|
1901
|
+
|
1902
|
+
# Don't accept unknown kwargs
|
1903
|
+
expected_kwargs = [
|
1904
|
+
"allow_control_chars",
|
1905
|
+
"retry_strategy",
|
1906
|
+
"compartment_id",
|
1907
|
+
"work_request_id",
|
1908
|
+
"status",
|
1909
|
+
"resource_id",
|
1910
|
+
"opc_request_id",
|
1911
|
+
"page",
|
1912
|
+
"limit",
|
1913
|
+
"sort_order",
|
1914
|
+
"sort_by"
|
1915
|
+
]
|
1916
|
+
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
|
1917
|
+
if extra_kwargs:
|
1918
|
+
raise ValueError(
|
1919
|
+
f"list_zpr_policy_work_requests got unknown kwargs: {extra_kwargs!r}")
|
1920
|
+
|
1921
|
+
if 'status' in kwargs:
|
1922
|
+
status_allowed_values = ["ACCEPTED", "IN_PROGRESS", "WAITING", "NEEDS_ATTENTION", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]
|
1923
|
+
if kwargs['status'] not in status_allowed_values:
|
1924
|
+
raise ValueError(
|
1925
|
+
f"Invalid value for `status`, must be one of { status_allowed_values }"
|
1926
|
+
)
|
1927
|
+
|
1928
|
+
if 'sort_order' in kwargs:
|
1929
|
+
sort_order_allowed_values = ["ASC", "DESC"]
|
1930
|
+
if kwargs['sort_order'] not in sort_order_allowed_values:
|
1931
|
+
raise ValueError(
|
1932
|
+
f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
|
1933
|
+
)
|
1934
|
+
|
1935
|
+
if 'sort_by' in kwargs:
|
1936
|
+
sort_by_allowed_values = ["timeAccepted"]
|
1937
|
+
if kwargs['sort_by'] not in sort_by_allowed_values:
|
1938
|
+
raise ValueError(
|
1939
|
+
f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
|
1940
|
+
)
|
1941
|
+
|
1942
|
+
query_params = {
|
1943
|
+
"compartmentId": kwargs.get("compartment_id", missing),
|
1944
|
+
"workRequestId": kwargs.get("work_request_id", missing),
|
1945
|
+
"status": kwargs.get("status", missing),
|
1946
|
+
"resourceId": kwargs.get("resource_id", missing),
|
1947
|
+
"page": kwargs.get("page", missing),
|
1948
|
+
"limit": kwargs.get("limit", missing),
|
1949
|
+
"sortOrder": kwargs.get("sort_order", missing),
|
1950
|
+
"sortBy": kwargs.get("sort_by", missing)
|
1951
|
+
}
|
1952
|
+
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
|
1953
|
+
|
1954
|
+
header_params = {
|
1955
|
+
"accept": "application/json",
|
1956
|
+
"content-type": "application/json",
|
1957
|
+
"opc-request-id": kwargs.get("opc_request_id", missing)
|
1958
|
+
}
|
1959
|
+
header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
|
1960
|
+
|
1961
|
+
retry_strategy = self.base_client.get_preferred_retry_strategy(
|
1962
|
+
operation_retry_strategy=kwargs.get('retry_strategy'),
|
1963
|
+
client_retry_strategy=self.retry_strategy
|
1964
|
+
)
|
1965
|
+
if retry_strategy is None:
|
1966
|
+
retry_strategy = retry.DEFAULT_RETRY_STRATEGY
|
1967
|
+
|
1968
|
+
if retry_strategy:
|
1969
|
+
if not isinstance(retry_strategy, retry.NoneRetryStrategy):
|
1970
|
+
self.base_client.add_opc_client_retries_header(header_params)
|
1971
|
+
retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
|
1972
|
+
return retry_strategy.make_retrying_call(
|
1973
|
+
self.base_client.call_api,
|
1974
|
+
resource_path=resource_path,
|
1975
|
+
method=method,
|
1976
|
+
query_params=query_params,
|
1977
|
+
header_params=header_params,
|
1978
|
+
response_type="WorkRequestSummaryCollection",
|
1979
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
1980
|
+
operation_name=operation_name,
|
1981
|
+
api_reference_link=api_reference_link,
|
1982
|
+
required_arguments=required_arguments)
|
1983
|
+
else:
|
1984
|
+
return self.base_client.call_api(
|
1985
|
+
resource_path=resource_path,
|
1986
|
+
method=method,
|
1987
|
+
query_params=query_params,
|
1988
|
+
header_params=header_params,
|
1989
|
+
response_type="WorkRequestSummaryCollection",
|
1990
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
1991
|
+
operation_name=operation_name,
|
1992
|
+
api_reference_link=api_reference_link,
|
1993
|
+
required_arguments=required_arguments)
|
1994
|
+
|
1995
|
+
def update_zpr_policy(self, zpr_policy_id, update_zpr_policy_details, **kwargs):
|
1996
|
+
"""
|
1997
|
+
Updates a specific ZprPolicy. If updating on statements, the entire list of policy statements is required, which will replace the existing policy statements associated with the policy ID.
|
1998
|
+
|
1999
|
+
|
2000
|
+
:param str zpr_policy_id: (required)
|
2001
|
+
The `OCID`__ of the ZprPolicy.
|
2002
|
+
|
2003
|
+
__ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
|
2004
|
+
|
2005
|
+
:param oci.zpr.models.UpdateZprPolicyDetails update_zpr_policy_details: (required)
|
2006
|
+
The information to be updated.
|
2007
|
+
|
2008
|
+
:param str opc_retry_token: (optional)
|
2009
|
+
A token that uniquely identifies a request so it can be retried in case of a timeout or
|
2010
|
+
server error without risk of running that same action again. Retry tokens expire after 24
|
2011
|
+
hours, but can be invalidated before then due to conflicting operations. For example, if a resource
|
2012
|
+
has been deleted and removed from the system, then a retry of the original creation request
|
2013
|
+
might be rejected.
|
2014
|
+
|
2015
|
+
:param str if_match: (optional)
|
2016
|
+
For optimistic concurrency control. In the PUT or DELETE call for a resource, set the
|
2017
|
+
`if-match` parameter to the value of the etag from a previous GET or POST response for
|
2018
|
+
that resource. The resource will be updated or deleted only if the etag you provide
|
2019
|
+
matches the resource's current etag value.
|
2020
|
+
|
2021
|
+
:param str opc_request_id: (optional)
|
2022
|
+
Unique Oracle-assigned identifier for the request. If you need to contact
|
2023
|
+
Oracle about a particular request, please provide the request ID.
|
2024
|
+
The only valid characters for request IDs are letters, numbers,
|
2025
|
+
underscore, and dash.
|
2026
|
+
|
2027
|
+
:param bool opc_dry_run: (optional)
|
2028
|
+
Indicates that the request is a dry run, if set to \"true\". A dry run request does not modify the
|
2029
|
+
configuration item details and is used only to perform validation on the submitted data.
|
2030
|
+
|
2031
|
+
:param obj retry_strategy: (optional)
|
2032
|
+
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
|
2033
|
+
|
2034
|
+
This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
|
2035
|
+
The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
|
2036
|
+
|
2037
|
+
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
|
2038
|
+
|
2039
|
+
:param bool allow_control_chars: (optional)
|
2040
|
+
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
|
2041
|
+
By default, the response will not allow control characters in strings
|
2042
|
+
|
2043
|
+
:return: A :class:`~oci.response.Response` object with data of type None
|
2044
|
+
:rtype: :class:`~oci.response.Response`
|
2045
|
+
|
2046
|
+
:example:
|
2047
|
+
Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.135.2/zpr/update_zpr_policy.py.html>`__ to see an example of how to use update_zpr_policy API.
|
2048
|
+
"""
|
2049
|
+
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
|
2050
|
+
required_arguments = ['zprPolicyId']
|
2051
|
+
resource_path = "/zprPolicies/{zprPolicyId}"
|
2052
|
+
method = "PUT"
|
2053
|
+
operation_name = "update_zpr_policy"
|
2054
|
+
api_reference_link = ""
|
2055
|
+
|
2056
|
+
# Don't accept unknown kwargs
|
2057
|
+
expected_kwargs = [
|
2058
|
+
"allow_control_chars",
|
2059
|
+
"retry_strategy",
|
2060
|
+
"opc_retry_token",
|
2061
|
+
"if_match",
|
2062
|
+
"opc_request_id",
|
2063
|
+
"opc_dry_run"
|
2064
|
+
]
|
2065
|
+
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
|
2066
|
+
if extra_kwargs:
|
2067
|
+
raise ValueError(
|
2068
|
+
f"update_zpr_policy got unknown kwargs: {extra_kwargs!r}")
|
2069
|
+
|
2070
|
+
path_params = {
|
2071
|
+
"zprPolicyId": zpr_policy_id
|
2072
|
+
}
|
2073
|
+
|
2074
|
+
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
|
2075
|
+
|
2076
|
+
for (k, v) in six.iteritems(path_params):
|
2077
|
+
if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
|
2078
|
+
raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
|
2079
|
+
|
2080
|
+
header_params = {
|
2081
|
+
"accept": "application/json",
|
2082
|
+
"content-type": "application/json",
|
2083
|
+
"opc-retry-token": kwargs.get("opc_retry_token", missing),
|
2084
|
+
"if-match": kwargs.get("if_match", missing),
|
2085
|
+
"opc-request-id": kwargs.get("opc_request_id", missing),
|
2086
|
+
"opc-dry-run": kwargs.get("opc_dry_run", missing)
|
2087
|
+
}
|
2088
|
+
header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
|
2089
|
+
|
2090
|
+
retry_strategy = self.base_client.get_preferred_retry_strategy(
|
2091
|
+
operation_retry_strategy=kwargs.get('retry_strategy'),
|
2092
|
+
client_retry_strategy=self.retry_strategy
|
2093
|
+
)
|
2094
|
+
if retry_strategy is None:
|
2095
|
+
retry_strategy = retry.DEFAULT_RETRY_STRATEGY
|
2096
|
+
|
2097
|
+
if retry_strategy:
|
2098
|
+
if not isinstance(retry_strategy, retry.NoneRetryStrategy):
|
2099
|
+
self.base_client.add_opc_retry_token_if_needed(header_params)
|
2100
|
+
self.base_client.add_opc_client_retries_header(header_params)
|
2101
|
+
retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
|
2102
|
+
return retry_strategy.make_retrying_call(
|
2103
|
+
self.base_client.call_api,
|
2104
|
+
resource_path=resource_path,
|
2105
|
+
method=method,
|
2106
|
+
path_params=path_params,
|
2107
|
+
header_params=header_params,
|
2108
|
+
body=update_zpr_policy_details,
|
2109
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
2110
|
+
operation_name=operation_name,
|
2111
|
+
api_reference_link=api_reference_link,
|
2112
|
+
required_arguments=required_arguments)
|
2113
|
+
else:
|
2114
|
+
return self.base_client.call_api(
|
2115
|
+
resource_path=resource_path,
|
2116
|
+
method=method,
|
2117
|
+
path_params=path_params,
|
2118
|
+
header_params=header_params,
|
2119
|
+
body=update_zpr_policy_details,
|
2120
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
2121
|
+
operation_name=operation_name,
|
2122
|
+
api_reference_link=api_reference_link,
|
2123
|
+
required_arguments=required_arguments)
|