Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ConfigurationGovernanceV1

API specification for the Configuration Governance service. interfaces

Hierarchy

  • BaseService
    • ConfigurationGovernanceV1

Index

Constructors

constructor

Properties

Static DEFAULT_SERVICE_NAME

DEFAULT_SERVICE_NAME: string = "configuration_governance"

Static DEFAULT_SERVICE_URL

DEFAULT_SERVICE_URL: string = "https://us.compliance.cloud.ibm.com"

Methods

createRuleAttachments

  • Create attachments.

    Creates one or more scope attachments for an existing rule.

    You can attach an existing rule to a scope, such as a specific IBM Cloud account, to start evaluating the rule for compliance. A successful POST /config/v1/rules/{rule_id}/attachments returns the ID value for the attachment, along with other metadata.

    Parameters

    Name Type Attribute Description
    params CreateRuleAttachmentsParams

    The parameters to send to the service.

    Properties

    Name Type Attributes Description
    attachments RuleAttachmentRequest[]
    ruleId string The UUID that uniquely identifies the rule.
    headers OutgoingHttpHeaders Optional
    transactionId string Optional The unique identifier that is used to trace an entire request. If you omit this field, the service generates and sends a transaction ID as a response header of the request. In the case of an error, the transaction ID is set in the `trace` field of the response body.

    Returns Promise<Response<CreateRuleAttachmentsResponse>>

createRules

  • Create rules.

    Creates one or more rules that you can use to govern the way that IBM Cloud resources can be provisioned and configured.

    A successful POST /config/rules request defines a rule based on the target, conditions, and enforcement actions that you specify. The response returns the ID value for your rule, along with other metadata.

    To learn more about rules, check out the docs.

    Parameters

    Name Type Attribute Description
    params CreateRulesParams

    The parameters to send to the service.

    Properties

    Name Type Attributes Description
    rules CreateRuleRequest[] A list of rules to be created.
    headers OutgoingHttpHeaders Optional
    transactionId string Optional The unique identifier that is used to trace an entire request. If you omit this field, the service generates and sends a transaction ID as a response header of the request. In the case of an error, the transaction ID is set in the `trace` field of the response body.

    Returns Promise<Response<CreateRulesResponse>>

deleteRule

  • Delete a rule.

    Deletes an existing rule.

    Parameters

    Name Type Attribute Description
    params DeleteRuleParams

    The parameters to send to the service.

    Properties

    Name Type Attributes Description
    ruleId string The UUID that uniquely identifies the rule.
    headers OutgoingHttpHeaders Optional
    transactionId string Optional The unique identifier that is used to trace an entire request. If you omit this field, the service generates and sends a transaction ID as a response header of the request. In the case of an error, the transaction ID is set in the `trace` field of the response body.

    Returns Promise<Response<Empty>>

deleteRuleAttachment

  • Delete an attachment.

    Deletes an existing scope attachment.

    Parameters

    Name Type Attribute Description
    params DeleteRuleAttachmentParams

    The parameters to send to the service.

    Properties

    Name Type Attributes Description
    attachmentId string The UUID that uniquely identifies the attachment.
    ruleId string The UUID that uniquely identifies the rule.
    headers OutgoingHttpHeaders Optional
    transactionId string Optional The unique identifier that is used to trace an entire request. If you omit this field, the service generates and sends a transaction ID as a response header of the request. In the case of an error, the transaction ID is set in the `trace` field of the response body.

    Returns Promise<Response<Empty>>

disableRetries

  • disableRetries(): void
  • Disables retries.

    Returns void

enableRetries

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

    Parameters

    Name Type Attribute Description
    retryOptions RetryOptions Optional

    configuration for retries

    Returns void

getAuthenticator

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

    Returns any

getHttpClient

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

    Returns AxiosInstance

getRule

  • Get a rule.

    Retrieves an existing rule and its details.

    Parameters

    Name Type Attribute Description
    params GetRuleParams

    The parameters to send to the service.

    Properties

    Name Type Attributes Description
    ruleId string The UUID that uniquely identifies the rule.
    headers OutgoingHttpHeaders Optional
    transactionId string Optional The unique identifier that is used to trace an entire request. If you omit this field, the service generates and sends a transaction ID as a response header of the request. In the case of an error, the transaction ID is set in the `trace` field of the response body.

    Returns Promise<Response<Rule>>

getRuleAttachment

  • Get an attachment.

    Retrieves an existing scope attachment for a rule.

    Parameters

    Name Type Attribute Description
    params GetRuleAttachmentParams

    The parameters to send to the service.

    Properties

    Name Type Attributes Description
    attachmentId string The UUID that uniquely identifies the attachment.
    ruleId string The UUID that uniquely identifies the rule.
    headers OutgoingHttpHeaders Optional
    transactionId string Optional The unique identifier that is used to trace an entire request. If you omit this field, the service generates and sends a transaction ID as a response header of the request. In the case of an error, the transaction ID is set in the `trace` field of the response body.

    Returns Promise<Response<RuleAttachment>>

