IBM Cloud API Docs

Introduction

As of 17 July 2025, you cannot create new instances in this version of this product. All of the functionality is now available in the updated experience of Security and Compliance Center Workload Protection. For more information, see the transition documentation.

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

Get access level for an instance

Retrieve access information about the caller for the specified instance.

GET /instances/{instance_id}/v3/access

Request

Path Parameters

  • The ID of the Security and Compliance Center instance.

    Possible values: length = 36, Value must match regular expression ^[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}$

    Example: acd7032c-15a3-484f-bf5b-67d41534d940

Response

The caller's level of access for the specified home instance.

Status Code

  • The access information was successfully retrieved.

  • The request is unauthorized.

  • You are not authorized to access this resource.

  • The 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": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "missing_s2s_auth",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "forbidden",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 404,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "not_found",
          "message": "Resource cannot be found."
        }
      ]
    }

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 /instances/{instance_id}/v3/settings
(securityAndComplianceCenter *SecurityAndComplianceCenterV3) GetSettings(getSettingsOptions *GetSettingsOptions) (result *Settings, response *core.DetailedResponse, err error)
(securityAndComplianceCenter *SecurityAndComplianceCenterV3) GetSettingsWithContext(ctx context.Context, getSettingsOptions *GetSettingsOptions) (result *Settings, response *core.DetailedResponse, err error)
getSettings(params)
get(
        self,
        instance_id: str,
        **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.

Path Parameters

  • The ID of the Security and Compliance Center instance.

    Possible values: length = 36, Value must match regular expression ^[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}$

    Example: acd7032c-15a3-484f-bf5b-67d41534d940

WithContext method only

The GetSettings options.

parameters

  • The ID of the Security and Compliance Center instance.

    Possible values: length = 36, Value must match regular expression /^[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}$/

    Examples:

parameters

  • The ID of the Security and Compliance Center instance.

    Possible values: length = 36, Value must match regular expression /^[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}$/

    Examples:

The getSettings options.

  • curl -X GET --location --header "Authorization: Bearer ${iam_token}"   --header "Accept: application/json"   "${base_url}/instances/${instance_id}/v3/settings"
  • getSettingsOptions := securityAndComplianceCenterService.NewGetSettingsOptions(
      "acd7032c-15a3-484f-bf5b-67d41534d940",
    )
    
    settings, response, err := securityAndComplianceCenterService.GetSettings(getSettingsOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(settings, "", "  ")
    fmt.Println(string(b))
  • const params = {
      instanceId: 'acd7032c-15a3-484f-bf5b-67d41534d940',
    };
    
    let res;
    try {
      res = await securityAndComplianceCenterService.getSettings(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • response = security_and_compliance_center_service.get_settings(
      instance_id='acd7032c-15a3-484f-bf5b-67d41534d940',
    )
    settings = response.get_result()
    
    print(json.dumps(settings, indent=2))
  • GetSettingsOptions getSettingsOptions = new GetSettingsOptions.Builder()
      .instanceId("acd7032c-15a3-484f-bf5b-67d41534d940")
      .build();
    
    Response<Settings> response = securityAndComplianceCenterService.getSettings(getSettingsOptions).execute();
    Settings settings = response.getResult();
    
    System.out.println(settings);

Response

The settings.

The settings.

The settings.

The settings.

The settings.

Status Code

  • The settings were successfully retrieved.

  • The request is unauthorized.

  • You are not authorized to access this resource.

  • The 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.668119908Z",
        "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.917430784Z"
      }
    }
  • {
      "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.668119908Z",
        "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.917430784Z"
      }
    }
  • {
      "status_code": 401,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "missing_s2s_auth",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "missing_s2s_auth",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "forbidden",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "forbidden",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 404,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "not_found",
          "message": "Resource cannot be found."
        }
      ]
    }
  • {
      "status_code": 404,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "not_found",
          "message": "Resource cannot be found."
        }
      ]
    }

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 /instances/{instance_id}/v3/settings
(securityAndComplianceCenter *SecurityAndComplianceCenterV3) UpdateSettings(updateSettingsOptions *UpdateSettingsOptions) (result *Settings, response *core.DetailedResponse, err error)
(securityAndComplianceCenter *SecurityAndComplianceCenterV3) UpdateSettingsWithContext(ctx context.Context, updateSettingsOptions *UpdateSettingsOptions) (result *Settings, response *core.DetailedResponse, err error)
updateSettings(params)
update(
        self,
        instance_id: str,
        *,
        object_storage: Optional['ObjectStoragePrototype'] = None,
        event_notifications: Optional['EventNotificationsPrototype'] = 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.

Path Parameters

  • The ID of the Security and Compliance Center instance.

    Possible values: length = 36, Value must match regular expression ^[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}$

    Example: acd7032c-15a3-484f-bf5b-67d41534d940

The request body to update your settings.

Examples:
{
  "event_notifications": {
    "instance_crn": "crn:v1:staging:public:event-notifications:us-south:a/ff88f007f9ff4622aac4fbc0eda36255:b8b07245-0bbe-4478-b11c-0dce523105fd::",
    "source_name": "scc-sdk-integration",
    "source_description": "This source is used for integration with IBM Cloud Security and Compliance Center."
  },
  "object_storage": {
    "instance_crn": "crn:v1:staging:public:cloud-object-storage:global:a/ff88f007f9ff4622aac4fbc0eda36255:7199ae60-a214-4dd8-9bf7-ce571de49d01::",
    "bucket": "px-scan-results"
  }
}

WithContext method only

The UpdateSettings options.

parameters

  • The ID of the Security and Compliance Center instance.

    Possible values: length = 36, Value must match regular expression /^[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}$/

    Examples:
  • The payload to connect a Cloud Object Storage instance to an Security and Compliance Center instance.

  • The payload to connect an Event Notification instance with a Security and Compliance Center instance.

parameters

  • The ID of the Security and Compliance Center instance.

    Possible values: length = 36, Value must match regular expression /^[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}$/

    Examples:
  • The payload to connect a Cloud Object Storage instance to an Security and Compliance Center instance.

  • The payload to connect an Event Notification instance with a Security and Compliance Center instance.

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:staging:public:event-notifications:us-south:a/ff88f007f9ff4622aac4fbc0eda36255:b8b07245-0bbe-4478-b11c-0dce523105fd::", "source_name": "scc-sdk-integration", "source_description": "This source is used for integration with IBM Cloud Security and Compliance Center." }, "object_storage": { "instance_crn": "crn:v1:staging:public:cloud-object-storage:global:a/ff88f007f9ff4622aac4fbc0eda36255:7199ae60-a214-4dd8-9bf7-ce571de49d01::", "bucket": "px-scan-results" } }'   "${base_url}/instances/${instance_id}/v3/settings"
  • objectStoragePrototypeModel := &securityandcompliancecenterv3.ObjectStoragePrototype{
      Bucket: core.StringPtr("px-scan-results"),
      InstanceCRN: core.StringPtr("crn:v1:staging:public:cloud-object-storage:global:a/ff88f007f9ff4622aac4fbc0eda36255:7199ae60-a214-4dd8-9bf7-ce571de49d01::"),
    }
    
    eventNotificationsPrototypeModel := &securityandcompliancecenterv3.EventNotificationsPrototype{
      InstanceCRN: core.StringPtr("crn:v1:staging:public:event-notifications:us-south:a/ff88f007f9ff4622aac4fbc0eda36255:b8b07245-0bbe-4478-b11c-0dce523105fd::"),
      SourceDescription: core.StringPtr("This source is used for integration with IBM Cloud Security and Compliance Center."),
      SourceName: core.StringPtr("scc-sdk-integration"),
    }
    
    updateSettingsOptions := securityAndComplianceCenterService.NewUpdateSettingsOptions(
      "acd7032c-15a3-484f-bf5b-67d41534d940",
    )
    updateSettingsOptions.SetObjectStorage(objectStoragePrototypeModel)
    updateSettingsOptions.SetEventNotifications(eventNotificationsPrototypeModel)
    
    settings, response, err := securityAndComplianceCenterService.UpdateSettings(updateSettingsOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(settings, "", "  ")
    fmt.Println(string(b))
  • // Request models needed by this operation.
    
    // ObjectStoragePrototype
    const objectStoragePrototypeModel = {
      bucket: 'px-scan-results',
      instance_crn: 'crn:v1:staging:public:cloud-object-storage:global:a/ff88f007f9ff4622aac4fbc0eda36255:7199ae60-a214-4dd8-9bf7-ce571de49d01::',
    };
    
    // EventNotificationsPrototype
    const eventNotificationsPrototypeModel = {
      instance_crn: 'crn:v1:staging:public:event-notifications:us-south:a/ff88f007f9ff4622aac4fbc0eda36255:b8b07245-0bbe-4478-b11c-0dce523105fd::',
      source_description: 'This source is used for integration with IBM Cloud Security and Compliance Center.',
      source_name: 'scc-sdk-integration',
    };
    
    const params = {
      instanceId: 'acd7032c-15a3-484f-bf5b-67d41534d940',
      objectStorage: objectStoragePrototypeModel,
      eventNotifications: eventNotificationsPrototypeModel,
    };
    
    let res;
    try {
      res = await securityAndComplianceCenterService.updateSettings(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • object_storage_prototype_model = {
      'bucket': 'px-scan-results',
      'instance_crn': 'crn:v1:staging:public:cloud-object-storage:global:a/ff88f007f9ff4622aac4fbc0eda36255:7199ae60-a214-4dd8-9bf7-ce571de49d01::',
    }
    
    event_notifications_prototype_model = {
      'instance_crn': 'crn:v1:staging:public:event-notifications:us-south:a/ff88f007f9ff4622aac4fbc0eda36255:b8b07245-0bbe-4478-b11c-0dce523105fd::',
      'source_description': 'This source is used for integration with IBM Cloud Security and Compliance Center.',
      'source_name': 'scc-sdk-integration',
    }
    
    response = security_and_compliance_center_service.update_settings(
      instance_id='acd7032c-15a3-484f-bf5b-67d41534d940',
      object_storage=object_storage_prototype_model,
      event_notifications=event_notifications_prototype_model,
    )
    settings = response.get_result()
    
    print(json.dumps(settings, indent=2))
  • ObjectStoragePrototype objectStoragePrototypeModel = new ObjectStoragePrototype.Builder()
      .bucket("px-scan-results")
      .instanceCrn("crn:v1:staging:public:cloud-object-storage:global:a/ff88f007f9ff4622aac4fbc0eda36255:7199ae60-a214-4dd8-9bf7-ce571de49d01::")
      .build();
    EventNotificationsPrototype eventNotificationsPrototypeModel = new EventNotificationsPrototype.Builder()
      .instanceCrn("crn:v1:staging:public:event-notifications:us-south:a/ff88f007f9ff4622aac4fbc0eda36255:b8b07245-0bbe-4478-b11c-0dce523105fd::")
      .sourceDescription("This source is used for integration with IBM Cloud Security and Compliance Center.")
      .sourceName("scc-sdk-integration")
      .build();
    UpdateSettingsOptions updateSettingsOptions = new UpdateSettingsOptions.Builder()
      .instanceId("acd7032c-15a3-484f-bf5b-67d41534d940")
      .objectStorage(objectStoragePrototypeModel)
      .eventNotifications(eventNotificationsPrototypeModel)
      .build();
    
    Response<Settings> response = securityAndComplianceCenterService.updateSettings(updateSettingsOptions).execute();
    Settings settings = response.getResult();
    
    System.out.println(settings);

Response

The settings.

The settings.

The settings.

The settings.

The settings.

Status Code

  • The settings were successfully updated.

  • The request did not enact any changes. No content is provided.

  • The request body is invalid.

  • The request is unauthorized.

  • You are not authorized to access this resource.

  • The 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.668119908Z",
        "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": "output-bucket",
        "bucket_location": "us-south",
        "bucket_endpoint": "s3.us.private.cloud-object-storage.test.appdomain.cloud",
        "updated_on": "2023-03-01T22:00:05.917430784Z"
      }
    }
  • {
      "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.668119908Z",
        "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": "output-bucket",
        "bucket_location": "us-south",
        "bucket_endpoint": "s3.us.private.cloud-object-storage.test.appdomain.cloud",
        "updated_on": "2023-03-01T22:00:05.917430784Z"
      }
    }
  • {
      "status_code": 400,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "bad_request",
          "message": "Invaild sort parameter",
          "target": {
            "type": "parameter",
            "name": "sort",
            "value": "non_existant_parameter"
          }
        }
      ]
    }
  • {
      "status_code": 400,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "bad_request",
          "message": "Invaild sort parameter",
          "target": {
            "type": "parameter",
            "name": "sort",
            "value": "non_existant_parameter"
          }
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "missing_s2s_auth",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "missing_s2s_auth",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "forbidden",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "forbidden",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 404,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "not_found",
          "message": "Resource cannot be found."
        }
      ]
    }
  • {
      "status_code": 404,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "not_found",
          "message": "Resource cannot be found."
        }
      ]
    }

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 /instances/{instance_id}/v3/test_event
(securityAndComplianceCenter *SecurityAndComplianceCenterV3) PostTestEvent(postTestEventOptions *PostTestEventOptions) (result *TestEvent, response *core.DetailedResponse, err error)
(securityAndComplianceCenter *SecurityAndComplianceCenterV3) PostTestEventWithContext(ctx context.Context, postTestEventOptions *PostTestEventOptions) (result *TestEvent, response *core.DetailedResponse, err error)
postTestEvent(params)
post_test_event(
        self,
        instance_id: str,
        **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.

Path Parameters

  • The ID of the Security and Compliance Center instance.

    Possible values: length = 36, Value must match regular expression ^[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}$

    Example: acd7032c-15a3-484f-bf5b-67d41534d940

WithContext method only

The PostTestEvent options.

parameters

  • The ID of the Security and Compliance Center instance.

    Possible values: length = 36, Value must match regular expression /^[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}$/

    Examples:

parameters

  • The ID of the Security and Compliance Center instance.

    Possible values: length = 36, Value must match regular expression /^[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}$/

    Examples:

The postTestEvent options.

  • curl -X POST --location --header "Authorization: Bearer ${iam_token}"   --header "Accept: application/json"   "${base_url}/instances/${instance_id}/v3/test_event"
  • postTestEventOptions := securityAndComplianceCenterService.NewPostTestEventOptions(
      "acd7032c-15a3-484f-bf5b-67d41534d940",
    )
    
    testEvent, response, err := securityAndComplianceCenterService.PostTestEvent(postTestEventOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(testEvent, "", "  ")
    fmt.Println(string(b))
  • const params = {
      instanceId: 'acd7032c-15a3-484f-bf5b-67d41534d940',
    };
    
    let res;
    try {
      res = await securityAndComplianceCenterService.postTestEvent(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • response = security_and_compliance_center_service.post_test_event(
      instance_id='acd7032c-15a3-484f-bf5b-67d41534d940',
    )
    test_event = response.get_result()
    
    print(json.dumps(test_event, indent=2))
  • PostTestEventOptions postTestEventOptions = new PostTestEventOptions.Builder()
      .instanceId("acd7032c-15a3-484f-bf5b-67d41534d940")
      .build();
    
    Response<TestEvent> response = securityAndComplianceCenterService.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.

The details of a test event response.

The details of a test event response.

The details of a test event response.

Status Code

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

  • The request is unauthorized.

  • You are not authorized to access this resource.

  • The resource was not found.

Example responses
  • {
      "success": true
    }
  • {
      "success": true
    }
  • {
      "status_code": 401,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "missing_s2s_auth",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "missing_s2s_auth",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "forbidden",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "forbidden",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 404,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "not_found",
          "message": "Resource cannot be found."
        }
      ]
    }
  • {
      "status_code": 404,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "not_found",
          "message": "Resource cannot be found."
        }
      ]
    }

