SecurityCenter/src/V1/Gapic/SecurityCenterGapicClient.php
public function getIamPolicy($resource, array $optionalArgs = [])
    {
        $request = new GetIamPolicyRequest();
        $request->setResource($resource);

        return $this->startCall(
            'GetIamPolicy',
            Policy::class,
            $optionalArgs,
            $request
        )->wait();
    }
public function getIamPolicy($resource, array $optionalArgs = [])
    {
        $request = new GetIamPolicyRequest();
        $request->setResource($resource);

        return $this->startCall(
            'GetIamPolicy',
            Policy::class,
            $optionalArgs,
            $request
        )->wait();
    }
public function getIamPolicy ( $ resource , array $ optionalArgs = [ ] ) { $ request = new GetIamPolicyRequest ( ) ; $ request -> setResource ( $ resource ) ; return $ this -> startCall ( 'GetIamPolicy' , Policy :: class , $ optionalArgs , $ request ) -> wait ( ) ; }
Gets the access control policy on the specified Source.

Sample code:
```
$securityCenterClient = new SecurityCenterClient();
try {
$formattedResource = $securityCenterClient->sourceName('[ORGANIZATION]', '[SOURCE]');
$response = $securityCenterClient->getIamPolicy($formattedResource);
} finally {
$securityCenterClient->close();
}
```

@param string $resource     REQUIRED: The resource for which the policy is being requested.
`resource` is usually specified as a path. For example, a Project
resource is specified as `projects/{project}`.
@param array  $optionalArgs {
Optional.

@type RetrySettings|array $retrySettings
Retry settings to use for this call. Can be a
{@see Google\ApiCore\RetrySettings} object, or an associative array
of retry settings parameters. See the documentation on
{@see Google\ApiCore\RetrySettings} for example usage.
}

@return \Google\Cloud\Iam\V1\Policy

@throws ApiException if the remote call fails
@experimental
Gets the access control policy on the specified Source .