github.com/arunkumar7540/cli@v6.45.0+incompatible/api/cloudcontroller/ccv3/internal/api_routes.go (about)

     1  package internal
     2  
     3  import "net/http"
     4  
     5  // Naming convention:
     6  //
     7  // HTTP method + non-parameter parts of the path + "Request"
     8  //
     9  // If the request returns a single entity by GUID, use the singular (for example
    10  // /v2/organizations/:organization_guid is GetOrganization).
    11  const (
    12  	DeleteApplicationProcessInstanceRequest                     = "DeleteApplicationProcessInstance"
    13  	DeleteApplicationRequest                                    = "DeleteApplication"
    14  	DeleteBuildpackRequest                                      = "DeleteBuildpack"
    15  	DeleteDomainRequest                                         = "DeleteDomainRequest"
    16  	DeleteIsolationSegmentRelationshipOrganizationRequest       = "DeleteIsolationSegmentRelationshipOrganization"
    17  	DeleteIsolationSegmentRequest                               = "DeleteIsolationSegment"
    18  	DeleteRouteRequest                                          = "DeleteRouteRequest"
    19  	DeleteServiceInstanceRelationshipsSharedSpaceRequest        = "DeleteServiceInstanceRelationshipsSharedSpace"
    20  	DeleteSharedOrgFromDomainRequest                            = "DeleteSharedOrgFromDomain"
    21  	GetApplicationDropletCurrentRequest                         = "GetApplicationDropletCurrent"
    22  	GetApplicationEnvRequest                                    = "GetApplicationEnv"
    23  	GetApplicationManifestRequest                               = "GetApplicationManifest"
    24  	GetApplicationProcessRequest                                = "GetApplicationProcess"
    25  	GetApplicationProcessesRequest                              = "GetApplicationProcesses"
    26  	GetApplicationTasksRequest                                  = "GetApplicationTasks"
    27  	GetApplicationsRequest                                      = "GetApplications"
    28  	GetBuildRequest                                             = "GetBuild"
    29  	GetBuildpacksRequest                                        = "GetBuildpacks"
    30  	GetDefaultDomainRequest                                     = "GetDefaultDomain"
    31  	GetDeploymentRequest                                        = "GetDeployment"
    32  	GetDeploymentsRequest                                       = "GetDeployments"
    33  	GetDomainRequest                                            = "GetDomain"
    34  	GetDomainsRequest                                           = "GetDomains"
    35  	GetDropletRequest                                           = "GetDroplet"
    36  	GetDropletsRequest                                          = "GetDroplets"
    37  	GetFeatureFlagRequest                                       = "GetFeatureFlag"
    38  	GetFeatureFlagsRequest                                      = "GetFeatureFlags"
    39  	GetIsolationSegmentOrganizationsRequest                     = "GetIsolationSegmentOrganizations"
    40  	GetIsolationSegmentRequest                                  = "GetIsolationSegment"
    41  	GetIsolationSegmentsRequest                                 = "GetIsolationSegments"
    42  	GetOrganizationDomainsRequest                               = "GetOrganizationDomains"
    43  	GetOrganizationRelationshipDefaultIsolationSegmentRequest   = "GetOrganizationRelationshipDefaultIsolationSegment"
    44  	GetOrganizationsRequest                                     = "GetOrganizations"
    45  	GetPackageRequest                                           = "GetPackage"
    46  	GetPackagesRequest                                          = "GetPackages"
    47  	GetProcessStatsRequest                                      = "GetProcessStats"
    48  	GetRoutesRequest                                            = "GetRoutes"
    49  	GetServiceBrokersRequest                                    = "GetServiceBrokers"
    50  	GetServiceInstancesRequest                                  = "GetServiceInstances"
    51  	GetSpaceRelationshipIsolationSegmentRequest                 = "GetSpaceRelationshipIsolationSegment"
    52  	GetSpacesRequest                                            = "GetSpaces"
    53  	GetStacksRequest                                            = "GetStacks"
    54  	PatchApplicationCurrentDropletRequest                       = "PatchApplicationCurrentDroplet"
    55  	PatchApplicationEnvironmentVariablesRequest                 = "PatchApplicationEnvironmentVariables"
    56  	PatchApplicationRequest                                     = "PatchApplication"
    57  	PatchBuildpackRequest                                       = "PatchBuildpack"
    58  	PatchFeatureFlagRequest                                     = "PatchFeatureFlag"
    59  	PatchOrganizationRelationshipDefaultIsolationSegmentRequest = "PatchOrganizationRelationshipDefaultIsolationSegment"
    60  	PatchOrganizationRequest                                    = "PatchOrganization"
    61  	PatchProcessRequest                                         = "PatchProcess"
    62  	PatchSpaceRelationshipIsolationSegmentRequest               = "PatchSpaceRelationshipIsolationSegment"
    63  	PatchSpaceRequest                                           = "PatchSpace"
    64  	PostApplicationActionApplyManifest                          = "PostApplicationActionApplyM"
    65  	PostApplicationActionRestartRequest                         = "PostApplicationActionRestart"
    66  	PostApplicationActionStartRequest                           = "PostApplicationActionStart"
    67  	PostApplicationActionStopRequest                            = "PostApplicationActionStop"
    68  	PostApplicationDeploymentActionCancelRequest                = "PostApplicationDeploymentActionCancel"
    69  	PostApplicationDeploymentRequest                            = "PostApplicationDeployment"
    70  	PostApplicationProcessActionScaleRequest                    = "PostApplicationProcessActionScale"
    71  	PostApplicationRequest                                      = "PostApplication"
    72  	PostApplicationTasksRequest                                 = "PostApplicationTasks"
    73  	PostBuildRequest                                            = "PostBuild"
    74  	PostBuildpackBitsRequest                                    = "PostBuildpackBits"
    75  	PostBuildpackRequest                                        = "PostBuildpack"
    76  	PostDomainRequest                                           = "PostDomain"
    77  	PostDropletBitsRequest                                      = "PostDropletBits"
    78  	PostDropletRequest                                          = "PostDroplet"
    79  	PostIsolationSegmentRelationshipOrganizationsRequest        = "PostIsolationSegmentRelationshipOrganizations"
    80  	PostIsolationSegmentsRequest                                = "PostIsolationSegments"
    81  	PostPackageRequest                                          = "PostPackage"
    82  	PostResourceMatchesRequest                                  = "PostResourceMatches"
    83  	PostRouteRequest                                            = "PostRoute"
    84  	PostServiceBrokerRequest                                    = "PostServiceBroker"
    85  	PostServiceInstanceRelationshipsSharedSpacesRequest         = "PostServiceInstanceRelationshipsSharedSpaces"
    86  	PostSpaceActionApplyManifestRequest                         = "PostSpaceActionApplyManifest"
    87  	PutTaskCancelRequest                                        = "PutTaskCancel"
    88  	SharePrivateDomainRequest                                   = "SharePrivateDomainRequest"
    89  )
    90  
    91  // APIRoutes is a list of routes used by the router to construct request URLs.
    92  var APIRoutes = []Route{
    93  	{Resource: AppsResource, Path: "/", Method: http.MethodGet, Name: GetApplicationsRequest},
    94  	{Resource: AppsResource, Path: "/", Method: http.MethodPost, Name: PostApplicationRequest},
    95  	{Resource: AppsResource, Path: "/:app_guid", Method: http.MethodDelete, Name: DeleteApplicationRequest},
    96  	{Resource: AppsResource, Path: "/:app_guid", Method: http.MethodPatch, Name: PatchApplicationRequest},
    97  	{Resource: AppsResource, Path: "/:app_guid/actions/apply_manifest", Method: http.MethodPost, Name: PostApplicationActionApplyManifest},
    98  	{Resource: AppsResource, Path: "/:app_guid/actions/restart", Method: http.MethodPost, Name: PostApplicationActionRestartRequest},
    99  	{Resource: AppsResource, Path: "/:app_guid/actions/start", Method: http.MethodPost, Name: PostApplicationActionStartRequest},
   100  	{Resource: AppsResource, Path: "/:app_guid/actions/stop", Method: http.MethodPost, Name: PostApplicationActionStopRequest},
   101  	{Resource: AppsResource, Path: "/:app_guid/droplets/current", Method: http.MethodGet, Name: GetApplicationDropletCurrentRequest},
   102  	{Resource: AppsResource, Path: "/:app_guid/env", Method: http.MethodGet, Name: GetApplicationEnvRequest},
   103  	{Resource: AppsResource, Path: "/:app_guid/environment_variables", Method: http.MethodPatch, Name: PatchApplicationEnvironmentVariablesRequest},
   104  	{Resource: AppsResource, Path: "/:app_guid/manifest", Method: http.MethodGet, Name: GetApplicationManifestRequest},
   105  	{Resource: AppsResource, Path: "/:app_guid/processes", Method: http.MethodGet, Name: GetApplicationProcessesRequest},
   106  	{Resource: AppsResource, Path: "/:app_guid/processes/:type", Method: http.MethodGet, Name: GetApplicationProcessRequest},
   107  	{Resource: AppsResource, Path: "/:app_guid/processes/:type/actions/scale", Method: http.MethodPost, Name: PostApplicationProcessActionScaleRequest},
   108  	{Resource: AppsResource, Path: "/:app_guid/processes/:type/instances/:index", Method: http.MethodDelete, Name: DeleteApplicationProcessInstanceRequest},
   109  	{Resource: AppsResource, Path: "/:app_guid/relationships/current_droplet", Method: http.MethodPatch, Name: PatchApplicationCurrentDropletRequest},
   110  	{Resource: AppsResource, Path: "/:app_guid/tasks", Method: http.MethodGet, Name: GetApplicationTasksRequest},
   111  	{Resource: AppsResource, Path: "/:app_guid/tasks", Method: http.MethodPost, Name: PostApplicationTasksRequest},
   112  	{Resource: BuildpacksResource, Path: "/", Method: http.MethodGet, Name: GetBuildpacksRequest},
   113  	{Resource: BuildpacksResource, Path: "/", Method: http.MethodPost, Name: PostBuildpackRequest},
   114  	{Resource: BuildpacksResource, Path: "/:buildpack_guid", Method: http.MethodDelete, Name: DeleteBuildpackRequest},
   115  	{Resource: BuildpacksResource, Path: "/:buildpack_guid", Method: http.MethodPatch, Name: PatchBuildpackRequest},
   116  	{Resource: BuildpacksResource, Path: "/:buildpack_guid/upload", Method: http.MethodPost, Name: PostBuildpackBitsRequest},
   117  	{Resource: BuildsResource, Path: "/", Method: http.MethodPost, Name: PostBuildRequest},
   118  	{Resource: BuildsResource, Path: "/:build_guid", Method: http.MethodGet, Name: GetBuildRequest},
   119  	{Resource: DeploymentsResource, Path: "/", Method: http.MethodGet, Name: GetDeploymentsRequest},
   120  	{Resource: DeploymentsResource, Path: "/", Method: http.MethodPost, Name: PostApplicationDeploymentRequest},
   121  	{Resource: DeploymentsResource, Path: "/:deployment_guid", Method: http.MethodGet, Name: GetDeploymentRequest},
   122  	{Resource: DeploymentsResource, Path: "/:deployment_guid/actions/cancel", Method: http.MethodPost, Name: PostApplicationDeploymentActionCancelRequest},
   123  	{Resource: DomainsResource, Path: "/", Method: http.MethodGet, Name: GetDomainsRequest},
   124  	{Resource: DomainsResource, Path: "/", Method: http.MethodPost, Name: PostDomainRequest},
   125  	{Resource: DomainsResource, Path: "/:domain_guid", Method: http.MethodDelete, Name: DeleteDomainRequest},
   126  	{Resource: DomainsResource, Path: "/:domain_guid", Method: http.MethodGet, Name: GetDomainRequest},
   127  	{Resource: RoutesResource, Path: "/:route_guid", Method: http.MethodDelete, Name: DeleteRouteRequest},
   128  	{Resource: DomainsResource, Path: "/:domain_guid/relationships/shared_organizations", Method: http.MethodPost, Name: SharePrivateDomainRequest},
   129  	{Resource: DomainsResource, Path: "/:domain_guid/relationships/shared_organizations/:org_guid", Method: http.MethodDelete, Name: DeleteSharedOrgFromDomainRequest},
   130  	{Resource: DropletsResource, Path: "/", Method: http.MethodGet, Name: GetDropletsRequest},
   131  	{Resource: DropletsResource, Path: "/:droplet_guid", Method: http.MethodGet, Name: GetDropletRequest},
   132  	{Resource: DropletsResource, Path: "/", Method: http.MethodPost, Name: PostDropletRequest},
   133  	{Resource: DropletsResource, Path: "/:droplet_guid/upload", Method: http.MethodPost, Name: PostDropletBitsRequest},
   134  	{Resource: FeatureFlagsResource, Path: "/:name", Method: http.MethodGet, Name: GetFeatureFlagRequest},
   135  	{Resource: FeatureFlagsResource, Path: "/:name", Method: http.MethodPatch, Name: PatchFeatureFlagRequest},
   136  	{Resource: FeatureFlagsResource, Path: "/", Method: http.MethodGet, Name: GetFeatureFlagsRequest},
   137  	{Resource: IsolationSegmentsResource, Path: "/", Method: http.MethodGet, Name: GetIsolationSegmentsRequest},
   138  	{Resource: IsolationSegmentsResource, Path: "/", Method: http.MethodPost, Name: PostIsolationSegmentsRequest},
   139  	{Resource: IsolationSegmentsResource, Path: "/:isolation_segment_guid", Method: http.MethodDelete, Name: DeleteIsolationSegmentRequest},
   140  	{Resource: IsolationSegmentsResource, Path: "/:isolation_segment_guid", Method: http.MethodGet, Name: GetIsolationSegmentRequest},
   141  	{Resource: IsolationSegmentsResource, Path: "/:isolation_segment_guid/organizations", Method: http.MethodGet, Name: GetIsolationSegmentOrganizationsRequest},
   142  	{Resource: IsolationSegmentsResource, Path: "/:isolation_segment_guid/relationships/organizations", Method: http.MethodPost, Name: PostIsolationSegmentRelationshipOrganizationsRequest},
   143  	{Resource: IsolationSegmentsResource, Path: "/:isolation_segment_guid/relationships/organizations/:organization_guid", Method: http.MethodDelete, Name: DeleteIsolationSegmentRelationshipOrganizationRequest},
   144  	{Resource: OrgsResource, Path: "/", Method: http.MethodGet, Name: GetOrganizationsRequest},
   145  	{Resource: OrgsResource, Path: "/:organization_guid/domains/default", Method: http.MethodGet, Name: GetDefaultDomainRequest},
   146  	{Resource: OrgsResource, Path: "/:organization_guid/domains", Method: http.MethodGet, Name: GetOrganizationDomainsRequest},
   147  	{Resource: OrgsResource, Path: "/:organization_guid/relationships/default_isolation_segment", Method: http.MethodGet, Name: GetOrganizationRelationshipDefaultIsolationSegmentRequest},
   148  	{Resource: OrgsResource, Path: "/:organization_guid/relationships/default_isolation_segment", Method: http.MethodPatch, Name: PatchOrganizationRelationshipDefaultIsolationSegmentRequest},
   149  	{Resource: OrgsResource, Path: "/:organization_guid/", Method: http.MethodPatch, Name: PatchOrganizationRequest},
   150  	{Resource: PackagesResource, Path: "/", Method: http.MethodGet, Name: GetPackagesRequest},
   151  	{Resource: PackagesResource, Path: "/", Method: http.MethodPost, Name: PostPackageRequest},
   152  	{Resource: PackagesResource, Path: "/:package_guid", Method: http.MethodGet, Name: GetPackageRequest},
   153  	{Resource: ProcessesResource, Path: "/:process_guid", Method: http.MethodPatch, Name: PatchProcessRequest},
   154  	{Resource: ProcessesResource, Path: "/:process_guid/stats", Method: http.MethodGet, Name: GetProcessStatsRequest},
   155  	{Resource: ResourceMatches, Path: "/", Method: http.MethodPost, Name: PostResourceMatchesRequest},
   156  	{Resource: RoutesResource, Path: "/", Method: http.MethodGet, Name: GetRoutesRequest},
   157  	{Resource: RoutesResource, Path: "/", Method: http.MethodPost, Name: PostRouteRequest},
   158  	{Resource: ServiceBrokersResource, Path: "/", Method: http.MethodGet, Name: GetServiceBrokersRequest},
   159  	{Resource: ServiceBrokersResource, Path: "/", Method: http.MethodPost, Name: PostServiceBrokerRequest},
   160  	{Resource: ServiceInstancesResource, Path: "/", Method: http.MethodGet, Name: GetServiceInstancesRequest},
   161  	{Resource: ServiceInstancesResource, Path: "/:service_instance_guid/relationships/shared_spaces", Method: http.MethodPost, Name: PostServiceInstanceRelationshipsSharedSpacesRequest},
   162  	{Resource: ServiceInstancesResource, Path: "/:service_instance_guid/relationships/shared_spaces/:space_guid", Method: http.MethodDelete, Name: DeleteServiceInstanceRelationshipsSharedSpaceRequest},
   163  	{Resource: SpacesResource, Path: "/", Method: http.MethodGet, Name: GetSpacesRequest},
   164  	{Resource: SpacesResource, Path: "/:space_guid", Method: http.MethodPatch, Name: PatchSpaceRequest},
   165  	{Resource: SpacesResource, Path: "/:space_guid/relationships/isolation_segment", Method: http.MethodGet, Name: GetSpaceRelationshipIsolationSegmentRequest},
   166  	{Resource: SpacesResource, Path: "/:space_guid/relationships/isolation_segment", Method: http.MethodPatch, Name: PatchSpaceRelationshipIsolationSegmentRequest},
   167  	{Resource: SpacesResource, Path: "/:space_guid/actions/apply_manifest", Method: http.MethodPost, Name: PostSpaceActionApplyManifestRequest},
   168  	{Resource: StacksResource, Path: "/", Method: http.MethodGet, Name: GetStacksRequest},
   169  	{Resource: TasksResource, Path: "/:task_guid/cancel", Method: http.MethodPut, Name: PutTaskCancelRequest},
   170  }