SecureSourceManagerAsyncClient(*, credentials: typing.Optional[google.auth.credentials.Credentials] = None, transport: typing.Optional[typing.Union[str, google.cloud.securesourcemanager_v1.services.secure_source_manager.transports.base.SecureSourceManagerTransport, typing.Callable[[...], google.cloud.securesourcemanager_v1.services.secure_source_manager.transports.base.SecureSourceManagerTransport]]] = '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>)
Secure Source Manager API
Access Secure Source Manager instances, resources, and repositories.
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 |
SecureSourceManagerTransport |
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
SecureSourceManagerAsyncClient
SecureSourceManagerAsyncClient(*, credentials: typing.Optional[google.auth.credentials.Credentials] = None, transport: typing.Optional[typing.Union[str, google.cloud.securesourcemanager_v1.services.secure_source_manager.transports.base.SecureSourceManagerTransport, typing.Callable[[...], google.cloud.securesourcemanager_v1.services.secure_source_manager.transports.base.SecureSourceManagerTransport]]] = '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 secure source manager 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,SecureSourceManagerTransport,Callable[..., SecureSourceManagerTransport]]]
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 SecureSourceManagerTransport 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. |
batch_create_pull_request_comments
batch_create_pull_request_comments(
request: typing.Optional[
typing.Union[
google.cloud.securesourcemanager_v1.types.secure_source_manager.BatchCreatePullRequestCommentsRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
requests: typing.Optional[
typing.MutableSequence[
google.cloud.securesourcemanager_v1.types.secure_source_manager.CreatePullRequestCommentRequest
]
] = 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
Batch creates pull request comments.
# 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 securesourcemanager_v1
async def sample_batch_create_pull_request_comments():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
requests = securesourcemanager_v1.CreatePullRequestCommentRequest()
requests.parent = "parent_value"
requests.pull_request_comment.review.action_type = "APPROVED"
request = securesourcemanager_v1.BatchCreatePullRequestCommentsRequest(
parent="parent_value",
requests=requests,
)
# Make the request
operation = client.batch_create_pull_request_comments(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.securesourcemanager_v1.types.BatchCreatePullRequestCommentsRequest, dict]]
The request object. The request to batch create pull request comments. |
parent |
Required. The pull request in which to create the pull request comments. Format: |
requests |
:class:
Required. The request message specifying the resources to create. There should be exactly one CreatePullRequestCommentRequest with CommentDetail being REVIEW in the list, and no more than 100 CreatePullRequestCommentRequests with CommentDetail being CODE in the list 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 BatchCreatePullRequestCommentsResponse The response to batch create pull request comments. |
branch_rule_path
branch_rule_path(
project: str, location: str, repository: str, branch_rule: str
) -> str
Returns a fully-qualified branch_rule string.
ca_pool_path
ca_pool_path(project: str, location: str, ca_pool: str) -> str
Returns a fully-qualified ca_pool string.
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 |
close_issue
close_issue(
request: typing.Optional[
typing.Union[
google.cloud.securesourcemanager_v1.types.secure_source_manager.CloseIssueRequest,
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
Closes an issue.
# 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 securesourcemanager_v1
async def sample_close_issue():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
request = securesourcemanager_v1.CloseIssueRequest(
name="name_value",
)
# Make the request
operation = client.close_issue(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.securesourcemanager_v1.types.CloseIssueRequest, dict]]
The request object. The request to close an issue. |
name |
Required. Name of the issue to close. The format is |
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 Issue Metadata of an Issue. |
close_pull_request
close_pull_request(
request: typing.Optional[
typing.Union[
google.cloud.securesourcemanager_v1.types.secure_source_manager.ClosePullRequestRequest,
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
Closes a pull request without merging.
# 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 securesourcemanager_v1
async def sample_close_pull_request():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
request = securesourcemanager_v1.ClosePullRequestRequest(
name="name_value",
)
# Make the request
operation = client.close_pull_request(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.securesourcemanager_v1.types.ClosePullRequestRequest, dict]]
The request object. ClosePullRequestRequest is the request to close a pull request. |
name |
Required. The pull request to close. 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.api_core.operation_async.AsyncOperation |
An object representing a long-running operation. The result type for the operation will be PullRequest Metadata of a PullRequest. PullRequest is the request from a user to merge a branch (head) into another branch (base). |
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.
create_branch_rule
create_branch_rule(
request: typing.Optional[
typing.Union[
google.cloud.securesourcemanager_v1.types.secure_source_manager.CreateBranchRuleRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
branch_rule: typing.Optional[
google.cloud.securesourcemanager_v1.types.secure_source_manager.BranchRule
] = None,
branch_rule_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
CreateBranchRule creates a branch rule in 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 securesourcemanager_v1
async def sample_create_branch_rule():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
request = securesourcemanager_v1.CreateBranchRuleRequest(
parent="parent_value",
branch_rule_id="branch_rule_id_value",
)
# Make the request
operation = client.create_branch_rule(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.securesourcemanager_v1.types.CreateBranchRuleRequest, dict]]
The request object. CreateBranchRuleRequest is the request to create a branch rule. |
parent |
This corresponds to the |
branch_rule |
BranchRule
This corresponds to the |
branch_rule_id |
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 BranchRule Metadata of a BranchRule. BranchRule is the protection rule to enforce pre-defined rules on designated branches within a repository. |
create_hook
create_hook(
request: typing.Optional[
typing.Union[
google.cloud.securesourcemanager_v1.types.secure_source_manager.CreateHookRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
hook: typing.Optional[
google.cloud.securesourcemanager_v1.types.secure_source_manager.Hook
] = None,
hook_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 hook in 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 securesourcemanager_v1
async def sample_create_hook():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
hook = securesourcemanager_v1.Hook()
hook.target_uri = "target_uri_value"
request = securesourcemanager_v1.CreateHookRequest(
parent="parent_value",
hook=hook,
hook_id="hook_id_value",
)
# Make the request
operation = client.create_hook(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.securesourcemanager_v1.types.CreateHookRequest, dict]]
The request object. CreateHookRequest is the request for creating a hook. |
parent |
Required. The repository in which to create the hook. Values are of the form |
hook |
Hook
Required. The resource being created. This corresponds to the |
hook_id |
Required. The ID to use for the hook, which will become the final component of the hook's resource name. This value restricts to lower-case letters, numbers, and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum. 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 Hook Metadata of a Secure Source Manager Hook. |
create_instance
create_instance(
request: typing.Optional[
typing.Union[
google.cloud.securesourcemanager_v1.types.secure_source_manager.CreateInstanceRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
instance: typing.Optional[
google.cloud.securesourcemanager_v1.types.secure_source_manager.Instance
] = None,
instance_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 instance 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 securesourcemanager_v1
async def sample_create_instance():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
request = securesourcemanager_v1.CreateInstanceRequest(
parent="parent_value",
instance_id="instance_id_value",
)
# Make the request
operation = client.create_instance(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.securesourcemanager_v1.types.CreateInstanceRequest, dict]]
The request object. CreateInstanceRequest is the request for creating an instance. |
parent |
Required. Value for parent. This corresponds to the |
instance |
Instance
Required. The resource being created. This corresponds to the |
instance_id |
Required. ID of the instance to be created. 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 Instance A resource that represents a Secure Source Manager instance. |
create_issue
create_issue(
request: typing.Optional[
typing.Union[
google.cloud.securesourcemanager_v1.types.secure_source_manager.CreateIssueRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
issue: typing.Optional[
google.cloud.securesourcemanager_v1.types.secure_source_manager.Issue
] = 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 an issue.
# 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 securesourcemanager_v1
async def sample_create_issue():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
issue = securesourcemanager_v1.Issue()
issue.title = "title_value"
request = securesourcemanager_v1.CreateIssueRequest(
parent="parent_value",
issue=issue,
)
# Make the request
operation = client.create_issue(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.securesourcemanager_v1.types.CreateIssueRequest, dict]]
The request object. The request to create an issue. |
parent |
Required. The repository in which to create the issue. Format: |
issue |
Issue
Required. The issue to create. 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 Issue Metadata of an Issue. |
create_issue_comment
create_issue_comment(
request: typing.Optional[
typing.Union[
google.cloud.securesourcemanager_v1.types.secure_source_manager.CreateIssueCommentRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
issue_comment: typing.Optional[
google.cloud.securesourcemanager_v1.types.secure_source_manager.IssueComment
] = 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 an issue comment.
# 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 securesourcemanager_v1
async def sample_create_issue_comment():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
issue_comment = securesourcemanager_v1.IssueComment()
issue_comment.body = "body_value"
request = securesourcemanager_v1.CreateIssueCommentRequest(
parent="parent_value",
issue_comment=issue_comment,
)
# Make the request
operation = client.create_issue_comment(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.securesourcemanager_v1.types.CreateIssueCommentRequest, dict]]
The request object. The request to create an issue comment. |
parent |
Required. The issue in which to create the issue comment. Format: |
issue_comment |
IssueComment
Required. The issue comment to create. 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 IssueComment IssueComment represents a comment on an issue. |
create_pull_request
create_pull_request(
request: typing.Optional[
typing.Union[
google.cloud.securesourcemanager_v1.types.secure_source_manager.CreatePullRequestRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
pull_request: typing.Optional[
google.cloud.securesourcemanager_v1.types.secure_source_manager.PullRequest
] = 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 pull request.
# 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 securesourcemanager_v1
async def sample_create_pull_request():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
pull_request = securesourcemanager_v1.PullRequest()
pull_request.title = "title_value"
pull_request.base.ref = "ref_value"
request = securesourcemanager_v1.CreatePullRequestRequest(
parent="parent_value",
pull_request=pull_request,
)
# Make the request
operation = client.create_pull_request(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.securesourcemanager_v1.types.CreatePullRequestRequest, dict]]
The request object. CreatePullRequestRequest is the request to create a pull request. |
parent |
Required. The repository that the pull request is created from. Format: |
pull_request |
PullRequest
Required. The pull request to create. 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 PullRequest Metadata of a PullRequest. PullRequest is the request from a user to merge a branch (head) into another branch (base). |
create_pull_request_comment
create_pull_request_comment(
request: typing.Optional[
typing.Union[
google.cloud.securesourcemanager_v1.types.secure_source_manager.CreatePullRequestCommentRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
pull_request_comment: typing.Optional[
google.cloud.securesourcemanager_v1.types.secure_source_manager.PullRequestComment
] = 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 pull request comment.
# 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 securesourcemanager_v1
async def sample_create_pull_request_comment():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
pull_request_comment = securesourcemanager_v1.PullRequestComment()
pull_request_comment.review.action_type = "APPROVED"
request = securesourcemanager_v1.CreatePullRequestCommentRequest(
parent="parent_value",
pull_request_comment=pull_request_comment,
)
# Make the request
operation = client.create_pull_request_comment(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.securesourcemanager_v1.types.CreatePullRequestCommentRequest, dict]]
The request object. The request to create a pull request comment. |
parent |
Required. The pull request in which to create the pull request comment. Format: |
pull_request_comment |
PullRequestComment
Required. The pull request comment to create. 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 PullRequestComment PullRequestComment represents a comment on a pull request. |
create_repository
create_repository(
request: typing.Optional[
typing.Union[
google.cloud.securesourcemanager_v1.types.secure_source_manager.CreateRepositoryRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
repository: typing.Optional[
google.cloud.securesourcemanager_v1.types.secure_source_manager.Repository
] = None,
repository_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 repository in a given project and location. The Repository.Instance field is required in the request body for requests using the securesourcemanager.googleapis.com endpoint.
# 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 securesourcemanager_v1
async def sample_create_repository():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
request = securesourcemanager_v1.CreateRepositoryRequest(
parent="parent_value",
repository_id="repository_id_value",
)
# Make the request
operation = client.create_repository(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.securesourcemanager_v1.types.CreateRepositoryRequest, dict]]
The request object. CreateRepositoryRequest is the request for creating a repository. |
parent |
Required. The project in which to create the repository. Values are of the form |
repository |
Repository
Required. The resource being created. This corresponds to the |
repository_id |
Required. The ID to use for the repository, which will become the final component of the repository's resource name. This value should be 4-63 characters, and valid characters are / |
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 Repository Metadata of a Secure Source Manager repository. |
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_branch_rule
delete_branch_rule(
request: typing.Optional[
typing.Union[
google.cloud.securesourcemanager_v1.types.secure_source_manager.DeleteBranchRuleRequest,
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
DeleteBranchRule deletes a branch rule.
# 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 securesourcemanager_v1
async def sample_delete_branch_rule():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
request = securesourcemanager_v1.DeleteBranchRuleRequest(
name="name_value",
)
# Make the request
operation = client.delete_branch_rule(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.securesourcemanager_v1.types.DeleteBranchRuleRequest, dict]]
The request object. DeleteBranchRuleRequest is the request to delete a branch rule. |
name |
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_hook
delete_hook(
request: typing.Optional[
typing.Union[
google.cloud.securesourcemanager_v1.types.secure_source_manager.DeleteHookRequest,
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 Hook.
# 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 securesourcemanager_v1
async def sample_delete_hook():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
request = securesourcemanager_v1.DeleteHookRequest(
name="name_value",
)
# Make the request
operation = client.delete_hook(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.securesourcemanager_v1.types.DeleteHookRequest, dict]]
The request object. DeleteHookRequest is the request to delete a hook. |
name |
Required. Name of the hook to delete. The format is |
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_instance
delete_instance(
request: typing.Optional[
typing.Union[
google.cloud.securesourcemanager_v1.types.secure_source_manager.DeleteInstanceRequest,
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 instance.
# 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 securesourcemanager_v1
async def sample_delete_instance():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
request = securesourcemanager_v1.DeleteInstanceRequest(
name="name_value",
)
# Make the request
operation = client.delete_instance(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.securesourcemanager_v1.types.DeleteInstanceRequest, dict]]
The request object. DeleteInstanceRequest is the request for deleting an instance. |
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_issue
delete_issue(
request: typing.Optional[
typing.Union[
google.cloud.securesourcemanager_v1.types.secure_source_manager.DeleteIssueRequest,
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 an issue.
# 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 securesourcemanager_v1
async def sample_delete_issue():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
request = securesourcemanager_v1.DeleteIssueRequest(
name="name_value",
)
# Make the request
operation = client.delete_issue(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.securesourcemanager_v1.types.DeleteIssueRequest, dict]]
The request object. The request to delete an issue. |
name |
Required. Name of the issue to delete. The format is |
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_issue_comment
delete_issue_comment(
request: typing.Optional[
typing.Union[
google.cloud.securesourcemanager_v1.types.secure_source_manager.DeleteIssueCommentRequest,
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 an issue comment.
# 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 securesourcemanager_v1
async def sample_delete_issue_comment():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
request = securesourcemanager_v1.DeleteIssueCommentRequest(
name="name_value",
)
# Make the request
operation = client.delete_issue_comment(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.securesourcemanager_v1.types.DeleteIssueCommentRequest, dict]]
The request object. The request to delete an issue comment. |
name |
Required. Name of the issue comment to delete. The format is |
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 |
delete_pull_request_comment
delete_pull_request_comment(
request: typing.Optional[
typing.Union[
google.cloud.securesourcemanager_v1.types.secure_source_manager.DeletePullRequestCommentRequest,
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 pull request comment.
# 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 securesourcemanager_v1
async def sample_delete_pull_request_comment():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
request = securesourcemanager_v1.DeletePullRequestCommentRequest(
name="name_value",
)
# Make the request
operation = client.delete_pull_request_comment(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.securesourcemanager_v1.types.DeletePullRequestCommentRequest, dict]]
The request object. The request to delete a pull request comment. A Review PullRequestComment cannot be deleted. |
name |
Required. Name of the pull request comment to delete. The format is |
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_repository
delete_repository(
request: typing.Optional[
typing.Union[
google.cloud.securesourcemanager_v1.types.secure_source_manager.DeleteRepositoryRequest,
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 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 securesourcemanager_v1
async def sample_delete_repository():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
request = securesourcemanager_v1.DeleteRepositoryRequest(
name="name_value",
)
# Make the request
operation = client.delete_repository(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.securesourcemanager_v1.types.DeleteRepositoryRequest, dict]]
The request object. DeleteRepositoryRequest is the request to delete a repository. |
name |
Required. Name of the repository to delete. The format is |
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); } |
fetch_blob
fetch_blob(
request: typing.Optional[
typing.Union[
google.cloud.securesourcemanager_v1.types.secure_source_manager.FetchBlobRequest,
dict,
]
] = 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.securesourcemanager_v1.types.secure_source_manager.FetchBlobResponse
Fetches a blob from a 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 securesourcemanager_v1
async def sample_fetch_blob():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
request = securesourcemanager_v1.FetchBlobRequest(
repository="repository_value",
sha="sha_value",
)
# Make the request
response = await client.fetch_blob(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.securesourcemanager_v1.types.FetchBlobRequest, dict]]
The request object. Request message for fetching a blob (file content) from a repository. |
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.securesourcemanager_v1.types.FetchBlobResponse |
Response message containing the content of a blob. |
fetch_tree
fetch_tree(
request: typing.Optional[
typing.Union[
google.cloud.securesourcemanager_v1.types.secure_source_manager.FetchTreeRequest,
dict,
]
] = 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.securesourcemanager_v1.services.secure_source_manager.pagers.FetchTreeAsyncPager
)
Fetches a tree from a 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 securesourcemanager_v1
async def sample_fetch_tree():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
request = securesourcemanager_v1.FetchTreeRequest(
repository="repository_value",
)
# Make the request
page_result = client.fetch_tree(request=request)
# Handle the response
async for response in page_result:
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.securesourcemanager_v1.types.FetchTreeRequest, dict]]
The request object. Request message for fetching a tree structure from a repository. |
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.securesourcemanager_v1.services.secure_source_manager.pagers.FetchTreeAsyncPager |
Response message containing a list of TreeEntry objects. Iterating over this object will yield results and resolve additional pages automatically. |
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 |
SecureSourceManagerAsyncClient |
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 |
SecureSourceManagerAsyncClient |
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 |
SecureSourceManagerAsyncClient |
The constructed client. |
get_branch_rule
get_branch_rule(
request: typing.Optional[
typing.Union[
google.cloud.securesourcemanager_v1.types.secure_source_manager.GetBranchRuleRequest,
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.securesourcemanager_v1.types.secure_source_manager.BranchRule
GetBranchRule gets a branch rule.
# 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 securesourcemanager_v1
async def sample_get_branch_rule():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
request = securesourcemanager_v1.GetBranchRuleRequest(
name="name_value",
)
# Make the request
response = await client.get_branch_rule(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.securesourcemanager_v1.types.GetBranchRuleRequest, dict]]
The request object. GetBranchRuleRequest is the request for getting a branch rule. |
name |
Required. Name of the repository to retrieve. The format is |
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.securesourcemanager_v1.types.BranchRule |
Metadata of a BranchRule. BranchRule is the protection rule to enforce pre-defined rules on designated branches within a repository. |
get_hook
get_hook(
request: typing.Optional[
typing.Union[
google.cloud.securesourcemanager_v1.types.secure_source_manager.GetHookRequest,
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.securesourcemanager_v1.types.secure_source_manager.Hook
Gets metadata of a hook.
# 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 securesourcemanager_v1
async def sample_get_hook():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
request = securesourcemanager_v1.GetHookRequest(
name="name_value",
)
# Make the request
response = await client.get_hook(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.securesourcemanager_v1.types.GetHookRequest, dict]]
The request object. GetHookRequest is the request for getting a hook. |
name |
Required. Name of the hook to retrieve. The format is |
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.securesourcemanager_v1.types.Hook |
Metadata of a Secure Source Manager Hook. |
get_iam_policy
get_iam_policy(
request: typing.Optional[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest] = 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.iam.v1.policy_pb2.Policy
Gets the IAM access control policy for a function.
Returns an empty policy if the function exists and does not have a policy set.
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 |
|
Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A Policy is a collection of bindings . A binding binds one or more members to a single role . Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A role is a named list of permissions (defined by IAM or configured by users). A binding can optionally specify a condition , which is a logic expression that further constrains the role binding based on attributes about the request and/or target resource. **JSON Example** :: { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:[email protected]", "group:[email protected]", "domain:google.com", "serviceAccount:[email protected]" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": ["user:[email protected]"], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01t00:00:00.000z')",="" }="" }="" ]="" }="" **yaml="" example**="" ::="" bindings:="" -="" members:="" -="" user:[email protected]="" -="" group:[email protected]="" -="" domain:google.com="" -="" serviceaccount:[email protected]="" role:="" roles/resourcemanager.organizationadmin="" -="" members:="" -="" user:[email protected]="" role:="" roles/resourcemanager.organizationviewer="" condition:="" title:="" expirable="" access="" description:="" does="" not="" grant="" access="" after="" sep="" 2020="" expression:="" request.time="">< timestamp('2020-10-01t00:00:00.000z')="" for="" a="" description="" of="" iam="" and="" its="" features,="" see="" the="">IAM developer's guide __. |
get_iam_policy_repo
get_iam_policy_repo(
request: typing.Optional[
typing.Union[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest, dict]
] = None,
*,
resource: 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.iam.v1.policy_pb2.Policy
Get IAM policy for a 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 securesourcemanager_v1
from google.iam.v1 import iam_policy_pb2 # type: ignore
async def sample_get_iam_policy_repo():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
request = iam_policy_pb2.GetIamPolicyRequest(
resource="resource_value",
)
# Make the request
response = await client.get_iam_policy_repo(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest, dict]]
The request object. Request message for |
resource |
REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. 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.iam.v1.policy_pb2.Policy |
An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A Policy is a collection of bindings. A binding binds one or more members, or principals, to a single role. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A role is a named list of permissions; each role can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a binding can also specify a condition, which is a logical expression that allows access to a resource only if the expression evaluates to true. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](\ https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** :literal:\ { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:[email protected]", "group:[email protected]", "domain:google.com", "serviceAccount:[email protected]" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:[email protected]" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01t00:00:00.000z')",="" }="" }="" ],="" "etag":="" "bwwwja0yfja=", " version":="" 3="">\ \ **YAML example:** :literal:\ bindings: - members: - user:[email protected] - group:[email protected] - domain:google.com - serviceAccount:[email protected] role: roles/resourcemanager.organizationAdmin - members: - user:[email protected] role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01t00:00:00.000z')="" etag:="" bwwwja0yfja="version:">\ \ For a description of IAM and its features, see the [IAM documentation](\ https://cloud.google.com/iam/docs/). |
get_instance
get_instance(
request: typing.Optional[
typing.Union[
google.cloud.securesourcemanager_v1.types.secure_source_manager.GetInstanceRequest,
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.securesourcemanager_v1.types.secure_source_manager.Instance
Gets details of a single instance.
# 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 securesourcemanager_v1
async def sample_get_instance():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
request = securesourcemanager_v1.GetInstanceRequest(
name="name_value",
)
# Make the request
response = await client.get_instance(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.securesourcemanager_v1.types.GetInstanceRequest, dict]]
The request object. GetInstanceRequest is the request for getting an instance. |
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.securesourcemanager_v1.types.Instance |
A resource that represents a Secure Source Manager instance. |
get_issue
get_issue(
request: typing.Optional[
typing.Union[
google.cloud.securesourcemanager_v1.types.secure_source_manager.GetIssueRequest,
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.securesourcemanager_v1.types.secure_source_manager.Issue
Gets an issue.
# 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 securesourcemanager_v1
async def sample_get_issue():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
request = securesourcemanager_v1.GetIssueRequest(
name="name_value",
)
# Make the request
response = await client.get_issue(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.securesourcemanager_v1.types.GetIssueRequest, dict]]
The request object. The request to get an issue. |
name |
Required. Name of the issue to retrieve. The format is |
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.securesourcemanager_v1.types.Issue |
Metadata of an Issue. |
get_issue_comment
get_issue_comment(
request: typing.Optional[
typing.Union[
google.cloud.securesourcemanager_v1.types.secure_source_manager.GetIssueCommentRequest,
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.securesourcemanager_v1.types.secure_source_manager.IssueComment
Gets an issue comment.
# 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 securesourcemanager_v1
async def sample_get_issue_comment():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
request = securesourcemanager_v1.GetIssueCommentRequest(
name="name_value",
)
# Make the request
response = await client.get_issue_comment(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.securesourcemanager_v1.types.GetIssueCommentRequest, dict]]
The request object. The request to get an issue comment. |
name |
Required. Name of the issue comment to retrieve. The format is |
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.securesourcemanager_v1.types.IssueComment |
IssueComment represents a comment on an issue. |
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_pull_request
get_pull_request(
request: typing.Optional[
typing.Union[
google.cloud.securesourcemanager_v1.types.secure_source_manager.GetPullRequestRequest,
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.securesourcemanager_v1.types.secure_source_manager.PullRequest
Gets a pull request.
# 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 securesourcemanager_v1
async def sample_get_pull_request():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
request = securesourcemanager_v1.GetPullRequestRequest(
name="name_value",
)
# Make the request
response = await client.get_pull_request(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.securesourcemanager_v1.types.GetPullRequestRequest, dict]]
The request object. GetPullRequestRequest is the request to get a pull request. |
name |
Required. Name of the pull request to retrieve. The format is |
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.securesourcemanager_v1.types.PullRequest |
Metadata of a PullRequest. PullRequest is the request from a user to merge a branch (head) into another branch (base). |
get_pull_request_comment
get_pull_request_comment(
request: typing.Optional[
typing.Union[
google.cloud.securesourcemanager_v1.types.secure_source_manager.GetPullRequestCommentRequest,
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.securesourcemanager_v1.types.secure_source_manager.PullRequestComment
Gets a pull request comment.
# 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 securesourcemanager_v1
async def sample_get_pull_request_comment():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
request = securesourcemanager_v1.GetPullRequestCommentRequest(
name="name_value",
)
# Make the request
response = await client.get_pull_request_comment(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.securesourcemanager_v1.types.GetPullRequestCommentRequest, dict]]
The request object. The request to get a pull request comment. |
name |
Required. Name of the pull request comment to retrieve. The format is |
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.securesourcemanager_v1.types.PullRequestComment |
PullRequestComment represents a comment on a pull request. |
get_repository
get_repository(
request: typing.Optional[
typing.Union[
google.cloud.securesourcemanager_v1.types.secure_source_manager.GetRepositoryRequest,
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.securesourcemanager_v1.types.secure_source_manager.Repository
Gets metadata of a 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 securesourcemanager_v1
async def sample_get_repository():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
request = securesourcemanager_v1.GetRepositoryRequest(
name="name_value",
)
# Make the request
response = await client.get_repository(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.securesourcemanager_v1.types.GetRepositoryRequest, dict]]
The request object. GetRepositoryRequest is the request for getting a repository. |
name |
Required. Name of the repository to retrieve. The format is |
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.securesourcemanager_v1.types.Repository |
Metadata of a Secure Source Manager repository. |
get_transport_class
get_transport_class(
label: typing.Optional[str] = None,
) -> typing.Type[
google.cloud.securesourcemanager_v1.services.secure_source_manager.transports.base.SecureSourceManagerTransport
]
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. |
hook_path
hook_path(project: str, location: str, repository: str, hook: str) -> str
Returns a fully-qualified hook string.
instance_path
instance_path(project: str, location: str, instance: str) -> str
Returns a fully-qualified instance string.
issue_comment_path
issue_comment_path(
project: str, location: str, repository: str, issue: str, comment: str
) -> str
Returns a fully-qualified issue_comment string.
issue_path
issue_path(project: str, location: str, repository: str, issue: str) -> str
Returns a fully-qualified issue string.
list_branch_rules
list_branch_rules(
request: typing.Optional[
typing.Union[
google.cloud.securesourcemanager_v1.types.secure_source_manager.ListBranchRulesRequest,
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.securesourcemanager_v1.services.secure_source_manager.pagers.ListBranchRulesAsyncPager
)
ListBranchRules lists branch rules in 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 securesourcemanager_v1
async def sample_list_branch_rules():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
request = securesourcemanager_v1.ListBranchRulesRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_branch_rules(request=request)
# Handle the response
async for response in page_result:
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.securesourcemanager_v1.types.ListBranchRulesRequest, dict]]
The request object. ListBranchRulesRequest is the request to list branch rules. |
parent |
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.securesourcemanager_v1.services.secure_source_manager.pagers.ListBranchRulesAsyncPager |
ListBranchRulesResponse is the response to listing branchRules. Iterating over this object will yield results and resolve additional pages automatically. |
list_hooks
list_hooks(
request: typing.Optional[
typing.Union[
google.cloud.securesourcemanager_v1.types.secure_source_manager.ListHooksRequest,
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.securesourcemanager_v1.services.secure_source_manager.pagers.ListHooksAsyncPager
)
Lists hooks in 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 securesourcemanager_v1
async def sample_list_hooks():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
request = securesourcemanager_v1.ListHooksRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_hooks(request=request)
# Handle the response
async for response in page_result:
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.securesourcemanager_v1.types.ListHooksRequest, dict]]
The request object. ListHooksRequest is request to list hooks. |
parent |
Required. Parent value for ListHooksRequest. 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.securesourcemanager_v1.services.secure_source_manager.pagers.ListHooksAsyncPager |
ListHooksResponse is response to list hooks. Iterating over this object will yield results and resolve additional pages automatically. |
list_instances
list_instances(
request: typing.Optional[
typing.Union[
google.cloud.securesourcemanager_v1.types.secure_source_manager.ListInstancesRequest,
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.securesourcemanager_v1.services.secure_source_manager.pagers.ListInstancesAsyncPager
)
Lists Instances 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 securesourcemanager_v1
async def sample_list_instances():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
request = securesourcemanager_v1.ListInstancesRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_instances(request=request)
# Handle the response
async for response in page_result:
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.securesourcemanager_v1.types.ListInstancesRequest, dict]]
The request object. ListInstancesRequest is the request to list instances. |
parent |
Required. Parent value for ListInstancesRequest. 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.securesourcemanager_v1.services.secure_source_manager.pagers.ListInstancesAsyncPager |
Iterating over this object will yield results and resolve additional pages automatically. |
list_issue_comments
list_issue_comments(
request: typing.Optional[
typing.Union[
google.cloud.securesourcemanager_v1.types.secure_source_manager.ListIssueCommentsRequest,
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.securesourcemanager_v1.services.secure_source_manager.pagers.ListIssueCommentsAsyncPager
)
Lists comments in an issue.
# 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 securesourcemanager_v1
async def sample_list_issue_comments():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
request = securesourcemanager_v1.ListIssueCommentsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_issue_comments(request=request)
# Handle the response
async for response in page_result:
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.securesourcemanager_v1.types.ListIssueCommentsRequest, dict]]
The request object. The request to list issue comments. |
parent |
Required. The issue in which to list the comments. 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.securesourcemanager_v1.services.secure_source_manager.pagers.ListIssueCommentsAsyncPager |
The response to list issue comments. Iterating over this object will yield results and resolve additional pages automatically. |
list_issues
list_issues(
request: typing.Optional[
typing.Union[
google.cloud.securesourcemanager_v1.types.secure_source_manager.ListIssuesRequest,
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.securesourcemanager_v1.services.secure_source_manager.pagers.ListIssuesAsyncPager
)
Lists issues in a 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 securesourcemanager_v1
async def sample_list_issues():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
request = securesourcemanager_v1.ListIssuesRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_issues(request=request)
# Handle the response
async for response in page_result:
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.securesourcemanager_v1.types.ListIssuesRequest, dict]]
The request object. The request to list issues. |
parent |
Required. The repository in which to list issues. 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.securesourcemanager_v1.services.secure_source_manager.pagers.ListIssuesAsyncPager |
The response to list issues. 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. |
list_pull_request_comments
list_pull_request_comments(
request: typing.Optional[
typing.Union[
google.cloud.securesourcemanager_v1.types.secure_source_manager.ListPullRequestCommentsRequest,
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.securesourcemanager_v1.services.secure_source_manager.pagers.ListPullRequestCommentsAsyncPager
)
Lists pull request comments.
# 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 securesourcemanager_v1
async def sample_list_pull_request_comments():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
request = securesourcemanager_v1.ListPullRequestCommentsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_pull_request_comments(request=request)
# Handle the response
async for response in page_result:
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.securesourcemanager_v1.types.ListPullRequestCommentsRequest, dict]]
The request object. The request to list pull request comments. |
parent |
Required. The pull request in which to list pull request comments. 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.securesourcemanager_v1.services.secure_source_manager.pagers.ListPullRequestCommentsAsyncPager |
The response to list pull request comments. Iterating over this object will yield results and resolve additional pages automatically. |
list_pull_request_file_diffs
list_pull_request_file_diffs(
request: typing.Optional[
typing.Union[
google.cloud.securesourcemanager_v1.types.secure_source_manager.ListPullRequestFileDiffsRequest,
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.securesourcemanager_v1.services.secure_source_manager.pagers.ListPullRequestFileDiffsAsyncPager
)
Lists a pull request's file diffs.
# 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 securesourcemanager_v1
async def sample_list_pull_request_file_diffs():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
request = securesourcemanager_v1.ListPullRequestFileDiffsRequest(
name="name_value",
)
# Make the request
page_result = client.list_pull_request_file_diffs(request=request)
# Handle the response
async for response in page_result:
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.securesourcemanager_v1.types.ListPullRequestFileDiffsRequest, dict]]
The request object. ListPullRequestFileDiffsRequest is the request to list pull request file diffs. |
name |
Required. The pull request to list file diffs for. 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.securesourcemanager_v1.services.secure_source_manager.pagers.ListPullRequestFileDiffsAsyncPager |
ListPullRequestFileDiffsResponse is the response containing file diffs returned from ListPullRequestFileDiffs. Iterating over this object will yield results and resolve additional pages automatically. |
list_pull_requests
list_pull_requests(
request: typing.Optional[
typing.Union[
google.cloud.securesourcemanager_v1.types.secure_source_manager.ListPullRequestsRequest,
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.securesourcemanager_v1.services.secure_source_manager.pagers.ListPullRequestsAsyncPager
)
Lists pull requests in a 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 securesourcemanager_v1
async def sample_list_pull_requests():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
request = securesourcemanager_v1.ListPullRequestsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_pull_requests(request=request)
# Handle the response
async for response in page_result:
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.securesourcemanager_v1.types.ListPullRequestsRequest, dict]]
The request object. ListPullRequestsRequest is the request to list pull requests. |
parent |
Required. The repository in which to list pull requests. 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.securesourcemanager_v1.services.secure_source_manager.pagers.ListPullRequestsAsyncPager |
ListPullRequestsResponse is the response to list pull requests. Iterating over this object will yield results and resolve additional pages automatically. |
list_repositories
list_repositories(
request: typing.Optional[
typing.Union[
google.cloud.securesourcemanager_v1.types.secure_source_manager.ListRepositoriesRequest,
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.securesourcemanager_v1.services.secure_source_manager.pagers.ListRepositoriesAsyncPager
)
Lists Repositories in a given project and location.
The instance field is required in the query parameter for requests using the securesourcemanager.googleapis.com endpoint.
# 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 securesourcemanager_v1
async def sample_list_repositories():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
request = securesourcemanager_v1.ListRepositoriesRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_repositories(request=request)
# Handle the response
async for response in page_result:
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.securesourcemanager_v1.types.ListRepositoriesRequest, dict]]
The request object. ListRepositoriesRequest is request to list repositories. |
parent |
Required. Parent value for ListRepositoriesRequest. 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.securesourcemanager_v1.services.secure_source_manager.pagers.ListRepositoriesAsyncPager |
Iterating over this object will yield results and resolve additional pages automatically. |
merge_pull_request
merge_pull_request(
request: typing.Optional[
typing.Union[
google.cloud.securesourcemanager_v1.types.secure_source_manager.MergePullRequestRequest,
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
Merges a pull request.
# 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 securesourcemanager_v1
async def sample_merge_pull_request():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
request = securesourcemanager_v1.MergePullRequestRequest(
name="name_value",
)
# Make the request
operation = client.merge_pull_request(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.securesourcemanager_v1.types.MergePullRequestRequest, dict]]
The request object. MergePullRequestRequest is the request to merge a pull request. |
name |
Required. The pull request to merge. 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.api_core.operation_async.AsyncOperation |
An object representing a long-running operation. The result type for the operation will be PullRequest Metadata of a PullRequest. PullRequest is the request from a user to merge a branch (head) into another branch (base). |
open_issue
open_issue(
request: typing.Optional[
typing.Union[
google.cloud.securesourcemanager_v1.types.secure_source_manager.OpenIssueRequest,
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
Opens an issue.
# 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 securesourcemanager_v1
async def sample_open_issue():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
request = securesourcemanager_v1.OpenIssueRequest(
name="name_value",
)
# Make the request
operation = client.open_issue(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.securesourcemanager_v1.types.OpenIssueRequest, dict]]
The request object. The request to open an issue. |
name |
Required. Name of the issue to open. The format is |
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 Issue Metadata of an Issue. |
open_pull_request
open_pull_request(
request: typing.Optional[
typing.Union[
google.cloud.securesourcemanager_v1.types.secure_source_manager.OpenPullRequestRequest,
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
Opens a pull request.
# 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 securesourcemanager_v1
async def sample_open_pull_request():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
request = securesourcemanager_v1.OpenPullRequestRequest(
name="name_value",
)
# Make the request
operation = client.open_pull_request(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.securesourcemanager_v1.types.OpenPullRequestRequest, dict]]
The request object. OpenPullRequestRequest is the request to open a pull request. |
name |
Required. The pull request to open. 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.api_core.operation_async.AsyncOperation |
An object representing a long-running operation. The result type for the operation will be PullRequest Metadata of a PullRequest. PullRequest is the request from a user to merge a branch (head) into another branch (base). |
parse_branch_rule_path
parse_branch_rule_path(path: str) -> typing.Dict[str, str]
Parses a branch_rule path into its component segments.
parse_ca_pool_path
parse_ca_pool_path(path: str) -> typing.Dict[str, str]
Parses a ca_pool path into its component segments.
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_crypto_key_path
parse_crypto_key_path(path: str) -> typing.Dict[str, str]
Parses a crypto_key path into its component segments.
parse_hook_path
parse_hook_path(path: str) -> typing.Dict[str, str]
Parses a hook path into its component segments.
parse_instance_path
parse_instance_path(path: str) -> typing.Dict[str, str]
Parses a instance path into its component segments.
parse_issue_comment_path
parse_issue_comment_path(path: str) -> typing.Dict[str, str]
Parses a issue_comment path into its component segments.
parse_issue_path
parse_issue_path(path: str) -> typing.Dict[str, str]
Parses a issue path into its component segments.
parse_pull_request_comment_path
parse_pull_request_comment_path(path: str) -> typing.Dict[str, str]
Parses a pull_request_comment path into its component segments.
parse_pull_request_path
parse_pull_request_path(path: str) -> typing.Dict[str, str]
Parses a pull_request path into its component segments.
parse_repository_path
parse_repository_path(path: str) -> typing.Dict[str, str]
Parses a repository path into its component segments.
parse_service_attachment_path
parse_service_attachment_path(path: str) -> typing.Dict[str, str]
Parses a service_attachment path into its component segments.
pull_request_comment_path
pull_request_comment_path(
project: str, location: str, repository: str, pull_request: str, comment: str
) -> str
Returns a fully-qualified pull_request_comment string.
pull_request_path
pull_request_path(
project: str, location: str, repository: str, pull_request: str
) -> str
Returns a fully-qualified pull_request string.
repository_path
repository_path(project: str, location: str, repository: str) -> str
Returns a fully-qualified repository string.
resolve_pull_request_comments
resolve_pull_request_comments(
request: typing.Optional[
typing.Union[
google.cloud.securesourcemanager_v1.types.secure_source_manager.ResolvePullRequestCommentsRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
names: typing.Optional[typing.MutableSequence[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
Resolves pull request comments.
# 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 securesourcemanager_v1
async def sample_resolve_pull_request_comments():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
request = securesourcemanager_v1.ResolvePullRequestCommentsRequest(
parent="parent_value",
names=['names_value1', 'names_value2'],
)
# Make the request
operation = client.resolve_pull_request_comments(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.securesourcemanager_v1.types.ResolvePullRequestCommentsRequest, dict]]
The request object. The request to resolve multiple pull request comments. |
parent |
Required. The pull request in which to resolve the pull request comments. Format: |
names |
:class:
Required. The names of the pull request comments to resolve. 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.api_core.operation_async.AsyncOperation |
An object representing a long-running operation. The result type for the operation will be ResolvePullRequestCommentsResponse The response to resolve multiple pull request comments. |
service_attachment_path
service_attachment_path(project: str, region: str, service_attachment: str) -> str
Returns a fully-qualified service_attachment string.
set_iam_policy
set_iam_policy(
request: typing.Optional[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest] = 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.iam.v1.policy_pb2.Policy
Sets the IAM access control policy on the specified function.
Replaces any existing policy.
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 |
|
Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A Policy is a collection of bindings . A binding binds one or more members to a single role . Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A role is a named list of permissions (defined by IAM or configured by users). A binding can optionally specify a condition , which is a logic expression that further constrains the role binding based on attributes about the request and/or target resource. **JSON Example** :: { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:[email protected]", "group:[email protected]", "domain:google.com", "serviceAccount:[email protected]" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": ["user:[email protected]"], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01t00:00:00.000z')",="" }="" }="" ]="" }="" **yaml="" example**="" ::="" bindings:="" -="" members:="" -="" user:[email protected]="" -="" group:[email protected]="" -="" domain:google.com="" -="" serviceaccount:[email protected]="" role:="" roles/resourcemanager.organizationadmin="" -="" members:="" -="" user:[email protected]="" role:="" roles/resourcemanager.organizationviewer="" condition:="" title:="" expirable="" access="" description:="" does="" not="" grant="" access="" after="" sep="" 2020="" expression:="" request.time="">< timestamp('2020-10-01t00:00:00.000z')="" for="" a="" description="" of="" iam="" and="" its="" features,="" see="" the="">IAM developer's guide __. |
set_iam_policy_repo
set_iam_policy_repo(
request: typing.Optional[
typing.Union[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest, dict]
] = None,
*,
resource: 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.iam.v1.policy_pb2.Policy
Set IAM policy on a 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 securesourcemanager_v1
from google.iam.v1 import iam_policy_pb2 # type: ignore
async def sample_set_iam_policy_repo():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
request = iam_policy_pb2.SetIamPolicyRequest(
resource="resource_value",
)
# Make the request
response = await client.set_iam_policy_repo(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest, dict]]
The request object. Request message for |
resource |
REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. 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.iam.v1.policy_pb2.Policy |
An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A Policy is a collection of bindings. A binding binds one or more members, or principals, to a single role. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A role is a named list of permissions; each role can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a binding can also specify a condition, which is a logical expression that allows access to a resource only if the expression evaluates to true. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](\ https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** :literal:\ { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:[email protected]", "group:[email protected]", "domain:google.com", "serviceAccount:[email protected]" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:[email protected]" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01t00:00:00.000z')",="" }="" }="" ],="" "etag":="" "bwwwja0yfja=", " version":="" 3="">\ \ **YAML example:** :literal:\ bindings: - members: - user:[email protected] - group:[email protected] - domain:google.com - serviceAccount:[email protected] role: roles/resourcemanager.organizationAdmin - members: - user:[email protected] role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01t00:00:00.000z')="" etag:="" bwwwja0yfja="version:">\ \ For a description of IAM and its features, see the [IAM documentation](\ https://cloud.google.com/iam/docs/). |
test_iam_permissions
test_iam_permissions(
request: typing.Optional[
google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest
] = 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.iam.v1.iam_policy_pb2.TestIamPermissionsResponse
Tests the specified IAM permissions against the IAM access control policy for a function.
If the function does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
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 TestIamPermissions method. |
test_iam_permissions_repo
test_iam_permissions_repo(
request: typing.Optional[
typing.Union[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest, dict]
] = None,
*,
resource: 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.iam.v1.iam_policy_pb2.TestIamPermissionsResponse
Test IAM permissions on a repository. IAM permission checks are not required on this method.
# 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 securesourcemanager_v1
from google.iam.v1 import iam_policy_pb2 # type: ignore
async def sample_test_iam_permissions_repo():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
request = iam_policy_pb2.TestIamPermissionsRequest(
resource="resource_value",
permissions=['permissions_value1', 'permissions_value2'],
)
# Make the request
response = await client.test_iam_permissions_repo(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest, dict]]
The request object. Request message for |
resource |
REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. 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.iam.v1.iam_policy_pb2.TestIamPermissionsResponse |
Response message for TestIamPermissions method. |
unresolve_pull_request_comments
unresolve_pull_request_comments(
request: typing.Optional[
typing.Union[
google.cloud.securesourcemanager_v1.types.secure_source_manager.UnresolvePullRequestCommentsRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
names: typing.Optional[typing.MutableSequence[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
Unresolves pull request comment.
# 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 securesourcemanager_v1
async def sample_unresolve_pull_request_comments():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
request = securesourcemanager_v1.UnresolvePullRequestCommentsRequest(
parent="parent_value",
names=['names_value1', 'names_value2'],
)
# Make the request
operation = client.unresolve_pull_request_comments(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.securesourcemanager_v1.types.UnresolvePullRequestCommentsRequest, dict]]
The request object. The request to unresolve multiple pull request comments. |
parent |
Required. The pull request in which to resolve the pull request comments. Format: |
names |
:class:
Required. The names of the pull request comments to unresolve. 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.api_core.operation_async.AsyncOperation |
An object representing a long-running operation. The result type for the operation will be UnresolvePullRequestCommentsResponse The response to unresolve multiple pull request comments. |
update_branch_rule
update_branch_rule(
request: typing.Optional[
typing.Union[
google.cloud.securesourcemanager_v1.types.secure_source_manager.UpdateBranchRuleRequest,
dict,
]
] = None,
*,
branch_rule: typing.Optional[
google.cloud.securesourcemanager_v1.types.secure_source_manager.BranchRule
] = 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
UpdateBranchRule updates a branch rule.
# 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 securesourcemanager_v1
async def sample_update_branch_rule():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
request = securesourcemanager_v1.UpdateBranchRuleRequest(
)
# Make the request
operation = client.update_branch_rule(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.securesourcemanager_v1.types.UpdateBranchRuleRequest, dict]]
The request object. UpdateBranchRuleRequest is the request to update a branchRule. |
branch_rule |
BranchRule
This corresponds to the |
update_mask |
Required. Field mask is used to specify the fields to be overwritten in the branchRule 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. The special value "*" means full replacement. 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 BranchRule Metadata of a BranchRule. BranchRule is the protection rule to enforce pre-defined rules on designated branches within a repository. |
update_hook
update_hook(
request: typing.Optional[
typing.Union[
google.cloud.securesourcemanager_v1.types.secure_source_manager.UpdateHookRequest,
dict,
]
] = None,
*,
hook: typing.Optional[
google.cloud.securesourcemanager_v1.types.secure_source_manager.Hook
] = 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 metadata of a hook.
# 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 securesourcemanager_v1
async def sample_update_hook():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
hook = securesourcemanager_v1.Hook()
hook.target_uri = "target_uri_value"
request = securesourcemanager_v1.UpdateHookRequest(
hook=hook,
)
# Make the request
operation = client.update_hook(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.securesourcemanager_v1.types.UpdateHookRequest, dict]]
The request object. UpdateHookRequest is the request to update a hook. |
hook |
Hook
Required. The hook being updated. This corresponds to the |
update_mask |
Required. Field mask is used to specify the fields to be overwritten in the hook 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. The special value "*" means full replacement. 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 Hook Metadata of a Secure Source Manager Hook. |
update_issue
update_issue(
request: typing.Optional[
typing.Union[
google.cloud.securesourcemanager_v1.types.secure_source_manager.UpdateIssueRequest,
dict,
]
] = None,
*,
issue: typing.Optional[
google.cloud.securesourcemanager_v1.types.secure_source_manager.Issue
] = 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 a issue.
# 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 securesourcemanager_v1
async def sample_update_issue():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
issue = securesourcemanager_v1.Issue()
issue.title = "title_value"
request = securesourcemanager_v1.UpdateIssueRequest(
issue=issue,
)
# Make the request
operation = client.update_issue(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.securesourcemanager_v1.types.UpdateIssueRequest, dict]]
The request object. The request to update an issue. |
issue |
Issue
Required. The issue to update. This corresponds to the |
update_mask |
Optional. Field mask is used to specify the fields to be overwritten in the issue 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. The special value "*" means full replacement. 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 Issue Metadata of an Issue. |
update_issue_comment
update_issue_comment(
request: typing.Optional[
typing.Union[
google.cloud.securesourcemanager_v1.types.secure_source_manager.UpdateIssueCommentRequest,
dict,
]
] = None,
*,
issue_comment: typing.Optional[
google.cloud.securesourcemanager_v1.types.secure_source_manager.IssueComment
] = 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 an issue comment.
# 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 securesourcemanager_v1
async def sample_update_issue_comment():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
issue_comment = securesourcemanager_v1.IssueComment()
issue_comment.body = "body_value"
request = securesourcemanager_v1.UpdateIssueCommentRequest(
issue_comment=issue_comment,
)
# Make the request
operation = client.update_issue_comment(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.securesourcemanager_v1.types.UpdateIssueCommentRequest, dict]]
The request object. The request to update an issue comment. |
issue_comment |
IssueComment
Required. The issue comment to update. This corresponds to the |
update_mask |
Optional. Field mask is used to specify the fields to be overwritten in the issue comment 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. The special value "*" means full replacement. 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 IssueComment IssueComment represents a comment on an issue. |
update_pull_request
update_pull_request(
request: typing.Optional[
typing.Union[
google.cloud.securesourcemanager_v1.types.secure_source_manager.UpdatePullRequestRequest,
dict,
]
] = None,
*,
pull_request: typing.Optional[
google.cloud.securesourcemanager_v1.types.secure_source_manager.PullRequest
] = 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 a pull request.
# 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 securesourcemanager_v1
async def sample_update_pull_request():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
pull_request = securesourcemanager_v1.PullRequest()
pull_request.title = "title_value"
pull_request.base.ref = "ref_value"
request = securesourcemanager_v1.UpdatePullRequestRequest(
pull_request=pull_request,
)
# Make the request
operation = client.update_pull_request(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.securesourcemanager_v1.types.UpdatePullRequestRequest, dict]]
The request object. UpdatePullRequestRequest is the request to update a pull request. |
pull_request |
PullRequest
Required. The pull request to update. This corresponds to the |
update_mask |
Optional. Field mask is used to specify the fields to be overwritten in the pull request 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. The special value "*" means full replacement. 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 PullRequest Metadata of a PullRequest. PullRequest is the request from a user to merge a branch (head) into another branch (base). |
update_pull_request_comment
update_pull_request_comment(
request: typing.Optional[
typing.Union[
google.cloud.securesourcemanager_v1.types.secure_source_manager.UpdatePullRequestCommentRequest,
dict,
]
] = None,
*,
pull_request_comment: typing.Optional[
google.cloud.securesourcemanager_v1.types.secure_source_manager.PullRequestComment
] = 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 a pull request comment.
# 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 securesourcemanager_v1
async def sample_update_pull_request_comment():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
pull_request_comment = securesourcemanager_v1.PullRequestComment()
pull_request_comment.review.action_type = "APPROVED"
request = securesourcemanager_v1.UpdatePullRequestCommentRequest(
pull_request_comment=pull_request_comment,
)
# Make the request
operation = client.update_pull_request_comment(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.securesourcemanager_v1.types.UpdatePullRequestCommentRequest, dict]]
The request object. The request to update a pull request comment. |
pull_request_comment |
PullRequestComment
Required. The pull request comment to update. This corresponds to the |
update_mask |
Optional. Field mask is used to specify the fields to be overwritten in the pull request comment resource by the update. Updatable fields are |
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 PullRequestComment PullRequestComment represents a comment on a pull request. |
update_repository
update_repository(
request: typing.Optional[
typing.Union[
google.cloud.securesourcemanager_v1.types.secure_source_manager.UpdateRepositoryRequest,
dict,
]
] = None,
*,
repository: typing.Optional[
google.cloud.securesourcemanager_v1.types.secure_source_manager.Repository
] = 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 metadata of a 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 securesourcemanager_v1
async def sample_update_repository():
# Create a client
client = securesourcemanager_v1.SecureSourceManagerAsyncClient()
# Initialize request argument(s)
request = securesourcemanager_v1.UpdateRepositoryRequest(
)
# Make the request
operation = client.update_repository(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.securesourcemanager_v1.types.UpdateRepositoryRequest, dict]]
The request object. UpdateRepositoryRequest is the request to update a repository. |
repository |
Repository
Required. The repository being updated. This corresponds to the |
update_mask |
Optional. Field mask is used to specify the fields to be overwritten in the repository 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 Repository Metadata of a Secure Source Manager repository. |