Get all instance attachments

Retrieve all instance attachments.

With Security and Compliance Center, you can evaluate your resources on a recurring schedule or you can initiate a scan at any time. To evaluate your resources, you create an attachment. 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.

Retrieve all instance attachments.

With Security and Compliance Center, you can evaluate your resources on a recurring schedule or you can initiate a scan at any time. To evaluate your resources, you create an attachment. 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.

Retrieve all instance attachments.

With Security and Compliance Center, you can evaluate your resources on a recurring schedule or you can initiate a scan at any time. To evaluate your resources, you create an attachment. 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.

Retrieve all instance attachments.

With Security and Compliance Center, you can evaluate your resources on a recurring schedule or you can initiate a scan at any time. To evaluate your resources, you create an attachment. 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.

Retrieve all instance attachments.

With Security and Compliance Center, you can evaluate your resources on a recurring schedule or you can initiate a scan at any time. To evaluate your resources, you create an attachment. 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 /instances/{instance_id}/v3/attachments
(securityAndComplianceCenter *SecurityAndComplianceCenterV3) ListInstanceAttachments(listInstanceAttachmentsOptions *ListInstanceAttachmentsOptions) (result *ProfileAttachmentCollection, response *core.DetailedResponse, err error)
(securityAndComplianceCenter *SecurityAndComplianceCenterV3) ListInstanceAttachmentsWithContext(ctx context.Context, listInstanceAttachmentsOptions *ListInstanceAttachmentsOptions) (result *ProfileAttachmentCollection, response *core.DetailedResponse, err error)
listInstanceAttachments(params)
instance_attachments_list(
        self,
        instance_id: str,
        *,
        account_id: Optional[str] = None,
        version_group_label: Optional[str] = None,
        limit: Optional[int] = None,
        sort: Optional[str] = None,
        direction: Optional[str] = None,
        start: Optional[str] = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<ProfileAttachmentCollection> listInstanceAttachments(ListInstanceAttachmentsOptions listInstanceAttachmentsOptions)

Request

Instantiate the ListInstanceAttachmentsOptions struct and set the fields to provide parameter values for the ListInstanceAttachments method.

Use the ListInstanceAttachmentsOptions.Builder to create a ListInstanceAttachmentsOptions object that contains the parameter values for the listInstanceAttachments method.

Path Parameters

  • The ID of the Security and Compliance Center instance.

    Possible values: length = 36, Value must match regular expression ^[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}$

    Example: acd7032c-15a3-484f-bf5b-67d41534d940

Query Parameters

  • The user account ID.

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

  • The profile version group label.

  • The number of items that are retrieved in a collection.

    Possible values: 1 ≤ value ≤ 200

    Default: 25

  • The sorted collection of attachments. The available values are created_on and scope_type.

    Allowable values: [created_on,scope_type]

  • The collection of attachments that is sorted in ascending order. To sort the collection in descending order, use the DESC schema.

    Allowable values: [desc,asc]

  • The reference to the first item in the results page. Take the value from the next field that is in the response from the previous page.

WithContext method only

The ListInstanceAttachments options.

parameters

  • The ID of the Security and Compliance Center instance.

    Possible values: length = 36, Value must match regular expression /^[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}$/

    Examples:
  • The user account ID.

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

  • The profile version group label.

  • The number of items that are retrieved in a collection.

    Possible values: 1 ≤ value ≤ 200

    Default: 25

  • The sorted collection of attachments. The available values are created_on and scope_type.

    Allowable values: [created_on,scope_type]

  • The collection of attachments that is sorted in ascending order. To sort the collection in descending order, use the DESC schema.

    Allowable values: [desc,asc]

  • The reference to the first item in the results page. Take the value from the next field that is in the response from the previous page.

parameters

  • The ID of the Security and Compliance Center instance.

    Possible values: length = 36, Value must match regular expression /^[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}$/

    Examples:
  • The user account ID.

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

  • The profile version group label.

  • The number of items that are retrieved in a collection.

    Possible values: 1 ≤ value ≤ 200

    Default: 25

  • The sorted collection of attachments. The available values are created_on and scope_type.

    Allowable values: [created_on,scope_type]

  • The collection of attachments that is sorted in ascending order. To sort the collection in descending order, use the DESC schema.

    Allowable values: [desc,asc]

  • The reference to the first item in the results page. Take the value from the next field that is in the response from the previous page.

The listInstanceAttachments options.

  • curl -X GET --location --header "Authorization: Bearer ${iam_token}"   --header "Accept: application/json"   "${base_url}/instances/${instance_id}/v3/attachments"
  • listInstanceAttachmentsOptions := &securityandcompliancecenterv3.ListInstanceAttachmentsOptions{
      InstanceID: core.StringPtr("acd7032c-15a3-484f-bf5b-67d41534d940"),
      AccountID: &accountIDForReportLink,
      VersionGroupLabel: core.StringPtr("testString"),
      Limit: core.Int64Ptr(int64(10)),
      Sort: core.StringPtr("created_on"),
      Direction: core.StringPtr("desc"),
    }
    
    pager, err := securityAndComplianceCenterService.NewInstanceAttachmentsPager(listInstanceAttachmentsOptions)
    if err != nil {
      panic(err)
    }
    
    var allResults []securityandcompliancecenterv3.ProfileAttachment
    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 = {
      instanceId: 'acd7032c-15a3-484f-bf5b-67d41534d940',
      accountId: accountIdForReportLink,
      versionGroupLabel: 'testString',
      limit: 10,
      sort: 'created_on',
      direction: 'desc',
    };
    
    const allResults = [];
    try {
      const pager = new SecurityAndComplianceCenterV3.InstanceAttachmentsPager(securityAndComplianceCenterService, 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 = InstanceAttachmentsPager(
      client=security_and_compliance_center_service,
      instance_id='acd7032c-15a3-484f-bf5b-67d41534d940',
      account_id=account_id_for_report_link,
      version_group_label='testString',
      limit=10,
      sort='created_on',
      direction='desc',
    )
    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))
  • ListInstanceAttachmentsOptions listInstanceAttachmentsOptions = new ListInstanceAttachmentsOptions.Builder()
      .instanceId("acd7032c-15a3-484f-bf5b-67d41534d940")
      .accountId(accountIdForReportLink)
      .versionGroupLabel("testString")
      .limit(Long.valueOf("10"))
      .sort("created_on")
      .direction("desc")
      .build();
    
    InstanceAttachmentsPager pager = new InstanceAttachmentsPager(securityAndComplianceCenterService, listInstanceAttachmentsOptions);
    List<ProfileAttachment> allResults = new ArrayList<>();
    while (pager.hasNext()) {
      List<ProfileAttachment> nextPage = pager.getNext();
      allResults.addAll(nextPage);
    }
    
    System.out.println(GsonSingleton.getGson().toJson(allResults));

Response

A list of ProfileAttachment tied to a profile or instance.

A list of ProfileAttachment tied to a profile or instance.

A list of ProfileAttachment tied to a profile or instance.

A list of ProfileAttachment tied to a profile or instance.

A list of ProfileAttachment tied to a profile or instance.

Status Code

  • The attachments were retrieved successfully.

  • The request body is invalid.

  • The request is unauthorized.

  • You are not authorized to access this resource.

  • Internal server error

Example responses
  • {
      "status_code": 400,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "bad_request",
          "message": "Invaild sort parameter",
          "target": {
            "type": "parameter",
            "name": "sort",
            "value": "non_existant_parameter"
          }
        }
      ]
    }
  • {
      "status_code": 400,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "bad_request",
          "message": "Invaild sort parameter",
          "target": {
            "type": "parameter",
            "name": "sort",
            "value": "non_existant_parameter"
          }
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "missing_s2s_auth",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "missing_s2s_auth",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "forbidden",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "forbidden",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 500,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "internal_error",
          "message": "Internal server error"
        }
      ]
    }
  • {
      "status_code": 500,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "internal_error",
          "message": "Internal server error"
        }
      ]
    }

Create a profile attachment

Create an attachment to link to a profile.

With Security and Compliance Center, you can evaluate your resources on a recurring schedule or you can initiate a scan at any time. To evaluate your resources, you create an attachment. 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.

Create an attachment to link to a profile.

With Security and Compliance Center, you can evaluate your resources on a recurring schedule or you can initiate a scan at any time. To evaluate your resources, you create an attachment. 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.

Create an attachment to link to a profile.

