This page explains how to create and manage security profile groups by using Google Cloud console and Google Cloud CLI.
Before you begin
- You must enable the Network Security API in your project.
Install the gcloud CLI if you want to run the
gcloud
command-line examples in this guide.You need a security profile.
Roles
To get the permissions that you need to create, view, update, or delete security profile groups, ask your administrator to grant you the necessary IAM roles on your organization. For more information about granting roles, see Manage access.
Create a security profile group
You can create a security profile of type threat prevention
.
When you create a security profile group, you can specify the name of the security profile group as a string or as a unique URL identifier. The unique URL for an organization-scoped security profile group can be constructed in the following format:
organization/ORGANIZATION_ID/locations/LOCATION/securityProfileGroups/SECURITY_PROFILE_GROUP_NAME
If you use a unique URL identifier for the security profile group name, the organization and location of the security profile group is already included in the URL identifier. However, if you use only the security profile group name, you must specify the organization and location separately. For more information about unique URL identifiers, see security profile group specifications.
Console
In the Google Cloud console, go to the Security profiles page.
In the project selector menu, select your organization.
Select the Security profile groups tab.
Configure a security profile group:
- Click Create profile group.
- Enter a name in the Name field.
- Optional: Enter a description in the Description field.
- In the Threat prevention profile list, select the security profile that you want to add to this security profile group.
- Click Create.
gcloud
To create a security profile group, use the
gcloud network-security security-profile-groups create
command:
gcloud network-security security-profile-groups \ create NAME \ --organization ORGANIZATION_ID \ --location LOCATION \ --project PROJECT_ID \ --threat-prevention-profile SECURITY_PROFILE_URL \ --description DESCRIPTION
Replace the following:
NAME
: the name of the security profile group; you can specify the name as a string or as a unique URL identifier.ORGANIZATION_ID
: the organization where the security profile group is created. If you use a unique URL identifier for thename
flag, you can omit theorganization
flag.LOCATION
: the location of the security profile group.Location is always set to
global
. If you use a unique URL identifier for thename
flag, you can omit thelocation
flag.PROJECT_ID
: an optional project ID to use for quotas and access restrictions on the security profile group.SECURITY_PROFILE_URL
: a unique URL identifier of the security profile.DESCRIPTION
: an optional description for the security profile group.
View security profile group
You can view the details of a specific security profile group in an organization.
Console
In the Google Cloud console, go to the Security profiles page.
Select the Security profile groups tab. The tab shows a list of configured security profile groups.
Select the security profile group to view its details.
gcloud
To view details of a security profile group, use the
gcloud network-security security-profile-groups describe
command:
gcloud network-security security-profile-groups \ describe NAME \ --organization ORGANIZATION_ID \ --location LOCATION \ --project PROJECT_ID
Replace the following:
NAME
: the name of the security profile group; you can specify the name as a string or as a unique URL identifier.ORGANIZATION_ID
: the organization where the security profile group is created. If you use a unique URL identifier for thename
flag, you can omit theorganization
flag.LOCATION
: the location of the security profile group.Location is always set to
global
. If you use a unique URL identifier for thename
flag, you can omit thelocation
flag.PROJECT_ID
: an optional project ID to use for quotas and access restrictions on the security profile group.
List security profile groups
You can list all the security profile groups in an organization.
Console
In the Google Cloud console, go to the Security profiles page.
Select the Security profile groups tab. The tab shows a list of configured security profile groups.
gcloud
To list security profile groups, use the
gcloud network-security security-profile-groups list
command:
gcloud network-security security-profile-groups list \ --organization ORGANIZATION_ID \ --location LOCATION \ --billing-project PROJECT_ID
Replace the following:
ORGANIZATION_ID
: the organization where the security profile group is created. If you use a unique URL identifier for thename
flag, you can omit theorganization
flag.LOCATION
: the location of the security profile group.Location is always set to
global
. If you use a unique URL identifier for thename
flag, you can omit thelocation
flag.PROJECT_ID
: an optional project ID to use for billing of the security profile group.
Update a security profile group
You can update the security profile name referenced in a security profile group.
Console
In the Google Cloud console, go to the Security profiles page.
Select the Security profile groups tab. The tab shows a list of configured security profile groups.
Select the security profile group, and then click Edit.
Update the required fields, and then click Save.
gcloud
To update a security profile group, use the
gcloud network-security security-profile-groups update
command:
gcloud network-security security-profile-groups \ update NAME \ --organization ORGANIZATION_ID \ --location LOCATION \ --threat-prevention-profile SECURITY_PROFILE_URL \ --project PROJECT_ID \ --description DESCRIPTION
Replace the following:
NAME
: the name of the security profile group that you want to update; you can specify the name as a string or as a unique URL identifier.ORGANIZATION_ID
: the organization where the security profile group is created. If you use a unique URL identifier for thename
flag, you can omit theorganization
flag.LOCATION
: the location of the security profile group.Location is always set to
global
. If you use a unique URL identifier for thename
flag, you can omit thelocation
flag.SECURITY_PROFILE_URL
: a unique URL identifier of the security profile.PROJECT_ID
: an optional project ID to use for quotas and access restrictions on the security profile group.DESCRIPTION
: an optional description for the security profile group.
Delete a security profile group
You can delete a security profile group by specifying its name, location, and organization. However, if a security profile is referenced by a firewall policy, that security profile group cannot be deleted.
Console
In the Google Cloud console, go to the Security profiles page.
Select the Security profile groups tab. The tab shows a list of configured security profile groups.
Select the security profile group, and then click Delete.
Click Delete again to confirm.
gcloud
To delete a security profile group, use the
gcloud network-security security-profile-groups delete
command:
gcloud network-security security-profile-groups \ delete NAME \ --organization ORGANIZATION_ID \ --location LOCATION \ --billing-project PROJECT_ID
Replace the following:
NAME
: the name of the security profile group that you want to delete; you can specify the name as a string or as a unique URL identifier.ORGANIZATION_ID
: the organization where the security profile group is created. If you use a unique URL identifier for thename
flag, you can omit theorganization
flag.LOCATION
: the location of the security profile group.Location is always set to
global
. If you use a unique URL identifier for thename
flag, you can omit thelocation
flag.PROJECT_ID
: an optional project ID to use for quotas and access restrictions on the security profile group.