Class InstanceTemplatesResource
The "instanceTemplates" collection of methods.
Inherited Members
Namespace: Google.Apis.Compute.beta
Assembly: Google.Apis.Compute.beta.dll
Syntax
public class InstanceTemplatesResource
Constructors
InstanceTemplatesResource(IClientService)
Constructs a new resource.
Declaration
public InstanceTemplatesResource(IClientService service)
Parameters
Type | Name | Description |
---|---|---|
IClientService | service |
Methods
AggregatedList(string)
Retrieves the list of all InstanceTemplates resources, regional and global, available to the specified
project. To prevent failure, Google recommends that you set the returnPartialSuccess
parameter to true
.
Declaration
public virtual InstanceTemplatesResource.AggregatedListRequest AggregatedList(string project)
Parameters
Type | Name | Description |
---|---|---|
string | project | Name of the project scoping this request. |
Returns
Type | Description |
---|---|
InstanceTemplatesResource.AggregatedListRequest |
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 |
---|---|---|
string | project | Project ID for this request. |
string | instanceTemplate | The name of the instance template to delete. |
Returns
Type | Description |
---|---|
InstanceTemplatesResource.DeleteRequest |
Get(string, string)
Returns the specified instance template.
Declaration
public virtual InstanceTemplatesResource.GetRequest Get(string project, string instanceTemplate)
Parameters
Type | Name | Description |
---|---|---|
string | project | Project ID for this request. |
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 |
---|---|---|
string | project | Project ID for this request. |
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. |
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 |
---|---|---|
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. |
string | project | Project ID for this request. |
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. |
string | project | Project ID for this request. |
string | resource | Name or id of the resource for this request. |
Returns
Type | Description |
---|---|
InstanceTemplatesResource.TestIamPermissionsRequest |