Compute Engine v1 API - Class ServiceAttachmentsClient (2.5.0)

public abstract class ServiceAttachmentsClient

Reference documentation and code samples for the Compute Engine v1 API class ServiceAttachmentsClient.

ServiceAttachments client wrapper, for convenient use.

Inheritance

Object > ServiceAttachmentsClient

Namespace

Google.Cloud.Compute.V1

Assembly

Google.Cloud.Compute.V1.dll

Remarks

The ServiceAttachments API.

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the ServiceAttachments service, which is a host of "compute.googleapis.com" and a port of 443.

Property Value
TypeDescription
String

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default ServiceAttachments scopes.

Property Value
TypeDescription
IReadOnlyList<String>
Remarks

DeleteOperationsClient

public virtual OperationsClient DeleteOperationsClient { get; }

The long-running operations client for Delete.

Property Value
TypeDescription
OperationsClient

GrpcClient

public virtual ServiceAttachments.ServiceAttachmentsClient GrpcClient { get; }

The underlying gRPC ServiceAttachments client

Property Value
TypeDescription
ServiceAttachments.ServiceAttachmentsClient

InsertOperationsClient

public virtual OperationsClient InsertOperationsClient { get; }

The long-running operations client for Insert.

Property Value
TypeDescription
OperationsClient

PatchOperationsClient

public virtual OperationsClient PatchOperationsClient { get; }

The long-running operations client for Patch.

Property Value
TypeDescription
OperationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

Methods

AggregatedList(AggregatedListServiceAttachmentsRequest, CallSettings)

public virtual PagedEnumerable<ServiceAttachmentAggregatedList, KeyValuePair<string, ServiceAttachmentsScopedList>> AggregatedList(AggregatedListServiceAttachmentsRequest request, CallSettings callSettings = null)

Retrieves the list of all ServiceAttachment resources, regional and global, available to the specified project.

Parameters
NameDescription
requestAggregatedListServiceAttachmentsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ServiceAttachmentAggregatedList, KeyValuePair<String, ServiceAttachmentsScopedList>>

