client.secrets.create_secret_by_name() creates a secret in a folder in an environment of a project. The machine identity needs a role in the project that can change secrets, such as Member.
Parameters
The ID of the project. Pass
project_id or project_slug. If you pass both, the SDK uses project_id.Returns
The new secret, with its
id, secretKey, secretValue, secretComment, environment, type, and version. To get its tags and metadata, call get_secret_by_name.