diff --git a/README.md b/README.md index d3ba7b033042..6a1e7849bac0 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,7 @@ This client supports the following Google Cloud Platform services at an [Alpha]( * [Google Cloud BigQuery Data Transfer](#google-cloud-bigquery-data-transfer-alpha) (Alpha) * [Google Cloud IoT](#google-cloud-iot-alpha) (Alpha) * [Google Cloud Redis](#google-cloud-redis-alpha) (Alpha) +* [Google Cloud Security Command Center](#google-cloud-security-command-center-alpha) (Alpha) * [Google Cloud Speech](#google-cloud-speech-alpha) (Alpha) * [Google Cloud Talent Solution](#google-cloud-talent-solution-alpha) (Alpha) * [Google Stackdriver Debugger](#google-stackdriver-debugger-alpha) (Alpha) @@ -1263,6 +1264,37 @@ foreach ($response->iterateAllElements() as $instance) { $ composer require google/cloud-redis ``` +## Google Cloud Security Command Center (Alpha) + +- [API Documentation](http://googleapis.github.io/google-cloud-php/#/docs/latest/securitycenter/securitycenterclient) +- [Official Documentation](https://cloud.google.com/security-command-center/docs) + +#### Preview + +```php +require 'vendor/autoload.php'; + +use Google\Cloud\SecurityCenter\V1\SecurityCenterClient; +use Google\Cloud\SecurityCenter\V1\Source; + +$security = new SecurityCenterClient(); +$parent = SecurityCenterClient::organizationName('[YOUR ORGANIZATION]'); +$source = new Source([ + 'name' => SecurityCenterClient::sourceName('[YOUR ORGANIZATION]', '[YOUR SOURCE]'), + 'displayName' => '[YOUR SOURCE]' +]); + +$res = $security->createSource($parent, $source); +``` + +#### google/cloud-security-center + +[Google Cloud Security Command Center](https://github.com/googleapis/google-cloud-php-security-center) can be installed separately by requiring the [`google/cloud-security-center`](https://packagist.org/packages/google/cloud-security-center) composer package: + +``` +$ composer require google/cloud-security-center +``` + ## Google Cloud Speech (Alpha) - [API Documentation](http://googleapis.github.io/google-cloud-php/#/docs/latest/speech/speechclient) diff --git a/SecurityCenter/README.md b/SecurityCenter/README.md index 7be87c81e330..638104b9438a 100644 --- a/SecurityCenter/README.md +++ b/SecurityCenter/README.md @@ -34,6 +34,17 @@ on authenticating your client. Once authenticated, you'll be ready to start maki ### Sample ```php +use Google\Cloud\SecurityCenter\V1\SecurityCenterClient; +use Google\Cloud\SecurityCenter\V1\Source; + +$security = new SecurityCenterClient(); +$parent = SecurityCenterClient::organizationName('[YOUR ORGANIZATION]'); +$source = new Source([ + 'name' => SecurityCenterClient::sourceName('[YOUR ORGANIZATION]', '[YOUR SOURCE]'), + 'displayName' => '[YOUR SOURCE]' +]); + +$res = $security->createSource($parent, $source); ``` ### Version diff --git a/SecurityCenter/phpunit.xml.dist b/SecurityCenter/phpunit.xml.dist new file mode 100644 index 000000000000..1c2b8f6b56d2 --- /dev/null +++ b/SecurityCenter/phpunit.xml.dist @@ -0,0 +1,16 @@ + + + + + tests/Unit + + + + + src + + src/V[!a-zA-Z]* + + + + diff --git a/SecurityCenter/src/V1/README.md b/SecurityCenter/src/V1/README.md new file mode 100644 index 000000000000..455cc24ac78d --- /dev/null +++ b/SecurityCenter/src/V1/README.md @@ -0,0 +1,17 @@ +# Google Cloud Security Command Center V1 generated client for PHP + +### Sample + +```php +use Google\Cloud\SecurityCenter\V1\SecurityCenterClient; +use Google\Cloud\SecurityCenter\V1\Source; + +$security = new SecurityCenterClient(); +$parent = SecurityCenterClient::organizationName('[YOUR ORGANIZATION]'); +$source = new Source([ + 'name' => SecurityCenterClient::sourceName('[YOUR ORGANIZATION]', '[YOUR SOURCE]'), + 'displayName' => '[YOUR SOURCE]' +]); + +$res = $security->createSource($parent, $source); +``` diff --git a/docs/contents/cloud-security-center.json b/docs/contents/cloud-security-center.json index 984dbdbb6314..844195333145 100644 --- a/docs/contents/cloud-security-center.json +++ b/docs/contents/cloud-security-center.json @@ -5,6 +5,19 @@ { "title": "Overview", "type": "securitycenter\/readme" + }, + { + "title": "v1beta1", + "type": "securitycenter\/v1\/readme", + "nav": [ + { + "title": "SecurityCenterClient", + "type": "securitycenter\/v1\/securitycenterclient" + } + ], + "patterns": [ + "securitycenter\/v1\/\\w{1,}" + ] } ], "pattern": "securitycenter\/\\w{1,}"