godo.Apps.CreateDeployment()
Generated on 5 Nov 2026
from godo version
v1.236.0
Usage
client.Apps.CreateDeployment(ctx context.Context, appID string, create ...*godo.DeploymentCreateRequest) (*godo.Deployment, *godo.Response, error)Description
CreateDeployment creates an app deployment.
This method sends a POST request to /v2/apps/{}/deployments.
Parameters
appIDstring requiredcreate...*godo.DeploymentCreateRequest required
Fields of godo.DeploymentCreateRequest
DeploymentCreateRequest represents a request to create a deployment.
ForceBuildbool
Returns
- *godo.Deployment
- *godo.Response
The HTTP response, with pagination
Links,Meta, andRatelimit information.- error
Non-nil when the request fails. API errors are returned as
*godo.ErrorResponse.
Fields of godo.Deployment
Deployment struct for Deployment
IDstringSpec*godo.AppSpecServices[]*godo.DeploymentServiceStaticSites[]*godo.DeploymentStaticSiteWorkers[]*godo.DeploymentWorkerJobs[]*godo.DeploymentJobFunctions[]*godo.DeploymentFunctionsPhaseLastUpdatedAttime.TimeCreatedAttime.TimeUpdatedAttime.TimeCausestringClonedFromstringProgress*godo.DeploymentProgressPhasegodo.DeploymentPhaseTierSlugstringPreviousDeploymentIDstringCauseDetails*godo.DeploymentCauseDetailsLoadBalancerIDstringTiming*godo.DeploymentTiming
Request Sample
Response Example
More Information
See POST /v2/apps/{}/deployments in the API reference for additional detail on responses, headers, parameters, and more.
See the Go package documentation for the source of this method.