Google Professional Cloud Security Engineer Question 30
Single answerGoogle Cloud PlatformYou are tasked with automating the management of user accounts and groups in your Google Cloud project. Your organization requires that the automation script must be able to create new users, assign them to specific IAM roles, and add them to predefined Google Groups. Which Google Cloud service or API should you use programmatically to achieve these tasks?
- A
Google Directory API
- B
Cloud Identity and Access Management (IAM) API
- C
Cloud Resource Manager API
- D
Google Cloud Pub/Sub
Show answer and explanation
Correct answer: A
Explanation
The Google Directory API is the most appropriate choice for managing user accounts and groups programmatically. It allows administrators to create users, assign them to groups, and manage group memberships directly, which aligns with the requirements in the scenario. Other APIs, such as Cloud IAM or Cloud Resource Manager, focus on different aspects of cloud resource and policy management rather than user and group administration.
- A. Correct.
The Google Directory API is specifically designed for managing user accounts and groups programmatically in a Google Workspace or Cloud Identity environment. It allows you to create and manage users, groups, and group memberships.
- B. Incorrect.
The Cloud IAM API is used for managing IAM policies, roles, and permissions for resources, but it does not handle the creation or management of users and groups.
- C. Incorrect.
The Cloud Resource Manager API is used for managing projects, folders, and organizations, but it does not handle user accounts or groups.
- D. Incorrect.
Google Cloud Pub/Sub is a messaging service for building event-based systems. It is not related to user or group management.