Cloud Source Repositories API . projects

Instance Methods

repos()

Returns the repos Resource.

close()

Close httplib2 connections.

getConfig(name, x__xgafv=None)

Returns the Cloud Source Repositories configuration of the project.

updateConfig(name, body=None, x__xgafv=None)

Updates the Cloud Source Repositories configuration of the project.

Method Details

close()
Close httplib2 connections.
getConfig(name, x__xgafv=None)
Returns the Cloud Source Repositories configuration of the project.

Args:
  name: string, The name of the requested project. Values are of the form `projects/`. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Cloud Source Repositories configuration of a project.
  "enablePrivateKeyCheck": True or False, # Reject a Git push that contains a private key.
  "name": "A String", # The name of the project. Values are of the form `projects/`.
  "pubsubConfigs": { # How this project publishes a change in the repositories through Cloud Pub/Sub. Keyed by the topic names.
    "a_key": { # Configuration to publish a Cloud Pub/Sub message.
      "messageFormat": "A String", # The format of the Cloud Pub/Sub messages.
      "serviceAccountEmail": "A String", # Email address of the service account used for publishing Cloud Pub/Sub messages. This service account needs to be in the same project as the PubsubConfig. When added, the caller needs to have iam.serviceAccounts.actAs permission on this service account. If unspecified, it defaults to the compute engine default service account.
      "topic": "A String", # A topic of Cloud Pub/Sub. Values are of the form `projects//topics/`. The project needs to be the same project as this config is in.
    },
  },
}
updateConfig(name, body=None, x__xgafv=None)
Updates the Cloud Source Repositories configuration of the project.

Args:
  name: string, The name of the requested project. Values are of the form `projects/`. (required)
  body: object, The request body.
    The object takes the form of:

{ # Request for UpdateProjectConfig.
  "projectConfig": { # Cloud Source Repositories configuration of a project. # The new configuration for the project.
    "enablePrivateKeyCheck": True or False, # Reject a Git push that contains a private key.
    "name": "A String", # The name of the project. Values are of the form `projects/`.
    "pubsubConfigs": { # How this project publishes a change in the repositories through Cloud Pub/Sub. Keyed by the topic names.
      "a_key": { # Configuration to publish a Cloud Pub/Sub message.
        "messageFormat": "A String", # The format of the Cloud Pub/Sub messages.
        "serviceAccountEmail": "A String", # Email address of the service account used for publishing Cloud Pub/Sub messages. This service account needs to be in the same project as the PubsubConfig. When added, the caller needs to have iam.serviceAccounts.actAs permission on this service account. If unspecified, it defaults to the compute engine default service account.
        "topic": "A String", # A topic of Cloud Pub/Sub. Values are of the form `projects//topics/`. The project needs to be the same project as this config is in.
      },
    },
  },
  "updateMask": "A String", # A FieldMask specifying which fields of the project_config to modify. Only the fields in the mask will be modified. If no mask is provided, this request is no-op.
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Cloud Source Repositories configuration of a project.
  "enablePrivateKeyCheck": True or False, # Reject a Git push that contains a private key.
  "name": "A String", # The name of the project. Values are of the form `projects/`.
  "pubsubConfigs": { # How this project publishes a change in the repositories through Cloud Pub/Sub. Keyed by the topic names.
    "a_key": { # Configuration to publish a Cloud Pub/Sub message.
      "messageFormat": "A String", # The format of the Cloud Pub/Sub messages.
      "serviceAccountEmail": "A String", # Email address of the service account used for publishing Cloud Pub/Sub messages. This service account needs to be in the same project as the PubsubConfig. When added, the caller needs to have iam.serviceAccounts.actAs permission on this service account. If unspecified, it defaults to the compute engine default service account.
      "topic": "A String", # A topic of Cloud Pub/Sub. Values are of the form `projects//topics/`. The project needs to be the same project as this config is in.
    },
  },
}