With Security and Compliance Center, you can evaluate your resources on a recurring schedule or you can initiate a scan at any time. To evaluate your resources, you create an attachment. 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.

Create an attachment to link to a profile.

With Security and Compliance Center, you can evaluate your resources on a recurring schedule or you can initiate a scan at any time. To evaluate your resources, you create an attachment. 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.

Create an attachment to link to a profile.

With Security and Compliance Center, you can evaluate your resources on a recurring schedule or you can initiate a scan at any time. To evaluate your resources, you create an attachment. 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.

POST /instances/{instance_id}/v3/profiles/{profile_id}/attachments
(securityAndComplianceCenter *SecurityAndComplianceCenterV3) CreateProfileAttachment(createProfileAttachmentOptions *CreateProfileAttachmentOptions) (result *ProfileAttachmentResponse, response *core.DetailedResponse, err error)
(securityAndComplianceCenter *SecurityAndComplianceCenterV3) CreateProfileAttachmentWithContext(ctx context.Context, createProfileAttachmentOptions *CreateProfileAttachmentOptions) (result *ProfileAttachmentResponse, response *core.DetailedResponse, err error)
createProfileAttachment(params)
profile_attachment_create(
        self,
        instance_id: str,
        profile_id: str,
        *,
        attachments: Optional[List['ProfileAttachmentBase']] = None,
        account_id: Optional[str] = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<ProfileAttachmentResponse> createProfileAttachment(CreateProfileAttachmentOptions createProfileAttachmentOptions)

Request

Instantiate the CreateProfileAttachmentOptions struct and set the fields to provide parameter values for the CreateProfileAttachment method.

Use the CreateProfileAttachmentOptions.Builder to create a CreateProfileAttachmentOptions object that contains the parameter values for the createProfileAttachment method.

Path Parameters

  • The ID of the Security and Compliance Center instance.

    Possible values: length = 36, Value must match regular expression ^[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}$

    Example: acd7032c-15a3-484f-bf5b-67d41534d940

  • The profile ID.

    Example: 48279384-3d29-4089-8259-8ed354774b4a

Query Parameters

  • The user account ID.

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

The request payload to create an attachment.

Examples:
{
  "attachments": [
    {
      "name": "Profile Attachment for IBM CIS Foundation SDK test",
      "description": "This is a profile attachment targeting IBM CIS Foundation using a SDK",
      "scope": [
        {
          "id": "8baad3b5-2e69-4027-9967-efac19508e1c"
        }
      ],
      "schedule": "daily",
      "status": "disabled",
      "attachment_parameters": [
        {
          "parameter_value": "['1.2', '1.3']",
          "assessment_id": "rule-e16fcfea-fe21-4d30-a721-423611481fea",
          "assessment_type": "automated",
          "parameter_display_name": "IBM Cloud Internet Services TLS version",
          "parameter_name": "tls_version",
          "parameter_type": "string_list"
        },
        {
          "parameter_value": "22",
          "assessment_id": "rule-f9137be8-2490-4afb-8cd5-a201cb167eb2",
          "assessment_type": "automated",
          "parameter_display_name": "Network ACL rule for allowed IPs to SSH port",
          "parameter_name": "ssh_port",
          "parameter_type": "numeric"
        },
        {
          "parameter_value": "3389",
          "assessment_id": "rule-9653d2c7-6290-4128-a5a3-65487ba40370",
          "assessment_type": "automated",
          "parameter_display_name": "Security group rule RDP allow port number",
          "parameter_name": "rdp_port",
          "parameter_type": "numeric"
        },
        {
          "parameter_value": "22",
          "assessment_id": "rule-7c5f6385-67e4-4edf-bec8-c722558b2dec",
          "assessment_type": "automated",
          "parameter_display_name": "Security group rule SSH allow port number",
          "parameter_name": "ssh_port",
          "parameter_type": "numeric"
        },
        {
          "parameter_value": "3389",
          "assessment_id": "rule-f1e80ee7-88d5-4bf2-b42f-c863bb24601c",
          "assessment_type": "automated",
          "parameter_display_name": "Disallowed IPs for ingress to RDP port",
          "parameter_name": "rdp_port",
          "parameter_type": "numeric"
        }
      ],
      "notifications": {
        "enabled": true,
        "controls": {
          "threshold_limit": 15,
          "failed_control_ids": []
        }
      }
    }
  ]
}

WithContext method only

The CreateProfileAttachment options.

parameters

  • The ID of the Security and Compliance Center instance.

    Possible values: length = 36, Value must match regular expression /^[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}$/

    Examples:
  • The profile ID.

    Examples:
  • The Prototype to create a profile attachment.

    Possible values: 1 ≤ number of items ≤ 999

    Examples:
  • The user account ID.

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

parameters

  • The ID of the Security and Compliance Center instance.

    Possible values: length = 36, Value must match regular expression /^[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}$/

    Examples:
  • The profile ID.

    Examples:
  • The Prototype to create a profile attachment.

    Possible values: 1 ≤ number of items ≤ 999

    Examples:
  • The user account ID.

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

The createProfileAttachment options.

  • curl -X POST --location --header "Authorization: Bearer ${iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{ "attachments": [ { "name": "Profile Attachment for IBM CIS Foundation SDK test", "description": "This is a profile attachment targeting IBM CIS Foundation using a SDK", "scope": [ { "id": "8baad3b5-2e69-4027-9967-efac19508e1c" } ], "schedule": "daily", "status": "disabled", "attachment_parameters": [ { "parameter_value": "['1.2', '1.3']", "assessment_id": "rule-e16fcfea-fe21-4d30-a721-423611481fea", "assessment_type": "automated", "parameter_display_name": "IBM Cloud Internet Services TLS version", "parameter_name": "tls_version", "parameter_type": "string_list" }, { "parameter_value": "22", "assessment_id": "rule-f9137be8-2490-4afb-8cd5-a201cb167eb2", "assessment_type": "automated", "parameter_display_name": "Network ACL rule for allowed IPs to SSH port", "parameter_name": "ssh_port", "parameter_type": "numeric" }, { "parameter_value": "3389", "assessment_id": "rule-9653d2c7-6290-4128-a5a3-65487ba40370", "assessment_type": "automated", "parameter_display_name": "Security group rule RDP allow port number", "parameter_name": "rdp_port", "parameter_type": "numeric" }, { "parameter_value": "22", "assessment_id": "rule-7c5f6385-67e4-4edf-bec8-c722558b2dec", "assessment_type": "automated", "parameter_display_name": "Security group rule SSH allow port number", "parameter_name": "ssh_port", "parameter_type": "numeric" }, { "parameter_value": "3389", "assessment_id": "rule-f1e80ee7-88d5-4bf2-b42f-c863bb24601c", "assessment_type": "automated", "parameter_display_name": "Disallowed IPs for ingress to RDP port", "parameter_name": "rdp_port", "parameter_type": "numeric" } ], "notifications": { "enabled": true, "controls": { "threshold_limit": 15, "failed_control_ids":  ] } } } ] }'   "${base_url}/instances/${instance_id}/v3/profiles/${profile_id}/attachments"
  • parameterModel := &securityandcompliancecenterv3.Parameter{
      AssessmentType: core.StringPtr("automated"),
      AssessmentID: core.StringPtr("rule-e16fcfea-fe21-4d30-a721-423611481fea"),
      ParameterName: core.StringPtr("tls_version"),
      ParameterDisplayName: core.StringPtr("IBM Cloud Internet Services TLS version"),
      ParameterType: core.StringPtr("string_list"),
      ParameterValue: core.StringPtr("['1.2', '1.3']"),
    }
    
    attachmentNotificationsControlsModel := &securityandcompliancecenterv3.AttachmentNotificationsControls{
      ThresholdLimit: core.Int64Ptr(int64(15)),
      FailedControlIds: []string{},
    }
    
    attachmentNotificationsModel := &securityandcompliancecenterv3.AttachmentNotifications{
      Enabled: core.BoolPtr(true),
      Controls: attachmentNotificationsControlsModel,
    }
    
    multiCloudScopePayloadModel := &securityandcompliancecenterv3.MultiCloudScopePayload{
      ID: core.StringPtr("8baad3b5-2e69-4027-9967-efac19508e1c"),
    }
    
    profileAttachmentBaseModel := &securityandcompliancecenterv3.ProfileAttachmentBase{
      AttachmentParameters: []securityandcompliancecenterv3.Parameter{*parameterModel},
      Description: core.StringPtr("This is a profile attachment targeting IBM CIS Foundation using a SDK"),
      Name: core.StringPtr("Profile Attachment for IBM CIS Foundation SDK test"),
      Notifications: attachmentNotificationsModel,
      Schedule: core.StringPtr("daily"),
      Scope: []securityandcompliancecenterv3.MultiCloudScopePayload{*multiCloudScopePayloadModel},
      Status: core.StringPtr("disabled"),
    }
    
    createProfileAttachmentOptions := securityAndComplianceCenterService.NewCreateProfileAttachmentOptions(
      "acd7032c-15a3-484f-bf5b-67d41534d940",
      profileIDLink,
    )
    createProfileAttachmentOptions.SetAttachments([]securityandcompliancecenterv3.ProfileAttachmentBase{*profileAttachmentBaseModel})
    
    profileAttachmentResponse, response, err := securityAndComplianceCenterService.CreateProfileAttachment(createProfileAttachmentOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(profileAttachmentResponse, "", "  ")
    fmt.Println(string(b))
  • // Request models needed by this operation.
    
    // Parameter
    const parameterModel = {
      assessment_type: 'automated',
      assessment_id: 'rule-e16fcfea-fe21-4d30-a721-423611481fea',
      parameter_name: 'tls_version',
      parameter_display_name: 'IBM Cloud Internet Services TLS version',
      parameter_type: 'string_list',
      parameter_value: '[\'1.2\', \'1.3\']',
    };
    
    // AttachmentNotificationsControls
    const attachmentNotificationsControlsModel = {
      threshold_limit: 15,
      failed_control_ids: [],
    };
    
    // AttachmentNotifications
    const attachmentNotificationsModel = {
      enabled: true,
      controls: attachmentNotificationsControlsModel,
    };
    
    // MultiCloudScopePayload
    const multiCloudScopePayloadModel = {
      id: '8baad3b5-2e69-4027-9967-efac19508e1c',
    };
    
    // ProfileAttachmentBase
    const profileAttachmentBaseModel = {
      attachment_parameters: [parameterModel],
      description: 'This is a profile attachment targeting IBM CIS Foundation using a SDK',
      name: 'Profile Attachment for IBM CIS Foundation SDK test',
      notifications: attachmentNotificationsModel,
      schedule: 'daily',
      scope: [multiCloudScopePayloadModel],
      status: 'disabled',
    };
    
    const params = {
      instanceId: 'acd7032c-15a3-484f-bf5b-67d41534d940',
      profileId: profileIdLink,
      attachments: [profileAttachmentBaseModel],
    };
    
    let res;
    try {
      res = await securityAndComplianceCenterService.createProfileAttachment(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • parameter_model = {
      'assessment_type': 'automated',
      'assessment_id': 'rule-e16fcfea-fe21-4d30-a721-423611481fea',
      'parameter_name': 'tls_version',
      'parameter_display_name': 'IBM Cloud Internet Services TLS version',
      'parameter_type': 'string_list',
      'parameter_value': '[\'1.2\', \'1.3\']',
    }
    
    attachment_notifications_controls_model = {
      'threshold_limit': 15,
      'failed_control_ids': [],
    }
    
    attachment_notifications_model = {
      'enabled': True,
      'controls': attachment_notifications_controls_model,
    }
    
    multi_cloud_scope_payload_model = {
      'id': '8baad3b5-2e69-4027-9967-efac19508e1c',
    }
    
    profile_attachment_base_model = {
      'attachment_parameters': [parameter_model],
      'description': 'This is a profile attachment targeting IBM CIS Foundation using a SDK',
      'name': 'Profile Attachment for IBM CIS Foundation SDK test',
      'notifications': attachment_notifications_model,
      'schedule': 'daily',
      'scope': [multi_cloud_scope_payload_model],
      'status': 'disabled',
    }
    
    response = security_and_compliance_center_service.create_profile_attachment(
      instance_id='acd7032c-15a3-484f-bf5b-67d41534d940',
      profile_id=profile_id_link,
      attachments=[profile_attachment_base_model],
    )
    profile_attachment_response = response.get_result()
    
    print(json.dumps(profile_attachment_response, indent=2))
  • Parameter parameterModel = new Parameter.Builder()
      .assessmentType("automated")
      .assessmentId("rule-e16fcfea-fe21-4d30-a721-423611481fea")
      .parameterName("tls_version")
      .parameterDisplayName("IBM Cloud Internet Services TLS version")
      .parameterType("string_list")
      .parameterValue("['1.2', '1.3']")
      .build();
    AttachmentNotificationsControls attachmentNotificationsControlsModel = new AttachmentNotificationsControls.Builder()
      .thresholdLimit(Long.valueOf("15"))
      .failedControlIds(java.util.Arrays.asList())
      .build();
    AttachmentNotifications attachmentNotificationsModel = new AttachmentNotifications.Builder()
      .enabled(true)
      .controls(attachmentNotificationsControlsModel)
      .build();
    MultiCloudScopePayload multiCloudScopePayloadModel = new MultiCloudScopePayload.Builder()
      .id("8baad3b5-2e69-4027-9967-efac19508e1c")
      .build();
    ProfileAttachmentBase profileAttachmentBaseModel = new ProfileAttachmentBase.Builder()
      .attachmentParameters(java.util.Arrays.asList(parameterModel))
      .description("This is a profile attachment targeting IBM CIS Foundation using a SDK")
      .name("Profile Attachment for IBM CIS Foundation SDK test")
      .notifications(attachmentNotificationsModel)
      .schedule("daily")
      .scope(java.util.Arrays.asList(multiCloudScopePayloadModel))
      .status("disabled")
      .build();
    CreateProfileAttachmentOptions createProfileAttachmentOptions = new CreateProfileAttachmentOptions.Builder()
      .instanceId("acd7032c-15a3-484f-bf5b-67d41534d940")
      .profileId(profileIdLink)
      .attachments(java.util.Arrays.asList(profileAttachmentBaseModel))
      .build();
    
    Response<ProfileAttachmentResponse> response = securityAndComplianceCenterService.createProfileAttachment(createProfileAttachmentOptions).execute();
    ProfileAttachmentResponse profileAttachmentResponse = response.getResult();
    
    System.out.println(profileAttachmentResponse);

Response

The response coming back from creating a ProfileAttachment

The response coming back from creating a ProfileAttachment.

The response coming back from creating a ProfileAttachment.

The response coming back from creating a ProfileAttachment.

The response coming back from creating a ProfileAttachment.

Status Code

  • The attachment was created successfully.

  • The request body is invalid.

  • The request is unauthorized.

  • You are not authorized to access this resource.

  • Internal server error

Example responses
  • {
      "status_code": 400,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "bad_request",
          "message": "Invaild sort parameter",
          "target": {
            "type": "parameter",
            "name": "sort",
            "value": "non_existant_parameter"
          }
        }
      ]
    }
  • {
      "status_code": 400,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "bad_request",
          "message": "Invaild sort parameter",
          "target": {
            "type": "parameter",
            "name": "sort",
            "value": "non_existant_parameter"
          }
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "missing_s2s_auth",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "missing_s2s_auth",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "forbidden",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "forbidden",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 500,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "internal_error",
          "message": "Internal server error"
        }
      ]
    }
  • {
      "status_code": 500,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "internal_error",
          "message": "Internal server error"
        }
      ]
    }

