Documentation ¶
Overview ¶
Package deploymentapi contains curated functions which iteract with the deployments API, exposing an API which its usage is preferred over the direct client calls.
Index ¶
- func Create(params CreateParams) (*models.DeploymentCreateResponse, error)
- func Delete(params DeleteParams) (*models.DeploymentDeleteResponse, error)
- func Get(params GetParams) (*models.DeploymentGetResponse, error)
- func GetApm(params GetParams) (*models.ApmResourceInfo, error)
- func GetAppSearch(params GetParams) (*models.AppSearchResourceInfo, error)
- func GetElasticsearch(params GetParams) (*models.ElasticsearchResourceInfo, error)
- func GetElasticsearchID(params GetParams) (string, error)
- func GetEnterpriseSearch(params GetParams) (*models.EnterpriseSearchResourceInfo, error)
- func GetKibana(params GetParams) (*models.KibanaResourceInfo, error)
- func GetResource(params GetResourceParams) (interface{}, error)
- func List(params ListParams) (*models.DeploymentsListResponse, error)
- func Migrate(params MigrateParams) (*models.DeploymentTemplateMigrateResponse, error)
- func NewUpdateRequest(res *models.DeploymentGetResponse) *models.DeploymentUpdateRequest
- func PopulateRefID(params PopulateRefIDParams) error
- func RequestID(s string) string
- func Restore(params RestoreParams) (*models.DeploymentRestoreResponse, error)
- func Resync(params ResyncParams) error
- func ResyncAll(params ResyncAllParams) (*models.IndexSynchronizationResults, error)
- func Search(params SearchParams) (*models.DeploymentsSearchResponse, error)
- func Shutdown(params ShutdownParams) (*models.DeploymentShutdownResponse, error)
- func Update(params UpdateParams) (*models.DeploymentUpdateResponse, error)
- type CreateParams
- type DeleteParams
- type GetParams
- type GetResourceParams
- type ListParams
- type MigrateParams
- type PayloadOverrides
- type PopulateRefIDParams
- type RestoreParams
- type ResyncAllParams
- type ResyncParams
- type SearchParams
- type ShutdownParams
- type UpdateParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
func Create(params CreateParams) (*models.DeploymentCreateResponse, error)
Create performs a Create using the specified Request against the API. Also overrides the passed request with the PayloadOverrides set in the wrapping CreateParams.
func Delete ¶
func Delete(params DeleteParams) (*models.DeploymentDeleteResponse, error)
Delete removes the specified deployment ID from the platform.
func Get ¶
func Get(params GetParams) (*models.DeploymentGetResponse, error)
Get returns info about a deployment.
func GetApm ¶
func GetApm(params GetParams) (*models.ApmResourceInfo, error)
GetApm returns info about an apm resource belonging to a given deployment.
func GetAppSearch ¶
func GetAppSearch(params GetParams) (*models.AppSearchResourceInfo, error)
GetAppSearch returns info about an appsearch resource belonging to a given deployment.
func GetElasticsearch ¶
func GetElasticsearch(params GetParams) (*models.ElasticsearchResourceInfo, error)
GetElasticsearch returns info about an elasticsearch resource belonging to a given deployment.
func GetElasticsearchID ¶
GetElasticsearchID returns the deployment's elasticsearch resource ID
func GetEnterpriseSearch ¶
func GetEnterpriseSearch(params GetParams) (*models.EnterpriseSearchResourceInfo, error)
GetEnterpriseSearch returns info about an Enterprise Search resource belonging to a given deployment.
func GetKibana ¶
func GetKibana(params GetParams) (*models.KibanaResourceInfo, error)
GetKibana returns info about an kibana resource belonging to a given deployment.
func GetResource ¶
func GetResource(params GetResourceParams) (interface{}, error)
GetResource is a high level function which either returns the top level deployment information when no params.Kind is specified, or it returns a specific deployment resource information by RefID. If no RefID is defined, It will perform an additional API call to obtain the top level
func List ¶
func List(params ListParams) (*models.DeploymentsListResponse, error)
List returns the platform deployments
func Migrate ¶ added in v1.1.0
func Migrate(params MigrateParams) (*models.DeploymentTemplateMigrateResponse, error)
Migrate returns a deployment update request that would transform this deployment from its template to the provided one.
func NewUpdateRequest ¶
func NewUpdateRequest(res *models.DeploymentGetResponse) *models.DeploymentUpdateRequest
NewUpdateRequest generates a DeploymentUpdateRequest from a GetResponse.
func PopulateRefID ¶
func PopulateRefID(params PopulateRefIDParams) error
PopulateRefID takes in a the necessary parameters to discover a RefID from a resource kind, and populates the value in the params.RefID field in the form of a *string.
func RequestID ¶
RequestID creates a 64-character string when an empty s tring is provided, or returns the provided string. It is aimed to be used as a helper when creating a deployment to always provide a request ID.
func Restore ¶
func Restore(params RestoreParams) (*models.DeploymentRestoreResponse, error)
Restore restores a deployment which has been previously shut down.
func Resync ¶
func Resync(params ResyncParams) error
Resync forces indexer to immediately resynchronize the search index and cache for a given deployment.
func ResyncAll ¶
func ResyncAll(params ResyncAllParams) (*models.IndexSynchronizationResults, error)
ResyncAll asynchronously resynchronizes the search index for all deployments.
func Search ¶
func Search(params SearchParams) (*models.DeploymentsSearchResponse, error)
Search performs a search using the specified Request against the API.
func Shutdown ¶
func Shutdown(params ShutdownParams) (*models.DeploymentShutdownResponse, error)
Shutdown shuts down a deployment and all of its associated resources. To shutdown individual deployment resources use the kind specific APIs.
func Update ¶
func Update(params UpdateParams) (*models.DeploymentUpdateResponse, error)
Update receives an update payload with an optional region override in case the region isn't specified in the update request payload. Additionally if Request.PruneOrphans is false then any omitted resources aren't shutdown. The opposite behavior can be expected when the flag is true since the update request is treated as the single source of truth and the complete desired deployment definition.
Types ¶
type CreateParams ¶
type CreateParams struct { *api.API // Request from which to create the deployment, by combining this with // the Overrides fields, certain fields can be overridden centrally through // that struct. // // Additionally, a Request can be generated with depresourceapi.NewPayload(). // For more information on that struct, please refer to its godoc. Request *models.DeploymentCreateRequest // Optional request_id to be sent in the Create which acts as an idempotency // token. RequestID string // PayloadOverrides are used as a definition of values which want to // be overridden within the resources themselves. Overrides *PayloadOverrides }
CreateParams is consumed by Create.
func (CreateParams) Validate ¶
func (params CreateParams) Validate() error
Validate ensures the parameters are usable by Create.
type DeleteParams ¶
DeleteParams is consumed by Delete.
func (DeleteParams) Validate ¶
func (params DeleteParams) Validate() error
Validate ensures the parameters are usable by Delete.
type GetParams ¶
type GetParams struct { // Required API instance. *api.API // Required Deployment identifier. DeploymentID string // Optional parameters deputil.QueryParams // Optionally convert the legacy plans to the current deployment format. ConvertLegacyPlans bool // RefID, when specified, skips auto-discovering the deployment resource // RefID and instead uses the one that's passed. RefID string }
GetParams is consumed by get resource functions
type GetResourceParams ¶
GetResourceParams is consumed by GetResource.
type ListParams ¶
ListParams is consumed by List.
func (ListParams) Validate ¶
func (params ListParams) Validate() error
Validate ensures the parameters are usable.
type MigrateParams ¶ added in v1.1.0
MigrateParams is consumed by Migrate.
func (MigrateParams) Validate ¶ added in v1.1.0
func (params MigrateParams) Validate() error
Validate ensures the parameters are usable by Migrate.
type PayloadOverrides ¶
type PayloadOverrides struct { // If set, it will override the deployment name. Name string // If set, it will override the region when not present in the // DeploymentCreateRequest. // Note this behaviour is different from the rest of overrides // since this field tends to be populated by the global region // field which is implicit (by config) rather than explicit by flag. Region string // If set, it'll override all versions to match this one. Version string }
PayloadOverrides represent the override settings to
type PopulateRefIDParams ¶
type PopulateRefIDParams struct { *api.API DeploymentID string Kind string // RefID string pointer where the value is persisted. RefID *string }
PopulateRefIDParams is consumed by PopulateRefID.
type RestoreParams ¶
RestoreParams is consumed by Restore.
func (RestoreParams) Validate ¶
func (params RestoreParams) Validate() error
Validate ensures the parameters are usable by Restore.
type ResyncAllParams ¶
ResyncAllParams is consumed by ResyncAll
func (ResyncAllParams) Validate ¶
func (params ResyncAllParams) Validate() error
Validate ensures the parameters are usable by the consuming function.
type ResyncParams ¶
ResyncParams is consumed by Resync
func (ResyncParams) Validate ¶
func (params ResyncParams) Validate() error
Validate ensures the parameters are usable by the consuming function.
type SearchParams ¶
type SearchParams struct { *api.API Request *models.SearchRequest }
SearchParams is consumed by Search.
func (SearchParams) Validate ¶
func (params SearchParams) Validate() error
Validate ensures the parameters are usable by Shutdown.
type ShutdownParams ¶
ShutdownParams is consumed by Shutdown.
func (ShutdownParams) Validate ¶
func (params ShutdownParams) Validate() error
Validate ensures the parameters are usable by Shutdown.
type UpdateParams ¶
type UpdateParams struct { *api.API DeploymentID string Request *models.DeploymentUpdateRequest // Optional values SkipSnapshot bool HidePrunedOrphans bool // PayloadOverrides are used as a definition of values which want to // be overridden within the resources themselves. Overrides PayloadOverrides }
UpdateParams is consumed by Update.
func (UpdateParams) Validate ¶
func (params UpdateParams) Validate() error
Validate ensures the parameters are usable by Update.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package depresourceapi contains curated functions which iteract with the deployment resources API, exposing an API which its usage is preferred over the direct client calls.
|
Package depresourceapi contains curated functions which iteract with the deployment resources API, exposing an API which its usage is preferred over the direct client calls. |
Package noteapi contains curated functions which iteract with the deployment notes API, exposing an API which its usage is preferred over the direct client calls.
|
Package noteapi contains curated functions which iteract with the deployment notes API, exposing an API which its usage is preferred over the direct client calls. |