A pageable sequence of KeyValuePair<TKey,TValue> resources.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.Create();
// Initialize request argument(s)
AggregatedListServiceAttachmentsRequest request = new AggregatedListServiceAttachmentsRequest
{
    OrderBy = "",
    Project = "",
    Filter = "",
    IncludeAllScopes = false,
    ReturnPartialSuccess = false,
};
// Make the request
PagedEnumerable<ServiceAttachmentAggregatedList, KeyValuePair<string, ServiceAttachmentsScopedList>> response = serviceAttachmentsClient.AggregatedList(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (KeyValuePair<string, ServiceAttachmentsScopedList> item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ServiceAttachmentAggregatedList page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (KeyValuePair<string, ServiceAttachmentsScopedList> item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<KeyValuePair<string, ServiceAttachmentsScopedList>> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (KeyValuePair<string, ServiceAttachmentsScopedList> item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

AggregatedList(String, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ServiceAttachmentAggregatedList, KeyValuePair<string, ServiceAttachmentsScopedList>> AggregatedList(string project, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Retrieves the list of all ServiceAttachment resources, regional and global, available to the specified project.

Parameters
NameDescription
projectString

Name of the project scoping this request.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ServiceAttachmentAggregatedList, KeyValuePair<String, ServiceAttachmentsScopedList>>

A pageable sequence of KeyValuePair<TKey,TValue> resources.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.Create();
// Initialize request argument(s)
string project = "";
// Make the request
PagedEnumerable<ServiceAttachmentAggregatedList, KeyValuePair<string, ServiceAttachmentsScopedList>> response = serviceAttachmentsClient.AggregatedList(project);

// Iterate over all response items, lazily performing RPCs as required
foreach (KeyValuePair<string, ServiceAttachmentsScopedList> item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ServiceAttachmentAggregatedList page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (KeyValuePair<string, ServiceAttachmentsScopedList> item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<KeyValuePair<string, ServiceAttachmentsScopedList>> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (KeyValuePair<string, ServiceAttachmentsScopedList> item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

AggregatedListAsync(AggregatedListServiceAttachmentsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ServiceAttachmentAggregatedList, KeyValuePair<string, ServiceAttachmentsScopedList>> AggregatedListAsync(AggregatedListServiceAttachmentsRequest request, CallSettings callSettings = null)

Retrieves the list of all ServiceAttachment resources, regional and global, available to the specified project.

Parameters
NameDescription
requestAggregatedListServiceAttachmentsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ServiceAttachmentAggregatedList, KeyValuePair<String, ServiceAttachmentsScopedList>>

A pageable asynchronous sequence of KeyValuePair<TKey,TValue> resources.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = await ServiceAttachmentsClient.CreateAsync();
// Initialize request argument(s)
AggregatedListServiceAttachmentsRequest request = new AggregatedListServiceAttachmentsRequest
{
    OrderBy = "",
    Project = "",
    Filter = "",
    IncludeAllScopes = false,
    ReturnPartialSuccess = false,
};
// Make the request
PagedAsyncEnumerable<ServiceAttachmentAggregatedList, KeyValuePair<string, ServiceAttachmentsScopedList>> response = serviceAttachmentsClient.AggregatedListAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((KeyValuePair<string, ServiceAttachmentsScopedList> item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ServiceAttachmentAggregatedList page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (KeyValuePair<string, ServiceAttachmentsScopedList> item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<KeyValuePair<string, ServiceAttachmentsScopedList>> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (KeyValuePair<string, ServiceAttachmentsScopedList> item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

AggregatedListAsync(String, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ServiceAttachmentAggregatedList, KeyValuePair<string, ServiceAttachmentsScopedList>> AggregatedListAsync(string project, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Retrieves the list of all ServiceAttachment resources, regional and global, available to the specified project.

Parameters
NameDescription
projectString

Name of the project scoping this request.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ServiceAttachmentAggregatedList, KeyValuePair<String, ServiceAttachmentsScopedList>>

A pageable asynchronous sequence of KeyValuePair<TKey,TValue> resources.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = await ServiceAttachmentsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
// Make the request
PagedAsyncEnumerable<ServiceAttachmentAggregatedList, KeyValuePair<string, ServiceAttachmentsScopedList>> response = serviceAttachmentsClient.AggregatedListAsync(project);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((KeyValuePair<string, ServiceAttachmentsScopedList> item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ServiceAttachmentAggregatedList page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (KeyValuePair<string, ServiceAttachmentsScopedList> item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<KeyValuePair<string, ServiceAttachmentsScopedList>> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (KeyValuePair<string, ServiceAttachmentsScopedList> item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

Create()

public static ServiceAttachmentsClient Create()

Synchronously creates a ServiceAttachmentsClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ServiceAttachmentsClientBuilder .

Returns
TypeDescription
ServiceAttachmentsClient

The created ServiceAttachmentsClient.

CreateAsync(CancellationToken)

public static Task<ServiceAttachmentsClient> CreateAsync(CancellationToken cancellationToken = default(CancellationToken))

Asynchronously creates a ServiceAttachmentsClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ServiceAttachmentsClientBuilder .

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
Task<ServiceAttachmentsClient>

The task representing the created ServiceAttachmentsClient.

Delete(DeleteServiceAttachmentRequest, CallSettings)

public virtual Operation<Operation, Operation> Delete(DeleteServiceAttachmentRequest request, CallSettings callSettings = null)

Deletes the specified ServiceAttachment in the given scope

Parameters
NameDescription
requestDeleteServiceAttachmentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.Create();
// Initialize request argument(s)
DeleteServiceAttachmentRequest request = new DeleteServiceAttachmentRequest
{
    RequestId = "",
    Region = "",
    Project = "",
    ServiceAttachment = "",
};
// Make the request
lro::Operation<Operation, Operation> response = serviceAttachmentsClient.Delete(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = serviceAttachmentsClient.PollOnceDelete(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

Delete(String, String, String, CallSettings)

public virtual Operation<Operation, Operation> Delete(string project, string region, string serviceAttachment, CallSettings callSettings = null)

Deletes the specified ServiceAttachment in the given scope

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region of this request.

serviceAttachmentString

Name of the ServiceAttachment resource to delete.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
string serviceAttachment = "";
// Make the request
lro::Operation<Operation, Operation> response = serviceAttachmentsClient.Delete(project, region, serviceAttachment);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = serviceAttachmentsClient.PollOnceDelete(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

DeleteAsync(DeleteServiceAttachmentRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> DeleteAsync(DeleteServiceAttachmentRequest request, CallSettings callSettings = null)

Deletes the specified ServiceAttachment in the given scope

Parameters
NameDescription
requestDeleteServiceAttachmentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = await ServiceAttachmentsClient.CreateAsync();
// Initialize request argument(s)
DeleteServiceAttachmentRequest request = new DeleteServiceAttachmentRequest
{
    RequestId = "",
    Region = "",
    Project = "",
    ServiceAttachment = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await serviceAttachmentsClient.DeleteAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await serviceAttachmentsClient.PollOnceDeleteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

DeleteAsync(DeleteServiceAttachmentRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> DeleteAsync(DeleteServiceAttachmentRequest request, CancellationToken cancellationToken)

Deletes the specified ServiceAttachment in the given scope

Parameters
NameDescription
requestDeleteServiceAttachmentRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = await ServiceAttachmentsClient.CreateAsync();
// Initialize request argument(s)
DeleteServiceAttachmentRequest request = new DeleteServiceAttachmentRequest
{
    RequestId = "",
    Region = "",
    Project = "",
    ServiceAttachment = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await serviceAttachmentsClient.DeleteAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await serviceAttachmentsClient.PollOnceDeleteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

DeleteAsync(String, String, String, CallSettings)

public virtual Task<Operation<Operation, Operation>> DeleteAsync(string project, string region, string serviceAttachment, CallSettings callSettings = null)

Deletes the specified ServiceAttachment in the given scope

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region of this request.

serviceAttachmentString

Name of the ServiceAttachment resource to delete.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = await ServiceAttachmentsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string serviceAttachment = "";
// Make the request
lro::Operation<Operation, Operation> response = await serviceAttachmentsClient.DeleteAsync(project, region, serviceAttachment);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await serviceAttachmentsClient.PollOnceDeleteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

DeleteAsync(String, String, String, CancellationToken)

public virtual Task<Operation<Operation, Operation>> DeleteAsync(string project, string region, string serviceAttachment, CancellationToken cancellationToken)

Deletes the specified ServiceAttachment in the given scope

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region of this request.

serviceAttachmentString

Name of the ServiceAttachment resource to delete.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = await ServiceAttachmentsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string serviceAttachment = "";
// Make the request
lro::Operation<Operation, Operation> response = await serviceAttachmentsClient.DeleteAsync(project, region, serviceAttachment);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await serviceAttachmentsClient.PollOnceDeleteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

Get(GetServiceAttachmentRequest, CallSettings)

public virtual ServiceAttachment Get(GetServiceAttachmentRequest request, CallSettings callSettings = null)

Returns the specified ServiceAttachment resource in the given scope.

Parameters
NameDescription
requestGetServiceAttachmentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
ServiceAttachment

The RPC response.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.Create();
// Initialize request argument(s)
GetServiceAttachmentRequest request = new GetServiceAttachmentRequest
{
    Region = "",
    Project = "",
    ServiceAttachment = "",
};
// Make the request
ServiceAttachment response = serviceAttachmentsClient.Get(request);

Get(String, String, String, CallSettings)

public virtual ServiceAttachment Get(string project, string region, string serviceAttachment, CallSettings callSettings = null)

Returns the specified ServiceAttachment resource in the given scope.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region of this request.

serviceAttachmentString

Name of the ServiceAttachment resource to return.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
ServiceAttachment

The RPC response.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
string serviceAttachment = "";
// Make the request
ServiceAttachment response = serviceAttachmentsClient.Get(project, region, serviceAttachment);

GetAsync(GetServiceAttachmentRequest, CallSettings)

public virtual Task<ServiceAttachment> GetAsync(GetServiceAttachmentRequest request, CallSettings callSettings = null)

Returns the specified ServiceAttachment resource in the given scope.

Parameters
NameDescription
requestGetServiceAttachmentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<ServiceAttachment>

A Task containing the RPC response.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = await ServiceAttachmentsClient.CreateAsync();
// Initialize request argument(s)
GetServiceAttachmentRequest request = new GetServiceAttachmentRequest
{
    Region = "",
    Project = "",
    ServiceAttachment = "",
};
// Make the request
ServiceAttachment response = await serviceAttachmentsClient.GetAsync(request);

GetAsync(GetServiceAttachmentRequest, CancellationToken)

public virtual Task<ServiceAttachment> GetAsync(GetServiceAttachmentRequest request, CancellationToken cancellationToken)

Returns the specified ServiceAttachment resource in the given scope.

Parameters
NameDescription
requestGetServiceAttachmentRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<ServiceAttachment>

A Task containing the RPC response.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = await ServiceAttachmentsClient.CreateAsync();
// Initialize request argument(s)
GetServiceAttachmentRequest request = new GetServiceAttachmentRequest
{
    Region = "",
    Project = "",
    ServiceAttachment = "",
};
// Make the request
ServiceAttachment response = await serviceAttachmentsClient.GetAsync(request);

GetAsync(String, String, String, CallSettings)

public virtual Task<ServiceAttachment> GetAsync(string project, string region, string serviceAttachment, CallSettings callSettings = null)

Returns the specified ServiceAttachment resource in the given scope.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region of this request.

serviceAttachmentString

Name of the ServiceAttachment resource to return.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<ServiceAttachment>

A Task containing the RPC response.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = await ServiceAttachmentsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string serviceAttachment = "";
// Make the request
ServiceAttachment response = await serviceAttachmentsClient.GetAsync(project, region, serviceAttachment);

GetAsync(String, String, String, CancellationToken)

public virtual Task<ServiceAttachment> GetAsync(string project, string region, string serviceAttachment, CancellationToken cancellationToken)

Returns the specified ServiceAttachment resource in the given scope.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region of this request.

serviceAttachmentString

Name of the ServiceAttachment resource to return.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<ServiceAttachment>

A Task containing the RPC response.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = await ServiceAttachmentsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string serviceAttachment = "";
// Make the request
ServiceAttachment response = await serviceAttachmentsClient.GetAsync(project, region, serviceAttachment);

GetIamPolicy(GetIamPolicyServiceAttachmentRequest, CallSettings)

public virtual Policy GetIamPolicy(GetIamPolicyServiceAttachmentRequest request, CallSettings callSettings = null)

Gets the access control policy for a resource. May be empty if no such policy or resource exists.

Parameters
NameDescription
requestGetIamPolicyServiceAttachmentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Policy

The RPC response.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.Create();
// Initialize request argument(s)
GetIamPolicyServiceAttachmentRequest request = new GetIamPolicyServiceAttachmentRequest
{
    Region = "",
    Resource = "",
    Project = "",
    OptionsRequestedPolicyVersion = 0,
};
// Make the request
Policy response = serviceAttachmentsClient.GetIamPolicy(request);

GetIamPolicy(String, String, String, CallSettings)

public virtual Policy GetIamPolicy(string project, string region, string resource, CallSettings callSettings = null)

Gets the access control policy for a resource. May be empty if no such policy or resource exists.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

The name of the region for this request.

resourceString

Name or id of the resource for this request.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Policy

The RPC response.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
string resource = "";
// Make the request
Policy response = serviceAttachmentsClient.GetIamPolicy(project, region, resource);

GetIamPolicyAsync(GetIamPolicyServiceAttachmentRequest, CallSettings)

public virtual Task<Policy> GetIamPolicyAsync(GetIamPolicyServiceAttachmentRequest request, CallSettings callSettings = null)

Gets the access control policy for a resource. May be empty if no such policy or resource exists.

Parameters
NameDescription
requestGetIamPolicyServiceAttachmentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Policy>

A Task containing the RPC response.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = await ServiceAttachmentsClient.CreateAsync();
// Initialize request argument(s)
GetIamPolicyServiceAttachmentRequest request = new GetIamPolicyServiceAttachmentRequest
{
    Region = "",
    Resource = "",
    Project = "",
    OptionsRequestedPolicyVersion = 0,
};
// Make the request
Policy response = await serviceAttachmentsClient.GetIamPolicyAsync(request);

GetIamPolicyAsync(GetIamPolicyServiceAttachmentRequest, CancellationToken)

public virtual Task<Policy> GetIamPolicyAsync(GetIamPolicyServiceAttachmentRequest request, CancellationToken cancellationToken)

Gets the access control policy for a resource. May be empty if no such policy or resource exists.

Parameters
NameDescription
requestGetIamPolicyServiceAttachmentRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Policy>

A Task containing the RPC response.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = await ServiceAttachmentsClient.CreateAsync();
// Initialize request argument(s)
GetIamPolicyServiceAttachmentRequest request = new GetIamPolicyServiceAttachmentRequest
{
    Region = "",
    Resource = "",
    Project = "",
    OptionsRequestedPolicyVersion = 0,
};
// Make the request
Policy response = await serviceAttachmentsClient.GetIamPolicyAsync(request);

GetIamPolicyAsync(String, String, String, CallSettings)

public virtual Task<Policy> GetIamPolicyAsync(string project, string region, string resource, CallSettings callSettings = null)

Gets the access control policy for a resource. May be empty if no such policy or resource exists.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

The name of the region for this request.

resourceString

Name or id of the resource for this request.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Policy>

A Task containing the RPC response.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = await ServiceAttachmentsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string resource = "";
// Make the request
Policy response = await serviceAttachmentsClient.GetIamPolicyAsync(project, region, resource);

GetIamPolicyAsync(String, String, String, CancellationToken)

public virtual Task<Policy> GetIamPolicyAsync(string project, string region, string resource, CancellationToken cancellationToken)

Gets the access control policy for a resource. May be empty if no such policy or resource exists.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

The name of the region for this request.

resourceString

Name or id of the resource for this request.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Policy>

A Task containing the RPC response.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = await ServiceAttachmentsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string resource = "";
// Make the request
Policy response = await serviceAttachmentsClient.GetIamPolicyAsync(project, region, resource);

Insert(InsertServiceAttachmentRequest, CallSettings)

public virtual Operation<Operation, Operation> Insert(InsertServiceAttachmentRequest request, CallSettings callSettings = null)

Creates a ServiceAttachment in the specified project in the given scope using the parameters that are included in the request.

Parameters
NameDescription
requestInsertServiceAttachmentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.Create();
// Initialize request argument(s)
InsertServiceAttachmentRequest request = new InsertServiceAttachmentRequest
{
    RequestId = "",
    Region = "",
    Project = "",
    ServiceAttachmentResource = new ServiceAttachment(),
};
// Make the request
lro::Operation<Operation, Operation> response = serviceAttachmentsClient.Insert(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = serviceAttachmentsClient.PollOnceInsert(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

Insert(String, String, ServiceAttachment, CallSettings)

public virtual Operation<Operation, Operation> Insert(string project, string region, ServiceAttachment serviceAttachmentResource, CallSettings callSettings = null)

Creates a ServiceAttachment in the specified project in the given scope using the parameters that are included in the request.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region of this request.

serviceAttachmentResourceServiceAttachment

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
ServiceAttachment serviceAttachmentResource = new ServiceAttachment();
// Make the request
lro::Operation<Operation, Operation> response = serviceAttachmentsClient.Insert(project, region, serviceAttachmentResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = serviceAttachmentsClient.PollOnceInsert(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

InsertAsync(InsertServiceAttachmentRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> InsertAsync(InsertServiceAttachmentRequest request, CallSettings callSettings = null)

Creates a ServiceAttachment in the specified project in the given scope using the parameters that are included in the request.

Parameters
NameDescription
requestInsertServiceAttachmentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = await ServiceAttachmentsClient.CreateAsync();
// Initialize request argument(s)
InsertServiceAttachmentRequest request = new InsertServiceAttachmentRequest
{
    RequestId = "",
    Region = "",
    Project = "",
    ServiceAttachmentResource = new ServiceAttachment(),
};
// Make the request
lro::Operation<Operation, Operation> response = await serviceAttachmentsClient.InsertAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await serviceAttachmentsClient.PollOnceInsertAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

InsertAsync(InsertServiceAttachmentRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> InsertAsync(InsertServiceAttachmentRequest request, CancellationToken cancellationToken)

Creates a ServiceAttachment in the specified project in the given scope using the parameters that are included in the request.

Parameters
NameDescription
requestInsertServiceAttachmentRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = await ServiceAttachmentsClient.CreateAsync();
// Initialize request argument(s)
InsertServiceAttachmentRequest request = new InsertServiceAttachmentRequest
{
    RequestId = "",
    Region = "",
    Project = "",
    ServiceAttachmentResource = new ServiceAttachment(),
};
// Make the request
lro::Operation<Operation, Operation> response = await serviceAttachmentsClient.InsertAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await serviceAttachmentsClient.PollOnceInsertAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

InsertAsync(String, String, ServiceAttachment, CallSettings)

public virtual Task<Operation<Operation, Operation>> InsertAsync(string project, string region, ServiceAttachment serviceAttachmentResource, CallSettings callSettings = null)

Creates a ServiceAttachment in the specified project in the given scope using the parameters that are included in the request.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region of this request.

serviceAttachmentResourceServiceAttachment

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = await ServiceAttachmentsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
ServiceAttachment serviceAttachmentResource = new ServiceAttachment();
// Make the request
lro::Operation<Operation, Operation> response = await serviceAttachmentsClient.InsertAsync(project, region, serviceAttachmentResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await serviceAttachmentsClient.PollOnceInsertAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

InsertAsync(String, String, ServiceAttachment, CancellationToken)

public virtual Task<Operation<Operation, Operation>> InsertAsync(string project, string region, ServiceAttachment serviceAttachmentResource, CancellationToken cancellationToken)

Creates a ServiceAttachment in the specified project in the given scope using the parameters that are included in the request.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region of this request.

serviceAttachmentResourceServiceAttachment

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = await ServiceAttachmentsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
ServiceAttachment serviceAttachmentResource = new ServiceAttachment();
// Make the request
lro::Operation<Operation, Operation> response = await serviceAttachmentsClient.InsertAsync(project, region, serviceAttachmentResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await serviceAttachmentsClient.PollOnceInsertAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

List(ListServiceAttachmentsRequest, CallSettings)

public virtual PagedEnumerable<ServiceAttachmentList, ServiceAttachment> List(ListServiceAttachmentsRequest request, CallSettings callSettings = null)

Lists the ServiceAttachments for a project in the given scope.

Parameters
NameDescription
requestListServiceAttachmentsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ServiceAttachmentList, ServiceAttachment>

A pageable sequence of ServiceAttachment resources.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.Create();
// Initialize request argument(s)
ListServiceAttachmentsRequest request = new ListServiceAttachmentsRequest
{
    Region = "",
    OrderBy = "",
    Project = "",
    Filter = "",
    ReturnPartialSuccess = false,
};
// Make the request
PagedEnumerable<ServiceAttachmentList, ServiceAttachment> response = serviceAttachmentsClient.List(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (ServiceAttachment item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ServiceAttachmentList page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ServiceAttachment item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ServiceAttachment> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ServiceAttachment item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

List(String, String, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ServiceAttachmentList, ServiceAttachment> List(string project, string region, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the ServiceAttachments for a project in the given scope.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region of this request.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ServiceAttachmentList, ServiceAttachment>

A pageable sequence of ServiceAttachment resources.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
// Make the request
PagedEnumerable<ServiceAttachmentList, ServiceAttachment> response = serviceAttachmentsClient.List(project, region);

// Iterate over all response items, lazily performing RPCs as required
foreach (ServiceAttachment item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ServiceAttachmentList page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ServiceAttachment item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ServiceAttachment> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ServiceAttachment item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAsync(ListServiceAttachmentsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ServiceAttachmentList, ServiceAttachment> ListAsync(ListServiceAttachmentsRequest request, CallSettings callSettings = null)

Lists the ServiceAttachments for a project in the given scope.

Parameters
NameDescription
requestListServiceAttachmentsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ServiceAttachmentList, ServiceAttachment>

A pageable asynchronous sequence of ServiceAttachment resources.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = await ServiceAttachmentsClient.CreateAsync();
// Initialize request argument(s)
ListServiceAttachmentsRequest request = new ListServiceAttachmentsRequest
{
    Region = "",
    OrderBy = "",
    Project = "",
    Filter = "",
    ReturnPartialSuccess = false,
};
// Make the request
PagedAsyncEnumerable<ServiceAttachmentList, ServiceAttachment> response = serviceAttachmentsClient.ListAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ServiceAttachment item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ServiceAttachmentList page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ServiceAttachment item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ServiceAttachment> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ServiceAttachment item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAsync(String, String, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ServiceAttachmentList, ServiceAttachment> ListAsync(string project, string region, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the ServiceAttachments for a project in the given scope.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region of this request.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ServiceAttachmentList, ServiceAttachment>

A pageable asynchronous sequence of ServiceAttachment resources.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = await ServiceAttachmentsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
// Make the request
PagedAsyncEnumerable<ServiceAttachmentList, ServiceAttachment> response = serviceAttachmentsClient.ListAsync(project, region);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ServiceAttachment item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ServiceAttachmentList page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ServiceAttachment item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ServiceAttachment> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ServiceAttachment item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

Patch(PatchServiceAttachmentRequest, CallSettings)

public virtual Operation<Operation, Operation> Patch(PatchServiceAttachmentRequest request, CallSettings callSettings = null)

Patches the specified ServiceAttachment resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.

Parameters
NameDescription
requestPatchServiceAttachmentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.Create();
// Initialize request argument(s)
PatchServiceAttachmentRequest request = new PatchServiceAttachmentRequest
{
    RequestId = "",
    Region = "",
    Project = "",
    ServiceAttachment = "",
    ServiceAttachmentResource = new ServiceAttachment(),
};
// Make the request
lro::Operation<Operation, Operation> response = serviceAttachmentsClient.Patch(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = serviceAttachmentsClient.PollOncePatch(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

Patch(String, String, String, ServiceAttachment, CallSettings)

public virtual Operation<Operation, Operation> Patch(string project, string region, string serviceAttachment, ServiceAttachment serviceAttachmentResource, CallSettings callSettings = null)

Patches the specified ServiceAttachment resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

The region scoping this request and should conform to RFC1035.

serviceAttachmentString

The resource id of the ServiceAttachment to patch. It should conform to RFC1035 resource name or be a string form on an unsigned long number.

serviceAttachmentResourceServiceAttachment

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
string serviceAttachment = "";
ServiceAttachment serviceAttachmentResource = new ServiceAttachment();
// Make the request
lro::Operation<Operation, Operation> response = serviceAttachmentsClient.Patch(project, region, serviceAttachment, serviceAttachmentResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = serviceAttachmentsClient.PollOncePatch(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

PatchAsync(PatchServiceAttachmentRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> PatchAsync(PatchServiceAttachmentRequest request, CallSettings callSettings = null)

Patches the specified ServiceAttachment resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.

Parameters
NameDescription
requestPatchServiceAttachmentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = await ServiceAttachmentsClient.CreateAsync();
// Initialize request argument(s)
PatchServiceAttachmentRequest request = new PatchServiceAttachmentRequest
{
    RequestId = "",
    Region = "",
    Project = "",
    ServiceAttachment = "",
    ServiceAttachmentResource = new ServiceAttachment(),
};
// Make the request
lro::Operation<Operation, Operation> response = await serviceAttachmentsClient.PatchAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await serviceAttachmentsClient.PollOncePatchAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

PatchAsync(PatchServiceAttachmentRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> PatchAsync(PatchServiceAttachmentRequest request, CancellationToken cancellationToken)

Patches the specified ServiceAttachment resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.

Parameters
NameDescription
requestPatchServiceAttachmentRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = await ServiceAttachmentsClient.CreateAsync();
// Initialize request argument(s)
PatchServiceAttachmentRequest request = new PatchServiceAttachmentRequest
{
    RequestId = "",
    Region = "",
    Project = "",
    ServiceAttachment = "",
    ServiceAttachmentResource = new ServiceAttachment(),
};
// Make the request
lro::Operation<Operation, Operation> response = await serviceAttachmentsClient.PatchAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await serviceAttachmentsClient.PollOncePatchAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

PatchAsync(String, String, String, ServiceAttachment, CallSettings)

public virtual Task<Operation<Operation, Operation>> PatchAsync(string project, string region, string serviceAttachment, ServiceAttachment serviceAttachmentResource, CallSettings callSettings = null)

Patches the specified ServiceAttachment resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

The region scoping this request and should conform to RFC1035.

serviceAttachmentString

The resource id of the ServiceAttachment to patch. It should conform to RFC1035 resource name or be a string form on an unsigned long number.

serviceAttachmentResourceServiceAttachment

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = await ServiceAttachmentsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string serviceAttachment = "";
ServiceAttachment serviceAttachmentResource = new ServiceAttachment();
// Make the request
lro::Operation<Operation, Operation> response = await serviceAttachmentsClient.PatchAsync(project, region, serviceAttachment, serviceAttachmentResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await serviceAttachmentsClient.PollOncePatchAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

PatchAsync(String, String, String, ServiceAttachment, CancellationToken)

public virtual Task<Operation<Operation, Operation>> PatchAsync(string project, string region, string serviceAttachment, ServiceAttachment serviceAttachmentResource, CancellationToken cancellationToken)

Patches the specified ServiceAttachment resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

The region scoping this request and should conform to RFC1035.

serviceAttachmentString

The resource id of the ServiceAttachment to patch. It should conform to RFC1035 resource name or be a string form on an unsigned long number.

serviceAttachmentResourceServiceAttachment

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = await ServiceAttachmentsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string serviceAttachment = "";
ServiceAttachment serviceAttachmentResource = new ServiceAttachment();
// Make the request
lro::Operation<Operation, Operation> response = await serviceAttachmentsClient.PatchAsync(project, region, serviceAttachment, serviceAttachmentResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await serviceAttachmentsClient.PollOncePatchAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

PollOnceDelete(String, CallSettings)

public virtual Operation<Operation, Operation> PollOnceDelete(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of Delete.

Parameters
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The result of polling the operation.

PollOnceDeleteAsync(String, CallSettings)

public virtual Task<Operation<Operation, Operation>> PollOnceDeleteAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of Delete .

Parameters
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A task representing the result of polling the operation.

PollOnceInsert(String, CallSettings)

public virtual Operation<Operation, Operation> PollOnceInsert(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of Insert.

Parameters
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The result of polling the operation.

PollOnceInsertAsync(String, CallSettings)

public virtual Task<Operation<Operation, Operation>> PollOnceInsertAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of Insert .

Parameters
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A task representing the result of polling the operation.

PollOncePatch(String, CallSettings)

public virtual Operation<Operation, Operation> PollOncePatch(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of Patch.

Parameters
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The result of polling the operation.

PollOncePatchAsync(String, CallSettings)

public virtual Task<Operation<Operation, Operation>> PollOncePatchAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of Patch .

Parameters
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A task representing the result of polling the operation.

SetIamPolicy(SetIamPolicyServiceAttachmentRequest, CallSettings)

public virtual Policy SetIamPolicy(SetIamPolicyServiceAttachmentRequest request, CallSettings callSettings = null)

Sets the access control policy on the specified resource. Replaces any existing policy.

Parameters
NameDescription
requestSetIamPolicyServiceAttachmentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Policy

The RPC response.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.Create();
// Initialize request argument(s)
SetIamPolicyServiceAttachmentRequest request = new SetIamPolicyServiceAttachmentRequest
{
    Region = "",
    Resource = "",
    Project = "",
    RegionSetPolicyRequestResource = new RegionSetPolicyRequest(),
};
// Make the request
Policy response = serviceAttachmentsClient.SetIamPolicy(request);

SetIamPolicy(String, String, String, RegionSetPolicyRequest, CallSettings)

public virtual Policy SetIamPolicy(string project, string region, string resource, RegionSetPolicyRequest regionSetPolicyRequestResource, CallSettings callSettings = null)

Sets the access control policy on the specified resource. Replaces any existing policy.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

The name of the region for this request.

resourceString

Name or id of the resource for this request.

regionSetPolicyRequestResourceRegionSetPolicyRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Policy

The RPC response.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
string resource = "";
RegionSetPolicyRequest regionSetPolicyRequestResource = new RegionSetPolicyRequest();
// Make the request
Policy response = serviceAttachmentsClient.SetIamPolicy(project, region, resource, regionSetPolicyRequestResource);

SetIamPolicyAsync(SetIamPolicyServiceAttachmentRequest, CallSettings)

public virtual Task<Policy> SetIamPolicyAsync(SetIamPolicyServiceAttachmentRequest request, CallSettings callSettings = null)

Sets the access control policy on the specified resource. Replaces any existing policy.

Parameters
NameDescription
requestSetIamPolicyServiceAttachmentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Policy>

A Task containing the RPC response.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = await ServiceAttachmentsClient.CreateAsync();
// Initialize request argument(s)
SetIamPolicyServiceAttachmentRequest request = new SetIamPolicyServiceAttachmentRequest
{
    Region = "",
    Resource = "",
    Project = "",
    RegionSetPolicyRequestResource = new RegionSetPolicyRequest(),
};
// Make the request
Policy response = await serviceAttachmentsClient.SetIamPolicyAsync(request);

SetIamPolicyAsync(SetIamPolicyServiceAttachmentRequest, CancellationToken)

public virtual Task<Policy> SetIamPolicyAsync(SetIamPolicyServiceAttachmentRequest request, CancellationToken cancellationToken)

Sets the access control policy on the specified resource. Replaces any existing policy.

Parameters
NameDescription
requestSetIamPolicyServiceAttachmentRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Policy>

A Task containing the RPC response.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = await ServiceAttachmentsClient.CreateAsync();
// Initialize request argument(s)
SetIamPolicyServiceAttachmentRequest request = new SetIamPolicyServiceAttachmentRequest
{
    Region = "",
    Resource = "",
    Project = "",
    RegionSetPolicyRequestResource = new RegionSetPolicyRequest(),
};
// Make the request
Policy response = await serviceAttachmentsClient.SetIamPolicyAsync(request);

SetIamPolicyAsync(String, String, String, RegionSetPolicyRequest, CallSettings)

public virtual Task<Policy> SetIamPolicyAsync(string project, string region, string resource, RegionSetPolicyRequest regionSetPolicyRequestResource, CallSettings callSettings = null)

Sets the access control policy on the specified resource. Replaces any existing policy.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

The name of the region for this request.

resourceString

Name or id of the resource for this request.

regionSetPolicyRequestResourceRegionSetPolicyRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Policy>

A Task containing the RPC response.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = await ServiceAttachmentsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string resource = "";
RegionSetPolicyRequest regionSetPolicyRequestResource = new RegionSetPolicyRequest();
// Make the request
Policy response = await serviceAttachmentsClient.SetIamPolicyAsync(project, region, resource, regionSetPolicyRequestResource);

SetIamPolicyAsync(String, String, String, RegionSetPolicyRequest, CancellationToken)

public virtual Task<Policy> SetIamPolicyAsync(string project, string region, string resource, RegionSetPolicyRequest regionSetPolicyRequestResource, CancellationToken cancellationToken)

Sets the access control policy on the specified resource. Replaces any existing policy.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

The name of the region for this request.

resourceString

Name or id of the resource for this request.

regionSetPolicyRequestResourceRegionSetPolicyRequest

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Policy>

A Task containing the RPC response.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = await ServiceAttachmentsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string resource = "";
RegionSetPolicyRequest regionSetPolicyRequestResource = new RegionSetPolicyRequest();
// Make the request
Policy response = await serviceAttachmentsClient.SetIamPolicyAsync(project, region, resource, regionSetPolicyRequestResource);

ShutdownDefaultChannelsAsync()

public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.

Returns
TypeDescription
Task

A task representing the asynchronous shutdown operation.

Remarks

After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.

TestIamPermissions(TestIamPermissionsServiceAttachmentRequest, CallSettings)

public virtual TestPermissionsResponse TestIamPermissions(TestIamPermissionsServiceAttachmentRequest request, CallSettings callSettings = null)

Returns permissions that a caller has on the specified resource.

Parameters
NameDescription
requestTestIamPermissionsServiceAttachmentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TestPermissionsResponse

The RPC response.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.Create();
// Initialize request argument(s)
TestIamPermissionsServiceAttachmentRequest request = new TestIamPermissionsServiceAttachmentRequest
{
    Region = "",
    Resource = "",
    Project = "",
    TestPermissionsRequestResource = new TestPermissionsRequest(),
};
// Make the request
TestPermissionsResponse response = serviceAttachmentsClient.TestIamPermissions(request);

TestIamPermissions(String, String, String, TestPermissionsRequest, CallSettings)

public virtual TestPermissionsResponse TestIamPermissions(string project, string region, string resource, TestPermissionsRequest testPermissionsRequestResource, CallSettings callSettings = null)

Returns permissions that a caller has on the specified resource.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

The name of the region for this request.

resourceString

Name or id of the resource for this request.

testPermissionsRequestResourceTestPermissionsRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TestPermissionsResponse

The RPC response.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = ServiceAttachmentsClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
string resource = "";
TestPermissionsRequest testPermissionsRequestResource = new TestPermissionsRequest();
// Make the request
TestPermissionsResponse response = serviceAttachmentsClient.TestIamPermissions(project, region, resource, testPermissionsRequestResource);

TestIamPermissionsAsync(TestIamPermissionsServiceAttachmentRequest, CallSettings)

public virtual Task<TestPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsServiceAttachmentRequest request, CallSettings callSettings = null)

Returns permissions that a caller has on the specified resource.

Parameters
NameDescription
requestTestIamPermissionsServiceAttachmentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<TestPermissionsResponse>

A Task containing the RPC response.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = await ServiceAttachmentsClient.CreateAsync();
// Initialize request argument(s)
TestIamPermissionsServiceAttachmentRequest request = new TestIamPermissionsServiceAttachmentRequest
{
    Region = "",
    Resource = "",
    Project = "",
    TestPermissionsRequestResource = new TestPermissionsRequest(),
};
// Make the request
TestPermissionsResponse response = await serviceAttachmentsClient.TestIamPermissionsAsync(request);

TestIamPermissionsAsync(TestIamPermissionsServiceAttachmentRequest, CancellationToken)

public virtual Task<TestPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsServiceAttachmentRequest request, CancellationToken cancellationToken)

Returns permissions that a caller has on the specified resource.

Parameters
NameDescription
requestTestIamPermissionsServiceAttachmentRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<TestPermissionsResponse>

A Task containing the RPC response.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = await ServiceAttachmentsClient.CreateAsync();
// Initialize request argument(s)
TestIamPermissionsServiceAttachmentRequest request = new TestIamPermissionsServiceAttachmentRequest
{
    Region = "",
    Resource = "",
    Project = "",
    TestPermissionsRequestResource = new TestPermissionsRequest(),
};
// Make the request
TestPermissionsResponse response = await serviceAttachmentsClient.TestIamPermissionsAsync(request);

TestIamPermissionsAsync(String, String, String, TestPermissionsRequest, CallSettings)

public virtual Task<TestPermissionsResponse> TestIamPermissionsAsync(string project, string region, string resource, TestPermissionsRequest testPermissionsRequestResource, CallSettings callSettings = null)

Returns permissions that a caller has on the specified resource.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

The name of the region for this request.

resourceString

Name or id of the resource for this request.

testPermissionsRequestResourceTestPermissionsRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<TestPermissionsResponse>

A Task containing the RPC response.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = await ServiceAttachmentsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string resource = "";
TestPermissionsRequest testPermissionsRequestResource = new TestPermissionsRequest();
// Make the request
TestPermissionsResponse response = await serviceAttachmentsClient.TestIamPermissionsAsync(project, region, resource, testPermissionsRequestResource);

TestIamPermissionsAsync(String, String, String, TestPermissionsRequest, CancellationToken)

public virtual Task<TestPermissionsResponse> TestIamPermissionsAsync(string project, string region, string resource, TestPermissionsRequest testPermissionsRequestResource, CancellationToken cancellationToken)

Returns permissions that a caller has on the specified resource.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

The name of the region for this request.

resourceString

Name or id of the resource for this request.

testPermissionsRequestResourceTestPermissionsRequest

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<TestPermissionsResponse>

A Task containing the RPC response.

Example
// Create client
ServiceAttachmentsClient serviceAttachmentsClient = await ServiceAttachmentsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string resource = "";
TestPermissionsRequest testPermissionsRequestResource = new TestPermissionsRequest();
// Make the request
TestPermissionsResponse response = await serviceAttachmentsClient.TestIamPermissionsAsync(project, region, resource, testPermissionsRequestResource);