DeveloperConnectAsyncClient(*, credentials: typing.Optional[google.auth.credentials.Credentials] = None, transport: typing.Optional[typing.Union[str, google.cloud.developerconnect_v1.services.developer_connect.transports.base.DeveloperConnectTransport, typing.Callable[[...], google.cloud.developerconnect_v1.services.developer_connect.transports.base.DeveloperConnectTransport]]] = 'grpc_asyncio', client_options: typing.Optional[google.api_core.client_options.ClientOptions] = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)
Service describing handlers for resources
Properties
api_endpoint
Return the API endpoint used by the client instance.
Returns | |
---|---|
Type | Description |
str |
The API endpoint used by the client instance. |
transport
Returns the transport used by the client instance.
Returns | |
---|---|
Type | Description |
DeveloperConnectTransport |
The transport used by the client instance. |
universe_domain
Return the universe domain used by the client instance.
Returns | |
---|---|
Type | Description |
str |
The universe domain used by the client instance. |
Methods
DeveloperConnectAsyncClient
DeveloperConnectAsyncClient(*, credentials: typing.Optional[google.auth.credentials.Credentials] = None, transport: typing.Optional[typing.Union[str, google.cloud.developerconnect_v1.services.developer_connect.transports.base.DeveloperConnectTransport, typing.Callable[[...], google.cloud.developerconnect_v1.services.developer_connect.transports.base.DeveloperConnectTransport]]] = 'grpc_asyncio', client_options: typing.Optional[google.api_core.client_options.ClientOptions] = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)
Instantiates the developer connect async client.
Parameters | |
---|---|
Name | Description |
credentials |
Optional[google.auth.credentials.Credentials]
The authorization credentials to attach to requests. These credentials identify the application to the service; if none are specified, the client will attempt to ascertain the credentials from the environment. |
transport |
Optional[Union[str,DeveloperConnectTransport,Callable[..., DeveloperConnectTransport]]]
The transport to use, or a Callable that constructs and returns a new transport to use. If a Callable is given, it will be called with the same set of initialization arguments as used in the DeveloperConnectTransport constructor. If set to None, a transport is chosen automatically. |
client_options |
Optional[Union[google.api_core.client_options.ClientOptions, dict]]
Custom options for the client. 1. The |
client_info |
google.api_core.gapic_v1.client_info.ClientInfo
The client info used to send a user-agent string along with API requests. If |
Exceptions | |
---|---|
Type | Description |
google.auth.exceptions.MutualTlsChannelError |
If mutual TLS transport creation failed for any reason. |
cancel_operation
cancel_operation(
request: typing.Optional[
google.longrunning.operations_pb2.CancelOperationRequest
] = None,
*,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> None
Starts asynchronous cancellation on a long-running operation.
The server makes a best effort to cancel the operation, but success
is not guaranteed. If the server doesn't support this method, it returns
google.rpc.Code.UNIMPLEMENTED
.
Parameters | |
---|---|
Name | Description |
request |
The request object. Request message for |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
common_billing_account_path
common_billing_account_path(billing_account: str) -> str
Returns a fully-qualified billing_account string.
common_folder_path
common_folder_path(folder: str) -> str
Returns a fully-qualified folder string.
common_location_path
common_location_path(project: str, location: str) -> str
Returns a fully-qualified location string.
common_organization_path
common_organization_path(organization: str) -> str
Returns a fully-qualified organization string.
common_project_path
common_project_path(project: str) -> str
Returns a fully-qualified project string.
connection_path
connection_path(project: str, location: str, connection: str) -> str
Returns a fully-qualified connection string.
create_connection
create_connection(
request: typing.Optional[
typing.Union[
google.cloud.developerconnect_v1.types.developer_connect.CreateConnectionRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
connection: typing.Optional[
google.cloud.developerconnect_v1.types.developer_connect.Connection
] = None,
connection_id: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation_async.AsyncOperation
Creates a new Connection in a given project and location.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import developerconnect_v1
async def sample_create_connection():
# Create a client
client = developerconnect_v1.DeveloperConnectAsyncClient()
# Initialize request argument(s)
connection = developerconnect_v1.Connection()
connection.github_config.github_app = "FIREBASE"
request = developerconnect_v1.CreateConnectionRequest(
parent="parent_value",
connection_id="connection_id_value",
connection=connection,
)
# Make the request
operation = client.create_connection(request=request)
print("Waiting for operation to complete...")
response = (await operation).result()
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.developerconnect_v1.types.CreateConnectionRequest, dict]]
The request object. Message for creating a Connection |
parent |
Required. Value for parent. This corresponds to the |
connection |
Connection
Required. The resource being created This corresponds to the |
connection_id |
Required. Id of the requesting object If auto-generating Id server-side, remove this field and connection_id from the method_signature of Create RPC This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
Returns | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation |
An object representing a long-running operation. The result type for the operation will be Connection Message describing Connection object |
create_git_repository_link
create_git_repository_link(
request: typing.Optional[
typing.Union[
google.cloud.developerconnect_v1.types.developer_connect.CreateGitRepositoryLinkRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
git_repository_link: typing.Optional[
google.cloud.developerconnect_v1.types.developer_connect.GitRepositoryLink
] = None,
git_repository_link_id: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation_async.AsyncOperation
Creates a GitRepositoryLink. Upon linking a Git Repository, Developer Connect will configure the Git Repository to send webhook events to Developer Connect. Connections that use Firebase GitHub Application will have events forwarded to the Firebase service. All other Connections will have events forwarded to Cloud Build.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import developerconnect_v1
async def sample_create_git_repository_link():
# Create a client
client = developerconnect_v1.DeveloperConnectAsyncClient()
# Initialize request argument(s)
git_repository_link = developerconnect_v1.GitRepositoryLink()
git_repository_link.clone_uri = "clone_uri_value"
request = developerconnect_v1.CreateGitRepositoryLinkRequest(
parent="parent_value",
git_repository_link=git_repository_link,
git_repository_link_id="git_repository_link_id_value",
)
# Make the request
operation = client.create_git_repository_link(request=request)
print("Waiting for operation to complete...")
response = (await operation).result()
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.developerconnect_v1.types.CreateGitRepositoryLinkRequest, dict]]
The request object. Message for creating a GitRepositoryLink |
parent |
Required. Value for parent. This corresponds to the |
git_repository_link |
GitRepositoryLink
Required. The resource being created This corresponds to the |
git_repository_link_id |
Required. The ID to use for the repository, which will become the final component of the repository's resource name. This ID should be unique in the connection. Allows alphanumeric characters and any of -._ |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
Returns | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation |
An object representing a long-running operation. The result type for the operation will be GitRepositoryLink Message describing the GitRepositoryLink object |
crypto_key_path
crypto_key_path(project: str, location: str, key_ring: str, crypto_key: str) -> str
Returns a fully-qualified crypto_key string.
delete_connection
delete_connection(
request: typing.Optional[
typing.Union[
google.cloud.developerconnect_v1.types.developer_connect.DeleteConnectionRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation_async.AsyncOperation
Deletes a single Connection.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import developerconnect_v1
async def sample_delete_connection():
# Create a client
client = developerconnect_v1.DeveloperConnectAsyncClient()
# Initialize request argument(s)
request = developerconnect_v1.DeleteConnectionRequest(
name="name_value",
)
# Make the request
operation = client.delete_connection(request=request)
print("Waiting for operation to complete...")
response = (await operation).result()
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.developerconnect_v1.types.DeleteConnectionRequest, dict]]
The request object. Message for deleting a Connection |
name |
Required. Name of the resource This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
Returns | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation |
An object representing a long-running operation. The result type for the operation will be google.protobuf.empty_pb2.Empty A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } |
delete_git_repository_link
delete_git_repository_link(
request: typing.Optional[
typing.Union[
google.cloud.developerconnect_v1.types.developer_connect.DeleteGitRepositoryLinkRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation_async.AsyncOperation
Deletes a single GitRepositoryLink.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import developerconnect_v1
async def sample_delete_git_repository_link():
# Create a client
client = developerconnect_v1.DeveloperConnectAsyncClient()
# Initialize request argument(s)
request = developerconnect_v1.DeleteGitRepositoryLinkRequest(
name="name_value",
)
# Make the request
operation = client.delete_git_repository_link(request=request)
print("Waiting for operation to complete...")
response = (await operation).result()
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.developerconnect_v1.types.DeleteGitRepositoryLinkRequest, dict]]
The request object. Message for deleting a GitRepositoryLink |
name |
Required. Name of the resource This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
Returns | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation |
An object representing a long-running operation. The result type for the operation will be google.protobuf.empty_pb2.Empty A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } |
delete_operation
delete_operation(
request: typing.Optional[
google.longrunning.operations_pb2.DeleteOperationRequest
] = None,
*,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> None
Deletes a long-running operation.
This method indicates that the client is no longer interested
in the operation result. It does not cancel the operation.
If the server doesn't support this method, it returns
google.rpc.Code.UNIMPLEMENTED
.
Parameters | |
---|---|
Name | Description |
request |
The request object. Request message for |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
fetch_git_hub_installations
fetch_git_hub_installations(
request: typing.Optional[
typing.Union[
google.cloud.developerconnect_v1.types.developer_connect.FetchGitHubInstallationsRequest,
dict,
]
] = None,
*,
connection: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
google.cloud.developerconnect_v1.types.developer_connect.FetchGitHubInstallationsResponse
)
FetchGitHubInstallations returns the list of GitHub Installations that are available to be added to a Connection. For github.com, only installations accessible to the authorizer token are returned. For GitHub Enterprise, all installations are returned.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import developerconnect_v1
async def sample_fetch_git_hub_installations():
# Create a client
client = developerconnect_v1.DeveloperConnectAsyncClient()
# Initialize request argument(s)
request = developerconnect_v1.FetchGitHubInstallationsRequest(
connection="connection_value",
)
# Make the request
response = await client.fetch_git_hub_installations(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.developerconnect_v1.types.FetchGitHubInstallationsRequest, dict]]
The request object. Request for fetching github installations. |
connection |
Required. The resource name of the connection in the format |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
Returns | |
---|---|
Type | Description |
google.cloud.developerconnect_v1.types.FetchGitHubInstallationsResponse |
Response of fetching github installations. |
fetch_git_refs
fetch_git_refs(
request: typing.Optional[
typing.Union[
google.cloud.developerconnect_v1.types.developer_connect.FetchGitRefsRequest,
dict,
]
] = None,
*,
git_repository_link: typing.Optional[str] = None,
ref_type: typing.Optional[
google.cloud.developerconnect_v1.types.developer_connect.FetchGitRefsRequest.RefType
] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
google.cloud.developerconnect_v1.services.developer_connect.pagers.FetchGitRefsAsyncPager
)
Fetch the list of branches or tags for a given repository.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import developerconnect_v1
async def sample_fetch_git_refs():
# Create a client
client = developerconnect_v1.DeveloperConnectAsyncClient()
# Initialize request argument(s)
request = developerconnect_v1.FetchGitRefsRequest(
git_repository_link="git_repository_link_value",
ref_type="BRANCH",
)
# Make the request
page_result = client.fetch_git_refs(request=request)
# Handle the response
async for response in page_result:
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.developerconnect_v1.types.FetchGitRefsRequest, dict]]
The request object. Request for fetching git refs. |
git_repository_link |
Required. The resource name of GitRepositoryLink in the format |
ref_type |
RefType
Required. Type of refs to fetch. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
Returns | |
---|---|
Type | Description |
google.cloud.developerconnect_v1.services.developer_connect.pagers.FetchGitRefsAsyncPager |
Response for fetching git refs. Iterating over this object will yield results and resolve additional pages automatically. |
fetch_linkable_git_repositories
fetch_linkable_git_repositories(
request: typing.Optional[
typing.Union[
google.cloud.developerconnect_v1.types.developer_connect.FetchLinkableGitRepositoriesRequest,
dict,
]
] = None,
*,
connection: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
google.cloud.developerconnect_v1.services.developer_connect.pagers.FetchLinkableGitRepositoriesAsyncPager
)
FetchLinkableGitRepositories returns a list of git repositories from an SCM that are available to be added to a Connection.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import developerconnect_v1
async def sample_fetch_linkable_git_repositories():
# Create a client
client = developerconnect_v1.DeveloperConnectAsyncClient()
# Initialize request argument(s)
request = developerconnect_v1.FetchLinkableGitRepositoriesRequest(
connection="connection_value",
)
# Make the request
page_result = client.fetch_linkable_git_repositories(request=request)
# Handle the response
async for response in page_result:
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.developerconnect_v1.types.FetchLinkableGitRepositoriesRequest, dict]]
The request object. Request message for FetchLinkableGitRepositoriesRequest. |
connection |
Required. The name of the Connection. Format: |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
Returns | |
---|---|
Type | Description |
google.cloud.developerconnect_v1.services.developer_connect.pagers.FetchLinkableGitRepositoriesAsyncPager |
Response message for FetchLinkableGitRepositories. Iterating over this object will yield results and resolve additional pages automatically. |
fetch_read_token
fetch_read_token(
request: typing.Optional[
typing.Union[
google.cloud.developerconnect_v1.types.developer_connect.FetchReadTokenRequest,
dict,
]
] = None,
*,
git_repository_link: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.developerconnect_v1.types.developer_connect.FetchReadTokenResponse
Fetches read token of a given gitRepositoryLink.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import developerconnect_v1
async def sample_fetch_read_token():
# Create a client
client = developerconnect_v1.DeveloperConnectAsyncClient()
# Initialize request argument(s)
request = developerconnect_v1.FetchReadTokenRequest(
git_repository_link="git_repository_link_value",
)
# Make the request
response = await client.fetch_read_token(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.developerconnect_v1.types.FetchReadTokenRequest, dict]]
The request object. Message for fetching SCM read token. |
git_repository_link |
Required. The resource name of the gitRepositoryLink in the format |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
Returns | |
---|---|
Type | Description |
google.cloud.developerconnect_v1.types.FetchReadTokenResponse |
Message for responding to get read token. |
fetch_read_write_token
fetch_read_write_token(
request: typing.Optional[
typing.Union[
google.cloud.developerconnect_v1.types.developer_connect.FetchReadWriteTokenRequest,
dict,
]
] = None,
*,
git_repository_link: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
google.cloud.developerconnect_v1.types.developer_connect.FetchReadWriteTokenResponse
)
Fetches read/write token of a given gitRepositoryLink.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import developerconnect_v1
async def sample_fetch_read_write_token():
# Create a client
client = developerconnect_v1.DeveloperConnectAsyncClient()
# Initialize request argument(s)
request = developerconnect_v1.FetchReadWriteTokenRequest(
git_repository_link="git_repository_link_value",
)
# Make the request
response = await client.fetch_read_write_token(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.developerconnect_v1.types.FetchReadWriteTokenRequest, dict]]
The request object. Message for fetching SCM read/write token. |
git_repository_link |
Required. The resource name of the gitRepositoryLink in the format |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
Returns | |
---|---|
Type | Description |
google.cloud.developerconnect_v1.types.FetchReadWriteTokenResponse |
Message for responding to get read/write token. |
from_service_account_file
from_service_account_file(filename: str, *args, **kwargs)
Creates an instance of this client using the provided credentials file.
Parameter | |
---|---|
Name | Description |
filename |
str
The path to the service account private key json file. |
Returns | |
---|---|
Type | Description |
DeveloperConnectAsyncClient |
The constructed client. |
from_service_account_info
from_service_account_info(info: dict, *args, **kwargs)
Creates an instance of this client using the provided credentials info.
Parameter | |
---|---|
Name | Description |
info |
dict
The service account private key info. |
Returns | |
---|---|
Type | Description |
DeveloperConnectAsyncClient |
The constructed client. |
from_service_account_json
from_service_account_json(filename: str, *args, **kwargs)
Creates an instance of this client using the provided credentials file.
Parameter | |
---|---|
Name | Description |
filename |
str
The path to the service account private key json file. |
Returns | |
---|---|
Type | Description |
DeveloperConnectAsyncClient |
The constructed client. |
get_connection
get_connection(
request: typing.Optional[
typing.Union[
google.cloud.developerconnect_v1.types.developer_connect.GetConnectionRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.developerconnect_v1.types.developer_connect.Connection
Gets details of a single Connection.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import developerconnect_v1
async def sample_get_connection():
# Create a client
client = developerconnect_v1.DeveloperConnectAsyncClient()
# Initialize request argument(s)
request = developerconnect_v1.GetConnectionRequest(
name="name_value",
)
# Make the request
response = await client.get_connection(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.developerconnect_v1.types.GetConnectionRequest, dict]]
The request object. Message for getting a Connection |
name |
Required. Name of the resource This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
Returns | |
---|---|
Type | Description |
google.cloud.developerconnect_v1.types.Connection |
Message describing Connection object |
get_git_repository_link
get_git_repository_link(
request: typing.Optional[
typing.Union[
google.cloud.developerconnect_v1.types.developer_connect.GetGitRepositoryLinkRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.developerconnect_v1.types.developer_connect.GitRepositoryLink
Gets details of a single GitRepositoryLink.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import developerconnect_v1
async def sample_get_git_repository_link():
# Create a client
client = developerconnect_v1.DeveloperConnectAsyncClient()
# Initialize request argument(s)
request = developerconnect_v1.GetGitRepositoryLinkRequest(
name="name_value",
)
# Make the request
response = await client.get_git_repository_link(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.developerconnect_v1.types.GetGitRepositoryLinkRequest, dict]]
The request object. Message for getting a GitRepositoryLink |
name |
Required. Name of the resource This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
Returns | |
---|---|
Type | Description |
google.cloud.developerconnect_v1.types.GitRepositoryLink |
Message describing the GitRepositoryLink object |
get_location
get_location(
request: typing.Optional[
google.cloud.location.locations_pb2.GetLocationRequest
] = None,
*,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.location.locations_pb2.Location
Gets information about a location.
Parameters | |
---|---|
Name | Description |
request |
The request object. Request message for |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
Returns | |
---|---|
Type | Description |
|
Location object. |
get_mtls_endpoint_and_cert_source
get_mtls_endpoint_and_cert_source(
client_options: typing.Optional[
google.api_core.client_options.ClientOptions
] = None,
)
Return the API endpoint and client cert source for mutual TLS.
The client cert source is determined in the following order:
(1) if GOOGLE_API_USE_CLIENT_CERTIFICATE
environment variable is not "true", the
client cert source is None.
(2) if client_options.client_cert_source
is provided, use the provided one; if the
default client cert source exists, use the default one; otherwise the client cert
source is None.
The API endpoint is determined in the following order:
(1) if client_options.api_endpoint
if provided, use the provided one.
(2) if GOOGLE_API_USE_CLIENT_CERTIFICATE
environment variable is "always", use the
default mTLS endpoint; if the environment variable is "never", use the default API
endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise
use the default API endpoint.
More details can be found at https://google.aip.dev/auth/4114.
Parameter | |
---|---|
Name | Description |
client_options |
google.api_core.client_options.ClientOptions
Custom options for the client. Only the |
Exceptions | |
---|---|
Type | Description |
google.auth.exceptions.MutualTLSChannelError |
If any errors happen. |
Returns | |
---|---|
Type | Description |
Tuple[str, Callable[[], Tuple[bytes, bytes]]] |
returns the API endpoint and the client cert source to use. |
get_operation
get_operation(
request: typing.Optional[
google.longrunning.operations_pb2.GetOperationRequest
] = None,
*,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.longrunning.operations_pb2.Operation
Gets the latest state of a long-running operation.
Parameters | |
---|---|
Name | Description |
request |
The request object. Request message for |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
Returns | |
---|---|
Type | Description |
|
An Operation object. |
get_transport_class
get_transport_class(
label: typing.Optional[str] = None,
) -> typing.Type[
google.cloud.developerconnect_v1.services.developer_connect.transports.base.DeveloperConnectTransport
]
Returns an appropriate transport class.
Parameter | |
---|---|
Name | Description |
label |
typing.Optional[str]
The name of the desired transport. If none is provided, then the first transport in the registry is used. |
git_repository_link_path
git_repository_link_path(
project: str, location: str, connection: str, git_repository_link: str
) -> str
Returns a fully-qualified git_repository_link string.
list_connections
list_connections(
request: typing.Optional[
typing.Union[
google.cloud.developerconnect_v1.types.developer_connect.ListConnectionsRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
google.cloud.developerconnect_v1.services.developer_connect.pagers.ListConnectionsAsyncPager
)
Lists Connections in a given project and location.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import developerconnect_v1
async def sample_list_connections():
# Create a client
client = developerconnect_v1.DeveloperConnectAsyncClient()
# Initialize request argument(s)
request = developerconnect_v1.ListConnectionsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_connections(request=request)
# Handle the response
async for response in page_result:
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.developerconnect_v1.types.ListConnectionsRequest, dict]]
The request object. Message for requesting list of Connections |
parent |
Required. Parent value for ListConnectionsRequest This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
Returns | |
---|---|
Type | Description |
google.cloud.developerconnect_v1.services.developer_connect.pagers.ListConnectionsAsyncPager |
Message for response to listing Connections Iterating over this object will yield results and resolve additional pages automatically. |
list_git_repository_links
list_git_repository_links(
request: typing.Optional[
typing.Union[
google.cloud.developerconnect_v1.types.developer_connect.ListGitRepositoryLinksRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
google.cloud.developerconnect_v1.services.developer_connect.pagers.ListGitRepositoryLinksAsyncPager
)
Lists GitRepositoryLinks in a given project, location, and connection.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import developerconnect_v1
async def sample_list_git_repository_links():
# Create a client
client = developerconnect_v1.DeveloperConnectAsyncClient()
# Initialize request argument(s)
request = developerconnect_v1.ListGitRepositoryLinksRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_git_repository_links(request=request)
# Handle the response
async for response in page_result:
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.developerconnect_v1.types.ListGitRepositoryLinksRequest, dict]]
The request object. Message for requesting a list of GitRepositoryLinks |
parent |
Required. Parent value for ListGitRepositoryLinksRequest This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
Returns | |
---|---|
Type | Description |
google.cloud.developerconnect_v1.services.developer_connect.pagers.ListGitRepositoryLinksAsyncPager |
Message for response to listing GitRepositoryLinks Iterating over this object will yield results and resolve additional pages automatically. |
list_locations
list_locations(
request: typing.Optional[
google.cloud.location.locations_pb2.ListLocationsRequest
] = None,
*,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.location.locations_pb2.ListLocationsResponse
Lists information about the supported locations for this service.
Parameters | |
---|---|
Name | Description |
request |
The request object. Request message for |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
Returns | |
---|---|
Type | Description |
|
Response message for ListLocations method. |
list_operations
list_operations(
request: typing.Optional[
google.longrunning.operations_pb2.ListOperationsRequest
] = None,
*,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.longrunning.operations_pb2.ListOperationsResponse
Lists operations that match the specified filter in the request.
Parameters | |
---|---|
Name | Description |
request |
The request object. Request message for |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
Returns | |
---|---|
Type | Description |
|
Response message for ListOperations method. |
parse_common_billing_account_path
parse_common_billing_account_path(path: str) -> typing.Dict[str, str]
Parse a billing_account path into its component segments.
parse_common_folder_path
parse_common_folder_path(path: str) -> typing.Dict[str, str]
Parse a folder path into its component segments.
parse_common_location_path
parse_common_location_path(path: str) -> typing.Dict[str, str]
Parse a location path into its component segments.
parse_common_organization_path
parse_common_organization_path(path: str) -> typing.Dict[str, str]
Parse a organization path into its component segments.
parse_common_project_path
parse_common_project_path(path: str) -> typing.Dict[str, str]
Parse a project path into its component segments.
parse_connection_path
parse_connection_path(path: str) -> typing.Dict[str, str]
Parses a connection path into its component segments.
parse_crypto_key_path
parse_crypto_key_path(path: str) -> typing.Dict[str, str]
Parses a crypto_key path into its component segments.
parse_git_repository_link_path
parse_git_repository_link_path(path: str) -> typing.Dict[str, str]
Parses a git_repository_link path into its component segments.
parse_secret_version_path
parse_secret_version_path(path: str) -> typing.Dict[str, str]
Parses a secret_version path into its component segments.
parse_service_path
parse_service_path(path: str) -> typing.Dict[str, str]
Parses a service path into its component segments.
secret_version_path
secret_version_path(project: str, secret: str, secret_version: str) -> str
Returns a fully-qualified secret_version string.
service_path
service_path(project: str, location: str, namespace: str, service: str) -> str
Returns a fully-qualified service string.
update_connection
update_connection(
request: typing.Optional[
typing.Union[
google.cloud.developerconnect_v1.types.developer_connect.UpdateConnectionRequest,
dict,
]
] = None,
*,
connection: typing.Optional[
google.cloud.developerconnect_v1.types.developer_connect.Connection
] = None,
update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation_async.AsyncOperation
Updates the parameters of a single Connection.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import developerconnect_v1
async def sample_update_connection():
# Create a client
client = developerconnect_v1.DeveloperConnectAsyncClient()
# Initialize request argument(s)
connection = developerconnect_v1.Connection()
connection.github_config.github_app = "FIREBASE"
request = developerconnect_v1.UpdateConnectionRequest(
connection=connection,
)
# Make the request
operation = client.update_connection(request=request)
print("Waiting for operation to complete...")
response = (await operation).result()
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.developerconnect_v1.types.UpdateConnectionRequest, dict]]
The request object. Message for updating a Connection |
connection |
Connection
Required. The resource being updated This corresponds to the |
update_mask |
Required. Field mask is used to specify the fields to be overwritten in the Connection resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
Returns | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation |
An object representing a long-running operation. The result type for the operation will be Connection Message describing Connection object |