Rubrik SDK for Python
1.0.0
1.0.0
  • Introduction
  • Getting Started
    • Quick Start
  • Base API Calls
    • delete
    • get
    • job_status
    • patch
    • post
    • put
    • query
  • Bootstrap Functions
    • setup_cluster
    • status
  • Cluster Functions
    • add_floating_ips
    • add_guest_credential
    • add_vcenter
    • cluster_node_id
    • cluster_node_ip
    • cluster_node_name
    • cluster_support_tunnel
    • cluster_version
    • configure_cluster_location
    • configure_dns_servers
    • configure_login_banner
    • configure_ntp
    • configure_replication_nat
    • configure_replication_private
    • configure_search_domain
    • configure_smtp_settings
    • configure_syslog
    • configure_timezone
    • configure_vlan
    • create_user
    • delete_guest_credential
    • delete_proxy
    • end_user_authorization
    • get_all_vcenters
    • get_floating_ips
    • minimum_installed_cdm_version
    • read_only_authorization
    • refresh_vcenter
    • remove_floating_ips
    • update_proxy
  • Cloud Functions
    • add_aws_native_account
    • aws_s3_cloudon
    • aws_s3_cloudout
    • azure_cloudon
    • azure_cloudout
    • update_aws_native_account
    • update_aws_s3_cloudout
  • Data Management Functions
    • assign_sla
    • begin_managed_volume_snapshot
    • create_sla
    • delete_sla
    • end_managed_volume_snapshot
    • get_all_hosts
    • get_esxi_subnets
    • get_sla_objects
    • get_sql_db
    • get_sql_db_files
    • get_sql_live_mount
    • get_vsphere_live_mount
    • get_vsphere_live_mount_names
    • get_vsphere_vm
    • get_vsphere_vm_details
    • get_vsphere_vm_file
    • get_vsphere_vm_snapshot
    • object_id
    • on_demand_snapshot
    • pause_snapshots
    • register_vm
    • resume_snapshots
    • set_esxi_subnets
    • sql_db_export
    • sql_instant_recovery
    • sql_live_mount
    • sql_live_unmount
    • vcenter_refresh_vm
    • vsphere_instant_recovery
    • vsphere_live_mount
    • vsphere_live_unmount
  • Physical Host Functions
    • add_host_share
    • add_nas_share_to_host
    • add_physical_host
    • assign_physical_host_fileset
    • create_nas_fileset
    • create_physical_fileset
    • delete_physical_host
  • SDK Helper Functions
    • log
    • exceptions
  • Internal Functions
    • _api_validation
    • _authorization_header
    • _common_api
    • _date_time_conversion
    • _header
    • _platform_user_agent
    • _time_in_range
    • _validate_sql_db
    • _validate_sql_recovery_point
Powered by GitBook
On this page
  • Arguments
  • Keyword Arguments
  • Returns
  • Example
  1. Data Management Functions

create_sla

Create a new SLA Domain.

def create_sla(self, name, hourly_frequency=None, hourly_retention=None, daily_frequency=None, daily_retention=None, monthly_frequency=None, monthly_retention=None, yearly_frequency=None, yearly_retention=None, archive_name=None, retention_on_brik_in_days=None, instant_archive=False, timeout=15):  # pylint: ignore

Arguments

Name

Type

Description

Choices

name

str

The name of the new SLA Domain.

Keyword Arguments

Name

Type

Description

Choices

Default

hourly_frequency

int

Hourly frequency to take backups.

None

hourly_retention

int

Number of hours to retain the hourly backups.

None

daily_frequency

int

Daily frequency to take backups.

None

daily_retention

int

Number of hours to retain the daily backups.

None

monthly_frequency

int

Monthly frequency to take backups.

None

monthly_retention

int

Number of hours to retain the monthly backups.

None

yearly_frequency

int

Yearly frequency to take backups.

None

yearly_retention

int

Number of hours to retain the yearly backups.

None

archive_name

str

The optional archive location you wish to configure on the SLA Domain. When populated, you must also provide a retention_on_brik_in_days.

None

retention_on_brik_in_days

int

The number of days you wish to keep the backups on the Rubrik cluster. When populated, you must also provide a archive_name.

None

instant_archive

int

Flag that determines whether or not to enable instant archive. Set to true to enable.

False

timeout

str

The number of seconds to wait to establish a connection the Rubrik cluster before returning a timeout error.

30

Returns

Type

Return Value

str

No change required. The 'name' SLA Domain is already configured with the provided configuration.

dict

The full API response for POST /v1/sla_domain.

dict

The full API response for POST /v2/sla_domain.

Example

import rubrik_cdm

rubrik = rubrik_cdm.Connect()

sla_name = "PythonSDK"
hourly_frequency = 1
hourly_retention = 24
daily_frequency = 1
daily_retention = 30
monthly_frequency = 1
monthly_retention = 12
yearly_frequency = 1
yearly_retention = 5
archive_name = "AWS-S3-Bucket"
retention_on_brik_in_days = 15
instant_archive = True


create_sla = rubrik.create_sla(
    sla_name,
    hourly_frequency,
    hourly_retention,
    daily_frequency,
    daily_retention,
    monthly_frequency,
    monthly_retention,
    yearly_frequency,
    yearly_retention,
    archive_name,
    retention_on_brik_in_days,
    instant_archive
)
print(create_sla)
Previousbegin_managed_volume_snapshotNextdelete_sla

Last updated 5 years ago