Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BudgetClient

This service client uses {@link common.CircuitBreaker.DefaultConfiguration} for all the operations by default if no circuit breaker configuration is defined by the user.

Hierarchy

  • BudgetClient

Constructors

constructor

  • new BudgetClient(params: common.AuthParams, clientConfiguration?: common.ClientConfiguration): BudgetClient

Properties

Protected _bodyDuplexMode

_bodyDuplexMode: any = undefined

Protected _circuitBreaker

_circuitBreaker: typeof Breaker | null = null

Protected _clientConfiguration

_clientConfiguration: ClientConfiguration

Protected _defaultHeaders

_defaultHeaders: any

Protected _endpoint

_endpoint: string = ""

Protected _httpClient

_httpClient: HttpClient

Protected _httpOptions

_httpOptions: any = undefined

Protected _lastSetRegionOrRegionId

_lastSetRegionOrRegionId: string = ""

Protected _realmSpecificEndpointTemplateEnabled

_realmSpecificEndpointTemplateEnabled: boolean | undefined = undefined

Protected _region

_region: Region

Protected _regionId

_regionId: string = ""

Protected _waiters

_waiters: BudgetWaiter

targetService

targetService: string = "Budget"

Static Protected endpointServiceName

endpointServiceName: string = ""

Static Protected serviceEndpointTemplate

serviceEndpointTemplate: string = "https://usage.{region}.oci.{secondLevelDomain}"

Accessors

endpoint

  • get endpoint(): string
  • set endpoint(endpoint: string): void

logger

region

  • set region(region: Region): void
  • Sets the region to call (ex, Region.US_PHOENIX_1). Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.

    Parameters

    • region: Region

      The region of the service.

    Returns void

