Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ResourceConfigurationV1

REST API used to configure Cloud Object Storage buckets. interfaces

API Version: 1.0.0

Hierarchy

  • BaseService
    • ResourceConfigurationV1

Index

Namespaces

Classes

Interfaces

Type aliases

Constructors

Properties

Methods

Type aliases

Static Callback

Callback: function

The callback for a service request.

Type declaration

    • (error: any, response?: Response<T>): void
    • Parameters

      • error: any
      • Optional response: Response<T>

      Returns void

Constructors

constructor

Properties

Static DEFAULT_SERVICE_NAME

DEFAULT_SERVICE_NAME: string = "resource_configuration"

Static DEFAULT_SERVICE_URL

DEFAULT_SERVICE_URL: string = "https://config.cloud-object-storage.cloud.ibm.com/v1"

Methods

createBackupPolicy

  • Add a new backup policy to the COS Bucket.

    Attach a new Backup Policy on a bucket.

    This request results in the creation of a single, new RecoveryRange on the destination BackupVault.

    Deletion and re-creation of a BackupPolicy to the same BackupVault destination will generate a new RecoveryRange.

    The following shall be validated. Any failure to validate shall cause a HTTP 400 to be returned.

    • the user has cloud-object-storage.bucket.post_backup_policy permissions on the source-bucket
    • the source-bucket must have cloud-object-storage.backup_vault.sync permissions on the Backup Vault
    • the source-bucket must have versioning-on
    • the Backup Vault must exist and be able to be contacted by the source-bucket
    • the source-bucket must not have an existing BackupPolicy targeting the Backup Vault
    • the source-bucket must not have a BackupPolicy with the same policy_name
    • the source-bucket must have fewer than 3 total BackupPolicies.

    Parameters

    Returns Promise<Response<BackupPolicy>>

createBackupVault

  • create a BackupVault.

    Creates a BackupVault.

    Requires that the user has cloud-object-storage.backup_vault.post_backup_vault permissions for the account.

    Certain fields will be returned only if the user has specific permissions:

    • activity_tracking requires cloud-object-storage.backup_vault.put_activity_tracking
    • metrics_monitoring requires cloud-object-storage.backup_vault.put_metrics_monitoring.

    Parameters

    Returns Promise<Response<BackupVault>>

createRestore

  • Initiate a Restore.

    Initiates a restore operation against some RecoveryRange to some destination bucket.

    The following shall be validated. Any failure to validate shall cause a HTTP 400 to be returned.

    • The specified RecoveryRange must exist
    • The restore time must be within the RecoveryRange
    • the user has cloud-object-storage.backup-vault.post_restore permissions on the backup-vault
    • the target-bucket must exist and be able to be contacted by the Backup Vault
    • target-bucket must have versioning-on
    • the Backup Vault must have cloud-object-storage.bucket.restore_sync permissions on the target-bucket.

    Parameters

    Returns Promise<Response<Restore>>

deleteBackupPolicy

deleteBackupVault

  • Delete an empty Backup Vault.

    Delete the Backup Vault.

    Requires that the BackupVault not contain any RecoveryRanges. Requires that the user has cloud-object-storage.backup_vault.delete_backup_vault permissions for the account.

    Parameters

    Returns Promise<Response<EmptyObject>>

disableRetries

  • disableRetries(): void

enableRetries

  • enableRetries(retryOptions?: RetryOptions): void
  • Enable retries for unfulfilled requests.

    Parameters

    • Optional retryOptions: RetryOptions

      the configuration for retries

    Returns void

getAuthenticator

  • getAuthenticator(): any
  • Get the instance of the authenticator set on the service.

    Returns any

    the Authenticator instance

getBackupPolicy

getBackupVault

  • get the config for a Backup Vault.

    Gets configuration information for a Backup Vault.

    Requires that the user has cloud-object-storage.backup_vault.get_basic permissions on the backup vault.

    Certain fields will be returned only if the user has specific permissions:

    • activity_tracking requires cloud-object-storage.backup_vault.get_activity_tracking
    • metrics_monitoring requires cloud-object-storage.backup_vault.get_metrics_monitoring
    • sse_kp_customer_root_key_crn requires cloud-object-storage.backup_vault.get_crk_id.

    Parameters

    Returns Promise<Response<BackupVault>>

getBucketConfig

getHttpClient

  • getHttpClient(): AxiosInstance
  • Get the Axios instance set on the service. All requests will be made using this instance.

    Returns AxiosInstance

getRestore

getSourceResourceRecoveryRange

listBackupPolicies

  • List BackupPolicies.

    Get all backup policies on a bucket.

    Requires that the user has cloud-object-storage.bucket.list_backup_policies permissions on the source bucket.

    This request generates the "cloud-object-storage.bucket-backup-policy.list" ActivityTracking event.

    Parameters

    Returns Promise<Response<BackupPolicyCollection>>

listBackupVaults

listRecoveryRanges

  • List RecoveryRanges on a backup vault.

    List RecoveryRanges on a backup vault. Lists all available ranges for all source resources by default. The ?source_resource_crn query parameter will limit the list to only ranges for the specified resource.

    Requires the user have cloud-object-storage.backup_vault.list_recovery_ranges permissions to the Backup Vault.

    Parameters

    Returns Promise<Response<RecoveryRangeCollection>>

listRestores

patchSourceResourceRecoveryRange

setDefaultHeaders

  • setDefaultHeaders(headers: OutgoingHttpHeaders): void
  • Set the HTTP headers to be sent in every request.

    Parameters

    • headers: OutgoingHttpHeaders

      the map of headers to include in requests.

    Returns void

setEnableGzipCompression

  • setEnableGzipCompression(setting: boolean): void
  • Turn request body compression on or off.

    Parameters

    • setting: boolean

      Will turn it on if 'true', off if 'false'.

    Returns void

setServiceUrl

  • setServiceUrl(url: string): void
  • Set the service URL to send requests to.

    Parameters

    • url: string

      the base URL for the service.

    Returns void

updateBackupVault

  • Update the config on a Backup Vault.

    Update the Backup Vault config via JSON Merge Patch update semantics.

    In particular, note that providing an empty object ({}) to either field in the request body will remove any existing configuration.

    Requires that the user have specific permissions depending on what is being changed:

    • activity_tracking requires cloud-object-storage.backup_vault.put_activity_tracking
    • metrics_monitoring requires cloud-object-storage.backup_vault.put_metrics_monitoring.

    Parameters

    Returns Promise<Response<BackupVault>>

updateBucketConfig

  • Make changes to a bucket's configuration.

    Updates a bucket using JSON Merge Patch. This request is used to add functionality (like an IP access filter) or to update existing parameters. Primitives are overwritten and replaced in their entirety. It is not possible to append a new (or to delete a specific) value to an array. Arrays can be cleared by updating the parameter with an empty array []. A PATCH operation only updates specified mutable fields. Please don't use PATCH trying to update the number of objects in a bucket, any timestamps, or other non-mutable fields.

    Parameters

    Returns Promise<Response<EmptyObject>>

Static convertModel

  • convertModel(input: any, converterFn: any, isMap?: boolean): any
  • Applies a given modifier function on a model object. Since the model object can be a map, or an array, or a model, these types needs different handling. Considering whether the input object is a map happens with an explicit parameter.

    Parameters

    • input: any

      the input model object

    • converterFn: any

      the function that is applied on the input object

    • Optional isMap: boolean

      is true when the input object should be handled as a map

    Returns any

Static newInstance

Generated using TypeDoc