APIGatewaysApi
All URIs are relative to https://apigateway.de-txl.ionos.com
ApigatewaysDelete
var result = ApigatewaysDelete(ctx, apigatewayId)
.Execute()
Delete Gateway
Example
package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go-api-gateway"
)
func main() {
apigatewayId := "0620c174-dd3c-5eb4-87c8-e2b516553a00" // string | The ID (UUID) of the Gateway.
configuration := ionoscloud.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
apiClient := ionoscloud.NewAPIClient(configuration)
resp, err := apiClient.APIGatewaysApi.ApigatewaysDelete(context.Background(), apigatewayId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `APIGatewaysApi.ApigatewaysDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp)
}
}
Path Parameters
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
apigatewayId
string
The ID (UUID) of the Gateway.
Other Parameters
Other parameters are passed through a pointer to an apiApigatewaysDeleteRequest struct via the builder pattern
Return type
(empty response body)
HTTP request headers
Content-Type: Not defined
Accept: application/json
URLs Configuration per Operation
Each operation can use different server URL defined using OperationServers
map in the Configuration
. An operation is uniquely identified by "APIGatewaysApiService.ApigatewaysDelete"
string. Similar rules for overriding default operation server index and variables apply by using sw.ContextOperationServerIndices
and sw.ContextOperationServerVariables
context maps.
ctx := context.WithValue(context.Background(), {packageName}.ContextOperationServerIndices, map[string]int{
"APIGatewaysApiService.ApigatewaysDelete": 2,
})
ctx = context.WithValue(context.Background(), {packageName}.ContextOperationServerVariables, map[string]map[string]string{
"APIGatewaysApiService.ApigatewaysDelete": {
"port": "8443",
},
})
ApigatewaysFindById
var result GatewayRead = ApigatewaysFindById(ctx, apigatewayId)
.Execute()
Retrieve Gateway
Example
package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go-api-gateway"
)
func main() {
apigatewayId := "0620c174-dd3c-5eb4-87c8-e2b516553a00" // string | The ID (UUID) of the Gateway.
configuration := ionoscloud.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.APIGatewaysApi.ApigatewaysFindById(context.Background(), apigatewayId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `APIGatewaysApi.ApigatewaysFindById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp)
}
// response from `ApigatewaysFindById`: GatewayRead
fmt.Fprintf(os.Stdout, "Response from `APIGatewaysApi.ApigatewaysFindById`: %v\n", resource)
}
Path Parameters
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
apigatewayId
string
The ID (UUID) of the Gateway.
Other Parameters
Other parameters are passed through a pointer to an apiApigatewaysFindByIdRequest struct via the builder pattern
Return type
HTTP request headers
Content-Type: Not defined
Accept: application/json
URLs Configuration per Operation
Each operation can use different server URL defined using OperationServers
map in the Configuration
. An operation is uniquely identified by "APIGatewaysApiService.ApigatewaysFindById"
string. Similar rules for overriding default operation server index and variables apply by using sw.ContextOperationServerIndices
and sw.ContextOperationServerVariables
context maps.
ctx := context.WithValue(context.Background(), {packageName}.ContextOperationServerIndices, map[string]int{
"APIGatewaysApiService.ApigatewaysFindById": 2,
})
ctx = context.WithValue(context.Background(), {packageName}.ContextOperationServerVariables, map[string]map[string]string{
"APIGatewaysApiService.ApigatewaysFindById": {
"port": "8443",
},
})
ApigatewaysGet
var result GatewayReadList = ApigatewaysGet(ctx)
.Offset(offset)
.Limit(limit)
.OrderBy(orderBy)
.Execute()
Retrieve all Apigateways
Example
package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go-api-gateway"
)
func main() {
offset := int32(0) // int32 | The first element (of the total list of elements) to include in the response. Use together with limit for pagination. (optional) (default to 0)
limit := int32(100) // int32 | The maximum number of elements to return. Use together with offset for pagination. (optional) (default to 100)
orderBy := "orderBy_example" // string | The field to order the results by. If not provided, the results will be ordered by the default field. (optional) (default to "-createdDate")
configuration := ionoscloud.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.APIGatewaysApi.ApigatewaysGet(context.Background()).Offset(offset).Limit(limit).OrderBy(orderBy).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `APIGatewaysApi.ApigatewaysGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp)
}
// response from `ApigatewaysGet`: GatewayReadList
fmt.Fprintf(os.Stdout, "Response from `APIGatewaysApi.ApigatewaysGet`: %v\n", resource)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to an apiApigatewaysGetRequest struct via the builder pattern
offset
int32
The first element (of the total list of elements) to include in the response. Use together with limit for pagination.
[default to 0]
limit
int32
The maximum number of elements to return. Use together with offset for pagination.
[default to 100]
orderBy
string
The field to order the results by. If not provided, the results will be ordered by the default field.
[default to "-createdDate"]
Return type
HTTP request headers
Content-Type: Not defined
Accept: application/json
URLs Configuration per Operation
Each operation can use different server URL defined using OperationServers
map in the Configuration
. An operation is uniquely identified by "APIGatewaysApiService.ApigatewaysGet"
string. Similar rules for overriding default operation server index and variables apply by using sw.ContextOperationServerIndices
and sw.ContextOperationServerVariables
context maps.
ctx := context.WithValue(context.Background(), {packageName}.ContextOperationServerIndices, map[string]int{
"APIGatewaysApiService.ApigatewaysGet": 2,
})
ctx = context.WithValue(context.Background(), {packageName}.ContextOperationServerVariables, map[string]map[string]string{
"APIGatewaysApiService.ApigatewaysGet": {
"port": "8443",
},
})
ApigatewaysPost
var result GatewayRead = ApigatewaysPost(ctx)
.GatewayCreate(gatewayCreate)
.Execute()
Create Gateway
Example
package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go-api-gateway"
)
func main() {
gatewayCreate := *openapiclient.NewGatewayCreate(*openapiclient.NewGateway("APIGateway 1")) // GatewayCreate | Gateway to create.
configuration := ionoscloud.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.APIGatewaysApi.ApigatewaysPost(context.Background()).GatewayCreate(gatewayCreate).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `APIGatewaysApi.ApigatewaysPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp)
}
// response from `ApigatewaysPost`: GatewayRead
fmt.Fprintf(os.Stdout, "Response from `APIGatewaysApi.ApigatewaysPost`: %v\n", resource)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to an apiApigatewaysPostRequest struct via the builder pattern
Return type
HTTP request headers
Content-Type: application/json
Accept: application/json
URLs Configuration per Operation
Each operation can use different server URL defined using OperationServers
map in the Configuration
. An operation is uniquely identified by "APIGatewaysApiService.ApigatewaysPost"
string. Similar rules for overriding default operation server index and variables apply by using sw.ContextOperationServerIndices
and sw.ContextOperationServerVariables
context maps.
ctx := context.WithValue(context.Background(), {packageName}.ContextOperationServerIndices, map[string]int{
"APIGatewaysApiService.ApigatewaysPost": 2,
})
ctx = context.WithValue(context.Background(), {packageName}.ContextOperationServerVariables, map[string]map[string]string{
"APIGatewaysApiService.ApigatewaysPost": {
"port": "8443",
},
})
ApigatewaysPut
var result GatewayRead = ApigatewaysPut(ctx, apigatewayId)
.GatewayEnsure(gatewayEnsure)
.Execute()
Ensure Gateway
Example
package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go-api-gateway"
)
func main() {
apigatewayId := "0620c174-dd3c-5eb4-87c8-e2b516553a00" // string | The ID (UUID) of the Gateway.
gatewayEnsure := *openapiclient.NewGatewayEnsure("0620c174-dd3c-5eb4-87c8-e2b516553a00", *openapiclient.NewGateway("APIGateway 1")) // GatewayEnsure | update Gateway
configuration := ionoscloud.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.APIGatewaysApi.ApigatewaysPut(context.Background(), apigatewayId).GatewayEnsure(gatewayEnsure).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `APIGatewaysApi.ApigatewaysPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp)
}
// response from `ApigatewaysPut`: GatewayRead
fmt.Fprintf(os.Stdout, "Response from `APIGatewaysApi.ApigatewaysPut`: %v\n", resource)
}
Path Parameters
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
apigatewayId
string
The ID (UUID) of the Gateway.
Other Parameters
Other parameters are passed through a pointer to an apiApigatewaysPutRequest struct via the builder pattern
Return type
HTTP request headers
Content-Type: application/json
Accept: application/json
URLs Configuration per Operation
Each operation can use different server URL defined using OperationServers
map in the Configuration
. An operation is uniquely identified by "APIGatewaysApiService.ApigatewaysPut"
string. Similar rules for overriding default operation server index and variables apply by using sw.ContextOperationServerIndices
and sw.ContextOperationServerVariables
context maps.
ctx := context.WithValue(context.Background(), {packageName}.ContextOperationServerIndices, map[string]int{
"APIGatewaysApiService.ApigatewaysPut": 2,
})
ctx = context.WithValue(context.Background(), {packageName}.ContextOperationServerVariables, map[string]map[string]string{
"APIGatewaysApiService.ApigatewaysPut": {
"port": "8443",
},
})
Last updated