listRuleAttachments

  • List attachments.

    Retrieves a list of scope attachments that are associated with the specified rule.

    Parameters

    Name Type Attribute Description
    params ListRuleAttachmentsParams

    The parameters to send to the service.

    Properties

    Name Type Attributes Description
    ruleId string The UUID that uniquely identifies the rule.
    headers OutgoingHttpHeaders Optional
    limit number Optional The number of resources to retrieve. By default, list operations return the first 100 items. To retrieve a different set of items, use `limit` with `offset` to page through your available resources.
    offset number Optional The number of resources to skip. By specifying `offset`, you retrieve a subset of resources that starts with the `offset` value. Use `offset` with `limit` to page through your available resources.
    transactionId string Optional The unique identifier that is used to trace an entire request. If you omit this field, the service generates and sends a transaction ID as a response header of the request. In the case of an error, the transaction ID is set in the `trace` field of the response body.

    Returns Promise<Response<RuleAttachmentList>>

listRules

  • List rules.

    Retrieves a list of the rules that are available in your account.

    Parameters

    Name Type Attribute Description
    params ListRulesParams

    The parameters to send to the service.

    Properties

    Name Type Attributes Description
    accountId string Your IBM Cloud account ID.
    attached boolean Optional Retrieves a list of rules that have scope attachments.
    headers OutgoingHttpHeaders Optional
    labels string Optional Retrieves a list of rules that match the labels that you specify.
    limit number Optional The number of resources to retrieve. By default, list operations return the first 100 items. To retrieve a different set of items, use `limit` with `offset` to page through your available resources.
    offset number Optional The number of resources to skip. By specifying `offset`, you retrieve a subset of resources that starts with the `offset` value. Use `offset` with `limit` to page through your available resources.
    scopes string Optional Retrieves a list of rules that match the scope ID that you specify.
    transactionId string Optional The unique identifier that is used to trace an entire request. If you omit this field, the service generates and sends a transaction ID as a response header of the request. In the case of an error, the transaction ID is set in the `trace` field of the response body.

    Returns Promise<Response<RuleList>>

setEnableGzipCompression

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

    Parameters

    Name Type Attribute Description
    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

    Name Type Attribute Description
    url string

    The base URL for the service.

    Returns void

updateRule

  • Update a rule.

    Updates an existing rule based on the properties that you specify.

    Parameters

    Name Type Attribute Description
    params UpdateRuleParams

    The parameters to send to the service.

    Properties

    Name Type Attributes Description
    description string An extended description of your rule.
    enforcementActions EnforcementAction[] The actions that the service must run on your behalf when a request to create or modify the target resource does not comply with your conditions.
    ifMatch string Compares a supplied `Etag` value with the version that is stored for the requested resource. If the values match, the server allows the request method to continue.
    name string A human-readable alias to assign to your rule.
    requiredConfig RuleRequiredConfig
    ruleId string The UUID that uniquely identifies the rule.
    target TargetResource The properties that describe the resource that you want to target with the rule or template.
    accountId string Optional Your IBM Cloud account ID.
    headers OutgoingHttpHeaders Optional
    labels string[] Optional Labels that you can use to group and search for similar rules, such as those that help you to meet a specific organization guideline.
    ruleType RuleType | string Optional The type of rule. Rules that you create are `user_defined`.
    transactionId string Optional The unique identifier that is used to trace an entire request. If you omit this field, the service generates and sends a transaction ID as a response header of the request. In the case of an error, the transaction ID is set in the `trace` field of the response body.

    Returns Promise<Response<Rule>>

updateRuleAttachment

  • Update an attachment.

    Updates an existing scope attachment based on the properties that you specify.

    Parameters

    Name Type Attribute Description
    params UpdateRuleAttachmentParams

    The parameters to send to the service.

    Properties

    Name Type Attributes Description
    accountId string Your IBM Cloud account ID.
    attachmentId string The UUID that uniquely identifies the attachment.
    ifMatch string Compares a supplied `Etag` value with the version that is stored for the requested resource. If the values match, the server allows the request method to continue.
    includedScope RuleScope The extent at which the rule can be attached across your accounts.
    ruleId string The UUID that uniquely identifies the rule.
    excludedScopes RuleScope[] Optional The extent at which the rule can be excluded from the included scope.
    headers OutgoingHttpHeaders Optional
    transactionId string Optional The unique identifier that is used to trace an entire request. If you omit this field, the service generates and sends a transaction ID as a response header of the request. In the case of an error, the transaction ID is set in the `trace` field of the response body.

    Returns Promise<Response<TemplateAttachment>>

Static newInstance

Generated using TypeDoc