Class InstanceTemplatesResource
The "instanceTemplates" collection of methods.
Inheritance
Inherited Members
Namespace: Google.Apis.Compute.v1
Assembly: Google.Apis.Compute.v1.dll
Syntax
public class InstanceTemplatesResource
Constructors
InstanceTemplatesResource(IClientService)
Constructs a new resource.
Declaration
public InstanceTemplatesResource(IClientService service)
Parameters
| Type | Name | Description |
|---|---|---|
| IClientService | service |
Methods
Delete(String, String)
Deletes the specified instance template. Deleting an instance template is permanent and cannot be undone. It is not possible to delete templates that are already in use by a managed instance group.
Declaration
public virtual InstanceTemplatesResource.DeleteRequest Delete(string project, string instanceTemplate)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | project | Project ID for this request. |
| System.String | instanceTemplate | The name of the instance template to delete. |
Returns
| Type | Description |
|---|---|
| InstanceTemplatesResource.DeleteRequest |
Get(String, String)
Returns the specified instance template. Gets a list of available instance templates by making a list() request.
Declaration
public virtual InstanceTemplatesResource.GetRequest Get(string project, string instanceTemplate)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | project | Project ID for this request. |
| System.String | instanceTemplate | The name of the instance template. |
Returns
| Type | Description |
|---|---|
| InstanceTemplatesResource.GetRequest |
GetIamPolicy(String, String)
Gets the access control policy for a resource. May be empty if no such policy or resource exists.
Declaration
public virtual InstanceTemplatesResource.GetIamPolicyRequest GetIamPolicy(string project, string resource)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | project | Project ID for this request. |
| System.String | resource | Name or id of the resource for this request. |
Returns
| Type | Description |
|---|---|
| InstanceTemplatesResource.GetIamPolicyRequest |
Insert(InstanceTemplate, String)
Creates an instance template in the specified project using the data that is included in the request. If you are creating a new template to update an existing instance group, your new instance template must use the same network or, if applicable, the same subnetwork as the original template.
Declaration
public virtual InstanceTemplatesResource.InsertRequest Insert(InstanceTemplate body, string project)
Parameters
| Type | Name | Description |
|---|---|---|
| InstanceTemplate | body | The body of the request. |
| System.String | project | Project ID for this request. |
Returns
| Type | Description |
|---|---|
| InstanceTemplatesResource.InsertRequest |
List(String)
Retrieves a list of instance templates that are contained within the specified project.
Declaration
public virtual InstanceTemplatesResource.ListRequest List(string project)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | project | Project ID for this request. |
Returns
| Type | Description |
|---|---|
| InstanceTemplatesResource.ListRequest |
SetIamPolicy(GlobalSetPolicyRequest, String, String)
Sets the access control policy on the specified resource. Replaces any existing policy.
Declaration
public virtual InstanceTemplatesResource.SetIamPolicyRequest SetIamPolicy(GlobalSetPolicyRequest body, string project, string resource)
Parameters
| Type | Name | Description |
|---|---|---|
| GlobalSetPolicyRequest | body | The body of the request. |
| System.String | project | Project ID for this request. |
| System.String | resource | Name or id of the resource for this request. |
Returns
| Type | Description |
|---|---|
| InstanceTemplatesResource.SetIamPolicyRequest |
TestIamPermissions(TestPermissionsRequest, String, String)
Returns permissions that a caller has on the specified resource.
Declaration
public virtual InstanceTemplatesResource.TestIamPermissionsRequest TestIamPermissions(TestPermissionsRequest body, string project, string resource)
Parameters
| Type | Name | Description |
|---|---|---|
| TestPermissionsRequest | body | The body of the request. |
| System.String | project | Project ID for this request. |
| System.String | resource | Name or id of the resource for this request. |
Returns
| Type | Description |
|---|---|
| InstanceTemplatesResource.TestIamPermissionsRequest |