search

package
v10.1.1-beta+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 21, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package search implements the Azure ARM Search service API version 2015-08-19.

Client that can be used to manage Azure Search services and API keys.

Index

Constants

View Source
const (
	// DefaultBaseURI is the default URI used for the service Search
	DefaultBaseURI = "https://management.azure.com"
)

Variables

This section is empty.

Functions

func UserAgent

func UserAgent() string

UserAgent returns the UserAgent string to use when sending http.Requests.

func Version

func Version() string

Version returns the semantic version (see http://semver.org) of the client.

Types

type AdminKeyKind

type AdminKeyKind string

AdminKeyKind enumerates the values for admin key kind.

const (
	// Primary specifies the primary state for admin key kind.
	Primary AdminKeyKind = "primary"
	// Secondary specifies the secondary state for admin key kind.
	Secondary AdminKeyKind = "secondary"
)

type AdminKeyResult

type AdminKeyResult struct {
	autorest.Response `json:"-"`
	PrimaryKey        *string `json:"primaryKey,omitempty"`
	SecondaryKey      *string `json:"secondaryKey,omitempty"`
}

AdminKeyResult is response containing the primary and secondary admin API keys for a given Azure Search service.

type AdminKeysClient

type AdminKeysClient struct {
	ManagementClient
}

AdminKeysClient is the client that can be used to manage Azure Search services and API keys.

func NewAdminKeysClient

func NewAdminKeysClient(subscriptionID string) AdminKeysClient

NewAdminKeysClient creates an instance of the AdminKeysClient client.

func NewAdminKeysClientWithBaseURI

func NewAdminKeysClientWithBaseURI(baseURI string, subscriptionID string) AdminKeysClient

NewAdminKeysClientWithBaseURI creates an instance of the AdminKeysClient client.

func (AdminKeysClient) Get

func (client AdminKeysClient) Get(resourceGroupName string, searchServiceName string, clientRequestID *uuid.UUID) (result AdminKeyResult, err error)

Get gets the primary and secondary admin API keys for the specified Azure Search service.

resourceGroupName is the name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. searchServiceName is the name of the Azure Search service associated with the specified resource group. clientRequestID is a client-generated GUID value that identifies this request. If specified, this will be included in response information as a way to track the request.

func (AdminKeysClient) GetPreparer

func (client AdminKeysClient) GetPreparer(resourceGroupName string, searchServiceName string, clientRequestID *uuid.UUID) (*http.Request, error)

GetPreparer prepares the Get request.

func (AdminKeysClient) GetResponder

func (client AdminKeysClient) GetResponder(resp *http.Response) (result AdminKeyResult, err error)

GetResponder handles the response to the Get request. The method always closes the http.Response Body.

func (AdminKeysClient) GetSender

func (client AdminKeysClient) GetSender(req *http.Request) (*http.Response, error)

GetSender sends the Get request. The method will close the http.Response Body if it receives an error.

func (AdminKeysClient) Regenerate

func (client AdminKeysClient) Regenerate(resourceGroupName string, searchServiceName string, keyKind AdminKeyKind, clientRequestID *uuid.UUID) (result AdminKeyResult, err error)

Regenerate regenerates either the primary or secondary admin API key. You can only regenerate one key at a time.

resourceGroupName is the name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. searchServiceName is the name of the Azure Search service associated with the specified resource group. keyKind is specifies which key to regenerate. Valid values include 'primary' and 'secondary'. clientRequestID is a client-generated GUID value that identifies this request. If specified, this will be included in response information as a way to track the request.

func (AdminKeysClient) RegeneratePreparer

func (client AdminKeysClient) RegeneratePreparer(resourceGroupName string, searchServiceName string, keyKind AdminKeyKind, clientRequestID *uuid.UUID) (*http.Request, error)

RegeneratePreparer prepares the Regenerate request.

func (AdminKeysClient) RegenerateResponder

func (client AdminKeysClient) RegenerateResponder(resp *http.Response) (result AdminKeyResult, err error)

RegenerateResponder handles the response to the Regenerate request. The method always closes the http.Response Body.

func (AdminKeysClient) RegenerateSender

func (client AdminKeysClient) RegenerateSender(req *http.Request) (*http.Response, error)

RegenerateSender sends the Regenerate request. The method will close the http.Response Body if it receives an error.

type CheckNameAvailabilityInput

type CheckNameAvailabilityInput struct {
	Name *string `json:"name,omitempty"`
	Type *string `json:"type,omitempty"`
}

CheckNameAvailabilityInput is input of check name availability API.

type CheckNameAvailabilityOutput

type CheckNameAvailabilityOutput struct {
	autorest.Response `json:"-"`
	IsNameAvailable   *bool                 `json:"nameAvailable,omitempty"`
	Reason            UnavailableNameReason `json:"reason,omitempty"`
	Message           *string               `json:"message,omitempty"`
}

CheckNameAvailabilityOutput is output of check name availability API.

type CloudError

type CloudError struct {
	Error *CloudErrorBody `json:"error,omitempty"`
}

CloudError is contains information about an API error.

type CloudErrorBody

type CloudErrorBody struct {
	Code    *string           `json:"code,omitempty"`
	Message *string           `json:"message,omitempty"`
	Target  *string           `json:"target,omitempty"`
	Details *[]CloudErrorBody `json:"details,omitempty"`
}

CloudErrorBody is describes a particular API error with an error code and a message.

type HostingMode

type HostingMode string

HostingMode enumerates the values for hosting mode.

const (
	// Default specifies the default state for hosting mode.
	Default HostingMode = "default"
	// HighDensity specifies the high density state for hosting mode.
	HighDensity HostingMode = "highDensity"
)

type ListQueryKeysResult

type ListQueryKeysResult struct {
	autorest.Response `json:"-"`
	Value             *[]QueryKey `json:"value,omitempty"`
}

ListQueryKeysResult is response containing the query API keys for a given Azure Search service.

type ManagementClient

type ManagementClient struct {
	autorest.Client
	BaseURI        string
	SubscriptionID string
}

ManagementClient is the base client for Search.

func New

func New(subscriptionID string) ManagementClient

New creates an instance of the ManagementClient client.

func NewWithBaseURI

func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient

NewWithBaseURI creates an instance of the ManagementClient client.

type ProvisioningState

type ProvisioningState string

ProvisioningState enumerates the values for provisioning state.

const (
	// Failed specifies the failed state for provisioning state.
	Failed ProvisioningState = "failed"
	// Provisioning specifies the provisioning state for provisioning state.
	Provisioning ProvisioningState = "provisioning"
	// Succeeded specifies the succeeded state for provisioning state.
	Succeeded ProvisioningState = "succeeded"
)

type QueryKey

type QueryKey struct {
	autorest.Response `json:"-"`
	Name              *string `json:"name,omitempty"`
	Key               *string `json:"key,omitempty"`
}

QueryKey is describes an API key for a given Azure Search service that has permissions for query operations only.

type QueryKeysClient

type QueryKeysClient struct {
	ManagementClient
}

QueryKeysClient is the client that can be used to manage Azure Search services and API keys.

func NewQueryKeysClient

func NewQueryKeysClient(subscriptionID string) QueryKeysClient

NewQueryKeysClient creates an instance of the QueryKeysClient client.

func NewQueryKeysClientWithBaseURI

func NewQueryKeysClientWithBaseURI(baseURI string, subscriptionID string) QueryKeysClient

NewQueryKeysClientWithBaseURI creates an instance of the QueryKeysClient client.

func (QueryKeysClient) Create

func (client QueryKeysClient) Create(resourceGroupName string, searchServiceName string, name string, clientRequestID *uuid.UUID) (result QueryKey, err error)

Create generates a new query key for the specified Search service. You can create up to 50 query keys per service.

resourceGroupName is the name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. searchServiceName is the name of the Azure Search service associated with the specified resource group. name is the name of the new query API key. clientRequestID is a client-generated GUID value that identifies this request. If specified, this will be included in response information as a way to track the request.

func (QueryKeysClient) CreatePreparer

func (client QueryKeysClient) CreatePreparer(resourceGroupName string, searchServiceName string, name string, clientRequestID *uuid.UUID) (*http.Request, error)

CreatePreparer prepares the Create request.

func (QueryKeysClient) CreateResponder

func (client QueryKeysClient) CreateResponder(resp *http.Response) (result QueryKey, err error)

CreateResponder handles the response to the Create request. The method always closes the http.Response Body.

func (QueryKeysClient) CreateSender

func (client QueryKeysClient) CreateSender(req *http.Request) (*http.Response, error)

CreateSender sends the Create request. The method will close the http.Response Body if it receives an error.

func (QueryKeysClient) Delete

func (client QueryKeysClient) Delete(resourceGroupName string, searchServiceName string, key string, clientRequestID *uuid.UUID) (result autorest.Response, err error)

Delete deletes the specified query key. Unlike admin keys, query keys are not regenerated. The process for regenerating a query key is to delete and then recreate it.

resourceGroupName is the name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. searchServiceName is the name of the Azure Search service associated with the specified resource group. key is the query key to be deleted. Query keys are identified by value, not by name. clientRequestID is a client-generated GUID value that identifies this request. If specified, this will be included in response information as a way to track the request.

func (QueryKeysClient) DeletePreparer

func (client QueryKeysClient) DeletePreparer(resourceGroupName string, searchServiceName string, key string, clientRequestID *uuid.UUID) (*http.Request, error)

DeletePreparer prepares the Delete request.

func (QueryKeysClient) DeleteResponder

func (client QueryKeysClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error)

DeleteResponder handles the response to the Delete request. The method always closes the http.Response Body.

func (QueryKeysClient) DeleteSender

func (client QueryKeysClient) DeleteSender(req *http.Request) (*http.Response, error)

DeleteSender sends the Delete request. The method will close the http.Response Body if it receives an error.

func (QueryKeysClient) ListBySearchService

func (client QueryKeysClient) ListBySearchService(resourceGroupName string, searchServiceName string, clientRequestID *uuid.UUID) (result ListQueryKeysResult, err error)

ListBySearchService returns the list of query API keys for the given Azure Search service.

resourceGroupName is the name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. searchServiceName is the name of the Azure Search service associated with the specified resource group. clientRequestID is a client-generated GUID value that identifies this request. If specified, this will be included in response information as a way to track the request.

func (QueryKeysClient) ListBySearchServicePreparer

func (client QueryKeysClient) ListBySearchServicePreparer(resourceGroupName string, searchServiceName string, clientRequestID *uuid.UUID) (*http.Request, error)

ListBySearchServicePreparer prepares the ListBySearchService request.

func (QueryKeysClient) ListBySearchServiceResponder

func (client QueryKeysClient) ListBySearchServiceResponder(resp *http.Response) (result ListQueryKeysResult, err error)

ListBySearchServiceResponder handles the response to the ListBySearchService request. The method always closes the http.Response Body.

func (QueryKeysClient) ListBySearchServiceSender

func (client QueryKeysClient) ListBySearchServiceSender(req *http.Request) (*http.Response, error)

ListBySearchServiceSender sends the ListBySearchService request. The method will close the http.Response Body if it receives an error.

type Resource

type Resource struct {
	ID       *string             `json:"id,omitempty"`
	Name     *string             `json:"name,omitempty"`
	Type     *string             `json:"type,omitempty"`
	Location *string             `json:"location,omitempty"`
	Tags     *map[string]*string `json:"tags,omitempty"`
}

Resource is base type for all Azure resources.

type Service

type Service struct {
	autorest.Response  `json:"-"`
	ID                 *string             `json:"id,omitempty"`
	Name               *string             `json:"name,omitempty"`
	Type               *string             `json:"type,omitempty"`
	Location           *string             `json:"location,omitempty"`
	Tags               *map[string]*string `json:"tags,omitempty"`
	*ServiceProperties `json:"properties,omitempty"`
	Sku                *Sku `json:"sku,omitempty"`
}

Service is describes an Azure Search service and its current state.

type ServiceListResult

type ServiceListResult struct {
	autorest.Response `json:"-"`
	Value             *[]Service `json:"value,omitempty"`
}

ServiceListResult is response containing a list of Azure Search services.

type ServiceProperties

type ServiceProperties struct {
	ReplicaCount      *int32            `json:"replicaCount,omitempty"`
	PartitionCount    *int32            `json:"partitionCount,omitempty"`
	HostingMode       HostingMode       `json:"hostingMode,omitempty"`
	Status            ServiceStatus     `json:"status,omitempty"`
	StatusDetails     *string           `json:"statusDetails,omitempty"`
	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
}

ServiceProperties is properties of the Search service.

type ServiceStatus

type ServiceStatus string

ServiceStatus enumerates the values for service status.

const (
	// ServiceStatusDegraded specifies the service status degraded state for
	// service status.
	ServiceStatusDegraded ServiceStatus = "degraded"
	// ServiceStatusDeleting specifies the service status deleting state for
	// service status.
	ServiceStatusDeleting ServiceStatus = "deleting"
	// ServiceStatusDisabled specifies the service status disabled state for
	// service status.
	ServiceStatusDisabled ServiceStatus = "disabled"
	// ServiceStatusError specifies the service status error state for service
	// status.
	ServiceStatusError ServiceStatus = "error"
	// ServiceStatusProvisioning specifies the service status provisioning
	// state for service status.
	ServiceStatusProvisioning ServiceStatus = "provisioning"
	// ServiceStatusRunning specifies the service status running state for
	// service status.
	ServiceStatusRunning ServiceStatus = "running"
)

type ServicesClient

type ServicesClient struct {
	ManagementClient
}

ServicesClient is the client that can be used to manage Azure Search services and API keys.

func NewServicesClient

func NewServicesClient(subscriptionID string) ServicesClient

NewServicesClient creates an instance of the ServicesClient client.

func NewServicesClientWithBaseURI

func NewServicesClientWithBaseURI(baseURI string, subscriptionID string) ServicesClient

NewServicesClientWithBaseURI creates an instance of the ServicesClient client.

func (ServicesClient) CheckNameAvailability

func (client ServicesClient) CheckNameAvailability(checkNameAvailabilityInput CheckNameAvailabilityInput, clientRequestID *uuid.UUID) (result CheckNameAvailabilityOutput, err error)

CheckNameAvailability checks whether or not the given Search service name is available for use. Search service names must be globally unique since they are part of the service URI (https://<name>.search.windows.net).

checkNameAvailabilityInput is the resource name and type to check. clientRequestID is a client-generated GUID value that identifies this request. If specified, this will be included in response information as a way to track the request.

func (ServicesClient) CheckNameAvailabilityPreparer

func (client ServicesClient) CheckNameAvailabilityPreparer(checkNameAvailabilityInput CheckNameAvailabilityInput, clientRequestID *uuid.UUID) (*http.Request, error)

CheckNameAvailabilityPreparer prepares the CheckNameAvailability request.

func (ServicesClient) CheckNameAvailabilityResponder

func (client ServicesClient) CheckNameAvailabilityResponder(resp *http.Response) (result CheckNameAvailabilityOutput, err error)

CheckNameAvailabilityResponder handles the response to the CheckNameAvailability request. The method always closes the http.Response Body.

func (ServicesClient) CheckNameAvailabilitySender

func (client ServicesClient) CheckNameAvailabilitySender(req *http.Request) (*http.Response, error)

CheckNameAvailabilitySender sends the CheckNameAvailability request. The method will close the http.Response Body if it receives an error.

func (ServicesClient) CreateOrUpdate

func (client ServicesClient) CreateOrUpdate(resourceGroupName string, searchServiceName string, service Service, clientRequestID *uuid.UUID) (result Service, err error)

CreateOrUpdate creates or updates a Search service in the given resource group. If the Search service already exists, all properties will be updated with the given values.

resourceGroupName is the name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. searchServiceName is the name of the Azure Search service to create or update. Search service names must only contain lowercase letters, digits or dashes, cannot use dash as the first two or last one characters, cannot contain consecutive dashes, and must be between 2 and 60 characters in length. Search service names must be globally unique since they are part of the service URI (https://<name>.search.windows.net). You cannot change the service name after the service is created. service is the definition of the Search service to create or update. clientRequestID is a client-generated GUID value that identifies this request. If specified, this will be included in response information as a way to track the request.

func (ServicesClient) CreateOrUpdatePreparer

func (client ServicesClient) CreateOrUpdatePreparer(resourceGroupName string, searchServiceName string, service Service, clientRequestID *uuid.UUID) (*http.Request, error)

CreateOrUpdatePreparer prepares the CreateOrUpdate request.

func (ServicesClient) CreateOrUpdateResponder

func (client ServicesClient) CreateOrUpdateResponder(resp *http.Response) (result Service, err error)

CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always closes the http.Response Body.

func (ServicesClient) CreateOrUpdateSender

func (client ServicesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error)

CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the http.Response Body if it receives an error.

func (ServicesClient) Delete

func (client ServicesClient) Delete(resourceGroupName string, searchServiceName string, clientRequestID *uuid.UUID) (result autorest.Response, err error)

Delete deletes a Search service in the given resource group, along with its associated resources.

resourceGroupName is the name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. searchServiceName is the name of the Azure Search service associated with the specified resource group. clientRequestID is a client-generated GUID value that identifies this request. If specified, this will be included in response information as a way to track the request.

func (ServicesClient) DeletePreparer

func (client ServicesClient) DeletePreparer(resourceGroupName string, searchServiceName string, clientRequestID *uuid.UUID) (*http.Request, error)

DeletePreparer prepares the Delete request.

func (ServicesClient) DeleteResponder

func (client ServicesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error)

DeleteResponder handles the response to the Delete request. The method always closes the http.Response Body.

func (ServicesClient) DeleteSender

func (client ServicesClient) DeleteSender(req *http.Request) (*http.Response, error)

DeleteSender sends the Delete request. The method will close the http.Response Body if it receives an error.

func (ServicesClient) Get

func (client ServicesClient) Get(resourceGroupName string, searchServiceName string, clientRequestID *uuid.UUID) (result Service, err error)

Get gets the Search service with the given name in the given resource group.

resourceGroupName is the name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. searchServiceName is the name of the Azure Search service associated with the specified resource group. clientRequestID is a client-generated GUID value that identifies this request. If specified, this will be included in response information as a way to track the request.

func (ServicesClient) GetPreparer

func (client ServicesClient) GetPreparer(resourceGroupName string, searchServiceName string, clientRequestID *uuid.UUID) (*http.Request, error)

GetPreparer prepares the Get request.

func (ServicesClient) GetResponder

func (client ServicesClient) GetResponder(resp *http.Response) (result Service, err error)

GetResponder handles the response to the Get request. The method always closes the http.Response Body.

func (ServicesClient) GetSender

func (client ServicesClient) GetSender(req *http.Request) (*http.Response, error)

GetSender sends the Get request. The method will close the http.Response Body if it receives an error.

func (ServicesClient) ListByResourceGroup

func (client ServicesClient) ListByResourceGroup(resourceGroupName string, clientRequestID *uuid.UUID) (result ServiceListResult, err error)

ListByResourceGroup gets a list of all Search services in the given resource group.

resourceGroupName is the name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. clientRequestID is a client-generated GUID value that identifies this request. If specified, this will be included in response information as a way to track the request.

func (ServicesClient) ListByResourceGroupPreparer

func (client ServicesClient) ListByResourceGroupPreparer(resourceGroupName string, clientRequestID *uuid.UUID) (*http.Request, error)

ListByResourceGroupPreparer prepares the ListByResourceGroup request.

func (ServicesClient) ListByResourceGroupResponder

func (client ServicesClient) ListByResourceGroupResponder(resp *http.Response) (result ServiceListResult, err error)

ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always closes the http.Response Body.

func (ServicesClient) ListByResourceGroupSender

func (client ServicesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error)

ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the http.Response Body if it receives an error.

type Sku

type Sku struct {
	Name SkuName `json:"name,omitempty"`
}

Sku is defines the SKU of an Azure Search Service, which determines price tier and capacity limits.

type SkuName

type SkuName string

SkuName enumerates the values for sku name.

const (
	// Basic specifies the basic state for sku name.
	Basic SkuName = "basic"
	// Free specifies the free state for sku name.
	Free SkuName = "free"
	// Standard specifies the standard state for sku name.
	Standard SkuName = "standard"
	// Standard2 specifies the standard 2 state for sku name.
	Standard2 SkuName = "standard2"
	// Standard3 specifies the standard 3 state for sku name.
	Standard3 SkuName = "standard3"
)

type UnavailableNameReason

type UnavailableNameReason string

UnavailableNameReason enumerates the values for unavailable name reason.

const (
	// AlreadyExists specifies the already exists state for unavailable name
	// reason.
	AlreadyExists UnavailableNameReason = "AlreadyExists"
	// Invalid specifies the invalid state for unavailable name reason.
	Invalid UnavailableNameReason = "Invalid"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL