copyright | lastupdated | keywords | subcollection | ||
---|---|---|---|---|---|
|
2024-02-05 |
catalog, restrict visibility, hide product, restrict by user, filter catalog, private catalog, catalog management service, public catalog, delete catalog, create catalog, catalog banner |
account |
{{site.data.keyword.attribute-definition-list}}
Customizing the {{site.data.keyword.cloud_notm}} catalog and private catalogs for users in your account
{: #restrict-by-user}
Private catalogs provide a way to centrally manage access to products in the {{site.data.keyword.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. {: shortdesc}
To create catalogs to centrally manage your objects, such as Virtual Private Endpoints, see Create objects for your private catalog. {: note}
{: #prereq-restrict-ui} {: ui}
- 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.
{: #prereq-restrict-api} {: api}
- 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.
{: #prereq-restrict-cli} {: cli}
-
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
{: codeblock}
{: #prereq-restrict-terraform} {: terraform}
-
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 {{site.data.keyword.cloud_notm}} Provider plug-in for Terraform. For more information, see the tutorial for Getting started with Terraform on {{site.data.keyword.cloud}}. The plug-in abstracts the {{site.data.keyword.cloud_notm}} 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{: external}.
{: #catalog-all-ui} {: ui}
Complete the following steps to create a catalog that includes all products in the {{site.data.keyword.cloud_notm}} catalog:
- Go to Manage > Catalogs, in the {{site.data.keyword.cloud_notm}} 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{: external}.
- Confirm that the catalog includes all products by clicking the catalog name > Manage filters. Then, check that Include all products in the {{site.data.keyword.cloud_notm}} catalog is selected in Step 1: Select to include or exclude all products in the {{site.data.keyword.cloud_notm}} catalog.
{: #catalog-select-ui} {: ui}
Complete the following steps to create a catalog that includes a specific set of products in the {{site.data.keyword.cloud_notm}} catalog:
- Go to Manage > Catalogs, in the {{site.data.keyword.cloud_notm}} 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 {{site.data.keyword.cloud_notm}} catalog in Step 1: Select to include or exclude all products in the {{site.data.keyword.cloud_notm}} 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 {{site.data.keyword.conversationshort}}, {{site.data.keyword.speechtotextshort}}, and {{site.data.keyword.texttospeechshort}}.
{: #catalog-off-ui} {: ui}
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 {{site.data.keyword.cloud_notm}} 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. {: note}
{: #customer-banner}
You can enhance the look and feel of your private catalog to match your brand by adding a custom image to your private catalog's banner. All users who are given access to your private catalog can see the custom banner when they go to the private catalog to search for products, instead of the default {{site.data.keyword.cloud_notm}} banner. To add a custom banner image, complete the following steps:
-
Go to Manage > Catalogs, then click Private catalogs.
-
Click the Overflow menu icon on the row of the private catalog that you want to add a banner for, then click Edit.
-
Add a URL to your custom banner in the Catalog banner field, or you can click Upload to add an image directly. The maximum recommended image size is 944 x 260 pixels. {: tip}
-
Click Update.
-
Then, go to the catalog, and select your private catalog from the list to view the updated look and feel of your private catalog.
You can also customize the provider name for private catalog products that you add to your catalogs. By default, they display with Community
as the provider, which is a filter in the catalog, but you can customize this to be your company or organization's name. For more information, see Providing catalog entry details.
{: tip}
{: #custom-catalog-access-ui} {: ui}
To authorize users to work with the products in your private catalogs, assign them the viewer role on the catalog management service.
{: #delete-private-catalog-ui} {: ui}
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 {{site.data.keyword.cloud_notm}} 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. {: tip}
{: #catalog-all-cli} {: cli}
Complete the following steps to create a catalog that includes all products in the {{site.data.keyword.cloud_notm}} 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"]
{: codeblock}
All the {{site.data.keyword.cloud_notm}} catalog products are visible by default when you create a new private catalog. See the Catalogs management CLI for more information.
{: #catalog-select-cli} {: cli}
Complete the following steps to create a catalog that includes a specific set of products in the {{site.data.keyword.cloud_notm}} 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"]
{: codeblock}
-
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
{: codeblock}
{: #catalog-off-cli} {: cli}
By default, the {{site.data.keyword.cloud_notm}} 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 {{site.data.keyword.cloud_notm}} 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
{: codeblock}
{: #custom-catalog-access-cli} {: cli}
To authorize users to work with the products in your private catalogs, assign them the viewer role on the catalog management service.
{: #delete-private-catalog-cli} {: 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
{: codeblock}
You can restore a private catalog within 7 days after you delete it. {: tip}
{: #catalog-all-api} {: api}
To create a catalog that includes all products in the {{site.data.keyword.cloud_notm}} 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"}'
{: codeblock} {: 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());
{: java} {: codeblock}
createCatalog(params, [callback()])
Example request
label = "{label}";
shortDesc = "{shortDesc}";
response = await service.createCatalog({ 'label': label, 'shortDescription': shortDesc });
console.log(response);
{: javascript} {: codeblock}
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)
{: python} {: codeblock}
(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)
{: go} {: codeblock}
All the {{site.data.keyword.cloud_notm}} public catalog products are visible by default when you create a new private catalog. See the Catalog Management API for more information.
{: #catalog-select-api} {: api}
To create a catalog that includes a specific set of products in the {{site.data.keyword.cloud_notm}} 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" ] } } }}'
{: codeblock}
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.
{: #catalog-off-api} {: 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"]}}}}'
{: codeblock} {: curl}
See the Catalog Management API for more information.
{: #customcatalog-access-api} {: api}
To authorize users to work with the products in your private catalogs, assign them the viewer role on the catalog management service.
{: #delete-private-catalog-api} {: 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}
{: codeblock} {: curl}
See the Catalog Management API for more information.
You can restore a private catalog within 7 days after you delete it. {: tip}
{: #catalog-all-terraform} {: 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. {: important}
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" }
{: codeblock}
For more information, see the argument reference details on the Terraform Catalog Management{: external} page.
-
After you finish building your configuration file, initialize the Terraform CLI. For more information, see Initializing Working Directories{: external}.
terraform init
{: pre}
-
Provision the resources from the
main.tf
file. For more information, see Provisioning Infrastructure with Terraform{: external}.-
Run
terraform plan
to generate a Terraform execution plan to preview the proposed actions.terraform plan
{: pre}
-
Run
terraform apply
to create the resources that are defined in the plan.terraform apply
{: pre}
-
{: #customcatalog-access-terraform} {: terraform}
To authorize users to work with the products in your private catalogs, assign them the viewer role on the catalog management service.