# REST Resource: projects.locations.sources

- [Resource: Source](https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources#Source)
  - [JSON representation](https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources#Source.SCHEMA_REPRESENTATION)
- [VmwareSourceDetails](https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources#VmwareSourceDetails)
  - [JSON representation](https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources#VmwareSourceDetails.SCHEMA_REPRESENTATION)
- [AwsSourceDetails](https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources#AwsSourceDetails)
  - [JSON representation](https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources#AwsSourceDetails.SCHEMA_REPRESENTATION)
- [AccessKeyCredentials](https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources#AccessKeyCredentials)
  - [JSON representation](https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources#AccessKeyCredentials.SCHEMA_REPRESENTATION)
- [State](https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources#State)
- [Tag](https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources#Tag)
  - [JSON representation](https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources#Tag.SCHEMA_REPRESENTATION)
- [AzureSourceDetails](https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources#AzureSourceDetails)
  - [JSON representation](https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources#AzureSourceDetails.SCHEMA_REPRESENTATION)
- [ClientSecretCredentials](https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources#ClientSecretCredentials)
  - [JSON representation](https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources#ClientSecretCredentials.SCHEMA_REPRESENTATION)
- [State](https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources#State_1)
- [Methods](https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources#METHODS_SUMMARY)

## Resource: Source

Source message describes a specific vm migration Source resource. It contains the source environment information.

| JSON representation |
|---|
| ``` { "name": string, "createTime": string, "updateTime": string, "labels": { string: string, ... }, "description": string, "encryption": { object (`https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/Encryption`) }, // Union field `source_details` can be only one of the following: "vmware": { object (`https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources#VmwareSourceDetails`) }, "aws": { object (`https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources#AwsSourceDetails`) }, "azure": { object (`https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources#AzureSourceDetails`) } // End of list of possible types for union field `source_details`. } ``` |

| Fields ||
|---|---|
| `name` | `string` Output only. The Source name. |
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The create time timestamp. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: `"2014-10-02T15:01:23Z"` and `"2014-10-02T15:01:23.045123456Z"`. |
| `updateTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The update time timestamp. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: `"2014-10-02T15:01:23Z"` and `"2014-10-02T15:01:23.045123456Z"`. |
| `labels` | `map (key: string, value: string)` The labels of the source. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| `description` | `string` User-provided description of the source. |
| `encryption` | ``object (`https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/Encryption`)`` Optional. Immutable. The encryption details of the source data stored by the service. |
| Union field `source_details`. `source_details` can be only one of the following: ||
| `vmware` | ``object (`https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources#VmwareSourceDetails`)`` Vmware type source details. |
| `aws` | ``object (`https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources#AwsSourceDetails`)`` AWS type source details. |
| `azure` | ``object (`https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources#AzureSourceDetails`)`` Azure type source details. |

## VmwareSourceDetails

VmwareSourceDetails message describes a specific source details for the vmware source type.

| JSON representation |
|---|
| ``` { "username": string, "password": string, "vcenterIp": string, "thumbprint": string, "resolvedVcenterHost": string } ``` |

| Fields ||
|---|---|
| `username` | `string` The credentials username. |
| `password` | `string` Input only. The credentials password. This is write only and can not be read in a GET operation. |
| `vcenterIp` | `string` The ip address of the vcenter this Source represents. |
| `thumbprint` | `string` The thumbprint representing the certificate for the vcenter. |
| `resolvedVcenterHost` | `string` The hostname of the vcenter. |

## AwsSourceDetails

AwsSourceDetails message describes a specific source details for the AWS source type.

| JSON representation |
|---|
| ``` { "awsRegion": string, "state": enum (`https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources#State`), "error": { object (`https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/Status`) }, "inventoryTagList": [ { object (`https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources#Tag`) } ], "inventorySecurityGroupNames": [ string ], "migrationResourcesUserTags": { string: string, ... }, "publicIp": string, // Union field `credentials_type` can be only one of the following: "accessKeyCreds": { object (`https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources#AccessKeyCredentials`) } // End of list of possible types for union field `credentials_type`. } ``` |

| Fields ||
|---|---|
| `awsRegion` | `string` Immutable. The AWS region that the source VMs will be migrated from. |
| `state` | ``enum (`https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources#State`)`` Output only. State of the source as determined by the health check. |
| `error` | ``object (`https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/Status`)`` Output only. Provides details on the state of the Source in case of an error. |
| `inventoryTagList[]` | ``object (`https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources#Tag`)`` AWS resource tags to limit the scope of the source inventory. |
| `inventorySecurityGroupNames[]` | `string` AWS security group names to limit the scope of the source inventory. |
| `migrationResourcesUserTags` | `map (key: string, value: string)` User specified tags to add to every M2VM generated resource in AWS. These tags will be set in addition to the default tags that are set as part of the migration process. The tags must not begin with the reserved prefix `m2vm`. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| `publicIp` | `string` Output only. The source's public IP. All communication initiated by this source will originate from this IP. |
| Union field `credentials_type`. `credentials_type` can be only one of the following: ||
| `accessKeyCreds` | ``object (`https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources#AccessKeyCredentials`)`` AWS Credentials using access key id and secret. |

## AccessKeyCredentials

Message describing AWS Credentials using access key id and secret.

| JSON representation |
|---|
| ``` { "accessKeyId": string, "secretAccessKey": string, "sessionToken": string } ``` |

| Fields ||
|---|---|
| `accessKeyId` | `string` AWS access key ID. |
| `secretAccessKey` | `string` Input only. AWS secret access key. |
| `sessionToken` | `string` Input only. AWS session token. Used only when AWS security token service (STS) is responsible for creating the temporary credentials. |

## State

The possible values of the state.

| Enums ||
|---|---|
| `STATE_UNSPECIFIED` | The state is unknown. This is used for API compatibility only and is not used by the system. |
| `PENDING` | The state was not sampled by the health checks yet. |
| `FAILED` | The source is available but might not be usable yet due to invalid credentials or another reason. The error message will contain further details. |
| `ACTIVE` | The source exists and its credentials were verified. |

## Tag

Tag is an AWS tag representation.

| JSON representation |
|---|
| ``` { "key": string, "value": string } ``` |

| Fields ||
|---|---|
| `key` | `string` Required. Key of tag. |
| `value` | `string` Required. Value of tag. |

## AzureSourceDetails

AzureSourceDetails message describes a specific source details for the Azure source type.

| JSON representation |
|---|
| ``` { "subscriptionId": string, "azureLocation": string, "state": enum (`https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources#State_1`), "error": { object (`https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/Status`) }, "migrationResourcesUserTags": { string: string, ... }, "resourceGroupId": string, // Union field `credentials_type` can be only one of the following: "clientSecretCreds": { object (`https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources#ClientSecretCredentials`) } // End of list of possible types for union field `credentials_type`. } ``` |

| Fields ||
|---|---|
| `subscriptionId` | `string` Immutable. Azure subscription ID. |
| `azureLocation` | `string` Immutable. The Azure location (region) that the source VMs will be migrated from. |
| `state` | ``enum (`https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources#State_1`)`` Output only. State of the source as determined by the health check. |
| `error` | ``object (`https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/Status`)`` Output only. Provides details on the state of the Source in case of an error. |
| `migrationResourcesUserTags` | `map (key: string, value: string)` User specified tags to add to every M2VM generated resource in Azure. These tags will be set in addition to the default tags that are set as part of the migration process. The tags must not begin with the reserved prefix `m4ce` or `m2vm`. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| `resourceGroupId` | `string` Output only. The ID of the Azure resource group that contains all resources related to the migration process of this source. |
| Union field `credentials_type`. `credentials_type` can be only one of the following: ||
| `clientSecretCreds` | ``object (`https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources#ClientSecretCredentials`)`` Azure Credentials using tenant ID, client ID and secret. |

## ClientSecretCredentials

Message describing Azure Credentials using tenant ID, client ID and secret.

| JSON representation |
|---|
| ``` { "tenantId": string, "clientId": string, "clientSecret": string } ``` |

| Fields ||
|---|---|
| `tenantId` | `string` Azure tenant ID. |
| `clientId` | `string` Azure client ID. |
| `clientSecret` | `string` Input only. Azure client secret. |

## State

The possible values of the state.

| Enums ||
|---|---|
| `STATE_UNSPECIFIED` | The state is unknown. This is used for API compatibility only and is not used by the system. |
| `PENDING` | The state was not sampled by the health checks yet. |
| `FAILED` | The source is available but might not be usable yet due to invalid credentials or another reason. The error message will contain further details. |
| `ACTIVE` | The source exists and its credentials were verified. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources/create` | Creates a new Source in a given project and location. |
| ### `https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources/delete` | Deletes a single Source. |
| ### `https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources/fetchInventory` | List remote source's inventory of VMs. |
| ### `https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources/get` | Gets details of a single Source. |
| ### `https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources/list` | Lists Sources in a given project and location. |
| ### `https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1/projects.locations.sources/patch` | Updates the parameters of a single Source. |