Get all attachments tied to a profile

Retrieve all attachments that are linked to a profile.

With Security and Compliance Center, you can evaluate your resources on a recurring schedule or you can initiate a scan at any time. To evaluate your resources, you create an attachment. 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.

Retrieve all attachments that are linked to a profile.

With Security and Compliance Center, you can evaluate your resources on a recurring schedule or you can initiate a scan at any time. To evaluate your resources, you create an attachment. 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.

Retrieve all attachments that are linked to a profile.

With Security and Compliance Center, you can evaluate your resources on a recurring schedule or you can initiate a scan at any time. To evaluate your resources, you create an attachment. 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.

Retrieve all attachments that are linked to a profile.

With Security and Compliance Center, you can evaluate your resources on a recurring schedule or you can initiate a scan at any time. To evaluate your resources, you create an attachment. 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.

Retrieve all attachments that are linked to a profile.

With Security and Compliance Center, you can evaluate your resources on a recurring schedule or you can initiate a scan at any time. To evaluate your resources, you create an attachment. 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 /instances/{instance_id}/v3/profiles/{profile_id}/attachments
(securityAndComplianceCenter *SecurityAndComplianceCenterV3) ListProfileAttachments(listProfileAttachmentsOptions *ListProfileAttachmentsOptions) (result *ProfileAttachmentCollection, response *core.DetailedResponse, err error)
(securityAndComplianceCenter *SecurityAndComplianceCenterV3) ListProfileAttachmentsWithContext(ctx context.Context, listProfileAttachmentsOptions *ListProfileAttachmentsOptions) (result *ProfileAttachmentCollection, response *core.DetailedResponse, err error)
listProfileAttachments(params)
profile_attachments_list(
        self,
        instance_id: str,
        profile_id: str,
        *,
        account_id: Optional[str] = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<ProfileAttachmentCollection> listProfileAttachments(ListProfileAttachmentsOptions listProfileAttachmentsOptions)

Request

Instantiate the ListProfileAttachmentsOptions struct and set the fields to provide parameter values for the ListProfileAttachments method.

Use the ListProfileAttachmentsOptions.Builder to create a ListProfileAttachmentsOptions object that contains the parameter values for the listProfileAttachments method.

Path Parameters

  • The ID of the Security and Compliance Center instance.

    Possible values: length = 36, Value must match regular expression ^[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}$

    Example: acd7032c-15a3-484f-bf5b-67d41534d940

  • The profile ID.

    Example: 48279384-3d29-4089-8259-8ed354774b4a

Query Parameters

  • The user account ID.

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

WithContext method only

The ListProfileAttachments options.

parameters

  • The ID of the Security and Compliance Center instance.

    Possible values: length = 36, Value must match regular expression /^[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}$/

    Examples:
  • The profile ID.

    Examples:
  • The user account ID.

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

parameters

  • The ID of the Security and Compliance Center instance.

    Possible values: length = 36, Value must match regular expression /^[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}$/

    Examples:
  • The profile ID.

    Examples:
  • The user account ID.

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

The listProfileAttachments options.

  • curl -X GET --location --header "Authorization: Bearer ${iam_token}"   --header "Accept: application/json"   "${base_url}/instances/${instance_id}/v3/profiles/${profile_id}/attachments"
  • listProfileAttachmentsOptions := securityAndComplianceCenterService.NewListProfileAttachmentsOptions(
      "acd7032c-15a3-484f-bf5b-67d41534d940",
      profileIDLink,
    )
    
    profileAttachmentCollection, response, err := securityAndComplianceCenterService.ListProfileAttachments(listProfileAttachmentsOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(profileAttachmentCollection, "", "  ")
    fmt.Println(string(b))
  • const params = {
      instanceId: 'acd7032c-15a3-484f-bf5b-67d41534d940',
      profileId: profileIdLink,
    };
    
    let res;
    try {
      res = await securityAndComplianceCenterService.listProfileAttachments(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • response = security_and_compliance_center_service.list_profile_attachments(
      instance_id='acd7032c-15a3-484f-bf5b-67d41534d940',
      profile_id=profile_id_link,
    )
    profile_attachment_collection = response.get_result()
    
    print(json.dumps(profile_attachment_collection, indent=2))
  • ListProfileAttachmentsOptions listProfileAttachmentsOptions = new ListProfileAttachmentsOptions.Builder()
      .instanceId("acd7032c-15a3-484f-bf5b-67d41534d940")
      .profileId(profileIdLink)
      .build();
    
    Response<ProfileAttachmentCollection> response = securityAndComplianceCenterService.listProfileAttachments(listProfileAttachmentsOptions).execute();
    ProfileAttachmentCollection profileAttachmentCollection = response.getResult();
    
    System.out.println(profileAttachmentCollection);

Response

A list of ProfileAttachment tied to a profile or instance.

A list of ProfileAttachment tied to a profile or instance.

A list of ProfileAttachment tied to a profile or instance.

A list of ProfileAttachment tied to a profile or instance.

A list of ProfileAttachment tied to a profile or instance.

Status Code

  • The attachments were retrieved successfully.

  • The request body is invalid.

  • The request is unauthorized.

  • You are not authorized to access this resource.

  • Internal server error

Example responses
  • {
      "status_code": 400,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "bad_request",
          "message": "Invaild sort parameter",
          "target": {
            "type": "parameter",
            "name": "sort",
            "value": "non_existant_parameter"
          }
        }
      ]
    }
  • {
      "status_code": 400,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "bad_request",
          "message": "Invaild sort parameter",
          "target": {
            "type": "parameter",
            "name": "sort",
            "value": "non_existant_parameter"
          }
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "missing_s2s_auth",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "missing_s2s_auth",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "forbidden",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "forbidden",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 500,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "internal_error",
          "message": "Internal server error"
        }
      ]
    }
  • {
      "status_code": 500,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "internal_error",
          "message": "Internal server error"
        }
      ]
    }

Get an attachment for a profile

Retrieve an attachment that is linked to a profile by specifying the attachment ID.

With Security and Compliance Center, you can evaluate your resources on a recurring schedule or you can initiate a scan at any time. To evaluate your resources, you create an attachment. 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.

Retrieve an attachment that is linked to a profile by specifying the attachment ID.

With Security and Compliance Center, you can evaluate your resources on a recurring schedule or you can initiate a scan at any time. To evaluate your resources, you create an attachment. 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.

Retrieve an attachment that is linked to a profile by specifying the attachment ID.

With Security and Compliance Center, you can evaluate your resources on a recurring schedule or you can initiate a scan at any time. To evaluate your resources, you create an attachment. 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.

Retrieve an attachment that is linked to a profile by specifying the attachment ID.

With Security and Compliance Center, you can evaluate your resources on a recurring schedule or you can initiate a scan at any time. To evaluate your resources, you create an attachment. 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.

Retrieve an attachment that is linked to a profile by specifying the attachment ID.

