'GCP : Finding list of users present in AD group

I have created one Active Directory group '[email protected]'. Now I want to fetch all the members of this group so that I can create Bigquery dataset for each of the member. So whenever new user is added to this AD group , his personal bigquery dataset will be created.

I tried cloud identity but it didn`t worked out :-

gcloud identity groups memberships list --group-email='[email protected]'

ERROR: (gcloud.identity.groups.memberships.list) Invalid value for [--group-email]: There is no such a group associated with the specified argument:[email protected]



Solution 1:[1]

The RetryOperationsInterceptor does everything within the context of the internal RetryTemplate. The execute method does not exit until retries are exhausted. No other work can occur on the calling thread until retries are complete.

If the advised method also has, for example, a transaction interceptor after the retry interceptor, the proxy is cloned on each doWithRetry call, allowing a new transaction to be started each time.

With the StatefulRetryOperationsInterceptor, the exception is re-thrown to the caller and the caller is responsible for calling again until retries are exhausted after which, either the recoverer is called, or an ExhaustedRetryException is thrown (by default).

Typical use of the stateful interceptor is with a message-driven application (e.g. JMS, RabbitMQ). Given that these systems can redeliver the failed message, and the redelivery can be later (based on other settings), other work can be processed on the calling thread before the failed request is retried.

IMPORTANT: The stateful interceptor has support for a rollbackClassifier; which indicates to the RetryTemplate that a particular request should be retried within the same transaction (i.e. the execute method does not throw the exception, it retries without starting a new transaction).

This only works when the retry interceptor is AFTER the transaction interceptor. Do not use this feature when the transaction interceptor is after the retry interceptor. In that case, the calling code must decide whether or not to retry the call, based on the exception type.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Gary Russell