# Service enfonica.voice.v1beta1.Aliases

## Methods

| CreateAlias |
| -- |
| <span class="e-code">rpc CreateAlias(<span class="e-code">[CreateAliasRequest](#createaliasrequest)</span>) returns (<span class="e-code">[Alias](#resource-alias)</span>)</span><br/><br/>Creates a alias.<br/><br/>The caller must have `voice.aliases.create` permission on the project. |

| DeleteAlias |
| -- |
| <span class="e-code">rpc DeleteAlias(<span class="e-code">[DeleteAliasRequest](#deletealiasrequest)</span>) returns (<span class="e-code"><a href="https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty" target="_blank">google.protobuf.Empty</a></span>)</span><br/><br/>Deletes the specified alias.<br/><br/>The caller must have `voice.aliases.delete` permission on the project. |

| GetAlias |
| -- |
| <span class="e-code">rpc GetAlias(<span class="e-code">[GetAliasRequest](#getaliasrequest)</span>) returns (<span class="e-code">[Alias](#resource-alias)</span>)</span><br/><br/>Retrieves a alias identified by the supplied resource name.<br/><br/>The caller must have `voice.aliases.get` permission on the project. |

| ListAliases |
| -- |
| <span class="e-code">rpc ListAliases(<span class="e-code">[ListAliasesRequest](#listaliasesrequest)</span>) returns (<span class="e-code">[ListAliasesResponse](#listaliasesresponse)</span>)</span><br/><br/>Lists all Aliases. List returns alias sorted by create_time descending.<br/><br/>The caller must have `voice.aliases.list` permission on the project. |

| UpdateAlias |
| -- |
| <span class="e-code">rpc UpdateAlias(<span class="e-code">[UpdateAliasRequest](#updatealiasrequest)</span>) returns (<span class="e-code">[Alias](#resource-alias)</span>)</span><br/><br/>Updates a alias.<br/><br/>The caller must have `voice.aliases.update` permission on the project. |

## Resource: Alias

The Alias resource.

Fields | &nbsp;
--|--
<span class="e-code">name</span> | <span class="e-code">string</span><br/>Resource name of the alias. It must match the pattern `projects/{project_id}/sipDomains/{sip_domain_id}/aliases/{alias_id}`
<span class="e-code">alias_id</span> | <span class="e-code">string</span><br/>Output only. A convenience field for the `alias_id` component of the resource name.<br/><br/>This forms the address of the alias, of the form: {alias}@{fqdn}.
<span class="e-code">display_name</span> | <span class="e-code">string</span><br/>The display name of the alias for use in the UI. Max length 100 characters.
<span class="e-code">load_balancer_config</span> | <span class="e-code">[LoadBalancerConfig](#loadbalancerconfig)</span><br/>Config the alias as a load balancer.
<span class="e-code">address</span> | <span class="e-code">string</span><br/>Output only. The address represented by this alias. It will be of the form {alias}@{fqdn}.
<span class="e-code">create_time</span> | <span class="e-code"><a href="https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#timestamp" target="_blank">google.protobuf.Timestamp</a></span><br/>Output only. The creation time of the alias.

## LoadBalancerConfig

The configuration of an origination load balancer.

Fields | &nbsp;
--|--
<span class="e-code">endpoints[]</span> | <span class="e-code">[LoadBalancerEndpoint](#loadbalancerendpoint)</span><br/>The endpoints that are included in the load balancer. May contain a maximum of 10 endpoints.
<span class="e-code">failover_call_handler_uris[]</span> | <span class="e-code">string</span><br/>The failover URIs to execute in case all endpoints do not work.<br/><br/>This is useful for configuring disaster recovery for your incoming calls, and can direct to any supported endpoint type, including: programmable voice, Flow, SIP and tel URIs.

## LoadBalancerEndpoint

An endpoint that is part of a load balancer.

Fields | &nbsp;
--|--
<span class="e-code">uri</span> | <span class="e-code">string</span><br/>The [SIP URI](https://enfonica.com/docs/cloud-sip/sip-uris/) of the endpoint.
<span class="e-code">priority</span> | <span class="e-code">int32</span><br/>The priority of the endpoint. Value must be in the range [0,65535]. Lower priority endpoints will be attempted first.
<span class="e-code">weight</span> | <span class="e-code">int32</span><br/>The weighting to apply to this endpoint when selecting endpoints. Endpoints of the same priority will be selected by weighted randomization using this value. Value must be in the range [1,65535]. Default value is 10.
<span class="e-code">enabled</span> | <span class="e-code">boolean</span><br/>Whether this endpoint is enabled. If disabled, it won't be selected.

## CreateAliasRequest

Request to create a new alias.

Fields | &nbsp;
--|--
<span class="e-code">parent</span> | <span class="e-code">string</span><br/>Required. The SIP domain under which to create the alias in the form `projects/*/sipDomains/*`.
<span class="e-code">alias</span> | <span class="e-code">[Alias](#resource-alias)</span><br/>Required. The alias resource to be created.
<span class="e-code">alias_id</span> | <span class="e-code">string</span><br/>Required. The `alias_id` component of the resource name to create, which will be of the form `projects/{project_id}/sipDomains/{sip_domain_id}/aliases/{alias_id}`.<br/><br/>This also forms the address of the alias, of the form: {alias}@{sip_domain_id}.sip.enfonica.com<br/><br/>This must be lowercase alpha-numeric or hyphens and must start and end with an alpha-numeric character, and must be a minimum of 2 and maximum of 30 characters. This is captured in the following regular expression: ^[a-z0-9][a-z0-9-]{0,28}[a-z0-9]$

## GetAliasRequest

The GetAlias request message.

Fields | &nbsp;
--|--
<span class="e-code">name</span> | <span class="e-code">string</span><br/>Required. The resource name of the alias to retrieve. Must be of the form `projects/*/sipDomains/*/aliases/*`.

## ListAliasesRequest

The ListAliases request.

Fields | &nbsp;
--|--
<span class="e-code">parent</span> | <span class="e-code">string</span><br/>Required. The SIP domain under which to list aliases, in the form `projects/*/sipDomains/*`.
<span class="e-code">page_size</span> | <span class="e-code">int32</span><br/>The maximum number of aliases to return in the response. Default value of 10 and maximum value of 100.
<span class="e-code">page_token</span> | <span class="e-code">string</span><br/>A pagination token returned from a previous call to `ListAliases` that indicates where this listing should continue from.

## ListAliasesResponse

The ListAliases response.

Fields | &nbsp;
--|--
<span class="e-code">aliases[]</span> | <span class="e-code">[Alias](#resource-alias)</span><br/>A possibly paginated list of alias that are direct descendants of the specified parent resource.
<span class="e-code">next_page_token</span> | <span class="e-code">string</span><br/>A pagination token returned from a previous call to `ListAliases` that indicates from where listing should continue.

## UpdateAliasRequest

The request message for updating a alias's properties.

Fields | &nbsp;
--|--
<span class="e-code">alias</span> | <span class="e-code">[Alias](#resource-alias)</span><br/>Required. The new definition of the Alias.
<span class="e-code">update_mask</span> | <span class="e-code"><a href="https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask" target="_blank">google.protobuf.FieldMask</a></span><br/>Fields to be updated.

## DeleteAliasRequest

The DeleteAlias request message.

Fields | &nbsp;
--|--
<span class="e-code">name</span> | <span class="e-code">string</span><br/>Required. The resource name of the alias to be deleted. Must be of the form `projects/*/sipDomains/*/aliases/*`.

