Skip to content

Permissions problem trying to create a sink #1614

Description

@tseaver

While working on a system test for Sink.create, I'm running into a permissions problem:

>>> sink.create()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "gcloud/logging/sink.py", line 145, in create
    client.connection.api_request(method='PUT', path=self.path, data=data)
  File "gcloud/connection.py", line 343, in api_request
    error_info=method + ' ' + url)
gcloud.exceptions.Forbidden: 403 The caller does not have permission (PUT https://logging.googleapis.com/v2beta1/projects/citric-celerity-697/sinks/test-sink)

Sinks.create is documented to require one of https://www.googleapis.com/auth/logging.admin or https://www.googleapis.com/auth/cloud-platform.

My client is set up with all permissions for the logging API:

>>> client.connection._credentials._scopes
'https://www.googleapis.com/auth/logging.read https://www.googleapis.com/auth/logging.write https://www.googleapis.com/auth/logging.admin https://www.googleapis.com/auth/cloud-platform'

Do I have to do something in the developer control panel to enable sinks?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api: loggingIssues related to the Cloud Logging API.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions