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

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

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

getBucketConfig

getHttpClient

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

    Returns AxiosInstance

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

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