With Security and Compliance Center, you can evaluate your resources on a recurring schedule or you can initiate a scan at any time. To evaluate your resources, you create an attachment. 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 /instances/{instance_id}/v3/profiles/{profile_id}/attachments/{attachment_id}
(securityAndComplianceCenter *SecurityAndComplianceCenterV3) GetProfileAttachment(getProfileAttachmentOptions *GetProfileAttachmentOptions) (result *ProfileAttachment, response *core.DetailedResponse, err error)
(securityAndComplianceCenter *SecurityAndComplianceCenterV3) GetProfileAttachmentWithContext(ctx context.Context, getProfileAttachmentOptions *GetProfileAttachmentOptions) (result *ProfileAttachment, response *core.DetailedResponse, err error)
getProfileAttachment(params)
profile_attachment_get(
        self,
        instance_id: str,
        profile_id: str,
        attachment_id: str,
        *,
        account_id: Optional[str] = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<ProfileAttachment> getProfileAttachment(GetProfileAttachmentOptions getProfileAttachmentOptions)

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.

Path Parameters

  • The ID of the Security and Compliance Center instance.

    Possible values: length = 36, Value must match regular expression ^[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}$

    Example: acd7032c-15a3-484f-bf5b-67d41534d940

  • The profile ID.

    Example: 48279384-3d29-4089-8259-8ed354774b4a

  • The attachment ID.

Query Parameters

  • The user account ID.

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

WithContext method only

The GetProfileAttachment options.

parameters

  • The ID of the Security and Compliance Center instance.

    Possible values: length = 36, Value must match regular expression /^[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}$/

    Examples:
  • The profile ID.

    Examples:
  • The attachment ID.

  • The user account ID.

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

parameters

  • The ID of the Security and Compliance Center instance.

    Possible values: length = 36, Value must match regular expression /^[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}$/

    Examples:
  • The profile ID.

    Examples:
  • The attachment ID.

  • The user account ID.

    Possible values: 1 ≤ length ≤ 128, 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}/instances/${instance_id}/v3/profiles/${profile_id}/attachments/${attachment_id}"
  • getProfileAttachmentOptions := securityAndComplianceCenterService.NewGetProfileAttachmentOptions(
      "acd7032c-15a3-484f-bf5b-67d41534d940",
      profileIDLink,
      attachmentIDLink,
    )
    
    profileAttachment, response, err := securityAndComplianceCenterService.GetProfileAttachment(getProfileAttachmentOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(profileAttachment, "", "  ")
    fmt.Println(string(b))
  • const params = {
      instanceId: 'acd7032c-15a3-484f-bf5b-67d41534d940',
      profileId: profileIdLink,
      attachmentId: attachmentIdLink,
    };
    
    let res;
    try {
      res = await securityAndComplianceCenterService.getProfileAttachment(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • response = security_and_compliance_center_service.get_profile_attachment(
      instance_id='acd7032c-15a3-484f-bf5b-67d41534d940',
      profile_id=profile_id_link,
      attachment_id=attachment_id_link,
    )
    profile_attachment = response.get_result()
    
    print(json.dumps(profile_attachment, indent=2))
  • GetProfileAttachmentOptions getProfileAttachmentOptions = new GetProfileAttachmentOptions.Builder()
      .instanceId("acd7032c-15a3-484f-bf5b-67d41534d940")
      .profileId(profileIdLink)
      .attachmentId(attachmentIdLink)
      .build();
    
    Response<ProfileAttachment> response = securityAndComplianceCenterService.getProfileAttachment(getProfileAttachmentOptions).execute();
    ProfileAttachment profileAttachment = response.getResult();
    
    System.out.println(profileAttachment);

Response

The configuration set when starting a scan against a profile

The configuration set when starting a scan against a profile.

The configuration set when starting a scan against a profile.

The configuration set when starting a scan against a profile.

The configuration set when starting a scan against a profile.

Status Code

  • The attachment was retrieved successfully.

  • The request body is invalid.

  • The request is unauthorized.

  • You are not authorized to access this resource.

  • Internal server error

Example responses
  • {
      "status_code": 400,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "bad_request",
          "message": "Invaild sort parameter",
          "target": {
            "type": "parameter",
            "name": "sort",
            "value": "non_existant_parameter"
          }
        }
      ]
    }
  • {
      "status_code": 400,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "bad_request",
          "message": "Invaild sort parameter",
          "target": {
            "type": "parameter",
            "name": "sort",
            "value": "non_existant_parameter"
          }
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "missing_s2s_auth",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "missing_s2s_auth",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "forbidden",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "forbidden",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 500,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "internal_error",
          "message": "Internal server error"
        }
      ]
    }
  • {
      "status_code": 500,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "internal_error",
          "message": "Internal server error"
        }
      ]
    }

Update an attachment

Update an attachment that is linked to a profile.

With Security and Compliance Center, you can evaluate your resources on a recurring schedule or you can initiate a scan at any time. To evaluate your resources, you create an attachment. 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.

Update an attachment that is linked to a profile.

With Security and Compliance Center, you can evaluate your resources on a recurring schedule or you can initiate a scan at any time. To evaluate your resources, you create an attachment. 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.

Update an attachment that is linked to a profile.

With Security and Compliance Center, you can evaluate your resources on a recurring schedule or you can initiate a scan at any time. To evaluate your resources, you create an attachment. 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.

Update an attachment that is linked to a profile.

With Security and Compliance Center, you can evaluate your resources on a recurring schedule or you can initiate a scan at any time. To evaluate your resources, you create an attachment. 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.

Update an attachment that is linked to a profile.

With Security and Compliance Center, you can evaluate your resources on a recurring schedule or you can initiate a scan at any time. To evaluate your resources, you create an attachment. 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.

PUT /instances/{instance_id}/v3/profiles/{profile_id}/attachments/{attachment_id}
(securityAndComplianceCenter *SecurityAndComplianceCenterV3) ReplaceProfileAttachment(replaceProfileAttachmentOptions *ReplaceProfileAttachmentOptions) (result *ProfileAttachment, response *core.DetailedResponse, err error)
(securityAndComplianceCenter *SecurityAndComplianceCenterV3) ReplaceProfileAttachmentWithContext(ctx context.Context, replaceProfileAttachmentOptions *ReplaceProfileAttachmentOptions) (result *ProfileAttachment, response *core.DetailedResponse, err error)
replaceProfileAttachment(params)
profile_attachment_replace(
        self,
        instance_id: str,
        profile_id: str,
        attachment_id: str,
        *,
        attachments: Optional[List['ProfileAttachmentBase']] = None,
        account_id: Optional[str] = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<ProfileAttachment> replaceProfileAttachment(ReplaceProfileAttachmentOptions replaceProfileAttachmentOptions)

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.

Path Parameters

  • The ID of the Security and Compliance Center instance.

    Possible values: length = 36, Value must match regular expression ^[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}$

    Example: acd7032c-15a3-484f-bf5b-67d41534d940

  • The profile ID.

    Example: 48279384-3d29-4089-8259-8ed354774b4a

  • The attachment ID.

Query Parameters

  • The user account ID.

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

The request payload to update an attachment.

WithContext method only

The ReplaceProfileAttachment options.

parameters

  • The ID of the Security and Compliance Center instance.

    Possible values: length = 36, Value must match regular expression /^[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}$/

    Examples:
  • The profile ID.

    Examples:
  • The attachment ID.

  • The Prototype to create a profile attachment.

    Possible values: 1 ≤ number of items ≤ 999

  • The user account ID.

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

parameters

  • The ID of the Security and Compliance Center instance.

    Possible values: length = 36, Value must match regular expression /^[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}$/

    Examples:
  • The profile ID.

    Examples:
  • The attachment ID.

  • The Prototype to create a profile attachment.

    Possible values: 1 ≤ number of items ≤ 999

  • The user account ID.

    Possible values: 1 ≤ length ≤ 128, 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 '{}'   "${base_url}/instances/${instance_id}/v3/profiles/${profile_id}/attachments/${attachment_id}"
  • replaceProfileAttachmentOptions := securityAndComplianceCenterService.NewReplaceProfileAttachmentOptions(
      "acd7032c-15a3-484f-bf5b-67d41534d940",
      profileIDLink,
      attachmentIDLink,
    )
    
    profileAttachment, response, err := securityAndComplianceCenterService.ReplaceProfileAttachment(replaceProfileAttachmentOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(profileAttachment, "", "  ")
    fmt.Println(string(b))
  • const params = {
      instanceId: 'acd7032c-15a3-484f-bf5b-67d41534d940',
      profileId: profileIdLink,
      attachmentId: attachmentIdLink,
    };
    
    let res;
    try {
      res = await securityAndComplianceCenterService.replaceProfileAttachment(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • response = security_and_compliance_center_service.replace_profile_attachment(
      instance_id='acd7032c-15a3-484f-bf5b-67d41534d940',
      profile_id=profile_id_link,
      attachment_id=attachment_id_link,
    )
    profile_attachment = response.get_result()
    
    print(json.dumps(profile_attachment, indent=2))
  • ReplaceProfileAttachmentOptions replaceProfileAttachmentOptions = new ReplaceProfileAttachmentOptions.Builder()
      .instanceId("acd7032c-15a3-484f-bf5b-67d41534d940")
      .profileId(profileIdLink)
      .attachmentId(attachmentIdLink)
      .build();
    
    Response<ProfileAttachment> response = securityAndComplianceCenterService.replaceProfileAttachment(replaceProfileAttachmentOptions).execute();
    ProfileAttachment profileAttachment = response.getResult();
    
    System.out.println(profileAttachment);

Response

The configuration set when starting a scan against a profile

The configuration set when starting a scan against a profile.

The configuration set when starting a scan against a profile.

The configuration set when starting a scan against a profile.

The configuration set when starting a scan against a profile.

Status Code

  • The attachment was updated successfully.

  • The request body is invalid.

  • The request is unauthorized.

  • You are not authorized to access this resource.

  • Internal server error

Example responses
  • {
      "status_code": 400,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "bad_request",
          "message": "Invaild sort parameter",
          "target": {
            "type": "parameter",
            "name": "sort",
            "value": "non_existant_parameter"
          }
        }
      ]
    }
  • {
      "status_code": 400,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "bad_request",
          "message": "Invaild sort parameter",
          "target": {
            "type": "parameter",
            "name": "sort",
            "value": "non_existant_parameter"
          }
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "missing_s2s_auth",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "missing_s2s_auth",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "forbidden",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "forbidden",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 500,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "internal_error",
          "message": "Internal server error"
        }
      ]
    }
  • {
      "status_code": 500,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "internal_error",
          "message": "Internal server error"
        }
      ]
    }

Delete an attachment

Delete an attachment that is linked to a profile.

With Security and Compliance Center, you can evaluate your resources on a recurring schedule or you can initiate a scan at any time. To evaluate your resources, you create an attachment. 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.

Delete an attachment that is linked to a profile.

With Security and Compliance Center, you can evaluate your resources on a recurring schedule or you can initiate a scan at any time. To evaluate your resources, you create an attachment. 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.

Delete an attachment that is linked to a profile.

With Security and Compliance Center, you can evaluate your resources on a recurring schedule or you can initiate a scan at any time. To evaluate your resources, you create an attachment. 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.

Delete an attachment that is linked to a profile.

With Security and Compliance Center, you can evaluate your resources on a recurring schedule or you can initiate a scan at any time. To evaluate your resources, you create an attachment. 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.

Delete an attachment that is linked to a profile.

With Security and Compliance Center, you can evaluate your resources on a recurring schedule or you can initiate a scan at any time. To evaluate your resources, you create an attachment. 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.

