Check source connectivity
client.R2.SuperSlurper.ConnectivityPrecheck.Source(ctx, params) (*SuperSlurperConnectivityPrecheckSourceResponse, error)
PUT/accounts/{account_id}/slurper/source/connectivity-precheck
Check whether tokens are valid against the source bucket
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Check source connectivity
package main
import (
"context"
"fmt"
"github.com/stainless-sdks/cloudflare-go"
"github.com/stainless-sdks/cloudflare-go/option"
"github.com/stainless-sdks/cloudflare-go/r2"
)
func main() {
client := cloudflare.NewClient(
option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
)
response, err := client.R2.SuperSlurper.ConnectivityPrecheck.Source(context.TODO(), r2.SuperSlurperConnectivityPrecheckSourceParams{
AccountID: cloudflare.F("account_id"),
Body: r2.SuperSlurperConnectivityPrecheckSourceParamsBodyR2SlurperS3SourceSchema{
Bucket: cloudflare.F("bucket"),
Secret: cloudflare.F(r2.SuperSlurperConnectivityPrecheckSourceParamsBodyR2SlurperS3SourceSchemaSecret{
AccessKeyID: cloudflare.F("accessKeyId"),
SecretAccessKey: cloudflare.F("secretAccessKey"),
}),
Vendor: cloudflare.F(r2.SuperSlurperConnectivityPrecheckSourceParamsBodyR2SlurperS3SourceSchemaVendorS3),
},
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.ConnectivityStatus)
}
{
"errors": [
{
"code": 7003,
"message": "No route for the URI",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
"string"
],
"result": {
"connectivityStatus": "success"
},
"success": true
}Returns Examples
{
"errors": [
{
"code": 7003,
"message": "No route for the URI",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
"string"
],
"result": {
"connectivityStatus": "success"
},
"success": true
}