go – How to enable Cloud Data Loss Protection in Google Cloud Platform?
I have the following Go code that creates a new project in Google Cloud Platform (GCP):
import (
gcpapi "cloud.google.com/go/resourcemanager/apiv3"
)
client := *gcpapi.ProjectsClient
request := &gcpapi.CreateProjectRequest{
Project: &gcpapi.Project{
ProjectId: "XYZ",
DisplayName: "XYZ",
Parent: "123",
Labels: "a:b,c:d,e:f",
},
}
_, err := p.client.CreateProject(ctx, request)
I want to enable Cloud Data Loss Prevention on this project. Is there a way I can do so in the above CreateProjectRequest? How?
Read more here: Source link