DELETE /instances/{instance_id}/v3/profiles/{profile_id}/attachments/{attachment_id}
(securityAndComplianceCenter *SecurityAndComplianceCenterV3) DeleteProfileAttachment(deleteProfileAttachmentOptions *DeleteProfileAttachmentOptions) (result *ProfileAttachment, response *core.DetailedResponse, err error)
(securityAndComplianceCenter *SecurityAndComplianceCenterV3) DeleteProfileAttachmentWithContext(ctx context.Context, deleteProfileAttachmentOptions *DeleteProfileAttachmentOptions) (result *ProfileAttachment, response *core.DetailedResponse, err error)
deleteProfileAttachment(params)
profile_attachment_delete(
        self,
        instance_id: str,
        profile_id: str,
        attachment_id: str,
        *,
        account_id: Optional[str] = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<ProfileAttachment> deleteProfileAttachment(DeleteProfileAttachmentOptions deleteProfileAttachmentOptions)

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.

Path Parameters

  • The ID of the Security and Compliance Center instance.

    Possible values: length = 36, Value must match regular expression ^[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}$

    Example: acd7032c-15a3-484f-bf5b-67d41534d940

  • The profile ID.

    Example: 48279384-3d29-4089-8259-8ed354774b4a

  • The attachment ID.

Query Parameters

  • The user account ID.

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

WithContext method only

The DeleteProfileAttachment options.

parameters

  • The ID of the Security and Compliance Center instance.

    Possible values: length = 36, Value must match regular expression /^[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}$/

    Examples:
  • The profile ID.

    Examples:
  • The attachment ID.

  • The user account ID.

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

parameters

  • The ID of the Security and Compliance Center instance.

    Possible values: length = 36, Value must match regular expression /^[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}$/

    Examples:
  • The profile ID.

    Examples:
  • The attachment ID.

  • The user account ID.

    Possible values: 1 ≤ length ≤ 128, 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}/instances/${instance_id}/v3/profiles/${profile_id}/attachments/${attachment_id}"
  • deleteProfileAttachmentOptions := securityAndComplianceCenterService.NewDeleteProfileAttachmentOptions(
      "acd7032c-15a3-484f-bf5b-67d41534d940",
      profileIDLink,
      attachmentIDLink,
    )
    
    profileAttachment, response, err := securityAndComplianceCenterService.DeleteProfileAttachment(deleteProfileAttachmentOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(profileAttachment, "", "  ")
    fmt.Println(string(b))
  • const params = {
      instanceId: 'acd7032c-15a3-484f-bf5b-67d41534d940',
      profileId: profileIdLink,
      attachmentId: attachmentIdLink,
    };
    
    let res;
    try {
      res = await securityAndComplianceCenterService.deleteProfileAttachment(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • response = security_and_compliance_center_service.delete_profile_attachment(
      instance_id='acd7032c-15a3-484f-bf5b-67d41534d940',
      profile_id=profile_id_link,
      attachment_id=attachment_id_link,
    )
    profile_attachment = response.get_result()
    
    print(json.dumps(profile_attachment, indent=2))
  • DeleteProfileAttachmentOptions deleteProfileAttachmentOptions = new DeleteProfileAttachmentOptions.Builder()
      .instanceId("acd7032c-15a3-484f-bf5b-67d41534d940")
      .profileId(profileIdLink)
      .attachmentId(attachmentIdLink)
      .build();
    
    Response<ProfileAttachment> response = securityAndComplianceCenterService.deleteProfileAttachment(deleteProfileAttachmentOptions).execute();
    ProfileAttachment profileAttachment = response.getResult();
    
    System.out.println(profileAttachment);

Response

The configuration set when starting a scan against a profile

The configuration set when starting a scan against a profile.

The configuration set when starting a scan against a profile.

The configuration set when starting a scan against a profile.

The configuration set when starting a scan against a profile.

Status Code

  • The attachment was deleted successfully.

  • The request body is invalid.

  • The request is unauthorized.

  • You are not authorized to access this resource.

  • Internal server error

Example responses
  • {
      "status_code": 400,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "bad_request",
          "message": "Invaild sort parameter",
          "target": {
            "type": "parameter",
            "name": "sort",
            "value": "non_existant_parameter"
          }
        }
      ]
    }
  • {
      "status_code": 400,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "bad_request",
          "message": "Invaild sort parameter",
          "target": {
            "type": "parameter",
            "name": "sort",
            "value": "non_existant_parameter"
          }
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "missing_s2s_auth",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "missing_s2s_auth",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "forbidden",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "forbidden",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 500,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "internal_error",
          "message": "Internal server error"
        }
      ]
    }
  • {
      "status_code": 500,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "internal_error",
          "message": "Internal server error"
        }
      ]
    }

Upgrade an attachment

Upgrade an attachment to the latest version of a profile.

With Security and Compliance Center, you can evaluate your resources on a recurring schedule or you can initiate a scan at any time. To evaluate your resources, you create an attachment. 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.

Upgrade an attachment to the latest version of a profile.

With Security and Compliance Center, you can evaluate your resources on a recurring schedule or you can initiate a scan at any time. To evaluate your resources, you create an attachment. 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.

Upgrade an attachment to the latest version of a profile.

With Security and Compliance Center, you can evaluate your resources on a recurring schedule or you can initiate a scan at any time. To evaluate your resources, you create an attachment. 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.

Upgrade an attachment to the latest version of a profile.

With Security and Compliance Center, you can evaluate your resources on a recurring schedule or you can initiate a scan at any time. To evaluate your resources, you create an attachment. 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.

Upgrade an attachment to the latest version of a profile.

With Security and Compliance Center, you can evaluate your resources on a recurring schedule or you can initiate a scan at any time. To evaluate your resources, you create an attachment. 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.

POST /instances/{instance_id}/v3/profiles/{profile_id}/attachments/{attachment_id}/upgrade
(securityAndComplianceCenter *SecurityAndComplianceCenterV3) UpgradeAttachment(upgradeAttachmentOptions *UpgradeAttachmentOptions) (result *ProfileAttachment, response *core.DetailedResponse, err error)
(securityAndComplianceCenter *SecurityAndComplianceCenterV3) UpgradeAttachmentWithContext(ctx context.Context, upgradeAttachmentOptions *UpgradeAttachmentOptions) (result *ProfileAttachment, response *core.DetailedResponse, err error)
upgradeAttachment(params)
upgrade_attachment(
        self,
        instance_id: str,
        profile_id: str,
        attachment_id: str,
        *,
        attachment_parameters: Optional[List['Parameter']] = None,
        account_id: Optional[str] = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<ProfileAttachment> upgradeAttachment(UpgradeAttachmentOptions upgradeAttachmentOptions)

Request

Instantiate the UpgradeAttachmentOptions struct and set the fields to provide parameter values for the UpgradeAttachment method.

Use the UpgradeAttachmentOptions.Builder to create a UpgradeAttachmentOptions object that contains the parameter values for the upgradeAttachment method.

Path Parameters

  • The ID of the Security and Compliance Center instance.

    Possible values: length = 36, Value must match regular expression ^[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}$

    Example: acd7032c-15a3-484f-bf5b-67d41534d940

  • The profile ID.

    Example: 48279384-3d29-4089-8259-8ed354774b4a

  • The attachment ID.

Query Parameters

  • The user account ID.

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

The request payload to upgrade an attachment.

WithContext method only

The UpgradeAttachment options.

parameters

  • The ID of the Security and Compliance Center instance.

    Possible values: length = 36, Value must match regular expression /^[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}$/

    Examples:
  • The profile ID.

    Examples:
  • The attachment ID.

  • The attachment_parameters to set for a Profile Attachment.

    Possible values: 0 ≤ number of items ≤ 99999

  • The user account ID.

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

parameters

  • The ID of the Security and Compliance Center instance.

    Possible values: length = 36, Value must match regular expression /^[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}$/

    Examples:
  • The profile ID.

    Examples:
  • The attachment ID.

  • The attachment_parameters to set for a Profile Attachment.

    Possible values: 0 ≤ number of items ≤ 99999

  • The user account ID.

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

The upgradeAttachment options.

  • curl -X POST --location --header "Authorization: Bearer ${iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{}'   "${base_url}/instances/${instance_id}/v3/profiles/${profile_id}/attachments/${attachment_id}/upgrade"
  • upgradeAttachmentOptions := securityAndComplianceCenterService.NewUpgradeAttachmentOptions(
      "acd7032c-15a3-484f-bf5b-67d41534d940",
      profileIDLink,
      attachmentIDLink,
    )
    
    profileAttachment, response, err := securityAndComplianceCenterService.UpgradeAttachment(upgradeAttachmentOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(profileAttachment, "", "  ")
    fmt.Println(string(b))
  • const params = {
      instanceId: 'acd7032c-15a3-484f-bf5b-67d41534d940',
      profileId: profileIdLink,
      attachmentId: attachmentIdLink,
    };
    
    let res;
    try {
      res = await securityAndComplianceCenterService.upgradeAttachment(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • response = security_and_compliance_center_service.upgrade_attachment(
      instance_id='acd7032c-15a3-484f-bf5b-67d41534d940',
      profile_id=profile_id_link,
      attachment_id=attachment_id_link,
    )
    profile_attachment = response.get_result()
    
    print(json.dumps(profile_attachment, indent=2))
  • UpgradeAttachmentOptions upgradeAttachmentOptions = new UpgradeAttachmentOptions.Builder()
      .instanceId("acd7032c-15a3-484f-bf5b-67d41534d940")
      .profileId(profileIdLink)
      .attachmentId(attachmentIdLink)
      .build();
    
    Response<ProfileAttachment> response = securityAndComplianceCenterService.upgradeAttachment(upgradeAttachmentOptions).execute();
    ProfileAttachment profileAttachment = response.getResult();
    
    System.out.println(profileAttachment);

Response

The configuration set when starting a scan against a profile

The configuration set when starting a scan against a profile.

The configuration set when starting a scan against a profile.

The configuration set when starting a scan against a profile.

The configuration set when starting a scan against a profile.

Status Code

  • The attachment was created successfully.

  • The request body is invalid.

  • The request is unauthorized.

  • You are not authorized to access this resource.

  • Internal server error

Example responses
  • {
      "status_code": 400,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "bad_request",
          "message": "Invaild sort parameter",
          "target": {
            "type": "parameter",
            "name": "sort",
            "value": "non_existant_parameter"
          }
        }
      ]
    }
  • {
      "status_code": 400,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "bad_request",
          "message": "Invaild sort parameter",
          "target": {
            "type": "parameter",
            "name": "sort",
            "value": "non_existant_parameter"
          }
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "missing_s2s_auth",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "missing_s2s_auth",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "forbidden",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "forbidden",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 500,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "internal_error",
          "message": "Internal server error"
        }
      ]
    }
  • {
      "status_code": 500,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "internal_error",
          "message": "Internal server error"
        }
      ]
    }

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 /instances/{instance_id}/v3/control_libraries
(securityAndComplianceCenter *SecurityAndComplianceCenterV3) CreateCustomControlLibrary(createCustomControlLibraryOptions *CreateCustomControlLibraryOptions) (result *ControlLibrary, response *core.DetailedResponse, err error)
(securityAndComplianceCenter *SecurityAndComplianceCenterV3) CreateCustomControlLibraryWithContext(ctx context.Context, createCustomControlLibraryOptions *CreateCustomControlLibraryOptions) (result *ControlLibrary, response *core.DetailedResponse, err error)
createCustomControlLibrary(params)
custom_control_library_create(
        self,
        instance_id: str,
        control_library_name: str,
        control_library_description: str,
        control_library_type: str,
        control_library_version: str,
        controls: List['ControlPrototype'],
        *,
        account_id: Optional[str] = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<ControlLibrary> createCustomControlLibrary(CreateCustomControlLibraryOptions createCustomControlLibraryOptions)

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.

Path Parameters

  • The ID of the Security and Compliance Center instance.

    Possible values: length = 36, Value must match regular expression ^[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}$

    Example: acd7032c-15a3-484f-bf5b-67d41534d940

Query Parameters

  • The user account ID.

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

The request body to create a custom control library.

Examples:
{
  "control_library_description": "This is a custom control library made from the SDK test framework",
  "control_library_name": "custom control library from SDK",
  "control_library_type": "custom",
  "control_library_version": "0.0.1",
  "control_parent": "",
  "controls": [
    {
      "control_description": "This is a description of a control",
      "control_name": "security",
      "control_parent": "",
      "control_category": "test-control",
      "control_requirement": true,
      "control_docs": {},
      "control_specifications": [
        {
          "component_id": "apprapp",
          "control_specification_description": "This field is used to describe a control specification",
          "environment": "ibm-cloud",
          "assessments": [
            {
              "assessment_description": "This rule will check on regulation",
              "assessment_id": "rule-d1bd9f3f-bee1-46c5-9533-da8bba9eed4e"
            }
          ]
        }
      ],
      "status": "disabled"
    }
  ]
}

WithContext method only

The CreateCustomControlLibrary options.

parameters

  • The ID of the Security and Compliance Center instance.

    Possible values: length = 36, Value must match regular expression /^[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}$/

    Examples:
  • The name of the control library.

    Examples:
  • Details of the control library.

    Examples:
  • Details that the control library is a user made(custom) or Security Compliance Center(predefined).

    Allowable values: [custom]

    Examples:
  • The revision number of the control library.

    Examples:
  • The list of rules that the control library attempts to adhere to.

    Possible values: 0 ≤ number of items ≤ 999

    Examples:
  • The user account ID.

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

parameters

  • The ID of the Security and Compliance Center instance.

    Possible values: length = 36, Value must match regular expression /^[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}$/

    Examples:
  • The name of the control library.

    Examples:
  • Details of the control library.

    Examples:
  • Details that the control library is a user made(custom) or Security Compliance Center(predefined).

    Allowable values: [custom]

    Examples:
  • The revision number of the control library.

    Examples:
  • The list of rules that the control library attempts to adhere to.

    Possible values: 0 ≤ number of items ≤ 999

    Examples:
  • The user account ID.

    Possible values: 1 ≤ length ≤ 128, 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_description": "This is a custom control library made from the SDK test framework", "control_library_name": "custom control library from SDK", "control_library_type": "custom", "control_library_version": "0.0.1", "control_parent": "", "controls": [ { "control_description": "This is a description of a control", "control_name": "security", "control_parent": "", "control_category": "test-control", "control_requirement": true, "control_docs":  }, "control_specifications": [ { "component_id": "apprapp", "control_specification_description": "This field is used to describe a control specification", "environment": "ibm-cloud", "assessments": [ { "assessment_description": "This rule will check on regulation", "assessment_id": "rule-d1bd9f3f-bee1-46c5-9533-da8bba9eed4e" } ] } ], "status": "disabled" } ] }'   "${base_url}/instances/${instance_id}/v3/control_libraries"
  • assessmentPrototypeModel := &securityandcompliancecenterv3.AssessmentPrototype{
      AssessmentID: core.StringPtr("rule-d1bd9f3f-bee1-46c5-9533-da8bba9eed4e"),
      AssessmentDescription: core.StringPtr("This rule will check on regulation"),
    }
    
    controlSpecificationPrototypeModel := &securityandcompliancecenterv3.ControlSpecificationPrototype{
      ComponentID: core.StringPtr("apprapp"),
      Environment: core.StringPtr("ibm-cloud"),
      ControlSpecificationDescription: core.StringPtr("This field is used to describe a control specification"),
      Assessments: []securityandcompliancecenterv3.AssessmentPrototype{*assessmentPrototypeModel},
    }
    
    controlDocModel := &securityandcompliancecenterv3.ControlDoc{
    }
    
    controlPrototypeModel := &securityandcompliancecenterv3.ControlPrototype{
      ControlName: core.StringPtr("security"),
      ControlDescription: core.StringPtr("This is a description of a control"),
      ControlCategory: core.StringPtr("test-control"),
      ControlRequirement: core.BoolPtr(true),
      ControlSpecifications: []securityandcompliancecenterv3.ControlSpecificationPrototype{*controlSpecificationPrototypeModel},
      ControlDocs: controlDocModel,
      Status: core.StringPtr("disabled"),
    }
    
    createCustomControlLibraryOptions := securityAndComplianceCenterService.NewCreateCustomControlLibraryOptions(
      "acd7032c-15a3-484f-bf5b-67d41534d940",
      "custom control library from SDK",
      "This is a custom control library made from the SDK test framework",
      "custom",
      "0.0.1",
      []securityandcompliancecenterv3.ControlPrototype{*controlPrototypeModel},
    )
    
    controlLibrary, response, err := securityAndComplianceCenterService.CreateCustomControlLibrary(createCustomControlLibraryOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(controlLibrary, "", "  ")
    fmt.Println(string(b))
  • // Request models needed by this operation.
    
    // AssessmentPrototype
    const assessmentPrototypeModel = {
      assessment_id: 'rule-d1bd9f3f-bee1-46c5-9533-da8bba9eed4e',
      assessment_description: 'This rule will check on regulation',
    };
    
    // ControlSpecificationPrototype
    const controlSpecificationPrototypeModel = {
      component_id: 'apprapp',
      environment: 'ibm-cloud',
      control_specification_description: 'This field is used to describe a control specification',
      assessments: [assessmentPrototypeModel],
    };
    
    // ControlDoc
    const controlDocModel = {
    };
    
    // ControlPrototype
    const controlPrototypeModel = {
      control_name: 'security',
      control_description: 'This is a description of a control',
      control_category: 'test-control',
      control_requirement: true,
      control_parent: 'testString',
      control_specifications: [controlSpecificationPrototypeModel],
      control_docs: controlDocModel,
      status: 'disabled',
    };
    
    const params = {
      instanceId: 'acd7032c-15a3-484f-bf5b-67d41534d940',
      controlLibraryName: 'custom control library from SDK',
      controlLibraryDescription: 'This is a custom control library made from the SDK test framework',
      controlLibraryType: 'custom',
      controlLibraryVersion: '0.0.1',
      controls: [controlPrototypeModel],
    };
    
    let res;
    try {
      res = await securityAndComplianceCenterService.createCustomControlLibrary(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • assessment_prototype_model = {
      'assessment_id': 'rule-d1bd9f3f-bee1-46c5-9533-da8bba9eed4e',
      'assessment_description': 'This rule will check on regulation',
    }
    
    control_specification_prototype_model = {
      'component_id': 'apprapp',
      'environment': 'ibm-cloud',
      'control_specification_description': 'This field is used to describe a control specification',
      'assessments': [assessment_prototype_model],
    }
    
    control_doc_model = {
    }
    
    control_prototype_model = {
      'control_name': 'security',
      'control_description': 'This is a description of a control',
      'control_category': 'test-control',
      'control_requirement': True,
      'control_parent': 'testString',
      'control_specifications': [control_specification_prototype_model],
      'control_docs': control_doc_model,
      'status': 'disabled',
    }
    
    response = security_and_compliance_center_service.create_custom_control_library(
      instance_id='acd7032c-15a3-484f-bf5b-67d41534d940',
      control_library_name='custom control library from SDK',
      control_library_description='This is a custom control library made from the SDK test framework',
      control_library_type='custom',
      control_library_version='0.0.1',
      controls=[control_prototype_model],
    )
    control_library = response.get_result()
    
    print(json.dumps(control_library, indent=2))
  • AssessmentPrototype assessmentPrototypeModel = new AssessmentPrototype.Builder()
      .assessmentId("rule-d1bd9f3f-bee1-46c5-9533-da8bba9eed4e")
      .assessmentDescription("This rule will check on regulation")
      .build();
    ControlSpecificationPrototype controlSpecificationPrototypeModel = new ControlSpecificationPrototype.Builder()
      .componentId("apprapp")
      .environment("ibm-cloud")
      .controlSpecificationDescription("This field is used to describe a control specification")
      .assessments(java.util.Arrays.asList(assessmentPrototypeModel))
      .build();
    ControlDoc controlDocModel = new ControlDoc.Builder()
      .build();
    ControlPrototype controlPrototypeModel = new ControlPrototype.Builder()
      .controlName("security")
      .controlDescription("This is a description of a control")
      .controlCategory("test-control")
      .controlRequirement(true)
      .controlSpecifications(java.util.Arrays.asList(controlSpecificationPrototypeModel))
      .controlDocs(controlDocModel)
      .status("disabled")
      .build();
    CreateCustomControlLibraryOptions createCustomControlLibraryOptions = new CreateCustomControlLibraryOptions.Builder()
      .instanceId("acd7032c-15a3-484f-bf5b-67d41534d940")
      .controlLibraryName("custom control library from SDK")
      .controlLibraryDescription("This is a custom control library made from the SDK test framework")
      .controlLibraryType("custom")
      .controlLibraryVersion("0.0.1")
      .controls(java.util.Arrays.asList(controlPrototypeModel))
      .build();
    
    Response<ControlLibrary> response = securityAndComplianceCenterService.createCustomControlLibrary(createCustomControlLibraryOptions).execute();
    ControlLibrary controlLibrary = response.getResult();
    
    System.out.println(controlLibrary);

Response

A Control Library

A Control Library.

A Control Library.

A Control Library.

A Control Library.

Status Code

  • The control library was created successfully.

  • The request body is invalid.

  • The request is unauthorized.

  • You are not authorized to access this resource.

  • Internal server error

Example responses
  • {
      "status_code": 400,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "bad_request",
          "message": "Invaild sort parameter",
          "target": {
            "type": "parameter",
            "name": "sort",
            "value": "non_existant_parameter"
          }
        }
      ]
    }
  • {
      "status_code": 400,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "bad_request",
          "message": "Invaild sort parameter",
          "target": {
            "type": "parameter",
            "name": "sort",
            "value": "non_existant_parameter"
          }
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "missing_s2s_auth",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "missing_s2s_auth",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "forbidden",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "forbidden",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 500,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "internal_error",
          "message": "Internal server error"
        }
      ]
    }
  • {
      "status_code": 500,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "internal_error",
          "message": "Internal server error"
        }
      ]
    }

