IBM Cloud API Docs

Introduction

With IBM Cloud® Security and Compliance Center, you can embed security checks into your everyday workflows to continuously monitor for security vulnerabilities across multiple cloud environments. You can manage your current account settings such as the location in which the data that is generated by the service is stored and processed.

For highly regulated industries, such as financial services, achieving continuous compliance within a cloud environment is an important first step toward protecting customer and application data. Historically, that process was difficult and manual, which placed your organization at risk. But, with Security and Compliance Center, you can integrate daily, automatic compliance checks into your development lifecycle to help minimize that risk.

Before you get started with this API, you must first complete the initial set up. For help, see Getting started with Security and Compliance Center.

An SDK for Go is available to make it easier to programmatically access the API from your code. The client libraries that are provided by the SDKs implement best practices for using the API and reduce the amount of code that you need to write. The tab for each language includes code examples that demonstrate how to use the client libraries. For more information about using the SDKs, see the IBM Cloud SDK Common project on GitHub.

Installing the Go SDK

Go modules (recommended): Add the following import in your code, and then run go build or go mod tidy.

import (
	"github.com/IBM/scc-go-sdk/v5/securityandcompliancecenterapiv3"
)

Go get

go get -u github.com/IBM/scc-go-sdk/v5/securityandcompliancecenterapiv3

View on GitHub

Installing the Python SDK

pip install --upgrade "ibm-scc"

View on GitHub:

Installing the Java SDK

Maven
<dependency>
    <groupId>com.ibm.cloud</groupId>
    <artifactId>security-and-compliance-center-sdk</artifactId>
    <version>${version}</version>
</dependency>

Gradle
compile 'com.ibm.cloud:security-and-compliance-center-sdk:${version}'

Replace {version} in these examples with the release version.

View on GitHub

Installing the Node SDK

npm install --save ibm-scc

View on GitHub:

Endpoint URLs

Security and Compliance Center supports location-specific endpoint URLs that you can use to interact with the service over the public internet. A location represents the geographic area where your requests are handled and processed. When you call this API, be sure to use the endpoint URL that corresponds with the location settings that are configured in the Security and Compliance Center.

For more information about viewing and managing your location settings, check out the docs.

Endpoint URLs by region

  • Americas:
    • United States
      • Dallas: https://us-south.compliance.cloud.ibm.com/instances/{instance_id}/v3
    • Canada:
      • Toronto: https://ca-tor.compliance.cloud.ibm.com/instances/{instance_id}/v3
  • European Union:
    • Frankfurt: https://eu-de.compliance.cloud.ibm.com/instances/{instance_id}/v3

To find your instance ID, you can look in the settings page of the Security and Compliance UI or in your resource list.

Base URL

https://{region}.compliance.cloud.ibm.com/instances/{instance_id}/v3

Example for the us-south region

import (
    "encoding/json"
    "fmt"
    "github.com/IBM/go-sdk-core/v5/core"
    scc "github.com/IBM/scc-go-sdk/securityandcompliancecenterapiv3"
)

func main() {

    securityAndComplianceCenterService, err := scc.NewSecurityAndComplianceCenterApiV3(&scc.SecurityAndComplianceCenterApiV3Options {
        URL: "https://us-south.compliance.cloud.ibm.com/instances/{instance_id}/v3",
        Authenticator: & core.IamAuthenticator {
            ApiKey: "<IAM_API_KEY>",
        },
    })

    if err != nil {
        panic(err)
    }
}

Example for the us-south region

from ibm_scc.security_and_compliance_center_api_v3 import SecurityAndComplianceCenterApiV3
from ibm_cloud_sdk_core.authenticators import IAMAuthenticator

authenticator = IAMAuthenticator('<IAM_API_KEY>')

service = SecurityAndComplianceCenterApiV3(authenticator=authenticator)

service.set_service_url('https://us-south.compliance.cloud.ibm.com/instances/{instance_id}/v3')

Example for the us-south region

import com.ibm.cloud.security_and_compliance_center_api.v3.SecurityAndComplianceCenterApi;
import com.ibm.cloud.security_and_compliance_center_api.v3.model.*;
import com.ibm.cloud.sdk.core.http.Response;
import com.ibm.cloud.sdk.core.security.IamAuthenticator;

import java.util.Collections;
...

// Create an IAM authenticator
IamAuthenticator iamAuthenticator = new IamAuthenticator.Builder()
        .apikey("<API_KEY>")
        .build();

// Construct the service client
SecurityAndComplianceCenterApi securityAndComplianceCenterService = new SecurityAndComplianceCenterApi("My Security And Compliance Center Service", iamAuthenticator);

// Set the service URL
securityAndComplianceCenterService.setServiceUrl("https://us-south.cloud.ibm.com/instances/{instance_id}/v3");

Example for the us-south region

const { SecurityAndComplianceCenterApiV3 } = require('ibm-scc@4.0.0');
const { IamAuthenticator } = require('ibm-cloud-sdk-core');

const authenticator = new IamAuthenticator({
    apikey: '{apikey}'
});

const securityAndComplianceCenterService = new SecurityAndComplianceCenterApiV3({
    authenticator: authenticator
});

securityAndComplianceCenterService.setServiceUrl('{https://us-south.compliance.cloud.ibm.com/instances/{instance_id}/v3}');

Authentication

Authorization to the Security and Compliance Center API is enforced by using an IBM Cloud Identity and Access Management (IAM) access token. The token is used to determine the actions that a user or service ID has access to when they use the API.

To work with the API, include a valid IAM token in each outgoing request to the service. You can generate an access token by first creating an API key and then exchanging your API key for an IBM Cloud IAM token.

Don't have an API key? Try running ibmcloud iam oauth-tokens in the IBM Cloud Shell to quickly generate a personal access token.

To generate an access token from your API key, use the following cURL command.

curl -X POST \
  "https://iam.cloud.ibm.com/identity/token" \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --header 'Accept: application/json' \
  --data-urlencode 'grant_type=urn:ibm:params:oauth:grant-type:apikey' \
  --data-urlencode 'apikey=<API_KEY>'

Replace <API_KEY> with your IBM Cloud API key.

When you use the SDK, configure an IAM authenticator with an IBM Cloud IAM API key. The authenticator automatically obtains the IAM access token for the API key and includes it with each request. You can configure an authenticator in either of two ways:

  • Programmatically by constructing an IAM authenticator instance and supplying your IAM API key
  • By defining the API key in external configuration properties and then using the SDK authenticator factory to construct an IAM authenticator that uses the configured IAM API key

For more information, see the Authentication section of the IBM Cloud SDK Common documentation.

Example API request

curl -X {request_method} "https://{region}.compliance.cloud.ibm.com/instances/{instance_id}/v3/{method_endpoint}" --header "Authorization: Bearer {IAM_token}"

Replace {IAM_token} with your access token.

Authentication example

import (
    "encoding/json"
    "fmt"
    "github.com/IBM/go-sdk-core/v5/core"
    scc "github.com/IBM/scc-go-sdk/securityandcompliancecenterapiv3"
)

func main() {

    securityAndComplianceCenterService, err := scc.NewSecurityAndComplianceCenterApiV3(&scc.SecurityAndComplianceCenterApiV3Options {
        URL: "https://{region}.compliance.cloud.ibm.com/instances/{instance_id}/v3",
        Authenticator: & core.IamAuthenticator {
            ApiKey: "<IAM_API_KEY>",
        },
    })

    if err != nil {
        panic(err)
    }
}

Authentication example

from ibm_scc.security_and_compliance_center_api_v3 import SecurityAndComplianceCenterApiV3
from ibm_cloud_sdk_core.authenticators import IAMAuthenticator

authenticator = IAMAuthenticator('<IAM_API_KEY>')

service = SecurityAndComplianceCenterApiV3(authenticator=authenticator)

service.set_service_url('https://us-south.compliance.cloud.ibm.com/instances/{instance_id}/v3')

Authentication example

import com.ibm.cloud.security_and_compliance_center_api.v3.SecurityAndComplianceCenterApi;
import com.ibm.cloud.security_and_compliance_center_api.v3.model.*;
import com.ibm.cloud.sdk.core.http.Response;
import com.ibm.cloud.sdk.core.security.IamAuthenticator;

import java.util.Collections;
...

// Create an IAM authenticator
IamAuthenticator iamAuthenticator = new IamAuthenticator.Builder()
        .apikey("<API_KEY>")
        .build();

// Construct the service client
SecurityAndComplianceCenterApi securityAndComplianceCenterService = new SecurityAndComplianceCenterApi("My Security And Compliance Center Service", iamAuthenticator);

// Set the service URL
securityAndComplianceCenterService.setServiceUrl("https://{region}.cloud.ibm.com/instances/{instance_id}/v3");

Authentication example

const { SecurityAndComplianceCenterApiV3 } = require('ibm-scc@4.0.0');
const { IamAuthenticator } = require('ibm-cloud-sdk-core');

const authenticator = new IamAuthenticator({
    apikey: '{apikey}'
});

const securityAndComplianceCenterService = new SecurityAndComplianceCenterApiV3({
    authenticator: authenticator
});

securityAndComplianceCenterService.setServiceUrl('{url}');

Auditing

You can monitor API activity within your account by using the IBM Cloud Activity Tracker service. Whenever an API method is called, an event is generated that you can then track and audit from within Activity Tracker.

For more information about how to track activity, see Auditing events for Security and Compliance Center.

Error handling

The Security and Compliance Center API use standard HTTP status codes to indicate whether a method was completed successfully. HTTP response codes in the 2xx range indicate success. A response in the 4xx range is a failure, and a response in the 5xx range usually indicates an internal system error.

Status code summary
Status code Description
200 OK Everything worked as expected.
300 Multiple Choices The request has more than one possible responses.
400 Bad Request The request was unsuccessful, often due to a missing required parameter.
401 Unauthorized The parameters were valid but the request failed due to insufficient permissions.
402 Payment Required Your Trial plan is now expired.
403 Forbidden You are not allowed to access this resource.
404 Not Found The requested resource doesn't exist.
409 Conflict The requested resource conflicts with an existing resource.
410 Gone The requested resource was deleted and no longer exists.
429 Too Many Requests Too many requests were sent to the API too quickly.
500 Internal Server Error Something went wrong on Security and Compliance Center's end.

Example error handling

import (
    scc "github.com/IBM/scc-go-sdk/securityandcompliancecenterapiv3"
)

// Instantiate a service
securityAndComplianceCenterService, err := scc.NewSecurityAndComplianceCenterApiV3(options)

// Check for errors
if err != nil {
  panic(err)
}

// Call a method
result, response, err := securityAndComplianceCenterService.MethodName(&methodOptions)

// Check for errors
if err != nil {
  panic(err)
}

Example error handling

from ibm_scc.security_and_compliance_center_api_v3 import SecurityAndComplianceCenterApiV3
from ibm_cloud_sdk_core import ApiException

# Instantiate a service
try:
securityAndComplianceCenterService = SecurityAndComplianceCenterApiV3(authenticator)
except Exception as err:
    raise err

# Call a method
try:
    response = securityAndComplianceCenterService.getmethod(params)
except ApiException as err:
    raise err

Example error handling

import com.ibm.cloud.security_and_compliance_center_api.v3.SecurityAndComplianceCenterApi;

// Instantiate a service
try {
    SecurityAndComplianceCenterApi securityAndComplianceCenterApiService = SecurityAndComplianceCenterApi.newInstance();
}
// Check for errors 
catch (Exception e) {
    logger.error(String.format("Service returned status code %s: %s%nError details: %s",
        e.getStatusCode(), e.getMessage(), e.getDebuggingInfo()), e);
}
// Call a method
try {
    response = securityAndComplianceCenterApiService.getMethod(methodOptions);
}
// Check for errors 
catch (Exception e) {
    logger.error(String.format("Service returned status code %s: %s%nError details: %s",
        e.getStatusCode(), e.getMessage(), e.getDebuggingInfo()), e);
}

Example error handling

securityAndComplianceCenterService.method(params)
  .catch(err => {
    console.log('Error:', err);
  });

Pagination

Some API requests might return a large number of results. To avoid performance issues, the APIs return one page of results at a time, with a limited number of results on each page.

The default page size is 100 objects. To use a different page size, use the limit query parameter.

For any request that uses pagination, the response includes URLs you can use to make subsequent requests:

  • first.href: The URL for requesting the first page of results.
  • last.href: The URL for requesting the last page of results.
  • next: The URL for requesting the next page of results.

You can also use start as a bookmark.

Methods

List settings

Retrieve the settings of your service instance.

Retrieve the settings of your service instance.

Retrieve the settings of your service instance.

Retrieve the settings of your service instance.

Retrieve the settings of your service instance.

GET /settings
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) GetSettings(getSettingsOptions *GetSettingsOptions) (result *Settings, response *core.DetailedResponse, err error)
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) GetSettingsWithContext(ctx context.Context, getSettingsOptions *GetSettingsOptions) (result *Settings, response *core.DetailedResponse, err error)
getSettings(params)
get_settings(
        self,
        *,
        x_correlation_id: str = None,
        x_request_id: str = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<Settings> getSettings(GetSettingsOptions getSettingsOptions)

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • compliance.admin.settings-read

Auditing

Calling this method generates the following auditing event.

  • compliance.admin-settings.read

Request

Instantiate the GetSettingsOptions struct and set the fields to provide parameter values for the GetSettings method.

Use the GetSettingsOptions.Builder to create a GetSettingsOptions object that contains the parameter values for the getSettings method.

Custom Headers

  • The supplied or generated value of this header is logged for a request, and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

    Example: 1a2b3c4d-5e6f-4a7b-8c9d-e0f1a2b3c4d5

  • The supplied or generated value of this header is logged for a request, and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

WithContext method only

The GetSettings options.

parameters

  • The supplied or generated value of this header is logged for a request, and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

    Examples:
    value
    _source
    _lines
    _html
  • The supplied or generated value of this header is logged for a request, and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

parameters

  • The supplied or generated value of this header is logged for a request, and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

    Examples:
    value
    _source
    _lines
    _html
  • The supplied or generated value of this header is logged for a request, and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

The getSettings options.

  • curl -X GET --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/settings"
  • getSettingsOptions := securityAndComplianceCenterApiService.NewGetSettingsOptions()
    getSettingsOptions.SetXCorrelationID(xCorrelationIdLink)
    
    settings, response, err := securityAndComplianceCenterApiService.GetSettings(getSettingsOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(settings, "", "  ")
    fmt.Println(string(b))
  • const params = {
      xCorrelationId: xCorrelationIdLink,
    };
    
    let res;
    try {
      res = await securityAndComplianceCenterApiService.getSettings(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • response = security_and_compliance_center_api_service.get_settings(
      x_correlation_id=x_correlation_id_link,
    )
    settings = response.get_result()
    
    print(json.dumps(settings, indent=2))
  • GetSettingsOptions getSettingsOptions = new GetSettingsOptions.Builder()
      .xCorrelationId(xCorrelationIdLink)
      .build();
    
    Response<Settings> response = securityAndComplianceCenterApiService.getSettings(getSettingsOptions).execute();
    Settings settings = response.getResult();
    
    System.out.println(settings);

Response

The settings.

The settings.

Examples:
View

The settings.

Examples:
View

The settings.

Examples:
View

The settings.

Examples:
View

Status Code

  • The settings were successfully retrieved.

  • You are not authorized to make this request.

  • You are not allowed to make this request.

  • The specified resource was not found.

Example responses
  • {
      "event_notifications": {
        "instance_crn": "crn:v1:public:event-notifications:us-south:a/2411ffdc16844b07a42521c3443f456d:14c58404-b332-4178-86de-83141a7f93af::",
        "updated_on": "2023-04-19T17:39:44.668Z",
        "source_id": "crn:v1:bluemix:public:compliance:global:a/2411ffdc16844b07a42521c3443f456d:::"
      },
      "object_storage": {
        "instance_crn": "crn:v1:public:cloud-object-storage:global:a/2411ffdc16844b07a42521c3443f456d:ecca7d23-77d0-4a9b-8a24-3b761c63a460::",
        "bucket": "scc-bucket",
        "bucket_location": "us-south",
        "bucket_endpoint": "s3.us.private.cloud-object-storage.test.appdomain.cloud",
        "updated_on": "2023-03-01T22:00:05.917Z"
      }
    }
  • {
      "event_notifications": {
        "instance_crn": "crn:v1:public:event-notifications:us-south:a/2411ffdc16844b07a42521c3443f456d:14c58404-b332-4178-86de-83141a7f93af::",
        "updated_on": "2023-04-19T17:39:44.668Z",
        "source_id": "crn:v1:bluemix:public:compliance:global:a/2411ffdc16844b07a42521c3443f456d:::"
      },
      "object_storage": {
        "instance_crn": "crn:v1:public:cloud-object-storage:global:a/2411ffdc16844b07a42521c3443f456d:ecca7d23-77d0-4a9b-8a24-3b761c63a460::",
        "bucket": "scc-bucket",
        "bucket_location": "us-south",
        "bucket_endpoint": "s3.us.private.cloud-object-storage.test.appdomain.cloud",
        "updated_on": "2023-03-01T22:00:05.917Z"
      }
    }
  • {
      "status_code": 401,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "invalid_token",
          "message": "The token is either missing or invalid"
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "invalid_token",
          "message": "The token is either missing or invalid"
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "The request could not be authorized",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-admin"
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "The request could not be authorized",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-admin"
        }
      ]
    }
  • {
      "status_code": 404,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "not_found",
          "message": "The requested resource was not found\"",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-admin"
        }
      ]
    }
  • {
      "status_code": 404,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "not_found",
          "message": "The requested resource was not found\"",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-admin"
        }
      ]
    }

Update settings

Update the settings of your service instance.

Update the settings of your service instance.

Update the settings of your service instance.

Update the settings of your service instance.

Update the settings of your service instance.

PATCH /settings
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) UpdateSettings(updateSettingsOptions *UpdateSettingsOptions) (result *Settings, response *core.DetailedResponse, err error)
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) UpdateSettingsWithContext(ctx context.Context, updateSettingsOptions *UpdateSettingsOptions) (result *Settings, response *core.DetailedResponse, err error)
updateSettings(params)
update_settings(
        self,
        *,
        event_notifications: 'EventNotifications' = None,
        object_storage: 'ObjectStorage' = None,
        x_correlation_id: str = None,
        x_request_id: str = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<Settings> updateSettings(UpdateSettingsOptions updateSettingsOptions)

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • compliance.admin.settings-update

Auditing

Calling this method generates the following auditing event.

  • compliance.admin-settings.update

Request

Instantiate the UpdateSettingsOptions struct and set the fields to provide parameter values for the UpdateSettings method.

Use the UpdateSettingsOptions.Builder to create a UpdateSettingsOptions object that contains the parameter values for the updateSettings method.

Custom Headers

  • The supplied or generated value of this header is logged for a request, and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

    Example: 1a2b3c4d-5e6f-4a7b-8c9d-e0f1a2b3c4d5

  • The supplied or generated value of this header is logged for a request, and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

The request body to update your settings.

Examples:
View

WithContext method only

The UpdateSettings options.

parameters

  • The Event Notifications settings.

    Examples:
    View
  • The Cloud Object Storage settings.

    Examples:
    View
  • The supplied or generated value of this header is logged for a request, and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

    Examples:
    value
    _source
    _lines
    _html
  • The supplied or generated value of this header is logged for a request, and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

parameters

  • The Event Notifications settings.

    Examples:
    View
  • The Cloud Object Storage settings.

    Examples:
    View
  • The supplied or generated value of this header is logged for a request, and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

    Examples:
    value
    _source
    _lines
    _html
  • The supplied or generated value of this header is logged for a request, and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

The updateSettings options.

  • curl -X PATCH --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{ "event_notifications": { "instance_crn": "crn:v1:bluemix:public:event-notifications:us-south:a/ff88f007f9ff4622aac4fbc0eda36255:7199ae60-a214-4dd8-9bf7-ce571de49d01::", "source_name": "compliance", "source_description": "This source is used for integration with IBM Cloud Security and Compliance Center." }, "object_storage": { "instance_crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/ff88f007f9ff4622aac4fbc0eda36255:7199ae60-a214-4dd8-9bf7-ce571de49d01::", "bucket": "px-scan-results", "bucket_location": "us-south" } }'   "{base_url}/settings"
  • eventNotificationsModel := &securityandcompliancecenterapiv3.EventNotifications{
      InstanceCrn: &eventNotificationsCrnForUpdateSettingsLink,
      SourceDescription: core.StringPtr("This source is used for integration with IBM Cloud Security and Compliance Center."),
      SourceName: core.StringPtr("compliance"),
    }
    
    objectStorageModel := &securityandcompliancecenterapiv3.ObjectStorage{
      InstanceCrn: &objectStorageCrnForUpdateSettingsLink,
      Bucket: &objectStorageBucketForUpdateSettingsLink,
      BucketLocation: &objectStorageLocationForUpdateSettingsLink,
    }
    
    updateSettingsOptions := securityAndComplianceCenterApiService.NewUpdateSettingsOptions()
    updateSettingsOptions.SetEventNotifications(eventNotificationsModel)
    updateSettingsOptions.SetObjectStorage(objectStorageModel)
    updateSettingsOptions.SetXCorrelationID(xCorrelationIdLink)
    
    settings, response, err := securityAndComplianceCenterApiService.UpdateSettings(updateSettingsOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(settings, "", "  ")
    fmt.Println(string(b))
  • // Request models needed by this operation.
    
    // EventNotifications
    const eventNotificationsModel = {
      instance_crn: eventNotificationsCrnForUpdateSettingsLink,
      source_description: 'This source is used for integration with IBM Cloud Security and Compliance Center.',
      source_name: 'compliance',
    };
    
    // ObjectStorage
    const objectStorageModel = {
      instance_crn: objectStorageCrnForUpdateSettingsLink,
      bucket: objectStorageBucketForUpdateSettingsLink,
      bucket_location: objectStorageLocationForUpdateSettingsLink,
    };
    
    const params = {
      eventNotifications: eventNotificationsModel,
      objectStorage: objectStorageModel,
      xCorrelationId: xCorrelationIdLink,
    };
    
    let res;
    try {
      res = await securityAndComplianceCenterApiService.updateSettings(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • event_notifications_model = {
      'instance_crn': event_notifications_crn_for_update_settings_link,
      'source_description': 'This source is used for integration with IBM Cloud Security and Compliance Center.',
      'source_name': 'compliance',
    }
    
    object_storage_model = {
      'instance_crn': object_storage_crn_for_update_settings_link,
      'bucket': object_storage_bucket_for_update_settings_link,
      'bucket_location': object_storage_location_for_update_settings_link,
    }
    
    response = security_and_compliance_center_api_service.update_settings(
      event_notifications=event_notifications_model,
      object_storage=object_storage_model,
      x_correlation_id=x_correlation_id_link,
    )
    settings = response.get_result()
    
    print(json.dumps(settings, indent=2))
  • EventNotifications eventNotificationsModel = new EventNotifications.Builder()
      .instanceCrn(eventNotificationsCrnForUpdateSettingsLink)
      .sourceDescription("This source is used for integration with IBM Cloud Security and Compliance Center.")
      .sourceName("compliance")
      .build();
    ObjectStorage objectStorageModel = new ObjectStorage.Builder()
      .instanceCrn(objectStorageCrnForUpdateSettingsLink)
      .bucket(objectStorageBucketForUpdateSettingsLink)
      .bucketLocation(objectStorageLocationForUpdateSettingsLink)
      .build();
    UpdateSettingsOptions updateSettingsOptions = new UpdateSettingsOptions.Builder()
      .eventNotifications(eventNotificationsModel)
      .objectStorage(objectStorageModel)
      .xCorrelationId(xCorrelationIdLink)
      .build();
    
    Response<Settings> response = securityAndComplianceCenterApiService.updateSettings(updateSettingsOptions).execute();
    Settings settings = response.getResult();
    
    System.out.println(settings);

Response

The settings.

The settings.

Examples:
View

The settings.

Examples:
View

The settings.

Examples:
View

The settings.

Examples:
View

Status Code

  • The settings were successfully updated.

  • The settings were not changed. No content is provided.

  • The server cannot process the request.

  • You are not authorized to make this request.

  • You are not allowed to make this request.

  • The specified resource was not found.

Example responses
  • {
      "event_notifications": {
        "instance_crn": "crn:v1:bluemix:public:event-notifications:us-south:a/130003ea8bfa43c5aacea07a86da3000:1c858449-3537-45b8-9d39-2707115b4cc7::",
        "updated_on": "2023-04-19T17:39:44.668Z",
        "source_id": "crn:v1:bluemix:public:compliance:global:a/130003ea8bfa43c5aacea07a86da3000:::"
      },
      "object_storage": {
        "instance_crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/130003ea8bfa43c5aacea07a86da3000:1c858449-3537-45b8-9d39-2707115b4cc7::",
        "bucket": "scc-bucket",
        "bucket_location": "us-south",
        "bucket_endpoint": "s3.us.private.cloud-object-storage.test.appdomain.cloud",
        "updated_on": "2023-03-01T22:00:05.917Z"
      }
    }
  • {
      "event_notifications": {
        "instance_crn": "crn:v1:bluemix:public:event-notifications:us-south:a/130003ea8bfa43c5aacea07a86da3000:1c858449-3537-45b8-9d39-2707115b4cc7::",
        "updated_on": "2023-04-19T17:39:44.668Z",
        "source_id": "crn:v1:bluemix:public:compliance:global:a/130003ea8bfa43c5aacea07a86da3000:::"
      },
      "object_storage": {
        "instance_crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/130003ea8bfa43c5aacea07a86da3000:1c858449-3537-45b8-9d39-2707115b4cc7::",
        "bucket": "scc-bucket",
        "bucket_location": "us-south",
        "bucket_endpoint": "s3.us.private.cloud-object-storage.test.appdomain.cloud",
        "updated_on": "2023-03-01T22:00:05.917Z"
      }
    }
  • {
      "status_code": 400,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "bad_request",
          "message": "malformed request body: missing Event Notifications instance CRN, or Cloud Object Storage instance CRN",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-admin",
          "ref": "ADM22001"
        }
      ]
    }
  • {
      "status_code": 400,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "bad_request",
          "message": "malformed request body: missing Event Notifications instance CRN, or Cloud Object Storage instance CRN",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-admin",
          "ref": "ADM22001"
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "invalid_token",
          "message": "The token is either missing or invalid"
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "invalid_token",
          "message": "The token is either missing or invalid"
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "The request could not be authorized",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-admin"
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "The request could not be authorized",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-admin"
        }
      ]
    }
  • {
      "status_code": 404,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "not_found",
          "message": "The requested resource was not found\"",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-admin"
        }
      ]
    }
  • {
      "status_code": 404,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "not_found",
          "message": "The requested resource was not found\"",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-admin"
        }
      ]
    }

Create a test event

Send a test event to your Event Notifications instance to ensure that the events that are generated by Security and Compliance Center are being forwarded to Event Notifications. For more information, see Enabling event notifications.

Send a test event to your Event Notifications instance to ensure that the events that are generated by Security and Compliance Center are being forwarded to Event Notifications. For more information, see Enabling event notifications.

Send a test event to your Event Notifications instance to ensure that the events that are generated by Security and Compliance Center are being forwarded to Event Notifications. For more information, see Enabling event notifications.

Send a test event to your Event Notifications instance to ensure that the events that are generated by Security and Compliance Center are being forwarded to Event Notifications. For more information, see Enabling event notifications.

Send a test event to your Event Notifications instance to ensure that the events that are generated by Security and Compliance Center are being forwarded to Event Notifications. For more information, see Enabling event notifications.

POST /test_event
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) PostTestEvent(postTestEventOptions *PostTestEventOptions) (result *TestEvent, response *core.DetailedResponse, err error)
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) PostTestEventWithContext(ctx context.Context, postTestEventOptions *PostTestEventOptions) (result *TestEvent, response *core.DetailedResponse, err error)
postTestEvent(params)
post_test_event(
        self,
        *,
        x_correlation_id: str = None,
        x_request_id: str = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<TestEvent> postTestEvent(PostTestEventOptions postTestEventOptions)

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • compliance.admin.test-event-send

Auditing

Calling this method generates the following auditing event.

  • compliance.admin-test-event.send

Request

Instantiate the PostTestEventOptions struct and set the fields to provide parameter values for the PostTestEvent method.

Use the PostTestEventOptions.Builder to create a PostTestEventOptions object that contains the parameter values for the postTestEvent method.

Custom Headers

  • The supplied or generated value of this header is logged for a request, and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

    Example: 1a2b3c4d-5e6f-4a7b-8c9d-e0f1a2b3c4d5

  • The supplied or generated value of this header is logged for a request, and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

WithContext method only

The PostTestEvent options.

parameters

  • The supplied or generated value of this header is logged for a request, and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

    Examples:
    value
    _source
    _lines
    _html
  • The supplied or generated value of this header is logged for a request, and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

parameters

  • The supplied or generated value of this header is logged for a request, and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

    Examples:
    value
    _source
    _lines
    _html
  • The supplied or generated value of this header is logged for a request, and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

The postTestEvent options.

  • curl -X POST --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/test_event"
  • postTestEventOptions := securityAndComplianceCenterApiService.NewPostTestEventOptions()
    postTestEventOptions.SetXCorrelationID(xCorrelationIdLink)
    
    testEvent, response, err := securityAndComplianceCenterApiService.PostTestEvent(postTestEventOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(testEvent, "", "  ")
    fmt.Println(string(b))
  • const params = {
      xCorrelationId: xCorrelationIdLink,
    };
    
    let res;
    try {
      res = await securityAndComplianceCenterApiService.postTestEvent(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • response = security_and_compliance_center_api_service.post_test_event(
      x_correlation_id=x_correlation_id_link,
    )
    test_event = response.get_result()
    
    print(json.dumps(test_event, indent=2))
  • PostTestEventOptions postTestEventOptions = new PostTestEventOptions.Builder()
      .xCorrelationId(xCorrelationIdLink)
      .build();
    
    Response<TestEvent> response = securityAndComplianceCenterApiService.postTestEvent(postTestEventOptions).execute();
    TestEvent testEvent = response.getResult();
    
    System.out.println(testEvent);

Response

The details of a test event response.

The details of a test event response.

Examples:
View

The details of a test event response.

Examples:
View

The details of a test event response.

Examples:
View

The details of a test event response.

Examples:
View

Status Code

  • The event was successfully sent to your Event Notifications instance.

  • You are not authorized to make this request.

  • You are not allowed to make this request.

  • The specified resource was not found.

Example responses
  • {
      "success": true
    }
  • {
      "success": true
    }
  • {
      "status_code": 401,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "invalid_token",
          "message": "The token is either missing or invalid"
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "invalid_token",
          "message": "The token is either missing or invalid"
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "The request could not be authorized",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-admin"
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "The request could not be authorized",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-admin"
        }
      ]
    }
  • {
      "status_code": 404,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "not_found",
          "message": "The requested resource was not found\"",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-admin"
        }
      ]
    }
  • {
      "status_code": 404,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "not_found",
          "message": "The requested resource was not found\"",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-admin"
        }
      ]
    }

List control libraries

Retrieve all of the control libraries that are available in your account, including predefined, and custom libraries.

With Security and Compliance Center, you can create a custom control library that is specific to your organization's needs. You define the controls and specifications before you map previously created assessments. Each control has several specifications and assessments that are mapped to it. A specification is a defined requirement that is specific to a component. An assessment, or several, are mapped to each specification with a detailed evaluation that is done to check whether the specification is compliant. For more information, see Creating custom libraries.

Retrieve all of the control libraries that are available in your account, including predefined, and custom libraries.

With Security and Compliance Center, you can create a custom control library that is specific to your organization's needs. You define the controls and specifications before you map previously created assessments. Each control has several specifications and assessments that are mapped to it. A specification is a defined requirement that is specific to a component. An assessment, or several, are mapped to each specification with a detailed evaluation that is done to check whether the specification is compliant. For more information, see Creating custom libraries.

Retrieve all of the control libraries that are available in your account, including predefined, and custom libraries.

With Security and Compliance Center, you can create a custom control library that is specific to your organization's needs. You define the controls and specifications before you map previously created assessments. Each control has several specifications and assessments that are mapped to it. A specification is a defined requirement that is specific to a component. An assessment, or several, are mapped to each specification with a detailed evaluation that is done to check whether the specification is compliant. For more information, see Creating custom libraries.

Retrieve all of the control libraries that are available in your account, including predefined, and custom libraries.

With Security and Compliance Center, you can create a custom control library that is specific to your organization's needs. You define the controls and specifications before you map previously created assessments. Each control has several specifications and assessments that are mapped to it. A specification is a defined requirement that is specific to a component. An assessment, or several, are mapped to each specification with a detailed evaluation that is done to check whether the specification is compliant. For more information, see Creating custom libraries.

Retrieve all of the control libraries that are available in your account, including predefined, and custom libraries.

With Security and Compliance Center, you can create a custom control library that is specific to your organization's needs. You define the controls and specifications before you map previously created assessments. Each control has several specifications and assessments that are mapped to it. A specification is a defined requirement that is specific to a component. An assessment, or several, are mapped to each specification with a detailed evaluation that is done to check whether the specification is compliant. For more information, see Creating custom libraries.

GET /control_libraries
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) ListControlLibraries(listControlLibrariesOptions *ListControlLibrariesOptions) (result *ControlLibraryCollection, response *core.DetailedResponse, err error)
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) ListControlLibrariesWithContext(ctx context.Context, listControlLibrariesOptions *ListControlLibrariesOptions) (result *ControlLibraryCollection, response *core.DetailedResponse, err error)
listControlLibraries(params)
list_control_libraries(
        self,
        *,
        x_correlation_id: str = None,
        x_request_id: str = None,
        limit: int = None,
        control_library_type: str = None,
        start: str = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<ControlLibraryCollection> listControlLibraries(ListControlLibrariesOptions listControlLibrariesOptions)

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • compliance.posture-management.control-libraries-read

Auditing

Calling this method generates the following auditing event.

  • compliance.posture-management-control-libraries.list

Request

Instantiate the ListControlLibrariesOptions struct and set the fields to provide parameter values for the ListControlLibraries method.

Use the ListControlLibrariesOptions.Builder to create a ListControlLibrariesOptions object that contains the parameter values for the listControlLibraries method.

Custom Headers

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

Query Parameters

  • The field that indicates how many resources to return, unless the response is the last page of resources.

    Possible values: 0 ≤ value ≤ 100

    Default: 50

    Example: 50

  • The field that indicate how you want the resources to be filtered by.

    Possible values: 6 ≤ length ≤ 10, Value must match regular expression custom|predefined

    Example: custom

  • Determine what resource to start the page on or after.

    Possible values: 0 ≤ length ≤ 1024, Value must match regular expression .*

WithContext method only

The ListControlLibraries options.

parameters

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The field that indicates how many resources to return, unless the response is the last page of resources.

    Possible values: 0 ≤ value ≤ 100

    Default: 50

    Examples:
    value
    _source
    _lines
    _html
  • The field that indicate how you want the resources to be filtered by.

    Possible values: 6 ≤ length ≤ 10, Value must match regular expression /custom|predefined/

    Examples:
    value
    _source
    _lines
    _html
  • Determine what resource to start the page on or after.

    Possible values: 0 ≤ length ≤ 1024, Value must match regular expression /.*/

parameters

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The field that indicates how many resources to return, unless the response is the last page of resources.

    Possible values: 0 ≤ value ≤ 100

    Default: 50

    Examples:
    value
    _source
    _lines
    _html
  • The field that indicate how you want the resources to be filtered by.

    Possible values: 6 ≤ length ≤ 10, Value must match regular expression /custom|predefined/

    Examples:
    value
    _source
    _lines
    _html
  • Determine what resource to start the page on or after.

    Possible values: 0 ≤ length ≤ 1024, Value must match regular expression /.*/

The listControlLibraries options.

  • curl -X GET --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/control_libraries?limit=50&control_library_type=custom"
  • listControlLibrariesOptions := &securityandcompliancecenterapiv3.ListControlLibrariesOptions{
      XCorrelationID: core.StringPtr("testString"),
      XRequestID: core.StringPtr("testString"),
      Limit: core.Int64Ptr(int64(50)),
      ControlLibraryType: core.StringPtr("custom"),
    }
    
    pager, err := securityAndComplianceCenterApiService.NewControlLibrariesPager(listControlLibrariesOptions)
    if err != nil {
      panic(err)
    }
    
    var allResults []securityandcompliancecenterapiv3.ControlLibraryItem
    for pager.HasNext() {
      nextPage, err := pager.GetNext()
      if err != nil {
        panic(err)
      }
      allResults = append(allResults, nextPage...)
    }
    b, _ := json.MarshalIndent(allResults, "", "  ")
    fmt.Println(string(b))
  • const params = {
      xCorrelationId: 'testString',
      xRequestId: 'testString',
      limit: 50,
      controlLibraryType: 'custom',
    };
    
    const allResults = [];
    try {
      const pager = new SecurityAndComplianceCenterApiV3.ControlLibrariesPager(securityAndComplianceCenterApiService, params);
      while (pager.hasNext()) {
        const nextPage = await pager.getNext();
        expect(nextPage).not.toBeNull();
        allResults.push(...nextPage);
      }
      console.log(JSON.stringify(allResults, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • all_results = []
    pager = ControlLibrariesPager(
      client=security_and_compliance_center_api_service,
      x_correlation_id='testString',
      x_request_id='testString',
      limit=50,
      control_library_type='custom',
    )
    while pager.has_next():
      next_page = pager.get_next()
      assert next_page is not None
      all_results.extend(next_page)
    
    print(json.dumps(all_results, indent=2))
  • ListControlLibrariesOptions listControlLibrariesOptions = new ListControlLibrariesOptions.Builder()
      .xCorrelationId("testString")
      .xRequestId("testString")
      .limit(Long.valueOf("50"))
      .controlLibraryType("custom")
      .build();
    
    ControlLibrariesPager pager = new ControlLibrariesPager(securityAndComplianceCenterApiService, listControlLibrariesOptions);
    List<ControlLibraryItem> allResults = new ArrayList<>();
    while (pager.hasNext()) {
      List<ControlLibraryItem> nextPage = pager.getNext();
      allResults.addAll(nextPage);
    }
    
    System.out.println(GsonSingleton.getGson().toJson(allResults));

Response

The response body of control libraries.

The response body of control libraries.

Examples:
View

The response body of control libraries.

Examples:
View

The response body of control libraries.

Examples:
View

The response body of control libraries.

Examples:
View

Status Code

  • The control libraries were successfully retrieved.

  • Your request is invalid.

  • Your request is unauthorized.

  • You are not allowed to access this resource.

  • The specified resource was not found.

  • Too many requests

  • Internal server error

  • A backend service that is required to complete the operation is unavailable. Try again later.

Example responses
  • {
      "limit": 25,
      "total_count": 1,
      "first": {
        "href": "https://us-east.compliance.cloud.ibm.com/instances/6d5v891d-1f45-60a5-5b55-6hh6a82f2680/v3/control_libraries?account_id=cg3335893hh1428692d6747cf300yeb5&limit=25"
      },
      "next": {
        "href": ""
      },
      "control_libraries": [
        {
          "id": "8271c6e3-12fb-4ae6-a05d-a64cfd2e838f",
          "account_id": "cg3335893hh1428692d6747cf300yeb5",
          "control_library_name": "IBM Cloud for Financial Services",
          "control_library_description": "IBM Cloud for Financial Services",
          "control_library_type": "custom",
          "version_group_label": "33fc7b80-0fa5-4f16-bbba-1f293f660f0d",
          "created_on": "2023-01-25T11:22:23.000Z",
          "created_by": "IBM Cloud",
          "updated_on": "2023-02-02T15:46:15.000Z",
          "updated_by": "IBM Cloud",
          "latest": true,
          "hierarchy_enabled": true,
          "controls_count": 1,
          "control_parents_count": 0
        }
      ]
    }
  • {
      "limit": 25,
      "total_count": 1,
      "first": {
        "href": "https://us-east.compliance.cloud.ibm.com/instances/6d5v891d-1f45-60a5-5b55-6hh6a82f2680/v3/control_libraries?account_id=cg3335893hh1428692d6747cf300yeb5&limit=25"
      },
      "next": {
        "href": ""
      },
      "control_libraries": [
        {
          "id": "8271c6e3-12fb-4ae6-a05d-a64cfd2e838f",
          "account_id": "cg3335893hh1428692d6747cf300yeb5",
          "control_library_name": "IBM Cloud for Financial Services",
          "control_library_description": "IBM Cloud for Financial Services",
          "control_library_type": "custom",
          "version_group_label": "33fc7b80-0fa5-4f16-bbba-1f293f660f0d",
          "created_on": "2023-01-25T11:22:23.000Z",
          "created_by": "IBM Cloud",
          "updated_on": "2023-02-02T15:46:15.000Z",
          "updated_by": "IBM Cloud",
          "latest": true,
          "hierarchy_enabled": true,
          "controls_count": 1,
          "control_parents_count": 0
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `attachment_id`s parameter is invalid.",
          "target": {
            "name": "attachment_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `attachment_id`s parameter is invalid.",
          "target": {
            "name": "attachment_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "You're not authorized to complete this request."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "You're not authorized to complete this request."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 404,
      "errors": [
        {
          "code": "attachment_not_found",
          "message": "The report for `attachment_id` '65810ac762004f22ac19f8f8edf70a34' is not found.",
          "target": {
            "name": "attachment_id",
            "type": "parameter",
            "value": "65810ac762004f22ac19f8f8edf70a34"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 404,
      "errors": [
        {
          "code": "attachment_not_found",
          "message": "The report for `attachment_id` '65810ac762004f22ac19f8f8edf70a34' is not found.",
          "target": {
            "name": "attachment_id",
            "type": "parameter",
            "value": "65810ac762004f22ac19f8f8edf70a34"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 500,
      "errors": [
        {
          "code": "internal_server_error",
          "message": "The server has encountered an unexpected internal error."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 500,
      "errors": [
        {
          "code": "internal_server_error",
          "message": "The server has encountered an unexpected internal error."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service that is required is unavailable. Try again later."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service that is required is unavailable. Try again later."
        }
      ]
    }

Create a custom control library

Create a custom control library that is specific to your organization's needs.

With Security and Compliance Center, you can create a custom control library that is specific to your organization's needs. You define the controls and specifications before you map previously created assessments. Each control has several specifications and assessments that are mapped to it. A specification is a defined requirement that is specific to a component. An assessment, or several, are mapped to each specification with a detailed evaluation that is done to check whether the specification is compliant. For more information, see Creating custom libraries.

Create a custom control library that is specific to your organization's needs.

With Security and Compliance Center, you can create a custom control library that is specific to your organization's needs. You define the controls and specifications before you map previously created assessments. Each control has several specifications and assessments that are mapped to it. A specification is a defined requirement that is specific to a component. An assessment, or several, are mapped to each specification with a detailed evaluation that is done to check whether the specification is compliant. For more information, see Creating custom libraries.

Create a custom control library that is specific to your organization's needs.

With Security and Compliance Center, you can create a custom control library that is specific to your organization's needs. You define the controls and specifications before you map previously created assessments. Each control has several specifications and assessments that are mapped to it. A specification is a defined requirement that is specific to a component. An assessment, or several, are mapped to each specification with a detailed evaluation that is done to check whether the specification is compliant. For more information, see Creating custom libraries.

Create a custom control library that is specific to your organization's needs.

With Security and Compliance Center, you can create a custom control library that is specific to your organization's needs. You define the controls and specifications before you map previously created assessments. Each control has several specifications and assessments that are mapped to it. A specification is a defined requirement that is specific to a component. An assessment, or several, are mapped to each specification with a detailed evaluation that is done to check whether the specification is compliant. For more information, see Creating custom libraries.

Create a custom control library that is specific to your organization's needs.

With Security and Compliance Center, you can create a custom control library that is specific to your organization's needs. You define the controls and specifications before you map previously created assessments. Each control has several specifications and assessments that are mapped to it. A specification is a defined requirement that is specific to a component. An assessment, or several, are mapped to each specification with a detailed evaluation that is done to check whether the specification is compliant. For more information, see Creating custom libraries.

POST /control_libraries
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) CreateCustomControlLibrary(createCustomControlLibraryOptions *CreateCustomControlLibraryOptions) (result *ControlLibrary, response *core.DetailedResponse, err error)
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) CreateCustomControlLibraryWithContext(ctx context.Context, createCustomControlLibraryOptions *CreateCustomControlLibraryOptions) (result *ControlLibrary, response *core.DetailedResponse, err error)
createCustomControlLibrary(params)
create_custom_control_library(
        self,
        control_library_name: str,
        control_library_description: str,
        control_library_type: str,
        controls: List['ControlsInControlLib'],
        *,
        version_group_label: str = None,
        control_library_version: str = None,
        latest: bool = None,
        controls_count: int = None,
        x_correlation_id: str = None,
        x_request_id: str = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<ControlLibrary> createCustomControlLibrary(CreateCustomControlLibraryOptions createCustomControlLibraryOptions)

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • compliance.posture-management.control-libraries-create

Auditing

Calling this method generates the following auditing event.

  • compliance.posture-management-control-libraries.create

Request

Instantiate the CreateCustomControlLibraryOptions struct and set the fields to provide parameter values for the CreateCustomControlLibrary method.

Use the CreateCustomControlLibraryOptions.Builder to create a CreateCustomControlLibraryOptions object that contains the parameter values for the createCustomControlLibrary method.

Custom Headers

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

The request body to create a custom control library.

Examples:
View

WithContext method only

The CreateCustomControlLibrary options.

parameters

  • The control library name.

    Possible values: 2 ≤ length ≤ 64, Value must match regular expression /^[a-zA-Z0-9_\\s\\-]*$/

    Examples:
    value
    _source
    _lines
    _html
  • The control library description.

    Possible values: 2 ≤ length ≤ 256, Value must match regular expression /[A-Za-z0-9]+/

    Examples:
    value
    _source
    _lines
    _html
  • The control library type.

    Allowable values: [predefined,custom]

    Examples:
    value
    _source
    _lines
    _html
  • The controls.

    Possible values: 0 ≤ number of items ≤ 1200

    Examples:
    value
    _source
    _lines
    _html
  • The version group label.

    Possible values: length = 36, Value must match regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/

    Examples:
    value
    _source
    _lines
    _html
  • The control library version.

    Possible values: 5 ≤ length ≤ 64, Value must match regular expression /^[a-zA-Z0-9_\\-.]*$/

    Examples:
    value
    _source
    _lines
    _html
  • The latest control library version.

  • The number of controls.

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

parameters

  • The control library name.

    Possible values: 2 ≤ length ≤ 64, Value must match regular expression /^[a-zA-Z0-9_\\s\\-]*$/

    Examples:
    value
    _source
    _lines
    _html
  • The control library description.

    Possible values: 2 ≤ length ≤ 256, Value must match regular expression /[A-Za-z0-9]+/

    Examples:
    value
    _source
    _lines
    _html
  • The control library type.

    Allowable values: [predefined,custom]

    Examples:
    value
    _source
    _lines
    _html
  • The controls.

    Possible values: 0 ≤ number of items ≤ 1200

    Examples:
    value
    _source
    _lines
    _html
  • The version group label.

    Possible values: length = 36, Value must match regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/

    Examples:
    value
    _source
    _lines
    _html
  • The control library version.

    Possible values: 5 ≤ length ≤ 64, Value must match regular expression /^[a-zA-Z0-9_\\-.]*$/

    Examples:
    value
    _source
    _lines
    _html
  • The latest control library version.

  • The number of controls.

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

The createCustomControlLibrary options.

  • curl -X POST --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{ "control_library_name": "IBM Cloud for Financial Services", "control_library_description": "IBM Cloud for Financial Services", "control_library_type": "custom", "version_group_label": "33fc7b80-0fa5-4f16-bbba-1f293f660f0d", "control_library_version": "1.0.0", "controls": [ { "control_name": "SC-7", "control_id": "1fa45e17-9322-4e6c-bbd6-1c51db08e790", "control_description": "Boundary Protection", "control_category": "System and Communications Protection", "control_parent": "", "control_requirement": true, "control_tags": [ "1fa45e17-9322-4e6c-bbd6-1c51db08e790" ], "control_specifications_count": 1, "control_specifications": [ { "control_specification_id": "5c7d6f88-a92f-4734-9b49-bd22b0900184", "control_specification_description": "IBM cloud", "component_id": "iam-identity", "component_name": "IAM Identity Service", "environment": "ibm-cloud", "assessments": [ { "assessment_type": "automated", "assessment_method": "ibm-cloud-rule", "assessment_id": "rule-a637949b-7e51-46c4-afd4-b96619001bf1", "assessment_description": "Check that there is an Activity Tracker event route defined to collect global events generated by IBM Cloud services", "parameters": [ { "parameter_name": "session_invalidation_in_seconds", "parameter_display_name": "Sign out due to inactivity in seconds", "parameter_type": "numeric" } ] } ] } ], "control_docs": { "control_docs_id": "sc-7", "control_docs_type": "ibm-cloud" } } ] }'   "{base_url}/control_libraries"
  • parameterInfoModel := &securityandcompliancecenterapiv3.ParameterInfo{
      ParameterName: core.StringPtr("session_invalidation_in_seconds"),
      ParameterDisplayName: core.StringPtr("Sign out due to inactivity in seconds"),
      ParameterType: core.StringPtr("numeric"),
    }
    
    implementationModel := &securityandcompliancecenterapiv3.Implementation{
      AssessmentID: core.StringPtr("rule-a637949b-7e51-46c4-afd4-b96619001bf1"),
      AssessmentMethod: core.StringPtr("ibm-cloud-rule"),
      AssessmentType: core.StringPtr("automated"),
      AssessmentDescription: core.StringPtr("Check that there is an Activity Tracker event route defined to collect global events generated by IBM Cloud services"),
      Parameters: []securityandcompliancecenterapiv3.ParameterInfo{*parameterInfoModel},
    }
    
    controlSpecificationsModel := &securityandcompliancecenterapiv3.ControlSpecifications{
      ControlSpecificationID: core.StringPtr("5c7d6f88-a92f-4734-9b49-bd22b0900184"),
      ComponentID: core.StringPtr("iam-identity"),
      ComponentName: core.StringPtr("IAM Identity Service"),
      Environment: core.StringPtr("ibm-cloud"),
      ControlSpecificationDescription: core.StringPtr("IBM cloud"),
      Assessments: []securityandcompliancecenterapiv3.Implementation{*implementationModel},
    }
    
    controlDocsModel := &securityandcompliancecenterapiv3.ControlDocs{
      ControlDocsID: core.StringPtr("sc-7"),
      ControlDocsType: core.StringPtr("ibm-cloud"),
    }
    
    controlsInControlLibModel := &securityandcompliancecenterapiv3.ControlsInControlLib{
      ControlName: core.StringPtr("SC-7"),
      ControlID: core.StringPtr("1fa45e17-9322-4e6c-bbd6-1c51db08e790"),
      ControlDescription: core.StringPtr("Boundary Protection"),
      ControlCategory: core.StringPtr("System and Communications Protection"),
      ControlTags: []string{"1fa45e17-9322-4e6c-bbd6-1c51db08e790"},
      ControlSpecifications: []securityandcompliancecenterapiv3.ControlSpecifications{*controlSpecificationsModel},
      ControlDocs: controlDocsModel,
      ControlRequirement: core.BoolPtr(true),
    }
    
    createCustomControlLibraryOptions := securityAndComplianceCenterApiService.NewCreateCustomControlLibraryOptions(
      "IBM Cloud for Financial Services",
      "IBM Cloud for Financial Services",
      "custom",
      []securityandcompliancecenterapiv3.ControlsInControlLib{*controlsInControlLibModel},
    )
    createCustomControlLibraryOptions.SetVersionGroupLabel("33fc7b80-0fa5-4f16-bbba-1f293f660f0d")
    createCustomControlLibraryOptions.SetControlLibraryVersion("1.0.0")
    
    controlLibrary, response, err := securityAndComplianceCenterApiService.CreateCustomControlLibrary(createCustomControlLibraryOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(controlLibrary, "", "  ")
    fmt.Println(string(b))
  • // Request models needed by this operation.
    
    // ParameterInfo
    const parameterInfoModel = {
      parameter_name: 'session_invalidation_in_seconds',
      parameter_display_name: 'Sign out due to inactivity in seconds',
      parameter_type: 'numeric',
    };
    
    // Implementation
    const implementationModel = {
      assessment_id: 'rule-a637949b-7e51-46c4-afd4-b96619001bf1',
      assessment_method: 'ibm-cloud-rule',
      assessment_type: 'automated',
      assessment_description: 'Check that there is an Activity Tracker event route defined to collect global events generated by IBM Cloud services',
      parameters: [parameterInfoModel],
    };
    
    // ControlSpecifications
    const controlSpecificationsModel = {
      control_specification_id: '5c7d6f88-a92f-4734-9b49-bd22b0900184',
      component_id: 'iam-identity',
      component_name: 'IAM Identity Service',
      environment: 'ibm-cloud',
      control_specification_description: 'IBM cloud',
      assessments: [implementationModel],
    };
    
    // ControlDocs
    const controlDocsModel = {
      control_docs_id: 'sc-7',
      control_docs_type: 'ibm-cloud',
    };
    
    // ControlsInControlLib
    const controlsInControlLibModel = {
      control_name: 'SC-7',
      control_id: '1fa45e17-9322-4e6c-bbd6-1c51db08e790',
      control_description: 'Boundary Protection',
      control_category: 'System and Communications Protection',
      control_parent: 'testString',
      control_tags: ['1fa45e17-9322-4e6c-bbd6-1c51db08e790'],
      control_specifications: [controlSpecificationsModel],
      control_docs: controlDocsModel,
      control_requirement: true,
    };
    
    const params = {
      controlLibraryName: 'IBM Cloud for Financial Services',
      controlLibraryDescription: 'IBM Cloud for Financial Services',
      controlLibraryType: 'custom',
      controls: [controlsInControlLibModel],
      versionGroupLabel: '33fc7b80-0fa5-4f16-bbba-1f293f660f0d',
      controlLibraryVersion: '1.0.0',
    };
    
    let res;
    try {
      res = await securityAndComplianceCenterApiService.createCustomControlLibrary(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • parameter_info_model = {
      'parameter_name': 'session_invalidation_in_seconds',
      'parameter_display_name': 'Sign out due to inactivity in seconds',
      'parameter_type': 'numeric',
    }
    
    implementation_model = {
      'assessment_id': 'rule-a637949b-7e51-46c4-afd4-b96619001bf1',
      'assessment_method': 'ibm-cloud-rule',
      'assessment_type': 'automated',
      'assessment_description': 'Check that there is an Activity Tracker event route defined to collect global events generated by IBM Cloud services',
      'parameters': [parameter_info_model],
    }
    
    control_specifications_model = {
      'control_specification_id': '5c7d6f88-a92f-4734-9b49-bd22b0900184',
      'component_id': 'iam-identity',
      'component_name': 'IAM Identity Service',
      'environment': 'ibm-cloud',
      'control_specification_description': 'IBM cloud',
      'assessments': [implementation_model],
    }
    
    control_docs_model = {
      'control_docs_id': 'sc-7',
      'control_docs_type': 'ibm-cloud',
    }
    
    controls_in_control_lib_model = {
      'control_name': 'SC-7',
      'control_id': '1fa45e17-9322-4e6c-bbd6-1c51db08e790',
      'control_description': 'Boundary Protection',
      'control_category': 'System and Communications Protection',
      'control_parent': 'testString',
      'control_tags': ['1fa45e17-9322-4e6c-bbd6-1c51db08e790'],
      'control_specifications': [control_specifications_model],
      'control_docs': control_docs_model,
      'control_requirement': True,
    }
    
    response = security_and_compliance_center_api_service.create_custom_control_library(
      control_library_name='IBM Cloud for Financial Services',
      control_library_description='IBM Cloud for Financial Services',
      control_library_type='custom',
      controls=[controls_in_control_lib_model],
      version_group_label='33fc7b80-0fa5-4f16-bbba-1f293f660f0d',
      control_library_version='1.0.0',
    )
    control_library = response.get_result()
    
    print(json.dumps(control_library, indent=2))
  • ParameterInfo parameterInfoModel = new ParameterInfo.Builder()
      .parameterName("session_invalidation_in_seconds")
      .parameterDisplayName("Sign out due to inactivity in seconds")
      .parameterType("numeric")
      .build();
    Implementation implementationModel = new Implementation.Builder()
      .assessmentId("rule-a637949b-7e51-46c4-afd4-b96619001bf1")
      .assessmentMethod("ibm-cloud-rule")
      .assessmentType("automated")
      .assessmentDescription("Check that there is an Activity Tracker event route defined to collect global events generated by IBM Cloud services")
      .parameters(java.util.Arrays.asList(parameterInfoModel))
      .build();
    ControlSpecifications controlSpecificationsModel = new ControlSpecifications.Builder()
      .controlSpecificationId("5c7d6f88-a92f-4734-9b49-bd22b0900184")
      .componentId("iam-identity")
      .componentName("IAM Identity Service")
      .environment("ibm-cloud")
      .controlSpecificationDescription("IBM cloud")
      .assessments(java.util.Arrays.asList(implementationModel))
      .build();
    ControlDocs controlDocsModel = new ControlDocs.Builder()
      .controlDocsId("sc-7")
      .controlDocsType("ibm-cloud")
      .build();
    ControlsInControlLib controlsInControlLibModel = new ControlsInControlLib.Builder()
      .controlName("SC-7")
      .controlId("1fa45e17-9322-4e6c-bbd6-1c51db08e790")
      .controlDescription("Boundary Protection")
      .controlCategory("System and Communications Protection")
      .controlTags(java.util.Arrays.asList("1fa45e17-9322-4e6c-bbd6-1c51db08e790"))
      .controlSpecifications(java.util.Arrays.asList(controlSpecificationsModel))
      .controlDocs(controlDocsModel)
      .controlRequirement(true)
      .build();
    CreateCustomControlLibraryOptions createCustomControlLibraryOptions = new CreateCustomControlLibraryOptions.Builder()
      .controlLibraryName("IBM Cloud for Financial Services")
      .controlLibraryDescription("IBM Cloud for Financial Services")
      .controlLibraryType("custom")
      .controls(java.util.Arrays.asList(controlsInControlLibModel))
      .versionGroupLabel("33fc7b80-0fa5-4f16-bbba-1f293f660f0d")
      .controlLibraryVersion("1.0.0")
      .build();
    
    Response<ControlLibrary> response = securityAndComplianceCenterApiService.createCustomControlLibrary(createCustomControlLibraryOptions).execute();
    ControlLibrary controlLibrary = response.getResult();
    
    System.out.println(controlLibrary);

Response

The request payload of the control library.

The request payload of the control library.

Examples:
View

The request payload of the control library.

Examples:
View

The request payload of the control library.

Examples:
View

The request payload of the control library.

Examples:
View

Status Code

  • The control library was created successfully.

  • Your request is invalid.

  • Your request is unauthorized.

  • You are not allowed to access this resource.

  • The specified resource was not found.

  • Too many requests

  • Internal server error

  • A backend service that is required to complete the operation is unavailable. Try again later.

Example responses
  • {
      "id": "60351ac6-2dba-495e-9c98-057601069723",
      "account_id": "cg3335893hh1428692d6747cf300yeb5",
      "control_library_name": "IBM Cloud for Financial Services",
      "control_library_description": "IBM Cloud for Financial Services",
      "control_library_type": "custom",
      "version_group_label": "33fc7b80-0fa5-4f16-bbba-1f293f660f0d",
      "control_library_version": "1.1.0",
      "created_on": "2023-01-25T11:22:23.000Z",
      "created_by": "IBM Cloud",
      "updated_on": "2023-02-02T15:46:15.000Z",
      "updated_by": "IBM Cloud",
      "latest": true,
      "hierarchy_enabled": false,
      "controls_count": 1,
      "control_parents_count": 0,
      "controls": [
        {
          "control_name": "SC-7",
          "control_id": "1fa45e17-9322-4e6c-bbd6-1c51db08e790",
          "control_description": "Boundary Protection",
          "control_category": "System and Communications Protection",
          "control_parent": "SC",
          "control_requirement": true,
          "control_tags": [
            "1fa45e17-9322-4e6c-bbd6-1c51db08e790"
          ],
          "control_specifications_count": 1,
          "control_specifications": [
            {
              "control_specification_id": "5c7d6f88-a92f-4734-9b49-bd22b0900184",
              "responsibility": "user",
              "component_id": "iam-identity",
              "component_name": "IAM Identity Service",
              "environment": "ibm-cloud",
              "control_specification_description": "IBM cloud",
              "assessments": [
                {
                  "assessment_type": "automated",
                  "assessment_method": "ibm-cloud-rule",
                  "assessment_id": "rule-a637949b-7e51-46c4-afd4-b96619001bf1",
                  "assessment_description": "Check that there is an Activity Tracker event route defined to collect global events generated by IBM Cloud services",
                  "parameters": [
                    {
                      "parameter_name": "session_invalidation_in_seconds",
                      "parameter_display_name": "Sign out due to inactivity in seconds",
                      "parameter_type": "numeric"
                    }
                  ]
                }
              ],
              "assessments_count": 1
            }
          ],
          "control_docs": {
            "control_docs_id": "sc-7",
            "control_docs_type": "ibm-cloud"
          },
          "status": "enabled"
        }
      ]
    }
  • {
      "id": "60351ac6-2dba-495e-9c98-057601069723",
      "account_id": "cg3335893hh1428692d6747cf300yeb5",
      "control_library_name": "IBM Cloud for Financial Services",
      "control_library_description": "IBM Cloud for Financial Services",
      "control_library_type": "custom",
      "version_group_label": "33fc7b80-0fa5-4f16-bbba-1f293f660f0d",
      "control_library_version": "1.1.0",
      "created_on": "2023-01-25T11:22:23.000Z",
      "created_by": "IBM Cloud",
      "updated_on": "2023-02-02T15:46:15.000Z",
      "updated_by": "IBM Cloud",
      "latest": true,
      "hierarchy_enabled": false,
      "controls_count": 1,
      "control_parents_count": 0,
      "controls": [
        {
          "control_name": "SC-7",
          "control_id": "1fa45e17-9322-4e6c-bbd6-1c51db08e790",
          "control_description": "Boundary Protection",
          "control_category": "System and Communications Protection",
          "control_parent": "SC",
          "control_requirement": true,
          "control_tags": [
            "1fa45e17-9322-4e6c-bbd6-1c51db08e790"
          ],
          "control_specifications_count": 1,
          "control_specifications": [
            {
              "control_specification_id": "5c7d6f88-a92f-4734-9b49-bd22b0900184",
              "responsibility": "user",
              "component_id": "iam-identity",
              "component_name": "IAM Identity Service",
              "environment": "ibm-cloud",
              "control_specification_description": "IBM cloud",
              "assessments": [
                {
                  "assessment_type": "automated",
                  "assessment_method": "ibm-cloud-rule",
                  "assessment_id": "rule-a637949b-7e51-46c4-afd4-b96619001bf1",
                  "assessment_description": "Check that there is an Activity Tracker event route defined to collect global events generated by IBM Cloud services",
                  "parameters": [
                    {
                      "parameter_name": "session_invalidation_in_seconds",
                      "parameter_display_name": "Sign out due to inactivity in seconds",
                      "parameter_type": "numeric"
                    }
                  ]
                }
              ],
              "assessments_count": 1
            }
          ],
          "control_docs": {
            "control_docs_id": "sc-7",
            "control_docs_type": "ibm-cloud"
          },
          "status": "enabled"
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `attachment_id`s parameter is invalid.",
          "target": {
            "name": "attachment_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `attachment_id`s parameter is invalid.",
          "target": {
            "name": "attachment_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "You're not authorized to complete this request."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "You're not authorized to complete this request."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 404,
      "errors": [
        {
          "code": "attachment_not_found",
          "message": "The report for `attachment_id` '65810ac762004f22ac19f8f8edf70a34' is not found.",
          "target": {
            "name": "attachment_id",
            "type": "parameter",
            "value": "65810ac762004f22ac19f8f8edf70a34"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 404,
      "errors": [
        {
          "code": "attachment_not_found",
          "message": "The report for `attachment_id` '65810ac762004f22ac19f8f8edf70a34' is not found.",
          "target": {
            "name": "attachment_id",
            "type": "parameter",
            "value": "65810ac762004f22ac19f8f8edf70a34"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 500,
      "errors": [
        {
          "code": "internal_server_error",
          "message": "The server has encountered an unexpected internal error."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 500,
      "errors": [
        {
          "code": "internal_server_error",
          "message": "The server has encountered an unexpected internal error."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service that is required is unavailable. Try again later."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service that is required is unavailable. Try again later."
        }
      ]
    }

Delete a control library

Delete a custom control library by providing the control library ID. You can find this ID by looking in the Security and Compliance Center UI.

With Security and Compliance Center, you can manage a custom control library that is specific to your organization's needs. Each control has several specifications and assessments that are mapped to it. For more information, see Creating custom libraries.

Delete a custom control library by providing the control library ID. You can find this ID by looking in the Security and Compliance Center UI.

With Security and Compliance Center, you can manage a custom control library that is specific to your organization's needs. Each control has several specifications and assessments that are mapped to it. For more information, see Creating custom libraries.

Delete a custom control library by providing the control library ID. You can find this ID by looking in the Security and Compliance Center UI.

With Security and Compliance Center, you can manage a custom control library that is specific to your organization's needs. Each control has several specifications and assessments that are mapped to it. For more information, see Creating custom libraries.

Delete a custom control library by providing the control library ID. You can find this ID by looking in the Security and Compliance Center UI.

With Security and Compliance Center, you can manage a custom control library that is specific to your organization's needs. Each control has several specifications and assessments that are mapped to it. For more information, see Creating custom libraries.

Delete a custom control library by providing the control library ID. You can find this ID by looking in the Security and Compliance Center UI.

With Security and Compliance Center, you can manage a custom control library that is specific to your organization's needs. Each control has several specifications and assessments that are mapped to it. For more information, see Creating custom libraries.

DELETE /control_libraries/{control_libraries_id}
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) DeleteCustomControlLibrary(deleteCustomControlLibraryOptions *DeleteCustomControlLibraryOptions) (result *ControlLibraryDelete, response *core.DetailedResponse, err error)
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) DeleteCustomControlLibraryWithContext(ctx context.Context, deleteCustomControlLibraryOptions *DeleteCustomControlLibraryOptions) (result *ControlLibraryDelete, response *core.DetailedResponse, err error)
deleteCustomControlLibrary(params)
delete_custom_control_library(
        self,
        control_libraries_id: str,
        *,
        x_correlation_id: str = None,
        x_request_id: str = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<ControlLibraryDelete> deleteCustomControlLibrary(DeleteCustomControlLibraryOptions deleteCustomControlLibraryOptions)

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • compliance.posture-management.control-libraries-delete

Auditing

Calling this method generates the following auditing event.

  • compliance.posture-management-control-libraries.delete

Request

Instantiate the DeleteCustomControlLibraryOptions struct and set the fields to provide parameter values for the DeleteCustomControlLibrary method.

Use the DeleteCustomControlLibraryOptions.Builder to create a DeleteCustomControlLibraryOptions object that contains the parameter values for the deleteCustomControlLibrary method.

Custom Headers

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

Path Parameters

  • The control library ID.

    Possible values: 1 ≤ length ≤ 256, Value must match regular expression ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$

WithContext method only

The DeleteCustomControlLibrary options.

parameters

  • The control library ID.

    Possible values: 1 ≤ length ≤ 256, Value must match regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

parameters

  • The control library ID.

    Possible values: 1 ≤ length ≤ 256, Value must match regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

The deleteCustomControlLibrary options.

  • curl -X DELETE --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/control_libraries/{control_libraries_id}"
  • deleteCustomControlLibraryOptions := securityAndComplianceCenterApiService.NewDeleteCustomControlLibraryOptions(
      controlLibraryIdLink,
    )
    
    controlLibraryDelete, response, err := securityAndComplianceCenterApiService.DeleteCustomControlLibrary(deleteCustomControlLibraryOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(controlLibraryDelete, "", "  ")
    fmt.Println(string(b))
  • const params = {
      controlLibrariesId: controlLibraryIdLink,
    };
    
    let res;
    try {
      res = await securityAndComplianceCenterApiService.deleteCustomControlLibrary(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • response = security_and_compliance_center_api_service.delete_custom_control_library(
      control_libraries_id=control_library_id_link,
    )
    control_library_delete = response.get_result()
    
    print(json.dumps(control_library_delete, indent=2))
  • DeleteCustomControlLibraryOptions deleteCustomControlLibraryOptions = new DeleteCustomControlLibraryOptions.Builder()
      .controlLibrariesId(controlLibraryIdLink)
      .build();
    
    Response<ControlLibraryDelete> response = securityAndComplianceCenterApiService.deleteCustomControlLibrary(deleteCustomControlLibraryOptions).execute();
    ControlLibraryDelete controlLibraryDelete = response.getResult();
    
    System.out.println(controlLibraryDelete);

Response

The response body of deleting of a control library.

The response body of deleting of a control library.

Examples:
View

The response body of deleting of a control library.

Examples:
View

The response body of deleting of a control library.

Examples:
View

The response body of deleting of a control library.

Examples:
View

Status Code

  • The control library was deleted successfully.

  • Your request is invalid.

  • Your request is unauthorized.

  • You are not allowed to access this resource.

  • The specified resource was not found.

  • Too many requests

  • Internal server error

  • A backend service that is required to complete the operation is unavailable. Try again later.

Example responses
  • {
      "deleted": "Control library with id : f3fa418d-7e22-48f1-91fa-9c716c860395"
    }
  • {
      "deleted": "Control library with id : f3fa418d-7e22-48f1-91fa-9c716c860395"
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `attachment_id`s parameter is invalid.",
          "target": {
            "name": "attachment_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `attachment_id`s parameter is invalid.",
          "target": {
            "name": "attachment_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "You're not authorized to complete this request."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "You're not authorized to complete this request."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 404,
      "errors": [
        {
          "code": "attachment_not_found",
          "message": "The report for `attachment_id` '65810ac762004f22ac19f8f8edf70a34' is not found.",
          "target": {
            "name": "attachment_id",
            "type": "parameter",
            "value": "65810ac762004f22ac19f8f8edf70a34"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 404,
      "errors": [
        {
          "code": "attachment_not_found",
          "message": "The report for `attachment_id` '65810ac762004f22ac19f8f8edf70a34' is not found.",
          "target": {
            "name": "attachment_id",
            "type": "parameter",
            "value": "65810ac762004f22ac19f8f8edf70a34"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 500,
      "errors": [
        {
          "code": "internal_server_error",
          "message": "The server has encountered an unexpected internal error."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 500,
      "errors": [
        {
          "code": "internal_server_error",
          "message": "The server has encountered an unexpected internal error."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service that is required is unavailable. Try again later."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service that is required is unavailable. Try again later."
        }
      ]
    }

Get a control library

View the details of a control library by specifying its ID.

With Security and Compliance Center, you can create a custom control library that is specific to your organization's needs. You define the controls and specifications before you map previously created assessments. Each control has several specifications and assessments that are mapped to it. A specification is a defined requirement that is specific to a component. An assessment, or several, are mapped to each specification with a detailed evaluation that is done to check whether the specification is compliant. For more information, see Creating custom libraries.

View the details of a control library by specifying its ID.

With Security and Compliance Center, you can create a custom control library that is specific to your organization's needs. You define the controls and specifications before you map previously created assessments. Each control has several specifications and assessments that are mapped to it. A specification is a defined requirement that is specific to a component. An assessment, or several, are mapped to each specification with a detailed evaluation that is done to check whether the specification is compliant. For more information, see Creating custom libraries.

View the details of a control library by specifying its ID.

With Security and Compliance Center, you can create a custom control library that is specific to your organization's needs. You define the controls and specifications before you map previously created assessments. Each control has several specifications and assessments that are mapped to it. A specification is a defined requirement that is specific to a component. An assessment, or several, are mapped to each specification with a detailed evaluation that is done to check whether the specification is compliant. For more information, see Creating custom libraries.

View the details of a control library by specifying its ID.

With Security and Compliance Center, you can create a custom control library that is specific to your organization's needs. You define the controls and specifications before you map previously created assessments. Each control has several specifications and assessments that are mapped to it. A specification is a defined requirement that is specific to a component. An assessment, or several, are mapped to each specification with a detailed evaluation that is done to check whether the specification is compliant. For more information, see Creating custom libraries.

View the details of a control library by specifying its ID.

With Security and Compliance Center, you can create a custom control library that is specific to your organization's needs. You define the controls and specifications before you map previously created assessments. Each control has several specifications and assessments that are mapped to it. A specification is a defined requirement that is specific to a component. An assessment, or several, are mapped to each specification with a detailed evaluation that is done to check whether the specification is compliant. For more information, see Creating custom libraries.

GET /control_libraries/{control_libraries_id}
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) GetControlLibrary(getControlLibraryOptions *GetControlLibraryOptions) (result *ControlLibrary, response *core.DetailedResponse, err error)
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) GetControlLibraryWithContext(ctx context.Context, getControlLibraryOptions *GetControlLibraryOptions) (result *ControlLibrary, response *core.DetailedResponse, err error)
getControlLibrary(params)
get_control_library(
        self,
        control_libraries_id: str,
        *,
        x_correlation_id: str = None,
        x_request_id: str = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<ControlLibrary> getControlLibrary(GetControlLibraryOptions getControlLibraryOptions)

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • compliance.posture-management.control-libraries-read

Auditing

Calling this method generates the following auditing event.

  • compliance.posture-management-control-libraries.read

Request

Instantiate the GetControlLibraryOptions struct and set the fields to provide parameter values for the GetControlLibrary method.

Use the GetControlLibraryOptions.Builder to create a GetControlLibraryOptions object that contains the parameter values for the getControlLibrary method.

Custom Headers

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

Path Parameters

  • The control library ID.

    Possible values: 1 ≤ length ≤ 256, Value must match regular expression ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$

WithContext method only

The GetControlLibrary options.

parameters

  • The control library ID.

    Possible values: 1 ≤ length ≤ 256, Value must match regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

parameters

  • The control library ID.

    Possible values: 1 ≤ length ≤ 256, Value must match regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

The getControlLibrary options.

  • curl -X GET --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/control_libraries/{control_libraries_id}"
  • getControlLibraryOptions := securityAndComplianceCenterApiService.NewGetControlLibraryOptions(
      controlLibraryIdLink,
    )
    
    controlLibrary, response, err := securityAndComplianceCenterApiService.GetControlLibrary(getControlLibraryOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(controlLibrary, "", "  ")
    fmt.Println(string(b))
  • const params = {
      controlLibrariesId: controlLibraryIdLink,
    };
    
    let res;
    try {
      res = await securityAndComplianceCenterApiService.getControlLibrary(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • response = security_and_compliance_center_api_service.get_control_library(
      control_libraries_id=control_library_id_link,
    )
    control_library = response.get_result()
    
    print(json.dumps(control_library, indent=2))
  • GetControlLibraryOptions getControlLibraryOptions = new GetControlLibraryOptions.Builder()
      .controlLibrariesId(controlLibraryIdLink)
      .build();
    
    Response<ControlLibrary> response = securityAndComplianceCenterApiService.getControlLibrary(getControlLibraryOptions).execute();
    ControlLibrary controlLibrary = response.getResult();
    
    System.out.println(controlLibrary);

Response

The request payload of the control library.

The request payload of the control library.

Examples:
View

The request payload of the control library.

Examples:
View

The request payload of the control library.

Examples:
View

The request payload of the control library.

Examples:
View

Status Code

  • The control library was retrieved successfully.

  • Your request is invalid.

  • Your request is unauthorized.

  • You are not allowed to access this resource.

  • The specified resource was not found.

  • Too many requests

  • Internal server error

  • A backend service that is required to complete the operation is unavailable. Try again later.

Example responses
  • {
      "id": "60351ac6-2dba-495e-9c98-057601069723",
      "account_id": "cg3335893hh1428692d6747cf300yeb5",
      "control_library_name": "IBM Cloud for Financial Services",
      "control_library_description": "The IBM Cloud for Financial Services control libraries.",
      "control_library_type": "custom",
      "version_group_label": "33fc7b80-0fa5-4f16-bbba-1f293f660f0d",
      "control_library_version": "1.1.0",
      "created_on": "2023-01-25T11:22:23.000Z",
      "created_by": "IBM Cloud",
      "updated_on": "2023-02-02T15:46:15.000Z",
      "updated_by": "IBM Cloud",
      "latest": true,
      "hierarchy_enabled": true,
      "controls_count": 1,
      "control_parents_count": 0,
      "controls": [
        {
          "control_name": "SC-7",
          "control_id": "1fa45e17-9322-4e6c-bbd6-1c51db08e790",
          "control_description": "Boundary Protection",
          "control_category": "System and Communications Protection",
          "control_parent": "",
          "control_requirement": true,
          "control_tags": [
            "1fa45e17-9322-4e6c-bbd6-1c51db08e790"
          ],
          "control_specifications_count": 1,
          "control_specifications": [
            {
              "control_specification_id": "5c7d6f88-a92f-4734-9b49-bd22b0900184",
              "responsibility": "user",
              "component_id": "iam-identity",
              "component_name": "IAM Identity Service",
              "environment": "ibm-cloud",
              "control_specification_description": "IBM cloud",
              "assessments": [
                {
                  "assessment_type": "automated",
                  "assessment_method": "ibm-cloud-rule",
                  "assessment_id": "rule-a637949b-7e51-46c4-afd4-b96619001bf1",
                  "assessment_description": "Check that there is an Activity Tracker event route defined to collect global events generated by IBM Cloud services",
                  "parameters": [
                    {
                      "parameter_name": "session_invalidation_in_seconds",
                      "parameter_display_name": "Sign out due to inactivity in seconds",
                      "parameter_type": "numeric"
                    }
                  ]
                }
              ],
              "assessments_count": 1
            }
          ],
          "control_docs": {
            "control_docs_id": "sc-7",
            "control_docs_type": "ibm-cloud"
          },
          "status": "enabled"
        }
      ]
    }
  • {
      "id": "60351ac6-2dba-495e-9c98-057601069723",
      "account_id": "cg3335893hh1428692d6747cf300yeb5",
      "control_library_name": "IBM Cloud for Financial Services",
      "control_library_description": "The IBM Cloud for Financial Services control libraries.",
      "control_library_type": "custom",
      "version_group_label": "33fc7b80-0fa5-4f16-bbba-1f293f660f0d",
      "control_library_version": "1.1.0",
      "created_on": "2023-01-25T11:22:23.000Z",
      "created_by": "IBM Cloud",
      "updated_on": "2023-02-02T15:46:15.000Z",
      "updated_by": "IBM Cloud",
      "latest": true,
      "hierarchy_enabled": true,
      "controls_count": 1,
      "control_parents_count": 0,
      "controls": [
        {
          "control_name": "SC-7",
          "control_id": "1fa45e17-9322-4e6c-bbd6-1c51db08e790",
          "control_description": "Boundary Protection",
          "control_category": "System and Communications Protection",
          "control_parent": "",
          "control_requirement": true,
          "control_tags": [
            "1fa45e17-9322-4e6c-bbd6-1c51db08e790"
          ],
          "control_specifications_count": 1,
          "control_specifications": [
            {
              "control_specification_id": "5c7d6f88-a92f-4734-9b49-bd22b0900184",
              "responsibility": "user",
              "component_id": "iam-identity",
              "component_name": "IAM Identity Service",
              "environment": "ibm-cloud",
              "control_specification_description": "IBM cloud",
              "assessments": [
                {
                  "assessment_type": "automated",
                  "assessment_method": "ibm-cloud-rule",
                  "assessment_id": "rule-a637949b-7e51-46c4-afd4-b96619001bf1",
                  "assessment_description": "Check that there is an Activity Tracker event route defined to collect global events generated by IBM Cloud services",
                  "parameters": [
                    {
                      "parameter_name": "session_invalidation_in_seconds",
                      "parameter_display_name": "Sign out due to inactivity in seconds",
                      "parameter_type": "numeric"
                    }
                  ]
                }
              ],
              "assessments_count": 1
            }
          ],
          "control_docs": {
            "control_docs_id": "sc-7",
            "control_docs_type": "ibm-cloud"
          },
          "status": "enabled"
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `attachment_id`s parameter is invalid.",
          "target": {
            "name": "attachment_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `attachment_id`s parameter is invalid.",
          "target": {
            "name": "attachment_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "You're not authorized to complete this request."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "You're not authorized to complete this request."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 404,
      "errors": [
        {
          "code": "attachment_not_found",
          "message": "The report for `attachment_id` '65810ac762004f22ac19f8f8edf70a34' is not found.",
          "target": {
            "name": "attachment_id",
            "type": "parameter",
            "value": "65810ac762004f22ac19f8f8edf70a34"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 404,
      "errors": [
        {
          "code": "attachment_not_found",
          "message": "The report for `attachment_id` '65810ac762004f22ac19f8f8edf70a34' is not found.",
          "target": {
            "name": "attachment_id",
            "type": "parameter",
            "value": "65810ac762004f22ac19f8f8edf70a34"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 500,
      "errors": [
        {
          "code": "internal_server_error",
          "message": "The server has encountered an unexpected internal error."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 500,
      "errors": [
        {
          "code": "internal_server_error",
          "message": "The server has encountered an unexpected internal error."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service that is required is unavailable. Try again later."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service that is required is unavailable. Try again later."
        }
      ]
    }

Update a control library

Update a custom control library by providing the control library ID. You can find this ID in the Security and Compliance Center UI.

With Security and Compliance Center, you can create and update a custom control library that is specific to your organization's needs. You define the controls and specifications before you map previously created assessments. Each control has several specifications and assessments that are mapped to it. For more information, see Creating custom libraries.

Update a custom control library by providing the control library ID. You can find this ID in the Security and Compliance Center UI.

With Security and Compliance Center, you can create and update a custom control library that is specific to your organization's needs. You define the controls and specifications before you map previously created assessments. Each control has several specifications and assessments that are mapped to it. For more information, see Creating custom libraries.

Update a custom control library by providing the control library ID. You can find this ID in the Security and Compliance Center UI.

With Security and Compliance Center, you can create and update a custom control library that is specific to your organization's needs. You define the controls and specifications before you map previously created assessments. Each control has several specifications and assessments that are mapped to it. For more information, see Creating custom libraries.

Update a custom control library by providing the control library ID. You can find this ID in the Security and Compliance Center UI.

With Security and Compliance Center, you can create and update a custom control library that is specific to your organization's needs. You define the controls and specifications before you map previously created assessments. Each control has several specifications and assessments that are mapped to it. For more information, see Creating custom libraries.

Update a custom control library by providing the control library ID. You can find this ID in the Security and Compliance Center UI.

With Security and Compliance Center, you can create and update a custom control library that is specific to your organization's needs. You define the controls and specifications before you map previously created assessments. Each control has several specifications and assessments that are mapped to it. For more information, see Creating custom libraries.

PUT /control_libraries/{control_libraries_id}
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) ReplaceCustomControlLibrary(replaceCustomControlLibraryOptions *ReplaceCustomControlLibraryOptions) (result *ControlLibrary, response *core.DetailedResponse, err error)
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) ReplaceCustomControlLibraryWithContext(ctx context.Context, replaceCustomControlLibraryOptions *ReplaceCustomControlLibraryOptions) (result *ControlLibrary, response *core.DetailedResponse, err error)
replaceCustomControlLibrary(params)
replace_custom_control_library(
        self,
        control_libraries_id: str,
        *,
        id: str = None,
        account_id: str = None,
        control_library_name: str = None,
        control_library_description: str = None,
        control_library_type: str = None,
        version_group_label: str = None,
        control_library_version: str = None,
        created_on: datetime = None,
        created_by: str = None,
        updated_on: datetime = None,
        updated_by: str = None,
        latest: bool = None,
        hierarchy_enabled: bool = None,
        controls_count: int = None,
        control_parents_count: int = None,
        controls: List['ControlsInControlLib'] = None,
        x_correlation_id: str = None,
        x_request_id: str = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<ControlLibrary> replaceCustomControlLibrary(ReplaceCustomControlLibraryOptions replaceCustomControlLibraryOptions)

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • compliance.posture-management.control-libraries-update

Auditing

Calling this method generates the following auditing event.

  • compliance.posture-management-control-libraries.update

Request

Instantiate the ReplaceCustomControlLibraryOptions struct and set the fields to provide parameter values for the ReplaceCustomControlLibrary method.

Use the ReplaceCustomControlLibraryOptions.Builder to create a ReplaceCustomControlLibraryOptions object that contains the parameter values for the replaceCustomControlLibrary method.

Custom Headers

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

Path Parameters

  • The control library ID.

    Possible values: 1 ≤ length ≤ 256, Value must match regular expression ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$

The request body to update a control library.

Examples:
View

WithContext method only

The ReplaceCustomControlLibrary options.

parameters

  • The control library ID.

    Possible values: 1 ≤ length ≤ 256, Value must match regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/

  • The control library ID.

    Possible values: length = 36, Value must match regular expression /^[a-zA-Z0-9-]*$/

  • The account ID.

    Possible values: 0 ≤ length ≤ 32, Value must match regular expression /^[a-zA-Z0-9-]*$/

  • The control library name.

    Possible values: 2 ≤ length ≤ 64, Value must match regular expression /^[a-zA-Z0-9_\\s\\-]*$/

    Examples:
    value
    _source
    _lines
    _html
  • The control library description.

    Possible values: 2 ≤ length ≤ 256, Value must match regular expression /[A-Za-z0-9]+/

    Examples:
    value
    _source
    _lines
    _html
  • The control library type.

    Allowable values: [predefined,custom]

    Examples:
    value
    _source
    _lines
    _html
  • The version group label.

    Possible values: length = 36, Value must match regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/

  • The control library version.

    Possible values: 5 ≤ length ≤ 64, Value must match regular expression /^[a-zA-Z0-9_\\-.]*$/

    Examples:
    value
    _source
    _lines
    _html
  • The date when the control library was created.

  • The user who created the control library.

    Possible values: 1 ≤ length ≤ 255, Value must match regular expression /^[a-zA-Z0-9-\\.:,_\\s]*$/

  • The date when the control library was updated.

  • The user who updated the control library.

    Possible values: 1 ≤ length ≤ 255, Value must match regular expression /^[a-zA-Z0-9-\\.:,_\\s]*$/

  • The latest version of the control library.

  • The indication of whether hierarchy is enabled for the control library.

  • The number of controls.

  • The number of parent controls in the control library.

  • The list of controls in a control library.

    Possible values: 0 ≤ number of items ≤ 1200

    Examples:
    value
    _source
    _lines
    _html
  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

parameters

  • The control library ID.

    Possible values: 1 ≤ length ≤ 256, Value must match regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/

  • The control library ID.

    Possible values: length = 36, Value must match regular expression /^[a-zA-Z0-9-]*$/

  • The account ID.

    Possible values: 0 ≤ length ≤ 32, Value must match regular expression /^[a-zA-Z0-9-]*$/

  • The control library name.

    Possible values: 2 ≤ length ≤ 64, Value must match regular expression /^[a-zA-Z0-9_\\s\\-]*$/

    Examples:
    value
    _source
    _lines
    _html
  • The control library description.

    Possible values: 2 ≤ length ≤ 256, Value must match regular expression /[A-Za-z0-9]+/

    Examples:
    value
    _source
    _lines
    _html
  • The control library type.

    Allowable values: [predefined,custom]

    Examples:
    value
    _source
    _lines
    _html
  • The version group label.

    Possible values: length = 36, Value must match regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/

  • The control library version.

    Possible values: 5 ≤ length ≤ 64, Value must match regular expression /^[a-zA-Z0-9_\\-.]*$/

    Examples:
    value
    _source
    _lines
    _html
  • The date when the control library was created.

  • The user who created the control library.

    Possible values: 1 ≤ length ≤ 255, Value must match regular expression /^[a-zA-Z0-9-\\.:,_\\s]*$/

  • The date when the control library was updated.

  • The user who updated the control library.

    Possible values: 1 ≤ length ≤ 255, Value must match regular expression /^[a-zA-Z0-9-\\.:,_\\s]*$/

  • The latest version of the control library.

  • The indication of whether hierarchy is enabled for the control library.

  • The number of controls.

  • The number of parent controls in the control library.

  • The list of controls in a control library.

    Possible values: 0 ≤ number of items ≤ 1200

    Examples:
    value
    _source
    _lines
    _html
  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

The replaceCustomControlLibrary options.

  • curl -X PUT --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{ "control_library_name": "IBM Cloud for Financial Services", "control_library_description": "IBM Cloud for Financial Services", "control_library_type": "custom", "control_library_version": "1.1.0", "controls": [ { "control_name": "SC-7", "control_id": "1fa45e17-9322-4e6c-bbd6-1c51db08e790", "control_description": "Boundary Protection", "control_category": "System and Communications Protection", "control_parent": "", "control_requirement": true, "control_tags": [ "1fa45e17-9322-4e6c-bbd6-1c51db08e790" ], "control_specifications_count": 1, "control_specifications": [ { "control_specification_id": "5c7d6f88-a92f-4734-9b49-bd22b0900184", "responsibility": "user", "component_id": "iam-identity", "component_name": "IAM Identity Service", "environment": "ibm-cloud", "control_specification_description": "IBM cloud", "assessments": [ { "assessment_type": "automated", "assessment_method": "ibm-cloud-rule", "assessment_id": "rule-a637949b-7e51-46c4-afd4-b96619001bf1", "assessment_description": "Check that there is an Activity Tracker event route defined to collect global events generated by IBM Cloud services", "parameters": [ { "parameter_name": "session_invalidation_in_seconds", "parameter_display_name": "Sign out due to inactivity in seconds", "parameter_type": "numeric" } ] } ] } ], "control_docs": { "control_docs_id": "sc-7", "control_docs_type": "ibm-cloud" } } ] }'   "{base_url}/control_libraries/{control_libraries_id}"
  • parameterInfoModel := &securityandcompliancecenterapiv3.ParameterInfo{
      ParameterName: core.StringPtr("session_invalidation_in_seconds"),
      ParameterDisplayName: core.StringPtr("Sign out due to inactivity in seconds"),
      ParameterType: core.StringPtr("numeric"),
    }
    
    implementationModel := &securityandcompliancecenterapiv3.Implementation{
      AssessmentID: core.StringPtr("rule-a637949b-7e51-46c4-afd4-b96619001bf1"),
      AssessmentMethod: core.StringPtr("ibm-cloud-rule"),
      AssessmentType: core.StringPtr("automated"),
      AssessmentDescription: core.StringPtr("Check that there is an Activity Tracker event route defined to collect global events generated by IBM Cloud services"),
      Parameters: []securityandcompliancecenterapiv3.ParameterInfo{*parameterInfoModel},
    }
    
    controlSpecificationsModel := &securityandcompliancecenterapiv3.ControlSpecifications{
      ControlSpecificationID: core.StringPtr("5c7d6f88-a92f-4734-9b49-bd22b0900184"),
      Responsibility: core.StringPtr("user"),
      ComponentID: core.StringPtr("iam-identity"),
      ComponentName: core.StringPtr("IAM Identity Service"),
      Environment: core.StringPtr("ibm-cloud"),
      ControlSpecificationDescription: core.StringPtr("IBM cloud"),
      Assessments: []securityandcompliancecenterapiv3.Implementation{*implementationModel},
    }
    
    controlDocsModel := &securityandcompliancecenterapiv3.ControlDocs{
      ControlDocsID: core.StringPtr("sc-7"),
      ControlDocsType: core.StringPtr("ibm-cloud"),
    }
    
    controlsInControlLibModel := &securityandcompliancecenterapiv3.ControlsInControlLib{
      ControlName: core.StringPtr("SC-7"),
      ControlID: core.StringPtr("1fa45e17-9322-4e6c-bbd6-1c51db08e790"),
      ControlDescription: core.StringPtr("Boundary Protection"),
      ControlCategory: core.StringPtr("System and Communications Protection"),
      ControlTags: []string{"1fa45e17-9322-4e6c-bbd6-1c51db08e790"},
      ControlSpecifications: []securityandcompliancecenterapiv3.ControlSpecifications{*controlSpecificationsModel},
      ControlDocs: controlDocsModel,
      ControlRequirement: core.BoolPtr(true),
    }
    
    replaceCustomControlLibraryOptions := securityAndComplianceCenterApiService.NewReplaceCustomControlLibraryOptions(
      controlLibraryIdLink,
    )
    replaceCustomControlLibraryOptions.SetControlLibraryName("IBM Cloud for Financial Services")
    replaceCustomControlLibraryOptions.SetControlLibraryDescription("IBM Cloud for Financial Services")
    replaceCustomControlLibraryOptions.SetControlLibraryType("custom")
    replaceCustomControlLibraryOptions.SetControlLibraryVersion("1.1.0")
    replaceCustomControlLibraryOptions.SetControls([]securityandcompliancecenterapiv3.ControlsInControlLib{*controlsInControlLibModel})
    
    controlLibrary, response, err := securityAndComplianceCenterApiService.ReplaceCustomControlLibrary(replaceCustomControlLibraryOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(controlLibrary, "", "  ")
    fmt.Println(string(b))
  • // Request models needed by this operation.
    
    // ParameterInfo
    const parameterInfoModel = {
      parameter_name: 'session_invalidation_in_seconds',
      parameter_display_name: 'Sign out due to inactivity in seconds',
      parameter_type: 'numeric',
    };
    
    // Implementation
    const implementationModel = {
      assessment_id: 'rule-a637949b-7e51-46c4-afd4-b96619001bf1',
      assessment_method: 'ibm-cloud-rule',
      assessment_type: 'automated',
      assessment_description: 'Check that there is an Activity Tracker event route defined to collect global events generated by IBM Cloud services',
      parameters: [parameterInfoModel],
    };
    
    // ControlSpecifications
    const controlSpecificationsModel = {
      control_specification_id: '5c7d6f88-a92f-4734-9b49-bd22b0900184',
      responsibility: 'user',
      component_id: 'iam-identity',
      component_name: 'IAM Identity Service',
      environment: 'ibm-cloud',
      control_specification_description: 'IBM cloud',
      assessments: [implementationModel],
    };
    
    // ControlDocs
    const controlDocsModel = {
      control_docs_id: 'sc-7',
      control_docs_type: 'ibm-cloud',
    };
    
    // ControlsInControlLib
    const controlsInControlLibModel = {
      control_name: 'SC-7',
      control_id: '1fa45e17-9322-4e6c-bbd6-1c51db08e790',
      control_description: 'Boundary Protection',
      control_category: 'System and Communications Protection',
      control_parent: 'testString',
      control_tags: ['1fa45e17-9322-4e6c-bbd6-1c51db08e790'],
      control_specifications: [controlSpecificationsModel],
      control_docs: controlDocsModel,
      control_requirement: true,
    };
    
    const params = {
      controlLibrariesId: controlLibraryIdLink,
      controlLibraryName: 'IBM Cloud for Financial Services',
      controlLibraryDescription: 'IBM Cloud for Financial Services',
      controlLibraryType: 'custom',
      controlLibraryVersion: '1.1.0',
      controls: [controlsInControlLibModel],
    };
    
    let res;
    try {
      res = await securityAndComplianceCenterApiService.replaceCustomControlLibrary(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • parameter_info_model = {
      'parameter_name': 'session_invalidation_in_seconds',
      'parameter_display_name': 'Sign out due to inactivity in seconds',
      'parameter_type': 'numeric',
    }
    
    implementation_model = {
      'assessment_id': 'rule-a637949b-7e51-46c4-afd4-b96619001bf1',
      'assessment_method': 'ibm-cloud-rule',
      'assessment_type': 'automated',
      'assessment_description': 'Check that there is an Activity Tracker event route defined to collect global events generated by IBM Cloud services',
      'parameters': [parameter_info_model],
    }
    
    control_specifications_model = {
      'control_specification_id': '5c7d6f88-a92f-4734-9b49-bd22b0900184',
      'responsibility': 'user',
      'component_id': 'iam-identity',
      'component_name': 'IAM Identity Service',
      'environment': 'ibm-cloud',
      'control_specification_description': 'IBM cloud',
      'assessments': [implementation_model],
    }
    
    control_docs_model = {
      'control_docs_id': 'sc-7',
      'control_docs_type': 'ibm-cloud',
    }
    
    controls_in_control_lib_model = {
      'control_name': 'SC-7',
      'control_id': '1fa45e17-9322-4e6c-bbd6-1c51db08e790',
      'control_description': 'Boundary Protection',
      'control_category': 'System and Communications Protection',
      'control_parent': 'testString',
      'control_tags': ['1fa45e17-9322-4e6c-bbd6-1c51db08e790'],
      'control_specifications': [control_specifications_model],
      'control_docs': control_docs_model,
      'control_requirement': True,
    }
    
    response = security_and_compliance_center_api_service.replace_custom_control_library(
      control_libraries_id=control_library_id_link,
      control_library_name='IBM Cloud for Financial Services',
      control_library_description='IBM Cloud for Financial Services',
      control_library_type='custom',
      control_library_version='1.1.0',
      controls=[controls_in_control_lib_model],
    )
    control_library = response.get_result()
    
    print(json.dumps(control_library, indent=2))
  • ParameterInfo parameterInfoModel = new ParameterInfo.Builder()
      .parameterName("session_invalidation_in_seconds")
      .parameterDisplayName("Sign out due to inactivity in seconds")
      .parameterType("numeric")
      .build();
    Implementation implementationModel = new Implementation.Builder()
      .assessmentId("rule-a637949b-7e51-46c4-afd4-b96619001bf1")
      .assessmentMethod("ibm-cloud-rule")
      .assessmentType("automated")
      .assessmentDescription("Check that there is an Activity Tracker event route defined to collect global events generated by IBM Cloud services")
      .parameters(java.util.Arrays.asList(parameterInfoModel))
      .build();
    ControlSpecifications controlSpecificationsModel = new ControlSpecifications.Builder()
      .controlSpecificationId("5c7d6f88-a92f-4734-9b49-bd22b0900184")
      .responsibility("user")
      .componentId("iam-identity")
      .componentName("IAM Identity Service")
      .environment("ibm-cloud")
      .controlSpecificationDescription("IBM cloud")
      .assessments(java.util.Arrays.asList(implementationModel))
      .build();
    ControlDocs controlDocsModel = new ControlDocs.Builder()
      .controlDocsId("sc-7")
      .controlDocsType("ibm-cloud")
      .build();
    ControlsInControlLib controlsInControlLibModel = new ControlsInControlLib.Builder()
      .controlName("SC-7")
      .controlId("1fa45e17-9322-4e6c-bbd6-1c51db08e790")
      .controlDescription("Boundary Protection")
      .controlCategory("System and Communications Protection")
      .controlTags(java.util.Arrays.asList("1fa45e17-9322-4e6c-bbd6-1c51db08e790"))
      .controlSpecifications(java.util.Arrays.asList(controlSpecificationsModel))
      .controlDocs(controlDocsModel)
      .controlRequirement(true)
      .build();
    ReplaceCustomControlLibraryOptions replaceCustomControlLibraryOptions = new ReplaceCustomControlLibraryOptions.Builder()
      .controlLibrariesId(controlLibraryIdLink)
      .controlLibraryName("IBM Cloud for Financial Services")
      .controlLibraryDescription("IBM Cloud for Financial Services")
      .controlLibraryType("custom")
      .controlLibraryVersion("1.1.0")
      .controls(java.util.Arrays.asList(controlsInControlLibModel))
      .build();
    
    Response<ControlLibrary> response = securityAndComplianceCenterApiService.replaceCustomControlLibrary(replaceCustomControlLibraryOptions).execute();
    ControlLibrary controlLibrary = response.getResult();
    
    System.out.println(controlLibrary);

Response

The request payload of the control library.

The request payload of the control library.

Examples:
View

The request payload of the control library.

Examples:
View

The request payload of the control library.

Examples:
View

The request payload of the control library.

Examples:
View

Status Code

  • The control library was updated successfully.

  • Your request is invalid.

  • Your request is unauthorized.

  • You are not allowed to access this resource.

  • The specified resource was not found.

  • Too many requests

  • Internal server error

  • A backend service that is required to complete the operation is unavailable. Try again later.

Example responses
  • {
      "id": "60351ac6-2dba-495e-9c98-057601069723",
      "account_id": "cg3335893hh1428692d6747cf300yeb5",
      "control_library_name": "IBM Cloud for Financial Services",
      "control_library_description": "IBM Cloud for Financial Services",
      "control_library_type": "custom",
      "version_group_label": "33fc7b80-0fa5-4f16-bbba-1f293f660f0d",
      "control_library_version": "1.1.0",
      "created_on": "2023-01-25T11:22:23.000Z",
      "created_by": "IBM Cloud",
      "updated_on": "2023-02-02T15:46:15.000Z",
      "updated_by": "IBM Cloud",
      "latest": true,
      "hierarchy_enabled": true,
      "controls_count": 1,
      "control_parents_count": 0,
      "controls": [
        {
          "control_name": "SC-7",
          "control_id": "1fa45e17-9322-4e6c-bbd6-1c51db08e790",
          "control_description": "Boundary Protection",
          "control_category": "System and Communications Protection",
          "control_parent": "",
          "control_requirement": true,
          "control_tags": [
            "1fa45e17-9322-4e6c-bbd6-1c51db08e790"
          ],
          "control_specifications_count": 1,
          "control_specifications": [
            {
              "control_specification_id": "5c7d6f88-a92f-4734-9b49-bd22b0900184",
              "responsibility": "user",
              "component_id": "iam-identity",
              "component_name": "IAM Identity Service",
              "environment": "ibm-cloud",
              "control_specification_description": "IBM cloud",
              "assessments": [
                {
                  "assessment_type": "automated",
                  "assessment_method": "ibm-cloud-rule",
                  "assessment_id": "rule-a637949b-7e51-46c4-afd4-b96619001bf1",
                  "assessment_description": "Check that there is an Activity Tracker event route defined to collect global events generated by IBM Cloud services",
                  "parameters": [
                    {
                      "parameter_name": "session_invalidation_in_seconds",
                      "parameter_display_name": "Sign out due to inactivity in seconds",
                      "parameter_type": "numeric"
                    }
                  ]
                }
              ],
              "assessments_count": 1
            }
          ],
          "control_docs": {
            "control_docs_id": "sc-7",
            "control_docs_type": "ibm-cloud"
          },
          "status": "enabled"
        }
      ]
    }
  • {
      "id": "60351ac6-2dba-495e-9c98-057601069723",
      "account_id": "cg3335893hh1428692d6747cf300yeb5",
      "control_library_name": "IBM Cloud for Financial Services",
      "control_library_description": "IBM Cloud for Financial Services",
      "control_library_type": "custom",
      "version_group_label": "33fc7b80-0fa5-4f16-bbba-1f293f660f0d",
      "control_library_version": "1.1.0",
      "created_on": "2023-01-25T11:22:23.000Z",
      "created_by": "IBM Cloud",
      "updated_on": "2023-02-02T15:46:15.000Z",
      "updated_by": "IBM Cloud",
      "latest": true,
      "hierarchy_enabled": true,
      "controls_count": 1,
      "control_parents_count": 0,
      "controls": [
        {
          "control_name": "SC-7",
          "control_id": "1fa45e17-9322-4e6c-bbd6-1c51db08e790",
          "control_description": "Boundary Protection",
          "control_category": "System and Communications Protection",
          "control_parent": "",
          "control_requirement": true,
          "control_tags": [
            "1fa45e17-9322-4e6c-bbd6-1c51db08e790"
          ],
          "control_specifications_count": 1,
          "control_specifications": [
            {
              "control_specification_id": "5c7d6f88-a92f-4734-9b49-bd22b0900184",
              "responsibility": "user",
              "component_id": "iam-identity",
              "component_name": "IAM Identity Service",
              "environment": "ibm-cloud",
              "control_specification_description": "IBM cloud",
              "assessments": [
                {
                  "assessment_type": "automated",
                  "assessment_method": "ibm-cloud-rule",
                  "assessment_id": "rule-a637949b-7e51-46c4-afd4-b96619001bf1",
                  "assessment_description": "Check that there is an Activity Tracker event route defined to collect global events generated by IBM Cloud services",
                  "parameters": [
                    {
                      "parameter_name": "session_invalidation_in_seconds",
                      "parameter_display_name": "Sign out due to inactivity in seconds",
                      "parameter_type": "numeric"
                    }
                  ]
                }
              ],
              "assessments_count": 1
            }
          ],
          "control_docs": {
            "control_docs_id": "sc-7",
            "control_docs_type": "ibm-cloud"
          },
          "status": "enabled"
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `attachment_id`s parameter is invalid.",
          "target": {
            "name": "attachment_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `attachment_id`s parameter is invalid.",
          "target": {
            "name": "attachment_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "You're not authorized to complete this request."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "You're not authorized to complete this request."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 404,
      "errors": [
        {
          "code": "attachment_not_found",
          "message": "The report for `attachment_id` '65810ac762004f22ac19f8f8edf70a34' is not found.",
          "target": {
            "name": "attachment_id",
            "type": "parameter",
            "value": "65810ac762004f22ac19f8f8edf70a34"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 404,
      "errors": [
        {
          "code": "attachment_not_found",
          "message": "The report for `attachment_id` '65810ac762004f22ac19f8f8edf70a34' is not found.",
          "target": {
            "name": "attachment_id",
            "type": "parameter",
            "value": "65810ac762004f22ac19f8f8edf70a34"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 500,
      "errors": [
        {
          "code": "internal_server_error",
          "message": "The server has encountered an unexpected internal error."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 500,
      "errors": [
        {
          "code": "internal_server_error",
          "message": "The server has encountered an unexpected internal error."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service that is required is unavailable. Try again later."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service that is required is unavailable. Try again later."
        }
      ]
    }

List profiles

View all of the predefined and custom profiles that are available in your account.

View all of the predefined and custom profiles that are available in your account.

View all of the predefined and custom profiles that are available in your account.

View all of the predefined and custom profiles that are available in your account.

View all of the predefined and custom profiles that are available in your account.

GET /profiles
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) ListProfiles(listProfilesOptions *ListProfilesOptions) (result *ProfileCollection, response *core.DetailedResponse, err error)
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) ListProfilesWithContext(ctx context.Context, listProfilesOptions *ListProfilesOptions) (result *ProfileCollection, response *core.DetailedResponse, err error)
listProfiles(params)
list_profiles(
        self,
        *,
        x_correlation_id: str = None,
        x_request_id: str = None,
        limit: int = None,
        profile_type: str = None,
        start: str = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<ProfileCollection> listProfiles(ListProfilesOptions listProfilesOptions)

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • compliance.posture-management.profiles-read

Auditing

Calling this method generates the following auditing event.

  • compliance.posture-management-profiles.read

Request

Instantiate the ListProfilesOptions struct and set the fields to provide parameter values for the ListProfiles method.

Use the ListProfilesOptions.Builder to create a ListProfilesOptions object that contains the parameter values for the listProfiles method.

Custom Headers

  • The supplied or generated value of this header is logged for a request, and repeated in a response header for the corresponding response. The same value is used for downstream requests, and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

Query Parameters

  • The indication of how many resources to return, unless the response is the last page of resources.

    Possible values: 0 ≤ value ≤ 100

    Default: 50

  • The field that indicate how you want the resources to be filtered by.

    Possible values: 6 ≤ length ≤ 10, Value must match regular expression custom|predefined

    Example: custom

  • Determine what resource to start the page on or after.

    Possible values: 0 ≤ length ≤ 1024, Value must match regular expression .*

WithContext method only

The ListProfiles options.

parameters

  • The supplied or generated value of this header is logged for a request, and repeated in a response header for the corresponding response. The same value is used for downstream requests, and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The indication of how many resources to return, unless the response is the last page of resources.

    Possible values: 0 ≤ value ≤ 100

    Default: 50

  • The field that indicate how you want the resources to be filtered by.

    Possible values: 6 ≤ length ≤ 10, Value must match regular expression /custom|predefined/

    Examples:
    value
    _source
    _lines
    _html
  • Determine what resource to start the page on or after.

    Possible values: 0 ≤ length ≤ 1024, Value must match regular expression /.*/

parameters

  • The supplied or generated value of this header is logged for a request, and repeated in a response header for the corresponding response. The same value is used for downstream requests, and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The indication of how many resources to return, unless the response is the last page of resources.

    Possible values: 0 ≤ value ≤ 100

    Default: 50

  • The field that indicate how you want the resources to be filtered by.

    Possible values: 6 ≤ length ≤ 10, Value must match regular expression /custom|predefined/

    Examples:
    value
    _source
    _lines
    _html
  • Determine what resource to start the page on or after.

    Possible values: 0 ≤ length ≤ 1024, Value must match regular expression /.*/

The listProfiles options.

  • curl -X GET --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/profiles?profile_type=custom"
  • listProfilesOptions := &securityandcompliancecenterapiv3.ListProfilesOptions{
      XCorrelationID: core.StringPtr("testString"),
      XRequestID: core.StringPtr("testString"),
      Limit: core.Int64Ptr(int64(10)),
      ProfileType: core.StringPtr("custom"),
    }
    
    pager, err := securityAndComplianceCenterApiService.NewProfilesPager(listProfilesOptions)
    if err != nil {
      panic(err)
    }
    
    var allResults []securityandcompliancecenterapiv3.ProfileItem
    for pager.HasNext() {
      nextPage, err := pager.GetNext()
      if err != nil {
        panic(err)
      }
      allResults = append(allResults, nextPage...)
    }
    b, _ := json.MarshalIndent(allResults, "", "  ")
    fmt.Println(string(b))
  • const params = {
      xCorrelationId: 'testString',
      xRequestId: 'testString',
      limit: 10,
      profileType: 'custom',
    };
    
    const allResults = [];
    try {
      const pager = new SecurityAndComplianceCenterApiV3.ProfilesPager(securityAndComplianceCenterApiService, params);
      while (pager.hasNext()) {
        const nextPage = await pager.getNext();
        expect(nextPage).not.toBeNull();
        allResults.push(...nextPage);
      }
      console.log(JSON.stringify(allResults, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • all_results = []
    pager = ProfilesPager(
      client=security_and_compliance_center_api_service,
      x_correlation_id='testString',
      x_request_id='testString',
      limit=10,
      profile_type='custom',
    )
    while pager.has_next():
      next_page = pager.get_next()
      assert next_page is not None
      all_results.extend(next_page)
    
    print(json.dumps(all_results, indent=2))
  • ListProfilesOptions listProfilesOptions = new ListProfilesOptions.Builder()
      .xCorrelationId("testString")
      .xRequestId("testString")
      .limit(Long.valueOf("10"))
      .profileType("custom")
      .build();
    
    ProfilesPager pager = new ProfilesPager(securityAndComplianceCenterApiService, listProfilesOptions);
    List<ProfileItem> allResults = new ArrayList<>();
    while (pager.hasNext()) {
      List<ProfileItem> nextPage = pager.getNext();
      allResults.addAll(nextPage);
    }
    
    System.out.println(GsonSingleton.getGson().toJson(allResults));

Response

The response body to list all profiles that are linked to your account.

The response body to list all profiles that are linked to your account.

Examples:
View

The response body to list all profiles that are linked to your account.

Examples:
View

The response body to list all profiles that are linked to your account.

Examples:
View

The response body to list all profiles that are linked to your account.

Examples:
View

Status Code

  • The profiles were retrieved successfully.

  • Your request is invalid.

  • Your request is unauthorized.

  • You are not allowed to access this resource.

  • The specified resource was not found.

  • Too many requests

  • Internal server error

  • A backend service that is required to complete the operation is unavailable. Try again later.

Example responses
  • {
      "total_count": 1,
      "limit": 25,
      "first": {
        "href": "https://us-east.compliance.cloud.ibm.com/instances/6d5v891d-1f45-60a5-5b55-6hh6a82f2680/v3/profiles?account_id=cg3335893hh1428692d6747cf300yeb5&limit=25"
      },
      "next": {
        "href": ""
      },
      "profiles": [
        {
          "id": "7ec45986-54fc-4b66-a303-d9577b078c65",
          "profile_name": "IBM Cloud for Financial Services",
          "profile_description": "IBM Cloud for Financial Services",
          "profile_type": "custom",
          "profile_version": "0.5.0",
          "version_group_label": "33fc7b80-0fa5-4f16-bbba-1f293f660f0d",
          "latest": false,
          "hierarchy_enabled": false,
          "created_by": "IBM Cloud",
          "created_on": "2022-11-16T11:36:33.000Z",
          "updated_by": "IBM Cloud",
          "updated_on": "2022-11-29T12:52:08.000Z",
          "controls_count": 1,
          "control_parents_count": 0,
          "attachments_count": 0
        }
      ]
    }
  • {
      "total_count": 1,
      "limit": 25,
      "first": {
        "href": "https://us-east.compliance.cloud.ibm.com/instances/6d5v891d-1f45-60a5-5b55-6hh6a82f2680/v3/profiles?account_id=cg3335893hh1428692d6747cf300yeb5&limit=25"
      },
      "next": {
        "href": ""
      },
      "profiles": [
        {
          "id": "7ec45986-54fc-4b66-a303-d9577b078c65",
          "profile_name": "IBM Cloud for Financial Services",
          "profile_description": "IBM Cloud for Financial Services",
          "profile_type": "custom",
          "profile_version": "0.5.0",
          "version_group_label": "33fc7b80-0fa5-4f16-bbba-1f293f660f0d",
          "latest": false,
          "hierarchy_enabled": false,
          "created_by": "IBM Cloud",
          "created_on": "2022-11-16T11:36:33.000Z",
          "updated_by": "IBM Cloud",
          "updated_on": "2022-11-29T12:52:08.000Z",
          "controls_count": 1,
          "control_parents_count": 0,
          "attachments_count": 0
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `attachment_id`s parameter is invalid.",
          "target": {
            "name": "attachment_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `attachment_id`s parameter is invalid.",
          "target": {
            "name": "attachment_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "You're not authorized to complete this request."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "You're not authorized to complete this request."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 404,
      "errors": [
        {
          "code": "attachment_not_found",
          "message": "The report for `attachment_id` '65810ac762004f22ac19f8f8edf70a34' is not found.",
          "target": {
            "name": "attachment_id",
            "type": "parameter",
            "value": "65810ac762004f22ac19f8f8edf70a34"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 404,
      "errors": [
        {
          "code": "attachment_not_found",
          "message": "The report for `attachment_id` '65810ac762004f22ac19f8f8edf70a34' is not found.",
          "target": {
            "name": "attachment_id",
            "type": "parameter",
            "value": "65810ac762004f22ac19f8f8edf70a34"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 500,
      "errors": [
        {
          "code": "internal_server_error",
          "message": "The server has encountered an unexpected internal error."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 500,
      "errors": [
        {
          "code": "internal_server_error",
          "message": "The server has encountered an unexpected internal error."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service that is required is unavailable. Try again later."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service that is required is unavailable. Try again later."
        }
      ]
    }

Create a custom profile

Create a custom profile that is specific to your usecase, by using an existing library as a starting point. For more information, see Building custom profiles.

Create a custom profile that is specific to your usecase, by using an existing library as a starting point. For more information, see Building custom profiles.

Create a custom profile that is specific to your usecase, by using an existing library as a starting point. For more information, see Building custom profiles.

Create a custom profile that is specific to your usecase, by using an existing library as a starting point. For more information, see Building custom profiles.

Create a custom profile that is specific to your usecase, by using an existing library as a starting point. For more information, see Building custom profiles.

POST /profiles
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) CreateProfile(createProfileOptions *CreateProfileOptions) (result *Profile, response *core.DetailedResponse, err error)
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) CreateProfileWithContext(ctx context.Context, createProfileOptions *CreateProfileOptions) (result *Profile, response *core.DetailedResponse, err error)
createProfile(params)
create_profile(
        self,
        profile_name: str,
        profile_description: str,
        profile_type: str,
        controls: List['ProfileControlsPrototype'],
        default_parameters: List['DefaultParametersPrototype'],
        *,
        x_correlation_id: str = None,
        x_request_id: str = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<Profile> createProfile(CreateProfileOptions createProfileOptions)

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • compliance.posture-management.profiles-create

Auditing

Calling this method generates the following auditing event.

  • compliance.posture-management-profiles.create

Request

Instantiate the CreateProfileOptions struct and set the fields to provide parameter values for the CreateProfile method.

Use the CreateProfileOptions.Builder to create a CreateProfileOptions object that contains the parameter values for the createProfile method.

Custom Headers

  • The supplied or generated value of this header is logged for a request, and repeated in a response header for the corresponding response. The same value is used for downstream requests, and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

The request payload to create a profile.

Examples:
View

WithContext method only

The CreateProfile options.

parameters

  • The name of the profile.

    Possible values: 2 ≤ length ≤ 64, Value must match regular expression /^[a-zA-Z0-9_\\s\\-]*$/

    Examples:
    value
    _source
    _lines
    _html
  • The description of the profile.

    Possible values: 2 ≤ length ≤ 256, Value must match regular expression /^[a-zA-Z0-9_,'\"\\s\\-\\[\\]]+$/

    Examples:
    value
    _source
    _lines
    _html
  • The profile type.

    Allowable values: [predefined,custom]

    Examples:
    value
    _source
    _lines
    _html
  • The controls that are in the profile.

    Possible values: 0 ≤ number of items ≤ 512

    Examples:
    value
    _source
    _lines
    _html
  • The default parameters of the profile.

    Possible values: 0 ≤ number of items ≤ 512

    Examples:
    value
    _source
    _lines
    _html
  • The supplied or generated value of this header is logged for a request, and repeated in a response header for the corresponding response. The same value is used for downstream requests, and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

parameters

  • The name of the profile.

    Possible values: 2 ≤ length ≤ 64, Value must match regular expression /^[a-zA-Z0-9_\\s\\-]*$/

    Examples:
    value
    _source
    _lines
    _html
  • The description of the profile.

    Possible values: 2 ≤ length ≤ 256, Value must match regular expression /^[a-zA-Z0-9_,'\"\\s\\-\\[\\]]+$/

    Examples:
    value
    _source
    _lines
    _html
  • The profile type.

    Allowable values: [predefined,custom]

    Examples:
    value
    _source
    _lines
    _html
  • The controls that are in the profile.

    Possible values: 0 ≤ number of items ≤ 512

    Examples:
    value
    _source
    _lines
    _html
  • The default parameters of the profile.

    Possible values: 0 ≤ number of items ≤ 512

    Examples:
    value
    _source
    _lines
    _html
  • The supplied or generated value of this header is logged for a request, and repeated in a response header for the corresponding response. The same value is used for downstream requests, and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

The createProfile options.

  • curl -X POST --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{ "profile_name": "test_profile1", "profile_description": "test_description1", "profile_type": "custom", "profile_version": "1.0.0", "version_group_label": "58a5922f-0763-485b-91ef-92cca4125d9d", "controls": [ { "control_library_id": "e98a56ff-dc24-41d4-9875-1e188e2da6cd", "control_id": "1fa45e17-9322-4e6c-bbd6-1c51db08e790" } ], "default_parameters": [ { "assessment_type": "Automated", "assessment_id": "rule-a637949b-7e51-46c4-afd4-b96619001bf1", "parameter_name": "session_invalidation_in_seconds", "parameter_default_value": "120", "parameter_display_name": "Sign out due to inactivity in seconds", "parameter_type": "numeric" } ] }'   "{base_url}/profiles"
  • profileControlsPrototypeModel := &securityandcompliancecenterapiv3.ProfileControlsPrototype{
      ControlLibraryID: &controlLibraryIdLink,
      ControlID: core.StringPtr("1fa45e17-9322-4e6c-bbd6-1c51db08e790"),
    }
    
    defaultParametersPrototypeModel := &securityandcompliancecenterapiv3.DefaultParametersPrototype{
      AssessmentType: core.StringPtr("Automated"),
      AssessmentID: core.StringPtr("rule-a637949b-7e51-46c4-afd4-b96619001bf1"),
      ParameterName: core.StringPtr("session_invalidation_in_seconds"),
      ParameterDefaultValue: core.StringPtr("120"),
      ParameterDisplayName: core.StringPtr("Sign out due to inactivity in seconds"),
      ParameterType: core.StringPtr("numeric"),
    }
    
    createProfileOptions := securityAndComplianceCenterApiService.NewCreateProfileOptions(
      "test_profile1",
      "test_description1",
      "custom",
      []securityandcompliancecenterapiv3.ProfileControlsPrototype{*profileControlsPrototypeModel},
      []securityandcompliancecenterapiv3.DefaultParametersPrototype{*defaultParametersPrototypeModel},
    )
    
    profile, response, err := securityAndComplianceCenterApiService.CreateProfile(createProfileOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(profile, "", "  ")
    fmt.Println(string(b))
  • // Request models needed by this operation.
    
    // ProfileControlsPrototype
    const profileControlsPrototypeModel = {
      control_library_id: controlLibraryIdLink,
      control_id: '1fa45e17-9322-4e6c-bbd6-1c51db08e790',
    };
    
    // DefaultParametersPrototype
    const defaultParametersPrototypeModel = {
      assessment_type: 'Automated',
      assessment_id: 'rule-a637949b-7e51-46c4-afd4-b96619001bf1',
      parameter_name: 'session_invalidation_in_seconds',
      parameter_default_value: '120',
      parameter_display_name: 'Sign out due to inactivity in seconds',
      parameter_type: 'numeric',
    };
    
    const params = {
      profileName: 'test_profile1',
      profileDescription: 'test_description1',
      profileType: 'custom',
      controls: [profileControlsPrototypeModel],
      defaultParameters: [defaultParametersPrototypeModel],
    };
    
    let res;
    try {
      res = await securityAndComplianceCenterApiService.createProfile(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • profile_controls_prototype_model = {
      'control_library_id': control_library_id_link,
      'control_id': '1fa45e17-9322-4e6c-bbd6-1c51db08e790',
    }
    
    default_parameters_prototype_model = {
      'assessment_type': 'Automated',
      'assessment_id': 'rule-a637949b-7e51-46c4-afd4-b96619001bf1',
      'parameter_name': 'session_invalidation_in_seconds',
      'parameter_default_value': '120',
      'parameter_display_name': 'Sign out due to inactivity in seconds',
      'parameter_type': 'numeric',
    }
    
    response = security_and_compliance_center_api_service.create_profile(
      profile_name='test_profile1',
      profile_description='test_description1',
      profile_type='custom',
      controls=[profile_controls_prototype_model],
      default_parameters=[default_parameters_prototype_model],
    )
    profile = response.get_result()
    
    print(json.dumps(profile, indent=2))
  • ProfileControlsPrototype profileControlsPrototypeModel = new ProfileControlsPrototype.Builder()
      .controlLibraryId(controlLibraryIdLink)
      .controlId("1fa45e17-9322-4e6c-bbd6-1c51db08e790")
      .build();
    DefaultParametersPrototype defaultParametersPrototypeModel = new DefaultParametersPrototype.Builder()
      .assessmentType("Automated")
      .assessmentId("rule-a637949b-7e51-46c4-afd4-b96619001bf1")
      .parameterName("session_invalidation_in_seconds")
      .parameterDefaultValue("120")
      .parameterDisplayName("Sign out due to inactivity in seconds")
      .parameterType("numeric")
      .build();
    CreateProfileOptions createProfileOptions = new CreateProfileOptions.Builder()
      .profileName("test_profile1")
      .profileDescription("test_description1")
      .profileType("custom")
      .controls(java.util.Arrays.asList(profileControlsPrototypeModel))
      .defaultParameters(java.util.Arrays.asList(defaultParametersPrototypeModel))
      .build();
    
    Response<Profile> response = securityAndComplianceCenterApiService.createProfile(createProfileOptions).execute();
    Profile profile = response.getResult();
    
    System.out.println(profile);

Response

The response body of the profile.

The response body of the profile.

Examples:
View

The response body of the profile.

Examples:
View

The response body of the profile.

Examples:
View

The response body of the profile.

Examples:
View

Status Code

  • The profile was created successfully.

  • Your request is invalid.

  • Your request is unauthorized.

  • You are not allowed to access this resource.

  • The specified resource was not found.

  • Too many requests

  • Internal server error

  • A backend service that is required to complete the operation is unavailable. Try again later.

Example responses
  • {
      "id": "542b1aee-3ad8-49e9-a33c-44b64f117f18",
      "profile_name": "test_profile1",
      "profile_description": "test_description1",
      "profile_type": "custom",
      "profile_version": "1.0.0",
      "version_group_label": "58a5922f-0763-485b-91ef-92cca4125d9d",
      "instance_id": "edf9524f-406c-412c-acbb-ee371a5cabda",
      "latest": true,
      "hierarchy_enabled": false,
      "created_by": "IBMid-6620049HI3",
      "created_on": "2023-02-09T10:54:59.000Z",
      "updated_by": "IBMid-6620049HI3",
      "updated_on": "2023-02-09T10:54:59.000Z",
      "controls_count": 1,
      "control_parents_count": 0,
      "attachments_count": 0,
      "controls": [
        {
          "control_library_id": "e98a56ff-dc24-41d4-9875-1e188e2da6cd",
          "control_id": "1fa45e17-9322-4e6c-bbd6-1c51db08e790",
          "control_library_version": "1.1.0",
          "control_name": "SC-7",
          "control_description": "Boundary Protection",
          "control_category": "System and Communications Protection",
          "control_parent": "",
          "control_requirement": true,
          "control_docs": {
            "control_docs_id": "sc-7",
            "control_docs_type": "ibm-cloud"
          },
          "control_specifications_count": 1,
          "control_specifications": [
            {
              "control_specification_id": "5c7d6f88-a92f-4734-9b49-bd22b0900184",
              "responsibility": "user",
              "component_id": "iam-identity",
              "component_name": "IAM Identity Service",
              "environment": "ibm-cloud",
              "control_specification_description": "IBM cloud",
              "assessments": [
                {
                  "assessment_type": "Automated",
                  "assessment_method": "ibm-cloud-rule",
                  "assessment_id": "rule-a637949b-7e51-46c4-afd4-b96619001bf1",
                  "assessment_description": "Check that there is an Activity Tracker event route defined to collect global events generated by IBM Cloud services",
                  "parameters": [
                    {
                      "parameter_name": "session_invalidation_in_seconds",
                      "parameter_display_name": "Sign out due to inactivity in seconds",
                      "parameter_type": "numeric"
                    }
                  ]
                }
              ],
              "assessments_count": 1
            }
          ]
        }
      ],
      "default_parameters": [
        {
          "assessment_type": "Automated",
          "assessment_id": "rule-a637949b-7e51-46c4-afd4-b96619001bf1",
          "parameter_name": "session_invalidation_in_seconds",
          "parameter_default_value": "120",
          "parameter_display_name": "Sign out due to inactivity in seconds",
          "parameter_type": "numeric"
        }
      ]
    }
  • {
      "id": "542b1aee-3ad8-49e9-a33c-44b64f117f18",
      "profile_name": "test_profile1",
      "profile_description": "test_description1",
      "profile_type": "custom",
      "profile_version": "1.0.0",
      "version_group_label": "58a5922f-0763-485b-91ef-92cca4125d9d",
      "instance_id": "edf9524f-406c-412c-acbb-ee371a5cabda",
      "latest": true,
      "hierarchy_enabled": false,
      "created_by": "IBMid-6620049HI3",
      "created_on": "2023-02-09T10:54:59.000Z",
      "updated_by": "IBMid-6620049HI3",
      "updated_on": "2023-02-09T10:54:59.000Z",
      "controls_count": 1,
      "control_parents_count": 0,
      "attachments_count": 0,
      "controls": [
        {
          "control_library_id": "e98a56ff-dc24-41d4-9875-1e188e2da6cd",
          "control_id": "1fa45e17-9322-4e6c-bbd6-1c51db08e790",
          "control_library_version": "1.1.0",
          "control_name": "SC-7",
          "control_description": "Boundary Protection",
          "control_category": "System and Communications Protection",
          "control_parent": "",
          "control_requirement": true,
          "control_docs": {
            "control_docs_id": "sc-7",
            "control_docs_type": "ibm-cloud"
          },
          "control_specifications_count": 1,
          "control_specifications": [
            {
              "control_specification_id": "5c7d6f88-a92f-4734-9b49-bd22b0900184",
              "responsibility": "user",
              "component_id": "iam-identity",
              "component_name": "IAM Identity Service",
              "environment": "ibm-cloud",
              "control_specification_description": "IBM cloud",
              "assessments": [
                {
                  "assessment_type": "Automated",
                  "assessment_method": "ibm-cloud-rule",
                  "assessment_id": "rule-a637949b-7e51-46c4-afd4-b96619001bf1",
                  "assessment_description": "Check that there is an Activity Tracker event route defined to collect global events generated by IBM Cloud services",
                  "parameters": [
                    {
                      "parameter_name": "session_invalidation_in_seconds",
                      "parameter_display_name": "Sign out due to inactivity in seconds",
                      "parameter_type": "numeric"
                    }
                  ]
                }
              ],
              "assessments_count": 1
            }
          ]
        }
      ],
      "default_parameters": [
        {
          "assessment_type": "Automated",
          "assessment_id": "rule-a637949b-7e51-46c4-afd4-b96619001bf1",
          "parameter_name": "session_invalidation_in_seconds",
          "parameter_default_value": "120",
          "parameter_display_name": "Sign out due to inactivity in seconds",
          "parameter_type": "numeric"
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `attachment_id`s parameter is invalid.",
          "target": {
            "name": "attachment_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `attachment_id`s parameter is invalid.",
          "target": {
            "name": "attachment_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "You're not authorized to complete this request."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "You're not authorized to complete this request."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 404,
      "errors": [
        {
          "code": "attachment_not_found",
          "message": "The report for `attachment_id` '65810ac762004f22ac19f8f8edf70a34' is not found.",
          "target": {
            "name": "attachment_id",
            "type": "parameter",
            "value": "65810ac762004f22ac19f8f8edf70a34"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 404,
      "errors": [
        {
          "code": "attachment_not_found",
          "message": "The report for `attachment_id` '65810ac762004f22ac19f8f8edf70a34' is not found.",
          "target": {
            "name": "attachment_id",
            "type": "parameter",
            "value": "65810ac762004f22ac19f8f8edf70a34"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 500,
      "errors": [
        {
          "code": "internal_server_error",
          "message": "The server has encountered an unexpected internal error."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 500,
      "errors": [
        {
          "code": "internal_server_error",
          "message": "The server has encountered an unexpected internal error."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service that is required is unavailable. Try again later."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service that is required is unavailable. Try again later."
        }
      ]
    }

Delete a custom profile

Delete a custom profile by providing the profile ID. You can find the ID in the Security and Compliance Center UI. For more information about managing your custom profiles, see Building custom profiles.

Delete a custom profile by providing the profile ID. You can find the ID in the Security and Compliance Center UI. For more information about managing your custom profiles, see Building custom profiles.

Delete a custom profile by providing the profile ID. You can find the ID in the Security and Compliance Center UI. For more information about managing your custom profiles, see Building custom profiles.

Delete a custom profile by providing the profile ID. You can find the ID in the Security and Compliance Center UI. For more information about managing your custom profiles, see Building custom profiles.

Delete a custom profile by providing the profile ID. You can find the ID in the Security and Compliance Center UI. For more information about managing your custom profiles, see Building custom profiles.

DELETE /profiles/{profiles_id}
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) DeleteCustomProfile(deleteCustomProfileOptions *DeleteCustomProfileOptions) (result *Profile, response *core.DetailedResponse, err error)
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) DeleteCustomProfileWithContext(ctx context.Context, deleteCustomProfileOptions *DeleteCustomProfileOptions) (result *Profile, response *core.DetailedResponse, err error)
deleteCustomProfile(params)
delete_custom_profile(
        self,
        profiles_id: str,
        *,
        x_correlation_id: str = None,
        x_request_id: str = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<Profile> deleteCustomProfile(DeleteCustomProfileOptions deleteCustomProfileOptions)

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • compliance.posture-management.profiles-delete

Auditing

Calling this method generates the following auditing event.

  • compliance.posture-management-profiles.delete

Request

Instantiate the DeleteCustomProfileOptions struct and set the fields to provide parameter values for the DeleteCustomProfile method.

Use the DeleteCustomProfileOptions.Builder to create a DeleteCustomProfileOptions object that contains the parameter values for the deleteCustomProfile method.

Custom Headers

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

Path Parameters

  • The profile ID.

    Possible values: length = 36, Value must match regular expression ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$

WithContext method only

The DeleteCustomProfile options.

parameters

  • The profile ID.

    Possible values: length = 36, Value must match regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

parameters

  • The profile ID.

    Possible values: length = 36, Value must match regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

The deleteCustomProfile options.

  • curl -X DELETE --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/profiles/{profiles_id}"
  • deleteCustomProfileOptions := securityAndComplianceCenterApiService.NewDeleteCustomProfileOptions(
      profileIdLink,
    )
    
    profile, response, err := securityAndComplianceCenterApiService.DeleteCustomProfile(deleteCustomProfileOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(profile, "", "  ")
    fmt.Println(string(b))
  • const params = {
      profilesId: profileIdLink,
    };
    
    let res;
    try {
      res = await securityAndComplianceCenterApiService.deleteCustomProfile(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • response = security_and_compliance_center_api_service.delete_custom_profile(
      profiles_id=profile_id_link,
    )
    profile = response.get_result()
    
    print(json.dumps(profile, indent=2))
  • DeleteCustomProfileOptions deleteCustomProfileOptions = new DeleteCustomProfileOptions.Builder()
      .profilesId(profileIdLink)
      .build();
    
    Response<Profile> response = securityAndComplianceCenterApiService.deleteCustomProfile(deleteCustomProfileOptions).execute();
    Profile profile = response.getResult();
    
    System.out.println(profile);

Response

The response body of the profile.

The response body of the profile.

Examples:
View

The response body of the profile.

Examples:
View

The response body of the profile.

Examples:
View

The response body of the profile.

Examples:
View

Status Code

  • The profile was deleted successfully.

  • Your request is invalid.

  • Your request is unauthorized.

  • You are not allowed to access this resource.

  • The specified resource was not found.

  • This method is not allowed.

  • Too many requests

  • Internal server error

  • A backend service that is required to complete the operation is unavailable. Try again later.

Example responses
  • {
      "id": "542b1aee-3ad8-49e9-a33c-44b64f117f18",
      "profile_name": "test_profile1",
      "profile_description": "test_description1",
      "profile_type": "custom",
      "profile_version": "1.0.0",
      "version_group_label": "string",
      "latest": true,
      "hierarchy_enabled": false,
      "created_by": "IBMid-6620049HI3",
      "created_on": "2023-02-09T10:54:59.000Z",
      "updated_by": "IBMid-6620049HI3",
      "updated_on": "2023-02-09T10:54:59.000Z",
      "controls_count": 1,
      "control_parents_count": 0,
      "attachments_count": 0,
      "controls": [
        {
          "control_name": "SC-7",
          "control_id": "1fa45e17-9322-4e6c-bbd6-1c51db08e790",
          "control_description": "Boundary Protection",
          "control_category": "System and Communications Protection",
          "control_parent": "SC",
          "control_requirement": true,
          "control_tags": [
            "1fa45e17-9322-4e6c-bbd6-1c51db08e790"
          ],
          "control_specifications_count": 1,
          "control_specifications": [
            {
              "control_specification_id": "5c7d6f88-a92f-4734-9b49-bd22b0900184",
              "responsibility": "user",
              "component_id": "iam-identity",
              "component_name": "IAM Identity Service",
              "environment": "ibm-cloud",
              "control_specification_description": "IBM cloud",
              "assessments": [
                {
                  "assessment_type": "Automated",
                  "assessment_method": "ibm-cloud-rule",
                  "assessment_id": "rule-a637949b-7e51-46c4-afd4-b96619001bf1",
                  "assessment_description": "Check that there is an Activity Tracker event route defined to collect global events generated by IBM Cloud services",
                  "parameters": [
                    {
                      "parameter_name": "session_invalidation_in_seconds",
                      "parameter_display_name": "Sign out due to inactivity in seconds",
                      "parameter_type": "numeric"
                    }
                  ]
                }
              ],
              "assessments_count": 1
            }
          ],
          "control_docs": {
            "control_docs_id": "sc-7",
            "control_docs_type": "ibm-cloud"
          },
          "status": "enabled"
        }
      ],
      "default_parameters": [
        {
          "assessment_type": "Automated",
          "assessment_id": "rule-a637949b-7e51-46c4-afd4-b96619001bf1",
          "parameter_name": "session_invalidation_in_seconds",
          "parameter_default_value": "120",
          "parameter_display_name": "Sign out due to inactivity in seconds",
          "parameter_type": "numeric"
        }
      ]
    }
  • {
      "id": "542b1aee-3ad8-49e9-a33c-44b64f117f18",
      "profile_name": "test_profile1",
      "profile_description": "test_description1",
      "profile_type": "custom",
      "profile_version": "1.0.0",
      "version_group_label": "string",
      "latest": true,
      "hierarchy_enabled": false,
      "created_by": "IBMid-6620049HI3",
      "created_on": "2023-02-09T10:54:59.000Z",
      "updated_by": "IBMid-6620049HI3",
      "updated_on": "2023-02-09T10:54:59.000Z",
      "controls_count": 1,
      "control_parents_count": 0,
      "attachments_count": 0,
      "controls": [
        {
          "control_name": "SC-7",
          "control_id": "1fa45e17-9322-4e6c-bbd6-1c51db08e790",
          "control_description": "Boundary Protection",
          "control_category": "System and Communications Protection",
          "control_parent": "SC",
          "control_requirement": true,
          "control_tags": [
            "1fa45e17-9322-4e6c-bbd6-1c51db08e790"
          ],
          "control_specifications_count": 1,
          "control_specifications": [
            {
              "control_specification_id": "5c7d6f88-a92f-4734-9b49-bd22b0900184",
              "responsibility": "user",
              "component_id": "iam-identity",
              "component_name": "IAM Identity Service",
              "environment": "ibm-cloud",
              "control_specification_description": "IBM cloud",
              "assessments": [
                {
                  "assessment_type": "Automated",
                  "assessment_method": "ibm-cloud-rule",
                  "assessment_id": "rule-a637949b-7e51-46c4-afd4-b96619001bf1",
                  "assessment_description": "Check that there is an Activity Tracker event route defined to collect global events generated by IBM Cloud services",
                  "parameters": [
                    {
                      "parameter_name": "session_invalidation_in_seconds",
                      "parameter_display_name": "Sign out due to inactivity in seconds",
                      "parameter_type": "numeric"
                    }
                  ]
                }
              ],
              "assessments_count": 1
            }
          ],
          "control_docs": {
            "control_docs_id": "sc-7",
            "control_docs_type": "ibm-cloud"
          },
          "status": "enabled"
        }
      ],
      "default_parameters": [
        {
          "assessment_type": "Automated",
          "assessment_id": "rule-a637949b-7e51-46c4-afd4-b96619001bf1",
          "parameter_name": "session_invalidation_in_seconds",
          "parameter_default_value": "120",
          "parameter_display_name": "Sign out due to inactivity in seconds",
          "parameter_type": "numeric"
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `attachment_id`s parameter is invalid.",
          "target": {
            "name": "attachment_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `attachment_id`s parameter is invalid.",
          "target": {
            "name": "attachment_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "You're not authorized to complete this request."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "You're not authorized to complete this request."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 404,
      "errors": [
        {
          "code": "attachment_not_found",
          "message": "The report for `attachment_id` '65810ac762004f22ac19f8f8edf70a34' is not found.",
          "target": {
            "name": "attachment_id",
            "type": "parameter",
            "value": "65810ac762004f22ac19f8f8edf70a34"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 404,
      "errors": [
        {
          "code": "attachment_not_found",
          "message": "The report for `attachment_id` '65810ac762004f22ac19f8f8edf70a34' is not found.",
          "target": {
            "name": "attachment_id",
            "type": "parameter",
            "value": "65810ac762004f22ac19f8f8edf70a34"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 405,
      "errors": [
        {
          "code": "method_not_allowed",
          "message": "This method is not allowed. You can't delete a profile if it is linked to any attachments."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 405,
      "errors": [
        {
          "code": "method_not_allowed",
          "message": "This method is not allowed. You can't delete a profile if it is linked to any attachments."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 500,
      "errors": [
        {
          "code": "internal_server_error",
          "message": "The server has encountered an unexpected internal error."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 500,
      "errors": [
        {
          "code": "internal_server_error",
          "message": "The server has encountered an unexpected internal error."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service that is required is unavailable. Try again later."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service that is required is unavailable. Try again later."
        }
      ]
    }

Get a profile

View the details of a profile by providing the profile ID. You can find the profile ID in the Security and Compliance Center UI. For more information, see Building custom profiles.

View the details of a profile by providing the profile ID. You can find the profile ID in the Security and Compliance Center UI. For more information, see Building custom profiles.

View the details of a profile by providing the profile ID. You can find the profile ID in the Security and Compliance Center UI. For more information, see Building custom profiles.

View the details of a profile by providing the profile ID. You can find the profile ID in the Security and Compliance Center UI. For more information, see Building custom profiles.

View the details of a profile by providing the profile ID. You can find the profile ID in the Security and Compliance Center UI. For more information, see Building custom profiles.

GET /profiles/{profiles_id}
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) GetProfile(getProfileOptions *GetProfileOptions) (result *Profile, response *core.DetailedResponse, err error)
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) GetProfileWithContext(ctx context.Context, getProfileOptions *GetProfileOptions) (result *Profile, response *core.DetailedResponse, err error)
getProfile(params)
get_profile(
        self,
        profiles_id: str,
        *,
        x_correlation_id: str = None,
        x_request_id: str = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<Profile> getProfile(GetProfileOptions getProfileOptions)

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • compliance.posture-management.profiles-read

Auditing

Calling this method generates the following auditing event.

  • compliance.posture-management-profiles.read

Request

Instantiate the GetProfileOptions struct and set the fields to provide parameter values for the GetProfile method.

Use the GetProfileOptions.Builder to create a GetProfileOptions object that contains the parameter values for the getProfile method.

Custom Headers

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

Path Parameters

  • The profile ID.

    Possible values: length = 36, Value must match regular expression ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$

WithContext method only

The GetProfile options.

parameters

  • The profile ID.

    Possible values: length = 36, Value must match regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

parameters

  • The profile ID.

    Possible values: length = 36, Value must match regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

The getProfile options.

  • curl -X GET --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/profiles/{profiles_id}"
  • getProfileOptions := securityAndComplianceCenterApiService.NewGetProfileOptions(
      profileIdLink,
    )
    
    profile, response, err := securityAndComplianceCenterApiService.GetProfile(getProfileOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(profile, "", "  ")
    fmt.Println(string(b))
  • const params = {
      profilesId: profileIdLink,
    };
    
    let res;
    try {
      res = await securityAndComplianceCenterApiService.getProfile(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • response = security_and_compliance_center_api_service.get_profile(
      profiles_id=profile_id_link,
    )
    profile = response.get_result()
    
    print(json.dumps(profile, indent=2))
  • GetProfileOptions getProfileOptions = new GetProfileOptions.Builder()
      .profilesId(profileIdLink)
      .build();
    
    Response<Profile> response = securityAndComplianceCenterApiService.getProfile(getProfileOptions).execute();
    Profile profile = response.getResult();
    
    System.out.println(profile);

Response

The response body of the profile.

The response body of the profile.

Examples:
View

The response body of the profile.

Examples:
View

The response body of the profile.

Examples:
View

The response body of the profile.

Examples:
View

Status Code

  • The profile was successfully retrieved.

  • Your request is invalid.

  • Your request is unauthorized.

  • You are not allowed to access this resource.

  • The specified resource was not found.

  • Too many requests

  • Internal server error

  • A backend service that is required to complete the operation is unavailable. Try again later.

Example responses
  • {
      "id": "542b1aee-3ad8-49e9-a33c-44b64f117f18",
      "profile_name": "test_profile1",
      "profile_description": "test_description1",
      "profile_type": "custom",
      "profile_version": "1.0.0",
      "version_group_label": "string",
      "latest": true,
      "hierarchy_enabled": false,
      "created_by": "IBMid-6620049HI3",
      "created_on": "2023-02-09T10:54:59.000Z",
      "updated_by": "IBMid-6620049HI3",
      "updated_on": "2023-02-09T10:54:59.000Z",
      "controls_count": 1,
      "control_parents_count": 0,
      "attachments_count": 0,
      "controls": [
        {
          "control_name": "SC-7",
          "control_id": "1fa45e17-9322-4e6c-bbd6-1c51db08e790",
          "control_description": "Boundary Protection",
          "control_category": "System and Communications Protection",
          "control_parent": "",
          "control_requirement": true,
          "control_tags": [
            "1fa45e17-9322-4e6c-bbd6-1c51db08e790"
          ],
          "control_specifications_count": 1,
          "control_specifications": [
            {
              "control_specification_id": "5c7d6f88-a92f-4734-9b49-bd22b0900184",
              "responsibility": "user",
              "component_id": "iam-identity",
              "component_name": "IAM Identity Service",
              "environment": "ibm-cloud",
              "control_specification_description": "IBM cloud",
              "assessments": [
                {
                  "assessment_type": "Automated",
                  "assessment_method": "ibm-cloud-rule",
                  "assessment_id": "rule-a637949b-7e51-46c4-afd4-b96619001bf1",
                  "assessment_description": "Check that there is an Activity Tracker event route defined to collect global events generated by IBM Cloud services",
                  "parameters": [
                    {
                      "parameter_name": "session_invalidation_in_seconds",
                      "parameter_display_name": "Sign out due to inactivity in seconds",
                      "parameter_type": "numeric"
                    }
                  ]
                }
              ],
              "assessments_count": 1
            }
          ],
          "control_docs": {
            "control_docs_id": "sc-7",
            "control_docs_type": "ibm-cloud"
          },
          "status": "enabled"
        }
      ],
      "default_parameters": [
        {
          "assessment_type": "Automated",
          "assessment_id": "rule-a637949b-7e51-46c4-afd4-b96619001bf1",
          "parameter_name": "session_invalidation_in_seconds",
          "parameter_default_value": "120",
          "parameter_display_name": "Sign out due to inactivity in seconds",
          "parameter_type": "numeric"
        }
      ]
    }
  • {
      "id": "542b1aee-3ad8-49e9-a33c-44b64f117f18",
      "profile_name": "test_profile1",
      "profile_description": "test_description1",
      "profile_type": "custom",
      "profile_version": "1.0.0",
      "version_group_label": "string",
      "latest": true,
      "hierarchy_enabled": false,
      "created_by": "IBMid-6620049HI3",
      "created_on": "2023-02-09T10:54:59.000Z",
      "updated_by": "IBMid-6620049HI3",
      "updated_on": "2023-02-09T10:54:59.000Z",
      "controls_count": 1,
      "control_parents_count": 0,
      "attachments_count": 0,
      "controls": [
        {
          "control_name": "SC-7",
          "control_id": "1fa45e17-9322-4e6c-bbd6-1c51db08e790",
          "control_description": "Boundary Protection",
          "control_category": "System and Communications Protection",
          "control_parent": "",
          "control_requirement": true,
          "control_tags": [
            "1fa45e17-9322-4e6c-bbd6-1c51db08e790"
          ],
          "control_specifications_count": 1,
          "control_specifications": [
            {
              "control_specification_id": "5c7d6f88-a92f-4734-9b49-bd22b0900184",
              "responsibility": "user",
              "component_id": "iam-identity",
              "component_name": "IAM Identity Service",
              "environment": "ibm-cloud",
              "control_specification_description": "IBM cloud",
              "assessments": [
                {
                  "assessment_type": "Automated",
                  "assessment_method": "ibm-cloud-rule",
                  "assessment_id": "rule-a637949b-7e51-46c4-afd4-b96619001bf1",
                  "assessment_description": "Check that there is an Activity Tracker event route defined to collect global events generated by IBM Cloud services",
                  "parameters": [
                    {
                      "parameter_name": "session_invalidation_in_seconds",
                      "parameter_display_name": "Sign out due to inactivity in seconds",
                      "parameter_type": "numeric"
                    }
                  ]
                }
              ],
              "assessments_count": 1
            }
          ],
          "control_docs": {
            "control_docs_id": "sc-7",
            "control_docs_type": "ibm-cloud"
          },
          "status": "enabled"
        }
      ],
      "default_parameters": [
        {
          "assessment_type": "Automated",
          "assessment_id": "rule-a637949b-7e51-46c4-afd4-b96619001bf1",
          "parameter_name": "session_invalidation_in_seconds",
          "parameter_default_value": "120",
          "parameter_display_name": "Sign out due to inactivity in seconds",
          "parameter_type": "numeric"
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `attachment_id`s parameter is invalid.",
          "target": {
            "name": "attachment_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `attachment_id`s parameter is invalid.",
          "target": {
            "name": "attachment_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "You're not authorized to complete this request."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "You're not authorized to complete this request."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 404,
      "errors": [
        {
          "code": "attachment_not_found",
          "message": "The report for `attachment_id` '65810ac762004f22ac19f8f8edf70a34' is not found.",
          "target": {
            "name": "attachment_id",
            "type": "parameter",
            "value": "65810ac762004f22ac19f8f8edf70a34"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 404,
      "errors": [
        {
          "code": "attachment_not_found",
          "message": "The report for `attachment_id` '65810ac762004f22ac19f8f8edf70a34' is not found.",
          "target": {
            "name": "attachment_id",
            "type": "parameter",
            "value": "65810ac762004f22ac19f8f8edf70a34"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 500,
      "errors": [
        {
          "code": "internal_server_error",
          "message": "The server has encountered an unexpected internal error."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 500,
      "errors": [
        {
          "code": "internal_server_error",
          "message": "The server has encountered an unexpected internal error."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service that is required is unavailable. Try again later."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service that is required is unavailable. Try again later."
        }
      ]
    }

Update a profile

Update the details of a custom profile. With Security and Compliance Center, you can manage a profile that is specific to your usecase, by using an existing library as a starting point. For more information, see Building custom profiles.

Update the details of a custom profile. With Security and Compliance Center, you can manage a profile that is specific to your usecase, by using an existing library as a starting point. For more information, see Building custom profiles.

Update the details of a custom profile. With Security and Compliance Center, you can manage a profile that is specific to your usecase, by using an existing library as a starting point. For more information, see Building custom profiles.

Update the details of a custom profile. With Security and Compliance Center, you can manage a profile that is specific to your usecase, by using an existing library as a starting point. For more information, see Building custom profiles.

Update the details of a custom profile. With Security and Compliance Center, you can manage a profile that is specific to your usecase, by using an existing library as a starting point. For more information, see Building custom profiles.

PUT /profiles/{profiles_id}
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) ReplaceProfile(replaceProfileOptions *ReplaceProfileOptions) (result *Profile, response *core.DetailedResponse, err error)
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) ReplaceProfileWithContext(ctx context.Context, replaceProfileOptions *ReplaceProfileOptions) (result *Profile, response *core.DetailedResponse, err error)
replaceProfile(params)
replace_profile(
        self,
        profiles_id: str,
        profile_name: str,
        profile_description: str,
        profile_type: str,
        controls: List['ProfileControlsPrototype'],
        default_parameters: List['DefaultParametersPrototype'],
        *,
        x_correlation_id: str = None,
        x_request_id: str = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<Profile> replaceProfile(ReplaceProfileOptions replaceProfileOptions)

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • compliance.posture-management.profiles-update

Auditing

Calling this method generates the following auditing event.

  • compliance.posture-management-profiles.update

Request

Instantiate the ReplaceProfileOptions struct and set the fields to provide parameter values for the ReplaceProfile method.

Use the ReplaceProfileOptions.Builder to create a ReplaceProfileOptions object that contains the parameter values for the replaceProfile method.

Custom Headers

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

Path Parameters

  • The profile ID.

    Possible values: length = 36, Value must match regular expression ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$

The request payload to update a profile.

Examples:
View

WithContext method only

The ReplaceProfile options.

parameters

  • The profile ID.

    Possible values: length = 36, Value must match regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/

  • The name of the profile.

    Possible values: 2 ≤ length ≤ 64, Value must match regular expression /^[a-zA-Z0-9_\\s\\-]*$/

    Examples:
    value
    _source
    _lines
    _html
  • The description of the profile.

    Possible values: 2 ≤ length ≤ 256, Value must match regular expression /^[a-zA-Z0-9_,'\"\\s\\-\\[\\]]+$/

    Examples:
    value
    _source
    _lines
    _html
  • The profile type.

    Allowable values: [predefined,custom]

    Examples:
    value
    _source
    _lines
    _html
  • The controls that are in the profile.

    Possible values: 0 ≤ number of items ≤ 512

    Examples:
    value
    _source
    _lines
    _html
  • The default parameters of the profile.

    Possible values: 0 ≤ number of items ≤ 512

    Examples:
    value
    _source
    _lines
    _html
  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

parameters

  • The profile ID.

    Possible values: length = 36, Value must match regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/

  • The name of the profile.

    Possible values: 2 ≤ length ≤ 64, Value must match regular expression /^[a-zA-Z0-9_\\s\\-]*$/

    Examples:
    value
    _source
    _lines
    _html
  • The description of the profile.

    Possible values: 2 ≤ length ≤ 256, Value must match regular expression /^[a-zA-Z0-9_,'\"\\s\\-\\[\\]]+$/

    Examples:
    value
    _source
    _lines
    _html
  • The profile type.

    Allowable values: [predefined,custom]

    Examples:
    value
    _source
    _lines
    _html
  • The controls that are in the profile.

    Possible values: 0 ≤ number of items ≤ 512

    Examples:
    value
    _source
    _lines
    _html
  • The default parameters of the profile.

    Possible values: 0 ≤ number of items ≤ 512

    Examples:
    value
    _source
    _lines
    _html
  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

The replaceProfile options.

  • curl -X PUT --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{ "profile_name": "test_profile1", "profile_description": "test_description1", "profile_type": "custom", "profile_version": "1.0.0", "version_group_label": "58a5922f-0763-485b-91ef-92cca4125d9d", "controls": [ { "control_library_id": "e98a56ff-dc24-41d4-9875-1e188e2da6cd", "control_id": "1fa45e17-9322-4e6c-bbd6-1c51db08e790" } ], "default_parameters": [ { "assessment_type": "Automated", "assessment_id": "rule-a637949b-7e51-46c4-afd4-b96619001bf1", "parameter_name": "session_invalidation_in_seconds", "parameter_default_value": "120", "parameter_display_name": "Sign out due to inactivity in seconds", "parameter_type": "numeric" } ] }'   "{base_url}/profiles/{profiles_id}"
  • profileControlsPrototypeModel := &securityandcompliancecenterapiv3.ProfileControlsPrototype{
      ControlLibraryID: &controlLibraryIdLink,
      ControlID: core.StringPtr("1fa45e17-9322-4e6c-bbd6-1c51db08e790"),
    }
    
    defaultParametersPrototypeModel := &securityandcompliancecenterapiv3.DefaultParametersPrototype{
      AssessmentType: core.StringPtr("Automated"),
      AssessmentID: core.StringPtr("rule-a637949b-7e51-46c4-afd4-b96619001bf1"),
      ParameterName: core.StringPtr("session_invalidation_in_seconds"),
      ParameterDefaultValue: core.StringPtr("120"),
      ParameterDisplayName: core.StringPtr("Sign out due to inactivity in seconds"),
      ParameterType: core.StringPtr("numeric"),
    }
    
    replaceProfileOptions := securityAndComplianceCenterApiService.NewReplaceProfileOptions(
      profileIdLink,
      "test_profile1",
      "test_description1",
      "custom",
      []securityandcompliancecenterapiv3.ProfileControlsPrototype{*profileControlsPrototypeModel},
      []securityandcompliancecenterapiv3.DefaultParametersPrototype{*defaultParametersPrototypeModel},
    )
    
    profile, response, err := securityAndComplianceCenterApiService.ReplaceProfile(replaceProfileOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(profile, "", "  ")
    fmt.Println(string(b))
  • // Request models needed by this operation.
    
    // ProfileControlsPrototype
    const profileControlsPrototypeModel = {
      control_library_id: controlLibraryIdLink,
      control_id: '1fa45e17-9322-4e6c-bbd6-1c51db08e790',
    };
    
    // DefaultParametersPrototype
    const defaultParametersPrototypeModel = {
      assessment_type: 'Automated',
      assessment_id: 'rule-a637949b-7e51-46c4-afd4-b96619001bf1',
      parameter_name: 'session_invalidation_in_seconds',
      parameter_default_value: '120',
      parameter_display_name: 'Sign out due to inactivity in seconds',
      parameter_type: 'numeric',
    };
    
    const params = {
      profilesId: profileIdLink,
      profileName: 'test_profile1',
      profileDescription: 'test_description1',
      profileType: 'custom',
      controls: [profileControlsPrototypeModel],
      defaultParameters: [defaultParametersPrototypeModel],
    };
    
    let res;
    try {
      res = await securityAndComplianceCenterApiService.replaceProfile(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • profile_controls_prototype_model = {
      'control_library_id': control_library_id_link,
      'control_id': '1fa45e17-9322-4e6c-bbd6-1c51db08e790',
    }
    
    default_parameters_prototype_model = {
      'assessment_type': 'Automated',
      'assessment_id': 'rule-a637949b-7e51-46c4-afd4-b96619001bf1',
      'parameter_name': 'session_invalidation_in_seconds',
      'parameter_default_value': '120',
      'parameter_display_name': 'Sign out due to inactivity in seconds',
      'parameter_type': 'numeric',
    }
    
    response = security_and_compliance_center_api_service.replace_profile(
      profiles_id=profile_id_link,
      profile_name='test_profile1',
      profile_description='test_description1',
      profile_type='custom',
      controls=[profile_controls_prototype_model],
      default_parameters=[default_parameters_prototype_model],
    )
    profile = response.get_result()
    
    print(json.dumps(profile, indent=2))
  • ProfileControlsPrototype profileControlsPrototypeModel = new ProfileControlsPrototype.Builder()
      .controlLibraryId(controlLibraryIdLink)
      .controlId("1fa45e17-9322-4e6c-bbd6-1c51db08e790")
      .build();
    DefaultParametersPrototype defaultParametersPrototypeModel = new DefaultParametersPrototype.Builder()
      .assessmentType("Automated")
      .assessmentId("rule-a637949b-7e51-46c4-afd4-b96619001bf1")
      .parameterName("session_invalidation_in_seconds")
      .parameterDefaultValue("120")
      .parameterDisplayName("Sign out due to inactivity in seconds")
      .parameterType("numeric")
      .build();
    ReplaceProfileOptions replaceProfileOptions = new ReplaceProfileOptions.Builder()
      .profilesId(profileIdLink)
      .profileName("test_profile1")
      .profileDescription("test_description1")
      .profileType("custom")
      .controls(java.util.Arrays.asList(profileControlsPrototypeModel))
      .defaultParameters(java.util.Arrays.asList(defaultParametersPrototypeModel))
      .build();
    
    Response<Profile> response = securityAndComplianceCenterApiService.replaceProfile(replaceProfileOptions).execute();
    Profile profile = response.getResult();
    
    System.out.println(profile);

Response

The response body of the profile.

The response body of the profile.

Examples:
View

The response body of the profile.

Examples:
View

The response body of the profile.

Examples:
View

The response body of the profile.

Examples:
View

Status Code

  • The profile was updated successfully.

  • Your request is invalid.

  • Your request is unauthorized.

  • You are not allowed to access this resource.

  • The specified resource was not found.

  • Too many requests

  • Internal server error

  • A backend service that is required to complete the operation is unavailable. Try again later.

Example responses
  • {
      "id": "83397494-28bf-4ffe-9fd3-aa8c370ff829",
      "profile_name": "test_profile1",
      "profile_description": "test_description1",
      "profile_type": "custom",
      "profile_version": "1.0.0",
      "version_group_label": "string",
      "latest": true,
      "hierarchy_enabled": false,
      "created_by": "IBMid-6620049HI3",
      "created_on": "2023-02-09T10:54:59.000Z",
      "updated_by": "IBMid-6620049HI3",
      "updated_on": "2023-02-09T10:54:59.000Z",
      "controls_count": 1,
      "control_parents_count": 0,
      "attachments_count": 0,
      "controls": [
        {
          "control_name": "SC-7",
          "control_id": "1fa45e17-9322-4e6c-bbd6-1c51db08e790",
          "control_description": "Boundary Protection",
          "control_category": "System and Communications Protection",
          "control_parent": "SC",
          "control_requirement": true,
          "control_tags": [
            "1fa45e17-9322-4e6c-bbd6-1c51db08e790"
          ],
          "control_specifications_count": 1,
          "control_specifications": [
            {
              "control_specification_id": "5c7d6f88-a92f-4734-9b49-bd22b0900184",
              "responsibility": "user",
              "component_id": "iam-identity",
              "component_name": "IAM Identity Service",
              "environment": "ibm-cloud",
              "control_specification_description": "IBM cloud",
              "assessments": [
                {
                  "assessment_type": "Automated",
                  "assessment_method": "ibm-cloud-rule",
                  "assessment_id": "rule-a637949b-7e51-46c4-afd4-b96619001bf1",
                  "assessment_description": "Check that there is an Activity Tracker event route defined to collect global events generated by IBM Cloud services",
                  "parameters": [
                    {
                      "parameter_name": "session_invalidation_in_seconds",
                      "parameter_display_name": "Sign out due to inactivity in seconds",
                      "parameter_type": "numeric"
                    }
                  ]
                }
              ],
              "assessments_count": 1
            }
          ],
          "control_docs": {
            "control_docs_id": "sc-7",
            "control_docs_type": "ibm-cloud"
          },
          "status": "enabled"
        }
      ],
      "default_parameters": [
        {
          "assessment_type": "Automated",
          "assessment_id": "rule-a637949b-7e51-46c4-afd4-b96619001bf1",
          "parameter_name": "session_invalidation_in_seconds",
          "parameter_default_value": "120",
          "parameter_display_name": "Sign out due to inactivity in seconds",
          "parameter_type": "numeric"
        }
      ]
    }
  • {
      "id": "83397494-28bf-4ffe-9fd3-aa8c370ff829",
      "profile_name": "test_profile1",
      "profile_description": "test_description1",
      "profile_type": "custom",
      "profile_version": "1.0.0",
      "version_group_label": "string",
      "latest": true,
      "hierarchy_enabled": false,
      "created_by": "IBMid-6620049HI3",
      "created_on": "2023-02-09T10:54:59.000Z",
      "updated_by": "IBMid-6620049HI3",
      "updated_on": "2023-02-09T10:54:59.000Z",
      "controls_count": 1,
      "control_parents_count": 0,
      "attachments_count": 0,
      "controls": [
        {
          "control_name": "SC-7",
          "control_id": "1fa45e17-9322-4e6c-bbd6-1c51db08e790",
          "control_description": "Boundary Protection",
          "control_category": "System and Communications Protection",
          "control_parent": "SC",
          "control_requirement": true,
          "control_tags": [
            "1fa45e17-9322-4e6c-bbd6-1c51db08e790"
          ],
          "control_specifications_count": 1,
          "control_specifications": [
            {
              "control_specification_id": "5c7d6f88-a92f-4734-9b49-bd22b0900184",
              "responsibility": "user",
              "component_id": "iam-identity",
              "component_name": "IAM Identity Service",
              "environment": "ibm-cloud",
              "control_specification_description": "IBM cloud",
              "assessments": [
                {
                  "assessment_type": "Automated",
                  "assessment_method": "ibm-cloud-rule",
                  "assessment_id": "rule-a637949b-7e51-46c4-afd4-b96619001bf1",
                  "assessment_description": "Check that there is an Activity Tracker event route defined to collect global events generated by IBM Cloud services",
                  "parameters": [
                    {
                      "parameter_name": "session_invalidation_in_seconds",
                      "parameter_display_name": "Sign out due to inactivity in seconds",
                      "parameter_type": "numeric"
                    }
                  ]
                }
              ],
              "assessments_count": 1
            }
          ],
          "control_docs": {
            "control_docs_id": "sc-7",
            "control_docs_type": "ibm-cloud"
          },
          "status": "enabled"
        }
      ],
      "default_parameters": [
        {
          "assessment_type": "Automated",
          "assessment_id": "rule-a637949b-7e51-46c4-afd4-b96619001bf1",
          "parameter_name": "session_invalidation_in_seconds",
          "parameter_default_value": "120",
          "parameter_display_name": "Sign out due to inactivity in seconds",
          "parameter_type": "numeric"
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `attachment_id`s parameter is invalid.",
          "target": {
            "name": "attachment_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `attachment_id`s parameter is invalid.",
          "target": {
            "name": "attachment_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "You're not authorized to complete this request."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "You're not authorized to complete this request."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 404,
      "errors": [
        {
          "code": "attachment_not_found",
          "message": "The report for `attachment_id` '65810ac762004f22ac19f8f8edf70a34' is not found.",
          "target": {
            "name": "attachment_id",
            "type": "parameter",
            "value": "65810ac762004f22ac19f8f8edf70a34"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 404,
      "errors": [
        {
          "code": "attachment_not_found",
          "message": "The report for `attachment_id` '65810ac762004f22ac19f8f8edf70a34' is not found.",
          "target": {
            "name": "attachment_id",
            "type": "parameter",
            "value": "65810ac762004f22ac19f8f8edf70a34"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 500,
      "errors": [
        {
          "code": "internal_server_error",
          "message": "The server has encountered an unexpected internal error."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 500,
      "errors": [
        {
          "code": "internal_server_error",
          "message": "The server has encountered an unexpected internal error."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service that is required is unavailable. Try again later."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service that is required is unavailable. Try again later."
        }
      ]
    }

List rules

Retrieve all the rules that you use to target the exact configuration properties that you need to ensure are compliant. For more information, see Defining custom rules.

Retrieve all the rules that you use to target the exact configuration properties that you need to ensure are compliant. For more information, see Defining custom rules.

Retrieve all the rules that you use to target the exact configuration properties that you need to ensure are compliant. For more information, see Defining custom rules.

Retrieve all the rules that you use to target the exact configuration properties that you need to ensure are compliant. For more information, see Defining custom rules.

Retrieve all the rules that you use to target the exact configuration properties that you need to ensure are compliant. For more information, see Defining custom rules.

GET /rules
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) ListRules(listRulesOptions *ListRulesOptions) (result *RulesPageBase, response *core.DetailedResponse, err error)
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) ListRulesWithContext(ctx context.Context, listRulesOptions *ListRulesOptions) (result *RulesPageBase, response *core.DetailedResponse, err error)
listRules(params)
list_rules(
        self,
        *,
        x_correlation_id: str = None,
        x_request_id: str = None,
        type: str = None,
        search: str = None,
        service_name: str = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<RulesPageBase> listRules(ListRulesOptions listRulesOptions)

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • compliance.configuration-governance.rules-read

Auditing

Calling this method generates the following auditing event.

  • compliance.configuration-governance-rules.list

Request

Instantiate the ListRulesOptions struct and set the fields to provide parameter values for the ListRules method.

Use the ListRulesOptions.Builder to create a ListRulesOptions object that contains the parameter values for the listRules method.

Custom Headers

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

Query Parameters

  • The list of only user-defined, or system-defined rules.

    Possible values: 12 ≤ length ≤ 14, Value must match regular expression user_defined|system_defined

    Example: system_defined

  • The indication of whether to search for rules with a specific string string in the name, description, or labels.

    Possible values: 0 ≤ length ≤ 256, Value must match regular expression .*

  • Searches for rules targeting corresponding service.

    Possible values: 0 ≤ length ≤ 64, Value must match regular expression .*

WithContext method only

The ListRules options.

parameters

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The list of only user-defined, or system-defined rules.

    Possible values: 12 ≤ length ≤ 14, Value must match regular expression /user_defined|system_defined/

    Examples:
    value
    _source
    _lines
    _html
  • The indication of whether to search for rules with a specific string string in the name, description, or labels.

    Possible values: 0 ≤ length ≤ 256, Value must match regular expression /.*/

  • Searches for rules targeting corresponding service.

    Possible values: 0 ≤ length ≤ 64, Value must match regular expression /.*/

parameters

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The list of only user-defined, or system-defined rules.

    Possible values: 12 ≤ length ≤ 14, Value must match regular expression /user_defined|system_defined/

    Examples:
    value
    _source
    _lines
    _html
  • The indication of whether to search for rules with a specific string string in the name, description, or labels.

    Possible values: 0 ≤ length ≤ 256, Value must match regular expression /.*/

  • Searches for rules targeting corresponding service.

    Possible values: 0 ≤ length ≤ 64, Value must match regular expression /.*/

The listRules options.

  • curl -X GET --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/rules?type=system_defined"
  • listRulesOptions := securityAndComplianceCenterApiService.NewListRulesOptions()
    listRulesOptions.SetType("system_defined")
    
    rulesPageBase, response, err := securityAndComplianceCenterApiService.ListRules(listRulesOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(rulesPageBase, "", "  ")
    fmt.Println(string(b))
  • const params = {
      type: 'system_defined',
    };
    
    let res;
    try {
      res = await securityAndComplianceCenterApiService.listRules(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • response = security_and_compliance_center_api_service.list_rules(
      type='system_defined',
    )
    rules_page_base = response.get_result()
    
    print(json.dumps(rules_page_base, indent=2))
  • ListRulesOptions listRulesOptions = new ListRulesOptions.Builder()
      .type("system_defined")
      .build();
    
    Response<RulesPageBase> response = securityAndComplianceCenterApiService.listRules(listRulesOptions).execute();
    RulesPageBase rulesPageBase = response.getResult();
    
    System.out.println(rulesPageBase);

Response

Page common fields.

Page common fields.

Examples:
View

Page common fields.

Examples:
View

Page common fields.

Examples:
View

Page common fields.

Examples:
View

Status Code

  • The rules were retrieved successfully.

  • You are not authorized to make this request.

  • Forbidden. You are not allowed to make this request.

  • The specified resource could not be found.

Example responses
  • {
      "limit": 50,
      "total_count": 2,
      "first": {
        "href": "https://us-south.compliance.cloud.ibm.com/instances/7e9d0235-4d21-4c21-9c2d-da0ecb0b22f6/v3/rules?"
      },
      "next": {
        "href": "https://us-south.compliance.cloud.ibm.com/instances/7e9d0235-4d21-4c21-9c2d-da0ecb0b22f6/v3/rules?start=g1AAAAGSeJzLYWBgYM1gTmHQSklKzi9KdUhJMtJLytVNTtZNSU3JTE4sSU0xtDDSS87JL01JzCvRy0styQHqYUoyAJJJ9v___8_KYHKzf7BZ5wFQINGYHLPyWIAkQwOQAhrXDzbv0TwXkFiiA_nmTYCYNx9kngPD7VMOIPOcyDdvA8S8_WD33bNibACZJ0G-eR8g5kHC7xFbxgFw-GUBAIJ_f4I",
        "start": "g1AAAAGSeJzLYWBgYM1gTmHQSklKzi9KdUhJMtJLytVNTtZNSU3JTE4sSU0xtDDSS87JL01JzCvRy0styQHqYUoyAJJJ9v___8_KYHKzf7BZ5wFQINGYHLPyWIAkQwOQAhrXDzbv0TwXkFiiA_nmTYCYNx9kngPD7VMOIPOcyDdvA8S8_WD33bNibACZJ0G-eR8g5kHC7xFbxgFw-GUBAIJ_f4I"
      },
      "rules": [
        {
          "created_on": "2023-03-15T18:20:16.000Z",
          "created_by": "iam-ServiceId-1c858449-3537-45b8-9d39-2707115b4cc7",
          "updated_on": "2023-03-15T18:20:16.000Z",
          "updated_by": "iam-ServiceId-1c858449-3537-45b8-9d39-2707115b4cc7",
          "id": "rule-e701edb3-376c-47cf-9209-e75bdb702e19",
          "account_id": "130003ea8bfa43c5aacea07a86da3000",
          "description": "Example rule",
          "type": "user_defined",
          "version": "1.0.0",
          "import": {
            "parameters": [
              {
                "name": "hard_quota",
                "display_name": "The Cloud Object Storage bucket quota.",
                "description": "The maximum bytes that are allocated to the Cloud Object Storage bucket.",
                "type": "numeric"
              }
            ]
          },
          "target": {
            "service_name": "cloud-object-storage",
            "service_display_name": "Cloud Object Storage",
            "resource_kind": "bucket",
            "additional_target_attributes": []
          },
          "required_config": {
            "description": "The Cloud Object Storage rule.",
            "and": [
              {
                "property": "hard_quota",
                "operator": "num_equals",
                "value": 2
              }
            ]
          },
          "labels": []
        },
        {
          "created_on": "2022-10-04T12:31:19.000Z",
          "created_by": "IBM",
          "updated_on": "2023-03-10T13:05:47.000Z",
          "updated_by": "IBM",
          "id": "rule-4b059036-699f-4522-89ed-54c672cb7e65",
          "account_id": "IBM",
          "description": "IBM Cloud IAM establishes minimum and maximum lifetime restrictions, and reuse conditions for authenticators, such as API keys.",
          "type": "system_defined",
          "version": "1.0.0",
          "target": {
            "service_name": "iam-identity",
            "service_display_name": "IAM Identity Service",
            "resource_kind": "accountsettings",
            "additional_target_attributes": []
          },
          "required_config": {
            "and": [
              {
                "property": "ibm_iam_ibmid_lifetime_restrictions_enabled",
                "operator": "is_true",
                "value": true
              }
            ]
          },
          "labels": []
        }
      ]
    }
  • {
      "limit": 50,
      "total_count": 2,
      "first": {
        "href": "https://us-south.compliance.cloud.ibm.com/instances/7e9d0235-4d21-4c21-9c2d-da0ecb0b22f6/v3/rules?"
      },
      "next": {
        "href": "https://us-south.compliance.cloud.ibm.com/instances/7e9d0235-4d21-4c21-9c2d-da0ecb0b22f6/v3/rules?start=g1AAAAGSeJzLYWBgYM1gTmHQSklKzi9KdUhJMtJLytVNTtZNSU3JTE4sSU0xtDDSS87JL01JzCvRy0styQHqYUoyAJJJ9v___8_KYHKzf7BZ5wFQINGYHLPyWIAkQwOQAhrXDzbv0TwXkFiiA_nmTYCYNx9kngPD7VMOIPOcyDdvA8S8_WD33bNibACZJ0G-eR8g5kHC7xFbxgFw-GUBAIJ_f4I",
        "start": "g1AAAAGSeJzLYWBgYM1gTmHQSklKzi9KdUhJMtJLytVNTtZNSU3JTE4sSU0xtDDSS87JL01JzCvRy0styQHqYUoyAJJJ9v___8_KYHKzf7BZ5wFQINGYHLPyWIAkQwOQAhrXDzbv0TwXkFiiA_nmTYCYNx9kngPD7VMOIPOcyDdvA8S8_WD33bNibACZJ0G-eR8g5kHC7xFbxgFw-GUBAIJ_f4I"
      },
      "rules": [
        {
          "created_on": "2023-03-15T18:20:16.000Z",
          "created_by": "iam-ServiceId-1c858449-3537-45b8-9d39-2707115b4cc7",
          "updated_on": "2023-03-15T18:20:16.000Z",
          "updated_by": "iam-ServiceId-1c858449-3537-45b8-9d39-2707115b4cc7",
          "id": "rule-e701edb3-376c-47cf-9209-e75bdb702e19",
          "account_id": "130003ea8bfa43c5aacea07a86da3000",
          "description": "Example rule",
          "type": "user_defined",
          "version": "1.0.0",
          "import": {
            "parameters": [
              {
                "name": "hard_quota",
                "display_name": "The Cloud Object Storage bucket quota.",
                "description": "The maximum bytes that are allocated to the Cloud Object Storage bucket.",
                "type": "numeric"
              }
            ]
          },
          "target": {
            "service_name": "cloud-object-storage",
            "service_display_name": "Cloud Object Storage",
            "resource_kind": "bucket",
            "additional_target_attributes": []
          },
          "required_config": {
            "description": "The Cloud Object Storage rule.",
            "and": [
              {
                "property": "hard_quota",
                "operator": "num_equals",
                "value": 2
              }
            ]
          },
          "labels": []
        },
        {
          "created_on": "2022-10-04T12:31:19.000Z",
          "created_by": "IBM",
          "updated_on": "2023-03-10T13:05:47.000Z",
          "updated_by": "IBM",
          "id": "rule-4b059036-699f-4522-89ed-54c672cb7e65",
          "account_id": "IBM",
          "description": "IBM Cloud IAM establishes minimum and maximum lifetime restrictions, and reuse conditions for authenticators, such as API keys.",
          "type": "system_defined",
          "version": "1.0.0",
          "target": {
            "service_name": "iam-identity",
            "service_display_name": "IAM Identity Service",
            "resource_kind": "accountsettings",
            "additional_target_attributes": []
          },
          "required_config": {
            "and": [
              {
                "property": "ibm_iam_ibmid_lifetime_restrictions_enabled",
                "operator": "is_true",
                "value": true
              }
            ]
          },
          "labels": []
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "The request could not be authorized.",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "The request could not be authorized.",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }
  • {
      "status_code": 404,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "not_found",
          "message": "The requested resource was not found\"",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }
  • {
      "status_code": 404,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "not_found",
          "message": "The requested resource was not found\"",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }

Create a custom rule

Create a custom rule to to target the exact configuration properties that you need to evaluate your resources for compliance. For more information, see Defining custom rules.

Create a custom rule to to target the exact configuration properties that you need to evaluate your resources for compliance. For more information, see Defining custom rules.

Create a custom rule to to target the exact configuration properties that you need to evaluate your resources for compliance. For more information, see Defining custom rules.

Create a custom rule to to target the exact configuration properties that you need to evaluate your resources for compliance. For more information, see Defining custom rules.

Create a custom rule to to target the exact configuration properties that you need to evaluate your resources for compliance. For more information, see Defining custom rules.

POST /rules
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) CreateRule(createRuleOptions *CreateRuleOptions) (result *Rule, response *core.DetailedResponse, err error)
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) CreateRuleWithContext(ctx context.Context, createRuleOptions *CreateRuleOptions) (result *Rule, response *core.DetailedResponse, err error)
createRule(params)
create_rule(
        self,
        description: str,
        target: 'TargetPrototype',
        required_config: 'RequiredConfig',
        *,
        version: str = None,
        import_: 'Import' = None,
        labels: List[str] = None,
        x_correlation_id: str = None,
        x_request_id: str = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<Rule> createRule(CreateRuleOptions createRuleOptions)

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • compliance.configuration-governance.rules-create

Auditing

Calling this method generates the following auditing event.

  • compliance.configuration-governance-rules.create

Request

Instantiate the CreateRuleOptions struct and set the fields to provide parameter values for the CreateRule method.

Use the CreateRuleOptions.Builder to create a CreateRuleOptions object that contains the parameter values for the createRule method.

Custom Headers

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

The request body to create a custom rule.

Examples:
View

WithContext method only

The CreateRule options.

parameters

  • The rule description.

    Possible values: 0 ≤ length ≤ 512, Value must match regular expression /[A-Za-z0-9]+/

    Examples:
    value
    _source
    _lines
    _html
  • The rule target.

    Examples:
    View
  • The required configurations.

  • The rule version number.

    Possible values: 5 ≤ length ≤ 10, Value must match regular expression /^[0-9][0-9.]*$/

    Examples:
    value
    _source
    _lines
    _html
  • The collection of import parameters.

    Examples:
    View
  • The list of labels that correspond to a rule.

    Possible values: 0 ≤ number of items ≤ 32, 0 ≤ length ≤ 128, Value must match regular expression /[A-Za-z0-9]+/

    Examples:
    value
    _source
    _lines
    _html
  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

parameters

  • The rule description.

    Possible values: 0 ≤ length ≤ 512, Value must match regular expression /[A-Za-z0-9]+/

    Examples:
    value
    _source
    _lines
    _html
  • The rule target.

    Examples:
    View
  • The required configurations.

  • The rule version number.

    Possible values: 5 ≤ length ≤ 10, Value must match regular expression /^[0-9][0-9.]*$/

    Examples:
    value
    _source
    _lines
    _html
  • The collection of import parameters.

    Examples:
    View
  • The list of labels that correspond to a rule.

    Possible values: 0 ≤ number of items ≤ 32, 0 ≤ length ≤ 128, Value must match regular expression /[A-Za-z0-9]+/

    Examples:
    value
    _source
    _lines
    _html
  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

The createRule options.

  • curl -X POST --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{ "description": "Example rule", "import": { "parameters": [ { "name": "hard_quota", "display_name": "The Cloud Object Storage bucket quota.", "description": "The maximum bytes that are allocated to the Cloud Object Storage bucket.", "type": "numeric" } ] }, "target": { "service_name": "cloud-object-storage", "resource_kind": "bucket", "additional_target_attributes": [ { "name": "location", "operator": "string_equals", "value": "us-east" } ] }, "required_config": { "description": "The Cloud Object Storage rule.", "and": [ { "property": "hard_quota", "operator": "num_equals", "value": "{hard_quota}" } ] }, "labels":  ], "version": "1.0.0" }'   "{base_url}/rules"
  • additionalTargetAttributeModel := &securityandcompliancecenterapiv3.AdditionalTargetAttribute{
      Name: core.StringPtr("location"),
      Operator: core.StringPtr("string_equals"),
      Value: core.StringPtr("us-east"),
    }
    
    targetPrototypeModel := &securityandcompliancecenterapiv3.TargetPrototype{
      ServiceName: core.StringPtr("cloud-object-storage"),
      ResourceKind: core.StringPtr("bucket"),
      AdditionalTargetAttributes: []securityandcompliancecenterapiv3.AdditionalTargetAttribute{*additionalTargetAttributeModel},
    }
    
    requiredConfigItemsModel := &securityandcompliancecenterapiv3.RequiredConfigItemsRequiredConfigBase{
      Property: core.StringPtr("hard_quota"),
      Operator: core.StringPtr("num_equals"),
      Value: core.StringPtr("{hard_quota}"),
    }
    
    requiredConfigModel := &securityandcompliancecenterapiv3.RequiredConfigAnd{
      Description: core.StringPtr("The Cloud Object Storage rule."),
      And: []securityandcompliancecenterapiv3.RequiredConfigItemsIntf{requiredConfigItemsModel},
    }
    
    parameterModel := &securityandcompliancecenterapiv3.Parameter{
      Name: core.StringPtr("hard_quota"),
      DisplayName: core.StringPtr("The Cloud Object Storage bucket quota."),
      Description: core.StringPtr("The maximum bytes that are allocated to the Cloud Object Storage bucket."),
      Type: core.StringPtr("numeric"),
    }
    
    importModel := &securityandcompliancecenterapiv3.Import{
      Parameters: []securityandcompliancecenterapiv3.Parameter{*parameterModel},
    }
    
    createRuleOptions := securityAndComplianceCenterApiService.NewCreateRuleOptions(
      "Example rule",
      targetPrototypeModel,
      requiredConfigModel,
    )
    createRuleOptions.SetVersion("1.0.0")
    createRuleOptions.SetImport(importModel)
    createRuleOptions.SetLabels([]string{})
    
    rule, response, err := securityAndComplianceCenterApiService.CreateRule(createRuleOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(rule, "", "  ")
    fmt.Println(string(b))
  • // Request models needed by this operation.
    
    // AdditionalTargetAttribute
    const additionalTargetAttributeModel = {
      name: 'location',
      operator: 'string_equals',
      value: 'us-east',
    };
    
    // TargetPrototype
    const targetPrototypeModel = {
      service_name: 'cloud-object-storage',
      resource_kind: 'bucket',
      additional_target_attributes: [additionalTargetAttributeModel],
    };
    
    // RequiredConfigItemsRequiredConfigBase
    const requiredConfigItemsModel = {
      property: 'hard_quota',
      operator: 'num_equals',
      value: '{hard_quota}',
    };
    
    // RequiredConfigAnd
    const requiredConfigModel = {
      description: 'The Cloud Object Storage rule.',
      and: [requiredConfigItemsModel],
    };
    
    // Parameter
    const parameterModel = {
      name: 'hard_quota',
      display_name: 'The Cloud Object Storage bucket quota.',
      description: 'The maximum bytes that are allocated to the Cloud Object Storage bucket.',
      type: 'numeric',
    };
    
    // Import
    const importModel = {
      parameters: [parameterModel],
    };
    
    const params = {
      description: 'Example rule',
      target: targetPrototypeModel,
      requiredConfig: requiredConfigModel,
      version: '1.0.0',
      _import: importModel,
      labels: [],
    };
    
    let res;
    try {
      res = await securityAndComplianceCenterApiService.createRule(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • additional_target_attribute_model = {
      'name': 'location',
      'operator': 'string_equals',
      'value': 'us-east',
    }
    
    target_prototype_model = {
      'service_name': 'cloud-object-storage',
      'resource_kind': 'bucket',
      'additional_target_attributes': [additional_target_attribute_model],
    }
    
    required_config_items_model = {
      'property': 'hard_quota',
      'operator': 'num_equals',
      'value': '{hard_quota}',
    }
    
    required_config_model = {
      'description': 'The Cloud Object Storage rule.',
      'and': [required_config_items_model],
    }
    
    parameter_model = {
      'name': 'hard_quota',
      'display_name': 'The Cloud Object Storage bucket quota.',
      'description': 'The maximum bytes that are allocated to the Cloud Object Storage bucket.',
      'type': 'numeric',
    }
    
    import_model = {
      'parameters': [parameter_model],
    }
    
    response = security_and_compliance_center_api_service.create_rule(
      description='Example rule',
      target=target_prototype_model,
      required_config=required_config_model,
      version='1.0.0',
      import_=import_model,
      labels=[],
    )
    rule = response.get_result()
    
    print(json.dumps(rule, indent=2))
  • AdditionalTargetAttribute additionalTargetAttributeModel = new AdditionalTargetAttribute.Builder()
      .name("location")
      .operator("string_equals")
      .value("us-east")
      .build();
    TargetPrototype targetPrototypeModel = new TargetPrototype.Builder()
      .serviceName("cloud-object-storage")
      .resourceKind("bucket")
      .additionalTargetAttributes(java.util.Arrays.asList(additionalTargetAttributeModel))
      .build();
    RequiredConfigItemsRequiredConfigBase requiredConfigItemsModel = new RequiredConfigItemsRequiredConfigBase.Builder()
      .property("hard_quota")
      .operator("num_equals")
      .value("{hard_quota}")
      .build();
    RequiredConfigAnd requiredConfigModel = new RequiredConfigAnd.Builder()
      .description("The Cloud Object Storage rule.")
      .and(java.util.Arrays.asList(requiredConfigItemsModel))
      .build();
    Parameter parameterModel = new Parameter.Builder()
      .name("hard_quota")
      .displayName("The Cloud Object Storage bucket quota.")
      .description("The maximum bytes that are allocated to the Cloud Object Storage bucket.")
      .type("numeric")
      .build();
    Import importModel = new Import.Builder()
      .parameters(java.util.Arrays.asList(parameterModel))
      .build();
    CreateRuleOptions createRuleOptions = new CreateRuleOptions.Builder()
      .description("Example rule")
      .target(targetPrototypeModel)
      .requiredConfig(requiredConfigModel)
      .version("1.0.0")
      .xImport(importModel)
      .labels(java.util.Arrays.asList())
      .build();
    
    Response<Rule> response = securityAndComplianceCenterApiService.createRule(createRuleOptions).execute();
    Rule rule = response.getResult();
    
    System.out.println(rule);

Response

The rule response that corresponds to an account instance.

The rule response that corresponds to an account instance.

Examples:
View

The rule response that corresponds to an account instance.

Examples:
View

The rule response that corresponds to an account instance.

Examples:
View

The rule response that corresponds to an account instance.

Examples:
View

Status Code

  • The rule was created successfully.

  • You are not authorized to make this request.

  • Forbidden. You are not allowed to make this request.

  • The specified resource could not be found.

Example responses
  • {
      "created_on": "2023-04-21T14:58:27.000Z",
      "created_by": "iam-ServiceId-1c858449-3537-45b8-9d39-2707115b4cc7",
      "updated_on": "2023-04-21T14:58:27.000Z",
      "updated_by": "iam-ServiceId-1c858449-3537-45b8-9d39-2707115b4cc7",
      "id": "rule-cd6f5601-a008-4f6f-bcd6-9af884eea2d6",
      "account_id": "130003ea8bfa43c5aacea07a86da3000",
      "description": "Example rule",
      "type": "user_defined",
      "version": "1.0.0",
      "import": {
        "parameters": [
          {
            "name": "hard_quota",
            "display_name": "The Cloud Object Storage bucket quota.",
            "description": "The maximum bytes that are allocated to the Cloud Object Storage bucket.",
            "type": "numeric"
          }
        ]
      },
      "target": {
        "service_name": "cloud-object-storage",
        "resource_kind": "bucket",
        "additional_target_attributes": []
      },
      "required_config": {
        "description": "The Cloud Object Storage rule.",
        "and": [
          {
            "property": "hard_quota",
            "operator": "num_equals",
            "value": 2
          }
        ]
      },
      "labels": []
    }
  • {
      "created_on": "2023-04-21T14:58:27.000Z",
      "created_by": "iam-ServiceId-1c858449-3537-45b8-9d39-2707115b4cc7",
      "updated_on": "2023-04-21T14:58:27.000Z",
      "updated_by": "iam-ServiceId-1c858449-3537-45b8-9d39-2707115b4cc7",
      "id": "rule-cd6f5601-a008-4f6f-bcd6-9af884eea2d6",
      "account_id": "130003ea8bfa43c5aacea07a86da3000",
      "description": "Example rule",
      "type": "user_defined",
      "version": "1.0.0",
      "import": {
        "parameters": [
          {
            "name": "hard_quota",
            "display_name": "The Cloud Object Storage bucket quota.",
            "description": "The maximum bytes that are allocated to the Cloud Object Storage bucket.",
            "type": "numeric"
          }
        ]
      },
      "target": {
        "service_name": "cloud-object-storage",
        "resource_kind": "bucket",
        "additional_target_attributes": []
      },
      "required_config": {
        "description": "The Cloud Object Storage rule.",
        "and": [
          {
            "property": "hard_quota",
            "operator": "num_equals",
            "value": 2
          }
        ]
      },
      "labels": []
    }
  • {
      "status_code": 401,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "The request could not be authorized.",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "The request could not be authorized.",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }
  • {
      "status_code": 404,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "not_found",
          "message": "The requested resource was not found\"",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }
  • {
      "status_code": 404,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "not_found",
          "message": "The requested resource was not found\"",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }

Delete a custom rule

Delete a custom rule that you no longer require to evaluate your resources. For more information, see Defining custom rules.

Delete a custom rule that you no longer require to evaluate your resources. For more information, see Defining custom rules.

Delete a custom rule that you no longer require to evaluate your resources. For more information, see Defining custom rules.

Delete a custom rule that you no longer require to evaluate your resources. For more information, see Defining custom rules.

Delete a custom rule that you no longer require to evaluate your resources. For more information, see Defining custom rules.

DELETE /rules/{rule_id}
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) DeleteRule(deleteRuleOptions *DeleteRuleOptions) (response *core.DetailedResponse, err error)
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) DeleteRuleWithContext(ctx context.Context, deleteRuleOptions *DeleteRuleOptions) (response *core.DetailedResponse, err error)
deleteRule(params)
delete_rule(
        self,
        rule_id: str,
        *,
        x_correlation_id: str = None,
        x_request_id: str = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<Void> deleteRule(DeleteRuleOptions deleteRuleOptions)

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • compliance.configuration-governance.rules-delete

Auditing

Calling this method generates the following auditing event.

  • compliance.configuration-governance-rules.delete

Request

Instantiate the DeleteRuleOptions struct and set the fields to provide parameter values for the DeleteRule method.

Use the DeleteRuleOptions.Builder to create a DeleteRuleOptions object that contains the parameter values for the deleteRule method.

Custom Headers

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

Path Parameters

  • The ID of the corresponding rule.

    Possible values: length = 41, Value must match regular expression rule-[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}

WithContext method only

The DeleteRule options.

parameters

  • The ID of the corresponding rule.

    Possible values: length = 41, Value must match regular expression /rule-[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

parameters

  • The ID of the corresponding rule.

    Possible values: length = 41, Value must match regular expression /rule-[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

The deleteRule options.

  • curl -X DELETE --location --header "Authorization: Bearer {iam_token}"   "{base_url}/rules/{rule_id}"
  • deleteRuleOptions := securityAndComplianceCenterApiService.NewDeleteRuleOptions(
      ruleIdLink,
    )
    
    response, err := securityAndComplianceCenterApiService.DeleteRule(deleteRuleOptions)
    if err != nil {
      panic(err)
    }
    if response.StatusCode != 204 {
      fmt.Printf("\nUnexpected response status code received from DeleteRule(): %d\n", response.StatusCode)
    }
  • const params = {
      ruleId: ruleIdLink,
    };
    
    try {
      await securityAndComplianceCenterApiService.deleteRule(params);
    } catch (err) {
      console.warn(err);
    }
  • response = security_and_compliance_center_api_service.delete_rule(
      rule_id=rule_id_link,
    )
  • DeleteRuleOptions deleteRuleOptions = new DeleteRuleOptions.Builder()
      .ruleId(ruleIdLink)
      .build();
    
    Response<Void> response = securityAndComplianceCenterApiService.deleteRule(deleteRuleOptions).execute();

Response

Status Code

  • The rule was deleted successfully.

  • You are not authorized to make this request.

  • Forbidden. You are not allowed to make this request.

  • The specified resource could not be found.

Example responses
  • {
      "status_code": 401,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "The request could not be authorized.",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "The request could not be authorized.",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }
  • {
      "status_code": 404,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "not_found",
          "message": "The requested resource was not found\"",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }
  • {
      "status_code": 404,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "not_found",
          "message": "The requested resource was not found\"",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }

Get a custom rule

Retrieve a rule that you created to evaluate your resources. For more information, see Defining custom rules.

Retrieve a rule that you created to evaluate your resources. For more information, see Defining custom rules.

Retrieve a rule that you created to evaluate your resources. For more information, see Defining custom rules.

Retrieve a rule that you created to evaluate your resources. For more information, see Defining custom rules.

Retrieve a rule that you created to evaluate your resources. For more information, see Defining custom rules.

GET /rules/{rule_id}
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) GetRule(getRuleOptions *GetRuleOptions) (result *Rule, response *core.DetailedResponse, err error)
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) GetRuleWithContext(ctx context.Context, getRuleOptions *GetRuleOptions) (result *Rule, response *core.DetailedResponse, err error)
getRule(params)
get_rule(
        self,
        rule_id: str,
        *,
        x_correlation_id: str = None,
        x_request_id: str = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<Rule> getRule(GetRuleOptions getRuleOptions)

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • compliance.configuration-governance.rules-read

Auditing

Calling this method generates the following auditing event.

  • compliance.configuration-governance-rules.read

Request

Instantiate the GetRuleOptions struct and set the fields to provide parameter values for the GetRule method.

Use the GetRuleOptions.Builder to create a GetRuleOptions object that contains the parameter values for the getRule method.

Custom Headers

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

Path Parameters

  • The ID of the corresponding rule.

    Possible values: length = 41, Value must match regular expression rule-[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}

WithContext method only

The GetRule options.

parameters

  • The ID of the corresponding rule.

    Possible values: length = 41, Value must match regular expression /rule-[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

parameters

  • The ID of the corresponding rule.

    Possible values: length = 41, Value must match regular expression /rule-[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

The getRule options.

  • curl -X GET --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/rules/{rule_id}"
  • getRuleOptions := securityAndComplianceCenterApiService.NewGetRuleOptions(
      ruleIdLink,
    )
    
    rule, response, err := securityAndComplianceCenterApiService.GetRule(getRuleOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(rule, "", "  ")
    fmt.Println(string(b))
  • const params = {
      ruleId: ruleIdLink,
    };
    
    let res;
    try {
      res = await securityAndComplianceCenterApiService.getRule(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • response = security_and_compliance_center_api_service.get_rule(
      rule_id=rule_id_link,
    )
    rule = response.get_result()
    
    print(json.dumps(rule, indent=2))
  • GetRuleOptions getRuleOptions = new GetRuleOptions.Builder()
      .ruleId(ruleIdLink)
      .build();
    
    Response<Rule> response = securityAndComplianceCenterApiService.getRule(getRuleOptions).execute();
    Rule rule = response.getResult();
    
    System.out.println(rule);

Response

The rule response that corresponds to an account instance.

The rule response that corresponds to an account instance.

Examples:
View

The rule response that corresponds to an account instance.

Examples:
View

The rule response that corresponds to an account instance.

Examples:
View

The rule response that corresponds to an account instance.

Examples:
View

Status Code

  • The rule was retrieved successfully.

  • You are not authorized to make this request.

  • Forbidden. You are not allowed to make this request.

  • The specified resource could not be found.

Example responses
  • {
      "created_on": "2023-03-15T18:20:16.000Z",
      "created_by": "iam-ServiceId-1c858449-3537-45b8-9d39-2707115b4cc7",
      "updated_on": "2023-03-15T18:20:16.000Z",
      "updated_by": "iam-ServiceId-1c858449-3537-45b8-9d39-2707115b4cc7",
      "id": "rule-e701edb3-376c-47cf-9209-e75bdb702e19",
      "account_id": "130003ea8bfa43c5aacea07a86da3000",
      "description": "Example rule",
      "type": "user_defined",
      "version": "1.0.0",
      "import": {
        "parameters": [
          {
            "name": "hard_quota",
            "display_name": "The Cloud Object Storage bucket quota.",
            "description": "The maximum bytes that are allocated to the Cloud Object Storage bucket.",
            "type": "numeric"
          }
        ]
      },
      "target": {
        "service_name": "cloud-object-storage",
        "service_display_name": "Cloud Object Storage",
        "resource_kind": "bucket",
        "additional_target_attributes": []
      },
      "required_config": {
        "description": "The Cloud Object Storage rule.",
        "and": [
          {
            "property": "hard_quota",
            "operator": "num_equals",
            "value": "${hard_quota}"
          }
        ]
      },
      "labels": []
    }
  • {
      "created_on": "2023-03-15T18:20:16.000Z",
      "created_by": "iam-ServiceId-1c858449-3537-45b8-9d39-2707115b4cc7",
      "updated_on": "2023-03-15T18:20:16.000Z",
      "updated_by": "iam-ServiceId-1c858449-3537-45b8-9d39-2707115b4cc7",
      "id": "rule-e701edb3-376c-47cf-9209-e75bdb702e19",
      "account_id": "130003ea8bfa43c5aacea07a86da3000",
      "description": "Example rule",
      "type": "user_defined",
      "version": "1.0.0",
      "import": {
        "parameters": [
          {
            "name": "hard_quota",
            "display_name": "The Cloud Object Storage bucket quota.",
            "description": "The maximum bytes that are allocated to the Cloud Object Storage bucket.",
            "type": "numeric"
          }
        ]
      },
      "target": {
        "service_name": "cloud-object-storage",
        "service_display_name": "Cloud Object Storage",
        "resource_kind": "bucket",
        "additional_target_attributes": []
      },
      "required_config": {
        "description": "The Cloud Object Storage rule.",
        "and": [
          {
            "property": "hard_quota",
            "operator": "num_equals",
            "value": "${hard_quota}"
          }
        ]
      },
      "labels": []
    }
  • {
      "status_code": 401,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "The request could not be authorized.",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "The request could not be authorized.",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }
  • {
      "status_code": 404,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "not_found",
          "message": "The requested resource was not found\"",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }
  • {
      "status_code": 404,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "not_found",
          "message": "The requested resource was not found\"",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }

Update a custom rule

Update a custom rule that you use to target the exact configuration properties that you need to evaluate your resources for compliance. For more information, see Defining custom rules.

Update a custom rule that you use to target the exact configuration properties that you need to evaluate your resources for compliance. For more information, see Defining custom rules.

Update a custom rule that you use to target the exact configuration properties that you need to evaluate your resources for compliance. For more information, see Defining custom rules.

Update a custom rule that you use to target the exact configuration properties that you need to evaluate your resources for compliance. For more information, see Defining custom rules.

Update a custom rule that you use to target the exact configuration properties that you need to evaluate your resources for compliance. For more information, see Defining custom rules.

PUT /rules/{rule_id}
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) ReplaceRule(replaceRuleOptions *ReplaceRuleOptions) (result *Rule, response *core.DetailedResponse, err error)
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) ReplaceRuleWithContext(ctx context.Context, replaceRuleOptions *ReplaceRuleOptions) (result *Rule, response *core.DetailedResponse, err error)
replaceRule(params)
replace_rule(
        self,
        rule_id: str,
        if_match: str,
        description: str,
        target: 'TargetPrototype',
        required_config: 'RequiredConfig',
        *,
        version: str = None,
        import_: 'Import' = None,
        labels: List[str] = None,
        x_correlation_id: str = None,
        x_request_id: str = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<Rule> replaceRule(ReplaceRuleOptions replaceRuleOptions)

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • compliance.configuration-governance.rules-update

Auditing

Calling this method generates the following auditing event.

  • compliance.configuration-governance-rules.update

Request

Instantiate the ReplaceRuleOptions struct and set the fields to provide parameter values for the ReplaceRule method.

Use the ReplaceRuleOptions.Builder to create a ReplaceRuleOptions object that contains the parameter values for the replaceRule method.

Custom Headers

  • This field 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.

    To find the Etag value, run a GET request on the resource that you want to modify, and check the response headers.

    Possible values: 4 ≤ length ≤ 128, Value must match regular expression W/"[^"]*"

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

Path Parameters

  • The ID of the corresponding rule.

    Possible values: length = 41, Value must match regular expression rule-[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}

The request body to update a custom rule.

Examples:
View

WithContext method only

The ReplaceRule options.

parameters

  • The ID of the corresponding rule.

    Possible values: length = 41, Value must match regular expression /rule-[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}/

  • This field 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.

    To find the Etag value, run a GET request on the resource that you want to modify, and check the response headers.

    Possible values: 4 ≤ length ≤ 128, Value must match regular expression /W\/\"[^\"]*\"/

  • The rule description.

    Possible values: 0 ≤ length ≤ 512, Value must match regular expression /[A-Za-z0-9]+/

    Examples:
    value
    _source
    _lines
    _html
  • The rule target.

    Examples:
    View
  • The required configurations.

  • The rule version number.

    Possible values: 5 ≤ length ≤ 10, Value must match regular expression /^[0-9][0-9.]*$/

    Examples:
    value
    _source
    _lines
    _html
  • The collection of import parameters.

    Examples:
    View
  • The list of labels that correspond to a rule.

    Possible values: 0 ≤ number of items ≤ 32, 0 ≤ length ≤ 128, Value must match regular expression /[A-Za-z0-9]+/

    Examples:
    value
    _source
    _lines
    _html
  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

parameters

  • The ID of the corresponding rule.

    Possible values: length = 41, Value must match regular expression /rule-[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}/

  • This field 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.

    To find the Etag value, run a GET request on the resource that you want to modify, and check the response headers.

    Possible values: 4 ≤ length ≤ 128, Value must match regular expression /W\/\"[^\"]*\"/

  • The rule description.

    Possible values: 0 ≤ length ≤ 512, Value must match regular expression /[A-Za-z0-9]+/

    Examples:
    value
    _source
    _lines
    _html
  • The rule target.

    Examples:
    View
  • The required configurations.

  • The rule version number.

    Possible values: 5 ≤ length ≤ 10, Value must match regular expression /^[0-9][0-9.]*$/

    Examples:
    value
    _source
    _lines
    _html
  • The collection of import parameters.

    Examples:
    View
  • The list of labels that correspond to a rule.

    Possible values: 0 ≤ number of items ≤ 32, 0 ≤ length ≤ 128, Value must match regular expression /[A-Za-z0-9]+/

    Examples:
    value
    _source
    _lines
    _html
  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

The replaceRule options.

  • curl -X PUT --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   --header "If-Match: eTagLink"   --header "Content-Type: application/json"   --data '{ "description": "Example rule", "import": { "parameters": [ { "name": "hard_quota", "display_name": "The Cloud Object Storage bucket quota.", "description": "The maximum bytes that are allocated to the Cloud Object Storage bucket.", "type": "numeric" } ] }, "target": { "service_name": "cloud-object-storage", "service_display_name": "Cloud Object Storage", "resource_kind": "bucket", "additional_target_attributes": [ { "name": "location", "operator": "string_equals", "value": "us-south" } ] }, "required_config": { "description": "The Cloud Object Storage rule.", "and": [ { "property": "hard_quota", "operator": "num_equals", "value": "{hard_quota}" } ] }, "labels":  ], "version": "1.0.1" }'   "{base_url}/rules/{rule_id}"
  • additionalTargetAttributeModel := &securityandcompliancecenterapiv3.AdditionalTargetAttribute{
      Name: core.StringPtr("location"),
      Operator: core.StringPtr("string_equals"),
      Value: core.StringPtr("us-south"),
    }
    
    targetPrototypeModel := &securityandcompliancecenterapiv3.TargetPrototype{
      ServiceName: core.StringPtr("cloud-object-storage"),
      ResourceKind: core.StringPtr("bucket"),
      AdditionalTargetAttributes: []securityandcompliancecenterapiv3.AdditionalTargetAttribute{*additionalTargetAttributeModel},
    }
    
    requiredConfigItemsModel := &securityandcompliancecenterapiv3.RequiredConfigItemsRequiredConfigBase{
      Property: core.StringPtr("hard_quota"),
      Operator: core.StringPtr("num_equals"),
      Value: core.StringPtr("{hard_quota}"),
    }
    
    requiredConfigModel := &securityandcompliancecenterapiv3.RequiredConfigAnd{
      Description: core.StringPtr("The Cloud Object Storage rule."),
      And: []securityandcompliancecenterapiv3.RequiredConfigItemsIntf{requiredConfigItemsModel},
    }
    
    parameterModel := &securityandcompliancecenterapiv3.Parameter{
      Name: core.StringPtr("hard_quota"),
      DisplayName: core.StringPtr("The Cloud Object Storage bucket quota."),
      Description: core.StringPtr("The maximum bytes that are allocated to the Cloud Object Storage bucket."),
      Type: core.StringPtr("numeric"),
    }
    
    importModel := &securityandcompliancecenterapiv3.Import{
      Parameters: []securityandcompliancecenterapiv3.Parameter{*parameterModel},
    }
    
    replaceRuleOptions := securityAndComplianceCenterApiService.NewReplaceRuleOptions(
      ruleIdLink,
      eTagLink,
      "Example rule",
      targetPrototypeModel,
      requiredConfigModel,
    )
    replaceRuleOptions.SetVersion("1.0.1")
    replaceRuleOptions.SetImport(importModel)
    replaceRuleOptions.SetLabels([]string{})
    
    rule, response, err := securityAndComplianceCenterApiService.ReplaceRule(replaceRuleOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(rule, "", "  ")
    fmt.Println(string(b))
  • // Request models needed by this operation.
    
    // AdditionalTargetAttribute
    const additionalTargetAttributeModel = {
      name: 'location',
      operator: 'string_equals',
      value: 'us-south',
    };
    
    // TargetPrototype
    const targetPrototypeModel = {
      service_name: 'cloud-object-storage',
      resource_kind: 'bucket',
      additional_target_attributes: [additionalTargetAttributeModel],
    };
    
    // RequiredConfigItemsRequiredConfigBase
    const requiredConfigItemsModel = {
      property: 'hard_quota',
      operator: 'num_equals',
      value: '{hard_quota}',
    };
    
    // RequiredConfigAnd
    const requiredConfigModel = {
      description: 'The Cloud Object Storage rule.',
      and: [requiredConfigItemsModel],
    };
    
    // Parameter
    const parameterModel = {
      name: 'hard_quota',
      display_name: 'The Cloud Object Storage bucket quota.',
      description: 'The maximum bytes that are allocated to the Cloud Object Storage bucket.',
      type: 'numeric',
    };
    
    // Import
    const importModel = {
      parameters: [parameterModel],
    };
    
    const params = {
      ruleId: ruleIdLink,
      ifMatch: eTagLink,
      description: 'Example rule',
      target: targetPrototypeModel,
      requiredConfig: requiredConfigModel,
      version: '1.0.1',
      _import: importModel,
      labels: [],
    };
    
    let res;
    try {
      res = await securityAndComplianceCenterApiService.replaceRule(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • additional_target_attribute_model = {
      'name': 'location',
      'operator': 'string_equals',
      'value': 'us-south',
    }
    
    target_prototype_model = {
      'service_name': 'cloud-object-storage',
      'resource_kind': 'bucket',
      'additional_target_attributes': [additional_target_attribute_model],
    }
    
    required_config_items_model = {
      'property': 'hard_quota',
      'operator': 'num_equals',
      'value': '{hard_quota}',
    }
    
    required_config_model = {
      'description': 'The Cloud Object Storage rule.',
      'and': [required_config_items_model],
    }
    
    parameter_model = {
      'name': 'hard_quota',
      'display_name': 'The Cloud Object Storage bucket quota.',
      'description': 'The maximum bytes that are allocated to the Cloud Object Storage bucket.',
      'type': 'numeric',
    }
    
    import_model = {
      'parameters': [parameter_model],
    }
    
    response = security_and_compliance_center_api_service.replace_rule(
      rule_id=rule_id_link,
      if_match=e_tag_link,
      description='Example rule',
      target=target_prototype_model,
      required_config=required_config_model,
      version='1.0.1',
      import_=import_model,
      labels=[],
    )
    rule = response.get_result()
    
    print(json.dumps(rule, indent=2))
  • AdditionalTargetAttribute additionalTargetAttributeModel = new AdditionalTargetAttribute.Builder()
      .name("location")
      .operator("string_equals")
      .value("us-south")
      .build();
    TargetPrototype targetPrototypeModel = new TargetPrototype.Builder()
      .serviceName("cloud-object-storage")
      .resourceKind("bucket")
      .additionalTargetAttributes(java.util.Arrays.asList(additionalTargetAttributeModel))
      .build();
    RequiredConfigItemsRequiredConfigBase requiredConfigItemsModel = new RequiredConfigItemsRequiredConfigBase.Builder()
      .property("hard_quota")
      .operator("num_equals")
      .value("{hard_quota}")
      .build();
    RequiredConfigAnd requiredConfigModel = new RequiredConfigAnd.Builder()
      .description("The Cloud Object Storage rule.")
      .and(java.util.Arrays.asList(requiredConfigItemsModel))
      .build();
    Parameter parameterModel = new Parameter.Builder()
      .name("hard_quota")
      .displayName("The Cloud Object Storage bucket quota.")
      .description("The maximum bytes that are allocated to the Cloud Object Storage bucket.")
      .type("numeric")
      .build();
    Import importModel = new Import.Builder()
      .parameters(java.util.Arrays.asList(parameterModel))
      .build();
    ReplaceRuleOptions replaceRuleOptions = new ReplaceRuleOptions.Builder()
      .ruleId(ruleIdLink)
      .ifMatch(eTagLink)
      .description("Example rule")
      .target(targetPrototypeModel)
      .requiredConfig(requiredConfigModel)
      .version("1.0.1")
      .xImport(importModel)
      .labels(java.util.Arrays.asList())
      .build();
    
    Response<Rule> response = securityAndComplianceCenterApiService.replaceRule(replaceRuleOptions).execute();
    Rule rule = response.getResult();
    
    System.out.println(rule);

Response

The rule response that corresponds to an account instance.

The rule response that corresponds to an account instance.

Examples:
View

The rule response that corresponds to an account instance.

Examples:
View

The rule response that corresponds to an account instance.

Examples:
View

The rule response that corresponds to an account instance.

Examples:
View

Status Code

  • The rule was updated successfully.

  • You are not authorized to make this request.

  • Forbidden. You are not allowed to make this request.

  • The specified resource could not be found.

Example responses
  • {
      "created_on": "2023-03-15T18:20:16.000Z",
      "created_by": "iam-ServiceId-1c858449-3537-45b8-9d39-2707115b4cc7",
      "updated_on": "2023-03-15T18:20:16.000Z",
      "updated_by": "iam-ServiceId-1c858449-3537-45b8-9d39-2707115b4cc7",
      "id": "rule-e701edb3-376c-47cf-9209-e75bdb702e19",
      "account_id": "130003ea8bfa43c5aacea07a86da3000",
      "description": "Example rule",
      "type": "user_defined",
      "version": "1.0.1",
      "import": {
        "parameters": [
          {
            "name": "hard_quota",
            "display_name": "The Cloud Object Storage bucket quota.",
            "description": "The maximum bytes that are allocated to the Cloud Object Storage bucket.",
            "type": "numeric"
          }
        ]
      },
      "target": {
        "service_name": "cloud-object-storage",
        "service_display_name": "Cloud Object Storage",
        "resource_kind": "bucket",
        "additional_target_attributes": []
      },
      "required_config": {
        "description": "The Cloud Object Storage rule.",
        "and": [
          {
            "property": "hard_quota",
            "operator": "num_equals",
            "value": 2
          }
        ]
      },
      "labels": []
    }
  • {
      "created_on": "2023-03-15T18:20:16.000Z",
      "created_by": "iam-ServiceId-1c858449-3537-45b8-9d39-2707115b4cc7",
      "updated_on": "2023-03-15T18:20:16.000Z",
      "updated_by": "iam-ServiceId-1c858449-3537-45b8-9d39-2707115b4cc7",
      "id": "rule-e701edb3-376c-47cf-9209-e75bdb702e19",
      "account_id": "130003ea8bfa43c5aacea07a86da3000",
      "description": "Example rule",
      "type": "user_defined",
      "version": "1.0.1",
      "import": {
        "parameters": [
          {
            "name": "hard_quota",
            "display_name": "The Cloud Object Storage bucket quota.",
            "description": "The maximum bytes that are allocated to the Cloud Object Storage bucket.",
            "type": "numeric"
          }
        ]
      },
      "target": {
        "service_name": "cloud-object-storage",
        "service_display_name": "Cloud Object Storage",
        "resource_kind": "bucket",
        "additional_target_attributes": []
      },
      "required_config": {
        "description": "The Cloud Object Storage rule.",
        "and": [
          {
            "property": "hard_quota",
            "operator": "num_equals",
            "value": 2
          }
        ]
      },
      "labels": []
    }
  • {
      "status_code": 401,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "The request could not be authorized.",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "The request could not be authorized.",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }
  • {
      "status_code": 404,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "not_found",
          "message": "The requested resource was not found\"",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }
  • {
      "status_code": 404,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "not_found",
          "message": "The requested resource was not found\"",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }

List attachments to a profile

View all of the attachments that are linked to a specific profile. An attachment is the association between the set of resources that you want to evaluate and a profile that contains the specific controls that you want to use. For more information, see Running an evaluation for IBM Cloud.

View all of the attachments that are linked to a specific profile. An attachment is the association between the set of resources that you want to evaluate and a profile that contains the specific controls that you want to use. For more information, see Running an evaluation for IBM Cloud.

View all of the attachments that are linked to a specific profile. An attachment is the association between the set of resources that you want to evaluate and a profile that contains the specific controls that you want to use. For more information, see Running an evaluation for IBM Cloud.

View all of the attachments that are linked to a specific profile. An attachment is the association between the set of resources that you want to evaluate and a profile that contains the specific controls that you want to use. For more information, see Running an evaluation for IBM Cloud.

View all of the attachments that are linked to a specific profile. An attachment is the association between the set of resources that you want to evaluate and a profile that contains the specific controls that you want to use. For more information, see Running an evaluation for IBM Cloud.

GET /profiles/{profiles_id}/attachments
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) ListAttachments(listAttachmentsOptions *ListAttachmentsOptions) (result *AttachmentCollection, response *core.DetailedResponse, err error)
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) ListAttachmentsWithContext(ctx context.Context, listAttachmentsOptions *ListAttachmentsOptions) (result *AttachmentCollection, response *core.DetailedResponse, err error)
listAttachments(params)
list_attachments(
        self,
        profiles_id: str,
        *,
        x_correlation_id: str = None,
        x_request_id: str = None,
        limit: int = None,
        start: str = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<AttachmentCollection> listAttachments(ListAttachmentsOptions listAttachmentsOptions)

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • compliance.posture-management.attachments-read

Auditing

Calling this method generates the following auditing event.

  • compliance.posture-management-profiles-attachments.list

Request

Instantiate the ListAttachmentsOptions struct and set the fields to provide parameter values for the ListAttachments method.

Use the ListAttachmentsOptions.Builder to create a ListAttachmentsOptions object that contains the parameter values for the listAttachments method.

Custom Headers

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

Path Parameters

  • The profile ID.

    Possible values: length = 36, Value must match regular expression ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$

Query Parameters

  • The indication of how many resources to return, unless the response is the last page of resources.

    Possible values: 0 ≤ value ≤ 100

    Default: 50

  • Determine what resource to start the page on or after.

    Possible values: 0 ≤ length ≤ 1024, Value must match regular expression .*

WithContext method only

The ListAttachments options.

parameters

  • The profile ID.

    Possible values: length = 36, Value must match regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The indication of how many resources to return, unless the response is the last page of resources.

    Possible values: 0 ≤ value ≤ 100

    Default: 50

  • Determine what resource to start the page on or after.

    Possible values: 0 ≤ length ≤ 1024, Value must match regular expression /.*/

parameters

  • The profile ID.

    Possible values: length = 36, Value must match regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The indication of how many resources to return, unless the response is the last page of resources.

    Possible values: 0 ≤ value ≤ 100

    Default: 50

  • Determine what resource to start the page on or after.

    Possible values: 0 ≤ length ≤ 1024, Value must match regular expression /.*/

The listAttachments options.

  • curl -X GET --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/profiles/{profiles_id}/attachments"
  • listAttachmentsOptions := &securityandcompliancecenterapiv3.ListAttachmentsOptions{
      ProfilesID: &profileIdLink,
      XCorrelationID: core.StringPtr("testString"),
      XRequestID: core.StringPtr("testString"),
      Limit: core.Int64Ptr(int64(10)),
    }
    
    pager, err := securityAndComplianceCenterApiService.NewAttachmentsPager(listAttachmentsOptions)
    if err != nil {
      panic(err)
    }
    
    var allResults []securityandcompliancecenterapiv3.AttachmentItem
    for pager.HasNext() {
      nextPage, err := pager.GetNext()
      if err != nil {
        panic(err)
      }
      allResults = append(allResults, nextPage...)
    }
    b, _ := json.MarshalIndent(allResults, "", "  ")
    fmt.Println(string(b))
  • const params = {
      profilesId: profileIdLink,
      xCorrelationId: 'testString',
      xRequestId: 'testString',
      limit: 10,
    };
    
    const allResults = [];
    try {
      const pager = new SecurityAndComplianceCenterApiV3.AttachmentsPager(securityAndComplianceCenterApiService, params);
      while (pager.hasNext()) {
        const nextPage = await pager.getNext();
        expect(nextPage).not.toBeNull();
        allResults.push(...nextPage);
      }
      console.log(JSON.stringify(allResults, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • all_results = []
    pager = AttachmentsPager(
      client=security_and_compliance_center_api_service,
      profiles_id=profile_id_link,
      x_correlation_id='testString',
      x_request_id='testString',
      limit=10,
    )
    while pager.has_next():
      next_page = pager.get_next()
      assert next_page is not None
      all_results.extend(next_page)
    
    print(json.dumps(all_results, indent=2))
  • ListAttachmentsOptions listAttachmentsOptions = new ListAttachmentsOptions.Builder()
      .profilesId(profileIdLink)
      .xCorrelationId("testString")
      .xRequestId("testString")
      .limit(Long.valueOf("10"))
      .build();
    
    AttachmentsPager pager = new AttachmentsPager(securityAndComplianceCenterApiService, listAttachmentsOptions);
    List<AttachmentItem> allResults = new ArrayList<>();
    while (pager.hasNext()) {
      List<AttachmentItem> nextPage = pager.getNext();
      allResults.addAll(nextPage);
    }
    
    System.out.println(GsonSingleton.getGson().toJson(allResults));

Response

The response body of an attachment.

The response body of an attachment.

Examples:
View

The response body of an attachment.

Examples:
View

The response body of an attachment.

Examples:
View

The response body of an attachment.

Examples:
View

Status Code

  • The attachments were successfully retrieved.

  • Your request is invalid.

  • Your request is unauthorized.

  • You are not allowed to access this resource.

  • The specified resource was not found.

  • Too many requests

  • Internal server error

  • A backend service that is required to complete the operation is unavailable. Try again later.

Example responses
  • {
      "limit": 25,
      "total_count": 1,
      "first": {
        "href": "https://us-east.compliance.cloud.ibm.com/instances/6d5v891d-1f45-60a5-5b55-6hh6a82f2680/v3/control_libraries?account_id=cg3335893hh1428692d6747cf300yeb5&limit=25"
      },
      "next": {
        "href": ""
      },
      "attachments": [
        {
          "id": "0b7f7314e8a4206d62853c18011e5af8",
          "profile_id": "542b1aee-3ad8-49e9-a33c-44b64f117f18",
          "account_id": "cg3335893hh1428692d6747cf300yeb5",
          "instance_id": "edf9524f-406c-412c-acbb-ee371a5cabda",
          "name": "account-0d8c3805dfea40aa8ad02265a18eb12b",
          "description": "Test description",
          "scope": [
            {
              "environment": "ibm-cloud",
              "properties": [
                {
                  "name": "scope_id",
                  "value": "cg3335893hh1428692d6747cf300yeb5"
                },
                {
                  "name": "scope_type",
                  "value": "account"
                }
              ]
            }
          ],
          "created_by": "IBMid-6620049HI3",
          "created_on": "2023-02-09T10:54:59.000Z",
          "updated_by": "IBMid-6620049HI3",
          "updated_on": "2023-02-09T10:54:59.000Z",
          "status": "enabled",
          "schedule": "every_30_days",
          "notifications": {
            "enabled": false,
            "controls": {
              "threshold_limit": 15,
              "failed_control_ids": []
            }
          },
          "attachment_parameters": [
            {
              "assessment_type": "Automated",
              "assessment_id": "rule-a637949b-7e51-46c4-afd4-b96619001bf1",
              "parameter_name": "session_invalidation_in_seconds",
              "parameter_default_value": "120",
              "parameter_display_name": "Sign out due to inactivity in seconds",
              "parameter_type": "numeric"
            }
          ],
          "last_scan": {
            "id": "0fd7e758-3ab3-492b-8b0d-0cd8ef3569d7",
            "status": "in_progress",
            "time": "2023-06-13T12:08:18.000Z"
          },
          "next_scan_time": "2023-06-13T13:08:18.000Z"
        }
      ]
    }
  • {
      "limit": 25,
      "total_count": 1,
      "first": {
        "href": "https://us-east.compliance.cloud.ibm.com/instances/6d5v891d-1f45-60a5-5b55-6hh6a82f2680/v3/control_libraries?account_id=cg3335893hh1428692d6747cf300yeb5&limit=25"
      },
      "next": {
        "href": ""
      },
      "attachments": [
        {
          "id": "0b7f7314e8a4206d62853c18011e5af8",
          "profile_id": "542b1aee-3ad8-49e9-a33c-44b64f117f18",
          "account_id": "cg3335893hh1428692d6747cf300yeb5",
          "instance_id": "edf9524f-406c-412c-acbb-ee371a5cabda",
          "name": "account-0d8c3805dfea40aa8ad02265a18eb12b",
          "description": "Test description",
          "scope": [
            {
              "environment": "ibm-cloud",
              "properties": [
                {
                  "name": "scope_id",
                  "value": "cg3335893hh1428692d6747cf300yeb5"
                },
                {
                  "name": "scope_type",
                  "value": "account"
                }
              ]
            }
          ],
          "created_by": "IBMid-6620049HI3",
          "created_on": "2023-02-09T10:54:59.000Z",
          "updated_by": "IBMid-6620049HI3",
          "updated_on": "2023-02-09T10:54:59.000Z",
          "status": "enabled",
          "schedule": "every_30_days",
          "notifications": {
            "enabled": false,
            "controls": {
              "threshold_limit": 15,
              "failed_control_ids": []
            }
          },
          "attachment_parameters": [
            {
              "assessment_type": "Automated",
              "assessment_id": "rule-a637949b-7e51-46c4-afd4-b96619001bf1",
              "parameter_name": "session_invalidation_in_seconds",
              "parameter_default_value": "120",
              "parameter_display_name": "Sign out due to inactivity in seconds",
              "parameter_type": "numeric"
            }
          ],
          "last_scan": {
            "id": "0fd7e758-3ab3-492b-8b0d-0cd8ef3569d7",
            "status": "in_progress",
            "time": "2023-06-13T12:08:18.000Z"
          },
          "next_scan_time": "2023-06-13T13:08:18.000Z"
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `attachment_id`s parameter is invalid.",
          "target": {
            "name": "attachment_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `attachment_id`s parameter is invalid.",
          "target": {
            "name": "attachment_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "You're not authorized to complete this request."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "You're not authorized to complete this request."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 404,
      "errors": [
        {
          "code": "attachment_not_found",
          "message": "The report for `attachment_id` '65810ac762004f22ac19f8f8edf70a34' is not found.",
          "target": {
            "name": "attachment_id",
            "type": "parameter",
            "value": "65810ac762004f22ac19f8f8edf70a34"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 404,
      "errors": [
        {
          "code": "attachment_not_found",
          "message": "The report for `attachment_id` '65810ac762004f22ac19f8f8edf70a34' is not found.",
          "target": {
            "name": "attachment_id",
            "type": "parameter",
            "value": "65810ac762004f22ac19f8f8edf70a34"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 500,
      "errors": [
        {
          "code": "internal_server_error",
          "message": "The server has encountered an unexpected internal error."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 500,
      "errors": [
        {
          "code": "internal_server_error",
          "message": "The server has encountered an unexpected internal error."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service that is required is unavailable. Try again later."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service that is required is unavailable. Try again later."
        }
      ]
    }

Create an attachment

Create an attachment to link to a profile to schedule evaluations of your resources on a recurring schedule, or on-demand. For more information, see Running an evaluation for IBM Cloud.

Create an attachment to link to a profile to schedule evaluations of your resources on a recurring schedule, or on-demand. For more information, see Running an evaluation for IBM Cloud.

Create an attachment to link to a profile to schedule evaluations of your resources on a recurring schedule, or on-demand. For more information, see Running an evaluation for IBM Cloud.

Create an attachment to link to a profile to schedule evaluations of your resources on a recurring schedule, or on-demand. For more information, see Running an evaluation for IBM Cloud.

Create an attachment to link to a profile to schedule evaluations of your resources on a recurring schedule, or on-demand. For more information, see Running an evaluation for IBM Cloud.

POST /profiles/{profiles_id}/attachments
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) CreateAttachment(createAttachmentOptions *CreateAttachmentOptions) (result *AttachmentPrototype, response *core.DetailedResponse, err error)
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) CreateAttachmentWithContext(ctx context.Context, createAttachmentOptions *CreateAttachmentOptions) (result *AttachmentPrototype, response *core.DetailedResponse, err error)
createAttachment(params)
create_attachment(
        self,
        profiles_id: str,
        attachments: List['AttachmentsPrototype'],
        *,
        profile_id: str = None,
        x_correlation_id: str = None,
        x_request_id: str = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<AttachmentPrototype> createAttachment(CreateAttachmentOptions createAttachmentOptions)

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • compliance.posture-management.attachments-create

Auditing

Calling this method generates the following auditing event.

  • compliance.posture-management-profiles-attachments.create

Request

Instantiate the CreateAttachmentOptions struct and set the fields to provide parameter values for the CreateAttachment method.

Use the CreateAttachmentOptions.Builder to create a CreateAttachmentOptions object that contains the parameter values for the createAttachment method.

Custom Headers

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

Path Parameters

  • The profile ID.

    Possible values: length = 36, Value must match regular expression ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$

The request payload to create an attachment.

Examples:
View

WithContext method only

The CreateAttachment options.

parameters

  • The profile ID.

    Possible values: length = 36, Value must match regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/

  • The array that displays all of the available attachments.

    Possible values: 0 ≤ number of items ≤ 50

    Examples:
    value
    _source
    _lines
    _html
  • The ID of the profile that is specified in the attachment.

    Possible values: length = 36, Value must match regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

parameters

  • The profile ID.

    Possible values: length = 36, Value must match regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/

  • The array that displays all of the available attachments.

    Possible values: 0 ≤ number of items ≤ 50

    Examples:
    value
    _source
    _lines
    _html
  • The ID of the profile that is specified in the attachment.

    Possible values: length = 36, Value must match regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

The createAttachment options.

  • curl -X POST --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{ "attachments": [ { "name": "account-0d8c3805dfea40aa8ad02265a18eb12b", "description": "Test description", "status": "enabled", "schedule": "every_30_days", "scope": [ { "environment": "ibm-cloud", "properties": [ { "name": "scope_id", "value": "cg3335893hh1428692d6747cf300yeb5" }, { "name": "scope_type", "value": "account" } ] } ], "notifications": { "enabled": false, "controls": { "threshold_limit": 15, "failed_control_ids":  ] } }, "attachment_parameters": [ { "assessment_type": "Automated", "assessment_id": "rule-a637949b-7e51-46c4-afd4-b96619001bf1", "parameter_name": "session_invalidation_in_seconds", "parameter_value": "120", "parameter_display_name": "Sign out due to inactivity in seconds", "parameter_type": "numeric" } ] } ] }'   "{base_url}/profiles/{profiles_id}/attachments"
  • propertyItemModel := &securityandcompliancecenterapiv3.PropertyItem{
      Name: core.StringPtr("scope_id"),
      Value: core.StringPtr("cg3335893hh1428692d6747cf300yeb5"),
    }
    
    multiCloudScopeModel := &securityandcompliancecenterapiv3.MultiCloudScope{
      Environment: core.StringPtr("ibm-cloud"),
      Properties: []securityandcompliancecenterapiv3.PropertyItem{*propertyItemModel},
    }
    
    failedControlsModel := &securityandcompliancecenterapiv3.FailedControls{
      ThresholdLimit: core.Int64Ptr(int64(15)),
      FailedControlIds: []string{},
    }
    
    attachmentsNotificationsPrototypeModel := &securityandcompliancecenterapiv3.AttachmentsNotificationsPrototype{
      Enabled: core.BoolPtr(false),
      Controls: failedControlsModel,
    }
    
    attachmentParameterPrototypeModel := &securityandcompliancecenterapiv3.AttachmentParameterPrototype{
      AssessmentType: core.StringPtr("Automated"),
      AssessmentID: core.StringPtr("rule-a637949b-7e51-46c4-afd4-b96619001bf1"),
      ParameterName: core.StringPtr("session_invalidation_in_seconds"),
      ParameterValue: core.StringPtr("120"),
      ParameterDisplayName: core.StringPtr("Sign out due to inactivity in seconds"),
      ParameterType: core.StringPtr("numeric"),
    }
    
    attachmentsPrototypeModel := &securityandcompliancecenterapiv3.AttachmentsPrototype{
      Name: core.StringPtr("account-0d8c3805dfea40aa8ad02265a18eb12b"),
      Description: core.StringPtr("Test description"),
      Scope: []securityandcompliancecenterapiv3.MultiCloudScope{*multiCloudScopeModel},
      Status: core.StringPtr("enabled"),
      Schedule: core.StringPtr("every_30_days"),
      Notifications: attachmentsNotificationsPrototypeModel,
      AttachmentParameters: []securityandcompliancecenterapiv3.AttachmentParameterPrototype{*attachmentParameterPrototypeModel},
    }
    
    createAttachmentOptions := securityAndComplianceCenterApiService.NewCreateAttachmentOptions(
      profileIdLink,
      []securityandcompliancecenterapiv3.AttachmentsPrototype{*attachmentsPrototypeModel},
    )
    
    attachmentPrototype, response, err := securityAndComplianceCenterApiService.CreateAttachment(createAttachmentOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(attachmentPrototype, "", "  ")
    fmt.Println(string(b))
  • // Request models needed by this operation.
    
    // PropertyItem
    const propertyItemModel = {
      name: 'scope_id',
      value: 'cg3335893hh1428692d6747cf300yeb5',
    };
    
    // MultiCloudScope
    const multiCloudScopeModel = {
      environment: 'ibm-cloud',
      properties: [propertyItemModel],
    };
    
    // FailedControls
    const failedControlsModel = {
      threshold_limit: 15,
      failed_control_ids: [],
    };
    
    // AttachmentsNotificationsPrototype
    const attachmentsNotificationsPrototypeModel = {
      enabled: false,
      controls: failedControlsModel,
    };
    
    // AttachmentParameterPrototype
    const attachmentParameterPrototypeModel = {
      assessment_type: 'Automated',
      assessment_id: 'rule-a637949b-7e51-46c4-afd4-b96619001bf1',
      parameter_name: 'session_invalidation_in_seconds',
      parameter_value: '120',
      parameter_display_name: 'Sign out due to inactivity in seconds',
      parameter_type: 'numeric',
    };
    
    // AttachmentsPrototype
    const attachmentsPrototypeModel = {
      name: 'account-0d8c3805dfea40aa8ad02265a18eb12b',
      description: 'Test description',
      scope: [multiCloudScopeModel],
      status: 'enabled',
      schedule: 'every_30_days',
      notifications: attachmentsNotificationsPrototypeModel,
      attachment_parameters: [attachmentParameterPrototypeModel],
    };
    
    const params = {
      profilesId: profileIdLink,
      attachments: [attachmentsPrototypeModel],
    };
    
    let res;
    try {
      res = await securityAndComplianceCenterApiService.createAttachment(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • property_item_model = {
      'name': 'scope_id',
      'value': 'cg3335893hh1428692d6747cf300yeb5',
    }
    
    multi_cloud_scope_model = {
      'environment': 'ibm-cloud',
      'properties': [property_item_model],
    }
    
    failed_controls_model = {
      'threshold_limit': 15,
      'failed_control_ids': [],
    }
    
    attachments_notifications_prototype_model = {
      'enabled': False,
      'controls': failed_controls_model,
    }
    
    attachment_parameter_prototype_model = {
      'assessment_type': 'Automated',
      'assessment_id': 'rule-a637949b-7e51-46c4-afd4-b96619001bf1',
      'parameter_name': 'session_invalidation_in_seconds',
      'parameter_value': '120',
      'parameter_display_name': 'Sign out due to inactivity in seconds',
      'parameter_type': 'numeric',
    }
    
    attachments_prototype_model = {
      'name': 'account-0d8c3805dfea40aa8ad02265a18eb12b',
      'description': 'Test description',
      'scope': [multi_cloud_scope_model],
      'status': 'enabled',
      'schedule': 'every_30_days',
      'notifications': attachments_notifications_prototype_model,
      'attachment_parameters': [attachment_parameter_prototype_model],
    }
    
    response = security_and_compliance_center_api_service.create_attachment(
      profiles_id=profile_id_link,
      attachments=[attachments_prototype_model],
    )
    attachment_prototype = response.get_result()
    
    print(json.dumps(attachment_prototype, indent=2))
  • PropertyItem propertyItemModel = new PropertyItem.Builder()
      .name("scope_id")
      .value("cg3335893hh1428692d6747cf300yeb5")
      .build();
    MultiCloudScope multiCloudScopeModel = new MultiCloudScope.Builder()
      .environment("ibm-cloud")
      .xProperties(java.util.Arrays.asList(propertyItemModel))
      .build();
    FailedControls failedControlsModel = new FailedControls.Builder()
      .thresholdLimit(Long.valueOf("15"))
      .failedControlIds(java.util.Arrays.asList())
      .build();
    AttachmentsNotificationsPrototype attachmentsNotificationsPrototypeModel = new AttachmentsNotificationsPrototype.Builder()
      .enabled(false)
      .controls(failedControlsModel)
      .build();
    AttachmentParameterPrototype attachmentParameterPrototypeModel = new AttachmentParameterPrototype.Builder()
      .assessmentType("Automated")
      .assessmentId("rule-a637949b-7e51-46c4-afd4-b96619001bf1")
      .parameterName("session_invalidation_in_seconds")
      .parameterValue("120")
      .parameterDisplayName("Sign out due to inactivity in seconds")
      .parameterType("numeric")
      .build();
    AttachmentsPrototype attachmentsPrototypeModel = new AttachmentsPrototype.Builder()
      .name("account-0d8c3805dfea40aa8ad02265a18eb12b")
      .description("Test description")
      .scope(java.util.Arrays.asList(multiCloudScopeModel))
      .status("enabled")
      .schedule("every_30_days")
      .notifications(attachmentsNotificationsPrototypeModel)
      .attachmentParameters(java.util.Arrays.asList(attachmentParameterPrototypeModel))
      .build();
    CreateAttachmentOptions createAttachmentOptions = new CreateAttachmentOptions.Builder()
      .profilesId(profileIdLink)
      .attachments(java.util.Arrays.asList(attachmentsPrototypeModel))
      .build();
    
    Response<AttachmentPrototype> response = securityAndComplianceCenterApiService.createAttachment(createAttachmentOptions).execute();
    AttachmentPrototype attachmentPrototype = response.getResult();
    
    System.out.println(attachmentPrototype);

Response

The request body of getting an attachment that is associated with your account.

The request body of getting an attachment that is associated with your account.

Examples:
View

The request body of getting an attachment that is associated with your account.

Examples:
View

The request body of getting an attachment that is associated with your account.

Examples:
View

The request body of getting an attachment that is associated with your account.

Examples:
View

Status Code

  • The attachments were created successfully

  • Your request is invalid.

  • Your request is unauthorized.

  • You are not allowed to access this resource.

  • The specified resource was not found.

  • Too many requests

  • Internal server error

  • A backend service that is required to complete the operation is unavailable. Try again later.

Example responses
  • {
      "profile_id": "542b1aee-3ad8-49e9-a33c-44b64f117f18",
      "attachments": [
        {
          "id": "0b7f7314e8a4206d62853c18011e5af8",
          "profile_id": "542b1aee-3ad8-49e9-a33c-44b64f117f18",
          "account_id": "cg3335893hh1428692d6747cf300yeb5",
          "instance_id": "edf9524f-406c-412c-acbb-ee371a5cabda",
          "scope": [
            {
              "environment": "ibm-cloud",
              "properties": [
                {
                  "name": "scope_id",
                  "value": "cg3335893hh1428692d6747cf300yeb5"
                },
                {
                  "name": "scope_type",
                  "value": "account"
                }
              ]
            }
          ],
          "created_by": "IBMid-6620049HI3",
          "created_on": "2023-02-09T10:54:59.000Z",
          "updated_by": "IBMid-6620049HI3",
          "updated_on": "2023-02-09T10:54:59.000Z",
          "status": "enabled",
          "schedule": "every_30_days",
          "notifications": {
            "enabled": false,
            "controls": {
              "threshold_limit": 15,
              "failed_control_ids": []
            }
          },
          "attachment_parameters": [
            {
              "assessment_type": "Automated",
              "assessment_id": "rule-a637949b-7e51-46c4-afd4-b96619001bf1",
              "parameter_name": "session_invalidation_in_seconds",
              "parameter_default_value": "120",
              "parameter_display_name": "Sign out due to inactivity in seconds",
              "parameter_type": "numeric"
            }
          ],
          "last_scan": {
            "id": "0fd7e758-3ab3-492b-8b0d-0cd8ef3569d7",
            "status": "in_progress",
            "time": "2023-06-13T12:08:18.000Z"
          },
          "next_scan_time": "2023-06-13T13:08:18.000Z",
          "name": "account-0d8c3805dfea40aa8ad02265a18eb12b"
        },
        {
          "id": "0b7f7314e8a4206d62853c18011e5af8",
          "profile_id": "542b1aee-3ad8-49e9-a33c-44b64f117f18",
          "account_id": "cg3335893hh1428692d6747cf300yeb5",
          "instance_id": "edf9524f-406c-412c-acbb-ee371a5cabda",
          "scope": [
            {
              "environment": "ibm-cloud",
              "properties": [
                {
                  "name": "542b1aee-3ad8-49e9-a33c-44b64f117f18",
                  "value": "account.resource_group"
                }
              ]
            }
          ],
          "created_by": "IBMid-6620049HI3",
          "created_on": "2023-02-09T10:54:59.000Z",
          "updated_by": "IBMid-6620049HI3",
          "updated_on": "2023-02-09T10:54:59.000Z",
          "status": "enabled",
          "schedule": "every_30_days",
          "notifications": {
            "enabled": false,
            "controls": {
              "threshold_limit": 15,
              "failed_control_ids": []
            }
          },
          "attachment_parameters": [
            {
              "assessment_type": "Automated",
              "assessment_id": "rule-a637949b-7e51-46c4-afd4-b96619001bf1",
              "parameter_name": "session_invalidation_in_seconds",
              "parameter_default_value": "120",
              "parameter_display_name": "Sign out due to inactivity in seconds",
              "parameter_type": "numeric"
            }
          ],
          "last_scan": {
            "id": "0fd7e758-3ab3-492b-8b0d-0cd8ef3569d7",
            "status": "in_progress",
            "time": "2023-06-13T12:08:18.000Z"
          },
          "next_scan_time": "2023-06-13T13:08:18.000Z",
          "name": "account-0d8c3805dfea40aa8ad02265a18eb12b"
        }
      ]
    }
  • {
      "profile_id": "542b1aee-3ad8-49e9-a33c-44b64f117f18",
      "attachments": [
        {
          "id": "0b7f7314e8a4206d62853c18011e5af8",
          "profile_id": "542b1aee-3ad8-49e9-a33c-44b64f117f18",
          "account_id": "cg3335893hh1428692d6747cf300yeb5",
          "instance_id": "edf9524f-406c-412c-acbb-ee371a5cabda",
          "scope": [
            {
              "environment": "ibm-cloud",
              "properties": [
                {
                  "name": "scope_id",
                  "value": "cg3335893hh1428692d6747cf300yeb5"
                },
                {
                  "name": "scope_type",
                  "value": "account"
                }
              ]
            }
          ],
          "created_by": "IBMid-6620049HI3",
          "created_on": "2023-02-09T10:54:59.000Z",
          "updated_by": "IBMid-6620049HI3",
          "updated_on": "2023-02-09T10:54:59.000Z",
          "status": "enabled",
          "schedule": "every_30_days",
          "notifications": {
            "enabled": false,
            "controls": {
              "threshold_limit": 15,
              "failed_control_ids": []
            }
          },
          "attachment_parameters": [
            {
              "assessment_type": "Automated",
              "assessment_id": "rule-a637949b-7e51-46c4-afd4-b96619001bf1",
              "parameter_name": "session_invalidation_in_seconds",
              "parameter_default_value": "120",
              "parameter_display_name": "Sign out due to inactivity in seconds",
              "parameter_type": "numeric"
            }
          ],
          "last_scan": {
            "id": "0fd7e758-3ab3-492b-8b0d-0cd8ef3569d7",
            "status": "in_progress",
            "time": "2023-06-13T12:08:18.000Z"
          },
          "next_scan_time": "2023-06-13T13:08:18.000Z",
          "name": "account-0d8c3805dfea40aa8ad02265a18eb12b"
        },
        {
          "id": "0b7f7314e8a4206d62853c18011e5af8",
          "profile_id": "542b1aee-3ad8-49e9-a33c-44b64f117f18",
          "account_id": "cg3335893hh1428692d6747cf300yeb5",
          "instance_id": "edf9524f-406c-412c-acbb-ee371a5cabda",
          "scope": [
            {
              "environment": "ibm-cloud",
              "properties": [
                {
                  "name": "542b1aee-3ad8-49e9-a33c-44b64f117f18",
                  "value": "account.resource_group"
                }
              ]
            }
          ],
          "created_by": "IBMid-6620049HI3",
          "created_on": "2023-02-09T10:54:59.000Z",
          "updated_by": "IBMid-6620049HI3",
          "updated_on": "2023-02-09T10:54:59.000Z",
          "status": "enabled",
          "schedule": "every_30_days",
          "notifications": {
            "enabled": false,
            "controls": {
              "threshold_limit": 15,
              "failed_control_ids": []
            }
          },
          "attachment_parameters": [
            {
              "assessment_type": "Automated",
              "assessment_id": "rule-a637949b-7e51-46c4-afd4-b96619001bf1",
              "parameter_name": "session_invalidation_in_seconds",
              "parameter_default_value": "120",
              "parameter_display_name": "Sign out due to inactivity in seconds",
              "parameter_type": "numeric"
            }
          ],
          "last_scan": {
            "id": "0fd7e758-3ab3-492b-8b0d-0cd8ef3569d7",
            "status": "in_progress",
            "time": "2023-06-13T12:08:18.000Z"
          },
          "next_scan_time": "2023-06-13T13:08:18.000Z",
          "name": "account-0d8c3805dfea40aa8ad02265a18eb12b"
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `attachment_id`s parameter is invalid.",
          "target": {
            "name": "attachment_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `attachment_id`s parameter is invalid.",
          "target": {
            "name": "attachment_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "You're not authorized to complete this request."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "You're not authorized to complete this request."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 404,
      "errors": [
        {
          "code": "attachment_not_found",
          "message": "The report for `attachment_id` '65810ac762004f22ac19f8f8edf70a34' is not found.",
          "target": {
            "name": "attachment_id",
            "type": "parameter",
            "value": "65810ac762004f22ac19f8f8edf70a34"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 404,
      "errors": [
        {
          "code": "attachment_not_found",
          "message": "The report for `attachment_id` '65810ac762004f22ac19f8f8edf70a34' is not found.",
          "target": {
            "name": "attachment_id",
            "type": "parameter",
            "value": "65810ac762004f22ac19f8f8edf70a34"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 500,
      "errors": [
        {
          "code": "internal_server_error",
          "message": "The server has encountered an unexpected internal error."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 500,
      "errors": [
        {
          "code": "internal_server_error",
          "message": "The server has encountered an unexpected internal error."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service that is required is unavailable. Try again later."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service that is required is unavailable. Try again later."
        }
      ]
    }

Delete an attachment

Delete an attachment. Alternatively, if you think that you might need this configuration in the future, you can pause an attachment to stop being charged. For more information, see Running an evaluation for IBM Cloud.

Delete an attachment. Alternatively, if you think that you might need this configuration in the future, you can pause an attachment to stop being charged. For more information, see Running an evaluation for IBM Cloud.

Delete an attachment. Alternatively, if you think that you might need this configuration in the future, you can pause an attachment to stop being charged. For more information, see Running an evaluation for IBM Cloud.

Delete an attachment. Alternatively, if you think that you might need this configuration in the future, you can pause an attachment to stop being charged. For more information, see Running an evaluation for IBM Cloud.

Delete an attachment. Alternatively, if you think that you might need this configuration in the future, you can pause an attachment to stop being charged. For more information, see Running an evaluation for IBM Cloud.

DELETE /profiles/{profiles_id}/attachments/{attachment_id}
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) DeleteProfileAttachment(deleteProfileAttachmentOptions *DeleteProfileAttachmentOptions) (result *AttachmentItem, response *core.DetailedResponse, err error)
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) DeleteProfileAttachmentWithContext(ctx context.Context, deleteProfileAttachmentOptions *DeleteProfileAttachmentOptions) (result *AttachmentItem, response *core.DetailedResponse, err error)
deleteProfileAttachment(params)
delete_profile_attachment(
        self,
        attachment_id: str,
        profiles_id: str,
        *,
        x_correlation_id: str = None,
        x_request_id: str = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<AttachmentItem> deleteProfileAttachment(DeleteProfileAttachmentOptions deleteProfileAttachmentOptions)

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • compliance.posture-management.attachments-delete

Auditing

Calling this method generates the following auditing event.

  • compliance.posture-management-profiles-attachments.delete

Request

Instantiate the DeleteProfileAttachmentOptions struct and set the fields to provide parameter values for the DeleteProfileAttachment method.

Use the DeleteProfileAttachmentOptions.Builder to create a DeleteProfileAttachmentOptions object that contains the parameter values for the deleteProfileAttachment method.

Custom Headers

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

Path Parameters

  • The attachment ID.

    Possible values: length = 36, Value must match regular expression ^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$|^$

  • The profile ID.

    Possible values: length = 36, Value must match regular expression ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$

WithContext method only

The DeleteProfileAttachment options.

parameters

  • The attachment ID.

    Possible values: length = 36, Value must match regular expression /^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$|^$/

  • The profile ID.

    Possible values: length = 36, Value must match regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

parameters

  • The attachment ID.

    Possible values: length = 36, Value must match regular expression /^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$|^$/

  • The profile ID.

    Possible values: length = 36, Value must match regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

The deleteProfileAttachment options.

  • curl -X DELETE --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/profiles/{profiles_id}/attachments/{attachment_id}"
  • deleteProfileAttachmentOptions := securityAndComplianceCenterApiService.NewDeleteProfileAttachmentOptions(
      attachmentIdLink,
      profileIdLink,
    )
    
    attachmentItem, response, err := securityAndComplianceCenterApiService.DeleteProfileAttachment(deleteProfileAttachmentOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(attachmentItem, "", "  ")
    fmt.Println(string(b))
  • const params = {
      attachmentId: attachmentIdLink,
      profilesId: profileIdLink,
    };
    
    let res;
    try {
      res = await securityAndComplianceCenterApiService.deleteProfileAttachment(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • response = security_and_compliance_center_api_service.delete_profile_attachment(
      attachment_id=attachment_id_link,
      profiles_id=profile_id_link,
    )
    attachment_item = response.get_result()
    
    print(json.dumps(attachment_item, indent=2))
  • DeleteProfileAttachmentOptions deleteProfileAttachmentOptions = new DeleteProfileAttachmentOptions.Builder()
      .attachmentId(attachmentIdLink)
      .profilesId(profileIdLink)
      .build();
    
    Response<AttachmentItem> response = securityAndComplianceCenterApiService.deleteProfileAttachment(deleteProfileAttachmentOptions).execute();
    AttachmentItem attachmentItem = response.getResult();
    
    System.out.println(attachmentItem);

Response

The request payload of the attachments parameter.

The request payload of the attachments parameter.

Examples:
View

The request payload of the attachments parameter.

Examples:
View

The request payload of the attachments parameter.

Examples:
View

The request payload of the attachments parameter.

Examples:
View

Status Code

  • The attachment was deleted successfully.

  • Your request is invalid.

  • Your request is unauthorized.

  • You are not allowed to access this resource.

  • The specified resource was not found.

  • Too many requests

  • Internal server error

  • A backend service that is required to complete the operation is unavailable. Try again later.

Example responses
  • {
      "profile_id": "542b1aee-3ad8-49e9-a33c-44b64f117f18",
      "attachments": [
        {
          "id": "0b7f7314e8a4206d62853c18011e5af8",
          "profile_id": "542b1aee-3ad8-49e9-a33c-44b64f117f18",
          "account_id": "cg3335893hh1428692d6747cf300yeb5",
          "instance_id": "edf9524f-406c-412c-acbb-ee371a5cabda",
          "scope": [
            {
              "environment": "ibm-cloud",
              "properties": [
                {
                  "name": "scope_id",
                  "value": "cg3335893hh1428692d6747cf300yeb5"
                },
                {
                  "name": "scope_type",
                  "value": "account"
                }
              ]
            }
          ],
          "created_by": "IBMid-6620049HI3",
          "created_on": "2023-02-09T10:54:59.000Z",
          "updated_by": "IBMid-6620049HI3",
          "updated_on": "2023-02-09T10:54:59.000Z",
          "status": "enabled",
          "schedule": "every_30_days",
          "notifications": {
            "enabled": false,
            "controls": {
              "threshold_limit": 15,
              "failed_control_ids": []
            }
          },
          "attachment_parameters": [
            {
              "assessment_type": "Automated",
              "assessment_id": "rule-a637949b-7e51-46c4-afd4-b96619001bf1",
              "parameter_name": "session_invalidation_in_seconds",
              "parameter_default_value": "120",
              "parameter_display_name": "Sign out due to inactivity in seconds",
              "parameter_type": "numeric"
            }
          ],
          "last_scan": {
            "id": "0fd7e758-3ab3-492b-8b0d-0cd8ef3569d7",
            "status": "in_progress",
            "time": "2023-06-13T12:08:18.000Z"
          },
          "next_scan_time": "2023-06-13T13:08:18.000Z",
          "name": "account-0d8c3805dfea40aa8ad02265a18eb12b"
        }
      ]
    }
  • {
      "profile_id": "542b1aee-3ad8-49e9-a33c-44b64f117f18",
      "attachments": [
        {
          "id": "0b7f7314e8a4206d62853c18011e5af8",
          "profile_id": "542b1aee-3ad8-49e9-a33c-44b64f117f18",
          "account_id": "cg3335893hh1428692d6747cf300yeb5",
          "instance_id": "edf9524f-406c-412c-acbb-ee371a5cabda",
          "scope": [
            {
              "environment": "ibm-cloud",
              "properties": [
                {
                  "name": "scope_id",
                  "value": "cg3335893hh1428692d6747cf300yeb5"
                },
                {
                  "name": "scope_type",
                  "value": "account"
                }
              ]
            }
          ],
          "created_by": "IBMid-6620049HI3",
          "created_on": "2023-02-09T10:54:59.000Z",
          "updated_by": "IBMid-6620049HI3",
          "updated_on": "2023-02-09T10:54:59.000Z",
          "status": "enabled",
          "schedule": "every_30_days",
          "notifications": {
            "enabled": false,
            "controls": {
              "threshold_limit": 15,
              "failed_control_ids": []
            }
          },
          "attachment_parameters": [
            {
              "assessment_type": "Automated",
              "assessment_id": "rule-a637949b-7e51-46c4-afd4-b96619001bf1",
              "parameter_name": "session_invalidation_in_seconds",
              "parameter_default_value": "120",
              "parameter_display_name": "Sign out due to inactivity in seconds",
              "parameter_type": "numeric"
            }
          ],
          "last_scan": {
            "id": "0fd7e758-3ab3-492b-8b0d-0cd8ef3569d7",
            "status": "in_progress",
            "time": "2023-06-13T12:08:18.000Z"
          },
          "next_scan_time": "2023-06-13T13:08:18.000Z",
          "name": "account-0d8c3805dfea40aa8ad02265a18eb12b"
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `attachment_id`s parameter is invalid.",
          "target": {
            "name": "attachment_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `attachment_id`s parameter is invalid.",
          "target": {
            "name": "attachment_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "You're not authorized to complete this request."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "You're not authorized to complete this request."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 404,
      "errors": [
        {
          "code": "attachment_not_found",
          "message": "The report for `attachment_id` '65810ac762004f22ac19f8f8edf70a34' is not found.",
          "target": {
            "name": "attachment_id",
            "type": "parameter",
            "value": "65810ac762004f22ac19f8f8edf70a34"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 404,
      "errors": [
        {
          "code": "attachment_not_found",
          "message": "The report for `attachment_id` '65810ac762004f22ac19f8f8edf70a34' is not found.",
          "target": {
            "name": "attachment_id",
            "type": "parameter",
            "value": "65810ac762004f22ac19f8f8edf70a34"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 500,
      "errors": [
        {
          "code": "internal_server_error",
          "message": "The server has encountered an unexpected internal error."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 500,
      "errors": [
        {
          "code": "internal_server_error",
          "message": "The server has encountered an unexpected internal error."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service that is required is unavailable. Try again later."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service that is required is unavailable. Try again later."
        }
      ]
    }

Get an attachment

View the details of an attachment a profile by providing the attachment ID. You can find this value in the Security and Compliance Center UI. For more information, see Running an evaluation for IBM Cloud.

View the details of an attachment a profile by providing the attachment ID. You can find this value in the Security and Compliance Center UI. For more information, see Running an evaluation for IBM Cloud.

View the details of an attachment a profile by providing the attachment ID. You can find this value in the Security and Compliance Center UI. For more information, see Running an evaluation for IBM Cloud.

View the details of an attachment a profile by providing the attachment ID. You can find this value in the Security and Compliance Center UI. For more information, see Running an evaluation for IBM Cloud.

View the details of an attachment a profile by providing the attachment ID. You can find this value in the Security and Compliance Center UI. For more information, see Running an evaluation for IBM Cloud.

GET /profiles/{profiles_id}/attachments/{attachment_id}
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) GetProfileAttachment(getProfileAttachmentOptions *GetProfileAttachmentOptions) (result *AttachmentItem, response *core.DetailedResponse, err error)
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) GetProfileAttachmentWithContext(ctx context.Context, getProfileAttachmentOptions *GetProfileAttachmentOptions) (result *AttachmentItem, response *core.DetailedResponse, err error)
getProfileAttachment(params)
get_profile_attachment(
        self,
        attachment_id: str,
        profiles_id: str,
        *,
        x_correlation_id: str = None,
        x_request_id: str = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<AttachmentItem> getProfileAttachment(GetProfileAttachmentOptions getProfileAttachmentOptions)

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • compliance.posture-management.attachments-read

Auditing

Calling this method generates the following auditing event.

  • compliance.posture-management-profiles-attachments.read

Request

Instantiate the GetProfileAttachmentOptions struct and set the fields to provide parameter values for the GetProfileAttachment method.

Use the GetProfileAttachmentOptions.Builder to create a GetProfileAttachmentOptions object that contains the parameter values for the getProfileAttachment method.

Custom Headers

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

Path Parameters

  • The attachment ID.

    Possible values: length = 36, Value must match regular expression ^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$|^$

  • The profile ID.

    Possible values: length = 36, Value must match regular expression ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$

WithContext method only

The GetProfileAttachment options.

parameters

  • The attachment ID.

    Possible values: length = 36, Value must match regular expression /^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$|^$/

  • The profile ID.

    Possible values: length = 36, Value must match regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

parameters

  • The attachment ID.

    Possible values: length = 36, Value must match regular expression /^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$|^$/

  • The profile ID.

    Possible values: length = 36, Value must match regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

The getProfileAttachment options.

  • curl -X GET --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/profiles/{profiles_id}/attachments/{attachment_id}"
  • getProfileAttachmentOptions := securityAndComplianceCenterApiService.NewGetProfileAttachmentOptions(
      attachmentIdLink,
      profileIdLink,
    )
    
    attachmentItem, response, err := securityAndComplianceCenterApiService.GetProfileAttachment(getProfileAttachmentOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(attachmentItem, "", "  ")
    fmt.Println(string(b))
  • const params = {
      attachmentId: attachmentIdLink,
      profilesId: profileIdLink,
    };
    
    let res;
    try {
      res = await securityAndComplianceCenterApiService.getProfileAttachment(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • response = security_and_compliance_center_api_service.get_profile_attachment(
      attachment_id=attachment_id_link,
      profiles_id=profile_id_link,
    )
    attachment_item = response.get_result()
    
    print(json.dumps(attachment_item, indent=2))
  • GetProfileAttachmentOptions getProfileAttachmentOptions = new GetProfileAttachmentOptions.Builder()
      .attachmentId(attachmentIdLink)
      .profilesId(profileIdLink)
      .build();
    
    Response<AttachmentItem> response = securityAndComplianceCenterApiService.getProfileAttachment(getProfileAttachmentOptions).execute();
    AttachmentItem attachmentItem = response.getResult();
    
    System.out.println(attachmentItem);

Response

The request payload of the attachments parameter.

The request payload of the attachments parameter.

Examples:
View

The request payload of the attachments parameter.

Examples:
View

The request payload of the attachments parameter.

Examples:
View

The request payload of the attachments parameter.

Examples:
View

Status Code

  • The attachment was retrieved successfully.

  • Your request is invalid.

  • Your request is unauthorized.

  • You are not allowed to access this resource.

  • The specified resource was not found.

  • Too many requests

  • Internal server error

  • A backend service that is required to complete the operation is unavailable. Try again later.

Example responses
  • {
      "id": "0b7f7314e8a4206d62853c18011e5af8",
      "profile_id": "542b1aee-3ad8-49e9-a33c-44b64f117f18",
      "account_id": "cg3335893hh1428692d6747cf300yeb5",
      "instance_id": "edf9524f-406c-412c-acbb-ee371a5cabda",
      "scope": [
        {
          "environment": "ibm-cloud",
          "properties": [
            {
              "name": "scope_id",
              "value": "cg3335893hh1428692d6747cf300yeb5"
            },
            {
              "name": "scope_type",
              "value": "account"
            }
          ]
        }
      ],
      "created_by": "IBMid-6620049HI3",
      "created_on": "2023-02-09T10:54:59.000Z",
      "updated_by": "IBMid-6620049HI3",
      "updated_on": "2023-02-09T10:54:59.000Z",
      "status": "enabled",
      "schedule": "every_30_days",
      "notifications": {
        "enabled": false,
        "controls": {
          "threshold_limit": 15,
          "failed_control_ids": []
        }
      },
      "attachment_parameters": [
        {
          "assessment_type": "Automated",
          "assessment_id": "rule-a637949b-7e51-46c4-afd4-b96619001bf1",
          "parameter_name": "session_invalidation_in_seconds",
          "parameter_default_value": "120",
          "parameter_display_name": "Sign out due to inactivity in seconds",
          "parameter_type": "numeric"
        }
      ],
      "last_scan": {
        "id": "0fd7e758-3ab3-492b-8b0d-0cd8ef3569d7",
        "status": "in_progress",
        "time": "2023-06-13T12:08:18.000Z"
      },
      "next_scan_time": "2023-06-13T13:08:18.000Z",
      "name": "account-0d8c3805dfea40aa8ad02265a18eb12b"
    }
  • {
      "id": "0b7f7314e8a4206d62853c18011e5af8",
      "profile_id": "542b1aee-3ad8-49e9-a33c-44b64f117f18",
      "account_id": "cg3335893hh1428692d6747cf300yeb5",
      "instance_id": "edf9524f-406c-412c-acbb-ee371a5cabda",
      "scope": [
        {
          "environment": "ibm-cloud",
          "properties": [
            {
              "name": "scope_id",
              "value": "cg3335893hh1428692d6747cf300yeb5"
            },
            {
              "name": "scope_type",
              "value": "account"
            }
          ]
        }
      ],
      "created_by": "IBMid-6620049HI3",
      "created_on": "2023-02-09T10:54:59.000Z",
      "updated_by": "IBMid-6620049HI3",
      "updated_on": "2023-02-09T10:54:59.000Z",
      "status": "enabled",
      "schedule": "every_30_days",
      "notifications": {
        "enabled": false,
        "controls": {
          "threshold_limit": 15,
          "failed_control_ids": []
        }
      },
      "attachment_parameters": [
        {
          "assessment_type": "Automated",
          "assessment_id": "rule-a637949b-7e51-46c4-afd4-b96619001bf1",
          "parameter_name": "session_invalidation_in_seconds",
          "parameter_default_value": "120",
          "parameter_display_name": "Sign out due to inactivity in seconds",
          "parameter_type": "numeric"
        }
      ],
      "last_scan": {
        "id": "0fd7e758-3ab3-492b-8b0d-0cd8ef3569d7",
        "status": "in_progress",
        "time": "2023-06-13T12:08:18.000Z"
      },
      "next_scan_time": "2023-06-13T13:08:18.000Z",
      "name": "account-0d8c3805dfea40aa8ad02265a18eb12b"
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `attachment_id`s parameter is invalid.",
          "target": {
            "name": "attachment_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `attachment_id`s parameter is invalid.",
          "target": {
            "name": "attachment_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "You're not authorized to complete this request."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "You're not authorized to complete this request."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 404,
      "errors": [
        {
          "code": "attachment_not_found",
          "message": "The report for `attachment_id` '65810ac762004f22ac19f8f8edf70a34' is not found.",
          "target": {
            "name": "attachment_id",
            "type": "parameter",
            "value": "65810ac762004f22ac19f8f8edf70a34"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 404,
      "errors": [
        {
          "code": "attachment_not_found",
          "message": "The report for `attachment_id` '65810ac762004f22ac19f8f8edf70a34' is not found.",
          "target": {
            "name": "attachment_id",
            "type": "parameter",
            "value": "65810ac762004f22ac19f8f8edf70a34"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 500,
      "errors": [
        {
          "code": "internal_server_error",
          "message": "The server has encountered an unexpected internal error."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 500,
      "errors": [
        {
          "code": "internal_server_error",
          "message": "The server has encountered an unexpected internal error."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service that is required is unavailable. Try again later."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service that is required is unavailable. Try again later."
        }
      ]
    }

Update an attachment

Update an attachment that is linked to a profile to evaluate your resources on a recurring schedule, or on-demand. For more information, see Running an evaluation for IBM Cloud.

Update an attachment that is linked to a profile to evaluate your resources on a recurring schedule, or on-demand. For more information, see Running an evaluation for IBM Cloud.

Update an attachment that is linked to a profile to evaluate your resources on a recurring schedule, or on-demand. For more information, see Running an evaluation for IBM Cloud.

Update an attachment that is linked to a profile to evaluate your resources on a recurring schedule, or on-demand. For more information, see Running an evaluation for IBM Cloud.

Update an attachment that is linked to a profile to evaluate your resources on a recurring schedule, or on-demand. For more information, see Running an evaluation for IBM Cloud.

PUT /profiles/{profiles_id}/attachments/{attachment_id}
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) ReplaceProfileAttachment(replaceProfileAttachmentOptions *ReplaceProfileAttachmentOptions) (result *AttachmentItem, response *core.DetailedResponse, err error)
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) ReplaceProfileAttachmentWithContext(ctx context.Context, replaceProfileAttachmentOptions *ReplaceProfileAttachmentOptions) (result *AttachmentItem, response *core.DetailedResponse, err error)
replaceProfileAttachment(params)
replace_profile_attachment(
        self,
        attachment_id: str,
        profiles_id: str,
        *,
        id: str = None,
        profile_id: str = None,
        account_id: str = None,
        instance_id: str = None,
        scope: List['MultiCloudScope'] = None,
        created_on: datetime = None,
        created_by: str = None,
        updated_on: datetime = None,
        updated_by: str = None,
        status: str = None,
        schedule: str = None,
        notifications: 'AttachmentsNotificationsPrototype' = None,
        attachment_parameters: List['AttachmentParameterPrototype'] = None,
        last_scan: 'LastScan' = None,
        next_scan_time: datetime = None,
        name: str = None,
        description: str = None,
        x_correlation_id: str = None,
        x_request_id: str = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<AttachmentItem> replaceProfileAttachment(ReplaceProfileAttachmentOptions replaceProfileAttachmentOptions)

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • compliance.posture-management.attachments-update

Auditing

Calling this method generates the following auditing event.

  • compliance.posture-management-profiles-attachments.update

Request

Instantiate the ReplaceProfileAttachmentOptions struct and set the fields to provide parameter values for the ReplaceProfileAttachment method.

Use the ReplaceProfileAttachmentOptions.Builder to create a ReplaceProfileAttachmentOptions object that contains the parameter values for the replaceProfileAttachment method.

Custom Headers

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

Path Parameters

  • The attachment ID.

    Possible values: length = 36, Value must match regular expression ^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$|^$

  • The profile ID.

    Possible values: length = 36, Value must match regular expression ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$

The payload to update an attachment.

Examples:
View

WithContext method only

The ReplaceProfileAttachment options.

parameters

  • The attachment ID.

    Possible values: length = 36, Value must match regular expression /^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$|^$/

  • The profile ID.

    Possible values: length = 36, Value must match regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/

  • The ID of the attachment.

    Possible values: length = 32, Value must match regular expression /^[a-zA-Z0-9-]*$/

  • The ID of the profile that is specified in the attachment.

    Possible values: length = 36, Value must match regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/

  • The account ID that is associated to the attachment.

    Possible values: length = 32, Value must match regular expression /^[a-zA-Z0-9-]*$/

  • The instance ID of the account that is associated to the attachment.

    Possible values: length = 36, Value must match regular expression /^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$|^$/

  • The scope payload for the multi cloud feature.

    Possible values: 0 ≤ number of items ≤ 8

    Examples:
    value
    _source
    _lines
    _html
  • The date when the attachment was created.

  • The user who created the attachment.

    Possible values: 1 ≤ length ≤ 255, Value must match regular expression /^[a-zA-Z0-9-\\.:,_\\s]*$/

  • The date when the attachment was updated.

  • The user who updated the attachment.

    Possible values: 1 ≤ length ≤ 255, Value must match regular expression /^[a-zA-Z0-9-\\.:,_\\s]*$/

  • The status of an attachment evaluation.

    Allowable values: [enabled,disabled]

    Examples:
    value
    _source
    _lines
    _html
  • The schedule of an attachment evaluation.

    Allowable values: [daily,every_7_days,every_30_days]

    Examples:
    value
    _source
    _lines
    _html
  • The request payload of the attachment notifications.

    Examples:
    View
  • The profile parameters for the attachment.

    Possible values: 0 ≤ number of items ≤ 512

    Examples:
    value
    _source
    _lines
    _html
  • The details of the last scan of an attachment.

    Examples:
    View
  • The start time of the next scan.

  • The name of the attachment.

    Possible values: 2 ≤ length ≤ 128, Value must match regular expression /^[a-zA-Z0-9-]*$/

    Examples:
    value
    _source
    _lines
    _html
  • The description for the attachment.

    Possible values: 0 ≤ length ≤ 256, Value must match regular expression /^[a-zA-Z0-9_,'\\s\\-]*$/

    Examples:
    value
    _source
    _lines
    _html
  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

parameters

  • The attachment ID.

    Possible values: length = 36, Value must match regular expression /^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$|^$/

  • The profile ID.

    Possible values: length = 36, Value must match regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/

  • The ID of the attachment.

    Possible values: length = 32, Value must match regular expression /^[a-zA-Z0-9-]*$/

  • The ID of the profile that is specified in the attachment.

    Possible values: length = 36, Value must match regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/

  • The account ID that is associated to the attachment.

    Possible values: length = 32, Value must match regular expression /^[a-zA-Z0-9-]*$/

  • The instance ID of the account that is associated to the attachment.

    Possible values: length = 36, Value must match regular expression /^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$|^$/

  • The scope payload for the multi cloud feature.

    Possible values: 0 ≤ number of items ≤ 8

    Examples:
    value
    _source
    _lines
    _html
  • The date when the attachment was created.

  • The user who created the attachment.

    Possible values: 1 ≤ length ≤ 255, Value must match regular expression /^[a-zA-Z0-9-\\.:,_\\s]*$/

  • The date when the attachment was updated.

  • The user who updated the attachment.

    Possible values: 1 ≤ length ≤ 255, Value must match regular expression /^[a-zA-Z0-9-\\.:,_\\s]*$/

  • The status of an attachment evaluation.

    Allowable values: [enabled,disabled]

    Examples:
    value
    _source
    _lines
    _html
  • The schedule of an attachment evaluation.

    Allowable values: [daily,every_7_days,every_30_days]

    Examples:
    value
    _source
    _lines
    _html
  • The request payload of the attachment notifications.

    Examples:
    View
  • The profile parameters for the attachment.

    Possible values: 0 ≤ number of items ≤ 512

    Examples:
    value
    _source
    _lines
    _html
  • The details of the last scan of an attachment.

    Examples:
    View
  • The start time of the next scan.

  • The name of the attachment.

    Possible values: 2 ≤ length ≤ 128, Value must match regular expression /^[a-zA-Z0-9-]*$/

    Examples:
    value
    _source
    _lines
    _html
  • The description for the attachment.

    Possible values: 0 ≤ length ≤ 256, Value must match regular expression /^[a-zA-Z0-9_,'\\s\\-]*$/

    Examples:
    value
    _source
    _lines
    _html
  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

The replaceProfileAttachment options.

  • curl -X PUT --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{ "name": "account-0d8c3805dfea40aa8ad02265a18eb12b", "description": "Test description", "scope": [ { "environment": "ibm-cloud", "properties": [ { "name": "scope_id", "value": "cg3335893hh1428692d6747cf300yeb5" }, { "name": "scope_type", "value": "account" } ] } ], "status": "enabled", "schedule": "every_30_days", "notifications": { "enabled": false, "controls": { "threshold_limit": 15, "failed_control_ids":  ] } }, "attachment_parameters": [ { "assessment_type": "Automated", "assessment_id": "rule-a637949b-7e51-46c4-afd4-b96619001bf1", "parameter_name": "session_invalidation_in_seconds", "parameter_value": "120", "parameter_display_name": "Sign out due to inactivity in seconds", "parameter_type": "numeric" } ] }'   "{base_url}/profiles/{profiles_id}/attachments/{attachment_id}"
  • propertyItemModel := &securityandcompliancecenterapiv3.PropertyItem{
      Name: core.StringPtr("scope_id"),
      Value: core.StringPtr("cg3335893hh1428692d6747cf300yeb5"),
    }
    
    multiCloudScopeModel := &securityandcompliancecenterapiv3.MultiCloudScope{
      Environment: core.StringPtr("ibm-cloud"),
      Properties: []securityandcompliancecenterapiv3.PropertyItem{*propertyItemModel},
    }
    
    failedControlsModel := &securityandcompliancecenterapiv3.FailedControls{
      ThresholdLimit: core.Int64Ptr(int64(15)),
      FailedControlIds: []string{},
    }
    
    attachmentsNotificationsPrototypeModel := &securityandcompliancecenterapiv3.AttachmentsNotificationsPrototype{
      Enabled: core.BoolPtr(false),
      Controls: failedControlsModel,
    }
    
    attachmentParameterPrototypeModel := &securityandcompliancecenterapiv3.AttachmentParameterPrototype{
      AssessmentType: core.StringPtr("Automated"),
      AssessmentID: core.StringPtr("rule-a637949b-7e51-46c4-afd4-b96619001bf1"),
      ParameterName: core.StringPtr("session_invalidation_in_seconds"),
      ParameterValue: core.StringPtr("120"),
      ParameterDisplayName: core.StringPtr("Sign out due to inactivity in seconds"),
      ParameterType: core.StringPtr("numeric"),
    }
    
    replaceProfileAttachmentOptions := securityAndComplianceCenterApiService.NewReplaceProfileAttachmentOptions(
      attachmentIdLink,
      profileIdLink,
    )
    replaceProfileAttachmentOptions.SetScope([]securityandcompliancecenterapiv3.MultiCloudScope{*multiCloudScopeModel})
    replaceProfileAttachmentOptions.SetStatus("enabled")
    replaceProfileAttachmentOptions.SetSchedule("every_30_days")
    replaceProfileAttachmentOptions.SetNotifications(attachmentsNotificationsPrototypeModel)
    replaceProfileAttachmentOptions.SetAttachmentParameters([]securityandcompliancecenterapiv3.AttachmentParameterPrototype{*attachmentParameterPrototypeModel})
    replaceProfileAttachmentOptions.SetName("account-0d8c3805dfea40aa8ad02265a18eb12b")
    replaceProfileAttachmentOptions.SetDescription("Test description")
    
    attachmentItem, response, err := securityAndComplianceCenterApiService.ReplaceProfileAttachment(replaceProfileAttachmentOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(attachmentItem, "", "  ")
    fmt.Println(string(b))
  • // Request models needed by this operation.
    
    // PropertyItem
    const propertyItemModel = {
      name: 'scope_id',
      value: 'cg3335893hh1428692d6747cf300yeb5',
    };
    
    // MultiCloudScope
    const multiCloudScopeModel = {
      environment: 'ibm-cloud',
      properties: [propertyItemModel],
    };
    
    // FailedControls
    const failedControlsModel = {
      threshold_limit: 15,
      failed_control_ids: [],
    };
    
    // AttachmentsNotificationsPrototype
    const attachmentsNotificationsPrototypeModel = {
      enabled: false,
      controls: failedControlsModel,
    };
    
    // AttachmentParameterPrototype
    const attachmentParameterPrototypeModel = {
      assessment_type: 'Automated',
      assessment_id: 'rule-a637949b-7e51-46c4-afd4-b96619001bf1',
      parameter_name: 'session_invalidation_in_seconds',
      parameter_value: '120',
      parameter_display_name: 'Sign out due to inactivity in seconds',
      parameter_type: 'numeric',
    };
    
    const params = {
      attachmentId: attachmentIdLink,
      profilesId: profileIdLink,
      scope: [multiCloudScopeModel],
      status: 'enabled',
      schedule: 'every_30_days',
      notifications: attachmentsNotificationsPrototypeModel,
      attachmentParameters: [attachmentParameterPrototypeModel],
      name: 'account-0d8c3805dfea40aa8ad02265a18eb12b',
      description: 'Test description',
    };
    
    let res;
    try {
      res = await securityAndComplianceCenterApiService.replaceProfileAttachment(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • property_item_model = {
      'name': 'scope_id',
      'value': 'cg3335893hh1428692d6747cf300yeb5',
    }
    
    multi_cloud_scope_model = {
      'environment': 'ibm-cloud',
      'properties': [property_item_model],
    }
    
    failed_controls_model = {
      'threshold_limit': 15,
      'failed_control_ids': [],
    }
    
    attachments_notifications_prototype_model = {
      'enabled': False,
      'controls': failed_controls_model,
    }
    
    attachment_parameter_prototype_model = {
      'assessment_type': 'Automated',
      'assessment_id': 'rule-a637949b-7e51-46c4-afd4-b96619001bf1',
      'parameter_name': 'session_invalidation_in_seconds',
      'parameter_value': '120',
      'parameter_display_name': 'Sign out due to inactivity in seconds',
      'parameter_type': 'numeric',
    }
    
    response = security_and_compliance_center_api_service.replace_profile_attachment(
      attachment_id=attachment_id_link,
      profiles_id=profile_id_link,
      scope=[multi_cloud_scope_model],
      status='enabled',
      schedule='every_30_days',
      notifications=attachments_notifications_prototype_model,
      attachment_parameters=[attachment_parameter_prototype_model],
      name='account-0d8c3805dfea40aa8ad02265a18eb12b',
      description='Test description',
    )
    attachment_item = response.get_result()
    
    print(json.dumps(attachment_item, indent=2))
  • PropertyItem propertyItemModel = new PropertyItem.Builder()
      .name("scope_id")
      .value("cg3335893hh1428692d6747cf300yeb5")
      .build();
    MultiCloudScope multiCloudScopeModel = new MultiCloudScope.Builder()
      .environment("ibm-cloud")
      .xProperties(java.util.Arrays.asList(propertyItemModel))
      .build();
    FailedControls failedControlsModel = new FailedControls.Builder()
      .thresholdLimit(Long.valueOf("15"))
      .failedControlIds(java.util.Arrays.asList())
      .build();
    AttachmentsNotificationsPrototype attachmentsNotificationsPrototypeModel = new AttachmentsNotificationsPrototype.Builder()
      .enabled(false)
      .controls(failedControlsModel)
      .build();
    AttachmentParameterPrototype attachmentParameterPrototypeModel = new AttachmentParameterPrototype.Builder()
      .assessmentType("Automated")
      .assessmentId("rule-a637949b-7e51-46c4-afd4-b96619001bf1")
      .parameterName("session_invalidation_in_seconds")
      .parameterValue("120")
      .parameterDisplayName("Sign out due to inactivity in seconds")
      .parameterType("numeric")
      .build();
    ReplaceProfileAttachmentOptions replaceProfileAttachmentOptions = new ReplaceProfileAttachmentOptions.Builder()
      .attachmentId(attachmentIdLink)
      .profilesId(profileIdLink)
      .scope(java.util.Arrays.asList(multiCloudScopeModel))
      .status("enabled")
      .schedule("every_30_days")
      .notifications(attachmentsNotificationsPrototypeModel)
      .attachmentParameters(java.util.Arrays.asList(attachmentParameterPrototypeModel))
      .name("account-0d8c3805dfea40aa8ad02265a18eb12b")
      .description("Test description")
      .build();
    
    Response<AttachmentItem> response = securityAndComplianceCenterApiService.replaceProfileAttachment(replaceProfileAttachmentOptions).execute();
    AttachmentItem attachmentItem = response.getResult();
    
    System.out.println(attachmentItem);

Response

The request payload of the attachments parameter.

The request payload of the attachments parameter.

Examples:
View

The request payload of the attachments parameter.

Examples:
View

The request payload of the attachments parameter.

Examples:
View

The request payload of the attachments parameter.

Examples:
View

Status Code

  • The attachment was updated successfully.

  • Your request is invalid.

  • Your request is unauthorized.

  • You are not allowed to access this resource.

Example responses
  • {
      "id": "0b7f7314e8a4206d62853c18011e5af8",
      "profile_id": "542b1aee-3ad8-49e9-a33c-44b64f117f18",
      "account_id": "cg3335893hh1428692d6747cf300yeb5",
      "instance_id": "edf9524f-406c-412c-acbb-ee371a5cabda",
      "name": "account-0d8c3805dfea40aa8ad02265a18eb12b",
      "description": "Test description",
      "scope": [
        {
          "environment": "ibm-cloud",
          "properties": [
            {
              "name": "scope_id",
              "value": "cg3335893hh1428692d6747cf300yeb5"
            },
            {
              "name": "scope_type",
              "value": "account"
            }
          ]
        }
      ],
      "created_by": "IBMid-6620049HI3",
      "created_on": "2023-02-09T10:54:59.000Z",
      "updated_by": "IBMid-6620049HI3",
      "updated_on": "2023-02-09T10:54:59.000Z",
      "status": "enabled",
      "schedule": "every_30_days",
      "notifications": {
        "enabled": false,
        "controls": {
          "threshold_limit": 15,
          "failed_control_ids": []
        }
      },
      "attachment_parameters": [
        {
          "assessment_type": "Automated",
          "assessment_id": "rule-a637949b-7e51-46c4-afd4-b96619001bf1",
          "parameter_name": "session_invalidation_in_seconds",
          "parameter_default_value": "120",
          "parameter_display_name": "Sign out due to inactivity in seconds",
          "parameter_type": "numeric"
        }
      ],
      "last_scan": {
        "id": "0fd7e758-3ab3-492b-8b0d-0cd8ef3569d7",
        "status": "in_progress",
        "time": "2023-06-13T12:08:18.000Z"
      },
      "next_scan_time": "2023-06-13T13:08:18.000Z"
    }
  • {
      "id": "0b7f7314e8a4206d62853c18011e5af8",
      "profile_id": "542b1aee-3ad8-49e9-a33c-44b64f117f18",
      "account_id": "cg3335893hh1428692d6747cf300yeb5",
      "instance_id": "edf9524f-406c-412c-acbb-ee371a5cabda",
      "name": "account-0d8c3805dfea40aa8ad02265a18eb12b",
      "description": "Test description",
      "scope": [
        {
          "environment": "ibm-cloud",
          "properties": [
            {
              "name": "scope_id",
              "value": "cg3335893hh1428692d6747cf300yeb5"
            },
            {
              "name": "scope_type",
              "value": "account"
            }
          ]
        }
      ],
      "created_by": "IBMid-6620049HI3",
      "created_on": "2023-02-09T10:54:59.000Z",
      "updated_by": "IBMid-6620049HI3",
      "updated_on": "2023-02-09T10:54:59.000Z",
      "status": "enabled",
      "schedule": "every_30_days",
      "notifications": {
        "enabled": false,
        "controls": {
          "threshold_limit": 15,
          "failed_control_ids": []
        }
      },
      "attachment_parameters": [
        {
          "assessment_type": "Automated",
          "assessment_id": "rule-a637949b-7e51-46c4-afd4-b96619001bf1",
          "parameter_name": "session_invalidation_in_seconds",
          "parameter_default_value": "120",
          "parameter_display_name": "Sign out due to inactivity in seconds",
          "parameter_type": "numeric"
        }
      ],
      "last_scan": {
        "id": "0fd7e758-3ab3-492b-8b0d-0cd8ef3569d7",
        "status": "in_progress",
        "time": "2023-06-13T12:08:18.000Z"
      },
      "next_scan_time": "2023-06-13T13:08:18.000Z"
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `attachment_id`s parameter is invalid.",
          "target": {
            "name": "attachment_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `attachment_id`s parameter is invalid.",
          "target": {
            "name": "attachment_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "You're not authorized to complete this request."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "You're not authorized to complete this request."
        }
      ]
    }

Create a scan

Create a scan to evaluate your resources on a recurring basis or on demand.

Create a scan to evaluate your resources on a recurring basis or on demand.

Create a scan to evaluate your resources on a recurring basis or on demand.

Create a scan to evaluate your resources on a recurring basis or on demand.

Create a scan to evaluate your resources on a recurring basis or on demand.

POST /scans
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) CreateScan(createScanOptions *CreateScanOptions) (result *Scan, response *core.DetailedResponse, err error)
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) CreateScanWithContext(ctx context.Context, createScanOptions *CreateScanOptions) (result *Scan, response *core.DetailedResponse, err error)
createScan(params)
create_scan(
        self,
        attachment_id: str,
        *,
        x_correlation_id: str = None,
        x_request_id: str = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<Scan> createScan(CreateScanOptions createScanOptions)

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • compliance.posture-management.scans-create

Auditing

Calling this method generates the following auditing event.

  • compliance.posture-management-scans.create

Request

Instantiate the CreateScanOptions struct and set the fields to provide parameter values for the CreateScan method.

Use the CreateScanOptions.Builder to create a CreateScanOptions object that contains the parameter values for the createScan method.

Custom Headers

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

The request body to create a scan.

Examples:
View

WithContext method only

The CreateScan options.

parameters

  • The attachment ID of a profile.

    Possible values: length = 32, Value must match regular expression /^[0-9a-f]{32}$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

parameters

  • The attachment ID of a profile.

    Possible values: length = 32, Value must match regular expression /^[0-9a-f]{32}$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

The createScan options.

  • curl -X POST --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{"attachment_id":"a34fdceab3d89d91bd4f76d422bf0d26"}'   "{base_url}/scans"
  • createScanOptions := securityAndComplianceCenterApiService.NewCreateScanOptions(
      attachmentIdLink,
    )
    
    scan, response, err := securityAndComplianceCenterApiService.CreateScan(createScanOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(scan, "", "  ")
    fmt.Println(string(b))
  • const params = {
      attachmentId: attachmentIdLink,
    };
    
    let res;
    try {
      res = await securityAndComplianceCenterApiService.createScan(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • response = security_and_compliance_center_api_service.create_scan(
      attachment_id=attachment_id_link,
    )
    scan = response.get_result()
    
    print(json.dumps(scan, indent=2))
  • CreateScanOptions createScanOptions = new CreateScanOptions.Builder()
      .attachmentId(attachmentIdLink)
      .build();
    
    Response<Scan> response = securityAndComplianceCenterApiService.createScan(createScanOptions).execute();
    Scan scan = response.getResult();
    
    System.out.println(scan);

Response

The response schema for creating a scan.

The response schema for creating a scan.

Examples:
View

The response schema for creating a scan.

Examples:
View

The response schema for creating a scan.

Examples:
View

The response schema for creating a scan.

Examples:
View

Status Code

  • The scan was created successfully.

  • Your request is invalid.

  • Your request is unauthorized.

  • You are not allowed to access this resource.

Example responses
  • {
      "id": "e8a39d25-0051-4328-8462-988ad321f49a",
      "account_id": "cg3335893hh1428692d6747cf300yeb5",
      "attachment_id": "a34fdceab3d89d91bd4f76d422bf0d26",
      "report_id": "812197b3-9c5b-4742-94d9-66a6155ade60",
      "status": "in_progress",
      "last_scan_time": "2023-06-13T13:38:12.000Z",
      "next_scan_time": "2023-06-13T14:38:12.000Z",
      "scan_type": "ondemand",
      "occurence": 0
    }
  • {
      "id": "e8a39d25-0051-4328-8462-988ad321f49a",
      "account_id": "cg3335893hh1428692d6747cf300yeb5",
      "attachment_id": "a34fdceab3d89d91bd4f76d422bf0d26",
      "report_id": "812197b3-9c5b-4742-94d9-66a6155ade60",
      "status": "in_progress",
      "last_scan_time": "2023-06-13T13:38:12.000Z",
      "next_scan_time": "2023-06-13T14:38:12.000Z",
      "scan_type": "ondemand",
      "occurence": 0
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `attachment_id`s parameter is invalid.",
          "target": {
            "name": "attachment_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `attachment_id`s parameter is invalid.",
          "target": {
            "name": "attachment_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "You're not authorized to complete this request."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "You're not authorized to complete this request."
        }
      ]
    }

List attachments

View all of the attachments that are linked to an account. An attachment is the association between the set of resources that you want to evaluate and a profile that contains the specific controls that you want to use. For more information, see Running an evaluation for IBM Cloud.

View all of the attachments that are linked to an account. An attachment is the association between the set of resources that you want to evaluate and a profile that contains the specific controls that you want to use. For more information, see Running an evaluation for IBM Cloud.

View all of the attachments that are linked to an account. An attachment is the association between the set of resources that you want to evaluate and a profile that contains the specific controls that you want to use. For more information, see Running an evaluation for IBM Cloud.

View all of the attachments that are linked to an account. An attachment is the association between the set of resources that you want to evaluate and a profile that contains the specific controls that you want to use. For more information, see Running an evaluation for IBM Cloud.

View all of the attachments that are linked to an account. An attachment is the association between the set of resources that you want to evaluate and a profile that contains the specific controls that you want to use. For more information, see Running an evaluation for IBM Cloud.

GET /attachments
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) ListAttachmentsAccount(listAttachmentsAccountOptions *ListAttachmentsAccountOptions) (result *AttachmentCollection, response *core.DetailedResponse, err error)
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) ListAttachmentsAccountWithContext(ctx context.Context, listAttachmentsAccountOptions *ListAttachmentsAccountOptions) (result *AttachmentCollection, response *core.DetailedResponse, err error)
listAttachmentsAccount(params)
list_attachments_account(
        self,
        *,
        x_correlation_id: str = None,
        x_request_id: str = None,
        limit: int = None,
        start: str = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<AttachmentCollection> listAttachmentsAccount(ListAttachmentsAccountOptions listAttachmentsAccountOptions)

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • compliance.posture-management.attachments-read

Auditing

Calling this method generates the following auditing event.

  • compliance.posture-management-profiles-attachments.list

Request

Instantiate the ListAttachmentsAccountOptions struct and set the fields to provide parameter values for the ListAttachmentsAccount method.

Use the ListAttachmentsAccountOptions.Builder to create a ListAttachmentsAccountOptions object that contains the parameter values for the listAttachmentsAccount method.

Custom Headers

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

Query Parameters

  • The indication of how many resources to return, unless the response is the last page of resources.

    Possible values: 0 ≤ value ≤ 100

    Default: 50

  • Determine what resource to start the page on or after.

    Possible values: 0 ≤ length ≤ 1024, Value must match regular expression .*

WithContext method only

The ListAttachmentsAccount options.

parameters

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The indication of how many resources to return, unless the response is the last page of resources.

    Possible values: 0 ≤ value ≤ 100

    Default: 50

  • Determine what resource to start the page on or after.

    Possible values: 0 ≤ length ≤ 1024, Value must match regular expression /.*/

parameters

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The indication of how many resources to return, unless the response is the last page of resources.

    Possible values: 0 ≤ value ≤ 100

    Default: 50

  • Determine what resource to start the page on or after.

    Possible values: 0 ≤ length ≤ 1024, Value must match regular expression /.*/

The listAttachmentsAccount options.

  • curl -X GET --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/attachments"
  • listAttachmentsAccountOptions := &securityandcompliancecenterapiv3.ListAttachmentsAccountOptions{
      XCorrelationID: core.StringPtr("testString"),
      XRequestID: core.StringPtr("testString"),
      Limit: core.Int64Ptr(int64(10)),
    }
    
    pager, err := securityAndComplianceCenterApiService.NewAttachmentsAccountPager(listAttachmentsAccountOptions)
    if err != nil {
      panic(err)
    }
    
    var allResults []securityandcompliancecenterapiv3.AttachmentItem
    for pager.HasNext() {
      nextPage, err := pager.GetNext()
      if err != nil {
        panic(err)
      }
      allResults = append(allResults, nextPage...)
    }
    b, _ := json.MarshalIndent(allResults, "", "  ")
    fmt.Println(string(b))
  • const params = {
      xCorrelationId: 'testString',
      xRequestId: 'testString',
      limit: 10,
    };
    
    const allResults = [];
    try {
      const pager = new SecurityAndComplianceCenterApiV3.AttachmentsAccountPager(securityAndComplianceCenterApiService, params);
      while (pager.hasNext()) {
        const nextPage = await pager.getNext();
        expect(nextPage).not.toBeNull();
        allResults.push(...nextPage);
      }
      console.log(JSON.stringify(allResults, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • all_results = []
    pager = AttachmentsAccountPager(
      client=security_and_compliance_center_api_service,
      x_correlation_id='testString',
      x_request_id='testString',
      limit=10,
    )
    while pager.has_next():
      next_page = pager.get_next()
      assert next_page is not None
      all_results.extend(next_page)
    
    print(json.dumps(all_results, indent=2))
  • ListAttachmentsAccountOptions listAttachmentsAccountOptions = new ListAttachmentsAccountOptions.Builder()
      .xCorrelationId("testString")
      .xRequestId("testString")
      .limit(Long.valueOf("10"))
      .build();
    
    AttachmentsAccountPager pager = new AttachmentsAccountPager(securityAndComplianceCenterApiService, listAttachmentsAccountOptions);
    List<AttachmentItem> allResults = new ArrayList<>();
    while (pager.hasNext()) {
      List<AttachmentItem> nextPage = pager.getNext();
      allResults.addAll(nextPage);
    }
    
    System.out.println(GsonSingleton.getGson().toJson(allResults));

Response

The response body of an attachment.

The response body of an attachment.

Examples:
View

The response body of an attachment.

Examples:
View

The response body of an attachment.

Examples:
View

The response body of an attachment.

Examples:
View

Status Code

  • The attachments were successfully retrieved.

  • Your request is invalid.

  • Your request is unauthorized.

  • You are not allowed to access this resource.

  • The specified resource was not found.

  • Too many requests

  • Internal server error

  • A backend service that is required to complete the operation is unavailable. Try again later.

Example responses
  • {
      "limit": 25,
      "total_count": 1,
      "first": {
        "href": "https://us-east.compliance.cloud.ibm.com/instances/6d5v891d-1f45-60a5-5b55-6hh6a82f2680/v3/control_libraries?account_id=cg3335893hh1428692d6747cf300yeb5&limit=25"
      },
      "next": {
        "href": ""
      },
      "attachments": [
        {
          "id": "0b7f7314e8a4206d62853c18011e5af8",
          "profile_id": "542b1aee-3ad8-49e9-a33c-44b64f117f18",
          "account_id": "cg3335893hh1428692d6747cf300yeb5",
          "instance_id": "edf9524f-406c-412c-acbb-ee371a5cabda",
          "name": "account-0d8c3805dfea40aa8ad02265a18eb12b",
          "description": "Test description",
          "scope": [
            {
              "environment": "ibm-cloud",
              "properties": [
                {
                  "name": "scope_id",
                  "value": "cg3335893hh1428692d6747cf300yeb5"
                },
                {
                  "name": "scope_type",
                  "value": "account"
                }
              ]
            }
          ],
          "created_by": "IBMid-6620049HI3",
          "created_on": "2023-02-09T10:54:59.000Z",
          "updated_by": "IBMid-6620049HI3",
          "updated_on": "2023-02-09T10:54:59.000Z",
          "status": "enabled",
          "schedule": "every_30_days",
          "notifications": {
            "enabled": false,
            "controls": {
              "threshold_limit": 15,
              "failed_control_ids": []
            }
          },
          "attachment_parameters": [
            {
              "assessment_type": "Automated",
              "assessment_id": "rule-a637949b-7e51-46c4-afd4-b96619001bf1",
              "parameter_name": "session_invalidation_in_seconds",
              "parameter_default_value": "120",
              "parameter_display_name": "Sign out due to inactivity in seconds",
              "parameter_type": "numeric"
            }
          ],
          "last_scan": {
            "id": "0fd7e758-3ab3-492b-8b0d-0cd8ef3569d7",
            "status": "in_progress",
            "time": "2023-06-13T12:08:18.000Z"
          },
          "next_scan_time": "2023-06-13T13:08:18.000Z"
        }
      ]
    }
  • {
      "limit": 25,
      "total_count": 1,
      "first": {
        "href": "https://us-east.compliance.cloud.ibm.com/instances/6d5v891d-1f45-60a5-5b55-6hh6a82f2680/v3/control_libraries?account_id=cg3335893hh1428692d6747cf300yeb5&limit=25"
      },
      "next": {
        "href": ""
      },
      "attachments": [
        {
          "id": "0b7f7314e8a4206d62853c18011e5af8",
          "profile_id": "542b1aee-3ad8-49e9-a33c-44b64f117f18",
          "account_id": "cg3335893hh1428692d6747cf300yeb5",
          "instance_id": "edf9524f-406c-412c-acbb-ee371a5cabda",
          "name": "account-0d8c3805dfea40aa8ad02265a18eb12b",
          "description": "Test description",
          "scope": [
            {
              "environment": "ibm-cloud",
              "properties": [
                {
                  "name": "scope_id",
                  "value": "cg3335893hh1428692d6747cf300yeb5"
                },
                {
                  "name": "scope_type",
                  "value": "account"
                }
              ]
            }
          ],
          "created_by": "IBMid-6620049HI3",
          "created_on": "2023-02-09T10:54:59.000Z",
          "updated_by": "IBMid-6620049HI3",
          "updated_on": "2023-02-09T10:54:59.000Z",
          "status": "enabled",
          "schedule": "every_30_days",
          "notifications": {
            "enabled": false,
            "controls": {
              "threshold_limit": 15,
              "failed_control_ids": []
            }
          },
          "attachment_parameters": [
            {
              "assessment_type": "Automated",
              "assessment_id": "rule-a637949b-7e51-46c4-afd4-b96619001bf1",
              "parameter_name": "session_invalidation_in_seconds",
              "parameter_default_value": "120",
              "parameter_display_name": "Sign out due to inactivity in seconds",
              "parameter_type": "numeric"
            }
          ],
          "last_scan": {
            "id": "0fd7e758-3ab3-492b-8b0d-0cd8ef3569d7",
            "status": "in_progress",
            "time": "2023-06-13T12:08:18.000Z"
          },
          "next_scan_time": "2023-06-13T13:08:18.000Z"
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `attachment_id`s parameter is invalid.",
          "target": {
            "name": "attachment_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `attachment_id`s parameter is invalid.",
          "target": {
            "name": "attachment_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "You're not authorized to complete this request."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "You're not authorized to complete this request."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 404,
      "errors": [
        {
          "code": "attachment_not_found",
          "message": "The report for `attachment_id` '65810ac762004f22ac19f8f8edf70a34' is not found.",
          "target": {
            "name": "attachment_id",
            "type": "parameter",
            "value": "65810ac762004f22ac19f8f8edf70a34"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 404,
      "errors": [
        {
          "code": "attachment_not_found",
          "message": "The report for `attachment_id` '65810ac762004f22ac19f8f8edf70a34' is not found.",
          "target": {
            "name": "attachment_id",
            "type": "parameter",
            "value": "65810ac762004f22ac19f8f8edf70a34"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 500,
      "errors": [
        {
          "code": "internal_server_error",
          "message": "The server has encountered an unexpected internal error."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 500,
      "errors": [
        {
          "code": "internal_server_error",
          "message": "The server has encountered an unexpected internal error."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service that is required is unavailable. Try again later."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service that is required is unavailable. Try again later."
        }
      ]
    }

List latest reports

Retrieve the latest reports, which are grouped by profile ID, scope ID, and attachment ID. For more information, see Viewing results.

Retrieve the latest reports, which are grouped by profile ID, scope ID, and attachment ID. For more information, see Viewing results.

Retrieve the latest reports, which are grouped by profile ID, scope ID, and attachment ID. For more information, see Viewing results.

Retrieve the latest reports, which are grouped by profile ID, scope ID, and attachment ID. For more information, see Viewing results.

Retrieve the latest reports, which are grouped by profile ID, scope ID, and attachment ID. For more information, see Viewing results.

GET /reports/latest
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) GetLatestReports(getLatestReportsOptions *GetLatestReportsOptions) (result *ReportLatest, response *core.DetailedResponse, err error)
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) GetLatestReportsWithContext(ctx context.Context, getLatestReportsOptions *GetLatestReportsOptions) (result *ReportLatest, response *core.DetailedResponse, err error)
getLatestReports(params)
get_latest_reports(
        self,
        *,
        x_correlation_id: str = None,
        x_request_id: str = None,
        sort: str = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<ReportLatest> getLatestReports(GetLatestReportsOptions getLatestReportsOptions)

Request

Instantiate the GetLatestReportsOptions struct and set the fields to provide parameter values for the GetLatestReports method.

Use the GetLatestReportsOptions.Builder to create a GetLatestReportsOptions object that contains the parameter values for the getLatestReports method.

Custom Headers

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

Query Parameters

  • This field sorts results by using a valid sort field. To learn more, see Sorting.

    Possible values: 1 ≤ length ≤ 32, Value must match regular expression ^[\-]?[a-z0-9_]+$

    Example: profile_name

WithContext method only

The GetLatestReports options.

parameters

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • This field sorts results by using a valid sort field. To learn more, see Sorting.

    Possible values: 1 ≤ length ≤ 32, Value must match regular expression /^[\\-]?[a-z0-9_]+$/

    Examples:
    value
    _source
    _lines
    _html

parameters

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • This field sorts results by using a valid sort field. To learn more, see Sorting.

    Possible values: 1 ≤ length ≤ 32, Value must match regular expression /^[\\-]?[a-z0-9_]+$/

    Examples:
    value
    _source
    _lines
    _html

The getLatestReports options.

  • curl -X GET --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/reports/latest?sort=profile_name"
  • getLatestReportsOptions := securityAndComplianceCenterApiService.NewGetLatestReportsOptions()
    getLatestReportsOptions.SetSort("profile_name")
    
    reportLatest, response, err := securityAndComplianceCenterApiService.GetLatestReports(getLatestReportsOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(reportLatest, "", "  ")
    fmt.Println(string(b))
  • const params = {
      sort: 'profile_name',
    };
    
    let res;
    try {
      res = await securityAndComplianceCenterApiService.getLatestReports(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • response = security_and_compliance_center_api_service.get_latest_reports(
      sort='profile_name',
    )
    report_latest = response.get_result()
    
    print(json.dumps(report_latest, indent=2))
  • GetLatestReportsOptions getLatestReportsOptions = new GetLatestReportsOptions.Builder()
      .sort("profile_name")
      .build();
    
    Response<ReportLatest> response = securityAndComplianceCenterApiService.getLatestReports(getLatestReportsOptions).execute();
    ReportLatest reportLatest = response.getResult();
    
    System.out.println(reportLatest);

Response

The response body of the get_latest_reports operation.

The response body of the get_latest_reports operation.

Examples:
View

The response body of the get_latest_reports operation.

Examples:
View

The response body of the get_latest_reports operation.

Examples:
View

The response body of the get_latest_reports operation.

Examples:
View

Status Code

  • The reports were successfully retrieved.

  • Invalid request

  • Your request is unauthorized.

  • You do not have access to this resource.

  • The client sent too many requests in a short amount of time.

  • A backend service that is required to complete the operation is unavailable. Try again later.

Example responses
  • {
      "home_account_id": "f88fd4aa842b46b08652b650370b917c",
      "controls_summary": {
        "status": "not_compliant",
        "total_count": 6,
        "compliant_count": 4,
        "not_compliant_count": 2,
        "unable_to_perform_count": 0,
        "user_evaluation_required_count": 0,
        "not_compliant_controls": [
          {
            "id": "812197b3-9c5b-4742-94d9-66a6155ade60",
            "control_name": "1.19",
            "control_description": "Ensure security questions are registered by the account owner"
          },
          {
            "id": "812197b3-9c5b-4742-94d9-66a6155ade60",
            "control_name": "1.20",
            "control_description": "Ensure authorized IP ranges are configured for the account"
          }
        ]
      },
      "evaluations_summary": {
        "status": "not_compliant",
        "total_count": 6,
        "pass_count": 4,
        "failure_count": 2,
        "error_count": 0,
        "completed_count": 56
      },
      "score": {
        "pass_count": 4,
        "total_count": 6,
        "percent": 66
      },
      "reports": [
        {
          "id": "8271c6e3-12fb-4ae6-a05d-a64cfd2e838f",
          "type": "scheduled",
          "group_id": "13204dec1928aa4739e928c5475557e8a5351f8547403bd1e6c67a0fd3a8cc51",
          "created_on": "2023-04-28T18:29:52.606Z",
          "scan_time": "2023-04-28T18:24:06.000Z",
          "cos_object": "scc-bucket",
          "instance_id": "84644a08-31b6-4988-b504-49a46ca69ccd",
          "account": {
            "id": "f88fd4aa842b46b08652b650370b917c"
          },
          "profile": {
            "id": "84644a08-31b6-4988-b504-49a46ca69ccd",
            "name": "IBM Cloud Security Best Practices",
            "version": "1.0.0"
          },
          "scope": {
            "id": "f88fd4aa842b46b08652b650370b917c",
            "type": "account"
          },
          "attachment": {
            "id": "f88fd4aa842b46b08652b650370b917c",
            "name": "resource group - Default",
            "description": "Scoped to the Default resource group",
            "schedule": "24H",
            "notifications": {
              "enabled": true,
              "controls": {
                "threshold_limit": 15
              }
            },
            "scope": [
              {
                "id": "ca0941aa-b7e2-43a3-9794-1b3d322474d9",
                "environment": "ibm-cloud",
                "properties": [
                  {
                    "name": "scope_id",
                    "value": "18d32a4430e54c81a6668952609763b2"
                  },
                  {
                    "name": "scope_type",
                    "value": "account"
                  }
                ]
              }
            ]
          },
          "controls_summary": {
            "status": "not_compliant",
            "total_count": 6,
            "compliant_count": 4,
            "not_compliant_count": 2,
            "unable_to_perform_count": 0,
            "user_evaluation_required_count": 0,
            "not_compliant_controls": [
              {
                "id": "812197b3-9c5b-4742-94d9-66a6155ade60",
                "control_name": "1.19",
                "control_description": "Ensure security questions are registered by the account owner"
              },
              {
                "id": "812197b3-9c5b-4742-94d9-66a6155ade60",
                "control_name": "1.20",
                "control_description": "Ensure authorized IP ranges are configured for the account"
              }
            ],
            "evaluations_summary": {
              "status": "not_compliant",
              "total_count": 6,
              "pass_count": 4,
              "failure_count": 2,
              "error_count": 0,
              "completed_count": 56
            },
            "tags": {
              "user": [],
              "access": [],
              "service": []
            }
          }
        }
      ]
    }
  • {
      "home_account_id": "f88fd4aa842b46b08652b650370b917c",
      "controls_summary": {
        "status": "not_compliant",
        "total_count": 6,
        "compliant_count": 4,
        "not_compliant_count": 2,
        "unable_to_perform_count": 0,
        "user_evaluation_required_count": 0,
        "not_compliant_controls": [
          {
            "id": "812197b3-9c5b-4742-94d9-66a6155ade60",
            "control_name": "1.19",
            "control_description": "Ensure security questions are registered by the account owner"
          },
          {
            "id": "812197b3-9c5b-4742-94d9-66a6155ade60",
            "control_name": "1.20",
            "control_description": "Ensure authorized IP ranges are configured for the account"
          }
        ]
      },
      "evaluations_summary": {
        "status": "not_compliant",
        "total_count": 6,
        "pass_count": 4,
        "failure_count": 2,
        "error_count": 0,
        "completed_count": 56
      },
      "score": {
        "pass_count": 4,
        "total_count": 6,
        "percent": 66
      },
      "reports": [
        {
          "id": "8271c6e3-12fb-4ae6-a05d-a64cfd2e838f",
          "type": "scheduled",
          "group_id": "13204dec1928aa4739e928c5475557e8a5351f8547403bd1e6c67a0fd3a8cc51",
          "created_on": "2023-04-28T18:29:52.606Z",
          "scan_time": "2023-04-28T18:24:06.000Z",
          "cos_object": "scc-bucket",
          "instance_id": "84644a08-31b6-4988-b504-49a46ca69ccd",
          "account": {
            "id": "f88fd4aa842b46b08652b650370b917c"
          },
          "profile": {
            "id": "84644a08-31b6-4988-b504-49a46ca69ccd",
            "name": "IBM Cloud Security Best Practices",
            "version": "1.0.0"
          },
          "scope": {
            "id": "f88fd4aa842b46b08652b650370b917c",
            "type": "account"
          },
          "attachment": {
            "id": "f88fd4aa842b46b08652b650370b917c",
            "name": "resource group - Default",
            "description": "Scoped to the Default resource group",
            "schedule": "24H",
            "notifications": {
              "enabled": true,
              "controls": {
                "threshold_limit": 15
              }
            },
            "scope": [
              {
                "id": "ca0941aa-b7e2-43a3-9794-1b3d322474d9",
                "environment": "ibm-cloud",
                "properties": [
                  {
                    "name": "scope_id",
                    "value": "18d32a4430e54c81a6668952609763b2"
                  },
                  {
                    "name": "scope_type",
                    "value": "account"
                  }
                ]
              }
            ]
          },
          "controls_summary": {
            "status": "not_compliant",
            "total_count": 6,
            "compliant_count": 4,
            "not_compliant_count": 2,
            "unable_to_perform_count": 0,
            "user_evaluation_required_count": 0,
            "not_compliant_controls": [
              {
                "id": "812197b3-9c5b-4742-94d9-66a6155ade60",
                "control_name": "1.19",
                "control_description": "Ensure security questions are registered by the account owner"
              },
              {
                "id": "812197b3-9c5b-4742-94d9-66a6155ade60",
                "control_name": "1.20",
                "control_description": "Ensure authorized IP ranges are configured for the account"
              }
            ],
            "evaluations_summary": {
              "status": "not_compliant",
              "total_count": 6,
              "pass_count": 4,
              "failure_count": 2,
              "error_count": 0,
              "completed_count": 56
            },
            "tags": {
              "user": [],
              "access": [],
              "service": []
            }
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `report_id` parameter is invalid.",
          "target": {
            "name": "report_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `report_id` parameter is invalid.",
          "target": {
            "name": "report_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "The request could not be authorized."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "The request could not be authorized."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service is unavailable. Try again later."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service is unavailable. Try again later."
        }
      ]
    }

List reports

Retrieve a page of reports that are filtered by the specified parameters. For more information, see Viewing results.

Retrieve a page of reports that are filtered by the specified parameters. For more information, see Viewing results.

Retrieve a page of reports that are filtered by the specified parameters. For more information, see Viewing results.

Retrieve a page of reports that are filtered by the specified parameters. For more information, see Viewing results.

Retrieve a page of reports that are filtered by the specified parameters. For more information, see Viewing results.

GET /reports
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) ListReports(listReportsOptions *ListReportsOptions) (result *ReportPage, response *core.DetailedResponse, err error)
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) ListReportsWithContext(ctx context.Context, listReportsOptions *ListReportsOptions) (result *ReportPage, response *core.DetailedResponse, err error)
listReports(params)
list_reports(
        self,
        *,
        x_correlation_id: str = None,
        x_request_id: str = None,
        attachment_id: str = None,
        group_id: str = None,
        profile_id: str = None,
        type: str = None,
        start: str = None,
        limit: int = None,
        sort: str = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<ReportPage> listReports(ListReportsOptions listReportsOptions)

Request

Instantiate the ListReportsOptions struct and set the fields to provide parameter values for the ListReports method.

Use the ListReportsOptions.Builder to create a ListReportsOptions object that contains the parameter values for the listReports method.

Custom Headers

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

Query Parameters

  • The ID of the attachment.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression ^[a-zA-Z0-9\-]+$

  • The report group ID.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression ^[a-zA-Z0-9\-]+$

  • The ID of the profile.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression ^[a-zA-Z0-9\-]+$

  • The type of the scan.

    Allowable values: [ondemand,scheduled]

    Example: scheduled

  • The indication of what resource to start the page on.

    Possible values: 0 ≤ length ≤ 512, Value must match regular expression ^[a-zA-Z0-9\-]+$

  • The indication of many resources to return, unless the response is the last page of resources.

    Possible values: 0 ≤ value ≤ 100

    Default: 50

  • This field sorts results by using a valid sort field. To learn more, see Sorting.

    Possible values: 1 ≤ length ≤ 32, Value must match regular expression ^[\-]?[a-z0-9_]+$

    Example: profile_name

WithContext method only

The ListReports options.

parameters

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The ID of the attachment.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The report group ID.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The ID of the profile.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The type of the scan.

    Allowable values: [ondemand,scheduled]

    Examples:
    value
    _source
    _lines
    _html
  • The indication of what resource to start the page on.

    Possible values: 0 ≤ length ≤ 512, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The indication of many resources to return, unless the response is the last page of resources.

    Possible values: 0 ≤ value ≤ 100

    Default: 50

  • This field sorts results by using a valid sort field. To learn more, see Sorting.

    Possible values: 1 ≤ length ≤ 32, Value must match regular expression /^[\\-]?[a-z0-9_]+$/

    Examples:
    value
    _source
    _lines
    _html

parameters

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The ID of the attachment.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The report group ID.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The ID of the profile.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The type of the scan.

    Allowable values: [ondemand,scheduled]

    Examples:
    value
    _source
    _lines
    _html
  • The indication of what resource to start the page on.

    Possible values: 0 ≤ length ≤ 512, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The indication of many resources to return, unless the response is the last page of resources.

    Possible values: 0 ≤ value ≤ 100

    Default: 50

  • This field sorts results by using a valid sort field. To learn more, see Sorting.

    Possible values: 1 ≤ length ≤ 32, Value must match regular expression /^[\\-]?[a-z0-9_]+$/

    Examples:
    value
    _source
    _lines
    _html

The listReports options.

  • curl -X GET --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/reports?type=typeForReportLink&sort=profile_name"
  • listReportsOptions := &securityandcompliancecenterapiv3.ListReportsOptions{
      XCorrelationID: &xCorrelationIdLink,
      XRequestID: core.StringPtr("testString"),
      AttachmentID: &attachmentIdForReportLink,
      GroupID: &groupIdForReportLink,
      ProfileID: &profileIdForReportLink,
      Type: &typeForReportLink,
      Limit: core.Int64Ptr(int64(10)),
      Sort: core.StringPtr("profile_name"),
    }
    
    pager, err := securityAndComplianceCenterApiService.NewReportsPager(listReportsOptions)
    if err != nil {
      panic(err)
    }
    
    var allResults []securityandcompliancecenterapiv3.Report
    for pager.HasNext() {
      nextPage, err := pager.GetNext()
      if err != nil {
        panic(err)
      }
      allResults = append(allResults, nextPage...)
    }
    b, _ := json.MarshalIndent(allResults, "", "  ")
    fmt.Println(string(b))
  • const params = {
      xCorrelationId: xCorrelationIdLink,
      xRequestId: 'testString',
      attachmentId: attachmentIdForReportLink,
      groupId: groupIdForReportLink,
      profileId: profileIdForReportLink,
      type: typeForReportLink,
      limit: 10,
      sort: 'profile_name',
    };
    
    const allResults = [];
    try {
      const pager = new SecurityAndComplianceCenterApiV3.ReportsPager(securityAndComplianceCenterApiService, params);
      while (pager.hasNext()) {
        const nextPage = await pager.getNext();
        expect(nextPage).not.toBeNull();
        allResults.push(...nextPage);
      }
      console.log(JSON.stringify(allResults, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • all_results = []
    pager = ReportsPager(
      client=security_and_compliance_center_api_service,
      x_correlation_id=x_correlation_id_link,
      x_request_id='testString',
      attachment_id=attachment_id_for_report_link,
      group_id=group_id_for_report_link,
      profile_id=profile_id_for_report_link,
      type=type_for_report_link,
      limit=10,
      sort='profile_name',
    )
    while pager.has_next():
      next_page = pager.get_next()
      assert next_page is not None
      all_results.extend(next_page)
    
    print(json.dumps(all_results, indent=2))
  • ListReportsOptions listReportsOptions = new ListReportsOptions.Builder()
      .xCorrelationId(xCorrelationIdLink)
      .xRequestId("testString")
      .attachmentId(attachmentIdForReportLink)
      .groupId(groupIdForReportLink)
      .profileId(profileIdForReportLink)
      .type(typeForReportLink)
      .limit(Long.valueOf("10"))
      .sort("profile_name")
      .build();
    
    ReportsPager pager = new ReportsPager(securityAndComplianceCenterApiService, listReportsOptions);
    List<Report> allResults = new ArrayList<>();
    while (pager.hasNext()) {
      List<Report> nextPage = pager.getNext();
      allResults.addAll(nextPage);
    }
    
    System.out.println(GsonSingleton.getGson().toJson(allResults));

Response

The page of reports.

The page of reports.

The page of reports.

The page of reports.

The page of reports.

Status Code

  • The reports were successfully retrieved.

  • Invalid request

  • Your request is unauthorized.

  • You do not have access to this resource.

  • The client sent too many requests in a short amount of time.

  • A backend service that is required to complete the operation is unavailable. Try again later.

Example responses
  • {
      "limit": 50,
      "total_count": 1,
      "first": {
        "href": "https://us-south.compliance.cloud.ibm.com/instances/5c0663bc-eee3-4b0d-bb43-e9de2af927be/v3/reports?limit=50"
      },
      "next": {
        "href": "https://us-south.compliance.cloud.ibm.com/instances/5c0663bc-eee3-4b0d-bb43-e9de2af927be/v3/reports?limit=50&start=WzE2ODI1MzAwMDA0NjUsIjgzMjYxYjI0LTk4ZDctNGU1My05MjI1LTgxNTc5NzZjYzczZSJd",
        "start": "WzE2ODI1MzAwMDA0NjUsIjgzMjYxYjI0LTk4ZDctNGU1My05MjI1LTgxNTc5NzZjYzczZSJd"
      },
      "home_account_id": "f88fd4aa842b46b08652b650370b917c",
      "reports": [
        {
          "id": "8271c6e3-12fb-4ae6-a05d-a64cfd2e838f",
          "type": "scheduled",
          "group_id": "13204dec1928aa4739e928c5475557e8a5351f8547403bd1e6c67a0fd3a8cc51",
          "created_on": "2023-04-28T18:29:52.606Z",
          "scan_time": "2023-04-28T18:24:06.000Z",
          "cos_object": "scc-bucket",
          "instance_id": "84644a08-31b6-4988-b504-49a46ca69ccd",
          "account": {
            "id": "f88fd4aa842b46b08652b650370b917c"
          },
          "profile": {
            "id": "84644a08-31b6-4988-b504-49a46ca69ccd",
            "name": "IBM Cloud Security Best Practices",
            "version": "1.0.0"
          },
          "scope": {
            "id": "f88fd4aa842b46b08652b650370b917c",
            "type": "account"
          },
          "attachment": {
            "id": "f88fd4aa842b46b08652b650370b917c",
            "name": "resource group - Default",
            "description": "Scoped to the Default resource group",
            "schedule": "24H",
            "notifications": {
              "enabled": true,
              "controls": {
                "threshold_limit": 15
              }
            },
            "scope": [
              {
                "id": "ca0941aa-b7e2-43a3-9794-1b3d322474d9",
                "environment": "ibm-cloud",
                "properties": [
                  {
                    "name": "scope_id",
                    "value": "18d32a4430e54c81a6668952609763b2"
                  },
                  {
                    "name": "scope_type",
                    "value": "account"
                  }
                ]
              }
            ]
          },
          "controls_summary": {
            "status": "not_compliant",
            "total_count": 6,
            "compliant_count": 4,
            "not_compliant_count": 2,
            "unable_to_perform_count": 0,
            "user_evaluation_required_count": 0,
            "not_compliant_controls": [
              {
                "id": "812197b3-9c5b-4742-94d9-66a6155ade60",
                "control_name": "1.19",
                "control_description": "Ensure security questions are registered by the account owner"
              },
              {
                "id": "812197b3-9c5b-4742-94d9-66a6155ade60",
                "control_name": "1.20",
                "control_description": "Ensure authorized IP ranges are configured for the account"
              }
            ]
          },
          "evaluations_summary": {
            "status": "not_compliant",
            "total_count": 6,
            "pass_count": 4,
            "failure_count": 2,
            "error_count": 0,
            "completed_count": 56
          },
          "tags": {
            "user": [],
            "access": [],
            "service": []
          }
        }
      ]
    }
  • {
      "limit": 50,
      "total_count": 1,
      "first": {
        "href": "https://us-south.compliance.cloud.ibm.com/instances/5c0663bc-eee3-4b0d-bb43-e9de2af927be/v3/reports?limit=50"
      },
      "next": {
        "href": "https://us-south.compliance.cloud.ibm.com/instances/5c0663bc-eee3-4b0d-bb43-e9de2af927be/v3/reports?limit=50&start=WzE2ODI1MzAwMDA0NjUsIjgzMjYxYjI0LTk4ZDctNGU1My05MjI1LTgxNTc5NzZjYzczZSJd",
        "start": "WzE2ODI1MzAwMDA0NjUsIjgzMjYxYjI0LTk4ZDctNGU1My05MjI1LTgxNTc5NzZjYzczZSJd"
      },
      "home_account_id": "f88fd4aa842b46b08652b650370b917c",
      "reports": [
        {
          "id": "8271c6e3-12fb-4ae6-a05d-a64cfd2e838f",
          "type": "scheduled",
          "group_id": "13204dec1928aa4739e928c5475557e8a5351f8547403bd1e6c67a0fd3a8cc51",
          "created_on": "2023-04-28T18:29:52.606Z",
          "scan_time": "2023-04-28T18:24:06.000Z",
          "cos_object": "scc-bucket",
          "instance_id": "84644a08-31b6-4988-b504-49a46ca69ccd",
          "account": {
            "id": "f88fd4aa842b46b08652b650370b917c"
          },
          "profile": {
            "id": "84644a08-31b6-4988-b504-49a46ca69ccd",
            "name": "IBM Cloud Security Best Practices",
            "version": "1.0.0"
          },
          "scope": {
            "id": "f88fd4aa842b46b08652b650370b917c",
            "type": "account"
          },
          "attachment": {
            "id": "f88fd4aa842b46b08652b650370b917c",
            "name": "resource group - Default",
            "description": "Scoped to the Default resource group",
            "schedule": "24H",
            "notifications": {
              "enabled": true,
              "controls": {
                "threshold_limit": 15
              }
            },
            "scope": [
              {
                "id": "ca0941aa-b7e2-43a3-9794-1b3d322474d9",
                "environment": "ibm-cloud",
                "properties": [
                  {
                    "name": "scope_id",
                    "value": "18d32a4430e54c81a6668952609763b2"
                  },
                  {
                    "name": "scope_type",
                    "value": "account"
                  }
                ]
              }
            ]
          },
          "controls_summary": {
            "status": "not_compliant",
            "total_count": 6,
            "compliant_count": 4,
            "not_compliant_count": 2,
            "unable_to_perform_count": 0,
            "user_evaluation_required_count": 0,
            "not_compliant_controls": [
              {
                "id": "812197b3-9c5b-4742-94d9-66a6155ade60",
                "control_name": "1.19",
                "control_description": "Ensure security questions are registered by the account owner"
              },
              {
                "id": "812197b3-9c5b-4742-94d9-66a6155ade60",
                "control_name": "1.20",
                "control_description": "Ensure authorized IP ranges are configured for the account"
              }
            ]
          },
          "evaluations_summary": {
            "status": "not_compliant",
            "total_count": 6,
            "pass_count": 4,
            "failure_count": 2,
            "error_count": 0,
            "completed_count": 56
          },
          "tags": {
            "user": [],
            "access": [],
            "service": []
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `report_id` parameter is invalid.",
          "target": {
            "name": "report_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `report_id` parameter is invalid.",
          "target": {
            "name": "report_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "The request could not be authorized."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "The request could not be authorized."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service is unavailable. Try again later."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service is unavailable. Try again later."
        }
      ]
    }

Get a report

Retrieve a report by specifying its ID. For more information, see Viewing results.

Retrieve a report by specifying its ID. For more information, see Viewing results.

Retrieve a report by specifying its ID. For more information, see Viewing results.

Retrieve a report by specifying its ID. For more information, see Viewing results.

Retrieve a report by specifying its ID. For more information, see Viewing results.

GET /reports/{report_id}
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) GetReport(getReportOptions *GetReportOptions) (result *Report, response *core.DetailedResponse, err error)
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) GetReportWithContext(ctx context.Context, getReportOptions *GetReportOptions) (result *Report, response *core.DetailedResponse, err error)
getReport(params)
get_report(
        self,
        report_id: str,
        *,
        x_correlation_id: str = None,
        x_request_id: str = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<Report> getReport(GetReportOptions getReportOptions)

Request

Instantiate the GetReportOptions struct and set the fields to provide parameter values for the GetReport method.

Use the GetReportOptions.Builder to create a GetReportOptions object that contains the parameter values for the getReport method.

Custom Headers

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

Path Parameters

  • The ID of the scan that is associated with a report.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression ^[a-zA-Z0-9\-]+$

WithContext method only

The GetReport options.

parameters

  • The ID of the scan that is associated with a report.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

parameters

  • The ID of the scan that is associated with a report.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

The getReport options.

  • curl -X GET --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/reports/{report_id}"
  • getReportOptions := securityAndComplianceCenterApiService.NewGetReportOptions(
      reportIdForReportLink,
    )
    
    report, response, err := securityAndComplianceCenterApiService.GetReport(getReportOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(report, "", "  ")
    fmt.Println(string(b))
  • const params = {
      reportId: reportIdForReportLink,
    };
    
    let res;
    try {
      res = await securityAndComplianceCenterApiService.getReport(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • response = security_and_compliance_center_api_service.get_report(
      report_id=report_id_for_report_link,
    )
    report = response.get_result()
    
    print(json.dumps(report, indent=2))
  • GetReportOptions getReportOptions = new GetReportOptions.Builder()
      .reportId(reportIdForReportLink)
      .build();
    
    Response<Report> response = securityAndComplianceCenterApiService.getReport(getReportOptions).execute();
    Report report = response.getResult();
    
    System.out.println(report);

Response

The report.

The report.

Examples:
View

The report.

Examples:
View

The report.

Examples:
View

The report.

Examples:
View

Status Code

  • The report was successfully retrieved.

  • Invalid request

  • Your request is unauthorized.

  • You do not have access to this resource.

  • The specified resource was not be found.

  • The client sent too many requests in a short amount of time.

  • A backend service that is required to complete the operation is unavailable. Try again later.

Example responses
  • {
      "id": "2f9cbb25-f89a-4658-bf8a-2eb497c6df71",
      "type": "scheduled",
      "group_id": "4a7999a6ec735d4b355f44f546d2795d89c54df159f2cf14169ccebb4ae25be3",
      "created_on": "2023-05-02T21:20:16.008Z",
      "scan_time": "2023-05-02T21:12:56.000Z",
      "cos_object": "scc-bucket",
      "instance_id": "84644a08-31b6-4988-b504-49a46ca69ccd",
      "account": {
        "id": "f88fd4aa842b46b08652b650370b917c"
      },
      "profile": {
        "id": "f88fd4aa842b46b08652b650370b917c",
        "name": "IBM Cloud Security Best Practices",
        "version": "1.1.0"
      },
      "scope": {
        "id": "f88fd4aa842b46b08652b650370b917c",
        "type": "account"
      },
      "attachment": {
        "id": "f88fd4aa842b46b08652b650370b917c",
        "name": "resource group - Default",
        "description": "Scoped to the Default resource group",
        "schedule": "daily",
        "notifications": {
          "enabled": false,
          "controls": {
            "threshold_limit": 15
          }
        },
        "scope": [
          {
            "id": "ca0941aa-b7e2-43a3-9794-1b3d322474d9",
            "environment": "ibm-cloud",
            "properties": [
              {
                "name": "scope_id",
                "value": "18d32a4430e54c81a6668952609763b2"
              },
              {
                "name": "scope_type",
                "value": "account"
              }
            ]
          }
        ]
      },
      "controls_summary": {
        "status": "not_compliant",
        "total_count": 6,
        "compliant_count": 4,
        "not_compliant_count": 2,
        "unable_to_perform_count": 0,
        "user_evaluation_required_count": 0,
        "not_compliant_controls": [
          {
            "id": "812197b3-9c5b-4742-94d9-66a6155ade60",
            "control_name": "1.19",
            "control_description": "Ensure security questions are registered by the account owner"
          },
          {
            "id": "812197b3-9c5b-4742-94d9-66a6155ade60",
            "control_name": "1.20",
            "control_description": "Ensure authorized IP ranges are configured for the account"
          }
        ]
      },
      "evaluations_summary": {
        "status": "not_compliant",
        "total_count": 6,
        "pass_count": 4,
        "failure_count": 2,
        "error_count": 0,
        "completed_count": 56
      },
      "tags": {
        "user": [],
        "access": [],
        "service": []
      }
    }
  • {
      "id": "2f9cbb25-f89a-4658-bf8a-2eb497c6df71",
      "type": "scheduled",
      "group_id": "4a7999a6ec735d4b355f44f546d2795d89c54df159f2cf14169ccebb4ae25be3",
      "created_on": "2023-05-02T21:20:16.008Z",
      "scan_time": "2023-05-02T21:12:56.000Z",
      "cos_object": "scc-bucket",
      "instance_id": "84644a08-31b6-4988-b504-49a46ca69ccd",
      "account": {
        "id": "f88fd4aa842b46b08652b650370b917c"
      },
      "profile": {
        "id": "f88fd4aa842b46b08652b650370b917c",
        "name": "IBM Cloud Security Best Practices",
        "version": "1.1.0"
      },
      "scope": {
        "id": "f88fd4aa842b46b08652b650370b917c",
        "type": "account"
      },
      "attachment": {
        "id": "f88fd4aa842b46b08652b650370b917c",
        "name": "resource group - Default",
        "description": "Scoped to the Default resource group",
        "schedule": "daily",
        "notifications": {
          "enabled": false,
          "controls": {
            "threshold_limit": 15
          }
        },
        "scope": [
          {
            "id": "ca0941aa-b7e2-43a3-9794-1b3d322474d9",
            "environment": "ibm-cloud",
            "properties": [
              {
                "name": "scope_id",
                "value": "18d32a4430e54c81a6668952609763b2"
              },
              {
                "name": "scope_type",
                "value": "account"
              }
            ]
          }
        ]
      },
      "controls_summary": {
        "status": "not_compliant",
        "total_count": 6,
        "compliant_count": 4,
        "not_compliant_count": 2,
        "unable_to_perform_count": 0,
        "user_evaluation_required_count": 0,
        "not_compliant_controls": [
          {
            "id": "812197b3-9c5b-4742-94d9-66a6155ade60",
            "control_name": "1.19",
            "control_description": "Ensure security questions are registered by the account owner"
          },
          {
            "id": "812197b3-9c5b-4742-94d9-66a6155ade60",
            "control_name": "1.20",
            "control_description": "Ensure authorized IP ranges are configured for the account"
          }
        ]
      },
      "evaluations_summary": {
        "status": "not_compliant",
        "total_count": 6,
        "pass_count": 4,
        "failure_count": 2,
        "error_count": 0,
        "completed_count": 56
      },
      "tags": {
        "user": [],
        "access": [],
        "service": []
      }
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `report_id` parameter is invalid.",
          "target": {
            "name": "report_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `report_id` parameter is invalid.",
          "target": {
            "name": "report_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "The request could not be authorized."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "The request could not be authorized."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 404,
      "errors": [
        {
          "code": "report_not_found",
          "message": "The report for `report_id` '65810ac762004f22ac19f8f8edf70a34' is not found.",
          "target": {
            "name": "report_id",
            "type": "parameter",
            "value": "65810ac762004f22ac19f8f8edf70a34"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 404,
      "errors": [
        {
          "code": "report_not_found",
          "message": "The report for `report_id` '65810ac762004f22ac19f8f8edf70a34' is not found.",
          "target": {
            "name": "report_id",
            "type": "parameter",
            "value": "65810ac762004f22ac19f8f8edf70a34"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service is unavailable. Try again later."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service is unavailable. Try again later."
        }
      ]
    }

Get a report summary

Retrieve the complete summarized information for a report. For more information, see Viewing results.

Retrieve the complete summarized information for a report. For more information, see Viewing results.

Retrieve the complete summarized information for a report. For more information, see Viewing results.

Retrieve the complete summarized information for a report. For more information, see Viewing results.

Retrieve the complete summarized information for a report. For more information, see Viewing results.

GET /reports/{report_id}/summary
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) GetReportSummary(getReportSummaryOptions *GetReportSummaryOptions) (result *ReportSummary, response *core.DetailedResponse, err error)
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) GetReportSummaryWithContext(ctx context.Context, getReportSummaryOptions *GetReportSummaryOptions) (result *ReportSummary, response *core.DetailedResponse, err error)
getReportSummary(params)
get_report_summary(
        self,
        report_id: str,
        *,
        x_correlation_id: str = None,
        x_request_id: str = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<ReportSummary> getReportSummary(GetReportSummaryOptions getReportSummaryOptions)

Request

Instantiate the GetReportSummaryOptions struct and set the fields to provide parameter values for the GetReportSummary method.

Use the GetReportSummaryOptions.Builder to create a GetReportSummaryOptions object that contains the parameter values for the getReportSummary method.

Custom Headers

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

Path Parameters

  • The ID of the scan that is associated with a report.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression ^[a-zA-Z0-9\-]+$

WithContext method only

The GetReportSummary options.

parameters

  • The ID of the scan that is associated with a report.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

parameters

  • The ID of the scan that is associated with a report.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

The getReportSummary options.

  • curl -X GET --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/reports/{report_id}/summary"
  • getReportSummaryOptions := securityAndComplianceCenterApiService.NewGetReportSummaryOptions(
      reportIdForReportLink,
    )
    
    reportSummary, response, err := securityAndComplianceCenterApiService.GetReportSummary(getReportSummaryOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(reportSummary, "", "  ")
    fmt.Println(string(b))
  • const params = {
      reportId: reportIdForReportLink,
    };
    
    let res;
    try {
      res = await securityAndComplianceCenterApiService.getReportSummary(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • response = security_and_compliance_center_api_service.get_report_summary(
      report_id=report_id_for_report_link,
    )
    report_summary = response.get_result()
    
    print(json.dumps(report_summary, indent=2))
  • GetReportSummaryOptions getReportSummaryOptions = new GetReportSummaryOptions.Builder()
      .reportId(reportIdForReportLink)
      .build();
    
    Response<ReportSummary> response = securityAndComplianceCenterApiService.getReportSummary(getReportSummaryOptions).execute();
    ReportSummary reportSummary = response.getResult();
    
    System.out.println(reportSummary);

Response

The report summary.

The report summary.

Examples:
View

The report summary.

Examples:
View

The report summary.

Examples:
View

The report summary.

Examples:
View

Status Code

  • The information was successfully retrieved.

  • Invalid request

  • Your request is unauthorized.

  • You do not have access to this resource.

  • The specified resource was not be found.

  • The client sent too many requests in a short amount of time.

  • A backend service that is required to complete the operation is unavailable. Try again later.

Example responses
  • {
      "report_id": "812197b3-9c5b-4742-94d9-66a6155ade60",
      "instance_id": "84644a08-31b6-4988-b504-49a46ca69ccd",
      "account": {
        "id": "f88fd4aa842b46b08652b650370b917c"
      },
      "score": {
        "pass_count": 10,
        "total_count": 8,
        "percent": 80
      },
      "evaluations": {
        "status": "not_compliant",
        "total_count": 10,
        "pass_count": 7,
        "failure_count": 2,
        "error_count": 0,
        "completed_count": 70
      },
      "controls": {
        "status": "not_compliant",
        "total_count": 5,
        "compliant_count": 3,
        "not_compliant_count": 2,
        "unable_to_perform_count": 0,
        "user_evaluation_required_count": 0,
        "not_compliant_controls": [
          {
            "id": "7a02f514-261d-4632-aa38-69a924c64e04",
            "control_name": "1.19",
            "control_description": "Ensure security questions are registered by the account owner"
          },
          {
            "id": "52ae63cf-6202-492f-a031-428d1417b056",
            "control_name": "1.20",
            "control_description": "Ensure authorized IP ranges are configured for the account"
          }
        ]
      },
      "resources": {
        "status": "not_compliant",
        "total_count": 3,
        "compliant_count": 2,
        "not_compliant_count": 1,
        "unable_to_perform_count": 0,
        "user_evaluation_required_count": 0,
        "top_failed": [
          {
            "id": "crn:v1:staging:public:cloud-object-storage:global:a/f88fd4aa842b46b08652b650370b917c:812197b3-9c5b-4742-94d9-66a6155ade60:bucket:scc-bucket",
            "name": "scc-bucket",
            "account": "f88fd4aa842b46b08652b650370b917c",
            "service": "cloud-object-storage",
            "service_display_name": "Cloud Object Storage",
            "tags": {
              "user": [],
              "access": [],
              "service": []
            },
            "status": "not_compliant",
            "total_count": 8,
            "pass_count": 3,
            "failure_count": 5,
            "error_count": 0,
            "completed_count": 8
          }
        ]
      }
    }
  • {
      "report_id": "812197b3-9c5b-4742-94d9-66a6155ade60",
      "instance_id": "84644a08-31b6-4988-b504-49a46ca69ccd",
      "account": {
        "id": "f88fd4aa842b46b08652b650370b917c"
      },
      "score": {
        "pass_count": 10,
        "total_count": 8,
        "percent": 80
      },
      "evaluations": {
        "status": "not_compliant",
        "total_count": 10,
        "pass_count": 7,
        "failure_count": 2,
        "error_count": 0,
        "completed_count": 70
      },
      "controls": {
        "status": "not_compliant",
        "total_count": 5,
        "compliant_count": 3,
        "not_compliant_count": 2,
        "unable_to_perform_count": 0,
        "user_evaluation_required_count": 0,
        "not_compliant_controls": [
          {
            "id": "7a02f514-261d-4632-aa38-69a924c64e04",
            "control_name": "1.19",
            "control_description": "Ensure security questions are registered by the account owner"
          },
          {
            "id": "52ae63cf-6202-492f-a031-428d1417b056",
            "control_name": "1.20",
            "control_description": "Ensure authorized IP ranges are configured for the account"
          }
        ]
      },
      "resources": {
        "status": "not_compliant",
        "total_count": 3,
        "compliant_count": 2,
        "not_compliant_count": 1,
        "unable_to_perform_count": 0,
        "user_evaluation_required_count": 0,
        "top_failed": [
          {
            "id": "crn:v1:staging:public:cloud-object-storage:global:a/f88fd4aa842b46b08652b650370b917c:812197b3-9c5b-4742-94d9-66a6155ade60:bucket:scc-bucket",
            "name": "scc-bucket",
            "account": "f88fd4aa842b46b08652b650370b917c",
            "service": "cloud-object-storage",
            "service_display_name": "Cloud Object Storage",
            "tags": {
              "user": [],
              "access": [],
              "service": []
            },
            "status": "not_compliant",
            "total_count": 8,
            "pass_count": 3,
            "failure_count": 5,
            "error_count": 0,
            "completed_count": 8
          }
        ]
      }
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `report_id` parameter is invalid.",
          "target": {
            "name": "report_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `report_id` parameter is invalid.",
          "target": {
            "name": "report_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "The request could not be authorized."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "The request could not be authorized."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 404,
      "errors": [
        {
          "code": "report_not_found",
          "message": "The report for `report_id` '65810ac762004f22ac19f8f8edf70a34' is not found.",
          "target": {
            "name": "report_id",
            "type": "parameter",
            "value": "65810ac762004f22ac19f8f8edf70a34"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 404,
      "errors": [
        {
          "code": "report_not_found",
          "message": "The report for `report_id` '65810ac762004f22ac19f8f8edf70a34' is not found.",
          "target": {
            "name": "report_id",
            "type": "parameter",
            "value": "65810ac762004f22ac19f8f8edf70a34"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service is unavailable. Try again later."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service is unavailable. Try again later."
        }
      ]
    }

Get report evaluation details

Download a .csv file to inspect the evaluation details of a specified report. For more information, see Viewing results.

Download a .csv file to inspect the evaluation details of a specified report. For more information, see Viewing results.

Download a .csv file to inspect the evaluation details of a specified report. For more information, see Viewing results.

Download a .csv file to inspect the evaluation details of a specified report. For more information, see Viewing results.

Download a .csv file to inspect the evaluation details of a specified report. For more information, see Viewing results.

GET /reports/{report_id}/download
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) GetReportEvaluation(getReportEvaluationOptions *GetReportEvaluationOptions) (result io.ReadCloser, response *core.DetailedResponse, err error)
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) GetReportEvaluationWithContext(ctx context.Context, getReportEvaluationOptions *GetReportEvaluationOptions) (result io.ReadCloser, response *core.DetailedResponse, err error)
getReportEvaluation(params)
get_report_evaluation(
        self,
        report_id: str,
        *,
        x_correlation_id: str = None,
        x_request_id: str = None,
        exclude_summary: bool = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<InputStream> getReportEvaluation(GetReportEvaluationOptions getReportEvaluationOptions)

Request

Instantiate the GetReportEvaluationOptions struct and set the fields to provide parameter values for the GetReportEvaluation method.

Use the GetReportEvaluationOptions.Builder to create a GetReportEvaluationOptions object that contains the parameter values for the getReportEvaluation method.

Custom Headers

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

Path Parameters

  • The ID of the scan that is associated with a report.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression ^[a-zA-Z0-9\-]+$

Query Parameters

  • The indication of whether report summary metadata must be excluded.

WithContext method only

The GetReportEvaluation options.

parameters

  • The ID of the scan that is associated with a report.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The indication of whether report summary metadata must be excluded.

parameters

  • The ID of the scan that is associated with a report.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The indication of whether report summary metadata must be excluded.

The getReportEvaluation options.

  • curl -X GET --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/csv"   "{base_url}/reports/{report_id}/download"
  • getReportEvaluationOptions := securityAndComplianceCenterApiService.NewGetReportEvaluationOptions(
      reportIdForReportLink,
    )
    
    result, response, err := securityAndComplianceCenterApiService.GetReportEvaluation(getReportEvaluationOptions)
    if err != nil {
      panic(err)
    }
    if result != nil {
      defer result.Close()
      outFile, err := os.Create("result.out")
      if err != nil { panic(err) }
      defer outFile.Close()
      _, err = io.Copy(outFile, result)
      if err != nil { panic(err) }
    }
  • const params = {
      reportId: reportIdForReportLink,
    };
    
    let res;
    try {
      res = await securityAndComplianceCenterApiService.getReportEvaluation(params);
      // response is binary
      // fs.writeFileSync('result.out', res.result);
    } catch (err) {
      console.warn(err);
    }
  • response = security_and_compliance_center_api_service.get_report_evaluation(
      report_id=report_id_for_report_link,
    )
    result = response.get_result()
    
    with open('/tmp/result.out', 'wb') as fp:
      fp.write(result)
  • GetReportEvaluationOptions getReportEvaluationOptions = new GetReportEvaluationOptions.Builder()
      .reportId(reportIdForReportLink)
      .build();
    
    Response<InputStream> response = securityAndComplianceCenterApiService.getReportEvaluation(getReportEvaluationOptions).execute();
    InputStream inputStream = response.getResult();
    
    System.out.println(inputStream);

Response

Response type: io.ReadCloser

Response type: NodeJS.ReadableStream

Response type: BinaryIO

Response type: InputStream

Status Code

  • The details were successfully retrieved.

  • Invalid request

  • Your request is unauthorized.

  • You do not have access to this resource.

  • The specified resource was not be found.

  • The client sent too many requests in a short amount of time.

  • A backend service that is required to complete the operation is unavailable. Try again later.

Example responses
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `report_id` parameter is invalid.",
          "target": {
            "name": "report_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `report_id` parameter is invalid.",
          "target": {
            "name": "report_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "The request could not be authorized."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "The request could not be authorized."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 404,
      "errors": [
        {
          "code": "report_not_found",
          "message": "The report for `report_id` '65810ac762004f22ac19f8f8edf70a34' is not found.",
          "target": {
            "name": "report_id",
            "type": "parameter",
            "value": "65810ac762004f22ac19f8f8edf70a34"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 404,
      "errors": [
        {
          "code": "report_not_found",
          "message": "The report for `report_id` '65810ac762004f22ac19f8f8edf70a34' is not found.",
          "target": {
            "name": "report_id",
            "type": "parameter",
            "value": "65810ac762004f22ac19f8f8edf70a34"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service is unavailable. Try again later."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service is unavailable. Try again later."
        }
      ]
    }

Get report controls

Retrieve a sorted and filtered list of controls for the specified report. For more information, see Viewing results.

Retrieve a sorted and filtered list of controls for the specified report. For more information, see Viewing results.

Retrieve a sorted and filtered list of controls for the specified report. For more information, see Viewing results.

Retrieve a sorted and filtered list of controls for the specified report. For more information, see Viewing results.

Retrieve a sorted and filtered list of controls for the specified report. For more information, see Viewing results.

GET /reports/{report_id}/controls
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) GetReportControls(getReportControlsOptions *GetReportControlsOptions) (result *ReportControls, response *core.DetailedResponse, err error)
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) GetReportControlsWithContext(ctx context.Context, getReportControlsOptions *GetReportControlsOptions) (result *ReportControls, response *core.DetailedResponse, err error)
getReportControls(params)
get_report_controls(
        self,
        report_id: str,
        *,
        x_correlation_id: str = None,
        x_request_id: str = None,
        control_id: str = None,
        control_name: str = None,
        control_description: str = None,
        control_category: str = None,
        status: str = None,
        sort: str = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<ReportControls> getReportControls(GetReportControlsOptions getReportControlsOptions)

Request

Instantiate the GetReportControlsOptions struct and set the fields to provide parameter values for the GetReportControls method.

Use the GetReportControlsOptions.Builder to create a GetReportControlsOptions object that contains the parameter values for the getReportControls method.

Custom Headers

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

Path Parameters

  • The ID of the scan that is associated with a report.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression ^[a-zA-Z0-9\-]+$

Query Parameters

  • The ID of the control.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression ^[a-zA-Z0-9\-]+$

  • The name of the control.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9\-]+$

  • The description of the control.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9\s]+$

  • A control category value.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9\-]+$

  • The compliance status value.

    Allowable values: [compliant,not_compliant,unable_to_perform,user_evaluation_required]

    Example: compliant

  • This field sorts controls by using a valid sort field. To learn more, see Sorting.

    Allowable values: [control_name,control_category,status]

WithContext method only

The GetReportControls options.

parameters

  • The ID of the scan that is associated with a report.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The ID of the control.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The name of the control.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The description of the control.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9\\s]+$/

  • A control category value.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The compliance status value.

    Allowable values: [compliant,not_compliant,unable_to_perform,user_evaluation_required]

    Examples:
    value
    _source
    _lines
    _html
  • This field sorts controls by using a valid sort field. To learn more, see Sorting.

    Allowable values: [control_name,control_category,status]

parameters

  • The ID of the scan that is associated with a report.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The ID of the control.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The name of the control.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The description of the control.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9\\s]+$/

  • A control category value.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The compliance status value.

    Allowable values: [compliant,not_compliant,unable_to_perform,user_evaluation_required]

    Examples:
    value
    _source
    _lines
    _html
  • This field sorts controls by using a valid sort field. To learn more, see Sorting.

    Allowable values: [control_name,control_category,status]

The getReportControls options.

  • curl -X GET --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/reports/{report_id}/controls?status=compliant"
  • getReportControlsOptions := securityAndComplianceCenterApiService.NewGetReportControlsOptions(
      reportIdForReportLink,
    )
    getReportControlsOptions.SetStatus("compliant")
    
    reportControls, response, err := securityAndComplianceCenterApiService.GetReportControls(getReportControlsOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(reportControls, "", "  ")
    fmt.Println(string(b))
  • const params = {
      reportId: reportIdForReportLink,
      status: 'compliant',
    };
    
    let res;
    try {
      res = await securityAndComplianceCenterApiService.getReportControls(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • response = security_and_compliance_center_api_service.get_report_controls(
      report_id=report_id_for_report_link,
      status='compliant',
    )
    report_controls = response.get_result()
    
    print(json.dumps(report_controls, indent=2))
  • GetReportControlsOptions getReportControlsOptions = new GetReportControlsOptions.Builder()
      .reportId(reportIdForReportLink)
      .status("compliant")
      .build();
    
    Response<ReportControls> response = securityAndComplianceCenterApiService.getReportControls(getReportControlsOptions).execute();
    ReportControls reportControls = response.getResult();
    
    System.out.println(reportControls);

Response

The list of controls.

The list of controls.

Examples:
View

The list of controls.

Examples:
View

The list of controls.

Examples:
View

The list of controls.

Examples:
View

Status Code

  • The list was successfully retrieved.

  • Invalid request

  • Your request is unauthorized.

  • You do not have access to this resource.

  • The specified resource was not be found.

  • The client sent too many requests in a short amount of time.

  • A backend service that is required to complete the operation is unavailable. Try again later.

Example responses
  • {
      "report_id": "812197b3-9c5b-4742-94d9-66a6155ade60",
      "home_account_id": "f88fd4aa842b46b08652b650370b917c",
      "controls": [
        {
          "report_id": "812197b3-9c5b-4742-94d9-66a6155ade60",
          "home_account_id": "f88fd4aa842b46b08652b650370b917c",
          "id": "a4cccdf8-f73a-46a2-8bd2-211d74cbcf3e",
          "control_library_id": "2db4d946-836a-4c63-865e-c3b48d9f1232",
          "control_library_version": "1.1.0",
          "control_name": "1.1",
          "control_description": "Ensure IBMid password policy requires at least one uppercase letter",
          "control_category": "Identity and Access Management",
          "control_specifications": [
            {
              "control_specification_id": "a4cccdf8-f73a-46a2-8bd2-211d74cbcf3e",
              "control_specification_description": "Check whether IBMid password policy requires at least one uppercase letter",
              "component_id": "iam-identity",
              "component_name": "IAM Identity Service",
              "environment": "ibm-cloud",
              "responsibility": "user",
              "assessments": [
                {
                  "assessment_id": "rule-9a6242a8-39e6-4ab6-9232-4402291e24fe",
                  "assessment_type": "automated",
                  "assessment_method": "ibm-cloud-rule",
                  "assessment_description": "Check whether IBMid password policy requires at least one uppercase letter",
                  "parameter_count": 0,
                  "parameters": [],
                  "status": "compliant",
                  "total_count": 1,
                  "pass_count": 1,
                  "failure_count": 0,
                  "error_count": 0,
                  "completed_count": 1
                }
              ],
              "status": "compliant",
              "total_count": 1,
              "compliant_count": 1,
              "not_compliant_count": 0,
              "unable_to_perform_count": 0,
              "user_evaluation_required_count": 0
            }
          ],
          "status": "compliant",
          "total_count": 1,
          "compliant_count": 1,
          "not_compliant_count": 0,
          "unable_to_perform_count": 0,
          "user_evaluation_required_count": 0
        }
      ]
    }
  • {
      "report_id": "812197b3-9c5b-4742-94d9-66a6155ade60",
      "home_account_id": "f88fd4aa842b46b08652b650370b917c",
      "controls": [
        {
          "report_id": "812197b3-9c5b-4742-94d9-66a6155ade60",
          "home_account_id": "f88fd4aa842b46b08652b650370b917c",
          "id": "a4cccdf8-f73a-46a2-8bd2-211d74cbcf3e",
          "control_library_id": "2db4d946-836a-4c63-865e-c3b48d9f1232",
          "control_library_version": "1.1.0",
          "control_name": "1.1",
          "control_description": "Ensure IBMid password policy requires at least one uppercase letter",
          "control_category": "Identity and Access Management",
          "control_specifications": [
            {
              "control_specification_id": "a4cccdf8-f73a-46a2-8bd2-211d74cbcf3e",
              "control_specification_description": "Check whether IBMid password policy requires at least one uppercase letter",
              "component_id": "iam-identity",
              "component_name": "IAM Identity Service",
              "environment": "ibm-cloud",
              "responsibility": "user",
              "assessments": [
                {
                  "assessment_id": "rule-9a6242a8-39e6-4ab6-9232-4402291e24fe",
                  "assessment_type": "automated",
                  "assessment_method": "ibm-cloud-rule",
                  "assessment_description": "Check whether IBMid password policy requires at least one uppercase letter",
                  "parameter_count": 0,
                  "parameters": [],
                  "status": "compliant",
                  "total_count": 1,
                  "pass_count": 1,
                  "failure_count": 0,
                  "error_count": 0,
                  "completed_count": 1
                }
              ],
              "status": "compliant",
              "total_count": 1,
              "compliant_count": 1,
              "not_compliant_count": 0,
              "unable_to_perform_count": 0,
              "user_evaluation_required_count": 0
            }
          ],
          "status": "compliant",
          "total_count": 1,
          "compliant_count": 1,
          "not_compliant_count": 0,
          "unable_to_perform_count": 0,
          "user_evaluation_required_count": 0
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `report_id` parameter is invalid.",
          "target": {
            "name": "report_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `report_id` parameter is invalid.",
          "target": {
            "name": "report_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "The request could not be authorized."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "The request could not be authorized."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 404,
      "errors": [
        {
          "code": "report_not_found",
          "message": "The report for `report_id` '65810ac762004f22ac19f8f8edf70a34' is not found.",
          "target": {
            "name": "report_id",
            "type": "parameter",
            "value": "65810ac762004f22ac19f8f8edf70a34"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 404,
      "errors": [
        {
          "code": "report_not_found",
          "message": "The report for `report_id` '65810ac762004f22ac19f8f8edf70a34' is not found.",
          "target": {
            "name": "report_id",
            "type": "parameter",
            "value": "65810ac762004f22ac19f8f8edf70a34"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service is unavailable. Try again later."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service is unavailable. Try again later."
        }
      ]
    }

Get a report rule

Retrieve the rule by specifying the report ID and rule ID. For more information, see Viewing results.

Retrieve the rule by specifying the report ID and rule ID. For more information, see Viewing results.

Retrieve the rule by specifying the report ID and rule ID. For more information, see Viewing results.

Retrieve the rule by specifying the report ID and rule ID. For more information, see Viewing results.

Retrieve the rule by specifying the report ID and rule ID. For more information, see Viewing results.

GET /reports/{report_id}/rules/{rule_id}
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) GetReportRule(getReportRuleOptions *GetReportRuleOptions) (result *RuleInfo, response *core.DetailedResponse, err error)
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) GetReportRuleWithContext(ctx context.Context, getReportRuleOptions *GetReportRuleOptions) (result *RuleInfo, response *core.DetailedResponse, err error)
getReportRule(params)
get_report_rule(
        self,
        report_id: str,
        rule_id: str,
        *,
        x_correlation_id: str = None,
        x_request_id: str = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<RuleInfo> getReportRule(GetReportRuleOptions getReportRuleOptions)

Request

Instantiate the GetReportRuleOptions struct and set the fields to provide parameter values for the GetReportRule method.

Use the GetReportRuleOptions.Builder to create a GetReportRuleOptions object that contains the parameter values for the getReportRule method.

Custom Headers

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

Path Parameters

  • The ID of the scan that is associated with a report.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression ^[a-zA-Z0-9\-]+$

  • The ID of a rule in a report.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression ^[a-zA-Z0-9\-]+$

    Example: rule-8d444f8c-fd1d-48de-bcaa-f43732568761

WithContext method only

The GetReportRule options.

parameters

  • The ID of the scan that is associated with a report.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The ID of a rule in a report.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

    Examples:
    value
    _source
    _lines
    _html
  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

parameters

  • The ID of the scan that is associated with a report.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The ID of a rule in a report.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

    Examples:
    value
    _source
    _lines
    _html
  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

The getReportRule options.

  • curl -X GET --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/reports/{report_id}/rules/{rule_id}"
  • getReportRuleOptions := securityAndComplianceCenterApiService.NewGetReportRuleOptions(
      reportIdForReportLink,
      "rule-8d444f8c-fd1d-48de-bcaa-f43732568761",
    )
    
    ruleInfo, response, err := securityAndComplianceCenterApiService.GetReportRule(getReportRuleOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(ruleInfo, "", "  ")
    fmt.Println(string(b))
  • const params = {
      reportId: reportIdForReportLink,
      ruleId: 'rule-8d444f8c-fd1d-48de-bcaa-f43732568761',
    };
    
    let res;
    try {
      res = await securityAndComplianceCenterApiService.getReportRule(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • response = security_and_compliance_center_api_service.get_report_rule(
      report_id=report_id_for_report_link,
      rule_id='rule-8d444f8c-fd1d-48de-bcaa-f43732568761',
    )
    rule_info = response.get_result()
    
    print(json.dumps(rule_info, indent=2))
  • GetReportRuleOptions getReportRuleOptions = new GetReportRuleOptions.Builder()
      .reportId(reportIdForReportLink)
      .ruleId("rule-8d444f8c-fd1d-48de-bcaa-f43732568761")
      .build();
    
    Response<RuleInfo> response = securityAndComplianceCenterApiService.getReportRule(getReportRuleOptions).execute();
    RuleInfo ruleInfo = response.getResult();
    
    System.out.println(ruleInfo);

Response

The rule.

The rule.

Examples:
View

The rule.

Examples:
View

The rule.

Examples:
View

The rule.

Examples:
View

Status Code

  • The rule was successfully retrieved.

  • Invalid request

  • Your request is unauthorized.

  • You do not have access to this resource.

  • The specified resource was not be found.

  • The client sent too many requests in a short amount of time.

  • A backend service that is required to complete the operation is unavailable. Try again later.

Example responses
  • {
      "report_id": "9a6242a8-39e6-4ab6-9232-4402291e24fe",
      "home_account_id": "f88fd4aa842b46b08652b650370b917c",
      "id": "rule-9a6242a8-39e6-4ab6-9232-4402291e24fe",
      "type": "system_defined",
      "description": "Check whether Key Protect encryption keys that are generated by the service are enabled with automatic rotation",
      "version": "1.0.1",
      "account_id": "IBM",
      "created_on": "2022-09-27T13:26:46.000Z",
      "created_by": "IBM",
      "updated_on": "2023-02-08T11:19:42.000Z",
      "updated_by": "IBM",
      "required_config": {
        "and": [
          {
            "operator": "is_true",
            "property": "rotation.rotation_enabled"
          },
          {
            "operator": "num_greater_than",
            "property": "rotation.interval_month",
            "value": "0"
          }
        ]
      },
      "target": {
        "additional_target_attributes": [],
        "resource_kind": "key",
        "service_name": "kms"
      },
      "labels": []
    }
  • {
      "report_id": "9a6242a8-39e6-4ab6-9232-4402291e24fe",
      "home_account_id": "f88fd4aa842b46b08652b650370b917c",
      "id": "rule-9a6242a8-39e6-4ab6-9232-4402291e24fe",
      "type": "system_defined",
      "description": "Check whether Key Protect encryption keys that are generated by the service are enabled with automatic rotation",
      "version": "1.0.1",
      "account_id": "IBM",
      "created_on": "2022-09-27T13:26:46.000Z",
      "created_by": "IBM",
      "updated_on": "2023-02-08T11:19:42.000Z",
      "updated_by": "IBM",
      "required_config": {
        "and": [
          {
            "operator": "is_true",
            "property": "rotation.rotation_enabled"
          },
          {
            "operator": "num_greater_than",
            "property": "rotation.interval_month",
            "value": "0"
          }
        ]
      },
      "target": {
        "additional_target_attributes": [],
        "resource_kind": "key",
        "service_name": "kms"
      },
      "labels": []
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `report_id` parameter is invalid.",
          "target": {
            "name": "report_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `report_id` parameter is invalid.",
          "target": {
            "name": "report_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "The request could not be authorized."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "The request could not be authorized."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 404,
      "errors": [
        {
          "code": "report_not_found",
          "message": "The report for `report_id` '65810ac762004f22ac19f8f8edf70a34' is not found.",
          "target": {
            "name": "report_id",
            "type": "parameter",
            "value": "65810ac762004f22ac19f8f8edf70a34"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 404,
      "errors": [
        {
          "code": "report_not_found",
          "message": "The report for `report_id` '65810ac762004f22ac19f8f8edf70a34' is not found.",
          "target": {
            "name": "report_id",
            "type": "parameter",
            "value": "65810ac762004f22ac19f8f8edf70a34"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service is unavailable. Try again later."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service is unavailable. Try again later."
        }
      ]
    }

List report evaluations

Get a paginated list of evaluations for the specified report. For more information, see Viewing results.

Get a paginated list of evaluations for the specified report. For more information, see Viewing results.

Get a paginated list of evaluations for the specified report. For more information, see Viewing results.

Get a paginated list of evaluations for the specified report. For more information, see Viewing results.

Get a paginated list of evaluations for the specified report. For more information, see Viewing results.

GET /reports/{report_id}/evaluations
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) ListReportEvaluations(listReportEvaluationsOptions *ListReportEvaluationsOptions) (result *EvaluationPage, response *core.DetailedResponse, err error)
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) ListReportEvaluationsWithContext(ctx context.Context, listReportEvaluationsOptions *ListReportEvaluationsOptions) (result *EvaluationPage, response *core.DetailedResponse, err error)
listReportEvaluations(params)
list_report_evaluations(
        self,
        report_id: str,
        *,
        x_correlation_id: str = None,
        x_request_id: str = None,
        assessment_id: str = None,
        assessment_method: str = None,
        component_id: str = None,
        target_id: str = None,
        target_env: str = None,
        target_name: str = None,
        status: str = None,
        start: str = None,
        limit: int = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<EvaluationPage> listReportEvaluations(ListReportEvaluationsOptions listReportEvaluationsOptions)

Request

Instantiate the ListReportEvaluationsOptions struct and set the fields to provide parameter values for the ListReportEvaluations method.

Use the ListReportEvaluationsOptions.Builder to create a ListReportEvaluationsOptions object that contains the parameter values for the listReportEvaluations method.

Custom Headers

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

Path Parameters

  • The ID of the scan that is associated with a report.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression ^[a-zA-Z0-9\-]+$

Query Parameters

  • The ID of the assessment.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression ^[a-zA-Z0-9\-]+$

  • The assessment method.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression ^[a-zA-Z\-]+$

  • The ID of component.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression ^[a-zA-Z0-9.\-]+$

  • The ID of the evaluation target.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9\-]+$

  • The environment of the evaluation target.

    Possible values: 1 ≤ length ≤ 32, Value must match regular expression ^[a-zA-Z0-9\-]+$

  • The name of the evaluation target.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9\-]+$

  • The evaluation status value.

    Allowable values: [pass,failure,error,skipped]

    Example: failure

  • The indication of what resource to start the page on.

    Possible values: 0 ≤ length ≤ 512, Value must match regular expression ^[a-zA-Z0-9\-]+$

  • The indication of many resources to return, unless the response is the last page of resources.

    Possible values: 0 ≤ value ≤ 100

    Default: 50

WithContext method only

The ListReportEvaluations options.

parameters

  • The ID of the scan that is associated with a report.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The ID of the assessment.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The assessment method.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression /^[a-zA-Z\\-]+$/

  • The ID of component.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression /^[a-zA-Z0-9.\\-]+$/

  • The ID of the evaluation target.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The environment of the evaluation target.

    Possible values: 1 ≤ length ≤ 32, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The name of the evaluation target.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The evaluation status value.

    Allowable values: [pass,failure,error,skipped]

    Examples:
    value
    _source
    _lines
    _html
  • The indication of what resource to start the page on.

    Possible values: 0 ≤ length ≤ 512, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The indication of many resources to return, unless the response is the last page of resources.

    Possible values: 0 ≤ value ≤ 100

    Default: 50

parameters

  • The ID of the scan that is associated with a report.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The ID of the assessment.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The assessment method.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression /^[a-zA-Z\\-]+$/

  • The ID of component.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression /^[a-zA-Z0-9.\\-]+$/

  • The ID of the evaluation target.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The environment of the evaluation target.

    Possible values: 1 ≤ length ≤ 32, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The name of the evaluation target.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The evaluation status value.

    Allowable values: [pass,failure,error,skipped]

    Examples:
    value
    _source
    _lines
    _html
  • The indication of what resource to start the page on.

    Possible values: 0 ≤ length ≤ 512, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The indication of many resources to return, unless the response is the last page of resources.

    Possible values: 0 ≤ value ≤ 100

    Default: 50

The listReportEvaluations options.

  • curl -X GET --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/reports/{report_id}/evaluations?status=failure"
  • listReportEvaluationsOptions := &securityandcompliancecenterapiv3.ListReportEvaluationsOptions{
      ReportID: &reportIdForReportLink,
      XCorrelationID: &xCorrelationIdLink,
      XRequestID: core.StringPtr("testString"),
      AssessmentID: core.StringPtr("testString"),
      AssessmentMethod: core.StringPtr("testString"),
      ComponentID: core.StringPtr("testString"),
      TargetID: core.StringPtr("testString"),
      TargetEnv: core.StringPtr("testString"),
      TargetName: core.StringPtr("testString"),
      Status: core.StringPtr("failure"),
      Limit: core.Int64Ptr(int64(10)),
    }
    
    pager, err := securityAndComplianceCenterApiService.NewReportEvaluationsPager(listReportEvaluationsOptions)
    if err != nil {
      panic(err)
    }
    
    var allResults []securityandcompliancecenterapiv3.Evaluation
    for pager.HasNext() {
      nextPage, err := pager.GetNext()
      if err != nil {
        panic(err)
      }
      allResults = append(allResults, nextPage...)
    }
    b, _ := json.MarshalIndent(allResults, "", "  ")
    fmt.Println(string(b))
  • const params = {
      reportId: reportIdForReportLink,
      xCorrelationId: xCorrelationIdLink,
      xRequestId: 'testString',
      assessmentId: 'testString',
      assessmentMethod: 'testString',
      componentId: 'testString',
      targetId: 'testString',
      targetEnv: 'testString',
      targetName: 'testString',
      status: 'failure',
      limit: 10,
    };
    
    const allResults = [];
    try {
      const pager = new SecurityAndComplianceCenterApiV3.ReportEvaluationsPager(securityAndComplianceCenterApiService, params);
      while (pager.hasNext()) {
        const nextPage = await pager.getNext();
        expect(nextPage).not.toBeNull();
        allResults.push(...nextPage);
      }
      console.log(JSON.stringify(allResults, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • all_results = []
    pager = ReportEvaluationsPager(
      client=security_and_compliance_center_api_service,
      report_id=report_id_for_report_link,
      x_correlation_id=x_correlation_id_link,
      x_request_id='testString',
      assessment_id='testString',
      assessment_method='testString',
      component_id='testString',
      target_id='testString',
      target_env='testString',
      target_name='testString',
      status='failure',
      limit=10,
    )
    while pager.has_next():
      next_page = pager.get_next()
      assert next_page is not None
      all_results.extend(next_page)
    
    print(json.dumps(all_results, indent=2))
  • ListReportEvaluationsOptions listReportEvaluationsOptions = new ListReportEvaluationsOptions.Builder()
      .reportId(reportIdForReportLink)
      .xCorrelationId(xCorrelationIdLink)
      .xRequestId("testString")
      .assessmentId("testString")
      .assessmentMethod("testString")
      .componentId("testString")
      .targetId("testString")
      .targetEnv("testString")
      .targetName("testString")
      .status("failure")
      .limit(Long.valueOf("10"))
      .build();
    
    ReportEvaluationsPager pager = new ReportEvaluationsPager(securityAndComplianceCenterApiService, listReportEvaluationsOptions);
    List<Evaluation> allResults = new ArrayList<>();
    while (pager.hasNext()) {
      List<Evaluation> nextPage = pager.getNext();
      allResults.addAll(nextPage);
    }
    
    System.out.println(GsonSingleton.getGson().toJson(allResults));

Response

The page of assessment evaluations.

The page of assessment evaluations.

The page of assessment evaluations.

The page of assessment evaluations.

The page of assessment evaluations.

Status Code

  • The list was successfully retrieved.

  • Invalid request

  • Your request is unauthorized.

  • You do not have access to this resource.

  • The specified resource was not be found.

  • The client sent too many requests in a short amount of time.

  • A backend service that is required to complete the operation is unavailable. Try again later.

Example responses
  • {
      "limit": 50,
      "total_count": 1,
      "first": {
        "href": "https://us-south.compliance.cloud.ibm.com/instances/7e9d0235-4d21-4c21-9c2d-da0ecb0b22f6/v3/reports/2f9cbb25-f89a-4658-bf8a-2eb497c6df71/evaluations?limit=50"
      },
      "next": {
        "href": "https://us-south.compliance.cloud.ibm.com/instances/7e9d0235-4d21-4c21-9c2d-da0ecb0b22f6/v3/reports/2f9cbb25-f89a-4658-bf8a-2eb497c6df71/evaluations?limit=50&start=WyJpYW0taWRlbnRpdHkiLCJydWxlLWZmNWRkYzg2LTI0NTQtNDFlMi04ZTRkLWQ3OTk4OGVlN2NkYyIsImNybjp2MTpzdGFnaW5nOnB1YmxpYzppYW0taWRlbnRpdHk6OmEvMjQxMWZmZGMxNjg0NGIwN2E0MjUyMWMzNDQzZjQ1NmQ6OjoiXQ%3D%3D",
        "start": "WyJpYW0taWRlbnRpdHkiLCJydWxlLWZmNWRkYzg2LTI0NTQtNDFlMi04ZTRkLWQ3OTk4OGVlN2NkYyIsImNybjp2MTpzdGFnaW5nOnB1YmxpYzppYW0taWRlbnRpdHk6OmEvMjQxMWZmZGMxNjg0NGIwN2E0MjUyMWMzNDQzZjQ1NmQ6OjoiXQ=="
      },
      "report_id": "9a6242a8-39e6-4ab6-9232-4402291e24fe",
      "home_account_id": "f88fd4aa842b46b08652b650370b917c",
      "evaluations": [
        {
          "report_id": "9a6242a8-39e6-4ab6-9232-4402291e24fe",
          "home_account_id": "f88fd4aa842b46b08652b650370b917c",
          "component_id": "user-management",
          "component_name": "User Management",
          "assessment": {
            "assessment_id": "rule-9a6242a8-39e6-4ab6-9232-4402291e24fe",
            "assessment_type": "automated",
            "assessment_method": "ibm-cloud-rule",
            "assessment_description": "Check whether IAM users are attached to at least one access group",
            "parameter_count": 0,
            "parameters": []
          },
          "evaluate_time": "2023-05-02T21:17:03.648Z",
          "target": {
            "id": "account/f88fd4aa842b46b08652b650370b917c/component/user-management/user/IBMid-6650024F54",
            "account_id": "f88fd4aa842b46b08652b650370b917c",
            "environment": "ibm-cloud",
            "service_name": "user-management",
            "service_display_name": "User Management",
            "resource_crn": "crn:v1:staging:public:user-management::a/f88fd4aa842b46b08652b650370b917c:::",
            "resource_name": "IBMid-6650024F54",
            "tags": {
              "user": null,
              "access": null,
              "service": null
            }
          },
          "status": "pass",
          "reason": "",
          "details": {
            "properties": []
          }
        }
      ]
    }
  • {
      "limit": 50,
      "total_count": 1,
      "first": {
        "href": "https://us-south.compliance.cloud.ibm.com/instances/7e9d0235-4d21-4c21-9c2d-da0ecb0b22f6/v3/reports/2f9cbb25-f89a-4658-bf8a-2eb497c6df71/evaluations?limit=50"
      },
      "next": {
        "href": "https://us-south.compliance.cloud.ibm.com/instances/7e9d0235-4d21-4c21-9c2d-da0ecb0b22f6/v3/reports/2f9cbb25-f89a-4658-bf8a-2eb497c6df71/evaluations?limit=50&start=WyJpYW0taWRlbnRpdHkiLCJydWxlLWZmNWRkYzg2LTI0NTQtNDFlMi04ZTRkLWQ3OTk4OGVlN2NkYyIsImNybjp2MTpzdGFnaW5nOnB1YmxpYzppYW0taWRlbnRpdHk6OmEvMjQxMWZmZGMxNjg0NGIwN2E0MjUyMWMzNDQzZjQ1NmQ6OjoiXQ%3D%3D",
        "start": "WyJpYW0taWRlbnRpdHkiLCJydWxlLWZmNWRkYzg2LTI0NTQtNDFlMi04ZTRkLWQ3OTk4OGVlN2NkYyIsImNybjp2MTpzdGFnaW5nOnB1YmxpYzppYW0taWRlbnRpdHk6OmEvMjQxMWZmZGMxNjg0NGIwN2E0MjUyMWMzNDQzZjQ1NmQ6OjoiXQ=="
      },
      "report_id": "9a6242a8-39e6-4ab6-9232-4402291e24fe",
      "home_account_id": "f88fd4aa842b46b08652b650370b917c",
      "evaluations": [
        {
          "report_id": "9a6242a8-39e6-4ab6-9232-4402291e24fe",
          "home_account_id": "f88fd4aa842b46b08652b650370b917c",
          "component_id": "user-management",
          "component_name": "User Management",
          "assessment": {
            "assessment_id": "rule-9a6242a8-39e6-4ab6-9232-4402291e24fe",
            "assessment_type": "automated",
            "assessment_method": "ibm-cloud-rule",
            "assessment_description": "Check whether IAM users are attached to at least one access group",
            "parameter_count": 0,
            "parameters": []
          },
          "evaluate_time": "2023-05-02T21:17:03.648Z",
          "target": {
            "id": "account/f88fd4aa842b46b08652b650370b917c/component/user-management/user/IBMid-6650024F54",
            "account_id": "f88fd4aa842b46b08652b650370b917c",
            "environment": "ibm-cloud",
            "service_name": "user-management",
            "service_display_name": "User Management",
            "resource_crn": "crn:v1:staging:public:user-management::a/f88fd4aa842b46b08652b650370b917c:::",
            "resource_name": "IBMid-6650024F54",
            "tags": {
              "user": null,
              "access": null,
              "service": null
            }
          },
          "status": "pass",
          "reason": "",
          "details": {
            "properties": []
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `report_id` parameter is invalid.",
          "target": {
            "name": "report_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `report_id` parameter is invalid.",
          "target": {
            "name": "report_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "The request could not be authorized."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "The request could not be authorized."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 404,
      "errors": [
        {
          "code": "report_not_found",
          "message": "The report for `report_id` '65810ac762004f22ac19f8f8edf70a34' is not found.",
          "target": {
            "name": "report_id",
            "type": "parameter",
            "value": "65810ac762004f22ac19f8f8edf70a34"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 404,
      "errors": [
        {
          "code": "report_not_found",
          "message": "The report for `report_id` '65810ac762004f22ac19f8f8edf70a34' is not found.",
          "target": {
            "name": "report_id",
            "type": "parameter",
            "value": "65810ac762004f22ac19f8f8edf70a34"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service is unavailable. Try again later."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service is unavailable. Try again later."
        }
      ]
    }

List report resources

Get a paginated list of resources for the specified report. For more information, see Viewing results.

Get a paginated list of resources for the specified report. For more information, see Viewing results.

Get a paginated list of resources for the specified report. For more information, see Viewing results.

Get a paginated list of resources for the specified report. For more information, see Viewing results.

Get a paginated list of resources for the specified report. For more information, see Viewing results.

GET /reports/{report_id}/resources
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) ListReportResources(listReportResourcesOptions *ListReportResourcesOptions) (result *ResourcePage, response *core.DetailedResponse, err error)
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) ListReportResourcesWithContext(ctx context.Context, listReportResourcesOptions *ListReportResourcesOptions) (result *ResourcePage, response *core.DetailedResponse, err error)
listReportResources(params)
list_report_resources(
        self,
        report_id: str,
        *,
        x_correlation_id: str = None,
        x_request_id: str = None,
        id: str = None,
        resource_name: str = None,
        account_id: str = None,
        component_id: str = None,
        status: str = None,
        sort: str = None,
        start: str = None,
        limit: int = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<ResourcePage> listReportResources(ListReportResourcesOptions listReportResourcesOptions)

Request

Instantiate the ListReportResourcesOptions struct and set the fields to provide parameter values for the ListReportResources method.

Use the ListReportResourcesOptions.Builder to create a ListReportResourcesOptions object that contains the parameter values for the listReportResources method.

Custom Headers

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

Path Parameters

  • The ID of the scan that is associated with a report.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression ^[a-zA-Z0-9\-]+$

Query Parameters

  • The ID of the resource.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9\-]+$

  • The name of the resource.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9\-]+$

  • The ID of the account owning a resource.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression ^[a-zA-Z0-9\-]+$

  • The ID of component.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression ^[a-zA-Z0-9.\-]+$

  • The compliance status value.

    Allowable values: [compliant,not_compliant,unable_to_perform,user_evaluation_required]

    Example: compliant

  • This field sorts resources by using a valid sort field. To learn more, see Sorting.

    Allowable values: [account_id,component_id,resource_name,status]

  • The indication of what resource to start the page on.

    Possible values: 0 ≤ length ≤ 512, Value must match regular expression ^[a-zA-Z0-9\-]+$

  • The indication of many resources to return, unless the response is the last page of resources.

    Possible values: 0 ≤ value ≤ 100

    Default: 50

WithContext method only

The ListReportResources options.

parameters

  • The ID of the scan that is associated with a report.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The ID of the resource.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The name of the resource.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The ID of the account owning a resource.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The ID of component.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression /^[a-zA-Z0-9.\\-]+$/

  • The compliance status value.

    Allowable values: [compliant,not_compliant,unable_to_perform,user_evaluation_required]

    Examples:
    value
    _source
    _lines
    _html
  • This field sorts resources by using a valid sort field. To learn more, see Sorting.

    Allowable values: [account_id,component_id,resource_name,status]

  • The indication of what resource to start the page on.

    Possible values: 0 ≤ length ≤ 512, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The indication of many resources to return, unless the response is the last page of resources.

    Possible values: 0 ≤ value ≤ 100

    Default: 50

parameters

  • The ID of the scan that is associated with a report.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The ID of the resource.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The name of the resource.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The ID of the account owning a resource.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The ID of component.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression /^[a-zA-Z0-9.\\-]+$/

  • The compliance status value.

    Allowable values: [compliant,not_compliant,unable_to_perform,user_evaluation_required]

    Examples:
    value
    _source
    _lines
    _html
  • This field sorts resources by using a valid sort field. To learn more, see Sorting.

    Allowable values: [account_id,component_id,resource_name,status]

  • The indication of what resource to start the page on.

    Possible values: 0 ≤ length ≤ 512, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The indication of many resources to return, unless the response is the last page of resources.

    Possible values: 0 ≤ value ≤ 100

    Default: 50

The listReportResources options.

  • curl -X GET --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/reports/{report_id}/resources?status=compliant"
  • listReportResourcesOptions := &securityandcompliancecenterapiv3.ListReportResourcesOptions{
      ReportID: &reportIdForReportLink,
      XCorrelationID: &xCorrelationIdLink,
      XRequestID: core.StringPtr("testString"),
      ID: core.StringPtr("testString"),
      ResourceName: core.StringPtr("testString"),
      AccountID: &accountIdForReportLink,
      ComponentID: core.StringPtr("testString"),
      Status: core.StringPtr("compliant"),
      Sort: core.StringPtr("account_id"),
      Limit: core.Int64Ptr(int64(10)),
    }
    
    pager, err := securityAndComplianceCenterApiService.NewReportResourcesPager(listReportResourcesOptions)
    if err != nil {
      panic(err)
    }
    
    var allResults []securityandcompliancecenterapiv3.Resource
    for pager.HasNext() {
      nextPage, err := pager.GetNext()
      if err != nil {
        panic(err)
      }
      allResults = append(allResults, nextPage...)
    }
    b, _ := json.MarshalIndent(allResults, "", "  ")
    fmt.Println(string(b))
  • const params = {
      reportId: reportIdForReportLink,
      xCorrelationId: xCorrelationIdLink,
      xRequestId: 'testString',
      id: 'testString',
      resourceName: 'testString',
      accountId: accountIdForReportLink,
      componentId: 'testString',
      status: 'compliant',
      sort: 'account_id',
      limit: 10,
    };
    
    const allResults = [];
    try {
      const pager = new SecurityAndComplianceCenterApiV3.ReportResourcesPager(securityAndComplianceCenterApiService, params);
      while (pager.hasNext()) {
        const nextPage = await pager.getNext();
        expect(nextPage).not.toBeNull();
        allResults.push(...nextPage);
      }
      console.log(JSON.stringify(allResults, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • all_results = []
    pager = ReportResourcesPager(
      client=security_and_compliance_center_api_service,
      report_id=report_id_for_report_link,
      x_correlation_id=x_correlation_id_link,
      x_request_id='testString',
      id='testString',
      resource_name='testString',
      account_id=account_id_for_report_link,
      component_id='testString',
      status='compliant',
      sort='account_id',
      limit=10,
    )
    while pager.has_next():
      next_page = pager.get_next()
      assert next_page is not None
      all_results.extend(next_page)
    
    print(json.dumps(all_results, indent=2))
  • ListReportResourcesOptions listReportResourcesOptions = new ListReportResourcesOptions.Builder()
      .reportId(reportIdForReportLink)
      .xCorrelationId(xCorrelationIdLink)
      .xRequestId("testString")
      .id("testString")
      .resourceName("testString")
      .accountId(accountIdForReportLink)
      .componentId("testString")
      .status("compliant")
      .sort("account_id")
      .limit(Long.valueOf("10"))
      .build();
    
    ReportResourcesPager pager = new ReportResourcesPager(securityAndComplianceCenterApiService, listReportResourcesOptions);
    List<Resource> allResults = new ArrayList<>();
    while (pager.hasNext()) {
      List<Resource> nextPage = pager.getNext();
      allResults.addAll(nextPage);
    }
    
    System.out.println(GsonSingleton.getGson().toJson(allResults));

Response

The page of resource evaluation summaries.

The page of resource evaluation summaries.

The page of resource evaluation summaries.

The page of resource evaluation summaries.

The page of resource evaluation summaries.

Status Code

  • The list was successfully retrieved.

  • Invalid request

  • Your request is unauthorized.

  • You do not have access to this resource.

  • The specified resource was not be found.

  • The client sent too many requests in a short amount of time.

  • A backend service that is required to complete the operation is unavailable. Try again later.

Example responses
  • {
      "limit": 50,
      "total_count": 13,
      "first": {
        "href": "https://us-south.compliance.cloud.ibm.com/instances/9a6242a8-39e6-4ab6-9232-4402291e24fe/v3/reports/9a6242a8-39e6-4ab6-9232-4402291e24fe/resources?limit=50"
      },
      "report_id": "9a6242a8-39e6-4ab6-9232-4402291e24fe",
      "home_account_id": "f88fd4aa842b46b08652b650370b917c",
      "resources": [
        {
          "report_id": "9a6242a8-39e6-4ab6-9232-4402291e24fe",
          "home_account_id": "f88fd4aa842b46b08652b650370b917c",
          "id": "account/f88fd4aa842b46b08652b650370b917c/component/user-management/user/IBMid-6650024F54",
          "resource_name": "IBMid-6650024F54",
          "account": {
            "id": "f88fd4aa842b46b08652b650370b917c"
          },
          "component_id": "user-management",
          "component_name": "User Management",
          "environment": "ibm-cloud",
          "tags": {
            "user": [],
            "access": [],
            "service": []
          },
          "status": "compliant",
          "total_count": 1,
          "pass_count": 1,
          "failure_count": 0,
          "error_count": 0,
          "completed_count": 1
        }
      ]
    }
  • {
      "limit": 50,
      "total_count": 13,
      "first": {
        "href": "https://us-south.compliance.cloud.ibm.com/instances/9a6242a8-39e6-4ab6-9232-4402291e24fe/v3/reports/9a6242a8-39e6-4ab6-9232-4402291e24fe/resources?limit=50"
      },
      "report_id": "9a6242a8-39e6-4ab6-9232-4402291e24fe",
      "home_account_id": "f88fd4aa842b46b08652b650370b917c",
      "resources": [
        {
          "report_id": "9a6242a8-39e6-4ab6-9232-4402291e24fe",
          "home_account_id": "f88fd4aa842b46b08652b650370b917c",
          "id": "account/f88fd4aa842b46b08652b650370b917c/component/user-management/user/IBMid-6650024F54",
          "resource_name": "IBMid-6650024F54",
          "account": {
            "id": "f88fd4aa842b46b08652b650370b917c"
          },
          "component_id": "user-management",
          "component_name": "User Management",
          "environment": "ibm-cloud",
          "tags": {
            "user": [],
            "access": [],
            "service": []
          },
          "status": "compliant",
          "total_count": 1,
          "pass_count": 1,
          "failure_count": 0,
          "error_count": 0,
          "completed_count": 1
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `report_id` parameter is invalid.",
          "target": {
            "name": "report_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `report_id` parameter is invalid.",
          "target": {
            "name": "report_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "The request could not be authorized."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "The request could not be authorized."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 404,
      "errors": [
        {
          "code": "report_not_found",
          "message": "The report for `report_id` '65810ac762004f22ac19f8f8edf70a34' is not found.",
          "target": {
            "name": "report_id",
            "type": "parameter",
            "value": "65810ac762004f22ac19f8f8edf70a34"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 404,
      "errors": [
        {
          "code": "report_not_found",
          "message": "The report for `report_id` '65810ac762004f22ac19f8f8edf70a34' is not found.",
          "target": {
            "name": "report_id",
            "type": "parameter",
            "value": "65810ac762004f22ac19f8f8edf70a34"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service is unavailable. Try again later."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service is unavailable. Try again later."
        }
      ]
    }

List report tags

Retrieve a list of tags for the specified report. For more information, see Viewing results.

Retrieve a list of tags for the specified report. For more information, see Viewing results.

Retrieve a list of tags for the specified report. For more information, see Viewing results.

Retrieve a list of tags for the specified report. For more information, see Viewing results.

Retrieve a list of tags for the specified report. For more information, see Viewing results.

GET /reports/{report_id}/tags
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) GetReportTags(getReportTagsOptions *GetReportTagsOptions) (result *ReportTags, response *core.DetailedResponse, err error)
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) GetReportTagsWithContext(ctx context.Context, getReportTagsOptions *GetReportTagsOptions) (result *ReportTags, response *core.DetailedResponse, err error)
getReportTags(params)
get_report_tags(
        self,
        report_id: str,
        *,
        x_correlation_id: str = None,
        x_request_id: str = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<ReportTags> getReportTags(GetReportTagsOptions getReportTagsOptions)

Request

Instantiate the GetReportTagsOptions struct and set the fields to provide parameter values for the GetReportTags method.

Use the GetReportTagsOptions.Builder to create a GetReportTagsOptions object that contains the parameter values for the getReportTags method.

Custom Headers

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

Path Parameters

  • The ID of the scan that is associated with a report.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression ^[a-zA-Z0-9\-]+$

WithContext method only

The GetReportTags options.

parameters

  • The ID of the scan that is associated with a report.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

parameters

  • The ID of the scan that is associated with a report.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

The getReportTags options.

  • curl -X GET --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/reports/{report_id}/tags"
  • getReportTagsOptions := securityAndComplianceCenterApiService.NewGetReportTagsOptions(
      reportIdForReportLink,
    )
    
    reportTags, response, err := securityAndComplianceCenterApiService.GetReportTags(getReportTagsOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(reportTags, "", "  ")
    fmt.Println(string(b))
  • const params = {
      reportId: reportIdForReportLink,
    };
    
    let res;
    try {
      res = await securityAndComplianceCenterApiService.getReportTags(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • response = security_and_compliance_center_api_service.get_report_tags(
      report_id=report_id_for_report_link,
    )
    report_tags = response.get_result()
    
    print(json.dumps(report_tags, indent=2))
  • GetReportTagsOptions getReportTagsOptions = new GetReportTagsOptions.Builder()
      .reportId(reportIdForReportLink)
      .build();
    
    Response<ReportTags> response = securityAndComplianceCenterApiService.getReportTags(getReportTagsOptions).execute();
    ReportTags reportTags = response.getResult();
    
    System.out.println(reportTags);

Response

The response body of the get_tags operation.

The response body of the get_tags operation.

Examples:
View

The response body of the get_tags operation.

Examples:
View

The response body of the get_tags operation.

Examples:
View

The response body of the get_tags operation.

Examples:
View

Status Code

  • The tags were successfully retrieved.

  • Invalid request

  • Your request is unauthorized.

  • You do not have access to this resource.

  • The specified resource was not be found.

  • The client sent too many requests in a short amount of time.

  • Internal server error

  • A backend service that is required to complete the operation is unavailable. Try again later.

Example responses
  • {
      "report_id": "2f9cbb25-f89a-4658-bf8a-2eb497c6df81",
      "tags": {
        "user": [],
        "access": [],
        "service": []
      }
    }
  • {
      "report_id": "2f9cbb25-f89a-4658-bf8a-2eb497c6df81",
      "tags": {
        "user": [],
        "access": [],
        "service": []
      }
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `report_id` parameter is invalid.",
          "target": {
            "name": "report_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `report_id` parameter is invalid.",
          "target": {
            "name": "report_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "The request could not be authorized."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "The request could not be authorized."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 404,
      "errors": [
        {
          "code": "report_not_found",
          "message": "The report for `report_id` '65810ac762004f22ac19f8f8edf70a34' is not found.",
          "target": {
            "name": "report_id",
            "type": "parameter",
            "value": "65810ac762004f22ac19f8f8edf70a34"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 404,
      "errors": [
        {
          "code": "report_not_found",
          "message": "The report for `report_id` '65810ac762004f22ac19f8f8edf70a34' is not found.",
          "target": {
            "name": "report_id",
            "type": "parameter",
            "value": "65810ac762004f22ac19f8f8edf70a34"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 500,
      "errors": [
        {
          "code": "internal_server_error",
          "message": "The server has encountered an unexpected internal error."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 500,
      "errors": [
        {
          "code": "internal_server_error",
          "message": "The server has encountered an unexpected internal error."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service is unavailable. Try again later."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service is unavailable. Try again later."
        }
      ]
    }

Get report violations drift

Get a list of report violation data points for the specified report and time frame. For more information, see Viewing results.

Get a list of report violation data points for the specified report and time frame. For more information, see Viewing results.

Get a list of report violation data points for the specified report and time frame. For more information, see Viewing results.

Get a list of report violation data points for the specified report and time frame. For more information, see Viewing results.

Get a list of report violation data points for the specified report and time frame. For more information, see Viewing results.

GET /reports/{report_id}/violations_drift
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) GetReportViolationsDrift(getReportViolationsDriftOptions *GetReportViolationsDriftOptions) (result *ReportViolationsDrift, response *core.DetailedResponse, err error)
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) GetReportViolationsDriftWithContext(ctx context.Context, getReportViolationsDriftOptions *GetReportViolationsDriftOptions) (result *ReportViolationsDrift, response *core.DetailedResponse, err error)
getReportViolationsDrift(params)
get_report_violations_drift(
        self,
        report_id: str,
        *,
        x_correlation_id: str = None,
        x_request_id: str = None,
        scan_time_duration: int = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<ReportViolationsDrift> getReportViolationsDrift(GetReportViolationsDriftOptions getReportViolationsDriftOptions)

Request

Instantiate the GetReportViolationsDriftOptions struct and set the fields to provide parameter values for the GetReportViolationsDrift method.

Use the GetReportViolationsDriftOptions.Builder to create a GetReportViolationsDriftOptions object that contains the parameter values for the getReportViolationsDrift method.

Custom Headers

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

Path Parameters

  • The ID of the scan that is associated with a report.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression ^[a-zA-Z0-9\-]+$

Query Parameters

  • The duration of the scan_time timestamp in number of days.

    Possible values: 0 ≤ value ≤ 366

    Default: 0

WithContext method only

The GetReportViolationsDrift options.

parameters

  • The ID of the scan that is associated with a report.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The duration of the scan_time timestamp in number of days.

    Possible values: 0 ≤ value ≤ 366

    Default: 0

parameters

  • The ID of the scan that is associated with a report.

    Possible values: 1 ≤ length ≤ 128, Value must match regular expression /^[a-zA-Z0-9\\-]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The duration of the scan_time timestamp in number of days.

    Possible values: 0 ≤ value ≤ 366

    Default: 0

The getReportViolationsDrift options.

  • curl -X GET --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/reports/{report_id}/violations_drift"
  • getReportViolationsDriftOptions := securityAndComplianceCenterApiService.NewGetReportViolationsDriftOptions(
      reportIdForReportLink,
    )
    
    reportViolationsDrift, response, err := securityAndComplianceCenterApiService.GetReportViolationsDrift(getReportViolationsDriftOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(reportViolationsDrift, "", "  ")
    fmt.Println(string(b))
  • const params = {
      reportId: reportIdForReportLink,
    };
    
    let res;
    try {
      res = await securityAndComplianceCenterApiService.getReportViolationsDrift(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • response = security_and_compliance_center_api_service.get_report_violations_drift(
      report_id=report_id_for_report_link,
    )
    report_violations_drift = response.get_result()
    
    print(json.dumps(report_violations_drift, indent=2))
  • GetReportViolationsDriftOptions getReportViolationsDriftOptions = new GetReportViolationsDriftOptions.Builder()
      .reportId(reportIdForReportLink)
      .build();
    
    Response<ReportViolationsDrift> response = securityAndComplianceCenterApiService.getReportViolationsDrift(getReportViolationsDriftOptions).execute();
    ReportViolationsDrift reportViolationsDrift = response.getResult();
    
    System.out.println(reportViolationsDrift);

Response

The response body of the get_report_violations_drift operation.

The response body of the get_report_violations_drift operation.

Examples:
View

The response body of the get_report_violations_drift operation.

Examples:
View

The response body of the get_report_violations_drift operation.

Examples:
View

The response body of the get_report_violations_drift operation.

Examples:
View

Status Code

  • The list was successfully retrieved.

  • Invalid request

  • Your request is unauthorized.

  • You do not have access to this resource.

  • The specified resource was not be found.

  • The client sent too many requests in a short amount of time.

  • A backend service that is required to complete the operation is unavailable. Try again later.

Example responses
  • {
      "home_account_id": "f88fd4aa842b46b08652b650370b917c",
      "report_group_id": "4a7999a6ec735d4b355f44f546d2795d89c54df159f2cf14169ccebb4ae25be3",
      "data_points": [
        {
          "report_id": "9a6242a8-39e6-4ab6-9232-4402291e24fe",
          "report_group_id": "4a7999a6ec735d4b355f44f546d2795d89c54df159f2cf14169ccebb4ae25be3",
          "scan_time": "2023-05-02T21:12:56.000Z",
          "controls_summary": {
            "status": "not_compliant",
            "total_count": 240,
            "compliant_count": 225,
            "not_compliant_count": 15,
            "unable_to_perform_count": 0,
            "user_evaluation_required_count": 0
          }
        }
      ]
    }
  • {
      "home_account_id": "f88fd4aa842b46b08652b650370b917c",
      "report_group_id": "4a7999a6ec735d4b355f44f546d2795d89c54df159f2cf14169ccebb4ae25be3",
      "data_points": [
        {
          "report_id": "9a6242a8-39e6-4ab6-9232-4402291e24fe",
          "report_group_id": "4a7999a6ec735d4b355f44f546d2795d89c54df159f2cf14169ccebb4ae25be3",
          "scan_time": "2023-05-02T21:12:56.000Z",
          "controls_summary": {
            "status": "not_compliant",
            "total_count": 240,
            "compliant_count": 225,
            "not_compliant_count": 15,
            "unable_to_perform_count": 0,
            "user_evaluation_required_count": 0
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `report_id` parameter is invalid.",
          "target": {
            "name": "report_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 400,
      "errors": [
        {
          "code": "invalid_parameter_value",
          "message": "The value of the `report_id` parameter is invalid.",
          "target": {
            "name": "report_id",
            "type": "parameter"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 401,
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "target": {
            "name": "Authorization",
            "type": "header"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "The request could not be authorized."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 403,
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "The request could not be authorized."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 404,
      "errors": [
        {
          "code": "report_not_found",
          "message": "The report for `report_id` '65810ac762004f22ac19f8f8edf70a34' is not found.",
          "target": {
            "name": "report_id",
            "type": "parameter",
            "value": "65810ac762004f22ac19f8f8edf70a34"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 404,
      "errors": [
        {
          "code": "report_not_found",
          "message": "The report for `report_id` '65810ac762004f22ac19f8f8edf70a34' is not found.",
          "target": {
            "name": "report_id",
            "type": "parameter",
            "value": "65810ac762004f22ac19f8f8edf70a34"
          }
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 429,
      "errors": [
        {
          "code": "too_many_requests",
          "message": "The client has sent too many requests in a given amount of time."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service is unavailable. Try again later."
        }
      ]
    }
  • {
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "status_code": 503,
      "errors": [
        {
          "code": "backend_service_unavailable_error",
          "message": "A backend service is unavailable. Try again later."
        }
      ]
    }

Get access level for an instance

Retrieve access information about the caller for the specified instance.

GET /access

Request

Custom Headers

  • The supplied or generated value of this header is logged for a request, and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

    Example: 1a2b3c4d-5e6f-4a7b-8c9d-e0f1a2b3c4d5

  • The supplied or generated value of this header is logged for a request, and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

Response

The caller's level of access for the specified home instance.

Status Code

  • The access details were successfully retrieved.

  • You are not authorized to make this request.

  • You are not allowed to make this request.

  • The specified resource was not found.

Example responses
  • {
      "roles": {
        "view": [
          "dashboard",
          "events"
        ],
        "read": [
          "attachments",
          "collectors",
          "control-libraries"
        ],
        "create": [
          "attachments",
          "collectors",
          "control-libraries"
        ],
        "update": [
          "attachments",
          "collectors",
          "control-libraries"
        ],
        "delete": [
          "attachments",
          "collectors",
          "control-libraries"
        ]
      }
    }
  • {
      "status_code": 401,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "invalid_token",
          "message": "The token is either missing or invalid"
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "The request could not be authorized",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-admin"
        }
      ]
    }
  • {
      "status_code": 404,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "not_found",
          "message": "The requested resource was not found\"",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-admin"
        }
      ]
    }

List provider types

List all the registered provider types. For more information about connecting Workload Protection with the Security and Compliance Center, see Connecting Workload Protection.

List all the registered provider types. For more information about connecting Workload Protection with the Security and Compliance Center, see Connecting Workload Protection.

List all the registered provider types. For more information about connecting Workload Protection with the Security and Compliance Center, see Connecting Workload Protection.

List all the registered provider types. For more information about connecting Workload Protection with the Security and Compliance Center, see Connecting Workload Protection.

List all the registered provider types. For more information about connecting Workload Protection with the Security and Compliance Center, see Connecting Workload Protection.

GET /provider_types
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) ListProviderTypes(listProviderTypesOptions *ListProviderTypesOptions) (result *ProviderTypesCollection, response *core.DetailedResponse, err error)
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) ListProviderTypesWithContext(ctx context.Context, listProviderTypesOptions *ListProviderTypesOptions) (result *ProviderTypesCollection, response *core.DetailedResponse, err error)
listProviderTypes(params)
list_provider_types(
        self,
        *,
        x_correlation_id: str = None,
        x_request_id: str = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<ProviderTypesCollection> listProviderTypes(ListProviderTypesOptions listProviderTypesOptions)

Request

Instantiate the ListProviderTypesOptions struct and set the fields to provide parameter values for the ListProviderTypes method.

Use the ListProviderTypesOptions.Builder to create a ListProviderTypesOptions object that contains the parameter values for the listProviderTypes method.

Custom Headers

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

WithContext method only

The ListProviderTypes options.

parameters

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

parameters

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

The listProviderTypes options.

  • curl -X GET --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/provider_types"
  • listProviderTypesOptions := securityAndComplianceCenterApiService.NewListProviderTypesOptions()
    
    providerTypesCollection, response, err := securityAndComplianceCenterApiService.ListProviderTypes(listProviderTypesOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(providerTypesCollection, "", "  ")
    fmt.Println(string(b))
  • let res;
    try {
      res = await securityAndComplianceCenterApiService.listProviderTypes({});
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • response = security_and_compliance_center_api_service.list_provider_types()
    provider_types_collection = response.get_result()
    
    print(json.dumps(provider_types_collection, indent=2))
  • ListProviderTypesOptions listProviderTypesOptions = new ListProviderTypesOptions.Builder()
      .build();
    
    Response<ProviderTypesCollection> response = securityAndComplianceCenterApiService.listProviderTypes(listProviderTypesOptions).execute();
    ProviderTypesCollection providerTypesCollection = response.getResult();
    
    System.out.println(providerTypesCollection);

Response

The provider types collection

The provider types collection.

Examples:
View

The provider types collection.

Examples:
View

The provider types collection.

Examples:
View

The provider types collection.

Examples:
View

Status Code

  • The providers types were successfully retrieved.

  • You are not authorized to make this request.

  • The server has encountered an unexpected internal error.

Example responses
  • {
      "provider_types": [
        {
          "id": "7588190cce3c05ac8f7942ea597dafce",
          "type": "workload-protection",
          "name": "workload-protection",
          "description": "Security and Compliance Center Workload Protection helps you accelerate your Kubernetes and cloud adoption by addressing security and regulatory compliance. Easily identify vulnerabilities, check compliance, block threats and respond faster at every stage of the container and Kubernetes lifecycle.",
          "s2s_enabled": true,
          "instance_limit": 1,
          "mode": "PULL",
          "data_type": "com.sysdig.secure.results",
          "icon": "PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBkYXRhLW5hbWU9IkJ1aWxkIGljb24gaGVyZSIgdmlld0JveD0iMCAwIDMyIDMyIj48ZGVmcz48bGluZWFyR3JhZGllbnQgaWQ9ImEiIHgxPSItMjgxMS4xOTgiIHgyPSItMjgxNC4xOTgiIHkxPSI1NTcuNTE3IiB5Mj0iNTU3LjUxNyIgZ3JhZGllbnRUcmFuc2Zvcm09InRyYW5zbGF0ZSgyODMxLjE5OCAtNTQyLjAxNykiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBvZmZzZXQ9Ii4xIiBzdG9wLW9wYWNpdHk9IjAiLz48c3RvcCBvZmZzZXQ9Ii44Ii8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgeGxpbms6aHJlZj0iI2EiIGlkPSJiIiB4MT0iLTgwNi4xOTgiIHgyPSItNzk5LjE5OCIgeTE9Ii0yNDE0LjQ4MSIgeTI9Ii0yNDE0LjQ4MSIgZ3JhZGllbnRUcmFuc2Zvcm09InRyYW5zbGF0ZSg4MjUuMTk4IDI0MjguOTgxKSIvPjxsaW5lYXJHcmFkaWVudCB4bGluazpocmVmPSIjYSIgaWQ9ImMiIHgxPSItODEwLjE5OCIgeDI9Ii03OTguMTk4IiB5MT0iLTI0MTkuOTgxIiB5Mj0iLTI0MTkuOTgxIiBncmFkaWVudFRyYW5zZm9ybT0idHJhbnNsYXRlKDgzMi4xOTggMjQzMi45ODEpIi8+PGxpbmVhckdyYWRpZW50IGlkPSJlIiB4MT0iLTI1MTQiIHgyPSItMjQ4MiIgeTE9Ii0yNDgyIiB5Mj0iLTI1MTQiIGdyYWRpZW50VHJhbnNmb3JtPSJtYXRyaXgoMSAwIDAgLTEgMjUxNCAtMjQ4MikiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBvZmZzZXQ9Ii4xIiBzdG9wLWNvbG9yPSIjMDhiZGJhIi8+PHN0b3Agb2Zmc2V0PSIuOSIgc3RvcC1jb2xvcj0iIzBmNjJmZSIvPjwvbGluZWFyR3JhZGllbnQ+PG1hc2sgaWQ9ImQiIHdpZHRoPSIyOS4wMTciIGhlaWdodD0iMjcuOTk2IiB4PSIxLjk4MyIgeT0iMiIgZGF0YS1uYW1lPSJtYXNrIiBtYXNrVW5pdHM9InVzZXJTcGFjZU9uVXNlIj48ZyBmaWxsPSIjZmZmIj48cGF0aCBkPSJNMjkuOTc2IDE2YzAtMy43MzktMS40NTYtNy4yNTUtNC4xMDEtOS44OTlTMTkuNzE1IDIgMTUuOTc2IDIgOC43MjEgMy40NTYgNi4wNzcgNi4xMDFjLTUuNDU5IDUuNDU5LTUuNDU5IDE0LjM0IDAgMTkuNzk4QTE0LjA0NCAxNC4wNDQgMCAwIDAgMTYgMjkuOTk1di0yLjAwMWExMi4wNCAxMi4wNCAwIDAgMS04LjUwOS0zLjUxYy00LjY3OS00LjY3OS00LjY3OS0xMi4yOTIgMC0xNi45NzEgMi4yNjctMi4yNjcgNS4yOC0zLjUxNSA4LjQ4NS0zLjUxNXM2LjIxOSAxLjI0OCA4LjQ4NSAzLjUxNSAzLjUxNSA1LjI4IDMuNTE1IDguNDg1YzAgMS4zMDgtLjIxOCAyLjU4LS42MTggMy43ODZsMS44OTcuNjMyYy40NjctMS40MDguNzIyLTIuODkyLjcyMi00LjQxOFoiLz48cGF0aCBkPSJNMjQuNyAxMy42NzVhOC45NCA4Ljk0IDAgMCAwLTQuMTkzLTUuNDY1IDguOTQyIDguOTQyIDAgMCAwLTYuODMtLjg5OSA4Ljk3MSA4Ljk3MSAwIDAgMC01LjQ2MSA0LjE5NSA4Ljk4IDguOTggMCAwIDAtLjkwMyA2LjgyOGMxLjA3NyA0LjAxNiA0LjcyMiA2LjY2IDguNjk1IDYuNjYxdi0xLjk5OGMtMy4wOS0uMDAxLTUuOTI2LTIuMDU4LTYuNzYzLTUuMTgxYTcuMDEgNy4wMSAwIDAgMSA0Ljk1LTguNTc0IDYuOTU4IDYuOTU4IDAgMCAxIDUuMzEyLjY5OSA2Ljk1NCA2Ljk1NCAwIDAgMSAzLjI2MSA0LjI1Yy4zNTkgMS4zNDIuMjc1IDIuNzMyLS4xNTQgNC4wMTNsMS45MDkuNjM2YTguOTU5IDguOTU5IDAgMCAwIC4xNzYtNS4xNjdaIi8+PC9nPjxwYXRoIGZpbGw9IiNmZmYiIGQ9Ik0xNCAxNmMwLTEuMTAzLjg5Ny0yIDItMnMyIC44OTcgMiAyYTIgMiAwIDAgMS0uMTExLjYzbDEuODg5LjYzYy4xMzMtLjM5OC4yMjItLjgxNy4yMjItMS4yNTlhNCA0IDAgMSAwLTQgNHYtMmMtMS4xMDMgMC0yLS44OTctMi0yWiIvPjxwYXRoIGZpbGw9InVybCgjYSkiIGQ9Ik0xNyAxNGgzdjNoLTN6IiB0cmFuc2Zvcm09InJvdGF0ZSgtOTAgMTguNSAxNS41KSIvPjxwYXRoIGZpbGw9InVybCgjYikiIGQ9Ik0xOSAxMmg3djVoLTd6IiB0cmFuc2Zvcm09InJvdGF0ZSg5MCAyMi41IDE0LjUpIi8+PHBhdGggZmlsbD0idXJsKCNjKSIgZD0iTTIyIDEwaDEydjZIMjJ6IiB0cmFuc2Zvcm09InJvdGF0ZSg5MCAyOCAxMykiLz48cGF0aCBkPSJNMjUgMTloNnY0aC02ek0yMCAxOGg1djVoLTV6TTE3IDE3aDN2NmgtM3oiLz48L21hc2s+PC9kZWZzPjxwYXRoIGZpbGw9IiMwMDFkNmMiIGQ9Im0yNSAzMS4wMDEtMi4xMzktMS4wMTNBNS4wMjIgNS4wMjIgMCAwIDEgMjAgMjUuNDY4VjE5aDEwdjYuNDY4YTUuMDIzIDUuMDIzIDAgMCAxLTIuODYxIDQuNTJMMjUgMzEuMDAxWm0tMy0xMHY0LjQ2OGMwIDEuMTUzLjY3NCAyLjIxOCAxLjcxNyAyLjcxMWwxLjI4My42MDcgMS4yODMtLjYwN0EzLjAxMiAzLjAxMiAwIDAgMCAyOCAyNS40Njl2LTQuNDY4aC02WiIgZGF0YS1uYW1lPSJ1dWlkLTU1ODMwNDRiLWZmMjQtNGUyNy05MDU0LTI0MDQzYWRkZmMwNiIvPjxnIG1hc2s9InVybCgjZCkiPjxwYXRoIGZpbGw9InVybCgjZSkiIGQ9Ik0wIDBoMzJ2MzJIMHoiIHRyYW5zZm9ybT0icm90YXRlKC05MCAxNiAxNikiLz48L2c+PC9zdmc+",
          "label": {
            "text": "1 per instance",
            "tip": "Only 1 per instance"
          },
          "attributes": {
            "wp_crn": {
              "type": "text",
              "display_name": "Workload Protection Instance CRN"
            }
          },
          "created_at": "2023-07-24T13:14:18.884Z",
          "updated_at": "2023-07-24T13:14:18.884Z"
        }
      ]
    }
  • {
      "provider_types": [
        {
          "id": "7588190cce3c05ac8f7942ea597dafce",
          "type": "workload-protection",
          "name": "workload-protection",
          "description": "Security and Compliance Center Workload Protection helps you accelerate your Kubernetes and cloud adoption by addressing security and regulatory compliance. Easily identify vulnerabilities, check compliance, block threats and respond faster at every stage of the container and Kubernetes lifecycle.",
          "s2s_enabled": true,
          "instance_limit": 1,
          "mode": "PULL",
          "data_type": "com.sysdig.secure.results",
          "icon": "PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBkYXRhLW5hbWU9IkJ1aWxkIGljb24gaGVyZSIgdmlld0JveD0iMCAwIDMyIDMyIj48ZGVmcz48bGluZWFyR3JhZGllbnQgaWQ9ImEiIHgxPSItMjgxMS4xOTgiIHgyPSItMjgxNC4xOTgiIHkxPSI1NTcuNTE3IiB5Mj0iNTU3LjUxNyIgZ3JhZGllbnRUcmFuc2Zvcm09InRyYW5zbGF0ZSgyODMxLjE5OCAtNTQyLjAxNykiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBvZmZzZXQ9Ii4xIiBzdG9wLW9wYWNpdHk9IjAiLz48c3RvcCBvZmZzZXQ9Ii44Ii8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgeGxpbms6aHJlZj0iI2EiIGlkPSJiIiB4MT0iLTgwNi4xOTgiIHgyPSItNzk5LjE5OCIgeTE9Ii0yNDE0LjQ4MSIgeTI9Ii0yNDE0LjQ4MSIgZ3JhZGllbnRUcmFuc2Zvcm09InRyYW5zbGF0ZSg4MjUuMTk4IDI0MjguOTgxKSIvPjxsaW5lYXJHcmFkaWVudCB4bGluazpocmVmPSIjYSIgaWQ9ImMiIHgxPSItODEwLjE5OCIgeDI9Ii03OTguMTk4IiB5MT0iLTI0MTkuOTgxIiB5Mj0iLTI0MTkuOTgxIiBncmFkaWVudFRyYW5zZm9ybT0idHJhbnNsYXRlKDgzMi4xOTggMjQzMi45ODEpIi8+PGxpbmVhckdyYWRpZW50IGlkPSJlIiB4MT0iLTI1MTQiIHgyPSItMjQ4MiIgeTE9Ii0yNDgyIiB5Mj0iLTI1MTQiIGdyYWRpZW50VHJhbnNmb3JtPSJtYXRyaXgoMSAwIDAgLTEgMjUxNCAtMjQ4MikiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBvZmZzZXQ9Ii4xIiBzdG9wLWNvbG9yPSIjMDhiZGJhIi8+PHN0b3Agb2Zmc2V0PSIuOSIgc3RvcC1jb2xvcj0iIzBmNjJmZSIvPjwvbGluZWFyR3JhZGllbnQ+PG1hc2sgaWQ9ImQiIHdpZHRoPSIyOS4wMTciIGhlaWdodD0iMjcuOTk2IiB4PSIxLjk4MyIgeT0iMiIgZGF0YS1uYW1lPSJtYXNrIiBtYXNrVW5pdHM9InVzZXJTcGFjZU9uVXNlIj48ZyBmaWxsPSIjZmZmIj48cGF0aCBkPSJNMjkuOTc2IDE2YzAtMy43MzktMS40NTYtNy4yNTUtNC4xMDEtOS44OTlTMTkuNzE1IDIgMTUuOTc2IDIgOC43MjEgMy40NTYgNi4wNzcgNi4xMDFjLTUuNDU5IDUuNDU5LTUuNDU5IDE0LjM0IDAgMTkuNzk4QTE0LjA0NCAxNC4wNDQgMCAwIDAgMTYgMjkuOTk1di0yLjAwMWExMi4wNCAxMi4wNCAwIDAgMS04LjUwOS0zLjUxYy00LjY3OS00LjY3OS00LjY3OS0xMi4yOTIgMC0xNi45NzEgMi4yNjctMi4yNjcgNS4yOC0zLjUxNSA4LjQ4NS0zLjUxNXM2LjIxOSAxLjI0OCA4LjQ4NSAzLjUxNSAzLjUxNSA1LjI4IDMuNTE1IDguNDg1YzAgMS4zMDgtLjIxOCAyLjU4LS42MTggMy43ODZsMS44OTcuNjMyYy40NjctMS40MDguNzIyLTIuODkyLjcyMi00LjQxOFoiLz48cGF0aCBkPSJNMjQuNyAxMy42NzVhOC45NCA4Ljk0IDAgMCAwLTQuMTkzLTUuNDY1IDguOTQyIDguOTQyIDAgMCAwLTYuODMtLjg5OSA4Ljk3MSA4Ljk3MSAwIDAgMC01LjQ2MSA0LjE5NSA4Ljk4IDguOTggMCAwIDAtLjkwMyA2LjgyOGMxLjA3NyA0LjAxNiA0LjcyMiA2LjY2IDguNjk1IDYuNjYxdi0xLjk5OGMtMy4wOS0uMDAxLTUuOTI2LTIuMDU4LTYuNzYzLTUuMTgxYTcuMDEgNy4wMSAwIDAgMSA0Ljk1LTguNTc0IDYuOTU4IDYuOTU4IDAgMCAxIDUuMzEyLjY5OSA2Ljk1NCA2Ljk1NCAwIDAgMSAzLjI2MSA0LjI1Yy4zNTkgMS4zNDIuMjc1IDIuNzMyLS4xNTQgNC4wMTNsMS45MDkuNjM2YTguOTU5IDguOTU5IDAgMCAwIC4xNzYtNS4xNjdaIi8+PC9nPjxwYXRoIGZpbGw9IiNmZmYiIGQ9Ik0xNCAxNmMwLTEuMTAzLjg5Ny0yIDItMnMyIC44OTcgMiAyYTIgMiAwIDAgMS0uMTExLjYzbDEuODg5LjYzYy4xMzMtLjM5OC4yMjItLjgxNy4yMjItMS4yNTlhNCA0IDAgMSAwLTQgNHYtMmMtMS4xMDMgMC0yLS44OTctMi0yWiIvPjxwYXRoIGZpbGw9InVybCgjYSkiIGQ9Ik0xNyAxNGgzdjNoLTN6IiB0cmFuc2Zvcm09InJvdGF0ZSgtOTAgMTguNSAxNS41KSIvPjxwYXRoIGZpbGw9InVybCgjYikiIGQ9Ik0xOSAxMmg3djVoLTd6IiB0cmFuc2Zvcm09InJvdGF0ZSg5MCAyMi41IDE0LjUpIi8+PHBhdGggZmlsbD0idXJsKCNjKSIgZD0iTTIyIDEwaDEydjZIMjJ6IiB0cmFuc2Zvcm09InJvdGF0ZSg5MCAyOCAxMykiLz48cGF0aCBkPSJNMjUgMTloNnY0aC02ek0yMCAxOGg1djVoLTV6TTE3IDE3aDN2NmgtM3oiLz48L21hc2s+PC9kZWZzPjxwYXRoIGZpbGw9IiMwMDFkNmMiIGQ9Im0yNSAzMS4wMDEtMi4xMzktMS4wMTNBNS4wMjIgNS4wMjIgMCAwIDEgMjAgMjUuNDY4VjE5aDEwdjYuNDY4YTUuMDIzIDUuMDIzIDAgMCAxLTIuODYxIDQuNTJMMjUgMzEuMDAxWm0tMy0xMHY0LjQ2OGMwIDEuMTUzLjY3NCAyLjIxOCAxLjcxNyAyLjcxMWwxLjI4My42MDcgMS4yODMtLjYwN0EzLjAxMiAzLjAxMiAwIDAgMCAyOCAyNS40Njl2LTQuNDY4aC02WiIgZGF0YS1uYW1lPSJ1dWlkLTU1ODMwNDRiLWZmMjQtNGUyNy05MDU0LTI0MDQzYWRkZmMwNiIvPjxnIG1hc2s9InVybCgjZCkiPjxwYXRoIGZpbGw9InVybCgjZSkiIGQ9Ik0wIDBoMzJ2MzJIMHoiIHRyYW5zZm9ybT0icm90YXRlKC05MCAxNiAxNikiLz48L2c+PC9zdmc+",
          "label": {
            "text": "1 per instance",
            "tip": "Only 1 per instance"
          },
          "attributes": {
            "wp_crn": {
              "type": "text",
              "display_name": "Workload Protection Instance CRN"
            }
          },
          "created_at": "2023-07-24T13:14:18.884Z",
          "updated_at": "2023-07-24T13:14:18.884Z"
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "07b88c85-3b37-41e3-822d-999ab4399861",
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "cause": "bearer token is invalid: token is malformed: token contains an invalid number of segments",
          "target": {
            "type": "header",
            "name": "Authorization"
          }
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "07b88c85-3b37-41e3-822d-999ab4399861",
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "cause": "bearer token is invalid: token is malformed: token contains an invalid number of segments",
          "target": {
            "type": "header",
            "name": "Authorization"
          }
        }
      ]
    }
  • {
      "status_code": 500,
      "trace": "61ed26cd-9df9-4cd8-95d1-8fcb2906b5b6",
      "errors": [
        {
          "code": "internal_server_error",
          "message": "The server has encountered an unexpected internal error."
        }
      ]
    }
  • {
      "status_code": 500,
      "trace": "61ed26cd-9df9-4cd8-95d1-8fcb2906b5b6",
      "errors": [
        {
          "code": "internal_server_error",
          "message": "The server has encountered an unexpected internal error."
        }
      ]
    }

Get a provider type

Retrieve a provider type by specifying its ID. For more information about integrations, see Connecting Workload Protection.

Retrieve a provider type by specifying its ID. For more information about integrations, see Connecting Workload Protection.

Retrieve a provider type by specifying its ID. For more information about integrations, see Connecting Workload Protection.

Retrieve a provider type by specifying its ID. For more information about integrations, see Connecting Workload Protection.

Retrieve a provider type by specifying its ID. For more information about integrations, see Connecting Workload Protection.

GET /provider_types/{provider_type_id}
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) GetProviderTypeByID(getProviderTypeByIdOptions *GetProviderTypeByIdOptions) (result *ProviderTypeItem, response *core.DetailedResponse, err error)
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) GetProviderTypeByIDWithContext(ctx context.Context, getProviderTypeByIdOptions *GetProviderTypeByIdOptions) (result *ProviderTypeItem, response *core.DetailedResponse, err error)
getProviderTypeById(params)
get_provider_type_by_id(
        self,
        provider_type_id: str,
        *,
        x_correlation_id: str = None,
        x_request_id: str = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<ProviderTypeItem> getProviderTypeById(GetProviderTypeByIdOptions getProviderTypeByIdOptions)

Request

Instantiate the GetProviderTypeByIdOptions struct and set the fields to provide parameter values for the GetProviderTypeByID method.

Use the GetProviderTypeByIdOptions.Builder to create a GetProviderTypeByIdOptions object that contains the parameter values for the getProviderTypeById method.

Custom Headers

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

Path Parameters

  • The provider type ID.

    Possible values: 32 ≤ length ≤ 36, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

WithContext method only

The GetProviderTypeByID options.

parameters

  • The provider type ID.

    Possible values: 32 ≤ length ≤ 36, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

parameters

  • The provider type ID.

    Possible values: 32 ≤ length ≤ 36, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

The getProviderTypeById options.

  • curl -X GET --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/provider_types/{provider_type_id}"
  • getProviderTypeByIdOptions := securityAndComplianceCenterApiService.NewGetProviderTypeByIdOptions(
      providerTypeIdLink,
    )
    
    providerTypeItem, response, err := securityAndComplianceCenterApiService.GetProviderTypeByID(getProviderTypeByIdOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(providerTypeItem, "", "  ")
    fmt.Println(string(b))
  • const params = {
      providerTypeId: providerTypeIdLink,
    };
    
    let res;
    try {
      res = await securityAndComplianceCenterApiService.getProviderTypeById(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • response = security_and_compliance_center_api_service.get_provider_type_by_id(
      provider_type_id=provider_type_id_link,
    )
    provider_type_item = response.get_result()
    
    print(json.dumps(provider_type_item, indent=2))
  • GetProviderTypeByIdOptions getProviderTypeByIdOptions = new GetProviderTypeByIdOptions.Builder()
      .providerTypeId(providerTypeIdLink)
      .build();
    
    Response<ProviderTypeItem> response = securityAndComplianceCenterApiService.getProviderTypeById(getProviderTypeByIdOptions).execute();
    ProviderTypeItem providerTypeItem = response.getResult();
    
    System.out.println(providerTypeItem);

Response

The provider type item

The provider type item.

The provider type item.

The provider type item.

The provider type item.

Status Code

  • The provider type was retrieved successfully.

  • You are not authorized to make this request.

  • The specified resource could not be found.

  • The server has encountered an unexpected internal error.

Example responses
  • {
      "id": "7588190cce3c05ac8f7942ea597dafce",
      "type": "workload-protection",
      "name": "workload-protection",
      "description": "Security and Compliance Center Workload Protection helps you accelerate your Kubernetes and cloud adoption by addressing security and regulatory compliance. Easily identify vulnerabilities, check compliance, block threats and respond faster at every stage of the container and Kubernetes lifecycle.",
      "s2s_enabled": true,
      "instance_limit": 1,
      "mode": "PULL",
      "data_type": "com.sysdig.secure.results",
      "icon": "PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBkYXRhLW5hbWU9IkJ1aWxkIGljb24gaGVyZSIgdmlld0JveD0iMCAwIDMyIDMyIj48ZGVmcz48bGluZWFyR3JhZGllbnQgaWQ9ImEiIHgxPSItMjgxMS4xOTgiIHgyPSItMjgxNC4xOTgiIHkxPSI1NTcuNTE3IiB5Mj0iNTU3LjUxNyIgZ3JhZGllbnRUcmFuc2Zvcm09InRyYW5zbGF0ZSgyODMxLjE5OCAtNTQyLjAxNykiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBvZmZzZXQ9Ii4xIiBzdG9wLW9wYWNpdHk9IjAiLz48c3RvcCBvZmZzZXQ9Ii44Ii8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgeGxpbms6aHJlZj0iI2EiIGlkPSJiIiB4MT0iLTgwNi4xOTgiIHgyPSItNzk5LjE5OCIgeTE9Ii0yNDE0LjQ4MSIgeTI9Ii0yNDE0LjQ4MSIgZ3JhZGllbnRUcmFuc2Zvcm09InRyYW5zbGF0ZSg4MjUuMTk4IDI0MjguOTgxKSIvPjxsaW5lYXJHcmFkaWVudCB4bGluazpocmVmPSIjYSIgaWQ9ImMiIHgxPSItODEwLjE5OCIgeDI9Ii03OTguMTk4IiB5MT0iLTI0MTkuOTgxIiB5Mj0iLTI0MTkuOTgxIiBncmFkaWVudFRyYW5zZm9ybT0idHJhbnNsYXRlKDgzMi4xOTggMjQzMi45ODEpIi8+PGxpbmVhckdyYWRpZW50IGlkPSJlIiB4MT0iLTI1MTQiIHgyPSItMjQ4MiIgeTE9Ii0yNDgyIiB5Mj0iLTI1MTQiIGdyYWRpZW50VHJhbnNmb3JtPSJtYXRyaXgoMSAwIDAgLTEgMjUxNCAtMjQ4MikiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBvZmZzZXQ9Ii4xIiBzdG9wLWNvbG9yPSIjMDhiZGJhIi8+PHN0b3Agb2Zmc2V0PSIuOSIgc3RvcC1jb2xvcj0iIzBmNjJmZSIvPjwvbGluZWFyR3JhZGllbnQ+PG1hc2sgaWQ9ImQiIHdpZHRoPSIyOS4wMTciIGhlaWdodD0iMjcuOTk2IiB4PSIxLjk4MyIgeT0iMiIgZGF0YS1uYW1lPSJtYXNrIiBtYXNrVW5pdHM9InVzZXJTcGFjZU9uVXNlIj48ZyBmaWxsPSIjZmZmIj48cGF0aCBkPSJNMjkuOTc2IDE2YzAtMy43MzktMS40NTYtNy4yNTUtNC4xMDEtOS44OTlTMTkuNzE1IDIgMTUuOTc2IDIgOC43MjEgMy40NTYgNi4wNzcgNi4xMDFjLTUuNDU5IDUuNDU5LTUuNDU5IDE0LjM0IDAgMTkuNzk4QTE0LjA0NCAxNC4wNDQgMCAwIDAgMTYgMjkuOTk1di0yLjAwMWExMi4wNCAxMi4wNCAwIDAgMS04LjUwOS0zLjUxYy00LjY3OS00LjY3OS00LjY3OS0xMi4yOTIgMC0xNi45NzEgMi4yNjctMi4yNjcgNS4yOC0zLjUxNSA4LjQ4NS0zLjUxNXM2LjIxOSAxLjI0OCA4LjQ4NSAzLjUxNSAzLjUxNSA1LjI4IDMuNTE1IDguNDg1YzAgMS4zMDgtLjIxOCAyLjU4LS42MTggMy43ODZsMS44OTcuNjMyYy40NjctMS40MDguNzIyLTIuODkyLjcyMi00LjQxOFoiLz48cGF0aCBkPSJNMjQuNyAxMy42NzVhOC45NCA4Ljk0IDAgMCAwLTQuMTkzLTUuNDY1IDguOTQyIDguOTQyIDAgMCAwLTYuODMtLjg5OSA4Ljk3MSA4Ljk3MSAwIDAgMC01LjQ2MSA0LjE5NSA4Ljk4IDguOTggMCAwIDAtLjkwMyA2LjgyOGMxLjA3NyA0LjAxNiA0LjcyMiA2LjY2IDguNjk1IDYuNjYxdi0xLjk5OGMtMy4wOS0uMDAxLTUuOTI2LTIuMDU4LTYuNzYzLTUuMTgxYTcuMDEgNy4wMSAwIDAgMSA0Ljk1LTguNTc0IDYuOTU4IDYuOTU4IDAgMCAxIDUuMzEyLjY5OSA2Ljk1NCA2Ljk1NCAwIDAgMSAzLjI2MSA0LjI1Yy4zNTkgMS4zNDIuMjc1IDIuNzMyLS4xNTQgNC4wMTNsMS45MDkuNjM2YTguOTU5IDguOTU5IDAgMCAwIC4xNzYtNS4xNjdaIi8+PC9nPjxwYXRoIGZpbGw9IiNmZmYiIGQ9Ik0xNCAxNmMwLTEuMTAzLjg5Ny0yIDItMnMyIC44OTcgMiAyYTIgMiAwIDAgMS0uMTExLjYzbDEuODg5LjYzYy4xMzMtLjM5OC4yMjItLjgxNy4yMjItMS4yNTlhNCA0IDAgMSAwLTQgNHYtMmMtMS4xMDMgMC0yLS44OTctMi0yWiIvPjxwYXRoIGZpbGw9InVybCgjYSkiIGQ9Ik0xNyAxNGgzdjNoLTN6IiB0cmFuc2Zvcm09InJvdGF0ZSgtOTAgMTguNSAxNS41KSIvPjxwYXRoIGZpbGw9InVybCgjYikiIGQ9Ik0xOSAxMmg3djVoLTd6IiB0cmFuc2Zvcm09InJvdGF0ZSg5MCAyMi41IDE0LjUpIi8+PHBhdGggZmlsbD0idXJsKCNjKSIgZD0iTTIyIDEwaDEydjZIMjJ6IiB0cmFuc2Zvcm09InJvdGF0ZSg5MCAyOCAxMykiLz48cGF0aCBkPSJNMjUgMTloNnY0aC02ek0yMCAxOGg1djVoLTV6TTE3IDE3aDN2NmgtM3oiLz48L21hc2s+PC9kZWZzPjxwYXRoIGZpbGw9IiMwMDFkNmMiIGQ9Im0yNSAzMS4wMDEtMi4xMzktMS4wMTNBNS4wMjIgNS4wMjIgMCAwIDEgMjAgMjUuNDY4VjE5aDEwdjYuNDY4YTUuMDIzIDUuMDIzIDAgMCAxLTIuODYxIDQuNTJMMjUgMzEuMDAxWm0tMy0xMHY0LjQ2OGMwIDEuMTUzLjY3NCAyLjIxOCAxLjcxNyAyLjcxMWwxLjI4My42MDcgMS4yODMtLjYwN0EzLjAxMiAzLjAxMiAwIDAgMCAyOCAyNS40Njl2LTQuNDY4aC02WiIgZGF0YS1uYW1lPSJ1dWlkLTU1ODMwNDRiLWZmMjQtNGUyNy05MDU0LTI0MDQzYWRkZmMwNiIvPjxnIG1hc2s9InVybCgjZCkiPjxwYXRoIGZpbGw9InVybCgjZSkiIGQ9Ik0wIDBoMzJ2MzJIMHoiIHRyYW5zZm9ybT0icm90YXRlKC05MCAxNiAxNikiLz48L2c+PC9zdmc+",
      "label": {
        "text": "1 per instance",
        "tip": "Only 1 per instance"
      },
      "attributes": {
        "wp_crn": {
          "type": "text",
          "display_name": "Workload Protection Instance CRN"
        }
      },
      "created_at": "2023-07-24T13:14:18.884Z",
      "updated_at": "2023-07-24T13:14:18.884Z"
    }
  • {
      "id": "7588190cce3c05ac8f7942ea597dafce",
      "type": "workload-protection",
      "name": "workload-protection",
      "description": "Security and Compliance Center Workload Protection helps you accelerate your Kubernetes and cloud adoption by addressing security and regulatory compliance. Easily identify vulnerabilities, check compliance, block threats and respond faster at every stage of the container and Kubernetes lifecycle.",
      "s2s_enabled": true,
      "instance_limit": 1,
      "mode": "PULL",
      "data_type": "com.sysdig.secure.results",
      "icon": "PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBkYXRhLW5hbWU9IkJ1aWxkIGljb24gaGVyZSIgdmlld0JveD0iMCAwIDMyIDMyIj48ZGVmcz48bGluZWFyR3JhZGllbnQgaWQ9ImEiIHgxPSItMjgxMS4xOTgiIHgyPSItMjgxNC4xOTgiIHkxPSI1NTcuNTE3IiB5Mj0iNTU3LjUxNyIgZ3JhZGllbnRUcmFuc2Zvcm09InRyYW5zbGF0ZSgyODMxLjE5OCAtNTQyLjAxNykiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBvZmZzZXQ9Ii4xIiBzdG9wLW9wYWNpdHk9IjAiLz48c3RvcCBvZmZzZXQ9Ii44Ii8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgeGxpbms6aHJlZj0iI2EiIGlkPSJiIiB4MT0iLTgwNi4xOTgiIHgyPSItNzk5LjE5OCIgeTE9Ii0yNDE0LjQ4MSIgeTI9Ii0yNDE0LjQ4MSIgZ3JhZGllbnRUcmFuc2Zvcm09InRyYW5zbGF0ZSg4MjUuMTk4IDI0MjguOTgxKSIvPjxsaW5lYXJHcmFkaWVudCB4bGluazpocmVmPSIjYSIgaWQ9ImMiIHgxPSItODEwLjE5OCIgeDI9Ii03OTguMTk4IiB5MT0iLTI0MTkuOTgxIiB5Mj0iLTI0MTkuOTgxIiBncmFkaWVudFRyYW5zZm9ybT0idHJhbnNsYXRlKDgzMi4xOTggMjQzMi45ODEpIi8+PGxpbmVhckdyYWRpZW50IGlkPSJlIiB4MT0iLTI1MTQiIHgyPSItMjQ4MiIgeTE9Ii0yNDgyIiB5Mj0iLTI1MTQiIGdyYWRpZW50VHJhbnNmb3JtPSJtYXRyaXgoMSAwIDAgLTEgMjUxNCAtMjQ4MikiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBvZmZzZXQ9Ii4xIiBzdG9wLWNvbG9yPSIjMDhiZGJhIi8+PHN0b3Agb2Zmc2V0PSIuOSIgc3RvcC1jb2xvcj0iIzBmNjJmZSIvPjwvbGluZWFyR3JhZGllbnQ+PG1hc2sgaWQ9ImQiIHdpZHRoPSIyOS4wMTciIGhlaWdodD0iMjcuOTk2IiB4PSIxLjk4MyIgeT0iMiIgZGF0YS1uYW1lPSJtYXNrIiBtYXNrVW5pdHM9InVzZXJTcGFjZU9uVXNlIj48ZyBmaWxsPSIjZmZmIj48cGF0aCBkPSJNMjkuOTc2IDE2YzAtMy43MzktMS40NTYtNy4yNTUtNC4xMDEtOS44OTlTMTkuNzE1IDIgMTUuOTc2IDIgOC43MjEgMy40NTYgNi4wNzcgNi4xMDFjLTUuNDU5IDUuNDU5LTUuNDU5IDE0LjM0IDAgMTkuNzk4QTE0LjA0NCAxNC4wNDQgMCAwIDAgMTYgMjkuOTk1di0yLjAwMWExMi4wNCAxMi4wNCAwIDAgMS04LjUwOS0zLjUxYy00LjY3OS00LjY3OS00LjY3OS0xMi4yOTIgMC0xNi45NzEgMi4yNjctMi4yNjcgNS4yOC0zLjUxNSA4LjQ4NS0zLjUxNXM2LjIxOSAxLjI0OCA4LjQ4NSAzLjUxNSAzLjUxNSA1LjI4IDMuNTE1IDguNDg1YzAgMS4zMDgtLjIxOCAyLjU4LS42MTggMy43ODZsMS44OTcuNjMyYy40NjctMS40MDguNzIyLTIuODkyLjcyMi00LjQxOFoiLz48cGF0aCBkPSJNMjQuNyAxMy42NzVhOC45NCA4Ljk0IDAgMCAwLTQuMTkzLTUuNDY1IDguOTQyIDguOTQyIDAgMCAwLTYuODMtLjg5OSA4Ljk3MSA4Ljk3MSAwIDAgMC01LjQ2MSA0LjE5NSA4Ljk4IDguOTggMCAwIDAtLjkwMyA2LjgyOGMxLjA3NyA0LjAxNiA0LjcyMiA2LjY2IDguNjk1IDYuNjYxdi0xLjk5OGMtMy4wOS0uMDAxLTUuOTI2LTIuMDU4LTYuNzYzLTUuMTgxYTcuMDEgNy4wMSAwIDAgMSA0Ljk1LTguNTc0IDYuOTU4IDYuOTU4IDAgMCAxIDUuMzEyLjY5OSA2Ljk1NCA2Ljk1NCAwIDAgMSAzLjI2MSA0LjI1Yy4zNTkgMS4zNDIuMjc1IDIuNzMyLS4xNTQgNC4wMTNsMS45MDkuNjM2YTguOTU5IDguOTU5IDAgMCAwIC4xNzYtNS4xNjdaIi8+PC9nPjxwYXRoIGZpbGw9IiNmZmYiIGQ9Ik0xNCAxNmMwLTEuMTAzLjg5Ny0yIDItMnMyIC44OTcgMiAyYTIgMiAwIDAgMS0uMTExLjYzbDEuODg5LjYzYy4xMzMtLjM5OC4yMjItLjgxNy4yMjItMS4yNTlhNCA0IDAgMSAwLTQgNHYtMmMtMS4xMDMgMC0yLS44OTctMi0yWiIvPjxwYXRoIGZpbGw9InVybCgjYSkiIGQ9Ik0xNyAxNGgzdjNoLTN6IiB0cmFuc2Zvcm09InJvdGF0ZSgtOTAgMTguNSAxNS41KSIvPjxwYXRoIGZpbGw9InVybCgjYikiIGQ9Ik0xOSAxMmg3djVoLTd6IiB0cmFuc2Zvcm09InJvdGF0ZSg5MCAyMi41IDE0LjUpIi8+PHBhdGggZmlsbD0idXJsKCNjKSIgZD0iTTIyIDEwaDEydjZIMjJ6IiB0cmFuc2Zvcm09InJvdGF0ZSg5MCAyOCAxMykiLz48cGF0aCBkPSJNMjUgMTloNnY0aC02ek0yMCAxOGg1djVoLTV6TTE3IDE3aDN2NmgtM3oiLz48L21hc2s+PC9kZWZzPjxwYXRoIGZpbGw9IiMwMDFkNmMiIGQ9Im0yNSAzMS4wMDEtMi4xMzktMS4wMTNBNS4wMjIgNS4wMjIgMCAwIDEgMjAgMjUuNDY4VjE5aDEwdjYuNDY4YTUuMDIzIDUuMDIzIDAgMCAxLTIuODYxIDQuNTJMMjUgMzEuMDAxWm0tMy0xMHY0LjQ2OGMwIDEuMTUzLjY3NCAyLjIxOCAxLjcxNyAyLjcxMWwxLjI4My42MDcgMS4yODMtLjYwN0EzLjAxMiAzLjAxMiAwIDAgMCAyOCAyNS40Njl2LTQuNDY4aC02WiIgZGF0YS1uYW1lPSJ1dWlkLTU1ODMwNDRiLWZmMjQtNGUyNy05MDU0LTI0MDQzYWRkZmMwNiIvPjxnIG1hc2s9InVybCgjZCkiPjxwYXRoIGZpbGw9InVybCgjZSkiIGQ9Ik0wIDBoMzJ2MzJIMHoiIHRyYW5zZm9ybT0icm90YXRlKC05MCAxNiAxNikiLz48L2c+PC9zdmc+",
      "label": {
        "text": "1 per instance",
        "tip": "Only 1 per instance"
      },
      "attributes": {
        "wp_crn": {
          "type": "text",
          "display_name": "Workload Protection Instance CRN"
        }
      },
      "created_at": "2023-07-24T13:14:18.884Z",
      "updated_at": "2023-07-24T13:14:18.884Z"
    }
  • {
      "status_code": 401,
      "trace": "07b88c85-3b37-41e3-822d-999ab4399861",
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "cause": "bearer token is invalid: token is malformed: token contains an invalid number of segments",
          "target": {
            "type": "header",
            "name": "Authorization"
          }
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "07b88c85-3b37-41e3-822d-999ab4399861",
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "cause": "bearer token is invalid: token is malformed: token contains an invalid number of segments",
          "target": {
            "type": "header",
            "name": "Authorization"
          }
        }
      ]
    }
  • {
      "status_code": 404,
      "trace": "61ed26cd-9df9-4cd8-95d1-8fcb2906b5b6",
      "errors": [
        {
          "code": "provider_not_found",
          "message": "Provider not found",
          "cause": "Provider not found."
        }
      ]
    }
  • {
      "status_code": 404,
      "trace": "61ed26cd-9df9-4cd8-95d1-8fcb2906b5b6",
      "errors": [
        {
          "code": "provider_not_found",
          "message": "Provider not found",
          "cause": "Provider not found."
        }
      ]
    }
  • {
      "status_code": 500,
      "trace": "61ed26cd-9df9-4cd8-95d1-8fcb2906b5b6",
      "errors": [
        {
          "code": "internal_server_error",
          "message": "The server has encountered an unexpected internal error."
        }
      ]
    }
  • {
      "status_code": 500,
      "trace": "61ed26cd-9df9-4cd8-95d1-8fcb2906b5b6",
      "errors": [
        {
          "code": "internal_server_error",
          "message": "The server has encountered an unexpected internal error."
        }
      ]
    }

List provider type instances

Retrieve all instances of a provider type. For more information about integrations, see Connecting Workload Protection.

Retrieve all instances of a provider type. For more information about integrations, see Connecting Workload Protection.

Retrieve all instances of a provider type. For more information about integrations, see Connecting Workload Protection.

Retrieve all instances of a provider type. For more information about integrations, see Connecting Workload Protection.

Retrieve all instances of a provider type. For more information about integrations, see Connecting Workload Protection.

GET /provider_types/{provider_type_id}/provider_type_instances
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) ListProviderTypeInstances(listProviderTypeInstancesOptions *ListProviderTypeInstancesOptions) (result *ProviderTypeInstancesResponse, response *core.DetailedResponse, err error)
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) ListProviderTypeInstancesWithContext(ctx context.Context, listProviderTypeInstancesOptions *ListProviderTypeInstancesOptions) (result *ProviderTypeInstancesResponse, response *core.DetailedResponse, err error)
listProviderTypeInstances(params)
list_provider_type_instances(
        self,
        provider_type_id: str,
        *,
        x_correlation_id: str = None,
        x_request_id: str = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<ProviderTypeInstancesResponse> listProviderTypeInstances(ListProviderTypeInstancesOptions listProviderTypeInstancesOptions)

Request

Instantiate the ListProviderTypeInstancesOptions struct and set the fields to provide parameter values for the ListProviderTypeInstances method.

Use the ListProviderTypeInstancesOptions.Builder to create a ListProviderTypeInstancesOptions object that contains the parameter values for the listProviderTypeInstances method.

Custom Headers

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

Path Parameters

  • The provider type ID.

    Possible values: 32 ≤ length ≤ 36, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

WithContext method only

The ListProviderTypeInstances options.

parameters

  • The provider type ID.

    Possible values: 32 ≤ length ≤ 36, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

parameters

  • The provider type ID.

    Possible values: 32 ≤ length ≤ 36, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

The listProviderTypeInstances options.

  • curl -X GET --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/provider_types/{provider_type_id}/provider_type_instances"
  • listProviderTypeInstancesOptions := securityAndComplianceCenterApiService.NewListProviderTypeInstancesOptions(
      providerTypeIdLink,
    )
    
    providerTypeInstancesResponse, response, err := securityAndComplianceCenterApiService.ListProviderTypeInstances(listProviderTypeInstancesOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(providerTypeInstancesResponse, "", "  ")
    fmt.Println(string(b))
  • const params = {
      providerTypeId: providerTypeIdLink,
    };
    
    let res;
    try {
      res = await securityAndComplianceCenterApiService.listProviderTypeInstances(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • response = security_and_compliance_center_api_service.list_provider_type_instances(
      provider_type_id=provider_type_id_link,
    )
    provider_type_instances_response = response.get_result()
    
    print(json.dumps(provider_type_instances_response, indent=2))
  • ListProviderTypeInstancesOptions listProviderTypeInstancesOptions = new ListProviderTypeInstancesOptions.Builder()
      .providerTypeId(providerTypeIdLink)
      .build();
    
    Response<ProviderTypeInstancesResponse> response = securityAndComplianceCenterApiService.listProviderTypeInstances(listProviderTypeInstancesOptions).execute();
    ProviderTypeInstancesResponse providerTypeInstancesResponse = response.getResult();
    
    System.out.println(providerTypeInstancesResponse);

Response

Provider type instances response.

Provider type instances response.

Examples:
View

Provider type instances response.

Examples:
View

Provider type instances response.

Examples:
View

Provider type instances response.

Examples:
View

Status Code

  • The list of provider type instances was successfully retrieved.

  • You are not authorized to make this request.

  • The specified resource could not be found.

  • The server has encountered an unexpected internal error.

Example responses
  • {
      "provider_type_instances": [
        {
          "id": "7588190cce3c05ac8f7942ea597dafce",
          "type": "workload-protection",
          "name": "workload-protection-instance-1",
          "attributes": {
            "wp_crn": "crn:v1:staging:public:sysdig-secure:eu-gb:a/14q5SEnVIbwxzvP4AWPCjr2dJg5BAvPb:d1461d1ae-df1eee12fa81812e0-12-aa259::"
          },
          "created_at": "2023-07-24T13:14:18.884Z",
          "updated_at": "2023-07-24T13:14:18.884Z"
        }
      ]
    }
  • {
      "provider_type_instances": [
        {
          "id": "7588190cce3c05ac8f7942ea597dafce",
          "type": "workload-protection",
          "name": "workload-protection-instance-1",
          "attributes": {
            "wp_crn": "crn:v1:staging:public:sysdig-secure:eu-gb:a/14q5SEnVIbwxzvP4AWPCjr2dJg5BAvPb:d1461d1ae-df1eee12fa81812e0-12-aa259::"
          },
          "created_at": "2023-07-24T13:14:18.884Z",
          "updated_at": "2023-07-24T13:14:18.884Z"
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "07b88c85-3b37-41e3-822d-999ab4399861",
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "cause": "bearer token is invalid: token is malformed: token contains an invalid number of segments",
          "target": {
            "type": "header",
            "name": "Authorization"
          }
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "07b88c85-3b37-41e3-822d-999ab4399861",
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "cause": "bearer token is invalid: token is malformed: token contains an invalid number of segments",
          "target": {
            "type": "header",
            "name": "Authorization"
          }
        }
      ]
    }
  • {
      "status_code": 404,
      "trace": "61ed26cd-9df9-4cd8-95d1-8fcb2906b5b6",
      "errors": [
        {
          "code": "provider_not_found",
          "message": "Provider not found",
          "cause": "Provider not found."
        }
      ]
    }
  • {
      "status_code": 404,
      "trace": "61ed26cd-9df9-4cd8-95d1-8fcb2906b5b6",
      "errors": [
        {
          "code": "provider_not_found",
          "message": "Provider not found",
          "cause": "Provider not found."
        }
      ]
    }
  • {
      "status_code": 500,
      "trace": "61ed26cd-9df9-4cd8-95d1-8fcb2906b5b6",
      "errors": [
        {
          "code": "internal_server_error",
          "message": "The server has encountered an unexpected internal error."
        }
      ]
    }
  • {
      "status_code": 500,
      "trace": "61ed26cd-9df9-4cd8-95d1-8fcb2906b5b6",
      "errors": [
        {
          "code": "internal_server_error",
          "message": "The server has encountered an unexpected internal error."
        }
      ]
    }

Create a provider type instance

Create an instance of a provider type. For more information about integrations, see Connecting Workload Protection.

Create an instance of a provider type. For more information about integrations, see Connecting Workload Protection.

Create an instance of a provider type. For more information about integrations, see Connecting Workload Protection.

Create an instance of a provider type. For more information about integrations, see Connecting Workload Protection.

Create an instance of a provider type. For more information about integrations, see Connecting Workload Protection.

POST /provider_types/{provider_type_id}/provider_type_instances
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) CreateProviderTypeInstance(createProviderTypeInstanceOptions *CreateProviderTypeInstanceOptions) (result *ProviderTypeInstanceItem, response *core.DetailedResponse, err error)
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) CreateProviderTypeInstanceWithContext(ctx context.Context, createProviderTypeInstanceOptions *CreateProviderTypeInstanceOptions) (result *ProviderTypeInstanceItem, response *core.DetailedResponse, err error)
createProviderTypeInstance(params)
create_provider_type_instance(
        self,
        provider_type_id: str,
        name: str,
        attributes: dict,
        *,
        x_correlation_id: str = None,
        x_request_id: str = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<ProviderTypeInstanceItem> createProviderTypeInstance(CreateProviderTypeInstanceOptions createProviderTypeInstanceOptions)

Request

Instantiate the CreateProviderTypeInstanceOptions struct and set the fields to provide parameter values for the CreateProviderTypeInstance method.

Use the CreateProviderTypeInstanceOptions.Builder to create a CreateProviderTypeInstanceOptions object that contains the parameter values for the createProviderTypeInstance method.

Custom Headers

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

Path Parameters

  • The provider type ID.

    Possible values: 32 ≤ length ≤ 36, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

The request body to create a provider type instance.

Examples:
View

WithContext method only

The CreateProviderTypeInstance options.

parameters

  • The provider type ID.

    Possible values: 32 ≤ length ≤ 36, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The provider type instance name.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression /[A-Za-z0-9]+/

    Examples:
    value
    _source
    _lines
    _html
  • The attributes for connecting to the provider type instance.

    Examples:
    value
    _source
    _lines
    _html
  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

parameters

  • The provider type ID.

    Possible values: 32 ≤ length ≤ 36, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The provider type instance name.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression /[A-Za-z0-9]+/

    Examples:
    value
    _source
    _lines
    _html
  • The attributes for connecting to the provider type instance.

    Examples:
    value
    _source
    _lines
    _html
  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

The createProviderTypeInstance options.

  • curl -X POST --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{"name":"workload-protection-instance-1","attributes":{"wp_crn":"crn:v1:staging:public:sysdig-secure:eu-gb:a/14q5SEnVIbwxzvP4AWPCjr2dJg5BAvPb:d1461d1ae-df1eee12fa81812e0-12-aa259::"}}'   "{base_url}/provider_types/{provider_type_id}/provider_type_instances"
  • createProviderTypeInstanceOptions := securityAndComplianceCenterApiService.NewCreateProviderTypeInstanceOptions(
      providerTypeIdLink,
      "workload-protection-instance-1",
      map[string]interface{}{"anyKey": "anyValue"},
    )
    
    providerTypeInstanceItem, response, err := securityAndComplianceCenterApiService.CreateProviderTypeInstance(createProviderTypeInstanceOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(providerTypeInstanceItem, "", "  ")
    fmt.Println(string(b))
  • const params = {
      providerTypeId: providerTypeIdLink,
      name: 'workload-protection-instance-1',
      attributes: { wp_crn: 'crn:v1:staging:public:sysdig-secure:eu-gb:a/14q5SEnVIbwxzvP4AWPCjr2dJg5BAvPb:d1461d1ae-df1eee12fa81812e0-12-aa259::' },
    };
    
    let res;
    try {
      res = await securityAndComplianceCenterApiService.createProviderTypeInstance(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • response = security_and_compliance_center_api_service.create_provider_type_instance(
      provider_type_id=provider_type_id_link,
      name='workload-protection-instance-1',
      attributes={'wp_crn':'crn:v1:staging:public:sysdig-secure:eu-gb:a/14q5SEnVIbwxzvP4AWPCjr2dJg5BAvPb:d1461d1ae-df1eee12fa81812e0-12-aa259::'},
    )
    provider_type_instance_item = response.get_result()
    
    print(json.dumps(provider_type_instance_item, indent=2))
  • CreateProviderTypeInstanceOptions createProviderTypeInstanceOptions = new CreateProviderTypeInstanceOptions.Builder()
      .providerTypeId(providerTypeIdLink)
      .name("workload-protection-instance-1")
      .attributes(new java.util.HashMap<String, Object>())
      .build();
    
    Response<ProviderTypeInstanceItem> response = securityAndComplianceCenterApiService.createProviderTypeInstance(createProviderTypeInstanceOptions).execute();
    ProviderTypeInstanceItem providerTypeInstanceItem = response.getResult();
    
    System.out.println(providerTypeInstanceItem);

Response

A provider type instance

A provider type instance.

A provider type instance.

A provider type instance.

A provider type instance.

Status Code

  • The provider type instance was created successfully.

  • You are not authorized to make this request.

  • You are not authorized to make this request.

  • The specified resource could not be found.

  • The server has encountered an unexpected internal error.

Example responses
  • {
      "id": "7588190cce3c05ac8f7942ea597dafce",
      "type": "workload-protection",
      "name": "workload-protection-instance-1",
      "attributes": {
        "wp_crn": "crn:v1:staging:public:sysdig-secure:eu-gb:a/14q5SEnVIbwxzvP4AWPCjr2dJg5BAvPb:d1461d1ae-df1eee12fa81812e0-12-aa259::"
      },
      "created_at": "2023-07-24T13:14:18.884Z",
      "updated_at": "2023-07-24T13:14:18.884Z"
    }
  • {
      "id": "7588190cce3c05ac8f7942ea597dafce",
      "type": "workload-protection",
      "name": "workload-protection-instance-1",
      "attributes": {
        "wp_crn": "crn:v1:staging:public:sysdig-secure:eu-gb:a/14q5SEnVIbwxzvP4AWPCjr2dJg5BAvPb:d1461d1ae-df1eee12fa81812e0-12-aa259::"
      },
      "created_at": "2023-07-24T13:14:18.884Z",
      "updated_at": "2023-07-24T13:14:18.884Z"
    }
  • {
      "status_code": 401,
      "trace": "07b88c85-3b37-41e3-822d-999ab4399861",
      "errors": [
        {
          "code": "invalid_provider_type_instance_payload_format",
          "message": "The server could not understand the request due to invalid syntax",
          "cause": "payload must not be empty"
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "07b88c85-3b37-41e3-822d-999ab4399861",
      "errors": [
        {
          "code": "invalid_provider_type_instance_payload_format",
          "message": "The server could not understand the request due to invalid syntax",
          "cause": "payload must not be empty"
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "07b88c85-3b37-41e3-822d-999ab4399861",
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "cause": "bearer token is invalid: token is malformed: token contains an invalid number of segments",
          "target": {
            "type": "header",
            "name": "Authorization"
          }
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "07b88c85-3b37-41e3-822d-999ab4399861",
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "cause": "bearer token is invalid: token is malformed: token contains an invalid number of segments",
          "target": {
            "type": "header",
            "name": "Authorization"
          }
        }
      ]
    }
  • {
      "status_code": 404,
      "trace": "61ed26cd-9df9-4cd8-95d1-8fcb2906b5b6",
      "errors": [
        {
          "code": "provider_not_found",
          "message": "Provider not found",
          "cause": "Provider not found."
        }
      ]
    }
  • {
      "status_code": 404,
      "trace": "61ed26cd-9df9-4cd8-95d1-8fcb2906b5b6",
      "errors": [
        {
          "code": "provider_not_found",
          "message": "Provider not found",
          "cause": "Provider not found."
        }
      ]
    }
  • {
      "status_code": 500,
      "trace": "61ed26cd-9df9-4cd8-95d1-8fcb2906b5b6",
      "errors": [
        {
          "code": "internal_server_error",
          "message": "The server has encountered an unexpected internal error."
        }
      ]
    }
  • {
      "status_code": 500,
      "trace": "61ed26cd-9df9-4cd8-95d1-8fcb2906b5b6",
      "errors": [
        {
          "code": "internal_server_error",
          "message": "The server has encountered an unexpected internal error."
        }
      ]
    }

Delete a provider type instance

Remove a provider type instance. For more information about integrations, see Connecting Workload Protection.

Remove a provider type instance. For more information about integrations, see Connecting Workload Protection.

Remove a provider type instance. For more information about integrations, see Connecting Workload Protection.

Remove a provider type instance. For more information about integrations, see Connecting Workload Protection.

Remove a provider type instance. For more information about integrations, see Connecting Workload Protection.

DELETE /provider_types/{provider_type_id}/provider_type_instances/{provider_type_instance_id}
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) DeleteProviderTypeInstance(deleteProviderTypeInstanceOptions *DeleteProviderTypeInstanceOptions) (response *core.DetailedResponse, err error)
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) DeleteProviderTypeInstanceWithContext(ctx context.Context, deleteProviderTypeInstanceOptions *DeleteProviderTypeInstanceOptions) (response *core.DetailedResponse, err error)
deleteProviderTypeInstance(params)
delete_provider_type_instance(
        self,
        provider_type_id: str,
        provider_type_instance_id: str,
        *,
        x_correlation_id: str = None,
        x_request_id: str = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<Void> deleteProviderTypeInstance(DeleteProviderTypeInstanceOptions deleteProviderTypeInstanceOptions)

Request

Instantiate the DeleteProviderTypeInstanceOptions struct and set the fields to provide parameter values for the DeleteProviderTypeInstance method.

Use the DeleteProviderTypeInstanceOptions.Builder to create a DeleteProviderTypeInstanceOptions object that contains the parameter values for the deleteProviderTypeInstance method.

Custom Headers

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

Path Parameters

  • The provider type ID.

    Possible values: 32 ≤ length ≤ 36, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The provider type instance ID.

    Possible values: 32 ≤ length ≤ 36, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

WithContext method only

The DeleteProviderTypeInstance options.

parameters

  • The provider type ID.

    Possible values: 32 ≤ length ≤ 36, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The provider type instance ID.

    Possible values: 32 ≤ length ≤ 36, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

parameters

  • The provider type ID.

    Possible values: 32 ≤ length ≤ 36, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The provider type instance ID.

    Possible values: 32 ≤ length ≤ 36, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

The deleteProviderTypeInstance options.

  • curl -X DELETE --location --header "Authorization: Bearer {iam_token}"   "{base_url}/provider_types/{provider_type_id}/provider_type_instances/{provider_type_instance_id}"
  • deleteProviderTypeInstanceOptions := securityAndComplianceCenterApiService.NewDeleteProviderTypeInstanceOptions(
      providerTypeIdLink,
      providerTypeInstanceIdLink,
    )
    
    response, err := securityAndComplianceCenterApiService.DeleteProviderTypeInstance(deleteProviderTypeInstanceOptions)
    if err != nil {
      panic(err)
    }
    if response.StatusCode != 204 {
      fmt.Printf("\nUnexpected response status code received from DeleteProviderTypeInstance(): %d\n", response.StatusCode)
    }
  • const params = {
      providerTypeId: providerTypeIdLink,
      providerTypeInstanceId: providerTypeInstanceIdLink,
    };
    
    try {
      await securityAndComplianceCenterApiService.deleteProviderTypeInstance(params);
    } catch (err) {
      console.warn(err);
    }
  • response = security_and_compliance_center_api_service.delete_provider_type_instance(
      provider_type_id=provider_type_id_link,
      provider_type_instance_id=provider_type_instance_id_link,
    )
  • DeleteProviderTypeInstanceOptions deleteProviderTypeInstanceOptions = new DeleteProviderTypeInstanceOptions.Builder()
      .providerTypeId(providerTypeIdLink)
      .providerTypeInstanceId(providerTypeInstanceIdLink)
      .build();
    
    Response<Void> response = securityAndComplianceCenterApiService.deleteProviderTypeInstance(deleteProviderTypeInstanceOptions).execute();

Response

Status Code

  • Successfully removed specific instance of a provider type

  • You are not authorized to make this request.

  • The specified resource could not be found.

  • The server has encountered an unexpected internal error.

Example responses
  • {
      "status_code": 401,
      "trace": "07b88c85-3b37-41e3-822d-999ab4399861",
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "cause": "bearer token is invalid: token is malformed: token contains an invalid number of segments",
          "target": {
            "type": "header",
            "name": "Authorization"
          }
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "07b88c85-3b37-41e3-822d-999ab4399861",
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "cause": "bearer token is invalid: token is malformed: token contains an invalid number of segments",
          "target": {
            "type": "header",
            "name": "Authorization"
          }
        }
      ]
    }
  • {
      "status_code": 404,
      "trace": "61ed26cd-9df9-4cd8-95d1-8fcb2906b5b6",
      "errors": [
        {
          "code": "provider_not_found",
          "message": "Provider not found",
          "cause": "Provider not found."
        }
      ]
    }
  • {
      "status_code": 404,
      "trace": "61ed26cd-9df9-4cd8-95d1-8fcb2906b5b6",
      "errors": [
        {
          "code": "provider_not_found",
          "message": "Provider not found",
          "cause": "Provider not found."
        }
      ]
    }
  • {
      "status_code": 500,
      "trace": "61ed26cd-9df9-4cd8-95d1-8fcb2906b5b6",
      "errors": [
        {
          "code": "internal_server_error",
          "message": "The server has encountered an unexpected internal error."
        }
      ]
    }
  • {
      "status_code": 500,
      "trace": "61ed26cd-9df9-4cd8-95d1-8fcb2906b5b6",
      "errors": [
        {
          "code": "internal_server_error",
          "message": "The server has encountered an unexpected internal error."
        }
      ]
    }

Get a provider type instance

Retrieve a provider type instance by specifying the provider type ID, and Security and Compliance Center instance ID. For more information about integrations, see Connecting Workload Protection.

Retrieve a provider type instance by specifying the provider type ID, and Security and Compliance Center instance ID. For more information about integrations, see Connecting Workload Protection.

Retrieve a provider type instance by specifying the provider type ID, and Security and Compliance Center instance ID. For more information about integrations, see Connecting Workload Protection.

Retrieve a provider type instance by specifying the provider type ID, and Security and Compliance Center instance ID. For more information about integrations, see Connecting Workload Protection.

Retrieve a provider type instance by specifying the provider type ID, and Security and Compliance Center instance ID. For more information about integrations, see Connecting Workload Protection.

GET /provider_types/{provider_type_id}/provider_type_instances/{provider_type_instance_id}
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) GetProviderTypeInstance(getProviderTypeInstanceOptions *GetProviderTypeInstanceOptions) (result *ProviderTypeInstanceItem, response *core.DetailedResponse, err error)
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) GetProviderTypeInstanceWithContext(ctx context.Context, getProviderTypeInstanceOptions *GetProviderTypeInstanceOptions) (result *ProviderTypeInstanceItem, response *core.DetailedResponse, err error)
getProviderTypeInstance(params)
get_provider_type_instance(
        self,
        provider_type_id: str,
        provider_type_instance_id: str,
        *,
        x_correlation_id: str = None,
        x_request_id: str = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<ProviderTypeInstanceItem> getProviderTypeInstance(GetProviderTypeInstanceOptions getProviderTypeInstanceOptions)

Request

Instantiate the GetProviderTypeInstanceOptions struct and set the fields to provide parameter values for the GetProviderTypeInstance method.

Use the GetProviderTypeInstanceOptions.Builder to create a GetProviderTypeInstanceOptions object that contains the parameter values for the getProviderTypeInstance method.

Custom Headers

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

Path Parameters

  • The provider type ID.

    Possible values: 32 ≤ length ≤ 36, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The provider type instance ID.

    Possible values: 32 ≤ length ≤ 36, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

WithContext method only

The GetProviderTypeInstance options.

parameters

  • The provider type ID.

    Possible values: 32 ≤ length ≤ 36, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The provider type instance ID.

    Possible values: 32 ≤ length ≤ 36, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

parameters

  • The provider type ID.

    Possible values: 32 ≤ length ≤ 36, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The provider type instance ID.

    Possible values: 32 ≤ length ≤ 36, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

The getProviderTypeInstance options.

  • curl -X GET --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/provider_types/{provider_type_id}/provider_type_instances/{provider_type_instance_id}"
  • getProviderTypeInstanceOptions := securityAndComplianceCenterApiService.NewGetProviderTypeInstanceOptions(
      providerTypeIdLink,
      providerTypeInstanceIdLink,
    )
    
    providerTypeInstanceItem, response, err := securityAndComplianceCenterApiService.GetProviderTypeInstance(getProviderTypeInstanceOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(providerTypeInstanceItem, "", "  ")
    fmt.Println(string(b))
  • const params = {
      providerTypeId: providerTypeIdLink,
      providerTypeInstanceId: providerTypeInstanceIdLink,
    };
    
    let res;
    try {
      res = await securityAndComplianceCenterApiService.getProviderTypeInstance(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • response = security_and_compliance_center_api_service.get_provider_type_instance(
      provider_type_id=provider_type_id_link,
      provider_type_instance_id=provider_type_instance_id_link,
    )
    provider_type_instance_item = response.get_result()
    
    print(json.dumps(provider_type_instance_item, indent=2))
  • GetProviderTypeInstanceOptions getProviderTypeInstanceOptions = new GetProviderTypeInstanceOptions.Builder()
      .providerTypeId(providerTypeIdLink)
      .providerTypeInstanceId(providerTypeInstanceIdLink)
      .build();
    
    Response<ProviderTypeInstanceItem> response = securityAndComplianceCenterApiService.getProviderTypeInstance(getProviderTypeInstanceOptions).execute();
    ProviderTypeInstanceItem providerTypeInstanceItem = response.getResult();
    
    System.out.println(providerTypeInstanceItem);

Response

A provider type instance

A provider type instance.

A provider type instance.

A provider type instance.

A provider type instance.

Status Code

  • The provider type instance was successfully retrieved.

  • You are not authorized to make this request.

  • The specified resource could not be found.

  • The server has encountered an unexpected internal error.

Example responses
  • {
      "id": "7588190cce3c05ac8f7942ea597dafce",
      "type": "workload-protection",
      "name": "workload-protection-instance-1",
      "attributes": {
        "wp_crn": "crn:v1:staging:public:sysdig-secure:eu-gb:a/14q5SEnVIbwxzvP4AWPCjr2dJg5BAvPb:d1461d1ae-df1eee12fa81812e0-12-aa259::"
      },
      "created_at": "2023-07-25T04:44:42.733Z",
      "updated_at": "2023-07-25T04:44:42.733Z"
    }
  • {
      "id": "7588190cce3c05ac8f7942ea597dafce",
      "type": "workload-protection",
      "name": "workload-protection-instance-1",
      "attributes": {
        "wp_crn": "crn:v1:staging:public:sysdig-secure:eu-gb:a/14q5SEnVIbwxzvP4AWPCjr2dJg5BAvPb:d1461d1ae-df1eee12fa81812e0-12-aa259::"
      },
      "created_at": "2023-07-25T04:44:42.733Z",
      "updated_at": "2023-07-25T04:44:42.733Z"
    }
  • {
      "status_code": 401,
      "trace": "07b88c85-3b37-41e3-822d-999ab4399861",
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "cause": "bearer token is invalid: token is malformed: token contains an invalid number of segments",
          "target": {
            "type": "header",
            "name": "Authorization"
          }
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "07b88c85-3b37-41e3-822d-999ab4399861",
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "cause": "bearer token is invalid: token is malformed: token contains an invalid number of segments",
          "target": {
            "type": "header",
            "name": "Authorization"
          }
        }
      ]
    }
  • {
      "status_code": 404,
      "trace": "61ed26cd-9df9-4cd8-95d1-8fcb2906b5b6",
      "errors": [
        {
          "code": "provider_not_found",
          "message": "Provider not found",
          "cause": "Provider not found."
        }
      ]
    }
  • {
      "status_code": 404,
      "trace": "61ed26cd-9df9-4cd8-95d1-8fcb2906b5b6",
      "errors": [
        {
          "code": "provider_not_found",
          "message": "Provider not found",
          "cause": "Provider not found."
        }
      ]
    }
  • {
      "status_code": 500,
      "trace": "61ed26cd-9df9-4cd8-95d1-8fcb2906b5b6",
      "errors": [
        {
          "code": "internal_server_error",
          "message": "The server has encountered an unexpected internal error."
        }
      ]
    }
  • {
      "status_code": 500,
      "trace": "61ed26cd-9df9-4cd8-95d1-8fcb2906b5b6",
      "errors": [
        {
          "code": "internal_server_error",
          "message": "The server has encountered an unexpected internal error."
        }
      ]
    }

Update a provider type instance

Update a provider type instance. For more information about integrations, see Connecting Workload Protection.

Update a provider type instance. For more information about integrations, see Connecting Workload Protection.

Update a provider type instance. For more information about integrations, see Connecting Workload Protection.

Update a provider type instance. For more information about integrations, see Connecting Workload Protection.

Update a provider type instance. For more information about integrations, see Connecting Workload Protection.

PATCH /provider_types/{provider_type_id}/provider_type_instances/{provider_type_instance_id}
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) UpdateProviderTypeInstance(updateProviderTypeInstanceOptions *UpdateProviderTypeInstanceOptions) (result *ProviderTypeInstanceItem, response *core.DetailedResponse, err error)
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) UpdateProviderTypeInstanceWithContext(ctx context.Context, updateProviderTypeInstanceOptions *UpdateProviderTypeInstanceOptions) (result *ProviderTypeInstanceItem, response *core.DetailedResponse, err error)
updateProviderTypeInstance(params)
update_provider_type_instance(
        self,
        provider_type_id: str,
        provider_type_instance_id: str,
        update_provider_type_instance_request: 'UpdateProviderTypeInstanceRequest',
        *,
        x_correlation_id: str = None,
        x_request_id: str = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<ProviderTypeInstanceItem> updateProviderTypeInstance(UpdateProviderTypeInstanceOptions updateProviderTypeInstanceOptions)

Request

Instantiate the UpdateProviderTypeInstanceOptions struct and set the fields to provide parameter values for the UpdateProviderTypeInstance method.

Use the UpdateProviderTypeInstanceOptions.Builder to create a UpdateProviderTypeInstanceOptions object that contains the parameter values for the updateProviderTypeInstance method.

Custom Headers

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

Path Parameters

  • The provider type ID.

    Possible values: 32 ≤ length ≤ 36, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The provider type instance ID.

    Possible values: 32 ≤ length ≤ 36, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

Provider type instance object to be patched

WithContext method only

The UpdateProviderTypeInstance options.

parameters

  • The provider type ID.

    Possible values: 32 ≤ length ≤ 36, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The provider type instance ID.

    Possible values: 32 ≤ length ≤ 36, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The provider type instance payload for patching name.

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

parameters

  • The provider type ID.

    Possible values: 32 ≤ length ≤ 36, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The provider type instance ID.

    Possible values: 32 ≤ length ≤ 36, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The provider type instance payload for patching name.

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

The updateProviderTypeInstance options.

  • curl -X PATCH --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{}'   "{base_url}/provider_types/{provider_type_id}/provider_type_instances/{provider_type_instance_id}"
  • updateProviderTypeInstanceRequestModel := &securityandcompliancecenterapiv3.UpdateProviderTypeInstanceRequestProviderTypeInstancePrototypeForPatchingName{
      Name: core.StringPtr("workload-protection-instance-1"),
    }
    
    updateProviderTypeInstanceOptions := securityAndComplianceCenterApiService.NewUpdateProviderTypeInstanceOptions(
      providerTypeIdLink,
      providerTypeInstanceIdLink,
      updateProviderTypeInstanceRequestModel,
    )
    
    providerTypeInstanceItem, response, err := securityAndComplianceCenterApiService.UpdateProviderTypeInstance(updateProviderTypeInstanceOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(providerTypeInstanceItem, "", "  ")
    fmt.Println(string(b))
  • // Request models needed by this operation.
    
    // UpdateProviderTypeInstanceRequestProviderTypeInstancePrototypeForPatchingName
    const updateProviderTypeInstanceRequestModel = {
      name: 'workload-protection-instance-1',
    };
    
    const params = {
      providerTypeId: providerTypeIdLink,
      providerTypeInstanceId: providerTypeInstanceIdLink,
      updateProviderTypeInstanceRequest: updateProviderTypeInstanceRequestModel,
    };
    
    let res;
    try {
      res = await securityAndComplianceCenterApiService.updateProviderTypeInstance(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • update_provider_type_instance_request_model = {
      'name': 'workload-protection-instance-1',
    }
    
    response = security_and_compliance_center_api_service.update_provider_type_instance(
      provider_type_id=provider_type_id_link,
      provider_type_instance_id=provider_type_instance_id_link,
      update_provider_type_instance_request=update_provider_type_instance_request_model,
    )
    provider_type_instance_item = response.get_result()
    
    print(json.dumps(provider_type_instance_item, indent=2))
  • UpdateProviderTypeInstanceRequestProviderTypeInstancePrototypeForPatchingName updateProviderTypeInstanceRequestModel = new UpdateProviderTypeInstanceRequestProviderTypeInstancePrototypeForPatchingName.Builder()
      .name("workload-protection-instance-1")
      .build();
    UpdateProviderTypeInstanceOptions updateProviderTypeInstanceOptions = new UpdateProviderTypeInstanceOptions.Builder()
      .providerTypeId(providerTypeIdLink)
      .providerTypeInstanceId(providerTypeInstanceIdLink)
      .updateProviderTypeInstanceRequest(updateProviderTypeInstanceRequestModel)
      .build();
    
    Response<ProviderTypeInstanceItem> response = securityAndComplianceCenterApiService.updateProviderTypeInstance(updateProviderTypeInstanceOptions).execute();
    ProviderTypeInstanceItem providerTypeInstanceItem = response.getResult();
    
    System.out.println(providerTypeInstanceItem);

Response

A provider type instance

A provider type instance.

A provider type instance.

A provider type instance.

A provider type instance.

Status Code

  • Successfully patched provider type instance

  • You are not authorized to make this request.

  • The specified resource could not be found.

  • The server has encountered an unexpected internal error.

Example responses
  • {
      "id": "7588190cce3c05ac8f7942ea597dafce",
      "type": "workload-protection",
      "name": "workload-protection-instance-1",
      "attributes": {
        "wp_crn": "crn:v1:staging:public:sysdig-secure:eu-gb:a/14q5SEnVIbwxzvP4AWPCjr2dJg5BAvPb:d1461d1ae-df1eee12fa81812e0-12-aa259::"
      },
      "created_at": "2023-07-24T13:14:18.884Z",
      "updated_at": "2023-07-24T13:14:18.884Z"
    }
  • {
      "id": "7588190cce3c05ac8f7942ea597dafce",
      "type": "workload-protection",
      "name": "workload-protection-instance-1",
      "attributes": {
        "wp_crn": "crn:v1:staging:public:sysdig-secure:eu-gb:a/14q5SEnVIbwxzvP4AWPCjr2dJg5BAvPb:d1461d1ae-df1eee12fa81812e0-12-aa259::"
      },
      "created_at": "2023-07-24T13:14:18.884Z",
      "updated_at": "2023-07-24T13:14:18.884Z"
    }
  • {
      "status_code": 401,
      "trace": "07b88c85-3b37-41e3-822d-999ab4399861",
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "cause": "bearer token is invalid: token is malformed: token contains an invalid number of segments",
          "target": {
            "type": "header",
            "name": "Authorization"
          }
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "07b88c85-3b37-41e3-822d-999ab4399861",
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "cause": "bearer token is invalid: token is malformed: token contains an invalid number of segments",
          "target": {
            "type": "header",
            "name": "Authorization"
          }
        }
      ]
    }
  • {
      "status_code": 404,
      "trace": "61ed26cd-9df9-4cd8-95d1-8fcb2906b5b6",
      "errors": [
        {
          "code": "provider_not_found",
          "message": "Provider not found",
          "cause": "Provider not found."
        }
      ]
    }
  • {
      "status_code": 404,
      "trace": "61ed26cd-9df9-4cd8-95d1-8fcb2906b5b6",
      "errors": [
        {
          "code": "provider_not_found",
          "message": "Provider not found",
          "cause": "Provider not found."
        }
      ]
    }
  • {
      "status_code": 500,
      "trace": "61ed26cd-9df9-4cd8-95d1-8fcb2906b5b6",
      "errors": [
        {
          "code": "internal_server_error",
          "message": "The server has encountered an unexpected internal error."
        }
      ]
    }
  • {
      "status_code": 500,
      "trace": "61ed26cd-9df9-4cd8-95d1-8fcb2906b5b6",
      "errors": [
        {
          "code": "internal_server_error",
          "message": "The server has encountered an unexpected internal error."
        }
      ]
    }

List instances of provider types

Get a list of all provider types' instances. For more information about integrations, see Connecting Workload Protection.

Get a list of all provider types' instances. For more information about integrations, see Connecting Workload Protection.

Get a list of all provider types' instances. For more information about integrations, see Connecting Workload Protection.

Get a list of all provider types' instances. For more information about integrations, see Connecting Workload Protection.

Get a list of all provider types' instances. For more information about integrations, see Connecting Workload Protection.

GET /provider_types_instances
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) GetProviderTypesInstances(getProviderTypesInstancesOptions *GetProviderTypesInstancesOptions) (result *ProviderTypesInstancesResponse, response *core.DetailedResponse, err error)
(securityAndComplianceCenterApi *SecurityAndComplianceCenterApiV3) GetProviderTypesInstancesWithContext(ctx context.Context, getProviderTypesInstancesOptions *GetProviderTypesInstancesOptions) (result *ProviderTypesInstancesResponse, response *core.DetailedResponse, err error)
getProviderTypesInstances(params)
get_provider_types_instances(
        self,
        *,
        x_correlation_id: str = None,
        x_request_id: str = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<ProviderTypesInstancesResponse> getProviderTypesInstances(GetProviderTypesInstancesOptions getProviderTypesInstancesOptions)

Request

Instantiate the GetProviderTypesInstancesOptions struct and set the fields to provide parameter values for the GetProviderTypesInstances method.

Use the GetProviderTypesInstancesOptions.Builder to create a GetProviderTypesInstancesOptions object that contains the parameter values for the getProviderTypesInstances method.

Custom Headers

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

WithContext method only

The GetProviderTypesInstances options.

parameters

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

parameters

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this headers is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression /^[a-zA-Z0-9 ,\\-_]+$/

The getProviderTypesInstances options.

  • curl -X GET --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/provider_types_instances"
  • getProviderTypesInstancesOptions := securityAndComplianceCenterApiService.NewGetProviderTypesInstancesOptions()
    
    providerTypesInstancesResponse, response, err := securityAndComplianceCenterApiService.GetProviderTypesInstances(getProviderTypesInstancesOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(providerTypesInstancesResponse, "", "  ")
    fmt.Println(string(b))
  • let res;
    try {
      res = await securityAndComplianceCenterApiService.getProviderTypesInstances({});
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • response = security_and_compliance_center_api_service.get_provider_types_instances()
    provider_types_instances_response = response.get_result()
    
    print(json.dumps(provider_types_instances_response, indent=2))
  • GetProviderTypesInstancesOptions getProviderTypesInstancesOptions = new GetProviderTypesInstancesOptions.Builder()
      .build();
    
    Response<ProviderTypesInstancesResponse> response = securityAndComplianceCenterApiService.getProviderTypesInstances(getProviderTypesInstancesOptions).execute();
    ProviderTypesInstancesResponse providerTypesInstancesResponse = response.getResult();
    
    System.out.println(providerTypesInstancesResponse);

Response

Provider types instances response.

Provider types instances response.

Examples:
View

Provider types instances response.

Examples:
View

Provider types instances response.

Examples:
View

Provider types instances response.

Examples:
View

Status Code

  • Successfully retrieved list of instances for all provider types.

  • You are not authorized to make this request.

  • The specified resource could not be found.

  • The server has encountered an unexpected internal error.

Example responses
  • {
      "providers_types_instances": [
        {
          "id": "7588190cce3c05ac8f7942ea597dafce",
          "type": "workload-protection",
          "name": "workload-protection-instance-1",
          "attributes": {
            "wp_crn": "crn:v1:staging:public:sysdig-secure:eu-gb:a/14q5SEnVIbwxzvP4AWPCjr2dJg5BAvPb:d1461d1ae-df1eee12fa81812e0-12-aa259::"
          },
          "created_at": "2023-07-24T13:14:18.884Z",
          "updated_at": "2023-07-24T13:14:18.884Z"
        }
      ]
    }
  • {
      "providers_types_instances": [
        {
          "id": "7588190cce3c05ac8f7942ea597dafce",
          "type": "workload-protection",
          "name": "workload-protection-instance-1",
          "attributes": {
            "wp_crn": "crn:v1:staging:public:sysdig-secure:eu-gb:a/14q5SEnVIbwxzvP4AWPCjr2dJg5BAvPb:d1461d1ae-df1eee12fa81812e0-12-aa259::"
          },
          "created_at": "2023-07-24T13:14:18.884Z",
          "updated_at": "2023-07-24T13:14:18.884Z"
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "07b88c85-3b37-41e3-822d-999ab4399861",
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "cause": "bearer token is invalid: token is malformed: token contains an invalid number of segments",
          "target": {
            "type": "header",
            "name": "Authorization"
          }
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "07b88c85-3b37-41e3-822d-999ab4399861",
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "cause": "bearer token is invalid: token is malformed: token contains an invalid number of segments",
          "target": {
            "type": "header",
            "name": "Authorization"
          }
        }
      ]
    }
  • {
      "status_code": 404,
      "trace": "61ed26cd-9df9-4cd8-95d1-8fcb2906b5b6",
      "errors": [
        {
          "code": "provider_not_found",
          "message": "Provider not found",
          "cause": "Provider not found."
        }
      ]
    }
  • {
      "status_code": 404,
      "trace": "61ed26cd-9df9-4cd8-95d1-8fcb2906b5b6",
      "errors": [
        {
          "code": "provider_not_found",
          "message": "Provider not found",
          "cause": "Provider not found."
        }
      ]
    }
  • {
      "status_code": 500,
      "trace": "61ed26cd-9df9-4cd8-95d1-8fcb2906b5b6",
      "errors": [
        {
          "code": "internal_server_error",
          "message": "The server has encountered an unexpected internal error."
        }
      ]
    }
  • {
      "status_code": 500,
      "trace": "61ed26cd-9df9-4cd8-95d1-8fcb2906b5b6",
      "errors": [
        {
          "code": "internal_server_error",
          "message": "The server has encountered an unexpected internal error."
        }
      ]
    }

Delete a predefined rule

Delete a predefined rule that you no longer require.

DELETE /predefined_rules/{rule_id}

Request

Custom Headers

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

Path Parameters

  • The ID of the corresponding rule.

    Possible values: length = 41, Value must match regular expression rule-[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}

Response

Status Code

  • The rule was deleted successfully.

  • You are not authorized to make this request.

  • Forbidden. You are not allowed to make this request.

  • The specified resource could not be found.

Example responses
  • {
      "status_code": 401,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "The request could not be authorized.",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }
  • {
      "status_code": 404,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "not_found",
          "message": "The requested resource was not found\"",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }

Get a predefined rule

Retrieve a predefined rule that you use to evaluate your resources.

GET /predefined_rules/{rule_id}

Request

Custom Headers

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

Path Parameters

  • The ID of the corresponding rule.

    Possible values: length = 41, Value must match regular expression rule-[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}

Response

The rule response that corresponds to an account instance.

Status Code

  • The rule was retrieved successfully.

  • You are not authorized to make this request.

  • Forbidden. You are not allowed to make this request.

  • The specified resource could not be found.

Example responses
  • {
      "created_on": "2022-09-27T13:27:04.000Z",
      "created_by": "IBM",
      "updated_on": "2023-03-10T13:07:12.000Z",
      "updated_by": "IBM",
      "id": "rule-0b082506-2481-4212-a150-d198357fcc3a",
      "account_id": "IBM",
      "description": "Check whether App ID multifactor authentication (MFA) is enabled for Cloud Directory users",
      "type": "system_defined",
      "version": "1.0.1",
      "target": {
        "service_name": "appid",
        "service_display_name": "App ID",
        "resource_kind": "cloud-directory-configuration",
        "additional_target_attributes": []
      },
      "required_config": {
        "and": [
          {
            "property": "mfa_enabled",
            "operator": "is_true",
            "value": true
          }
        ]
      },
      "labels": []
    }
  • {
      "status_code": 401,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "The request could not be authorized.",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }
  • {
      "status_code": 404,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "not_found",
          "message": "The requested resource was not found\"",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }

Update a predefined rule

Update a predefined rule that you use to evaluate your resources.

PUT /predefined_rules/{rule_id}

Request

Custom Headers

  • This field 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.

    To find the Etag value, run a GET request on the resource that you want to modify, and check the response headers.

    Possible values: 4 ≤ length ≤ 128, Value must match regular expression W/"[^"]*"

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

Path Parameters

  • The ID of the corresponding rule.

    Possible values: length = 41, Value must match regular expression rule-[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}

The request body to update a predefined rule.

Examples:
View

Response

The rule response that corresponds to an account instance.

Status Code

  • The rule was updated successfully.

  • You are not authorized to make this request.

  • Forbidden. You are not allowed to make this request.

  • The specified resource could not be found.

Example responses
  • {
      "created_on": "2022-10-04T12:30:32.000Z",
      "created_by": "IBM",
      "updated_on": "2023-04-21T01:02:02.000Z",
      "updated_by": "IBM",
      "id": "rule-0c953c6b-f208-4526-9758-a88ecd2922b1",
      "account_id": "IBM",
      "description": "IBM Cloud assigns identifiers that identify individuals, groups, roles, and devices.",
      "type": "system_defined",
      "version": "1.0.1",
      "target": {
        "service_name": "iam-identity",
        "service_display_name": "IAM Identity Service",
        "resource_kind": "accountsettings",
        "additional_target_attributes": []
      },
      "required_config": {
        "and": [
          {
            "property": "ibm_iam_id_assign_identifier_users",
            "operator": "is_true",
            "value": true
          }
        ]
      },
      "labels": []
    }
  • {
      "status_code": 401,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "The request could not be authorized.",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }
  • {
      "status_code": 404,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "not_found",
          "message": "The requested resource was not found\"",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }

List services

List all the services that you use to evaluate the configuration of your resources for security and compliance. Learn more.

GET /services

Request

Custom Headers

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

Response

The services.

Status Code

  • The services were listed successfully.

  • You are not authorized to make this request.

  • Forbidden. You are not allowed to make this request.

  • The specified resource could not be found.

Example responses
  • {
      "limit": 100,
      "offset": 0,
      "total_count": 1,
      "first": {
        "href": "https://us-south.compliance.cloud.ibm.com/v3/services?limit=100"
      },
      "last": {
        "href": "https://us-south.compliance.cloud.ibm.com/v3/services?offset=0&limit=100"
      },
      "services": [
        {
          "created_on": "2022-10-04T12:17:12.000Z",
          "created_by": "iam-ServiceId-cc1069ec-bbd3-480f-87ce-eea46b189232",
          "updated_on": "2023-04-20T18:35:54.000Z",
          "updated_by": "iam-ServiceId-cc1069ec-bbd3-480f-87ce-eea46b189232",
          "service_name": "appid",
          "service_display_name": "App ID",
          "description": "App ID",
          "monitoring_enabled": true,
          "enforcement_enabled": true,
          "service_listing_enabled": true,
          "config_information_point": {
            "type": "sync",
            "endpoints": [
              {
                "host": "http://papia.compliance.svc.cluster.local:8080",
                "path": "/papia/appid/v1/config",
                "region": "global",
                "advisory_call_limit": 500
              }
            ]
          },
          "supported_configs": [
            {
              "resource_kind": "instance",
              "additional_target_attributes": [
                {
                  "name": "resource_name",
                  "description": "The service instance name."
                }
              ],
              "properties": [
                {
                  "name": "monitor_runtime_activity_enabled",
                  "description": "A boolean that enables, or disables the monitoring of runtime activity that is made by application users.",
                  "type": "boolean"
                },
                {
                  "name": "user_profile_updates_enabled",
                  "description": "A boolean value that represents the status of user profile updates.",
                  "type": "boolean"
                },
                {
                  "name": "any_social_identity_enabled",
                  "description": "A boolean value that represents the configuration status of identity providers (IdPs).",
                  "type": "boolean"
                }
              ],
              "description": "The App ID instance.",
              "cip_requires_service_instance": true,
              "resource_group_support": true,
              "tagging_support": true,
              "inherit_tags": false
            },
            {
              "resource_kind": "cloud-directory-advanced-password-policy",
              "additional_target_attributes": [
                {
                  "name": "resource_name",
                  "description": "The service instance name."
                }
              ],
              "properties": [
                {
                  "name": "password_reuse_policy_enabled",
                  "description": "A boolean value that represents whether password reuse policy is enabled, or not.",
                  "type": "boolean"
                },
                {
                  "name": "lockout_policy_config_minutes",
                  "description": "A numeric value that represents the specified time of the password lockout policy in minutes.",
                  "type": "numeric"
                }
              ],
              "description": "The App ID Cloud Directory password policies.",
              "cip_requires_service_instance": true,
              "resource_group_support": true,
              "tagging_support": false,
              "inherit_tags": true
            }
          ]
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "The request could not be authorized.",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }
  • {
      "status_code": 404,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "not_found",
          "message": "The requested resource was not found\"",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }

Create a service

Create a service configuration that you want to evaluate. Learn more.

POST /services

Request

Custom Headers

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

The request body to create a service.

Examples:
View

Response

The response body for creating a service instance.

Status Code

  • The service was created successfully.

  • You are not authorized to make this request.

  • Forbidden. You are not allowed to make this request.

  • The specified resource could not be found.

Example responses
  • {
      "created_on": "2022-08-02T05:47:21.000Z",
      "created_by": "iam-ServiceId-cc1069ec-bbd3-480f-87ce-eea46b189232",
      "updated_on": "2023-04-27T12:22:33.000Z",
      "updated_by": "iam-ServiceId-cc1069ec-bbd3-480f-87ce-eea46b189232",
      "service_name": "my-test-service",
      "description": "My service description.",
      "monitoring_enabled": true,
      "enforcement_enabled": false,
      "service_listing_enabled": true,
      "config_information_point": {
        "type": "sync",
        "endpoints": [
          {
            "host": "http://test-host-1",
            "path": "test-path-1",
            "region": "region-1",
            "advisory_call_limit": 10
          },
          {
            "host": "http://test-host-2",
            "path": "test-path-2",
            "region": "region-2",
            "advisory_call_limit": 10
          }
        ]
      },
      "supported_configs": [
        {
          "resource_kind": "resource_A",
          "additional_target_attributes": [],
          "properties": [
            {
              "name": "custom_attr_1",
              "description": "The numeric value.",
              "type": "numeric"
            },
            {
              "name": "custom_attr_2",
              "description": "The boolean value.",
              "type": "boolean"
            },
            {
              "name": "custom_attr_3",
              "description": "The string value.",
              "type": "string"
            },
            {
              "name": "custom_attr_4",
              "description": "The array value.",
              "type": "string_list"
            }
          ],
          "description": "The resource_A description.",
          "cip_requires_service_instance": true,
          "resource_group_support": true
        },
        {
          "resource_kind": "resource_B",
          "additional_target_attributes": [],
          "properties": [
            {
              "name": "custom_attr_1",
              "description": "The numeric value.",
              "type": "numeric"
            },
            {
              "name": "complex_property",
              "description": "The boolean value.",
              "type": "boolean",
              "properties": [
                {
                  "name": "nested_attr_1",
                  "description": "The numeric value.",
                  "type": "numeric"
                },
                {
                  "name": "nested_attr_2",
                  "description": "The numeric value.",
                  "type": "numeric"
                }
              ]
            }
          ],
          "description": "The resource_B description.",
          "cip_requires_service_instance": true,
          "resource_group_support": true
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "The request could not be authorized.",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }
  • {
      "status_code": 404,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "not_found",
          "message": "The requested resource was not found\"",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }

Delete a service

Delete a service configuration that you no longer require. Learn more.

DELETE /services/{services_name}

Request

Custom Headers

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

Path Parameters

  • The service name of the corresponding service.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [(a-zA-Z)(?=.|\-)]+|[a-zA-Z]+

    Example: cloud-object-storage

Response

Status Code

  • The service was deleted successfully.

  • You are not authorized to make this request.

  • Forbidden. You are not allowed to make this request.

Example responses
  • {
      "status_code": 401,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "The request could not be authorized.",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }

Get a service

Retrieve a service configuration that you monitor. Learn more.

GET /services/{services_name}

Request

Custom Headers

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

Path Parameters

  • The service name of the corresponding service.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [(a-zA-Z)(?=.|\-)]+|[a-zA-Z]+

    Example: cloud-object-storage

Response

The response body for creating a service instance.

Status Code

  • The service was retrieved successfully.

  • You are not authorized to make this request.

  • Forbidden. You are not allowed to make this request.

  • The specified resource could not be found.

Example responses
  • {
      "created_on": "2022-08-02T05:47:21.000Z",
      "created_by": "iam-ServiceId-cc1069ec-bbd3-480f-87ce-eea46b189232",
      "updated_on": "2023-04-27T12:22:33.000Z",
      "updated_by": "iam-ServiceId-cc1069ec-bbd3-480f-87ce-eea46b189232",
      "service_name": "my-test-service",
      "description": "My service description.",
      "monitoring_enabled": true,
      "enforcement_enabled": false,
      "service_listing_enabled": true,
      "config_information_point": {
        "type": "sync",
        "endpoints": [
          {
            "host": "http://test-host-1",
            "path": "test-path-1",
            "region": "region-1",
            "advisory_call_limit": 10
          },
          {
            "host": "http://test-host-2",
            "path": "test-path-2",
            "region": "region-2",
            "advisory_call_limit": 10
          }
        ]
      },
      "supported_configs": [
        {
          "resource_kind": "resource_A",
          "additional_target_attributes": [],
          "properties": [
            {
              "name": "custom_attr_1",
              "description": "The numeric value.",
              "type": "numeric"
            },
            {
              "name": "custom_attr_2",
              "description": "The boolean value.",
              "type": "boolean"
            },
            {
              "name": "custom_attr_3",
              "description": "The string value.",
              "type": "string"
            },
            {
              "name": "custom_attr_4",
              "description": "The array value.",
              "type": "string_list"
            }
          ],
          "description": "The resource_A description.",
          "cip_requires_service_instance": true,
          "resource_group_support": true
        },
        {
          "resource_kind": "resource_B",
          "additional_target_attributes": [],
          "properties": [
            {
              "name": "custom_attr_1",
              "description": "The numeric value.",
              "type": "numeric"
            },
            {
              "name": "complex_property",
              "description": "The boolean value.",
              "type": "boolean",
              "properties": [
                {
                  "name": "nested_attr_1",
                  "description": "The numeric value.",
                  "type": "numeric"
                },
                {
                  "name": "nested_attr_2",
                  "description": "The numeric value.",
                  "type": "string_list"
                }
              ]
            }
          ],
          "description": "The resource_B description.",
          "cip_requires_service_instance": true,
          "resource_group_support": true
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "The request could not be authorized.",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }
  • {
      "status_code": 404,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "not_found",
          "message": "The requested resource was not found\"",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }

Update a service

Update a service configuration that you evaluate for security and compliance. Learn more.

PUT /services/{services_name}

Request

Custom Headers

  • This field 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.

    To find the Etag value, run a GET request on the resource that you want to modify, and check the response headers.

    Possible values: 4 ≤ length ≤ 128, Value must match regular expression W/"[^"]*"

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

  • The supplied or generated value of this header is logged for a request and repeated in a response header for the corresponding response. The same value is not used for downstream requests and retries of those requests. If a value of this header is not supplied in a request, the service generates a random (version 4) UUID.

    Possible values: 1 ≤ length ≤ 1024, Value must match regular expression ^[a-zA-Z0-9 ,\-_]+$

Path Parameters

  • The service name of the corresponding service.

    Possible values: 1 ≤ length ≤ 64, Value must match regular expression [(a-zA-Z)(?=.|\-)]+|[a-zA-Z]+

    Example: cloud-object-storage

The request body to update a service.

Examples:
View

Response

The response body for creating a service instance.

Status Code

  • The service was updated successfully.

  • You are not authorized to make this request.

  • Forbidden. You are not allowed to make this request.

  • The specified resource could not be found.

Example responses
  • {
      "created_on": "2022-08-02T05:47:21.000Z",
      "created_by": "iam-ServiceId-cc1069ec-bbd3-480f-87ce-eea46b189232",
      "updated_on": "2023-04-27T12:22:33.000Z",
      "updated_by": "iam-ServiceId-cc1069ec-bbd3-480f-87ce-eea46b189232",
      "service_name": "my-test-service",
      "description": "My service description.",
      "monitoring_enabled": true,
      "enforcement_enabled": false,
      "service_listing_enabled": true,
      "config_information_point": {
        "type": "sync",
        "endpoints": [
          {
            "host": "http://test-host-1",
            "path": "test-path-1",
            "region": "region-1",
            "advisory_call_limit": 10
          },
          {
            "host": "http://test-host-2",
            "path": "test-path-2",
            "region": "region-2",
            "advisory_call_limit": 10
          }
        ]
      },
      "supported_configs": [
        {
          "resource_kind": "resource_A",
          "additional_target_attributes": [],
          "properties": [
            {
              "name": "custom_attr_1",
              "description": "The numeric value.",
              "type": "numeric"
            },
            {
              "name": "custom_attr_2",
              "description": "The boolean value.",
              "type": "boolean"
            },
            {
              "name": "custom_attr_3",
              "description": "The string value.",
              "type": "string"
            },
            {
              "name": "custom_attr_4",
              "description": "The array value.",
              "type": "string_list"
            }
          ],
          "description": "The resource_A description.",
          "cip_requires_service_instance": true,
          "resource_group_support": true
        },
        {
          "resource_kind": "resource_B",
          "additional_target_attributes": [],
          "properties": [
            {
              "name": "custom_attr_1",
              "description": "The numeric value.",
              "type": "numeric"
            },
            {
              "name": "complex_property",
              "description": "The boolean value.",
              "type": "boolean",
              "properties": [
                {
                  "name": "nested_attr_1",
                  "description": "The numeric value.",
                  "type": "numeric"
                },
                {
                  "name": "nested_attr_2",
                  "description": "The numeric value.",
                  "type": "numeric"
                }
              ]
            }
          ],
          "description": "The resource_B description.",
          "cip_requires_service_instance": true,
          "resource_group_support": true
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "invalid_auth_token",
          "message": "The token failed to validate.",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "request_not_authorized",
          "message": "The request could not be authorized.",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }
  • {
      "status_code": 404,
      "trace": "b05ed07e-c4d9-4285-841c-1e954c0b4a0e",
      "errors": [
        {
          "code": "not_found",
          "message": "The requested resource was not found\"",
          "more_info": "https://cloud.ibm.com/apidocs/security-compliance-config"
        }
      ]
    }