regionId

  • set regionId(regionId: string): void
  • Sets the regionId to call (ex, 'us-phoenix-1').

    Note, this will first try to map the region ID to a known Region and call {@link #region(Region) region}. If no known Region could be determined, it will create an endpoint assuming its in default Realm OC1 and then call {@link #endpoint(String) endpoint}.

    Parameters

    • regionId: string

      The public region ID.

    Returns void

useRealmSpecificEndpointTemplate

  • set useRealmSpecificEndpointTemplate(realmSpecificEndpointTemplateEnabled: boolean): void
  • Determines whether realm specific endpoint should be used or not. Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false"

    Parameters

    • realmSpecificEndpointTemplateEnabled: boolean

      flag to enable the use of realm specific endpoint template

    Returns void

Methods

close

  • close(): void

createAlertRule

  • Creates a new Alert Rule.

    This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.

    throws

    OciError when an error occurs

    example

    Click here to see how to use CreateAlertRule API.

    Parameters

    Returns Promise<CreateAlertRuleResponse>

    CreateAlertRuleResponse

createBudget

  • Creates a new budget.

    This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.

    throws

    OciError when an error occurs

    example

    Click here to see how to use CreateBudget API.

    Parameters

    Returns Promise<CreateBudgetResponse>

    CreateBudgetResponse

createWaiters

  • createWaiters(config?: common.WaiterConfiguration): BudgetWaiter
  • Creates a new BudgetWaiter for resources for this service.

    Parameters

    • Optional config: common.WaiterConfiguration

      The waiter configuration for termination and delay strategy

    Returns BudgetWaiter

    The service waiters.

deleteAlertRule

  • Deletes a specified Alert Rule resource. This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.

    throws

    OciError when an error occurs

    example

    Click here to see how to use DeleteAlertRule API.

    Parameters

    Returns Promise<DeleteAlertRuleResponse>

    DeleteAlertRuleResponse

deleteBudget

  • Deletes a specified budget resource. This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.

    throws

    OciError when an error occurs

    example

    Click here to see how to use DeleteBudget API.

    Parameters

    Returns Promise<DeleteBudgetResponse>

    DeleteBudgetResponse

getAlertRule

  • Gets an Alert Rule for a specified budget. This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.

    throws

    OciError when an error occurs

    example

    Click here to see how to use GetAlertRule API.

    Parameters

    Returns Promise<GetAlertRuleResponse>

    GetAlertRuleResponse

getBudget

  • Gets a budget by the identifier. This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.

    throws

    OciError when an error occurs

    example

    Click here to see how to use GetBudget API.

    Parameters

    Returns Promise<GetBudgetResponse>

    GetBudgetResponse

getWaiters

listAlertRules

  • Returns a list of Alert Rules for a specified budget.

    This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.

    throws

    OciError when an error occurs

    example

    Click here to see how to use ListAlertRules API.

    Parameters

    Returns Promise<ListAlertRulesResponse>

    ListAlertRulesResponse

listAlertRulesRecordIterator

  • Creates a new async iterator which will iterate over the models.AlertRuleSummary objects contained in responses from the listAlertRules operation. This iterator will fetch more data from the server as needed.

    Parameters

    Returns AsyncIterableIterator<AlertRuleSummary>

listAlertRulesResponseIterator

listAllAlertRules

  • NOTE: This function is deprecated in favor of listAlertRulesRecordIterator function. Creates a new async iterator which will iterate over the models.AlertRuleSummary objects contained in responses from the listAlertRules operation. This iterator will fetch more data from the server as needed.

    Parameters

    Returns AsyncIterableIterator<AlertRuleSummary>

listAllAlertRulesResponses

  • NOTE: This function is deprecated in favor of listAlertRulesResponseIterator function. Creates a new async iterator which will iterate over the responses received from the listAlertRules operation. This iterator will fetch more data from the server as needed.

    Parameters

    Returns AsyncIterableIterator<ListAlertRulesResponse>

listAllBudgets

  • NOTE: This function is deprecated in favor of listBudgetsRecordIterator function. Creates a new async iterator which will iterate over the models.BudgetSummary objects contained in responses from the listBudgets operation. This iterator will fetch more data from the server as needed.

    Parameters

    Returns AsyncIterableIterator<BudgetSummary>

listAllBudgetsResponses

  • NOTE: This function is deprecated in favor of listBudgetsResponseIterator function. Creates a new async iterator which will iterate over the responses received from the listBudgets operation. This iterator will fetch more data from the server as needed.

    Parameters

    Returns AsyncIterableIterator<ListBudgetsResponse>

listBudgets

  • Gets a list of budgets in a compartment.

    By default, ListBudgets returns budgets of the 'COMPARTMENT' target type, and the budget records with only one target compartment OCID.

    To list all budgets, set the targetType query parameter to ALL (for example: 'targetType=ALL').

    Clients should ignore new targetTypes, or upgrade to the latest version of the client SDK to handle new targetTypes.

    This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.

    throws

    OciError when an error occurs

    example

    Click here to see how to use ListBudgets API.

    Parameters

    Returns Promise<ListBudgetsResponse>

    ListBudgetsResponse

listBudgetsRecordIterator

  • Creates a new async iterator which will iterate over the models.BudgetSummary objects contained in responses from the listBudgets operation. This iterator will fetch more data from the server as needed.

    Parameters

    Returns AsyncIterableIterator<BudgetSummary>

listBudgetsResponseIterator

  • Creates a new async iterator which will iterate over the responses received from the listBudgets operation. This iterator will fetch more data from the server as needed.

    Parameters

    Returns AsyncIterableIterator<ListBudgetsResponse>

shutdownCircuitBreaker

  • shutdownCircuitBreaker(): void

updateAlertRule

  • Update an Alert Rule for the budget identified by the OCID. This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.

    throws

    OciError when an error occurs

    example

    Click here to see how to use UpdateAlertRule API.

    Parameters

    Returns Promise<UpdateAlertRuleResponse>

    UpdateAlertRuleResponse

updateBudget

  • Update a budget identified by the OCID. This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.

    throws

    OciError when an error occurs

    example

    Click here to see how to use UpdateBudget API.

    Parameters

    Returns Promise<UpdateBudgetResponse>

    UpdateBudgetResponse