Get all control libraries

Retrieve all the control libraries, 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 the control libraries, 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 the control libraries, 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 the control libraries, 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 the control libraries, 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 /instances/{instance_id}/v3/control_libraries
(securityAndComplianceCenter *SecurityAndComplianceCenterV3) ListControlLibraries(listControlLibrariesOptions *ListControlLibrariesOptions) (result *ControlLibraryCollection, response *core.DetailedResponse, err error)
(securityAndComplianceCenter *SecurityAndComplianceCenterV3) ListControlLibrariesWithContext(ctx context.Context, listControlLibrariesOptions *ListControlLibrariesOptions) (result *ControlLibraryCollection, response *core.DetailedResponse, err error)
listControlLibraries(params)
list(
        self,
        instance_id: str,
        *,
        account_id: Optional[str] = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<ControlLibraryCollection> listControlLibraries(ListControlLibrariesOptions listControlLibrariesOptions)

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.

Path Parameters

  • The ID of the Security and Compliance Center instance.

    Possible values: length = 36, Value must match regular expression ^[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}$

    Example: acd7032c-15a3-484f-bf5b-67d41534d940

Query Parameters

  • The user account ID.

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

WithContext method only

The ListControlLibraries options.

parameters

  • The ID of the Security and Compliance Center instance.

    Possible values: length = 36, Value must match regular expression /^[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}$/

    Examples:
  • The user account ID.

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

parameters

  • The ID of the Security and Compliance Center instance.

    Possible values: length = 36, Value must match regular expression /^[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}$/

    Examples:
  • The user account ID.

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

The listControlLibraries options.

  • curl -X GET --location --header "Authorization: Bearer ${iam_token}"   --header "Accept: application/json"   "${base_url}/instances/${instance_id}/v3/control_libraries"
  • listControlLibrariesOptions := securityAndComplianceCenterService.NewListControlLibrariesOptions(
      "acd7032c-15a3-484f-bf5b-67d41534d940",
    )
    
    controlLibraryCollection, response, err := securityAndComplianceCenterService.ListControlLibraries(listControlLibrariesOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(controlLibraryCollection, "", "  ")
    fmt.Println(string(b))
  • const params = {
      instanceId: 'acd7032c-15a3-484f-bf5b-67d41534d940',
    };
    
    let res;
    try {
      res = await securityAndComplianceCenterService.listControlLibraries(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • response = security_and_compliance_center_service.list_control_libraries(
      instance_id='acd7032c-15a3-484f-bf5b-67d41534d940',
    )
    control_library_collection = response.get_result()
    
    print(json.dumps(control_library_collection, indent=2))
  • ListControlLibrariesOptions listControlLibrariesOptions = new ListControlLibrariesOptions.Builder()
      .instanceId("acd7032c-15a3-484f-bf5b-67d41534d940")
      .build();
    
    Response<ControlLibraryCollection> response = securityAndComplianceCenterService.listControlLibraries(listControlLibrariesOptions).execute();
    ControlLibraryCollection controlLibraryCollection = response.getResult();
    
    System.out.println(controlLibraryCollection);

Response

A list of control libraries

A list of control libraries.

A list of control libraries.

A list of control libraries.

A list of control libraries.

Status Code

  • The control libraries were successfully retrieved.

  • The request body is invalid.

  • The request is unauthorized.

  • You are not authorized to access this resource.

  • Internal server error

Example responses
  • {
      "status_code": 400,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "bad_request",
          "message": "Invaild sort parameter",
          "target": {
            "type": "parameter",
            "name": "sort",
            "value": "non_existant_parameter"
          }
        }
      ]
    }
  • {
      "status_code": 400,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "bad_request",
          "message": "Invaild sort parameter",
          "target": {
            "type": "parameter",
            "name": "sort",
            "value": "non_existant_parameter"
          }
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "missing_s2s_auth",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "missing_s2s_auth",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "forbidden",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "forbidden",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 500,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "internal_error",
          "message": "Internal server error"
        }
      ]
    }
  • {
      "status_code": 500,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "internal_error",
          "message": "Internal server error"
        }
      ]
    }

Update a custom control library

Update a custom 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.

Update a custom 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.

Update a custom 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.

Update a custom 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.

Update a custom 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.

PUT /instances/{instance_id}/v3/control_libraries/{control_library_id}
(securityAndComplianceCenter *SecurityAndComplianceCenterV3) ReplaceCustomControlLibrary(replaceCustomControlLibraryOptions *ReplaceCustomControlLibraryOptions) (result *ControlLibrary, response *core.DetailedResponse, err error)
(securityAndComplianceCenter *SecurityAndComplianceCenterV3) ReplaceCustomControlLibraryWithContext(ctx context.Context, replaceCustomControlLibraryOptions *ReplaceCustomControlLibraryOptions) (result *ControlLibrary, response *core.DetailedResponse, err error)
replaceCustomControlLibrary(params)
custom_control_library_replace(
        self,
        instance_id: str,
        control_library_id: str,
        control_library_name: str,
        control_library_description: str,
        control_library_type: str,
        control_library_version: str,
        controls: List['ControlPrototype'],
        *,
        bss_account: Optional[str] = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<ControlLibrary> replaceCustomControlLibrary(ReplaceCustomControlLibraryOptions replaceCustomControlLibraryOptions)

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.

Path Parameters

  • The ID of the Security and Compliance Center instance.

    Possible values: length = 36, Value must match regular expression ^[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}$

    Example: acd7032c-15a3-484f-bf5b-67d41534d940

  • The predefined control library ID.

Query Parameters

  • The account id tied to billing.

The request body to update control library.

WithContext method only

The ReplaceCustomControlLibrary options.

parameters

  • The ID of the Security and Compliance Center instance.

    Possible values: length = 36, Value must match regular expression /^[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}$/

    Examples:
  • The predefined control library ID.

  • The name of the control library.

  • Details of the control library.

  • Details that the control library is a user made(custom) or Security Compliance Center(predefined).

    Allowable values: [custom]

  • The revision number of the control library.

  • The list of rules that the control library attempts to adhere to.

    Possible values: 0 ≤ number of items ≤ 999

  • The account id tied to billing.

parameters

  • The ID of the Security and Compliance Center instance.

    Possible values: length = 36, Value must match regular expression /^[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}$/

    Examples:
  • The predefined control library ID.

  • The name of the control library.

  • Details of the control library.

  • Details that the control library is a user made(custom) or Security Compliance Center(predefined).

    Allowable values: [custom]

  • The revision number of the control library.

  • The list of rules that the control library attempts to adhere to.

    Possible values: 0 ≤ number of items ≤ 999

  • The account id tied to billing.

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": "testString", "control_library_description": "testString", "control_library_type": "custom", "control_library_version": "testString", "controls": [] }'   "${base_url}/instances/${instance_id}/v3/control_libraries/${control_library_id}"
  • controlSpecificationPrototypeModel := &securityandcompliancecenterv3.ControlSpecificationPrototype{
    }
    
    controlPrototypeModel := &securityandcompliancecenterv3.ControlPrototype{
      ControlName: core.StringPtr("testString"),
      ControlCategory: core.StringPtr("testString"),
      ControlRequirement: core.BoolPtr(true),
      ControlSpecifications: []securityandcompliancecenterv3.ControlSpecificationPrototype{*controlSpecificationPrototypeModel},
    }
    
    replaceCustomControlLibraryOptions := securityAndComplianceCenterService.NewReplaceCustomControlLibraryOptions(
      "acd7032c-15a3-484f-bf5b-67d41534d940",
      controlLibraryIDLink,
      "testString",
      "testString",
      "custom",
      "testString",
      []securityandcompliancecenterv3.ControlPrototype{*controlPrototypeModel},
    )
    
    controlLibrary, response, err := securityAndComplianceCenterService.ReplaceCustomControlLibrary(replaceCustomControlLibraryOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(controlLibrary, "", "  ")
    fmt.Println(string(b))
  • // Request models needed by this operation.
    
    // ControlSpecificationPrototype
    const controlSpecificationPrototypeModel = {
    };
    
    // ControlPrototype
    const controlPrototypeModel = {
      control_name: 'testString',
      control_category: 'testString',
      control_requirement: true,
      control_specifications: [controlSpecificationPrototypeModel],
    };
    
    const params = {
      instanceId: 'acd7032c-15a3-484f-bf5b-67d41534d940',
      controlLibraryId: controlLibraryIdLink,
      controlLibraryName: 'testString',
      controlLibraryDescription: 'testString',
      controlLibraryType: 'custom',
      controlLibraryVersion: 'testString',
      controls: [controlPrototypeModel],
    };
    
    let res;
    try {
      res = await securityAndComplianceCenterService.replaceCustomControlLibrary(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • control_specification_prototype_model = {
    }
    
    control_prototype_model = {
      'control_name': 'testString',
      'control_category': 'testString',
      'control_requirement': True,
      'control_specifications': [control_specification_prototype_model],
    }
    
    response = security_and_compliance_center_service.replace_custom_control_library(
      instance_id='acd7032c-15a3-484f-bf5b-67d41534d940',
      control_library_id=control_library_id_link,
      control_library_name='testString',
      control_library_description='testString',
      control_library_type='custom',
      control_library_version='testString',
      controls=[control_prototype_model],
    )
    control_library = response.get_result()
    
    print(json.dumps(control_library, indent=2))
  • ControlSpecificationPrototype controlSpecificationPrototypeModel = new ControlSpecificationPrototype.Builder()
      .build();
    ControlPrototype controlPrototypeModel = new ControlPrototype.Builder()
      .controlName("testString")
      .controlCategory("testString")
      .controlRequirement(true)
      .controlSpecifications(java.util.Arrays.asList(controlSpecificationPrototypeModel))
      .build();
    ReplaceCustomControlLibraryOptions replaceCustomControlLibraryOptions = new ReplaceCustomControlLibraryOptions.Builder()
      .instanceId("acd7032c-15a3-484f-bf5b-67d41534d940")
      .controlLibraryId(controlLibraryIdLink)
      .controlLibraryName("testString")
      .controlLibraryDescription("testString")
      .controlLibraryType("custom")
      .controlLibraryVersion("testString")
      .controls(java.util.Arrays.asList(controlPrototypeModel))
      .build();
    
    Response<ControlLibrary> response = securityAndComplianceCenterService.replaceCustomControlLibrary(replaceCustomControlLibraryOptions).execute();
    ControlLibrary controlLibrary = response.getResult();
    
    System.out.println(controlLibrary);

Response

A Control Library

A Control Library.

A Control Library.

A Control Library.

A Control Library.

Status Code

  • The control library was updated successfully.

  • The request body is invalid.

  • The request is unauthorized.

  • You are not authorized to access this resource.

  • Internal server error

Example responses
  • {
      "status_code": 400,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "bad_request",
          "message": "Invaild sort parameter",
          "target": {
            "type": "parameter",
            "name": "sort",
            "value": "non_existant_parameter"
          }
        }
      ]
    }
  • {
      "status_code": 400,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "bad_request",
          "message": "Invaild sort parameter",
          "target": {
            "type": "parameter",
            "name": "sort",
            "value": "non_existant_parameter"
          }
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "missing_s2s_auth",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "missing_s2s_auth",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "forbidden",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "forbidden",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 500,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "internal_error",
          "message": "Internal server error"
        }
      ]
    }
  • {
      "status_code": 500,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "internal_error",
          "message": "Internal server error"
        }
      ]
    }

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 /instances/{instance_id}/v3/control_libraries/{control_library_id}
(securityAndComplianceCenter *SecurityAndComplianceCenterV3) GetControlLibrary(getControlLibraryOptions *GetControlLibraryOptions) (result *ControlLibrary, response *core.DetailedResponse, err error)
(securityAndComplianceCenter *SecurityAndComplianceCenterV3) GetControlLibraryWithContext(ctx context.Context, getControlLibraryOptions *GetControlLibraryOptions) (result *ControlLibrary, response *core.DetailedResponse, err error)
getControlLibrary(params)
control_library_get(
        self,
        instance_id: str,
        control_library_id: str,
        *,
        account_id: Optional[str] = None,
        **kwargs,
    ) -> DetailedResponse
ServiceCall<ControlLibrary> getControlLibrary(GetControlLibraryOptions getControlLibraryOptions)

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.

Path Parameters

  • The ID of the Security and Compliance Center instance.

    Possible values: length = 36, Value must match regular expression ^[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}$

    Example: acd7032c-15a3-484f-bf5b-67d41534d940

  • The predefined control library ID.

Query Parameters

  • The user account ID.

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

WithContext method only

The GetControlLibrary options.

parameters

  • The ID of the Security and Compliance Center instance.

    Possible values: length = 36, Value must match regular expression /^[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}$/

    Examples:
  • The predefined control library ID.

  • The user account ID.

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

parameters

  • The ID of the Security and Compliance Center instance.

    Possible values: length = 36, Value must match regular expression /^[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}$/

    Examples:
  • The predefined control library ID.

  • The user account ID.

    Possible values: 1 ≤ length ≤ 128, 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}/instances/${instance_id}/v3/control_libraries/${control_library_id}"
  • getControlLibraryOptions := securityAndComplianceCenterService.NewGetControlLibraryOptions(
      "acd7032c-15a3-484f-bf5b-67d41534d940",
      controlLibraryIDLink,
    )
    
    controlLibrary, response, err := securityAndComplianceCenterService.GetControlLibrary(getControlLibraryOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(controlLibrary, "", "  ")
    fmt.Println(string(b))
  • const params = {
      instanceId: 'acd7032c-15a3-484f-bf5b-67d41534d940',
      controlLibraryId: controlLibraryIdLink,
    };
    
    let res;
    try {
      res = await securityAndComplianceCenterService.getControlLibrary(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • response = security_and_compliance_center_service.get_control_library(
      instance_id='acd7032c-15a3-484f-bf5b-67d41534d940',
      control_library_id=control_library_id_link,
    )
    control_library = response.get_result()
    
    print(json.dumps(control_library, indent=2))
  • GetControlLibraryOptions getControlLibraryOptions = new GetControlLibraryOptions.Builder()
      .instanceId("acd7032c-15a3-484f-bf5b-67d41534d940")
      .controlLibraryId(controlLibraryIdLink)
      .build();
    
    Response<ControlLibrary> response = securityAndComplianceCenterService.getControlLibrary(getControlLibraryOptions).execute();
    ControlLibrary controlLibrary = response.getResult();
    
    System.out.println(controlLibrary);

Response

A Control Library

A Control Library.

A Control Library.

A Control Library.

A Control Library.

Status Code

  • The control library was retrieved successfully.

  • The request body is invalid.

  • The request is unauthorized.

  • You are not authorized to access this resource.

  • Internal server error

Example responses
  • {
      "status_code": 400,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "bad_request",
          "message": "Invaild sort parameter",
          "target": {
            "type": "parameter",
            "name": "sort",
            "value": "non_existant_parameter"
          }
        }
      ]
    }
  • {
      "status_code": 400,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "bad_request",
          "message": "Invaild sort parameter",
          "target": {
            "type": "parameter",
            "name": "sort",
            "value": "non_existant_parameter"
          }
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "missing_s2s_auth",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 401,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "missing_s2s_auth",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "forbidden",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 403,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "forbidden",
          "message": "You are not authorized."
        }
      ]
    }
  • {
      "status_code": 500,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "internal_error",
          "message": "Internal server error"
        }
      ]
    }
  • {
      "status_code": 500,
      "trace": "d753c94b-c0ce-4109-9f25-518b8395c5b8",
      "errors": [
        {
          "code": "internal_error",
          "message": "Internal server error"
        }
      ]
    }

Delete a custom control library

Delete a custom 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.

Delete a custom 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.

Delete a custom 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.

Delete a custom 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.

Delete a custom 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.

DELETE /instances/{instance_id}/v3/control_libraries/{control_library_id}
(securityAndComplianceCenter *SecurityAndComplianceCenterV3) DeleteCustomControlLibrary(deleteCustomControlLibraryOptions *DeleteCustomControlLibraryOptions) (result *ControlLibrary, response *core.DetailedResponse, err error)
(securityAndComplianceCenter *SecurityAndComplianceCenterV3) DeleteCustomControlLibraryWithContext(ctx context.Context, deleteCustomControlLibraryOptions *DeleteCustomControlLibraryOptions) (result *ControlLibrary, response *core.DetailedResponse, err error)