Skip to content

Commit

Permalink
feat: org-level connection bindings
Browse files Browse the repository at this point in the history
feat: gRPC config for get, list, and delete FileStoreDataProfiles
feat: add refresh frequency for data profiling
docs: small improvements
PiperOrigin-RevId: 657319510
Source-Link: googleapis/googleapis@e1d378c
Source-Link: googleapis/googleapis-gen@21ec656
Copy-Tag: eyJwIjoiRGxwLy5Pd2xCb3QueWFtbCIsImgiOiIyMWVjNjU2Yjg0MDU1OGY5MTU0MTI5YTg1YmQ0MTJmODU1N2M5ZTZlIn0=

docs: replace HTML tags with CommonMark notation
PiperOrigin-RevId: 657655346
Source-Link: googleapis/googleapis@aa6fe3b
Source-Link: googleapis/googleapis-gen@118ba2b
Copy-Tag: eyJwIjoiRGxwLy5Pd2xCb3QueWFtbCIsImgiOiIxMThiYTJiMDIyNzNkN2EzODYwNjk1ODE2MzQyMGFhNGI2ODMyOGU3In0=

chore(dlp): fix ordering of Connection resource patterns
PiperOrigin-RevId: 657674261
Source-Link: googleapis/googleapis@29bff4c
Source-Link: googleapis/googleapis-gen@5c2e886
Copy-Tag: eyJwIjoiRGxwLy5Pd2xCb3QueWFtbCIsImgiOiI1YzJlODg2NWU0M2Q0YzY4MmZhZDExYjhlNTg0OGU0NDUzODQyNGEyIn0=
  • Loading branch information
gcf-owl-bot[bot] authored Jul 31, 2024
1 parent cc2ab23 commit f292de9
Show file tree
Hide file tree
Showing 49 changed files with 640 additions and 407 deletions.
Binary file modified Dlp/metadata/V2/Dlp.php
Binary file not shown.
15 changes: 11 additions & 4 deletions Dlp/samples/V2/DlpServiceClient/create_connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,16 @@
/**
* Create a Connection to an external data source.
*
* @param string $formattedParent Parent resource name in the format:
* `projects/{project}/locations/{location}`. Please see
* {@see DlpServiceClient::locationName()} for help formatting this field.
* @param string $formattedParent Parent resource name.
*
* The format of this value varies depending on the scope of the request
* (project or organization):
*
* + Projects scope:
* `projects/{project_id}/locations/{location_id}`
* + Organizations scope:
* `organizations/{org_id}/locations/{location_id}`
* Please see {@see DlpServiceClient::organizationLocationName()} for help formatting this field.
* @param int $connectionState The connection's state in its lifecycle.
*/
function create_connection_sample(string $formattedParent, int $connectionState): void
Expand Down Expand Up @@ -70,7 +77,7 @@ function create_connection_sample(string $formattedParent, int $connectionState)
*/
function callSample(): void
{
$formattedParent = DlpServiceClient::locationName('[PROJECT]', '[LOCATION]');
$formattedParent = DlpServiceClient::organizationLocationName('[ORGANIZATION]', '[LOCATION]');
$connectionState = ConnectionState::CONNECTION_STATE_UNSPECIFIED;

create_connection_sample($formattedParent, $connectionState);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@
* location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location):
*
* + Projects scope, location specified:
* `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
* `projects/{project_id}/locations/{location_id}`
* + Projects scope, no location specified (defaults to global):
* `projects/`<var>PROJECT_ID</var>
* `projects/{project_id}`
* + Organizations scope, location specified:
* `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
* `organizations/{org_id}/locations/{location_id}`
* + Organizations scope, no location specified (defaults to global):
* `organizations/`<var>ORG_ID</var>
* `organizations/{org_id}`
*
* The following example `parent` string specifies a parent project with the
* identifier `example-project`, and specifies the `europe-west3` location
Expand Down
4 changes: 2 additions & 2 deletions Dlp/samples/V2/DlpServiceClient/create_discovery_config.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@
* (project or organization):
*
* + Projects scope:
* `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
* `projects/{project_id}/locations/{location_id}`
* + Organizations scope:
* `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
* `organizations/{org_id}/locations/{location_id}`
*
* The following example `parent` string specifies a parent project with the
* identifier `example-project`, and specifies the `europe-west3` location
Expand Down
4 changes: 2 additions & 2 deletions Dlp/samples/V2/DlpServiceClient/create_dlp_job.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@
* location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location):
*
* + Projects scope, location specified:
* `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
* `projects/{project_id}/locations/{location_id}`
* + Projects scope, no location specified (defaults to global):
* `projects/`<var>PROJECT_ID</var>
* `projects/{project_id}`
*
* The following example `parent` string specifies a parent project with the
* identifier `example-project`, and specifies the `europe-west3` location
Expand Down
8 changes: 4 additions & 4 deletions Dlp/samples/V2/DlpServiceClient/create_inspect_template.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@
* location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location):
*
* + Projects scope, location specified:
* `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
* `projects/{project_id}/locations/{location_id}`
* + Projects scope, no location specified (defaults to global):
* `projects/`<var>PROJECT_ID</var>
* `projects/{project_id}`
* + Organizations scope, location specified:
* `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
* `organizations/{org_id}/locations/{location_id}`
* + Organizations scope, no location specified (defaults to global):
* `organizations/`<var>ORG_ID</var>
* `organizations/{org_id}`
*
* The following example `parent` string specifies a parent project with the
* identifier `example-project`, and specifies the `europe-west3` location
Expand Down
4 changes: 2 additions & 2 deletions Dlp/samples/V2/DlpServiceClient/create_job_trigger.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@
* location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location):
*
* + Projects scope, location specified:
* `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
* `projects/{project_id}/locations/{location_id}`
* + Projects scope, no location specified (defaults to global):
* `projects/`<var>PROJECT_ID</var>
* `projects/{project_id}`
*
* The following example `parent` string specifies a parent project with the
* identifier `example-project`, and specifies the `europe-west3` location
Expand Down
8 changes: 4 additions & 4 deletions Dlp/samples/V2/DlpServiceClient/create_stored_info_type.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@
* location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location):
*
* + Projects scope, location specified:
* `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
* `projects/{project_id}/locations/{location_id}`
* + Projects scope, no location specified (defaults to global):
* `projects/`<var>PROJECT_ID</var>
* `projects/{project_id}`
* + Organizations scope, location specified:
* `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
* `organizations/{org_id}/locations/{location_id}`
* + Organizations scope, no location specified (defaults to global):
* `organizations/`<var>ORG_ID</var>
* `organizations/{org_id}`
*
* The following example `parent` string specifies a parent project with the
* identifier `example-project`, and specifies the `europe-west3` location
Expand Down
12 changes: 7 additions & 5 deletions Dlp/samples/V2/DlpServiceClient/list_connections.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@
use Google\Cloud\Dlp\V2\ListConnectionsRequest;

/**
* Lists Connections in a parent.
* Lists Connections in a parent. Use SearchConnections to see all connections
* within an organization.
*
* @param string $formattedParent Parent name, for example:
* `projects/project-id/locations/global`. Please see
* {@see DlpServiceClient::locationName()} for help formatting this field.
* @param string $formattedParent Resource name of the organization or project, for
* example, `organizations/433245324/locations/europe` or
* `projects/project-id/locations/asia`. Please see
* {@see DlpServiceClient::organizationLocationName()} for help formatting this field.
*/
function list_connections_sample(string $formattedParent): void
{
Expand Down Expand Up @@ -70,7 +72,7 @@ function list_connections_sample(string $formattedParent): void
*/
function callSample(): void
{
$formattedParent = DlpServiceClient::locationName('[PROJECT]', '[LOCATION]');
$formattedParent = DlpServiceClient::organizationLocationName('[ORGANIZATION]', '[LOCATION]');

list_connections_sample($formattedParent);
}
Expand Down
8 changes: 4 additions & 4 deletions Dlp/samples/V2/DlpServiceClient/list_deidentify_templates.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@
* location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location):
*
* + Projects scope, location specified:
* `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
* `projects/{project_id}/locations/{location_id}`
* + Projects scope, no location specified (defaults to global):
* `projects/`<var>PROJECT_ID</var>
* `projects/{project_id}`
* + Organizations scope, location specified:
* `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
* `organizations/{org_id}/locations/{location_id}`
* + Organizations scope, no location specified (defaults to global):
* `organizations/`<var>ORG_ID</var>
* `organizations/{org_id}`
*
* The following example `parent` string specifies a parent project with the
* identifier `example-project`, and specifies the `europe-west3` location
Expand Down
2 changes: 1 addition & 1 deletion Dlp/samples/V2/DlpServiceClient/list_discovery_configs.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* @param string $formattedParent Parent resource name.
*
* The format of this value is as follows:
* `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
* `projects/{project_id}/locations/{location_id}`
*
* The following example `parent` string specifies a parent project with the
* identifier `example-project`, and specifies the `europe-west3` location
Expand Down
4 changes: 2 additions & 2 deletions Dlp/samples/V2/DlpServiceClient/list_dlp_jobs.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@
* location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location):
*
* + Projects scope, location specified:
* `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
* `projects/{project_id}/locations/{location_id}`
* + Projects scope, no location specified (defaults to global):
* `projects/`<var>PROJECT_ID</var>
* `projects/{project_id}`
*
* The following example `parent` string specifies a parent project with the
* identifier `example-project`, and specifies the `europe-west3` location
Expand Down
8 changes: 4 additions & 4 deletions Dlp/samples/V2/DlpServiceClient/list_inspect_templates.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@
* location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location):
*
* + Projects scope, location specified:
* `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
* `projects/{project_id}/locations/{location_id}`
* + Projects scope, no location specified (defaults to global):
* `projects/`<var>PROJECT_ID</var>
* `projects/{project_id}`
* + Organizations scope, location specified:
* `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
* `organizations/{org_id}/locations/{location_id}`
* + Organizations scope, no location specified (defaults to global):
* `organizations/`<var>ORG_ID</var>
* `organizations/{org_id}`
*
* The following example `parent` string specifies a parent project with the
* identifier `example-project`, and specifies the `europe-west3` location
Expand Down
4 changes: 2 additions & 2 deletions Dlp/samples/V2/DlpServiceClient/list_job_triggers.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
* location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location):
*
* + Projects scope, location specified:
* `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
* `projects/{project_id}/locations/{location_id}`
* + Projects scope, no location specified (defaults to global):
* `projects/`<var>PROJECT_ID</var>
* `projects/{project_id}`
*
* The following example `parent` string specifies a parent project with the
* identifier `example-project`, and specifies the `europe-west3` location
Expand Down
4 changes: 2 additions & 2 deletions Dlp/samples/V2/DlpServiceClient/list_stored_info_types.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
* location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location):
*
* + Projects scope, location specified:
* `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
* `projects/{project_id}/locations/{location_id}`
* + Projects scope, no location specified (defaults to global):
* `projects/`<var>PROJECT_ID</var>
* `projects/{project_id}`
*
* The following example `parent` string specifies a parent project with the
* identifier `example-project`, and specifies the `europe-west3` location
Expand Down
4 changes: 2 additions & 2 deletions Dlp/samples/V2/DlpServiceClient/reidentify_content.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@
* location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location):
*
* + Projects scope, location specified:
* `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
* `projects/{project_id}/locations/{location_id}`
* + Projects scope, no location specified (defaults to global):
* `projects/`<var>PROJECT_ID</var>
* `projects/{project_id}`
*
* The following example `parent` string specifies a parent project with the
* identifier `example-project`, and specifies the `europe-west3` location
Expand Down
9 changes: 5 additions & 4 deletions Dlp/samples/V2/DlpServiceClient/search_connections.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@
/**
* Searches for Connections in a parent.
*
* @param string $formattedParent Parent name, typically an organization, without location.
* For example: `organizations/12345678`. Please see
* {@see DlpServiceClient::locationName()} for help formatting this field.
* @param string $formattedParent Resource name of the organization or project with a wildcard
* location, for example, `organizations/433245324/locations/-` or
* `projects/project-id/locations/-`. Please see
* {@see DlpServiceClient::organizationLocationName()} for help formatting this field.
*/
function search_connections_sample(string $formattedParent): void
{
Expand Down Expand Up @@ -70,7 +71,7 @@ function search_connections_sample(string $formattedParent): void
*/
function callSample(): void
{
$formattedParent = DlpServiceClient::locationName('[PROJECT]', '[LOCATION]');
$formattedParent = DlpServiceClient::organizationLocationName('[ORGANIZATION]', '[LOCATION]');

search_connections_sample($formattedParent);
}
Expand Down
Loading

0 comments on commit f292de9

Please sign in to comment.