Customizing the IBM Cloud catalog and private catalogs for users in your account
Private catalogs provide a way to centrally manage access to products in the IBM Cloud® catalog and your own catalogs. You can customize the public catalog and your private catalogs to make specific solutions available to users in your account. By doing so, you can ensure that your catalogs are relevant to your business.
To create catalogs to centrally manage your objects, such as Virtual Private Endpoints, see Create objects for your private catalog.
Before you begin
- Verify that you're using a Pay-As-You-Go or Subscription account. See Viewing your account type for more details.
- Make sure you have the administrator role on the catalog management service to complete this task.
Before you begin
- Verify that you're using a Pay-As-You-Go or Subscription account. See Viewing your account type for more details.
- Make sure you have the administrator role on the catalog management service to complete this task.
Before you begin
-
Verify that you're using a Pay-As-You-Go or Subscription account. See Viewing your account type for more details.
-
Make sure you have the administrator role on the catalog management service to complete this task.
-
Run the following command to install the catalogs management plug-in:
ibmcloud plugin install catalogs-management
Before you begin
-
Verify that you're using a Pay-As-You-Go or Subscription account. See Viewing your account type for more details.
-
Make sure you have the administrator role on the catalog management service to complete this task.
-
To customize catalogs by using Terraform, make sure that you have completed the following:
- Install the Terraform CLI and configure the IBM Cloud Provider plug-in for Terraform. For more information, see the tutorial for Getting started with Terraform on IBM Cloud®. The plug-in abstracts the IBM Cloud APIs that are used to complete this task.
- Create a Terraform configuration file to define resources by using HashiCorp Configuration Language. For more information, see the Terraform documentation.
Creating a private catalog with all products included by using the console
Complete the following steps to create a catalog that includes all products in the IBM Cloud catalog:
- Go to Manage > Catalogs, in the IBM Cloud console, and click Create a catalog.
- Select the Product (default) catalog type.
- Enter a name and description.
- Make sure the All products option is selected, and click Create. The availability is based on the filters set at the account level on the Settings page.
- Confirm that the catalog includes all products by clicking the catalog name > Manage filters. Then, check that Include all products in the IBM Cloud catalog is selected in Step 1: Select to include or exclude all products in the IBM Cloud catalog.
Creating a private catalog with select products included by using the console
Complete the following steps to create a catalog that includes a specific set of products in the IBM Cloud catalog:
- Go to Manage > Catalogs, in the IBM Cloud console, and click Create a catalog.
- Select the Product (default) catalog type.
- Enter a name and description.
- Click Create.
- Click the catalog name > Manage filters.
- Select Exclude all products in the IBM Cloud catalog in Step 1: Select to include or exclude all products in the IBM Cloud catalog.
- Skip step 2, and click Add in Step 3: Add exceptions to the rules.
- Make sure Include is selected as the condition, and then individually select the products you want users to access. In the case of our example project, you select watsonx Assistant, Speech to Text, and Text to Speech.
Setting the visibility of the IBM Cloud catalog by using the console
Now that you've created your private catalogs, complete the following steps to turn off visibility of the public catalog to all users in your account.
- Click Catalogs in the breadcrumb.
- Click Settings.
- Set IBM Cloud catalog to Off.
- Confirm that your filters and settings are correctly applied by going to the public catalog, and expanding the catalog switcher. Only the private catalogs in your account should be displayed in the list.
You can update which products are included or excluded at any time by updating your private catalog's settings.
Authorizing access to private catalogs by using the console
To authorize users to work with the products in your private catalogs, assign them the viewer role on the catalog management service.
Deleting a private catalog by using the console
If you delete a private catalog, all of the products within the catalog are deleted as well. Complete the following steps to delete a private catalog:
- Go to Manage > Catalogs, in the IBM Cloud console, and click Private catalogs.
- Click the Actions icon for the catalog you want to delete, and select Delete.
You can restore a private catalog within 7 days after you delete it.
Creating a private catalog with all products included by using the CLI
Complete the following steps to create a catalog that includes all products in the IBM Cloud catalog:
-
Target a resource group to create a catalog. You can run the
ibmcloud resource groups
command, and then theibmcloud target -g "resource group"
command. -
Use the following command to create a new private catalog in your account.
ibmcloud catalog create --name CATALOG [--catalog-description "DESCRIPTION"]
All the IBM Cloud catalog products are visible by default when you create a new private catalog. See the Catalogs management CLI for more information.
Creating a private catalog with select products included by using the CLI
Complete the following steps to create a catalog that includes a specific set of products in the IBM Cloud catalog:
- Target a resource group to create a catalog. You can run the
ibmcloud resource groups
command, and then theibmcloud target -g "resource group"
command. - Create a new private catalog in your account using the following command.
ibmcloud catalog create --name CATALOG [--catalog-description "DESCRIPTION"]
- Update the filter to include or exclude a particular product or products and any applicable pricing plans. Make sure to specify your catalog, or the filter will default to the account level. See Catalogs management CLI for more command options.
ibmcloud catalog filter offering --offering PRODUCT-NAME
Setting the visibility of the IBM Cloud catalog by using the CLI
By default, the IBM Cloud public catalog is visible to all users in the account. You can make products available only to the users you choose by turning off visibility to the IBM Cloud catalog and adding the products to your private catalogs. Use the following command to turn off visibility of the public catalog to all users in your account.
ibmcloud catalog filter hide-ibm-public-catalog
Authorizing access to private catalogs by using the CLI
To authorize users to work with the products in your private catalogs, assign them the viewer role on the catalog management service.
Deleting a private catalog by using the CLI
If you delete a private catalog, all of the products within the catalog are deleted as well. Run the following command to delete a private catalog:
ibmcloud catalog delete --catalog CATALOG
You can restore a private catalog within 7 days after you delete it.
Creating a private catalog with all products included by using the API
To create a catalog that includes all products in the IBM Cloud catalog, call the Catalog Management API as shown in the following sample request. Replace variables with the values from your account.
curl -X 'POST' \
'https://dev-cm.globalcatalog.test.cloud.ibm.com/api/v1-beta/catalogs' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H "Authorization: ${IC_IAM_TOKEN}" \
-d '{"label": "testcurlcatalog", "short_description": "testing creating a catalog through curl"}'
ServiceCall<Catalog> createCatalog(CreateCatalogOptions createCatalogOptions)
Example request
String label = "{label}";
String shortDesc = "{shortDesc}";
CreateCatalogOptions createOptions = new CreateCatalogOptions.Builder().label(label).shortDescription(shortDesc).build();
Response<Catalog> response = service.createCatalog(createOptions).execute();
System.out.println(response.getResult());
createCatalog(params, [callback()])
Example request
label = "{label}";
shortDesc = "{shortDesc}";
response = await service.createCatalog({ 'label': label, 'shortDescription': shortDesc });
console.log(response);
create_catalog(self, id=None, rev=None, label=None, short_description=None, catalog_icon_url=None, tags=None, url=None, crn=None, offerings_url=None, features=None, disabled=None, created=None, updated=None, resource_group_id=None, owning_account=None, catalog_filters=None, syndication_settings=None, **kwargs)
Exapmle request
label = "{label}"
shortDesc = "{shortDesc}"
response = self.service.create_catalog(label=label, short_description=shortDesc)
print(response)
(catalogManagement *CatalogManagementV1) CreateCatalog(createCatalogOptions *CreateCatalogOptions) (result *Catalog, response *core.DetailedResponse, err error)
Example request
label := "{label}"
shortDesc := "{shortDesc}"
createOptions := service.NewCreateCatalogOptions()
createOptions.SetLabel(label)
createOptions.SetShortDescription(shortDesc)
_, response, _ := service.CreateCatalog(createOptions)
fmt.Println(response)
All the IBM Cloud public catalog products are visible by default when you create a new private catalog. See the Catalog Management API for more information.
Creating a private catalog with select products included by using the API
To create a catalog that includes a specific set of products in the IBM Cloud catalog, call the Catalog Management API as shown in the following sample request. Replace variables with the values from your account.
curl -X 'POST' \
'https://dev-cm.globalcatalog.test.cloud.ibm.com/api/v1-beta/catalogs' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H "Authorization: ${IC_IAM_TOKEN}" \
-d '{"label": "testcurlcatalog4", "short_description": "testing creating a catalog through curl", "catalog_filters": { "include_all": false, "id_filters": { "include": { "filter_terms": [ "AdvancedMobileAccess-d6aece47-d840-45b0-8ab9-ad15354deeea" ] } } }}'
Make sure to exclude all public catalog products by setting the include_all
field has a boolean value of false
for each catalog_filters
object. To specify the products you want to include you can filter
by category_filters
or id_filters
. Give filter_terms
the product property or product ID you want to include. In this example, AdvancedMobileAccess-d6aece47-d840-45b0-8ab9-ad15354deeea
is
a product ID.
See the Catalog Management API for more command options.
Setting the visibility of the IBM Cloud catalog by using the API
To hide the public catalog in an account, make sure the hide_IBM_cloud_catalog
field has a boolean value of true
. Alternatively, you can give the include_all
field a boolean value of false
for each account_filters
object. Then only the private catalogs you create should be displayed in your account.
curl -X "PUT" "https://cm.globalcatalog.cloud.ibm.com/api/v1-beta/catalogaccount"
-H "accept: */*"
-H "Authorization: {iam-bearer-token}"
-d '{"id":"string","hide_IBM_cloud_catalog":true,"account_filters":{"include_all":true,"category_filters":{"additionalProp1":{"include":true,"filter":{"filter_terms":["string"]}},"additionalProp2":{"include":true,"filter":{"filter_terms":["string"]}},"additionalProp3":{"include":true,"filter":{"filter_terms":["string"]}}},"id_filters":{"include":{"filter_terms":["string"]},"exclude":{"filter_terms":["string"]}}}}'
See the Catalog Management API for more information.
Authorizing access to private catalogs by using the API
To authorize users to work with the products in your private catalogs, assign them the viewer role on the catalog management service.
Deleting a private catalog by using the API
If you delete a private catalog, all of the products within the catalog are deleted as well. Use the following command to delete a private catalog:
DELETE /catalogs/{catalog_identifier}
See the Catalog Management API for more information.
You can restore a private catalog within 7 days after you delete it.
Creating a private catalog by using Terraform
You cannot customize the public catalog and your private catalogs to make specific solutions available to users in your account by using Terraform. To customize the public catalog and your private catalogs, switch to the UI, CLI, or API steps.
Use the following steps to create a private catalog:
-
Create an argument in your
main.tf
file. The following example creates a catalog by using theibm_cm_catalog
resource, wherelabel
is a display name to identify the catalog.resource "ibm_cm_catalog" "cm_catalog" { label = "label" short_description = "short_description" }
For more information, see the argument reference details on the Terraform Catalog Management page.
-
After you finish building your configuration file, initialize the Terraform CLI. For more information, see Initializing Working Directories.
terraform init
-
Provision the resources from the
main.tf
file. For more information, see Provisioning Infrastructure with Terraform.-
Run
terraform plan
to generate a Terraform execution plan to preview the proposed actions.terraform plan
-
Run
terraform apply
to create the resources that are defined in the plan.terraform apply
-
Authorizing access to private catalogs by using Terraform
To authorize users to work with the products in your private catalogs, assign them the viewer role on the catalog management service.