{"action":"created","issue":{"url":"https://api.github.com/repos/google/google-api-go-client/issues/277","repository_url":"https://api.github.com/repos/google/google-api-go-client","labels_url":"https://api.github.com/repos/google/google-api-go-client/issues/277/labels{/name}","comments_url":"https://api.github.com/repos/google/google-api-go-client/issues/277/comments","events_url":"https://api.github.com/repos/google/google-api-go-client/issues/277/events","html_url":"https://github.com/google/google-api-go-client/issues/277","id":333614400,"node_id":"MDU6SXNzdWUzMzM2MTQ0MDA=","number":277,"title":"Unable to fetch bucket contents","user":{"login":"akskap","id":5585065,"node_id":"MDQ6VXNlcjU1ODUwNjU=","avatar_url":"https://avatars0.githubusercontent.com/u/5585065?v=4","gravatar_id":"","url":"https://api.github.com/users/akskap","html_url":"https://github.com/akskap","followers_url":"https://api.github.com/users/akskap/followers","following_url":"https://api.github.com/users/akskap/following{/other_user}","gists_url":"https://api.github.com/users/akskap/gists{/gist_id}","starred_url":"https://api.github.com/users/akskap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akskap/subscriptions","organizations_url":"https://api.github.com/users/akskap/orgs","repos_url":"https://api.github.com/users/akskap/repos","events_url":"https://api.github.com/users/akskap/events{/privacy}","received_events_url":"https://api.github.com/users/akskap/received_events","type":"User","site_admin":false},"labels":[{"id":151043242,"node_id":"MDU6TGFiZWwxNTEwNDMyNDI=","url":"https://api.github.com/repos/google/google-api-go-client/labels/type:%20question","name":"type: question","color":"c5def5","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-06-19T10:37:17Z","updated_at":"2018-06-19T19:29:10Z","closed_at":null,"author_association":"NONE","body":"Requirement : Want to figure out bucket contents older than a specific date\r\n\r\nTried the following code (authenticated with a service-accounts.json file)\r\n\r\n```\r\nprojectId := os.Getenv(constants.ENV_GCP_PROJECT_ID)\r\nresp, err := computeService.BackendBuckets.Get(projectId, containerName).Context(ctx).Do()\r\nif err != nil {\r\n    fmt.Println(\"Error \", err)\r\n}\r\n```\r\nIt throws an error which says:\r\n```\r\nError  googleapi: Error 404: The resource 'projects/<project_name>/global/backendBuckets/<bucket_name>' was not found, notFound\r\n```\r\nI can see the bucket listed on Google Cloud Console\r\n\r\nDoubts:\r\n\r\na) Am I using the correct API for fetching all information stored inside a container/bucket ? (computeService.BackendBuckets.Get....)\r\n\r\nb) Only difference I see in browser console, is that buckets location shows as regional and the error I am getting the client-library mentions ..../global/....\r\nCan this be a reason for this error ? If yes, can you please suggest how to pass the regional flag in the API ?"},"comment":{"url":"https://api.github.com/repos/google/google-api-go-client/issues/comments/398517291","html_url":"https://github.com/google/google-api-go-client/issues/277#issuecomment-398517291","issue_url":"https://api.github.com/repos/google/google-api-go-client/issues/277","id":398517291,"node_id":"MDEyOklzc3VlQ29tbWVudDM5ODUxNzI5MQ==","user":{"login":"jba","id":18483045,"node_id":"MDQ6VXNlcjE4NDgzMDQ1","avatar_url":"https://avatars1.githubusercontent.com/u/18483045?v=4","gravatar_id":"","url":"https://api.github.com/users/jba","html_url":"https://github.com/jba","followers_url":"https://api.github.com/users/jba/followers","following_url":"https://api.github.com/users/jba/following{/other_user}","gists_url":"https://api.github.com/users/jba/gists{/gist_id}","starred_url":"https://api.github.com/users/jba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jba/subscriptions","organizations_url":"https://api.github.com/users/jba/orgs","repos_url":"https://api.github.com/users/jba/repos","events_url":"https://api.github.com/users/jba/events{/privacy}","received_events_url":"https://api.github.com/users/jba/received_events","type":"User","site_admin":false},"created_at":"2018-06-19T19:29:10Z","updated_at":"2018-06-19T19:29:10Z","author_association":"CONTRIBUTOR","body":"I'm not really familiar with this feature, but from reading [this doc page](https://cloud.google.com/compute/docs/load-balancing/http/adding-a-backend-bucket-to-content-based-load-balancing) it appears that the backend bucket name is not the same as the name of the bucket in cloud storage. \r\n\r\nYou're using the right API, but check the name of the backend bucket in your load balancer configuration. \r\n\r\nAlso, these are definitely Google Cloud Storage buckets, and not related to \"containers\" as that word is usually used these days. "}}
{"actor":{"display_login":"jba"}}