Documentation ¶
Index ¶
- Constants
- Variables
- func AddPlugin(ctx context.Context, client *Client, ...) (vaultmodels.HashicorpCloudVault20201125AddPluginResponse, error)
- func BatchGetPrincipals(ctx context.Context, client *Client, principals []string, ...) ([]*models.HashicorpCloudIamPrincipal, error)
- func CreateAwsDynamicSecret(ctx context.Context, client *Client, ...) (*secretmodels.Secrets20231128AwsDynamicSecret, error)
- func CreateAwsIntegration(ctx context.Context, client *Client, ...) (*secretmodels.Secrets20231128AwsIntegration, error)
- func CreateBoundaryCluster(ctx context.Context, client *Client, ...) (*boundarymodels.HashicorpCloudBoundary20211221CreateResponse, error)
- func CreateConsulCluster(ctx context.Context, client *Client, ...) (*consulmodels.HashicorpCloudConsul20210204CreateResponse, error)
- func CreateCustomerRootACLToken(ctx context.Context, client *Client, ...) (*consulmodels.HashicorpCloudConsul20210204CreateCustomerMasterACLTokenResponse, ...)
- func CreateHVNRoute(ctx context.Context, client *Client, id string, ...) (*networkmodels.HashicorpCloudNetwork20200907CreateHVNRouteResponse, error)
- func CreateLogStreamingDestinationOrgFilter(ctx context.Context, client *Client, orgID string, ...) error
- func CreateMongoDBAtlasRotatingSecret(ctx context.Context, client *Client, ...) (*secretmodels.Secrets20231128CreateMongoDBAtlasRotatingSecretResponse, error)
- func CreateMongoDBAtlasRotationIntegration(ctx context.Context, client *Client, ...) (*secretmodels.Secrets20231128MongoDBAtlasIntegration, error)
- func CreateProject(ctx context.Context, client *Client, name, organizationID string) (*resourcemodels.HashicorpCloudResourcemanagerProject, error)
- func CreateSnapshot(ctx context.Context, client *Client, ...) (*consulmodels.HashicorpCloudConsul20210204CreateSnapshotResponse, error)
- func CreateVaultCluster(ctx context.Context, client *Client, ...) (*vaultmodels.HashicorpCloudVault20201125CreateResponse, error)
- func CreateVaultClusterAdminToken(ctx context.Context, client *Client, ...) (*vaultmodels.HashicorpCloudVault20201125GetAdminTokenResponse, error)
- func CreateVaultSecretsApp(ctx context.Context, client *Client, ...) (*secretmodels.Secrets20230613App, error)
- func CreateVaultSecretsAppSecret(ctx context.Context, client *Client, ...) (*secretmodels.Secrets20230613Secret, error)
- func DeleteAwsDynamicSecret(ctx context.Context, client *Client, ...) error
- func DeleteAwsIntegration(ctx context.Context, client *Client, ...) error
- func DeleteBoundaryCluster(ctx context.Context, client *Client, ...) (*boundarymodels.HashicorpCloudBoundary20211221DeleteResponse, error)
- func DeleteConsulCluster(ctx context.Context, client *Client, ...) (*consulmodels.HashicorpCloudConsul20210204DeleteResponse, error)
- func DeleteHVNRouteByID(ctx context.Context, client *Client, hvnID string, hvnRouteID string, ...) (*networkmodels.HashicorpCloudNetwork20200907DeleteHVNRouteResponse, error)
- func DeleteLogStreamingDestination(ctx context.Context, client *Client, ...) error
- func DeleteMongoDBAtlasRotationIntegration(ctx context.Context, client *Client, ...) error
- func DeletePlugin(ctx context.Context, client *Client, ...) (vaultmodels.HashicorpCloudVault20201125DeletePluginResponse, error)
- func DeleteSnapshotByID(ctx context.Context, client *Client, ...) (*consulmodels.HashicorpCloudConsul20210204DeleteSnapshotResponse, error)
- func DeleteVaultCluster(ctx context.Context, client *Client, ...) (*vaultmodels.HashicorpCloudVault20201125DeleteResponse, error)
- func DeleteVaultPathsFilter(ctx context.Context, client *Client, ...) (*vaultmodels.HashicorpCloudVault20201125DeletePathsFilterResponse, error)
- func DeleteVaultSecretsApp(ctx context.Context, client *Client, ...) error
- func DeleteVaultSecretsAppSecret(ctx context.Context, client *Client, ...) error
- func GetAction(ctx context.Context, client *Client, ...) (*waypoint_models.HashicorpCloudWaypointActionConfig, error)
- func GetAddOnByID(ctx context.Context, client *Client, ...) (*waypoint_models.HashicorpCloudWaypointAddOn, error)
- func GetAddOnByName(ctx context.Context, client *Client, ...) (*waypoint_models.HashicorpCloudWaypointAddOn, error)
- func GetAddOnDefinitionByID(ctx context.Context, client *Client, ...) (*waypoint_models.HashicorpCloudWaypointAddOnDefinition, error)
- func GetAddOnDefinitionByName(ctx context.Context, client *Client, ...) (*waypoint_models.HashicorpCloudWaypointAddOnDefinition, error)
- func GetApplicationByID(ctx context.Context, client *Client, ...) (*waypoint_models.HashicorpCloudWaypointApplication, error)
- func GetApplicationByName(ctx context.Context, client *Client, ...) (*waypoint_models.HashicorpCloudWaypointApplication, error)
- func GetApplicationTemplateByID(ctx context.Context, client *Client, ...) (*waypoint_models.HashicorpCloudWaypointApplicationTemplate, error)
- func GetApplicationTemplateByName(ctx context.Context, client *Client, ...) (*waypoint_models.HashicorpCloudWaypointApplicationTemplate, error)
- func GetAvailableHCPConsulVersions(ctx context.Context, client *Client) ([]*consulmodels.HashicorpCloudConsul20210204Version, error)
- func GetAvailableHCPConsulVersionsForLocation(ctx context.Context, loc *sharedmodels.HashicorpCloudLocationLocation, ...) ([]*consulmodels.HashicorpCloudConsul20210204Version, error)
- func GetBoundaryClusterByID(ctx context.Context, client *Client, ...) (*boundarymodels.HashicorpCloudBoundary20211221Cluster, error)
- func GetBoundaryClusterMaintenanceWindow(ctx context.Context, client *Client, ...) (*boundarymodels.HashicorpCloudBoundary20211221UpgradeType, ...)
- func GetConsulClientConfigFiles(ctx context.Context, client *Client, ...) (*consulmodels.HashicorpCloudConsul20210204GetClientConfigResponse, error)
- func GetConsulClusterByID(ctx context.Context, client *Client, ...) (*consulmodels.HashicorpCloudConsul20210204Cluster, error)
- func GetHVNRoute(ctx context.Context, client *Client, hvnID, routeID string, ...) (*networkmodels.HashicorpCloudNetwork20200907HVNRoute, error)
- func GetHvnByID(ctx context.Context, client *Client, ...) (*networkmodels.HashicorpCloudNetwork20200907Network, error)
- func GetInputVariables(ctx context.Context, client *Client, workspaceName string, ...) ([]*waypoint_models.HashicorpCloudWaypointInputVariable, error)
- func GetLogStreamingDestination(ctx context.Context, client *Client, ...) (*models.LogService20210330Destination, error)
- func GetParentOrganizationIDByProjectID(ctx context.Context, client *Client, projectID string) (string, error)
- func GetPeeringByID(ctx context.Context, client *Client, peeringID string, hvnID string, ...) (*networkmodels.HashicorpCloudNetwork20200907Peering, error)
- func GetProjectByID(ctx context.Context, client *Client, projectID string) (*resourcemodels.HashicorpCloudResourcemanagerProject, error)
- func GetRadarSource(ctx context.Context, client *Client, projectID, sourceID string) (*radar_service.GetDataSourceByIDOK, error)
- func GetRotatingSecretState(ctx context.Context, client *Client, ...) (*secretmodels.Secrets20231128RotatingSecretState, error)
- func GetSnapshotByID(ctx context.Context, client *Client, ...) (*consulmodels.HashicorpCloudConsul20210204GetSnapshotResponse, error)
- func GetTGWAttachmentByID(ctx context.Context, client *Client, tgwAttachmentID string, hvnID string, ...) (*networkmodels.HashicorpCloudNetwork20200907TGWAttachment, error)
- func GetVaultClusterByID(ctx context.Context, client *Client, ...) (*vaultmodels.HashicorpCloudVault20201125Cluster, error)
- func GetVaultSecretsApp(ctx context.Context, client *Client, ...) (*secretmodels.Secrets20230613App, error)
- func IamPrincipalTypeToBindingType(p *models.HashicorpCloudIamPrincipal) (*rmModels.HashicorpCloudResourcemanagerPolicyBindingMemberType, error)
- func IsResponseCodeInternalError(erro error) bool
- func IsResponseCodeNotFound(err error) bool
- func ListConsulUpgradeVersions(ctx context.Context, client *Client, ...) ([]*consulmodels.HashicorpCloudConsul20210204Version, error)
- func ListHVNRoutes(ctx context.Context, client *Client, hvnID string, destination string, ...) ([]*networkmodels.HashicorpCloudNetwork20200907HVNRoute, error)
- func ListPlugins(ctx context.Context, client *Client, ...) (*vaultmodels.HashicorpCloudVault20201125PluginRegistrationStatusResponse, ...)
- func OffboardRadarSource(ctx context.Context, client *Client, projectID, sourceID string) error
- func OnboardRadarSource(ctx context.Context, client *Client, projectID string, ...) (*radar_service.OnboardDataSourceOK, error)
- func OpenVaultSecretsAppSecret(ctx context.Context, client *Client, ...) (*secretmodels.Secrets20231128OpenSecret, error)
- func OpenVaultSecretsAppSecrets(ctx context.Context, client *Client, ...) ([]*secretmodels.Secrets20231128OpenSecret, error)
- func RenameSnapshotByID(ctx context.Context, client *Client, ...) (*consulmodels.HashicorpCloudConsul20210204UpdateSnapshotResponse, error)
- func RetryOrganizationServiceList(client *Client, params *organization_service.OrganizationServiceListParams) (*organization_service.OrganizationServiceListOK, error)
- func RetryProjectServiceGet(client *Client, params *project_service.ProjectServiceGetParams) (*project_service.ProjectServiceGetOK, error)
- func RetryProjectServiceList(client *Client, params *project_service.ProjectServiceListParams) (*project_service.ProjectServiceListOK, error)
- func SetBoundaryClusterMaintenanceWindow(ctx context.Context, client *Client, ...) error
- func ShouldLog() bool
- func UpdateConsulCluster(ctx context.Context, client *Client, ...) (*consulmodels.HashicorpCloudConsul20210204UpdateResponse, error)
- func UpdateLogStreamingDestination(ctx context.Context, client *Client, ...) error
- func UpdateVaultClusterConfig(ctx context.Context, client *Client, ...) (*vaultmodels.HashicorpCloudVault20201125UpdateResponse, error)
- func UpdateVaultClusterPublicIps(ctx context.Context, client *Client, ...) (*vaultmodels.HashicorpCloudVault20201125UpdatePublicIpsResponse, error)
- func UpdateVaultMajorVersionUpgradeConfig(ctx context.Context, client *Client, ...) (vaultmodels.HashicorpCloudVault20201125UpdateMajorVersionUpgradeConfigResponse, ...)
- func UpdateVaultPathsFilter(ctx context.Context, client *Client, ...) (*vaultmodels.HashicorpCloudVault20201125UpdatePathsFilterResponse, error)
- func UpdateVaultSecretsApp(ctx context.Context, client *Client, ...) (*secretmodels.Secrets20230613App, error)
- func WaitForHVNRouteToBeActive(ctx context.Context, client *Client, hvnID string, routeID string, ...) (*networkmodels.HashicorpCloudNetwork20200907HVNRoute, error)
- func WaitForOperation(ctx context.Context, client *Client, operationName string, ...) error
- func WaitForTGWAttachmentToBeActive(ctx context.Context, client *Client, tgwAttachmentID string, hvnID string, ...) (*networkmodels.HashicorpCloudNetwork20200907TGWAttachment, error)
- func WaitForTGWAttachmentToBePendingAcceptance(ctx context.Context, client *Client, tgwAttachmentID string, hvnID string, ...) (*networkmodels.HashicorpCloudNetwork20200907TGWAttachment, error)
- func WaitOnOffboardRadarSource(ctx context.Context, client *Client, projectID, sourceID string) error
- type Client
- type ClientConfig
- type ErrorWithCode
- type WaitFor
Constants ¶
const ( // HvnRouteStateCreating is the CREATING state of an HVN route HvnRouteStateCreating = string(networkmodels.HashicorpCloudNetwork20200907HVNRouteStateCREATING) // HvnRouteStateActive is the ACTIVE state of an HVN route HvnRouteStateActive = string(networkmodels.HashicorpCloudNetwork20200907HVNRouteStateACTIVE) // HvnRouteStatePending is the PENDING state of an HVN route HvnRouteStatePending = string(networkmodels.HashicorpCloudNetwork20200907HVNRouteStatePENDING) )
const ( // PeeringStateCreating is the CREATING state of a peering connection PeeringStateCreating = string(networkmodels.HashicorpCloudNetwork20200907PeeringStateCREATING) // PeeringStatePendingAcceptance is the PENDING_ACCEPTANCE state of a peering connection PeeringStatePendingAcceptance = string(networkmodels.HashicorpCloudNetwork20200907PeeringStatePENDINGACCEPTANCE) // PeeringStateAccepted is the ACCEPTED state of a peering connection PeeringStateAccepted = string(networkmodels.HashicorpCloudNetwork20200907PeeringStateACCEPTED) // PeeringStateActive is the ACTIVE state of a peering connection PeeringStateActive = string(networkmodels.HashicorpCloudNetwork20200907PeeringStateACTIVE) )
const ( // TgwAttachmentStateCreating is the CREATING state of a TGW attachment TgwAttachmentStateCreating = string(networkmodels.HashicorpCloudNetwork20200907TGWAttachmentStateCREATING) // TgwAttachmentStatePendingAcceptance is the PENDING_ACCEPTANCE state of a TGW attachment TgwAttachmentStatePendingAcceptance = string(networkmodels.HashicorpCloudNetwork20200907TGWAttachmentStatePENDINGACCEPTANCE) // TgwAttachmentStateAccepted is the ACCEPTED state of a TGW attachment TgwAttachmentStateAccepted = string(networkmodels.HashicorpCloudNetwork20200907TGWAttachmentStateACCEPTED) // TgwAttachmentStateActive is the ACTIVE state of a TGW attachment TgwAttachmentStateActive = string(networkmodels.HashicorpCloudNetwork20200907TGWAttachmentStateACTIVE) )
Variables ¶
var WaitForPeeringToBeAccepted = waitForPeeringToBe(peeringState{ Target: PeeringStateAccepted, Pending: []string{PeeringStateCreating, PeeringStatePendingAcceptance}, })
WaitForPeeringToBeAccepted will poll the GET peering endpoint until the state is ACCEPTED, ctx is canceled, or an error occurs.
var WaitForPeeringToBeActive = waitForPeeringToBe(peeringState{ Target: PeeringStateActive, Pending: WaitForPeeringToBeActiveStates, })
WaitForPeeringToBeActive will poll the GET peering endpoint until the state is ACTIVE, ctx is canceled, or an error occurs.
var WaitForPeeringToBeActiveStates = []string{PeeringStateCreating, PeeringStatePendingAcceptance, PeeringStateAccepted}
WaitForPeeringToBeActiveStates are those from which we'd expect an ACTIVE state to be possible.
var WaitForPeeringToBePendingAcceptance = waitForPeeringToBe(peeringState{ Target: PeeringStatePendingAcceptance, Pending: []string{PeeringStateCreating}, })
WaitForPeeringToBePendingAcceptance will poll the GET peering endpoint until the state is PENDING_ACCEPTANCE, ctx is canceled, or an error occurs.
var WaitForTGWAttachmentToBeActiveStates = []string{ TgwAttachmentStateCreating, TgwAttachmentStatePendingAcceptance, TgwAttachmentStateAccepted, }
WaitForTGWAttachmentToBeActiveStates is the set of states of the attachment which we'll wait on.
Functions ¶
func AddPlugin ¶ added in v0.70.0
func AddPlugin(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, clusterID string, request *vaultmodels.HashicorpCloudVault20201125AddPluginRequest) (vaultmodels.HashicorpCloudVault20201125AddPluginResponse, error)
AddPlugin will make a call to the Vault service to add a plugin to a Vault cluster
func BatchGetPrincipals ¶ added in v0.77.0
func BatchGetPrincipals(ctx context.Context, client *Client, principals []string, view *models.HashicorpCloudIamPrincipalView) ([]*models.HashicorpCloudIamPrincipal, error)
BatchGetPrincipals retrieves the requested principals in a batch. If the number of principals exceeds the batch limit, multiple requests will be made.
func CreateAwsDynamicSecret ¶ added in v0.94.0
func CreateAwsDynamicSecret(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, appName, integrationName, name, roleArn string) (*secretmodels.Secrets20231128AwsDynamicSecret, error)
CreateAwsDynamicSecret NOTE: currently just needed for tests
func CreateAwsIntegration ¶ added in v0.94.0
func CreateAwsIntegration(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, name, roleArn, audience string, capabilities []*secretmodels.Secrets20231128Capability) (*secretmodels.Secrets20231128AwsIntegration, error)
CreateAwsIntegration NOTE: currently just needed for tests
func CreateBoundaryCluster ¶ added in v0.43.0
func CreateBoundaryCluster(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, boundaryCreateRequest *boundarymodels.HashicorpCloudBoundary20211221CreateRequest) (*boundarymodels.HashicorpCloudBoundary20211221CreateResponse, error)
CreateBoundaryCluster will make a call to the Boundary service to initiate the create Boundary cluster workflow.
func CreateConsulCluster ¶
func CreateConsulCluster(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, consulCluster *consulmodels.HashicorpCloudConsul20210204Cluster) (*consulmodels.HashicorpCloudConsul20210204CreateResponse, error)
CreateConsulCluster will make a call to the Consul service to initiate the create Consul cluster workflow.
func CreateCustomerRootACLToken ¶
func CreateCustomerRootACLToken(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, consulClusterID string) (*consulmodels.HashicorpCloudConsul20210204CreateCustomerMasterACLTokenResponse, error)
CreateCustomerRootACLToken invokes the consul-service endpoint to create privileged tokens for a Consul cluster. Example token: After cluster create, a customer would want a root token (or "bootstrap token") so they can continue to set-up their cluster.
func CreateHVNRoute ¶ added in v0.7.0
func CreateHVNRoute(ctx context.Context, client *Client, id string, hvn *sharedmodels.HashicorpCloudLocationLink, destination string, target *sharedmodels.HashicorpCloudLocationLink, location *sharedmodels.HashicorpCloudLocationLocation, azRoute *networkmodels.HashicorpCloudNetwork20200907AzureRoute) (*networkmodels.HashicorpCloudNetwork20200907CreateHVNRouteResponse, error)
CreateHVNRoute creates a new HVN route
func CreateLogStreamingDestinationOrgFilter ¶ added in v0.80.0
func CreateLogStreamingDestinationOrgFilter(ctx context.Context, client *Client, orgID string, streamingDestinationID string) error
CreateLogStreamingDestinationOrgFilter will create an HCP Log Streaming Destination Organization Filter.
func CreateMongoDBAtlasRotatingSecret ¶ added in v0.91.0
func CreateMongoDBAtlasRotatingSecret( ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, appName string, requestBody *secretmodels.SecretServiceCreateMongoDBAtlasRotatingSecretBody, ) (*secretmodels.Secrets20231128CreateMongoDBAtlasRotatingSecretResponse, error)
CreateMongoDBAtlasRotatingSecret NOTE: currently just needed for tests
func CreateMongoDBAtlasRotationIntegration ¶ added in v0.91.0
func CreateMongoDBAtlasRotationIntegration(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, integrationName, mongodbAtlasPublicKey, mongodbAtlasPrivateKey string) (*secretmodels.Secrets20231128MongoDBAtlasIntegration, error)
CreateMongoDBAtlasRotationIntegration NOTE: currently just needed for tests
func CreateProject ¶ added in v0.57.0
func CreateProject(ctx context.Context, client *Client, name, organizationID string) (*resourcemodels.HashicorpCloudResourcemanagerProject, error)
func CreateSnapshot ¶
func CreateSnapshot(ctx context.Context, client *Client, res *sharedmodels.HashicorpCloudLocationLink, snapshotName string) (*consulmodels.HashicorpCloudConsul20210204CreateSnapshotResponse, error)
CreateSnapshot will make a call to the Consul service to initiate the create Consul snapshot workflow.
func CreateVaultCluster ¶ added in v0.4.0
func CreateVaultCluster(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, vaultCluster *vaultmodels.HashicorpCloudVault20201125InputCluster) (*vaultmodels.HashicorpCloudVault20201125CreateResponse, error)
CreateVaultCluster will make a call to the Vault service to initiate the create Vault cluster workflow.
func CreateVaultClusterAdminToken ¶ added in v0.4.0
func CreateVaultClusterAdminToken(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, vaultClusterID string) (*vaultmodels.HashicorpCloudVault20201125GetAdminTokenResponse, error)
CreateVaultClusterAdminToken will make a call to the Vault service to generate an admin token for the Vault cluster that expires after 6 hours.
func CreateVaultSecretsApp ¶ added in v0.61.0
func CreateVaultSecretsApp(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, appName string, description string) (*secretmodels.Secrets20230613App, error)
CreateVaultSecretsApp will create a Vault Secrets application.
func CreateVaultSecretsAppSecret ¶ added in v0.61.0
func CreateVaultSecretsAppSecret(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, appName, secretName, secretValue string) (*secretmodels.Secrets20230613Secret, error)
CreateVaultSecretsAppSecret will create a Vault Secrets application secret.
func DeleteAwsDynamicSecret ¶ added in v0.94.0
func DeleteAwsDynamicSecret(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, appName, name string) error
DeleteAwsDynamicSecret NOTE: currently just needed for tests
func DeleteAwsIntegration ¶ added in v0.94.0
func DeleteAwsIntegration(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, name string) error
DeleteAwsIntegration NOTE: currently just needed for tests
func DeleteBoundaryCluster ¶ added in v0.43.0
func DeleteBoundaryCluster(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, boundaryClusterID string) (*boundarymodels.HashicorpCloudBoundary20211221DeleteResponse, error)
DeleteBoundaryCluster will make a call to the Boundary service to initiate the delete Boundary cluster workflow.
func DeleteConsulCluster ¶
func DeleteConsulCluster(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, clusterID string) (*consulmodels.HashicorpCloudConsul20210204DeleteResponse, error)
DeleteConsulCluster will make a call to the Consul service to initiate the delete Consul cluster workflow.
func DeleteHVNRouteByID ¶ added in v0.7.0
func DeleteHVNRouteByID(ctx context.Context, client *Client, hvnID string, hvnRouteID string, loc *sharedmodels.HashicorpCloudLocationLocation) (*networkmodels.HashicorpCloudNetwork20200907DeleteHVNRouteResponse, error)
DeleteSnapshotByID deletes an HVN route by its ID
func DeleteLogStreamingDestination ¶ added in v0.80.0
func DeleteLogStreamingDestination(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, streamingDestinationID string) error
DeleteLogStreamingDestination will delete an HCP Log Streaming Destination.
func DeleteMongoDBAtlasRotationIntegration ¶ added in v0.91.0
func DeleteMongoDBAtlasRotationIntegration(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, integrationName string) error
DeleteMongoDBAtlasRotationIntegration NOTE: currently just needed for tests
func DeletePlugin ¶ added in v0.70.0
func DeletePlugin(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, clusterID string, request *vaultmodels.HashicorpCloudVault20201125DeletePluginRequest) (vaultmodels.HashicorpCloudVault20201125DeletePluginResponse, error)
DeletePlugin will make a call to the Vault service to remove a plugin to a Vault cluster
func DeleteSnapshotByID ¶
func DeleteSnapshotByID(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, snapshotID string) (*consulmodels.HashicorpCloudConsul20210204DeleteSnapshotResponse, error)
DeleteSnapshotByID deletes a Consul snapshot by its ID
func DeleteVaultCluster ¶ added in v0.4.0
func DeleteVaultCluster(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, clusterID string) (*vaultmodels.HashicorpCloudVault20201125DeleteResponse, error)
DeleteVaultCluster will make a call to the Vault service to initiate the delete Vault cluster workflow.
func DeleteVaultPathsFilter ¶ added in v0.25.0
func DeleteVaultPathsFilter(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, clusterID string) (*vaultmodels.HashicorpCloudVault20201125DeletePathsFilterResponse, error)
DeleteVaultPathsFilter will make a call to the Vault service to delete the paths filter for a secondary cluster
func DeleteVaultSecretsApp ¶ added in v0.61.0
func DeleteVaultSecretsApp(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, appName string) error
DeleteVaultSecretsApp will delete a Vault Secrets application.
func DeleteVaultSecretsAppSecret ¶ added in v0.61.0
func DeleteVaultSecretsAppSecret(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, appName, secretName string) error
DeleteVaultSecretsAppSecret will delete a Vault Secrets application secret.
func GetAction ¶ added in v0.93.0
func GetAction(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, actionID string, actionName string) (*waypoint_models.HashicorpCloudWaypointActionConfig, error)
GetAction will retrieve an Action using the provided ID by default or by name if the ID is not provided
func GetAddOnByID ¶ added in v0.87.0
func GetAddOnByID(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, defID string) (*waypoint_models.HashicorpCloudWaypointAddOn, error)
GetAddOnByID will retrieve an add-on by ID
func GetAddOnByName ¶ added in v0.87.0
func GetAddOnByName(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, defName string) (*waypoint_models.HashicorpCloudWaypointAddOn, error)
GetAddOnByName will retrieve an add-on by name
func GetAddOnDefinitionByID ¶ added in v0.84.0
func GetAddOnDefinitionByID(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, defID string) (*waypoint_models.HashicorpCloudWaypointAddOnDefinition, error)
GetAddOnDefinitionByID will retrieve an add-on definition by ID
func GetAddOnDefinitionByName ¶ added in v0.84.0
func GetAddOnDefinitionByName(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, defName string) (*waypoint_models.HashicorpCloudWaypointAddOnDefinition, error)
GetAddOnDefinitionByName will retrieve an add-on definition by name
func GetApplicationByID ¶ added in v0.85.0
func GetApplicationByID(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, appID string) (*waypoint_models.HashicorpCloudWaypointApplication, error)
GetApplicationByID will retrieve an application by ID
func GetApplicationByName ¶ added in v0.85.0
func GetApplicationByName(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, appName string) (*waypoint_models.HashicorpCloudWaypointApplication, error)
GetApplicationByName will retrieve an application by name
func GetApplicationTemplateByID ¶ added in v0.84.0
func GetApplicationTemplateByID(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, appID string) (*waypoint_models.HashicorpCloudWaypointApplicationTemplate, error)
GetApplicationTemplateByID will retrieve a template by ID
func GetApplicationTemplateByName ¶ added in v0.84.0
func GetApplicationTemplateByName(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, appName string) (*waypoint_models.HashicorpCloudWaypointApplicationTemplate, error)
GetApplicationTemplateByName will retrieve a template by name
func GetAvailableHCPConsulVersions ¶
func GetAvailableHCPConsulVersions(ctx context.Context, client *Client) ([]*consulmodels.HashicorpCloudConsul20210204Version, error)
GetAvailableHCPConsulVersions gets the list of available Consul versions that HCP supports.
func GetAvailableHCPConsulVersionsForLocation ¶ added in v0.2.0
func GetAvailableHCPConsulVersionsForLocation(ctx context.Context, loc *sharedmodels.HashicorpCloudLocationLocation, client *Client) ([]*consulmodels.HashicorpCloudConsul20210204Version, error)
GetAvailableHCPConsulVersionsForLocation gets the list of available Consul versions that HCP supports for the provided location.
func GetBoundaryClusterByID ¶ added in v0.43.0
func GetBoundaryClusterByID(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, boundaryClusterID string) (*boundarymodels.HashicorpCloudBoundary20211221Cluster, error)
GetBoundaryClusterByID gets a Boundary cluster by its ID.
func GetBoundaryClusterMaintenanceWindow ¶ added in v0.58.0
func GetBoundaryClusterMaintenanceWindow( ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, boundaryClusterID string, ) (*boundarymodels.HashicorpCloudBoundary20211221UpgradeType, *boundarymodels.HashicorpCloudBoundary20211221MaintenanceWindow, error)
GetBoundaryClusterMaintenanceWindow gets the maintenance window configuration for a Boundary cluster.
func GetConsulClientConfigFiles ¶
func GetConsulClientConfigFiles(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, consulClusterID string) (*consulmodels.HashicorpCloudConsul20210204GetClientConfigResponse, error)
GetConsulClientConfigFiles gets a Consul cluster set of client config files.
The files will be returned in base64-encoded format and will get passed in that format.
func GetConsulClusterByID ¶
func GetConsulClusterByID(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, consulClusterID string) (*consulmodels.HashicorpCloudConsul20210204Cluster, error)
GetConsulClusterByID gets an Consul cluster by its ID
func GetHVNRoute ¶ added in v0.7.0
func GetHVNRoute(ctx context.Context, client *Client, hvnID, routeID string, loc *sharedmodels.HashicorpCloudLocationLocation) (*networkmodels.HashicorpCloudNetwork20200907HVNRoute, error)
GetHVNRoute returns specific HVN route by its ID
func GetHvnByID ¶
func GetHvnByID(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, hvnID string) (*networkmodels.HashicorpCloudNetwork20200907Network, error)
GetHvnByID gets an HVN by its ID and location
func GetInputVariables ¶ added in v0.91.0
func GetInputVariables(ctx context.Context, client *Client, workspaceName string, loc *sharedmodels.HashicorpCloudLocationLocation) ([]*waypoint_models.HashicorpCloudWaypointInputVariable, error)
func GetLogStreamingDestination ¶ added in v0.80.0
func GetLogStreamingDestination(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, streamingDestinationID string) (*models.LogService20210330Destination, error)
GetLogStreamingDestination will get an HCP Log Streaming Destination by its ID and location.
func GetParentOrganizationIDByProjectID ¶
func GetParentOrganizationIDByProjectID(ctx context.Context, client *Client, projectID string) (string, error)
GetParentOrganizationIDByProjectID gets the parent organization ID of a project
func GetPeeringByID ¶
func GetPeeringByID(ctx context.Context, client *Client, peeringID string, hvnID string, loc *sharedmodels.HashicorpCloudLocationLocation) (*networkmodels.HashicorpCloudNetwork20200907Peering, error)
GetPeeringByID gets a peering by its ID, hvnID, and location
func GetProjectByID ¶
func GetProjectByID(ctx context.Context, client *Client, projectID string) (*resourcemodels.HashicorpCloudResourcemanagerProject, error)
GetProjectByID gets a project by its ID
func GetRadarSource ¶ added in v0.97.0
func GetRadarSource(ctx context.Context, client *Client, projectID, sourceID string) (*radar_service.GetDataSourceByIDOK, error)
func GetRotatingSecretState ¶ added in v0.91.0
func GetRotatingSecretState(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, appName, secretName string) (*secretmodels.Secrets20231128RotatingSecretState, error)
func GetSnapshotByID ¶
func GetSnapshotByID(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, snapshotID string) (*consulmodels.HashicorpCloudConsul20210204GetSnapshotResponse, error)
GetSnapshotByID gets a Consul snapshot by its ID
func GetTGWAttachmentByID ¶ added in v0.2.0
func GetTGWAttachmentByID(ctx context.Context, client *Client, tgwAttachmentID string, hvnID string, loc *sharedmodels.HashicorpCloudLocationLocation) (*networkmodels.HashicorpCloudNetwork20200907TGWAttachment, error)
GetTGWAttachmentByID gets a TGW attachment by its ID, hvnID, and location
func GetVaultClusterByID ¶ added in v0.4.0
func GetVaultClusterByID(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, vaultClusterID string) (*vaultmodels.HashicorpCloudVault20201125Cluster, error)
GetVaultClusterByID gets an Vault cluster by its ID.
func GetVaultSecretsApp ¶ added in v0.71.0
func GetVaultSecretsApp(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, appName string) (*secretmodels.Secrets20230613App, error)
GetVaultSecretsApp will read a Vault Secrets application
func IamPrincipalTypeToBindingType ¶ added in v0.77.0
func IamPrincipalTypeToBindingType(p *models.HashicorpCloudIamPrincipal) (*rmModels.HashicorpCloudResourcemanagerPolicyBindingMemberType, error)
IamPrincipalTypeToBindingType converts an IAM principal type to a resource manager binding member type.
func IsResponseCodeInternalError ¶ added in v0.87.0
func IsResponseCodeNotFound ¶
IsResponseCodeNotFound takes an error returned from a client service request, and returns true if the response code was 404 not found
func ListConsulUpgradeVersions ¶
func ListConsulUpgradeVersions(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, clusterID string) ([]*consulmodels.HashicorpCloudConsul20210204Version, error)
ListConsulUpgradeVersions gets the list of available Consul versions that the supplied cluster can upgrade to.
func ListHVNRoutes ¶ added in v0.6.0
func ListHVNRoutes(ctx context.Context, client *Client, hvnID string, destination string, targetID string, targetType string, loc *sharedmodels.HashicorpCloudLocationLocation) ([]*networkmodels.HashicorpCloudNetwork20200907HVNRoute, error)
ListHVNRoutes lists the routes for an HVN.
func ListPlugins ¶ added in v0.70.0
func ListPlugins(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, clusterID string) (*vaultmodels.HashicorpCloudVault20201125PluginRegistrationStatusResponse, error)
ListPlugins will make a call to the Vault service plugin status api to get all available plugins for the cluster.
func OffboardRadarSource ¶ added in v0.97.0
func OnboardRadarSource ¶ added in v0.97.0
func OnboardRadarSource(ctx context.Context, client *Client, projectID string, source radar_service.OnboardDataSourceBody) (*radar_service.OnboardDataSourceOK, error)
func OpenVaultSecretsAppSecret ¶ added in v0.61.0
func OpenVaultSecretsAppSecret(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, appName, secretName string) (*secretmodels.Secrets20231128OpenSecret, error)
OpenVaultSecretsAppSecret will retrieve the latest secret for a Vault Secrets app, including it's value.
func OpenVaultSecretsAppSecrets ¶ added in v0.88.0
func OpenVaultSecretsAppSecrets(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, appName string) ([]*secretmodels.Secrets20231128OpenSecret, error)
func RenameSnapshotByID ¶
func RenameSnapshotByID(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, snapshotID string, snapshotName string) (*consulmodels.HashicorpCloudConsul20210204UpdateSnapshotResponse, error)
RenameSnapshotByID renames a Consul snapshot by its ID
func RetryOrganizationServiceList ¶ added in v0.38.0
func RetryOrganizationServiceList(client *Client, params *organization_service.OrganizationServiceListParams) (*organization_service.OrganizationServiceListOK, error)
Wraps the OrganizationServiceList function in a loop that supports retrying the GET request
func RetryProjectServiceGet ¶ added in v0.57.0
func RetryProjectServiceGet(client *Client, params *project_service.ProjectServiceGetParams) (*project_service.ProjectServiceGetOK, error)
Wraps the ProjectServiceGet function in a loop that supports retrying the GET request
func RetryProjectServiceList ¶ added in v0.38.0
func RetryProjectServiceList(client *Client, params *project_service.ProjectServiceListParams) (*project_service.ProjectServiceListOK, error)
Wraps the ProjectServiceList function in a loop that supports retrying the GET request
func SetBoundaryClusterMaintenanceWindow ¶ added in v0.58.0
func SetBoundaryClusterMaintenanceWindow( ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, boundaryClusterID string, mwUpdateRequest *boundarymodels.HashicorpCloudBoundary20211221MaintenanceWindowUpdateRequest, ) error
SetBoundaryClusterMaintenanceWindow updates the maintenance window configuration for a Boundary cluster.
func UpdateConsulCluster ¶
func UpdateConsulCluster(ctx context.Context, client *Client, newCluster *consulmodels.HashicorpCloudConsul20210204Cluster) (*consulmodels.HashicorpCloudConsul20210204UpdateResponse, error)
UpdateConsulCluster will make a call to the Consul service to initiate the update Consul cluster workflow.
func UpdateLogStreamingDestination ¶ added in v0.86.0
func UpdateLogStreamingDestination(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, updatePaths []string, destination *models.LogService20210330Destination) error
func UpdateVaultClusterConfig ¶ added in v0.31.0
func UpdateVaultClusterConfig( ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, clusterID string, tier *string, publicIpsEnabled *bool, httpProxyOption *vaultmodels.HashicorpCloudVault20201125HTTPProxyOption, metrics *vaultmodels.HashicorpCloudVault20201125ObservabilityConfig, auditLog *vaultmodels.HashicorpCloudVault20201125ObservabilityConfig, ipAllowlist []*vaultmodels.HashicorpCloudVault20201125CidrRange) (*vaultmodels.HashicorpCloudVault20201125UpdateResponse, error)
UpdateVaultCluster will make a call to the Vault service to update the Vault cluster configuration.
func UpdateVaultClusterPublicIps ¶ added in v0.9.0
func UpdateVaultClusterPublicIps(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, clusterID string, enablePublicIps bool) (*vaultmodels.HashicorpCloudVault20201125UpdatePublicIpsResponse, error)
UpdateVaultClusterPublicIps will make a call to the Vault service to enable or disable public IPs for the Vault cluster.
func UpdateVaultMajorVersionUpgradeConfig ¶ added in v0.43.0
func UpdateVaultMajorVersionUpgradeConfig(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, clusterID string, config *vaultmodels.HashicorpCloudVault20201125MajorVersionUpgradeConfig) (vaultmodels.HashicorpCloudVault20201125UpdateMajorVersionUpgradeConfigResponse, error)
UpdateVaultMajorVersionUpgradeConfig will make a call to the Vault service to update the major version upgrade config for the Vault cluster.
func UpdateVaultPathsFilter ¶ added in v0.25.0
func UpdateVaultPathsFilter(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, clusterID string, params vaultmodels.HashicorpCloudVault20201125ClusterPerformanceReplicationPathsFilter) (*vaultmodels.HashicorpCloudVault20201125UpdatePathsFilterResponse, error)
UpdateVaultPathsFilter will make a call to the Vault service to update the paths filter for a secondary cluster
func UpdateVaultSecretsApp ¶ added in v0.71.0
func UpdateVaultSecretsApp(ctx context.Context, client *Client, loc *sharedmodels.HashicorpCloudLocationLocation, appName string, description string) (*secretmodels.Secrets20230613App, error)
UpdateVaultSecretsApp will update an app's description
func WaitForHVNRouteToBeActive ¶ added in v0.7.0
func WaitForHVNRouteToBeActive(ctx context.Context, client *Client, hvnID string, routeID string, loc *sharedmodels.HashicorpCloudLocationLocation, timeout time.Duration) (*networkmodels.HashicorpCloudNetwork20200907HVNRoute, error)
WaitForHVNRouteToBeActive will poll the GET HVN route endpoint until the state is ACTIVE, ctx is canceled, or an error occurs.
func WaitForOperation ¶
func WaitForOperation(ctx context.Context, client *Client, operationName string, loc *sharedmodels.HashicorpCloudLocationLocation, operationID string) error
WaitForOperation will poll the operation wait endpoint until an operation is DONE, ctx is canceled, or consecutive errors occur waiting for operation to complete.
func WaitForTGWAttachmentToBeActive ¶ added in v0.2.0
func WaitForTGWAttachmentToBeActive(ctx context.Context, client *Client, tgwAttachmentID string, hvnID string, loc *sharedmodels.HashicorpCloudLocationLocation, timeout time.Duration) (*networkmodels.HashicorpCloudNetwork20200907TGWAttachment, error)
WaitForTGWAttachmentToBeActive will poll the GET TGW attachment endpoint until the state is ACTIVE, ctx is canceled, or an error occurs.
func WaitForTGWAttachmentToBePendingAcceptance ¶ added in v0.2.0
func WaitForTGWAttachmentToBePendingAcceptance(ctx context.Context, client *Client, tgwAttachmentID string, hvnID string, loc *sharedmodels.HashicorpCloudLocationLocation, timeout time.Duration) (*networkmodels.HashicorpCloudNetwork20200907TGWAttachment, error)
WaitForTGWAttachmentToBePendingAcceptance will poll the GET TGW attachment endpoint until the state is PENDING_ACCEPTANCE, ctx is canceled, or an error occurs.
Types ¶
type Client ¶
type Client struct { Config ClientConfig Billing billing_account_service.ClientService Boundary boundary_service.ClientService Consul consul_service.ClientService IAM iam_service.ClientService Network network_service.ClientService Operation operation_service.ClientService Organization organization_service.ClientService Packer packer_service.ClientService PackerV2 packer_service_v2.ClientService Project project_service.ClientService ServicePrincipals service_principals_service.ClientService Groups groups_service.ClientService Vault vault_service.ClientService VaultSecrets secret_service.ClientService VaultSecretsPreview secret_service_preview.ClientService Waypoint waypoint_service.ClientService Webhook webhook_service.ClientService LogService log_service.ClientService ResourceService resource_service.ClientService RadarSourceRegistrationService radar_src_registration_service.ClientService }
Client is an HCP client capable of making requests on behalf of a service principal
func NewClient ¶
func NewClient(config ClientConfig) (*Client, error)
NewClient creates a new Client that is capable of making HCP requests
func (*Client) GetOrganizationID ¶ added in v0.81.1
func (*Client) GetProjectID ¶ added in v0.81.1
func (*Client) Location ¶ added in v0.96.0
Location returns the organization and project ID to use for a given resource The resource project ID takes precedence over the provider project ID
func (*Client) UpdateSourceChannel ¶ added in v0.18.0
func (cl *Client) UpdateSourceChannel(d *schema.ResourceData) (*Client, error)
updateSourceChannel updates the SourceChannel of the client
type ClientConfig ¶
type ClientConfig struct { ClientID string ClientSecret string CredentialFile string // WorkloadIdentityTokenFile and WorkloadIdentityResourceName can be set to // indicate that authentication should occur by using workload identity // federation. WorkloadIdentityTokenFile indicates the token and // WorkloadIdentityResourceName is the workload identity provider resource // name to authenticate against. // // Alternatively, WorkloadIdentityToken can be set to the token directly. It // is an error to set both WorkloadIdentityTokenFile and // WorkloadIdentityToken. WorkloadIdentityTokenFile string WorkloadIdentityToken string WorkloadIdentityResourceName string // OrganizationID (optional) is the organization unique identifier to launch resources in. OrganizationID string // ProjectID (optional) is the project unique identifier to launch resources in. ProjectID string // SourceChannel denotes the client (channel) that originated the HCP cluster request. // this is synonymous to a user-agent. SourceChannel string }
ClientConfig specifies configuration for the client that interacts with HCP
type ErrorWithCode ¶ added in v0.88.0
ErrorWithCode is an interface wrapping the error interface to also return the response status code.
type WaitFor ¶ added in v0.14.0
type WaitFor = func(ctx context.Context, client *Client, peeringID string, hvnID string, loc *sharedmodels.HashicorpCloudLocationLocation, timeout time.Duration) (*networkmodels.HashicorpCloudNetwork20200907Peering, error)