Documentation
¶
Index ¶
- Constants
- Variables
- func Bool(v bool) *bool
- func Int(v int) *int
- func Int64(v int64) *int64
- func String(v string) *string
- type AccessPolicies
- type AccessPolicy
- type AccessPolicyCreateOptions
- type AccessPolicyList
- type AccessPolicyListOptions
- type AccessPolicyUpdateOptions
- type AccessToken
- type AccessTokenCreateOptions
- type AccessTokenList
- type AccessTokenListOptions
- type AccessTokenUpdateOptions
- type AccessTokens
- type Account
- type AccountUpdateOptions
- type AccountUser
- type AccountUserList
- type AccountUserListOptions
- type AccountUserStatus
- type AccountUsers
- type Accounts
- type Agent
- type AgentPool
- type AgentPoolCreateOptions
- type AgentPoolList
- type AgentPoolListOptions
- type AgentPoolTokens
- type AgentPoolUpdateOptions
- type AgentPools
- type Apply
- type AssumeServiceAccountPolicies
- type AssumeServiceAccountPoliciesList
- type AssumeServiceAccountPoliciesListOptions
- type AssumeServiceAccountPolicy
- type AssumeServiceAccountPolicyCreateOptions
- type AssumeServiceAccountPolicyFilter
- type AssumeServiceAccountPolicyUpdateOptions
- type AuthType
- type CategoryType
- type ClaimCondition
- type Client
- type Config
- type ConfigurationStatus
- type ConfigurationVersion
- type ConfigurationVersionCreateOptions
- type ConfigurationVersions
- type CostEstimate
- type Downstream
- type Environment
- type EnvironmentCreateOptions
- type EnvironmentFilter
- type EnvironmentHook
- type EnvironmentHookCreateOptions
- type EnvironmentHookList
- type EnvironmentHookListOptions
- type EnvironmentHookUpdateOptions
- type EnvironmentHooks
- type EnvironmentList
- type EnvironmentListOptions
- type EnvironmentStatus
- type EnvironmentTags
- type EnvironmentUpdateOptions
- type EnvironmentUpdateOptionsDefaultProviderConfigurationOnly
- type Environments
- type EventBridgeIntegration
- type EventBridgeIntegrationCreateOptions
- type EventBridgeIntegrationList
- type EventBridgeIntegrationListOptions
- type EventBridgeIntegrationUpdateOptions
- type EventBridgeIntegrations
- type EventDefinition
- type Hook
- type HookCreateOptions
- type HookList
- type HookListOptions
- type HookUpdateOptions
- type HookVcsRepo
- type Hooks
- type HooksOptions
- type IdentityProvider
- type InfracostIntegration
- type InfracostIntegrationCreateOptions
- type InfracostIntegrationList
- type InfracostIntegrationListOptions
- type InfracostIntegrationUpdateOptions
- type InfracostIntegrations
- type IntegrationStatus
- type ListOptions
- type Module
- type ModuleCreateOptions
- type ModuleList
- type ModuleListOptions
- type ModuleStatus
- type ModuleVCSRepo
- type ModuleVersion
- type ModuleVersionList
- type ModuleVersionListOptions
- type ModuleVersionStatus
- type ModuleVersions
- type Modules
- type OAuth
- type Organization
- type Output
- type Pagination
- type Permission
- type Plan
- type Policy
- type PolicyCheck
- type PolicyEnforcementLevel
- type PolicyGroup
- type PolicyGroupCreateOptions
- type PolicyGroupEnvironment
- type PolicyGroupEnvironmentDeleteOptions
- type PolicyGroupEnvironments
- type PolicyGroupEnvironmentsCreateOptions
- type PolicyGroupEnvironmentsUpdateOptions
- type PolicyGroupList
- type PolicyGroupListOptions
- type PolicyGroupStatus
- type PolicyGroupUpdateOptions
- type PolicyGroupVCSRepo
- type PolicyGroupVCSRepoOptions
- type PolicyGroups
- type ProviderConfiguration
- type ProviderConfigurationCreateOptions
- type ProviderConfigurationFilter
- type ProviderConfigurationLink
- type ProviderConfigurationLinkCreateOptions
- type ProviderConfigurationLinkUpdateOptions
- type ProviderConfigurationLinks
- type ProviderConfigurationLinksList
- type ProviderConfigurationLinksListOptions
- type ProviderConfigurationParameter
- type ProviderConfigurationParameterCreateOptions
- type ProviderConfigurationParameterUpdateOptions
- type ProviderConfigurationParameters
- type ProviderConfigurationParametersList
- type ProviderConfigurationParametersListOptions
- type ProviderConfigurationUpdateOptions
- type ProviderConfigurations
- type ProviderConfigurationsList
- type ProviderConfigurationsListOptions
- type RemoteStateConsumers
- type RemoteStateConsumersList
- type ResourceNotFoundError
- type RetryLogHook
- type Role
- type RoleCreateOptions
- type RoleList
- type RoleListOptions
- type RoleUpdateOptions
- type Roles
- type Run
- type RunCreateOptions
- type RunScheduleRule
- type RunScheduleRuleCreateOptions
- type RunScheduleRuleListOptions
- type RunScheduleRuleUpdateOptions
- type RunScheduleRules
- type RunScheduleRulesList
- type RunSource
- type RunStatus
- type RunTrigger
- type RunTriggerCreateOptions
- type RunTriggers
- type Runs
- type SSHKey
- type SSHKeyCreateOptions
- type SSHKeyFilter
- type SSHKeyUpdateOptions
- type SSHKeys
- type SSHKeysLink
- type SSHKeysLinkCreateOptions
- type SSHKeysLinks
- type SSHKeysList
- type SSHKeysListOptions
- type ScheduleMode
- type ServiceAccount
- type ServiceAccountCreateOptions
- type ServiceAccountList
- type ServiceAccountListOptions
- type ServiceAccountStatus
- type ServiceAccountTokens
- type ServiceAccountUpdateOptions
- type ServiceAccounts
- type SlackConnection
- type SlackIntegration
- type SlackIntegrationCreateOptions
- type SlackIntegrationFilter
- type SlackIntegrationList
- type SlackIntegrationListOptions
- type SlackIntegrationUpdateOptions
- type SlackIntegrations
- type Tag
- type TagCreateOptions
- type TagList
- type TagListOptions
- type TagRelation
- type TagUpdateOptions
- type Tags
- type Team
- type TeamCreateOptions
- type TeamList
- type TeamListOptions
- type TeamUpdateOptions
- type Teams
- type Upstream
- type User
- type UserList
- type UserListOptions
- type UserStatus
- type Users
- type Variable
- type VariableCreateOptions
- type VariableFilter
- type VariableList
- type VariableListOptions
- type VariableUpdateOptions
- type VariableWriteQueryOptions
- type Variables
- type VcsProvider
- type VcsProviderCreateOptions
- type VcsProviderUpdateOptions
- type VcsProviders
- type VcsProvidersList
- type VcsProvidersListOptions
- type VcsRevision
- type VcsRevisions
- type VcsType
- type WebhookHeader
- type WebhookIntegration
- type WebhookIntegrationCreateOptions
- type WebhookIntegrationList
- type WebhookIntegrationListOptions
- type WebhookIntegrationUpdateOptions
- type WebhookIntegrations
- type WorkloadIdentityProvider
- type WorkloadIdentityProviderCreateOptions
- type WorkloadIdentityProviderFilter
- type WorkloadIdentityProviderUpdateOptions
- type WorkloadIdentityProviders
- type WorkloadIdentityProvidersList
- type WorkloadIdentityProvidersListOptions
- type Workspace
- type WorkspaceActions
- type WorkspaceAutoQueueRuns
- type WorkspaceCreateOptions
- type WorkspaceEnvironmentType
- type WorkspaceExecutionMode
- type WorkspaceFilter
- type WorkspaceHooks
- type WorkspaceIaCPlatform
- type WorkspaceList
- type WorkspaceListOptions
- type WorkspacePermissions
- type WorkspaceRelation
- type WorkspaceRunScheduleOptions
- type WorkspaceTags
- type WorkspaceTerragrunt
- type WorkspaceTerragruntOptions
- type WorkspaceUpdateOptions
- type WorkspaceVCSRepo
- type WorkspaceVCSRepoOptions
- type Workspaces
Constants ¶
const ( PolicyEnforcementLevelHard = "hard-mandatory" PolicyEnforcementLevelSoft = "soft-mandatory" PolicyEnforcementLevelAdvisory = "advisory" )
List of available policy enforcement levels.
const ( // DefaultAddress of Scalr. DefaultAddress = "https://scalr.io" // DefaultBasePath on which the API is served. DefaultBasePath = "/api/iacp/v3/" )
const ( SlackIntegrationEventRunApprovalRequired string = "run_approval_required" SlackIntegrationEventRunSuccess string = "run_success" SlackIntegrationEventRunErrored string = "run_errored" )
Variables ¶
var ( // ErrWorkspaceLocked is returned when trying to lock a // locked workspace. ErrWorkspaceLocked = errors.New("workspace already locked") // ErrWorkspaceNotLocked is returned when trying to unlock // a unlocked workspace. ErrWorkspaceNotLocked = errors.New("workspace already unlocked") ErrUnauthorized = errors.New("unauthorized") ErrResourceNotFound = errors.New("resource not found") )
Functions ¶
Types ¶
type AccessPolicies ¶
type AccessPolicies interface { List(ctx context.Context, options AccessPolicyListOptions) (*AccessPolicyList, error) Read(ctx context.Context, accessPolicyID string) (*AccessPolicy, error) Create(ctx context.Context, options AccessPolicyCreateOptions) (*AccessPolicy, error) Update(ctx context.Context, accessPolicyID string, options AccessPolicyUpdateOptions) (*AccessPolicy, error) Delete(ctx context.Context, accessPolicyID string) error }
AccessPolicies describes all the accessPolicy related methods that the Scalr IACP API supports.
type AccessPolicy ¶
type AccessPolicy struct { ID string `jsonapi:"primary,access-policies"` IsSystem bool `jsonapi:"attr,is-system"` Roles []*Role `jsonapi:"relation,roles"` User *User `jsonapi:"relation,user,omitempty"` Team *Team `jsonapi:"relation,team,omitempty"` ServiceAccount *ServiceAccount `jsonapi:"relation,service-account,omitempty"` Account *Account `jsonapi:"relation,account,omitempty"` Environment *Environment `jsonapi:"relation,environment,omitempty"` Workspace *Workspace `jsonapi:"relation,workspace,omitempty"` }
AccessPolicy represents a Scalr accessPolicy.
type AccessPolicyCreateOptions ¶
type AccessPolicyCreateOptions struct { ID string `jsonapi:"primary,access-policies"` // Relations Roles []*Role `jsonapi:"relation,roles"` // The subject of access policy, one of this fields must be filled User *User `jsonapi:"relation,user,omitempty"` Team *Team `jsonapi:"relation,team,omitempty"` ServiceAccount *ServiceAccount `jsonapi:"relation,service-account,omitempty"` // Scope Account *Account `jsonapi:"relation,account,omitempty"` Environment *Environment `jsonapi:"relation,environment,omitempty"` Workspace *Workspace `jsonapi:"relation,workspace,omitempty"` }
AccessPolicyCreateOptions represents the options for creating a new AccessPolicy.
type AccessPolicyList ¶
type AccessPolicyList struct { *Pagination Items []*AccessPolicy }
AccessPolicyList represents a list of accessPolicies.
type AccessPolicyListOptions ¶
type AccessPolicyListOptions struct { ListOptions Environment *string `url:"filter[environment],omitempty"` Account *string `url:"filter[account],omitempty"` Workspace *string `url:"filter[workspace],omitempty"` User *string `url:"filter[user],omitempty"` ServiceAccount *string `url:"filter[service-account],omitempty"` Team *string `url:"filter[team],omitempty"` Include string `url:"include,omitempty"` }
AccessPolicyListOptions represents the options for listing access policies.
type AccessPolicyUpdateOptions ¶
type AccessPolicyUpdateOptions struct { // For internal use only! ID string `jsonapi:"primary,access-policies"` Roles []*Role `jsonapi:"relation,roles"` }
AccessPolicyUpdateOptions represents the options for updating an accessPolicy.
type AccessToken ¶
type AccessToken struct { ID string `jsonapi:"primary,access-tokens"` CreatedAt time.Time `jsonapi:"attr,created-at,iso8601"` Description string `jsonapi:"attr,description"` Token string `jsonapi:"attr,token"` }
AccessToken represents a Scalr access token.
type AccessTokenCreateOptions ¶
type AccessTokenCreateOptions struct { // For internal use only! ID string `jsonapi:"primary,access-tokens"` Description *string `jsonapi:"attr,description,omitempty"` }
AccessTokenCreateOptions represents the options for creating a new AccessToken.
type AccessTokenList ¶
type AccessTokenList struct { *Pagination Items []*AccessToken }
AccessTokenList represents a list of access tokens.
type AccessTokenListOptions ¶
type AccessTokenListOptions struct {
ListOptions
}
AccessTokenListOptions represents the options for listing access tokens.
type AccessTokenUpdateOptions ¶
type AccessTokenUpdateOptions struct { // For internal use only! ID string `jsonapi:"primary,access-tokens"` Description *string `jsonapi:"attr,description,omitempty"` }
AccessTokenUpdateOptions represents the options for updating an AccessToken.
type AccessTokens ¶
type AccessTokens interface { Read(ctx context.Context, accessTokenID string) (*AccessToken, error) Update(ctx context.Context, accessTokenID string, options AccessTokenUpdateOptions) (*AccessToken, error) Delete(ctx context.Context, accessTokenID string) error }
AccessTokens describes all the access token related methods that the Scalr IACP API supports.
type Account ¶
type Account struct { ID string `jsonapi:"primary,accounts"` Name string `jsonapi:"attr,name"` AllowedIPs []string `jsonapi:"attr,allowed-ips"` }
Account represents a Scalr IACP account.
type AccountUpdateOptions ¶
type AccountUser ¶
type AccountUser struct { ID string `jsonapi:"primary,account-users"` Status AccountUserStatus `jsonapi:"attr,status"` // Relations Account *Account `jsonapi:"relation,account"` User *User `jsonapi:"relation,user"` Teams []*Team `jsonapi:"relation,teams"` }
AccountUser represents a Scalr account user.
type AccountUserList ¶
type AccountUserList struct { *Pagination Items []*AccountUser }
AccountUserList represents a list of account users.
type AccountUserListOptions ¶
type AccountUserListOptions struct { Account *string `url:"filter[account],omitempty"` User *string `url:"filter[user],omitempty"` Query *string `url:"query,omitempty"` Sort *string `url:"sort,omitempty"` Include *string `url:"include,omitempty"` }
AccountUserListOptions represents the options for listing account users.
type AccountUserStatus ¶
type AccountUserStatus string
AccountUserStatus represents a status of account user relation.
const ( AccountUserStatusActive AccountUserStatus = "Active" AccountUserStatusInactive AccountUserStatus = "Inactive" AccountUserStatusPending AccountUserStatus = "Pending" )
List of available account user statuses.
type AccountUsers ¶
type AccountUsers interface {
List(ctx context.Context, options AccountUserListOptions) (*AccountUserList, error)
}
AccountUsers describes all the account user related methods that the Scalr IACP API supports.
type Accounts ¶
type Accounts interface { Read(ctx context.Context, account string) (*Account, error) Update(ctx context.Context, account string, options AccountUpdateOptions) (*Account, error) }
Accounts describes methods for updating and reading account that the Scalr IACP API supports.
type AgentPool ¶
type AgentPool struct { ID string `jsonapi:"primary,agent-pools"` Name string `jsonapi:"attr,name"` VcsEnabled bool `jsonapi:"attr,vcs-enabled"` // The agent pool's scope Account *Account `jsonapi:"relation,account"` Environment *Environment `jsonapi:"relation,environment"` // Workspaces this pool is connected to Workspaces []*Workspace `jsonapi:"relation,workspaces"` // Connected agents Agents []*Agent `jsonapi:"relation,agents"` }
AgentPool represents a Scalr agent pool.
type AgentPoolCreateOptions ¶
type AgentPoolCreateOptions struct { ID string `jsonapi:"primary,agent-pools"` Name *string `jsonapi:"attr,name"` VcsEnabled *bool `jsonapi:"attr,vcs-enabled,omitempty"` // The agent pool's scope Account *Account `jsonapi:"relation,account"` Environment *Environment `jsonapi:"relation,environment,omitempty"` // Workspaces this pool is connected to Workspaces []*Workspace `jsonapi:"relation,workspaces,omitempty"` }
AgentPoolCreateOptions represents the options for creating a new AgentPool.
type AgentPoolList ¶
type AgentPoolList struct { *Pagination Items []*AgentPool }
AgentPoolList represents a list of agent pools.
type AgentPoolListOptions ¶
type AgentPoolListOptions struct { ListOptions Account *string `url:"filter[account],omitempty"` Environment *string `url:"filter[environment],omitempty"` Name string `url:"filter[name],omitempty"` AgentPool string `url:"filter[agent-pool],omitempty"` VcsEnabled *bool `url:"filter[vcs-enabled],omitempty"` Include string `url:"include,omitempty"` }
AgentPoolListOptions represents the options for listing agent pools.
type AgentPoolTokens ¶
type AgentPoolTokens interface { List(ctx context.Context, agentPoolID string, options AccessTokenListOptions) (*AccessTokenList, error) Create(ctx context.Context, agentPoolID string, options AccessTokenCreateOptions) (*AccessToken, error) }
AgentPoolTokens describes all the access token related methods that the Scalr IACP API supports.
type AgentPoolUpdateOptions ¶
type AgentPoolUpdateOptions struct { ID string `jsonapi:"primary,agent-pools"` Name *string `jsonapi:"attr,name,omitempty"` // Workspaces this pool is connected to Workspaces []*Workspace `jsonapi:"relation,workspaces"` }
AgentPoolUpdateOptions represents the options for updating an agent pool.
type AgentPools ¶
type AgentPools interface { List(ctx context.Context, options AgentPoolListOptions) (*AgentPoolList, error) Read(ctx context.Context, agentPoolID string) (*AgentPool, error) Create(ctx context.Context, options AgentPoolCreateOptions) (*AgentPool, error) Update(ctx context.Context, agentPoolID string, options AgentPoolUpdateOptions) (*AgentPool, error) Delete(ctx context.Context, agentPoolID string) error }
AgentPools describes all the Agent Pool related methods that the Scalr IACP API supports.
type Apply ¶
type Apply struct {
ID string `jsonapi:"primary,applies"`
}
Apply represents a Scalr apply.
type AssumeServiceAccountPolicies ¶
type AssumeServiceAccountPolicies interface { List(ctx context.Context, options AssumeServiceAccountPoliciesListOptions) (*AssumeServiceAccountPoliciesList, error) Create(ctx context.Context, serviceAccountID string, options AssumeServiceAccountPolicyCreateOptions) (*AssumeServiceAccountPolicy, error) Read(ctx context.Context, serviceAccountID, policyID string) (*AssumeServiceAccountPolicy, error) Update(ctx context.Context, serviceAccountID, policyID string, options AssumeServiceAccountPolicyUpdateOptions) (*AssumeServiceAccountPolicy, error) Delete(ctx context.Context, serviceAccountID, policyID string) error }
type AssumeServiceAccountPoliciesList ¶
type AssumeServiceAccountPoliciesList struct { *Pagination Items []*AssumeServiceAccountPolicy }
type AssumeServiceAccountPoliciesListOptions ¶
type AssumeServiceAccountPoliciesListOptions struct { ListOptions Query *string `url:"query,omitempty"` Filter *AssumeServiceAccountPolicyFilter `url:"filter,omitempty"` }
type AssumeServiceAccountPolicy ¶
type AssumeServiceAccountPolicy struct { ID string `jsonapi:"primary,assume-service-account-policies"` Name string `jsonapi:"attr,name"` Provider *WorkloadIdentityProvider `jsonapi:"relation,provider"` ServiceAccount *ServiceAccount `jsonapi:"relation,service-account"` MaximumSessionDuration int `jsonapi:"attr,maximum-session-duration"` ClaimConditions []ClaimCondition `jsonapi:"attr,claim-conditions"` CreatedAt string `jsonapi:"attr,created-at"` CreatedByEmail *string `jsonapi:"attr,created-by-email"` }
type AssumeServiceAccountPolicyCreateOptions ¶
type AssumeServiceAccountPolicyCreateOptions struct { ID string `jsonapi:"primary,assume-service-account-policies"` Name *string `jsonapi:"attr,name"` Provider *WorkloadIdentityProvider `jsonapi:"relation,provider"` MaximumSessionDuration *int `jsonapi:"attr,maximum-session-duration,omitempty"` ClaimConditions []ClaimCondition `jsonapi:"attr,claim-conditions"` }
type AssumeServiceAccountPolicyUpdateOptions ¶
type AssumeServiceAccountPolicyUpdateOptions struct { ID string `jsonapi:"primary,assume-service-account-policies"` Name *string `jsonapi:"attr,name,omitempty"` MaximumSessionDuration *int `jsonapi:"attr,maximum-session-duration,omitempty"` ClaimConditions *[]ClaimCondition `jsonapi:"attr,claim-conditions,omitempty"` }
type AuthType ¶
type AuthType string
AuthType represents the authorization type used in VCS provider.
type CategoryType ¶
type CategoryType string
CategoryType represents a category type.
const ( CategoryEnv CategoryType = "env" CategoryTerraform CategoryType = "terraform" CategoryShell CategoryType = "shell" )
List all available categories.
func Category ¶
func Category(v CategoryType) *CategoryType
Category returns a pointer to the given category type.
type ClaimCondition ¶
type Client ¶
type Client struct { AccessPolicies AccessPolicies AccessTokens AccessTokens AccountUsers AccountUsers Accounts Accounts AgentPoolTokens AgentPoolTokens AgentPools AgentPools AssumeServiceAccountPolicies AssumeServiceAccountPolicies EventBridgeIntegrations EventBridgeIntegrations InfracostIntegrations InfracostIntegrations ConfigurationVersions ConfigurationVersions EnvironmentTags EnvironmentTags Environments Environments Hooks Hooks EnvironmentHooks EnvironmentHooks ModuleVersions ModuleVersions Modules Modules PolicyGroupEnvironments PolicyGroupEnvironments PolicyGroups PolicyGroups ProviderConfigurationLinks ProviderConfigurationLinks ProviderConfigurationParameters ProviderConfigurationParameters ProviderConfigurations ProviderConfigurations Roles Roles RunTriggers RunTriggers Runs Runs ServiceAccountTokens ServiceAccountTokens ServiceAccounts ServiceAccounts SlackIntegrations SlackIntegrations Tags Tags Teams Teams Users Users Variables Variables VcsProviders VcsProviders VcsRevisions VcsRevisions WebhookIntegrations WebhookIntegrations WorkloadIdentityProviders WorkloadIdentityProviders WorkspaceTags WorkspaceTags Workspaces Workspaces RunScheduleRules RunScheduleRules SSHKeys SSHKeys SSHKeysLinks SSHKeysLinks RemoteStateConsumers RemoteStateConsumers // contains filtered or unexported fields }
Client is the Scalr API client. It provides the basic connectivity and configuration for accessing the Scalr API.
func (*Client) RetryServerErrors ¶
RetryServerErrors configures the retry HTTP check to also retry unexpected errors or requests that failed with a server error.
type Config ¶
type Config struct { // The address of the Scalr API. Address string // The base path on which the API is served. BasePath string // API token used to access the Scalr API. Token string // Headers that will be added to every request. Headers http.Header // A custom HTTP client to use. HTTPClient *http.Client // RetryLogHook is invoked each time a request is retried. RetryLogHook RetryLogHook }
Config provides configuration details to the API client.
type ConfigurationStatus ¶
type ConfigurationStatus string
ConfigurationStatus represents a configuration version status.
const ( ConfigurationErrored ConfigurationStatus = "errored" ConfigurationPending ConfigurationStatus = "pending" ConfigurationUploaded ConfigurationStatus = "uploaded" )
List all available configuration version statuses.
type ConfigurationVersion ¶
type ConfigurationVersion struct { ID string `jsonapi:"primary,configuration-versions"` Status ConfigurationStatus `jsonapi:"attr,status"` // Relations Workspace *Workspace `jsonapi:"relation,workspace"` }
ConfigurationVersion is a representation of an uploaded or ingressed Terraform configuration in Scalr. A workspace must have at least one configuration version before any runs may be queued on it.
type ConfigurationVersionCreateOptions ¶
type ConfigurationVersionCreateOptions struct { // For internal use only! ID string `jsonapi:"primary,configuration-versions"` Workspace *Workspace `jsonapi:"relation,workspace"` }
ConfigurationVersionCreateOptions represents the options for creating a configuration version.
type ConfigurationVersions ¶
type ConfigurationVersions interface { // Create is used to create a new configuration version. The created // configuration version will be usable once data is uploaded to it. Create(ctx context.Context, options ConfigurationVersionCreateOptions) (*ConfigurationVersion, error) // Read a configuration version by its ID. Read(ctx context.Context, cvID string) (*ConfigurationVersion, error) }
ConfigurationVersions describes all the configuration version related methods that the Scalr API supports.
type CostEstimate ¶
type CostEstimate struct {
ID string `jsonapi:"primary,cost-estimates"`
}
CostEstimate represents a Scalr costEstimate.
type Downstream ¶
type Downstream struct {
ID string `jsonapi:"primary,workspaces"`
}
type Environment ¶
type Environment struct { ID string `jsonapi:"primary,environments"` Name string `jsonapi:"attr,name"` CreatedAt time.Time `jsonapi:"attr,created-at,iso8601"` Status EnvironmentStatus `jsonapi:"attr,status"` RemoteBackend bool `jsonapi:"attr,remote-backend"` MaskSensitiveOutput bool `jsonapi:"attr,mask-sensitive-output"` // Relations Account *Account `jsonapi:"relation,account"` PolicyGroups []*PolicyGroup `jsonapi:"relation,policy-groups"` DefaultProviderConfigurations []*ProviderConfiguration `jsonapi:"relation,default-provider-configurations"` ProviderConfigurations []*ProviderConfiguration `jsonapi:"relation,provider-configurations"` CreatedBy *User `jsonapi:"relation,created-by"` Tags []*Tag `jsonapi:"relation,tags"` }
Environment represents a Scalr environment.
type EnvironmentCreateOptions ¶
type EnvironmentCreateOptions struct { ID string `jsonapi:"primary,environments"` Name *string `jsonapi:"attr,name"` RemoteBackend *bool `jsonapi:"attr,remote-backend,omitempty"` MaskSensitiveOutput *bool `jsonapi:"attr,mask-sensitive-output,omitempty"` // Relations Account *Account `jsonapi:"relation,account"` DefaultProviderConfigurations []*ProviderConfiguration `jsonapi:"relation,default-provider-configurations,omitempty"` // Specifies tags assigned to the environment Tags []*Tag `jsonapi:"relation,tags,omitempty"` }
EnvironmentCreateOptions represents the options for creating a new Environment.
type EnvironmentFilter ¶
type EnvironmentFilter struct { Id *string `url:"environment,omitempty"` Account *string `url:"account,omitempty"` Name *string `url:"name,omitempty"` Tag *string `url:"tag,omitempty"` }
EnvironmentFilter represents the options for filtering environments.
type EnvironmentHook ¶
type EnvironmentHook struct { ID string `jsonapi:"primary,hook-environment-links"` Events []string `jsonapi:"attr,events"` // Relations Environment *Environment `jsonapi:"relation,environment"` Hook *Hook `jsonapi:"relation,hook"` }
EnvironmentHook represents a Scalr environment hook
type EnvironmentHookCreateOptions ¶
type EnvironmentHookCreateOptions struct { ID string `jsonapi:"primary,hook-environment-links"` Events []string `jsonapi:"attr,events"` // Relations Environment *Environment `jsonapi:"relation,environment"` Hook *Hook `jsonapi:"relation,hook"` }
EnvironmentHookCreateOptions represents the options for creating an environment hook
type EnvironmentHookList ¶
type EnvironmentHookList struct { *Pagination Items []*EnvironmentHook }
EnvironmentHookList represents a list of environment hooks
type EnvironmentHookListOptions ¶
type EnvironmentHookListOptions struct { ListOptions Environment *string `url:"filter[environment],omitempty"` Events *string `url:"filter[events],omitempty"` Query *string `url:"query,omitempty"` Sort *string `url:"sort,omitempty"` Include *string `url:"include,omitempty"` }
EnvironmentHookListOptions represents the options for listing environment hooks
type EnvironmentHookUpdateOptions ¶
type EnvironmentHookUpdateOptions struct { ID string `jsonapi:"primary,hook-environment-links"` Events *[]string `jsonapi:"attr,events,omitempty"` }
EnvironmentHookUpdateOptions represents the options for updating an environment hook
type EnvironmentHooks ¶
type EnvironmentHooks interface { List(ctx context.Context, options EnvironmentHookListOptions) (*EnvironmentHookList, error) Create(ctx context.Context, options EnvironmentHookCreateOptions) (*EnvironmentHook, error) Read(ctx context.Context, id string) (*EnvironmentHook, error) Update(ctx context.Context, id string, options EnvironmentHookUpdateOptions) (*EnvironmentHook, error) Delete(ctx context.Context, id string) error }
EnvironmentHooks interface for environment hook related operations
type EnvironmentList ¶
type EnvironmentList struct { *Pagination Items []*Environment }
EnvironmentList represents a list of environments.
type EnvironmentListOptions ¶
type EnvironmentListOptions struct { ListOptions Include *string `url:"include,omitempty"` Filter *EnvironmentFilter `url:"filter,omitempty"` }
type EnvironmentStatus ¶
type EnvironmentStatus string
EnvironmentStatus represents an environment status.
const ( EnvironmentStatusActive EnvironmentStatus = "Active" EnvironmentStatusInactive EnvironmentStatus = "Inactive" )
List of available environment statuses.
type EnvironmentTags ¶
type EnvironmentTags interface { Add(ctx context.Context, envID string, tags []*TagRelation) error Replace(ctx context.Context, envID string, tags []*TagRelation) error Delete(ctx context.Context, envID string, tags []*TagRelation) error }
EnvironmentTags describes all the environment tags related methods that the Scalr API supports.
type EnvironmentUpdateOptions ¶
type EnvironmentUpdateOptions struct { // For internal use only! ID string `jsonapi:"primary,environments"` Name *string `jsonapi:"attr,name,omitempty"` MaskSensitiveOutput *bool `jsonapi:"attr,mask-sensitive-output,omitempty"` // Relations DefaultProviderConfigurations []*ProviderConfiguration `jsonapi:"relation,default-provider-configurations"` }
EnvironmentUpdateOptions represents the options for updating an environment.
type EnvironmentUpdateOptionsDefaultProviderConfigurationOnly ¶
type EnvironmentUpdateOptionsDefaultProviderConfigurationOnly struct { ID string `jsonapi:"primary,environments"` // Relations DefaultProviderConfigurations []*ProviderConfiguration `jsonapi:"relation,default-provider-configurations"` }
type Environments ¶
type Environments interface { List(ctx context.Context, options EnvironmentListOptions) (*EnvironmentList, error) Read(ctx context.Context, environmentID string) (*Environment, error) Create(ctx context.Context, options EnvironmentCreateOptions) (*Environment, error) Update(ctx context.Context, environmentID string, options EnvironmentUpdateOptions) (*Environment, error) UpdateDefaultProviderConfigurationOnly(ctx context.Context, environmentID string, options EnvironmentUpdateOptionsDefaultProviderConfigurationOnly) (*Environment, error) Delete(ctx context.Context, environmentID string) error }
Environments describes all the environment related methods that the Scalr IACP API supports.
type EventBridgeIntegration ¶
type EventBridgeIntegration struct { ID string `jsonapi:"primary,aws-event-bridge-integrations"` Name string `jsonapi:"attr,name"` Status IntegrationStatus `jsonapi:"attr,status"` EventSource string `jsonapi:"attr,event-source"` EventSourceARN string `jsonapi:"attr,event-source-arn"` AWSAccountId string `jsonapi:"attr,aws-account-id"` Region string `jsonapi:"attr,region"` // Relations Account *Account `jsonapi:"relation,account"` }
EventBridgeIntegration represents a Scalr IACP eventBridge integration.
type EventBridgeIntegrationList ¶
type EventBridgeIntegrationList struct { *Pagination Items []*EventBridgeIntegration }
type EventBridgeIntegrationListOptions ¶
type EventBridgeIntegrationListOptions struct { ListOptions Name *string `url:"filter[name],omitempty"` }
type EventBridgeIntegrationUpdateOptions ¶
type EventBridgeIntegrationUpdateOptions struct { ID string `jsonapi:"primary,aws-event-bridge-integrations"` Status IntegrationStatus `jsonapi:"attr,status"` }
type EventBridgeIntegrations ¶
type EventBridgeIntegrations interface { List(ctx context.Context, options EventBridgeIntegrationListOptions) (*EventBridgeIntegrationList, error) Create(ctx context.Context, options EventBridgeIntegrationCreateOptions) (*EventBridgeIntegration, error) Read(ctx context.Context, id string) (*EventBridgeIntegration, error) Update(ctx context.Context, id string, options EventBridgeIntegrationUpdateOptions) (*EventBridgeIntegration, error) Delete(ctx context.Context, id string) error }
type EventDefinition ¶
type EventDefinition struct {
ID string `jsonapi:"primary,event-definitions"`
}
type Hook ¶
type Hook struct { ID string `jsonapi:"primary,hooks"` Name string `jsonapi:"attr,name"` Description string `jsonapi:"attr,description"` Interpreter string `jsonapi:"attr,interpreter"` ScriptfilePath string `jsonapi:"attr,scriptfile-path"` VcsRepo *HookVcsRepo `jsonapi:"attr,vcs-repo"` // Relations VcsProvider *VcsProvider `jsonapi:"relation,vcs-provider"` }
Hook represents a Scalr hook
type HookCreateOptions ¶
type HookCreateOptions struct { ID string `jsonapi:"primary,hooks"` Name string `jsonapi:"attr,name"` Description *string `jsonapi:"attr,description,omitempty"` Interpreter string `jsonapi:"attr,interpreter"` ScriptfilePath string `jsonapi:"attr,scriptfile-path"` VcsRepo *HookVcsRepo `jsonapi:"attr,vcs-repo"` // Relations VcsProvider *VcsProvider `jsonapi:"relation,vcs-provider"` }
HookCreateOptions represents the options for creating a hook
type HookList ¶
type HookList struct { *Pagination Items []*Hook }
HookList represents a list of hooks
type HookListOptions ¶
type HookListOptions struct { ListOptions Hook *string `url:"filter[hook],omitempty"` Name string `url:"filter[name],omitempty"` Query string `url:"query,omitempty"` Sort string `url:"sort,omitempty"` Include string `url:"include,omitempty"` }
HookListOptions represents the options for listing hooks
type HookUpdateOptions ¶
type HookUpdateOptions struct { ID string `jsonapi:"primary,hooks"` Name *string `jsonapi:"attr,name,omitempty"` Description *string `jsonapi:"attr,description,omitempty"` Interpreter *string `jsonapi:"attr,interpreter,omitempty"` ScriptfilePath *string `jsonapi:"attr,scriptfile-path,omitempty"` VcsRepo *HookVcsRepo `jsonapi:"attr,vcs-repo,omitempty"` // Relations VcsProvider *VcsProvider `jsonapi:"relation,vcs-provider,omitempty"` }
HookUpdateOptions represents the options for updating a hook
type HookVcsRepo ¶
type HookVcsRepo struct { Identifier string `json:"identifier"` Branch string `json:"branch,omitempty"` }
HookVcsRepo represents a repository in a VCS provider
type Hooks ¶
type Hooks interface { List(ctx context.Context, options HookListOptions) (*HookList, error) Create(ctx context.Context, options HookCreateOptions) (*Hook, error) Read(ctx context.Context, id string) (*Hook, error) Update(ctx context.Context, id string, options HookUpdateOptions) (*Hook, error) Delete(ctx context.Context, id string) error }
Hooks describes all the hook related methods that the Scalr API supports
type HooksOptions ¶
type HooksOptions struct { PreInit *string `json:"pre-init,omitempty"` PrePlan *string `json:"pre-plan,omitempty"` PostPlan *string `json:"post-plan,omitempty"` PreApply *string `json:"pre-apply,omitempty"` PostApply *string `json:"post-apply,omitempty"` }
HooksOptions represents the WorkspaceHooks configuration.
type IdentityProvider ¶
type IdentityProvider struct {
ID string `jsonapi:"primary,identity-providers"`
}
IdentityProvider represents a Scalr identity provider.
type InfracostIntegration ¶
type InfracostIntegration struct { ID string `jsonapi:"primary,infracost-integration"` Name string `jsonapi:"attr,name"` Status IntegrationStatus `jsonapi:"attr,status"` ApiKey string `jsonapi:"attr,api-key"` ErrMessage string `jsonapi:"attr,err-message,omitempty"` // Relations Environments []*Environment `jsonapi:"relation,environments"` }
InfracostIntegration represents a Scalr IACP Infracost integration.
type InfracostIntegrationCreateOptions ¶
type InfracostIntegrationCreateOptions struct { ID string `jsonapi:"primary,infracost-integration"` Name *string `jsonapi:"attr,name"` ApiKey *string `jsonapi:"attr,api-key"` // Relations Environments []*Environment `jsonapi:"relation,environments"` }
type InfracostIntegrationList ¶
type InfracostIntegrationList struct { *Pagination Items []*InfracostIntegration }
type InfracostIntegrationListOptions ¶
type InfracostIntegrationListOptions struct { ListOptions InfracostIntegration *string `url:"filter[infracost-integration],omitempty"` Name *string `url:"filter[name],omitempty"` }
type InfracostIntegrationUpdateOptions ¶
type InfracostIntegrationUpdateOptions struct { ID string `jsonapi:"primary,infracost-integration"` Name *string `jsonapi:"attr,name,omitempty"` ApiKey *string `jsonapi:"attr,api-key,omitempty"` // Relations Environments []*Environment `jsonapi:"relation,environments"` }
type InfracostIntegrations ¶
type InfracostIntegrations interface { List(ctx context.Context, options InfracostIntegrationListOptions) (*InfracostIntegrationList, error) Create(ctx context.Context, options InfracostIntegrationCreateOptions) (*InfracostIntegration, error) Read(ctx context.Context, id string) (*InfracostIntegration, error) Update(ctx context.Context, id string, options InfracostIntegrationUpdateOptions) (*InfracostIntegration, error) Delete(ctx context.Context, id string) error }
type IntegrationStatus ¶
type IntegrationStatus string
const ( IntegrationStatusActive IntegrationStatus = "active" IntegrationStatusDisabled IntegrationStatus = "disabled" IntegrationStatusFailed IntegrationStatus = "failed" )
type ListOptions ¶
type ListOptions struct { // The page number to request. The results vary based on the PageSize. PageNumber int `url:"page[number],omitempty"` // The number of elements returned in a single page. PageSize int `url:"page[size],omitempty"` }
ListOptions is used to specify pagination options when making API requests. Pagination allows breaking up large result sets into chunks, or "pages".
type Module ¶
type Module struct { ID string `jsonapi:"primary,modules"` CreatedAt time.Time `jsonapi:"attr,created-at,iso8601"` Name string `jsonapi:"attr,name"` Provider string `jsonapi:"attr,provider"` Source string `jsonapi:"attr,source"` Description *string `jsonapi:"attr,description,omitempty"` VCSRepo *ModuleVCSRepo `jsonapi:"attr,vcs-repo"` Status ModuleStatus `jsonapi:"attr,status"` // Relation VcsProvider *VcsProvider `jsonapi:"relation,vcs-provider"` Account *Account `jsonapi:"relation,account,omitempty"` Environment *Environment `jsonapi:"relation,environment,omitempty"` CreatedBy *User `jsonapi:"relation,created-by,omitempty"` LatestModuleVersion *ModuleVersion `jsonapi:"relation,latest-module-version,omitempty"` ModuleVersion *ModuleVersion `jsonapi:"relation,module-version,omitempty"` }
type ModuleCreateOptions ¶
type ModuleCreateOptions struct { //// For internal use only! ID string `jsonapi:"primary,modules"` // Settings for the module VCS repository. VCSRepo *ModuleVCSRepo `jsonapi:"attr,vcs-repo"` // Specifies the VcsProvider for module vcs-repo. VcsProvider *VcsProvider `jsonapi:"relation,vcs-provider"` // Specifies the Account for module Account *Account `jsonapi:"relation,account,omitempty"` // Specifies the Environment for module Environment *Environment `jsonapi:"relation,environment,omitempty"` }
type ModuleList ¶
type ModuleList struct { *Pagination Items []*Module }
ModuleList represents a list of module.
type ModuleListOptions ¶
type ModuleListOptions struct { ListOptions Name *string `url:"filter[name],omitempty"` Status *ModuleStatus `url:"filter[status],omitempty"` Source *string `url:"filter[source],omitempty"` Provider *string `url:"filter[provider],omitempty"` Account *string `url:"filter[account],omitempty"` Environment *string `url:"filter[environment],omitempty"` }
ModuleListOptions represents the options for listing modules.
type ModuleStatus ¶
type ModuleStatus string
ModuleStatus represents a module state.
const ( ModuleNoVersionTags ModuleStatus = "no_version_tag" ModulePending ModuleStatus = "pending" ModuleSetupComplete ModuleStatus = "setup_complete" ModuleErrored ModuleStatus = "errored" )
List all available module statuses.
type ModuleVCSRepo ¶
type ModuleVCSRepo struct { Identifier string `json:"identifier"` Path *string `json:"path"` TagPrefix *string `json:"tag-prefix,omitempty"` }
ModuleVCSRepo contains the configuration of a VCS integration.
type ModuleVersion ¶
type ModuleVersion struct { ID string `jsonapi:"primary,module-versions"` IsRootModule bool `jsonapi:"attr,is-root-module"` Status ModuleVersionStatus `jsonapi:"attr,status"` Version string `jsonapi:"attr,version"` }
ModuleVersion represents a Scalr module version.
type ModuleVersionList ¶
type ModuleVersionList struct { *Pagination Items []*ModuleVersion }
ModuleVersionList represents a list of module versions.
type ModuleVersionStatus ¶
type ModuleVersionStatus string
const ( ModuleVersionNotUploaded ModuleVersionStatus = "not_uploaded" ModuleVersionPending ModuleVersionStatus = "pending" ModuleVersionOk ModuleVersionStatus = "ok" ModuleVersionErrored ModuleVersionStatus = "errored" ModuleVersionPendingDelete ModuleVersionStatus = "pending_delete" )
type ModuleVersions ¶
type ModuleVersions interface { // List all the module versions within a module. List(ctx context.Context, options ModuleVersionListOptions) (*ModuleVersionList, error) // Read a module version by its ID. Read(ctx context.Context, moduleVersionID string) (*ModuleVersion, error) }
ModuleVersions describes all the run related methods that the Scalr API supports.
type Modules ¶
type Modules interface { // List all the modules . List(ctx context.Context, options ModuleListOptions) (*ModuleList, error) // Create the module Create(ctx context.Context, options ModuleCreateOptions) (*Module, error) // Read a module by its ID. Read(ctx context.Context, moduleID string) (*Module, error) // ReadBySource Read the module by its Source. ReadBySource(ctx context.Context, moduleSource string) (*Module, error) // Delete a module by its ID. Delete(ctx context.Context, moduleID string) error }
Modules describes all the module related methods that the Scalr API supports.
type Organization ¶
type Organization struct { ID string `jsonapi:"primary,organizations"` Name string `jsonapi:"attr,name"` CostEstimationEnabled bool `jsonapi:"attr,cost-estimation-enabled"` CreatedAt time.Time `jsonapi:"attr,created-at,iso8601"` CreatedBy string `jsonapi:"attr,created-by"` Status EnvironmentStatus `jsonapi:"attr,status"` // Relations Account *Account `jsonapi:"relation,account"` }
Organization is Environment included in Workspace - always prefer Environment
type Pagination ¶
type Pagination struct { CurrentPage int `json:"current-page"` PreviousPage int `json:"prev-page"` NextPage int `json:"next-page"` TotalPages int `json:"total-pages"` TotalCount int `json:"total-count"` }
Pagination is used to return the pagination details of an API request.
type Permission ¶
type Permission struct {
ID string `jsonapi:"primary,permissions,omitempty"`
}
Permission relationship
type Policy ¶
type Policy struct { ID string `jsonapi:"primary,policies"` Name string `jsonapi:"attr,name"` Enabled bool `jsonapi:"attr,enabled"` EnforcementLevel PolicyEnforcementLevel `jsonapi:"attr,enforced-level"` // Relations PolicyGroup *PolicyGroup `jsonapi:"relation,policy-groups"` }
Policy represents a single OPA policy.
type PolicyCheck ¶
type PolicyCheck struct {
ID string `jsonapi:"primary,policy-checks"`
}
PolicyCheck represents a Scalr policy check..
type PolicyEnforcementLevel ¶
type PolicyEnforcementLevel string
PolicyEnforcementLevel represents enforcement level of an OPA policy.
type PolicyGroup ¶
type PolicyGroup struct { ID string `jsonapi:"primary,policy-groups"` Name string `jsonapi:"attr,name"` Status PolicyGroupStatus `jsonapi:"attr,status"` ErrorMessage string `jsonapi:"attr,error-message"` OpaVersion string `jsonapi:"attr,opa-version"` VCSRepo *PolicyGroupVCSRepo `jsonapi:"attr,vcs-repo"` IsEnforced bool `jsonapi:"attr,is-enforced"` CommonFunctionsFolder string `jsonapi:"attr,common-functions-folder"` // Relations Account *Account `jsonapi:"relation,account"` VcsProvider *VcsProvider `jsonapi:"relation,vcs-provider"` VcsRevision *VcsRevision `jsonapi:"relation,vcs-revision"` Policies []*Policy `jsonapi:"relation,policies"` Environments []*Environment `jsonapi:"relation,environments"` }
PolicyGroup represents a Scalr policy group.
type PolicyGroupCreateOptions ¶
type PolicyGroupCreateOptions struct { ID string `jsonapi:"primary,policy-groups"` Name *string `jsonapi:"attr,name"` OpaVersion *string `jsonapi:"attr,opa-version,omitempty"` VCSRepo *PolicyGroupVCSRepoOptions `jsonapi:"attr,vcs-repo"` IsEnforced *bool `jsonapi:"attr,is-enforced,omitempty"` CommonFunctionsFolder *string `jsonapi:"attr,common-functions-folder,omitempty"` // Relations Account *Account `jsonapi:"relation,account"` VcsProvider *VcsProvider `jsonapi:"relation,vcs-provider"` Environments []*Environment `jsonapi:"relation,environments"` }
PolicyGroupCreateOptions represents the options for creating a new PolicyGroup.
type PolicyGroupEnvironment ¶
type PolicyGroupEnvironment struct {
ID string `jsonapi:"primary,environments"`
}
PolicyGroupEnvironment represents a single policy group environment relation.
type PolicyGroupEnvironments ¶
type PolicyGroupEnvironments interface { Create(ctx context.Context, options PolicyGroupEnvironmentsCreateOptions) error Update(ctx context.Context, options PolicyGroupEnvironmentsUpdateOptions) error Delete(ctx context.Context, options PolicyGroupEnvironmentDeleteOptions) error }
PolicyGroupEnvironments describes all the policy group environments related methods that the Scalr API supports.
type PolicyGroupEnvironmentsCreateOptions ¶
type PolicyGroupEnvironmentsCreateOptions struct { PolicyGroupID string PolicyGroupEnvironments []*PolicyGroupEnvironment }
PolicyGroupEnvironmentsCreateOptions represents options for creating new policy group environment linkage
type PolicyGroupEnvironmentsUpdateOptions ¶
type PolicyGroupEnvironmentsUpdateOptions struct { PolicyGroupID string PolicyGroupEnvironments []*PolicyGroupEnvironment }
PolicyGroupEnvironmentsUpdateOptions represents options for updating policy group environment linkage
type PolicyGroupList ¶
type PolicyGroupList struct { *Pagination Items []*PolicyGroup }
PolicyGroupList represents a list of policy groups.
type PolicyGroupListOptions ¶
type PolicyGroupListOptions struct { ListOptions Account string `url:"filter[account],omitempty"` Environment string `url:"filter[environment],omitempty"` Name string `url:"filter[name],omitempty"` PolicyGroup string `url:"filter[policy-group],omitempty"` Query string `url:"query,omitempty"` Sort string `url:"sort,omitempty"` Include string `url:"include,omitempty"` }
PolicyGroupListOptions represents the options for listing policy groups.
type PolicyGroupStatus ¶
type PolicyGroupStatus string
PolicyGroupStatus represents a policy group status.
const ( PolicyGroupStatusFetching PolicyGroupStatus = "fetching" PolicyGroupStatusActive PolicyGroupStatus = "active" PolicyGroupStatusErrored PolicyGroupStatus = "errored" )
List of available policy group statuses.
type PolicyGroupUpdateOptions ¶
type PolicyGroupUpdateOptions struct { ID string `jsonapi:"primary,policy-groups"` Name *string `jsonapi:"attr,name,omitempty"` OpaVersion *string `jsonapi:"attr,opa-version,omitempty"` VCSRepo *PolicyGroupVCSRepoOptions `jsonapi:"attr,vcs-repo,omitempty"` IsEnforced *bool `jsonapi:"attr,is-enforced,omitempty"` CommonFunctionsFolder *string `jsonapi:"attr,common-functions-folder,omitempty"` // Relations VcsProvider *VcsProvider `jsonapi:"relation,vcs-provider,omitempty"` }
PolicyGroupUpdateOptions represents the options for updating a PolicyGroup.
type PolicyGroupVCSRepo ¶
type PolicyGroupVCSRepo struct { Identifier string `json:"identifier"` Branch string `json:"branch"` Path string `json:"path"` }
PolicyGroupVCSRepo contains the configuration of a VCS integration.
type PolicyGroupVCSRepoOptions ¶
type PolicyGroupVCSRepoOptions struct { Identifier *string `json:"identifier"` Branch *string `json:"branch,omitempty"` Path *string `json:"path,omitempty"` }
PolicyGroupVCSRepoOptions contains the configuration options of a VCS integration.
type PolicyGroups ¶
type PolicyGroups interface { List(ctx context.Context, options PolicyGroupListOptions) (*PolicyGroupList, error) Read(ctx context.Context, policyGroupID string) (*PolicyGroup, error) Create(ctx context.Context, options PolicyGroupCreateOptions) (*PolicyGroup, error) Update(ctx context.Context, policyGroupID string, options PolicyGroupUpdateOptions) (*PolicyGroup, error) Delete(ctx context.Context, policyGroupID string) error }
PolicyGroups describes all the policy group related methods that the Scalr API supports.
type ProviderConfiguration ¶
type ProviderConfiguration struct { ID string `jsonapi:"primary,provider-configurations"` Name string `jsonapi:"attr,name"` ProviderName string `jsonapi:"attr,provider-name"` ExportShellVariables bool `jsonapi:"attr,export-shell-variables"` IsCustom bool `jsonapi:"attr,is-custom"` AwsAccessKey string `jsonapi:"attr,aws-access-key"` AwsSecretKey string `jsonapi:"attr,aws-secret-key"` AwsAccountType string `jsonapi:"attr,aws-account-type"` AwsCredentialsType string `jsonapi:"attr,aws-credentials-type"` AwsTrustedEntityType string `jsonapi:"attr,aws-trusted-entity-type"` AwsRoleArn string `jsonapi:"attr,aws-role-arn"` AwsExternalId string `jsonapi:"attr,aws-external-id"` AwsAudience string `jsonapi:"attr,aws-audience"` AzurermClientId string `jsonapi:"attr,azurerm-client-id"` AzurermClientSecret string `jsonapi:"attr,azurerm-client-secret"` AzurermSubscriptionId string `jsonapi:"attr,azurerm-subscription-id"` AzurermTenantId string `jsonapi:"attr,azurerm-tenant-id"` AzurermAuthType string `jsonapi:"attr,azurerm-auth-type"` AzurermAudience string `jsonapi:"attr,azurerm-audience"` GoogleAuthType string `jsonapi:"attr,google-auth-type"` GoogleServiceAccountEmail string `jsonapi:"attr,google-service-account-email"` GoogleWorkloadProviderName string `jsonapi:"attr,google-workload-provider-name"` GoogleProject string `jsonapi:"attr,google-project"` GoogleCredentials string `jsonapi:"attr,google-credentials"` GoogleUseDefaultProject bool `jsonapi:"attr,google-use-default-project"` ScalrHostname string `jsonapi:"attr,scalr-hostname"` ScalrToken string `jsonapi:"attr,scalr-token"` Account *Account `jsonapi:"relation,account"` Parameters []*ProviderConfigurationParameter `jsonapi:"relation,parameters"` Environments []*Environment `jsonapi:"relation,environments"` Owners []*Team `jsonapi:"relation,owners"` }
ProviderConfiguration represents a Scalr provider configuration.
type ProviderConfigurationCreateOptions ¶
type ProviderConfigurationCreateOptions struct { ID string `jsonapi:"primary,provider-configurations"` Name *string `jsonapi:"attr,name"` ProviderName *string `jsonapi:"attr,provider-name"` ExportShellVariables *bool `jsonapi:"attr,export-shell-variables,omitempty"` IsCustom *bool `jsonapi:"attr,is-custom,omitempty"` AwsAccessKey *string `jsonapi:"attr,aws-access-key,omitempty"` AwsSecretKey *string `jsonapi:"attr,aws-secret-key,omitempty"` AwsAccountType *string `jsonapi:"attr,aws-account-type"` AwsCredentialsType *string `jsonapi:"attr,aws-credentials-type"` AwsTrustedEntityType *string `jsonapi:"attr,aws-trusted-entity-type"` AwsAudience *string `jsonapi:"attr,aws-audience"` AwsRoleArn *string `jsonapi:"attr,aws-role-arn"` AwsExternalId *string `jsonapi:"attr,aws-external-id"` AzurermClientId *string `jsonapi:"attr,azurerm-client-id,omitempty"` AzurermClientSecret *string `jsonapi:"attr,azurerm-client-secret,omitempty"` AzurermSubscriptionId *string `jsonapi:"attr,azurerm-subscription-id,omitempty"` AzurermTenantId *string `jsonapi:"attr,azurerm-tenant-id,omitempty"` AzurermAuthType *string `jsonapi:"attr,azurerm-auth-type,omitempty"` AzurermAudience *string `jsonapi:"attr,azurerm-audience,omitempty"` GoogleAuthType *string `jsonapi:"attr,google-auth-type,omitempty"` GoogleServiceAccountEmail *string `jsonapi:"attr,google-service-account-email,omitempty"` GoogleWorkloadProviderName *string `jsonapi:"attr,google-workload-provider-name,omitempty"` GoogleProject *string `jsonapi:"attr,google-project,omitempty"` GoogleCredentials *string `jsonapi:"attr,google-credentials,omitempty"` GoogleUseDefaultProject *bool `jsonapi:"attr,google-use-default-project,omitempty"` ScalrHostname *string `jsonapi:"attr,scalr-hostname,omitempty"` ScalrToken *string `jsonapi:"attr,scalr-token,omitempty"` Account *Account `jsonapi:"relation,account,omitempty"` Environments []*Environment `jsonapi:"relation,environments,omitempty"` Owners []*Team `jsonapi:"relation,owners"` }
ProviderConfigurationCreateOptions represents the options for creating a new provider configuration.
type ProviderConfigurationFilter ¶
type ProviderConfigurationFilter struct { ProviderConfiguration string `url:"provider-configuration,omitempty"` ProviderName string `url:"provider-name,omitempty"` Name string `url:"name,omitempty"` AccountID string `url:"account,omitempty"` }
ProviderConfigurationFilter represents the options for filtering provider configurations.
type ProviderConfigurationLink ¶
type ProviderConfigurationLink struct { ID string `jsonapi:"primary,provider-configuration-links"` Default bool `jsonapi:"attr,default"` Alias string `jsonapi:"attr,alias"` ProviderConfiguration *ProviderConfiguration `jsonapi:"relation,provider-configuration,omitempty"` Environment *Environment `jsonapi:"relation,environment,omitempty"` Workspace *Workspace `jsonapi:"relation,workspace,omitempty"` }
ProviderConfigurationLink represents a Scalr provider configuration link.
type ProviderConfigurationLinkCreateOptions ¶
type ProviderConfigurationLinkCreateOptions struct { ID string `jsonapi:"primary,provider-configuration-links"` Alias *string `jsonapi:"attr,alias"` ProviderConfiguration *ProviderConfiguration `jsonapi:"relation,provider-configuration"` }
ProviderConfigurationLinkCreateOptions represents the options for creating a new provider configuration workspace link.
type ProviderConfigurationLinkUpdateOptions ¶
type ProviderConfigurationLinkUpdateOptions struct { ID string `jsonapi:"primary,provider-configuration-links"` Alias *string `jsonapi:"attr,alias"` }
ProviderConfigurationLinkUpdateOptions represents the options for updating a provider configuration link.
type ProviderConfigurationLinks ¶
type ProviderConfigurationLinks interface { List(ctx context.Context, workspaceID string, options ProviderConfigurationLinksListOptions) (*ProviderConfigurationLinksList, error) Create(ctx context.Context, workspaceID string, options ProviderConfigurationLinkCreateOptions) (*ProviderConfigurationLink, error) Read(ctx context.Context, linkID string) (*ProviderConfigurationLink, error) Delete(ctx context.Context, linkID string) error Update(ctx context.Context, linkID string, options ProviderConfigurationLinkUpdateOptions) (*ProviderConfigurationLink, error) }
ProviderConfigurationLinks describes all the provider configurartion link related methods that the Scalr API supports.
type ProviderConfigurationLinksList ¶
type ProviderConfigurationLinksList struct { *Pagination Items []*ProviderConfigurationLink }
ProviderConfigurationLinksList represents a list of provider configuration links.
type ProviderConfigurationLinksListOptions ¶
type ProviderConfigurationLinksListOptions struct { ListOptions Include string `url:"include,omitempty"` }
ProviderConfigurationLinksListOptions represents the options for listing provider configuration links.
type ProviderConfigurationParameter ¶
type ProviderConfigurationParameter struct { ID string `jsonapi:"primary,provider-configuration-parameters"` Key string `jsonapi:"attr,key"` Sensitive bool `jsonapi:"attr,sensitive"` Value string `jsonapi:"attr,value"` Description string `jsonapi:"attr,description"` }
ProviderConfigurationParameter represents a Scalr provider configuration parameter.
type ProviderConfigurationParameterCreateOptions ¶
type ProviderConfigurationParameterCreateOptions struct { ID string `jsonapi:"primary,provider-configuration-parameters"` Key *string `jsonapi:"attr,key"` Sensitive *bool `jsonapi:"attr,sensitive,omitempty"` Value *string `jsonapi:"attr,value"` Description *string `jsonapi:"attr,description,omitempty"` }
ProviderConfigurationParameterCreateOptions represents the options for creating a new provider configuration parameter.
type ProviderConfigurationParameterUpdateOptions ¶
type ProviderConfigurationParameterUpdateOptions struct { ID string `jsonapi:"primary,provider-configuration-parameters"` Key *string `jsonapi:"attr,key,omitempty"` Sensitive *bool `jsonapi:"attr,sensitive,omitempty"` Value *string `jsonapi:"attr,value,omitempty"` Description *string `jsonapi:"attr,description,omitempty"` }
ProviderConfigurationParameterUpdateOptions represents the options for updating a provider configuration.
type ProviderConfigurationParameters ¶
type ProviderConfigurationParameters interface { List(ctx context.Context, configurationID string, options ProviderConfigurationParametersListOptions) (*ProviderConfigurationParametersList, error) Create(ctx context.Context, configurationID string, options ProviderConfigurationParameterCreateOptions) (*ProviderConfigurationParameter, error) Read(ctx context.Context, parameterID string) (*ProviderConfigurationParameter, error) Delete(ctx context.Context, parameterID string) error Update(ctx context.Context, parameterID string, options ProviderConfigurationParameterUpdateOptions) (*ProviderConfigurationParameter, error) }
ProviderConfigurationParameters describes all the provider configurartion parameter related methods that the Scalr API supports.
type ProviderConfigurationParametersList ¶
type ProviderConfigurationParametersList struct { *Pagination Items []*ProviderConfigurationParameter }
ProviderConfigurationParametersList represents a list of provider configuration parameters.
type ProviderConfigurationParametersListOptions ¶
type ProviderConfigurationParametersListOptions struct { ListOptions Sort string `url:"sort,omitempty"` }
ProviderConfigurationParametersListOptions represents the options for listing provider configuration parameters.
type ProviderConfigurationUpdateOptions ¶
type ProviderConfigurationUpdateOptions struct { ID string `jsonapi:"primary,provider-configurations"` Name *string `jsonapi:"attr,name"` Environments []*Environment `jsonapi:"relation,environments"` ExportShellVariables *bool `jsonapi:"attr,export-shell-variables"` AwsAccessKey *string `jsonapi:"attr,aws-access-key"` AwsSecretKey *string `jsonapi:"attr,aws-secret-key"` AwsAccountType *string `jsonapi:"attr,aws-account-type"` AwsCredentialsType *string `jsonapi:"attr,aws-credentials-type"` AwsTrustedEntityType *string `jsonapi:"attr,aws-trusted-entity-type"` AwsRoleArn *string `jsonapi:"attr,aws-role-arn"` AwsExternalId *string `jsonapi:"attr,aws-external-id"` AwsAudience *string `jsonapi:"attr,aws-audience"` AzurermAuthType *string `jsonapi:"attr,azurerm-auth-type"` AzurermAudience *string `jsonapi:"attr,azurerm-audience"` AzurermClientId *string `jsonapi:"attr,azurerm-client-id"` AzurermClientSecret *string `jsonapi:"attr,azurerm-client-secret"` AzurermSubscriptionId *string `jsonapi:"attr,azurerm-subscription-id"` AzurermTenantId *string `jsonapi:"attr,azurerm-tenant-id"` GoogleAuthType *string `jsonapi:"attr,google-auth-type"` GoogleServiceAccountEmail *string `jsonapi:"attr,google-service-account-email"` GoogleWorkloadProviderName *string `jsonapi:"attr,google-workload-provider-name"` GoogleProject *string `jsonapi:"attr,google-project"` GoogleCredentials *string `jsonapi:"attr,google-credentials"` GoogleUseDefaultProject *bool `jsonapi:"attr,google-use-default-project,omitempty"` ScalrHostname *string `jsonapi:"attr,scalr-hostname"` ScalrToken *string `jsonapi:"attr,scalr-token"` Owners []*Team `jsonapi:"relation,owners"` }
ProviderConfigurationUpdateOptions represents the options for updating a provider configuration.
type ProviderConfigurations ¶
type ProviderConfigurations interface { List(ctx context.Context, options ProviderConfigurationsListOptions) (*ProviderConfigurationsList, error) Create(ctx context.Context, options ProviderConfigurationCreateOptions) (*ProviderConfiguration, error) Read(ctx context.Context, configurationID string) (*ProviderConfiguration, error) Delete(ctx context.Context, configurationID string) error Update(ctx context.Context, configurationID string, options ProviderConfigurationUpdateOptions) (*ProviderConfiguration, error) }
ProviderConfigurations describes all the provider configuration related methods that the Scalr API supports.
type ProviderConfigurationsList ¶
type ProviderConfigurationsList struct { *Pagination Items []*ProviderConfiguration }
ProviderConfigurationsList represents a list of provider configurations.
type ProviderConfigurationsListOptions ¶
type ProviderConfigurationsListOptions struct { ListOptions Sort string `url:"sort,omitempty"` Include string `url:"include,omitempty"` Filter *ProviderConfigurationFilter `url:"filter,omitempty"` }
ProviderConfigurationsListOptions represents the options for listing provider configurations.
type RemoteStateConsumers ¶
type RemoteStateConsumers interface { List(ctx context.Context, wsID string, options ListOptions) (*RemoteStateConsumersList, error) Add(ctx context.Context, wsID string, wsRels []*WorkspaceRelation) error Replace(ctx context.Context, wsID string, wsRels []*WorkspaceRelation) error Delete(ctx context.Context, wsID string, wsRels []*WorkspaceRelation) error }
type RemoteStateConsumersList ¶
type RemoteStateConsumersList struct { *Pagination Items []*WorkspaceRelation }
type ResourceNotFoundError ¶
type ResourceNotFoundError struct {
Message string
}
func (ResourceNotFoundError) Error ¶
func (e ResourceNotFoundError) Error() string
func (ResourceNotFoundError) Unwrap ¶
func (e ResourceNotFoundError) Unwrap() error
type RetryLogHook ¶
RetryLogHook allows a function to run before each retry.
type Role ¶
type Role struct { ID string `jsonapi:"primary,roles"` Name string `jsonapi:"attr,name"` Description string `jsonapi:"attr,description"` IsSystem bool `jsonapi:"attr,is-system"` // Relations Account *Account `jsonapi:"relation,account"` Permissions []*Permission `jsonapi:"relation,permissions,omitempty"` }
Role represents a Scalr role.
type RoleCreateOptions ¶
type RoleCreateOptions struct { ID string `jsonapi:"primary,roles"` Name *string `jsonapi:"attr,name"` Description *string `jsonapi:"attr,description,omitempty"` // Relations Account *Account `jsonapi:"relation,account"` Permissions []*Permission `jsonapi:"relation,permissions,omitempty"` }
RoleCreateOptions represents the options for creating a new Role.
type RoleList ¶
type RoleList struct { *Pagination Items []*Role }
RoleList represents a list of roles.
type RoleListOptions ¶
type RoleListOptions struct { ListOptions Account *string `url:"filter[account],omitempty"` Name string `url:"filter[name],omitempty"` Role string `url:"filter[role],omitempty"` Query string `url:"query,omitempty"` Include string `url:"include,omitempty"` }
RoleListOptions represents the options for listing roles.
type RoleUpdateOptions ¶
type RoleUpdateOptions struct { // For internal use only! ID string `jsonapi:"primary,roles"` Name *string `jsonapi:"attr,name,omitempty"` Description *string `jsonapi:"attr,description,omitempty"` // Relations Permissions []*Permission `jsonapi:"relation,permissions,omitempty"` }
RoleUpdateOptions represents the options for updating an role.
type Roles ¶
type Roles interface { List(ctx context.Context, options RoleListOptions) (*RoleList, error) Read(ctx context.Context, roleID string) (*Role, error) Create(ctx context.Context, options RoleCreateOptions) (*Role, error) Update(ctx context.Context, roleID string, options RoleUpdateOptions) (*Role, error) Delete(ctx context.Context, roleID string) error }
Roles describes all the role related methods that the Scalr IACP API supports.
type Run ¶
type Run struct { ID string `jsonapi:"primary,runs"` Source RunSource `jsonapi:"attr,source"` Message string `jsonapi:"attr,message"` IsDestroy bool `jsonapi:"attr,is-destroy"` CreatedAt time.Time `jsonapi:"attr,created-at,iso8601"` Status RunStatus `jsonapi:"attr,status"` // Relations VcsRevision *VcsRevision `jsonapi:"relation,vcs-revision"` Apply *Apply `jsonapi:"relation,apply"` ConfigurationVersion *ConfigurationVersion `jsonapi:"relation,configuration-version"` CostEstimate *CostEstimate `jsonapi:"relation,cost-estimate"` Plan *Plan `jsonapi:"relation,plan"` PolicyChecks []*PolicyCheck `jsonapi:"relation,policy-checks"` Workspace *Workspace `jsonapi:"relation,workspace"` }
Run represents a Scalr run.
type RunCreateOptions ¶
type RunCreateOptions struct { // For internal use only! ID string `jsonapi:"primary,runs"` IsDestroy *bool `jsonapi:"attr,is-destroy,omitempty"` // Specifies the configuration version to use for this run. ConfigurationVersion *ConfigurationVersion `jsonapi:"relation,configuration-version,omitempty"` // Specifies the workspace where the run will be executed. Workspace *Workspace `jsonapi:"relation,workspace"` }
RunCreateOptions represents the options for creating a new run.
type RunScheduleRule ¶
type RunScheduleRule struct { ID string `jsonapi:"primary,run-schedule-rules"` Schedule string `jsonapi:"attr,schedule"` ScheduleMode ScheduleMode `jsonapi:"attr,schedule-mode"` Workspace *Workspace `jsonapi:"relation,workspace,omitempty"` }
RunScheduleRule represents a Scalr run schedule rule.
type RunScheduleRuleCreateOptions ¶
type RunScheduleRuleCreateOptions struct { ID string `jsonapi:"primary,run-schedule-rules"` Schedule string `jsonapi:"attr,schedule"` ScheduleMode ScheduleMode `jsonapi:"attr,schedule-mode"` Workspace *Workspace `jsonapi:"relation,workspace,omitempty"` }
RunScheduleRuleCreateOptions represents the options for creating a new run schedule rule.
type RunScheduleRuleListOptions ¶
type RunScheduleRuleListOptions struct { ListOptions Workspace string `url:"filter[workspace],omitempty"` Include string `url:"include,omitempty"` }
RunScheduleRuleListOptions represents the options for listing run schedule rules.
type RunScheduleRuleUpdateOptions ¶
type RunScheduleRuleUpdateOptions struct { ID string `jsonapi:"primary,run-schedule-rules"` Schedule *string `jsonapi:"attr,schedule,omitempty"` ScheduleMode *ScheduleMode `jsonapi:"attr,schedule-mode,omitempty"` }
RunScheduleRuleUpdateOptions represents the options for updating a run schedule rule.
type RunScheduleRules ¶
type RunScheduleRules interface { List(ctx context.Context, options RunScheduleRuleListOptions) (*RunScheduleRulesList, error) Create(ctx context.Context, options RunScheduleRuleCreateOptions) (*RunScheduleRule, error) Read(ctx context.Context, ruleID string) (*RunScheduleRule, error) Delete(ctx context.Context, ruleID string) error Update(ctx context.Context, ruleID string, options RunScheduleRuleUpdateOptions) (*RunScheduleRule, error) }
RunScheduleRules describes all the run schedule rule related methods that the Scalr API supports.
type RunScheduleRulesList ¶
type RunScheduleRulesList struct { *Pagination Items []*RunScheduleRule }
RunScheduleRulesList represents a list of run schedule rules.
type RunStatus ¶
type RunStatus string
RunStatus represents a run state.
const ( RunApplied RunStatus = "applied" RunApplyQueued RunStatus = "apply_queued" RunApplying RunStatus = "applying" RunCanceled RunStatus = "canceled" RunConfirmed RunStatus = "confirmed" RunCostEstimated RunStatus = "cost_estimated" RunCostEstimating RunStatus = "cost_estimating" RunDiscarded RunStatus = "discarded" RunErrored RunStatus = "errored" RunPending RunStatus = "pending" RunPlanQueued RunStatus = "plan_queued" RunPlanned RunStatus = "planned" RunPlannedAndFinished RunStatus = "planned_and_finished" RunPlanning RunStatus = "planning" RunPolicyChecked RunStatus = "policy_checked" RunPolicyChecking RunStatus = "policy_checking" RunPolicyOverride RunStatus = "policy_override" RunPolicySoftFailed RunStatus = "policy_soft_failed" )
List all available run statuses.
type RunTrigger ¶
type RunTrigger struct { ID string `jsonapi:"primary,run-triggers"` CreatedAt time.Time `jsonapi:"attr,created-at,iso8601"` // Relations Upstream *Upstream `jsonapi:"relation,upstream"` Downstream *Downstream `jsonapi:"relation,downstream"` }
type RunTriggerCreateOptions ¶
type RunTriggerCreateOptions struct { // For internal use only! ID string `jsonapi:"primary,run-triggers"` Downstream *Downstream `jsonapi:"relation,downstream"` Upstream *Upstream `jsonapi:"relation,upstream"` }
type RunTriggers ¶
type RunTriggers interface { // Create is used to create a new run trigger. Create(ctx context.Context, options RunTriggerCreateOptions) (*RunTrigger, error) // Read RunTrigger by it's ID Read(ctx context.Context, runTriggerID string) (*RunTrigger, error) // Delete RunTrigger by it's ID Delete(ctx context.Context, runTriggerID string) error }
type Runs ¶
type Runs interface { // Read a run by its ID. Read(ctx context.Context, runID string) (*Run, error) // Create a new run with the given options. Create(ctx context.Context, options RunCreateOptions) (*Run, error) }
Runs describes all the run related methods that the Scalr API supports.
type SSHKey ¶
type SSHKey struct { ID string `jsonapi:"primary,account-ssh-keys"` Name string `jsonapi:"attr,name"` PrivateKey string `jsonapi:"attr,private_key,omitempty"` Account *Account `jsonapi:"relation,account"` Environments []*Environment `jsonapi:"relation,environments"` }
SSHKey represents a Scalr SSH key.
type SSHKeyCreateOptions ¶
type SSHKeyCreateOptions struct { ID string `jsonapi:"primary,account-ssh-keys"` Name *string `jsonapi:"attr,name"` PrivateKey *string `jsonapi:"attr,private_key"` Account *Account `jsonapi:"relation,account"` Environments []*Environment `jsonapi:"relation,environments,omitempty"` }
SSHKeyCreateOptions represents the options for creating a new SSH key.
type SSHKeyFilter ¶
type SSHKeyFilter struct { Name string `url:"name,omitempty"` AccountID string `url:"account,omitempty"` }
SSHKeyFilter represents the options for filtering SSH keys.
type SSHKeyUpdateOptions ¶
type SSHKeyUpdateOptions struct { ID string `jsonapi:"primary,account-ssh-keys"` Name *string `jsonapi:"attr,name,omitempty"` PrivateKey *string `jsonapi:"attr,private_key,omitempty"` Environments []*Environment `jsonapi:"relation,environments"` }
SSHKeyUpdateOptions represents the options for updating an existing SSH key.
type SSHKeys ¶
type SSHKeys interface { List(ctx context.Context, options SSHKeysListOptions) (*SSHKeysList, error) Create(ctx context.Context, options SSHKeyCreateOptions) (*SSHKey, error) Read(ctx context.Context, sshKeyID string) (*SSHKey, error) Update(ctx context.Context, sshKeyID string, options SSHKeyUpdateOptions) (*SSHKey, error) Delete(ctx context.Context, sshKeyID string) error }
SSHKeys describes all the SSH keys related methods that the Scalr API supports.
type SSHKeysLink ¶
type SSHKeysLink struct {
SSHKeyID string `jsonapi:"attr,ssh-key"`
}
SSHKeysLink represents a single SSH key workspace link.
type SSHKeysLinkCreateOptions ¶
type SSHKeysLinkCreateOptions struct {
SSHKeyID string `json:"ssh-key"`
}
type SSHKeysLinks ¶
type SSHKeysList ¶
type SSHKeysList struct { *Pagination Items []*SSHKey }
SSHKeysList represents a list of SSH keys.
type SSHKeysListOptions ¶
type SSHKeysListOptions struct { ListOptions Sort string `url:"sort,omitempty"` Include string `url:"include,omitempty"` Filter *SSHKeyFilter `url:"filter,omitempty"` }
SSHKeysListOptions represents the options for listing SSH keys.
type ScheduleMode ¶
type ScheduleMode string
ScheduleMode represents the run-type that will be scheduled.
const ( ScheduleModeApply ScheduleMode = "apply" ScheduleModeDestroy ScheduleMode = "destroy" ScheduleModeRefresh ScheduleMode = "refresh" )
type ServiceAccount ¶
type ServiceAccount struct { ID string `jsonapi:"primary,service-accounts"` Name string `jsonapi:"attr,name"` Email string `jsonapi:"attr,email"` Description string `jsonapi:"attr,description"` Status ServiceAccountStatus `jsonapi:"attr,status"` CreatedAt time.Time `jsonapi:"attr,created-at,iso8601"` // Relations Account *Account `jsonapi:"relation,account,omitempty"` CreatedBy *User `jsonapi:"relation,created-by,omitempty"` Owners []*Team `jsonapi:"relation,owners"` }
type ServiceAccountCreateOptions ¶
type ServiceAccountCreateOptions struct { // For internal use only! ID string `jsonapi:"primary,service-accounts"` // The name of the service account, it must be unique within the account. Name *string `jsonapi:"attr,name"` Description *string `jsonapi:"attr,description,omitempty"` Status *ServiceAccountStatus `jsonapi:"attr,status,omitempty"` Account *Account `jsonapi:"relation,account"` Owners []*Team `jsonapi:"relation,owners"` }
ServiceAccountCreateOptions represents the options for creating a new service account.
type ServiceAccountList ¶
type ServiceAccountList struct { *Pagination Items []*ServiceAccount }
ServiceAccountList represents a list of service accounts.
type ServiceAccountListOptions ¶
type ServiceAccountListOptions struct { ListOptions Account *string `url:"filter[account],omitempty"` Email *string `url:"filter[email],omitempty"` ServiceAccount *string `url:"filter[service-account],omitempty"` Query *string `url:"query,omitempty"` Include *string `url:"include,omitempty"` }
ServiceAccountListOptions represents the options for listing service accounts.
type ServiceAccountStatus ¶
type ServiceAccountStatus string
ServiceAccountStatus represents the status of service account.
const ( ServiceAccountStatusActive ServiceAccountStatus = "Active" ServiceAccountStatusInactive ServiceAccountStatus = "Inactive" )
List of available service account statuses.
func ServiceAccountStatusPtr ¶
func ServiceAccountStatusPtr(v ServiceAccountStatus) *ServiceAccountStatus
ServiceAccountStatusPtr returns a pointer to the given service account status value.
type ServiceAccountTokens ¶
type ServiceAccountTokens interface { // List service account's access tokens List(ctx context.Context, serviceAccountID string, options AccessTokenListOptions) (*AccessTokenList, error) // Create new access token for service account Create(ctx context.Context, serviceAccountID string, options AccessTokenCreateOptions) (*AccessToken, error) }
ServiceAccountTokens describes all the access token related methods that the Scalr IACP API supports.
type ServiceAccountUpdateOptions ¶
type ServiceAccountUpdateOptions struct { // For internal use only! ID string `jsonapi:"primary,service-accounts"` Description *string `jsonapi:"attr,description,omitempty"` Status *ServiceAccountStatus `jsonapi:"attr,status,omitempty"` Owners []*Team `jsonapi:"relation,owners"` }
ServiceAccountUpdateOptions represents the options for updating a service account.
type ServiceAccounts ¶
type ServiceAccounts interface { // List all the service accounts. List(ctx context.Context, options ServiceAccountListOptions) (*ServiceAccountList, error) // Create is used to create a new service account. Create(ctx context.Context, options ServiceAccountCreateOptions) (*ServiceAccount, error) // Read reads a service account by its ID. Read(ctx context.Context, serviceAccountID string) (*ServiceAccount, error) // Update existing service account by its ID. Update(ctx context.Context, serviceAccountID string, options ServiceAccountUpdateOptions) (*ServiceAccount, error) // Delete service account by its ID. Delete(ctx context.Context, serviceAccountID string) error }
ServiceAccounts describes all the service account related methods that the Scalr API supports.
type SlackConnection ¶
type SlackIntegration ¶
type SlackIntegration struct { ID string `jsonapi:"primary,slack-integrations"` Name string `jsonapi:"attr,name"` Status IntegrationStatus `jsonapi:"attr,status"` ChannelId string `jsonapi:"attr,channel-id"` Events []string `jsonapi:"attr,events"` RunMode string `jsonapi:"attr,run-mode"` // Relations Account *Account `jsonapi:"relation,account"` Environments []*Environment `jsonapi:"relation,environments"` Workspaces []*Workspace `jsonapi:"relation,workspaces"` }
SlackIntegration represents a Scalr IACP slack integration.
type SlackIntegrationCreateOptions ¶
type SlackIntegrationCreateOptions struct { ID string `jsonapi:"primary,slack-integrations"` Name *string `jsonapi:"attr,name"` ChannelId *string `jsonapi:"attr,channel-id"` Events []string `jsonapi:"attr,events"` RunMode *string `jsonapi:"attr,run-mode"` Account *Account `jsonapi:"relation,account"` Connection *SlackConnection `jsonapi:"relation,connection"` Environments []*Environment `jsonapi:"relation,environments"` Workspaces []*Workspace `jsonapi:"relation,workspaces,omitempty"` }
type SlackIntegrationFilter ¶
type SlackIntegrationFilter struct {
Account *string `url:"account,omitempty"`
}
SlackIntegrationFilter represents the options for filtering Slack integrations.
type SlackIntegrationList ¶
type SlackIntegrationList struct { *Pagination Items []*SlackIntegration }
type SlackIntegrationListOptions ¶
type SlackIntegrationListOptions struct { ListOptions Filter *SlackIntegrationFilter `url:"filter,omitempty"` }
type SlackIntegrationUpdateOptions ¶
type SlackIntegrationUpdateOptions struct { ID string `jsonapi:"primary,slack-integrations"` Name *string `jsonapi:"attr,name,omitempty"` ChannelId *string `jsonapi:"attr,channel-id,omitempty"` Status *IntegrationStatus `jsonapi:"attr,status,omitempty"` Events []string `jsonapi:"attr,events,omitempty"` RunMode *string `jsonapi:"attr,run-mode,omitempty"` Environments []*Environment `jsonapi:"relation,environments,omitempty"` Workspaces []*Workspace `jsonapi:"relation,workspaces"` }
type SlackIntegrations ¶
type SlackIntegrations interface { List(ctx context.Context, options SlackIntegrationListOptions) (*SlackIntegrationList, error) Create(ctx context.Context, options SlackIntegrationCreateOptions) (*SlackIntegration, error) Read(ctx context.Context, slackIntegration string) (*SlackIntegration, error) Update(ctx context.Context, slackIntegration string, options SlackIntegrationUpdateOptions) (*SlackIntegration, error) Delete(ctx context.Context, slackIntegration string) error GetConnection(ctx context.Context, accID string) (*SlackConnection, error) }
SlackIntegrations describes all the SlackIntegration related methods that the Scalr IACP API supports.
IACP API docs: https://www.scalr.com/docs/en/latest/api/index.html
type TagCreateOptions ¶
type TagCreateOptions struct { // For internal use only! ID string `jsonapi:"primary,tags"` // The name of the tag, it must be unique within the account. Name *string `jsonapi:"attr,name"` // Specifies the Account for the tag. Account *Account `jsonapi:"relation,account"` }
TagCreateOptions represents the options for creating a new tag.
type TagListOptions ¶
type TagListOptions struct { ListOptions Tag *string `url:"filter[tag],omitempty"` Account *string `url:"filter[account],omitempty"` Name *string `url:"filter[name],omitempty"` Query *string `url:"query,omitempty"` }
TagListOptions represents the options for listing tags.
type TagRelation ¶
type TagRelation struct {
ID string `jsonapi:"primary,tags"`
}
type TagUpdateOptions ¶
type TagUpdateOptions struct { // For internal use only! ID string `jsonapi:"primary,tags"` // The name of the tag, it must be unique within the account. Name *string `jsonapi:"attr,name"` }
TagUpdateOptions represents the options for updating a tag.
type Tags ¶
type Tags interface { // List all the tags. List(ctx context.Context, options TagListOptions) (*TagList, error) // Create is used to create a new tag. Create(ctx context.Context, options TagCreateOptions) (*Tag, error) // Read reads a tag by its ID. Read(ctx context.Context, tagID string) (*Tag, error) // Update existing tag by its ID. Update(ctx context.Context, tagID string, options TagUpdateOptions) (*Tag, error) // Delete deletes a tag by its ID. Delete(ctx context.Context, tagID string) error }
Tags describes all the tags related methods that the Scalr API supports.
type Team ¶
type Team struct { ID string `jsonapi:"primary,teams"` Name string `jsonapi:"attr,name,omitempty"` Description string `jsonapi:"attr,description,omitempty"` // Relations Account *Account `jsonapi:"relation,account"` IdentityProvider *IdentityProvider `jsonapi:"relation,identity-provider"` Users []*User `jsonapi:"relation,users"` }
type TeamCreateOptions ¶
type TeamCreateOptions struct { ID string `jsonapi:"primary,teams"` Name *string `jsonapi:"attr,name"` Description *string `jsonapi:"attr,description"` // Relations Account *Account `jsonapi:"relation,account,omitempty"` IdentityProvider *IdentityProvider `jsonapi:"relation,identity-provider,omitempty"` Users []*User `jsonapi:"relation,users,omitempty"` }
TeamCreateOptions represents the options for creating a new team.
type TeamList ¶
type TeamList struct { *Pagination Items []*Team }
TeamList represents a list of teams.
type TeamListOptions ¶
type TeamListOptions struct { ListOptions Team *string `url:"filter[team],omitempty"` Name *string `url:"filter[name],omitempty"` Account *string `url:"filter[account],omitempty"` IdentityProvider *string `url:"filter[identity-provider],omitempty"` Query *string `url:"query,omitempty"` Sort *string `url:"sort,omitempty"` Include *string `url:"include,omitempty"` }
TeamListOptions represents the options for listing teams.
type TeamUpdateOptions ¶
type TeamUpdateOptions struct { ID string `jsonapi:"primary,teams"` Name *string `jsonapi:"attr,name,omitempty"` Description *string `jsonapi:"attr,description,omitempty"` // Relations Users []*User `jsonapi:"relation,users"` }
TeamUpdateOptions represents the options for updating a team.
type Teams ¶
type Teams interface { List(ctx context.Context, options TeamListOptions) (*TeamList, error) Create(ctx context.Context, options TeamCreateOptions) (*Team, error) Read(ctx context.Context, teamID string) (*Team, error) Update(ctx context.Context, teamID string, options TeamUpdateOptions) (*Team, error) Delete(ctx context.Context, teamID string) error }
Teams describes all the team related methods that the Scalr API supports.
type User ¶
type User struct { ID string `jsonapi:"primary,users"` Status UserStatus `jsonapi:"attr,status,omitempty"` Email string `jsonapi:"attr,email,omitempty"` Username string `jsonapi:"attr,username,omitempty"` FullName string `jsonapi:"attr,full-name,omitempty"` CreatedAt time.Time `jsonapi:"attr,created-at,iso8601"` LastLoginAt time.Time `jsonapi:"attr,last-login-at,iso8601"` // Relations Teams []*Team `jsonapi:"relation,teams"` IdentityProviders []*IdentityProvider `jsonapi:"relation,identity-providers"` }
User represents a Scalr IAM user.
type UserList ¶
type UserList struct { *Pagination Items []*User }
UserList represents a list of users.
type UserListOptions ¶
type UserListOptions struct { ListOptions User *string `url:"filter[user],omitempty"` Email *string `url:"filter[email],omitempty"` IdentityProvider *string `url:"filter[identity-provider],omitempty"` Query *string `url:"query,omitempty"` Sort *string `url:"sort,omitempty"` Include *string `url:"include,omitempty"` }
UserListOptions represents the options for listing users.
type UserStatus ¶
type UserStatus string
UserStatus represents a user status.
const ( UserStatusActive UserStatus = "Active" UserStatusInactive UserStatus = "Inactive" UserStatusPending UserStatus = "Pending" )
List of available user statuses.
type Users ¶
type Users interface { List(ctx context.Context, options UserListOptions) (*UserList, error) Read(ctx context.Context, userID string) (*User, error) }
Users describes all the user related methods that the Scalr API supports.
type Variable ¶
type Variable struct { ID string `jsonapi:"primary,vars"` Key string `jsonapi:"attr,key"` Value string `jsonapi:"attr,value"` Category CategoryType `jsonapi:"attr,category"` Description string `jsonapi:"attr,description"` HCL bool `jsonapi:"attr,hcl"` Sensitive bool `jsonapi:"attr,sensitive"` Final bool `jsonapi:"attr,final"` UpdatedByEmail string `jsonapi:"attr,updated-by-email"` UpdatedAt *time.Time `jsonapi:"attr,updated-at,iso8601"` // Relations Workspace *Workspace `jsonapi:"relation,workspace"` Environment *Environment `jsonapi:"relation,environment"` Account *Account `jsonapi:"relation,account"` UpdatedBy *User `jsonapi:"relation,updated-by"` }
Variable represents a Scalr variable.
type VariableCreateOptions ¶
type VariableCreateOptions struct { // For internal use only! ID string `jsonapi:"primary,vars"` // The name of the variable. Key *string `jsonapi:"attr,key"` // The value of the variable. Value *string `jsonapi:"attr,value,omitempty"` // Whether this is a Terraform or environment variable. Category *CategoryType `jsonapi:"attr,category"` // Variable description. Description *string `jsonapi:"attr,description"` // Whether to evaluate the value of the variable as a string of HCL code. HCL *bool `jsonapi:"attr,hcl,omitempty"` // Whether the value is sensitive. Sensitive *bool `jsonapi:"attr,sensitive,omitempty"` // Whether the value is final. Final *bool `jsonapi:"attr,final,omitempty"` // The workspace that owns the variable. Workspace *Workspace `jsonapi:"relation,workspace,omitempty"` // The environment that owns the variable. Environment *Environment `jsonapi:"relation,environment,omitempty"` // The account that owns the variable. Account *Account `jsonapi:"relation,account,omitempty"` QueryOptions *VariableWriteQueryOptions }
VariableCreateOptions represents the options for creating a new variable.
type VariableFilter ¶
type VariableFilter struct { // Filter by ID Var *string `url:"var,omitempty"` // Filter by key Key *string `url:"key,omitempty"` // Filter by category Category *string `url:"category,omitempty"` // Scope filters. Workspace *string `url:"workspace,omitempty"` Environment *string `url:"environment,omitempty"` Account *string `url:"account,omitempty"` }
type VariableList ¶
type VariableList struct { *Pagination Items []*Variable }
VariableList represents a list of variables.
type VariableListOptions ¶
type VariableListOptions struct { ListOptions // The comma-separated list of attributes. Sort *string `url:"sort,omitempty"` // The comma-separated list of relationship paths. Include *string `url:"include,omitempty"` // Filters Filter *VariableFilter `url:"filter,omitempty"` }
VariableListOptions represents the options for listing variables.
type VariableUpdateOptions ¶
type VariableUpdateOptions struct { // For internal use only! ID string `jsonapi:"primary,vars"` // The name of the variable. Key *string `jsonapi:"attr,key,omitempty"` // The value of the variable. Value *string `jsonapi:"attr,value,omitempty"` // The description of the variable. Description *string `jsonapi:"attr,description,omitempty"` // Whether to evaluate the value of the variable as a string of HCL code. HCL *bool `jsonapi:"attr,hcl,omitempty"` // Whether the value is sensitive. Sensitive *bool `jsonapi:"attr,sensitive,omitempty"` // Whether the value is final. Final *bool `jsonapi:"attr,final,omitempty"` QueryOptions *VariableWriteQueryOptions }
VariableUpdateOptions represents the options for updating a variable.
type Variables ¶
type Variables interface { // List variables by filter options. List(ctx context.Context, options VariableListOptions) (*VariableList, error) // Create is used to create a new variable. Create(ctx context.Context, options VariableCreateOptions) (*Variable, error) // Read a variable by its ID. Read(ctx context.Context, variableID string) (*Variable, error) // Update values of an existing variable. Update(ctx context.Context, variableID string, options VariableUpdateOptions) (*Variable, error) // Delete a variable by its ID. Delete(ctx context.Context, variableID string) error }
Variables describes all the variable related methods that the Scalr API supports.
type VcsProvider ¶
type VcsProvider struct { ID string `jsonapi:"primary,vcs-providers"` Name string `jsonapi:"attr,name"` Url string `jsonapi:"attr,url"` VcsType VcsType `jsonapi:"attr,vcs-type"` AuthType AuthType `jsonapi:"attr,auth-type"` OAuth *OAuth `jsonapi:"attr,oauth"` Token *string `jsonapi:"attr,token"` Username *string `jsonapi:"attr,username"` DraftPrRunsEnabled bool `jsonapi:"attr,draft-pr-runs-enabled"` // Relations Environments []*Environment `jsonapi:"relation,environments"` Account *Account `jsonapi:"relation,account"` AgentPool *AgentPool `jsonapi:"relation,agent-pool"` }
VcsProvider represents a Scalr IACP VcsProvider.
type VcsProviderCreateOptions ¶
type VcsProviderCreateOptions struct { ID string `jsonapi:"primary,vcs-providers"` Name *string `jsonapi:"attr,name"` VcsType VcsType `jsonapi:"attr,vcs-type"` AuthType AuthType `jsonapi:"attr,auth-type"` OAuth *OAuth `jsonapi:"attr,oauth"` Token string `jsonapi:"attr,token"` Url *string `jsonapi:"attr,url"` Username *string `jsonapi:"attr,username"` DraftPrRunsEnabled *bool `jsonapi:"attr,draft-pr-runs-enabled,omitempty"` // Relations Environments []*Environment `jsonapi:"relation,environments,omitempty"` Account *Account `jsonapi:"relation,account,omitempty"` AgentPool *AgentPool `jsonapi:"relation,agent-pool,omitempty"` }
VcsProviderCreateOptions represents the options for creating a new vcs provider.
type VcsProviderUpdateOptions ¶
type VcsProviderUpdateOptions struct { // For internal use only! ID string `jsonapi:"primary,vcs-providers"` Name *string `jsonapi:"attr,name,omitempty"` Token *string `jsonapi:"attr,token,omitempty"` Url *string `jsonapi:"attr,url,omitempty"` Username *string `jsonapi:"attr,username,omitempty"` DraftPrRunsEnabled *bool `jsonapi:"attr,draft-pr-runs-enabled,omitempty"` // Relations Environments []*Environment `jsonapi:"relation,environments"` AgentPool *AgentPool `jsonapi:"relation,agent-pool"` }
VcsProviderUpdateOptions represents the options for updating a vcs provider.
type VcsProviders ¶
type VcsProviders interface { // List the vcs providers. List(ctx context.Context, options VcsProvidersListOptions) (*VcsProvidersList, error) Create(ctx context.Context, options VcsProviderCreateOptions) (*VcsProvider, error) Read(ctx context.Context, vcsProvider string) (*VcsProvider, error) Update(ctx context.Context, vcsProvider string, options VcsProviderUpdateOptions) (*VcsProvider, error) Delete(ctx context.Context, vcsProvider string) error }
VcsProviders describes all the VcsProviders related methods that the Scalr IACP API supports.
IACP API docs: https://www.scalr.com/docs/en/latest/api/index.html
type VcsProvidersList ¶
type VcsProvidersList struct { *Pagination Items []*VcsProvider }
VcsProvidersList represents a list of VCS providers.
type VcsProvidersListOptions ¶
type VcsProvidersListOptions struct { ListOptions // Filter by identifier. ID *string `url:"filter[vcs-provider],omitempty"` // Query string. Query *string `url:"query,omitempty"` // The comma-separated list of attributes. Sort *string `url:"sort,omitempty"` // Filter by vcs-type VcsType *VcsType `url:"filter[vcs-type],omitempty"` // Scope filters. Environment *string `url:"filter[environment],omitempty"` Account *string `url:"filter[account],omitempty"` AgentPool *string `url:"filter[agent-pool],omitempty"` }
VcsProvidersListOptions represents the options for listing vcs providers.
type VcsRevision ¶
type VcsRevision struct { ID string `jsonapi:"primary,vcs-revisions"` Branch string `jsonapi:"attr,branch"` CommitSha string `jsonapi:"attr,commit-sha"` CommitMessage string `jsonapi:"attr,commit-message"` SenderUsername string `jsonapi:"attr,sender-username"` }
VcsRevision represents the VCS metadata
type VcsRevisions ¶
type VcsRevisions interface { // Read reads a VCS revision by its ID. Read(ctx context.Context, vcsRevisionID string) (*VcsRevision, error) }
VcsRevisions describes all the vcs revisions related methods that the Scalr API supports.
type WebhookHeader ¶
type WebhookIntegration ¶
type WebhookIntegration struct { ID string `jsonapi:"primary,webhook-integrations"` Name string `jsonapi:"attr,name"` Enabled bool `jsonapi:"attr,enabled"` LastTriggeredAt *time.Time `jsonapi:"attr,last-triggered-at,iso8601"` Url string `jsonapi:"attr,url"` SecretKey string `jsonapi:"attr,secret-key"` Timeout int `jsonapi:"attr,timeout"` MaxAttempts int `jsonapi:"attr,max-attempts"` HttpMethod string `jsonapi:"attr,http-method"` Headers []*WebhookHeader `jsonapi:"attr,headers"` // Relations Environments []*Environment `jsonapi:"relation,environments"` Account *Account `jsonapi:"relation,account"` Events []*EventDefinition `jsonapi:"relation,events"` }
WebhookIntegration represents a Scalr IACP webhook integration.
type WebhookIntegrationCreateOptions ¶
type WebhookIntegrationCreateOptions struct { ID string `jsonapi:"primary,webhook-integrations"` Name *string `jsonapi:"attr,name"` Enabled *bool `jsonapi:"attr,enabled,omitempty"` Url *string `jsonapi:"attr,url"` SecretKey *string `jsonapi:"attr,secret-key,omitempty"` Timeout *int `jsonapi:"attr,timeout,omitempty"` MaxAttempts *int `jsonapi:"attr,max-attempts,omitempty"` Headers []*WebhookHeader `jsonapi:"attr,headers,omitempty"` Environments []*Environment `jsonapi:"relation,environments,omitempty"` Account *Account `jsonapi:"relation,account"` Events []*EventDefinition `jsonapi:"relation,events,omitempty"` }
type WebhookIntegrationList ¶
type WebhookIntegrationList struct { *Pagination Items []*WebhookIntegration }
type WebhookIntegrationListOptions ¶
type WebhookIntegrationListOptions struct { ListOptions Query *string `url:"query,omitempty"` Sort *string `url:"sort,omitempty"` Enabled *bool `url:"filter[enabled],omitempty"` Event *string `url:"filter[event],omitempty"` Environment *string `url:"filter[environment],omitempty"` Account *string `url:"filter[account],omitempty"` }
type WebhookIntegrationUpdateOptions ¶
type WebhookIntegrationUpdateOptions struct { ID string `jsonapi:"primary,webhook-integrations"` Name *string `jsonapi:"attr,name,omitempty"` Enabled *bool `jsonapi:"attr,enabled,omitempty"` Url *string `jsonapi:"attr,url,omitempty"` SecretKey *string `jsonapi:"attr,secret-key,omitempty"` Timeout *int `jsonapi:"attr,timeout,omitempty"` MaxAttempts *int `jsonapi:"attr,max-attempts,omitempty"` Headers []*WebhookHeader `jsonapi:"attr,headers,omitempty"` Environments []*Environment `jsonapi:"relation,environments"` Events []*EventDefinition `jsonapi:"relation,events"` }
type WebhookIntegrations ¶
type WebhookIntegrations interface { List(ctx context.Context, options WebhookIntegrationListOptions) (*WebhookIntegrationList, error) Create(ctx context.Context, options WebhookIntegrationCreateOptions) (*WebhookIntegration, error) Read(ctx context.Context, wi string) (*WebhookIntegration, error) Update(ctx context.Context, wi string, options WebhookIntegrationUpdateOptions) (*WebhookIntegration, error) Delete(ctx context.Context, wi string) error }
type WorkloadIdentityProvider ¶
type WorkloadIdentityProvider struct { ID string `jsonapi:"primary,workload-identity-providers"` Name string `jsonapi:"attr,name"` URL string `jsonapi:"attr,url"` AllowedAudiences []string `jsonapi:"attr,allowed-audiences"` CreatedAt string `jsonapi:"attr,created-at"` CreatedByEmail *string `jsonapi:"attr,created-by-email"` Status string `jsonapi:"attr,status"` AssumeServiceAccountPolicies []*AssumeServiceAccountPolicy `jsonapi:"relation,assume-service-account-policies"` }
WorkloadIdentityProvider represents a Scalr workload identity provider.
type WorkloadIdentityProviderCreateOptions ¶
type WorkloadIdentityProviderCreateOptions struct { ID string `jsonapi:"primary,workload-identity-providers"` Name *string `jsonapi:"attr,name"` URL *string `jsonapi:"attr,url"` AllowedAudiences []string `jsonapi:"attr,allowed-audiences"` }
WorkloadIdentityProviderCreateOptions represents the options for creating a new workload identity provider.
type WorkloadIdentityProviderUpdateOptions ¶
type WorkloadIdentityProviderUpdateOptions struct { ID string `jsonapi:"primary,workload-identity-providers"` Name *string `jsonapi:"attr,name"` AllowedAudiences []string `jsonapi:"attr,allowed-audiences"` }
WorkloadIdentityProviderUpdateOptions represents the options for updating a workload identity provider.
type WorkloadIdentityProviders ¶
type WorkloadIdentityProviders interface { List(ctx context.Context, options WorkloadIdentityProvidersListOptions) (*WorkloadIdentityProvidersList, error) Create(ctx context.Context, options WorkloadIdentityProviderCreateOptions) (*WorkloadIdentityProvider, error) Read(ctx context.Context, providerID string) (*WorkloadIdentityProvider, error) Update(ctx context.Context, providerID string, options WorkloadIdentityProviderUpdateOptions) (*WorkloadIdentityProvider, error) Delete(ctx context.Context, providerID string) error }
WorkloadIdentityProviders describes all the workload identity provider related methods that the Scalr API supports.
type WorkloadIdentityProvidersList ¶
type WorkloadIdentityProvidersList struct { *Pagination Items []*WorkloadIdentityProvider }
WorkloadIdentityProvidersList represents a list of workload identity providers.
type WorkloadIdentityProvidersListOptions ¶
type WorkloadIdentityProvidersListOptions struct { ListOptions Sort string `url:"sort,omitempty"` Query *string `url:"query,omitempty"` Filter *WorkloadIdentityProviderFilter `url:"filter,omitempty"` }
WorkloadIdentityProvidersListOptions represents the options for listing workload identity providers.
type Workspace ¶
type Workspace struct { ID string `jsonapi:"primary,workspaces"` Actions *WorkspaceActions `jsonapi:"attr,actions"` AutoApply bool `jsonapi:"attr,auto-apply"` ForceLatestRun bool `jsonapi:"attr,force-latest-run"` DeletionProtectionEnabled bool `jsonapi:"attr,deletion-protection-enabled"` CanQueueDestroyPlan bool `jsonapi:"attr,can-queue-destroy-plan"` CreatedAt time.Time `jsonapi:"attr,created-at,iso8601"` FileTriggersEnabled bool `jsonapi:"attr,file-triggers-enabled"` Locked bool `jsonapi:"attr,locked"` MigrationEnvironment string `jsonapi:"attr,migration-environment"` Name string `jsonapi:"attr,name"` Operations bool `jsonapi:"attr,operations"` ExecutionMode WorkspaceExecutionMode `jsonapi:"attr,execution-mode"` Permissions *WorkspacePermissions `jsonapi:"attr,permissions"` TerraformVersion string `jsonapi:"attr,terraform-version"` IaCPlatform WorkspaceIaCPlatform `jsonapi:"attr,iac-platform"` VCSRepo *WorkspaceVCSRepo `jsonapi:"attr,vcs-repo"` Terragrunt *WorkspaceTerragrunt `jsonapi:"attr,terragrunt"` WorkingDirectory string `jsonapi:"attr,working-directory"` ApplySchedule string `jsonapi:"attr,apply-schedule"` DestroySchedule string `jsonapi:"attr,destroy-schedule"` HasResources bool `jsonapi:"attr,has-resources"` AutoQueueRuns WorkspaceAutoQueueRuns `jsonapi:"attr,auto-queue-runs"` Hooks *WorkspaceHooks `jsonapi:"attr,hooks"` RunOperationTimeout *int `jsonapi:"attr,run-operation-timeout"` VarFiles []string `jsonapi:"attr,var-files"` EnvironmentType WorkspaceEnvironmentType `jsonapi:"attr,environment-type"` RemoteStateSharing bool `jsonapi:"attr,remote-state-sharing"` // Relations CurrentRun *Run `jsonapi:"relation,current-run"` LatestRun *Run `jsonapi:"relation,latest-run"` Environment *Environment `jsonapi:"relation,environment"` CreatedBy *User `jsonapi:"relation,created-by"` VcsProvider *VcsProvider `jsonapi:"relation,vcs-provider"` AgentPool *AgentPool `jsonapi:"relation,agent-pool"` ModuleVersion *ModuleVersion `jsonapi:"relation,module-version,omitempty"` Tags []*Tag `jsonapi:"relation,tags"` ConfigurationVersion *ConfigurationVersion `jsonapi:"relation,configuration-version"` SSHKey *SSHKey `jsonapi:"relation,ssh-key"` }
Workspace represents a Scalr workspace.
type WorkspaceActions ¶
type WorkspaceActions struct {
IsDestroyable bool `json:"is-destroyable"`
}
WorkspaceActions represents the workspace actions.
type WorkspaceAutoQueueRuns ¶
type WorkspaceAutoQueueRuns string
WorkspaceAutoQueueRuns represents run triggering modes
const ( AutoQueueRunsModeSkipFirst WorkspaceAutoQueueRuns = "skip_first" AutoQueueRunsModeAlways WorkspaceAutoQueueRuns = "always" AutoQueueRunsModeNever WorkspaceAutoQueueRuns = "never" AutoQueueRunsModeOnCreateOnly WorkspaceAutoQueueRuns = "on_create_only" )
Available auto queue modes
func AutoQueueRunsModePtr ¶
func AutoQueueRunsModePtr(v WorkspaceAutoQueueRuns) *WorkspaceAutoQueueRuns
AutoQueueRunsModePtr returns a pointer to the given auto queue runs mode
type WorkspaceCreateOptions ¶
type WorkspaceCreateOptions struct { // For internal use only! ID string `jsonapi:"primary,workspaces"` // Whether to automatically apply changes when a Terraform plan is successful. AutoApply *bool `jsonapi:"attr,auto-apply,omitempty"` // Whether to automatically raise the priority of the latest new run. ForceLatestRun *bool `jsonapi:"attr,force-latest-run,omitempty"` // Whether to prevent deletion when the workspace has resources. DeletionProtectionEnabled *bool `jsonapi:"attr,deletion-protection-enabled,omitempty"` // The name of the workspace, which can only include letters, numbers, -, // and _. This will be used as an identifier and must be unique in the // environment. Name *string `jsonapi:"attr,name"` // Whether the workspace will use remote or local execution mode. Operations *bool `jsonapi:"attr,operations,omitempty"` ExecutionMode *WorkspaceExecutionMode `jsonapi:"attr,execution-mode,omitempty"` // The version of Terraform to use for this workspace. Upon creating a // workspace, the latest version is selected unless otherwise specified. TerraformVersion *string `jsonapi:"attr,terraform-version,omitempty"` // Settings for the workspace terragrunt configuration Terragrunt *WorkspaceTerragruntOptions `jsonapi:"attr,terragrunt,omitempty"` // The IaC platform to use for this workspace. IacPlatform *WorkspaceIaCPlatform `jsonapi:"attr,iac-platform,omitempty"` // Settings for the workspace's VCS repository. If omitted, the workspace is // created without a VCS repo. If included, you must specify at least the // oauth-token-id and identifier keys below. VCSRepo *WorkspaceVCSRepoOptions `jsonapi:"attr,vcs-repo,omitempty"` // Contains configuration for custom hooks, // which can be triggered before or after plan or apply phases Hooks *HooksOptions `jsonapi:"attr,hooks,omitempty"` // A relative path that Terraform will execute within. This defaults to the // root of your repository and is typically set to a subdirectory matching the // environment when multiple environments exist within the same repository. WorkingDirectory *string `jsonapi:"attr,working-directory,omitempty"` // Indicates if runs have to be queued automatically when a new configuration version is uploaded. AutoQueueRuns *WorkspaceAutoQueueRuns `jsonapi:"attr,auto-queue-runs,omitempty"` // Specifies the VcsProvider for workspace vcs-repo. Required if vcs-repo attr passed VcsProvider *VcsProvider `jsonapi:"relation,vcs-provider,omitempty"` // Specifies the Environment for workspace. Environment *Environment `jsonapi:"relation,environment"` // Specifies the AgentPool for workspace. AgentPool *AgentPool `jsonapi:"relation,agent-pool,omitempty"` // Specifies the VarFiles for workspace. VarFiles []string `jsonapi:"attr,var-files"` // The type of the Scalr Workspace environment. EnvironmentType *WorkspaceEnvironmentType `jsonapi:"attr,environment-type,omitempty"` // Specifies the ModuleVersion based on create workspace ModuleVersion *ModuleVersion `jsonapi:"relation,module-version,omitempty"` // Specifies the number of minutes run operation can be executed before termination. RunOperationTimeout *int `jsonapi:"attr,run-operation-timeout"` // Specifies tags assigned to the workspace Tags []*Tag `jsonapi:"relation,tags,omitempty"` RemoteStateSharing *bool `jsonapi:"attr,remote-state-sharing,omitempty"` }
WorkspaceCreateOptions represents the options for creating a new workspace.
type WorkspaceEnvironmentType ¶
type WorkspaceEnvironmentType string
WorkspaceEnvironmentType represents the type of workspace environment.
const ( WorkspaceEnvironmentTypeProduction WorkspaceEnvironmentType = "production" WorkspaceEnvironmentTypeStaging WorkspaceEnvironmentType = "staging" WorkspaceEnvironmentTypeTesting WorkspaceEnvironmentType = "testing" WorkspaceEnvironmentTypeDevelopment WorkspaceEnvironmentType = "development" WorkspaceEnvironmentTypeUnmapped WorkspaceEnvironmentType = "unmapped" )
Available workspace environment types
func WorkspaceEnvironmentTypePtr ¶
func WorkspaceEnvironmentTypePtr(v WorkspaceEnvironmentType) *WorkspaceEnvironmentType
WorkspaceEnvironmentType returns a pointer to the given workspace environment type
type WorkspaceExecutionMode ¶
type WorkspaceExecutionMode string
WorkspaceExecutionMode represents an execution mode setting of the workspace.
const ( WorkspaceExecutionModeRemote WorkspaceExecutionMode = "remote" WorkspaceExecutionModeLocal WorkspaceExecutionMode = "local" )
Available execution modes
func WorkspaceExecutionModePtr ¶
func WorkspaceExecutionModePtr(v WorkspaceExecutionMode) *WorkspaceExecutionMode
WorkspaceExecutionModePtr returns a pointer to the given execution mode
type WorkspaceFilter ¶
type WorkspaceFilter struct { Id *string `url:"workspace,omitempty"` Account *string `url:"account,omitempty"` Environment *string `url:"environment,omitempty"` Name *string `url:"name,omitempty"` Tag *string `url:"tag,omitempty"` AgentPool *string `url:"agent-pool,omitempty"` }
WorkspaceFilter represents the options for filtering workspaces.
type WorkspaceHooks ¶
type WorkspaceHooks struct { PreInit string `json:"pre-init"` PrePlan string `json:"pre-plan"` PostPlan string `json:"post-plan"` PreApply string `json:"pre-apply"` PostApply string `json:"post-apply"` }
WorkspaceHooks contains the custom hooks field.
type WorkspaceIaCPlatform ¶
type WorkspaceIaCPlatform string
WorkspaceIaCPlatform represents an IaC platform used in this workspace.
const ( WorkspaceIaCPlatformTerraform WorkspaceIaCPlatform = "terraform" WorkspaceIaCPlatformOpenTofu WorkspaceIaCPlatform = "opentofu" )
Available IaC platforms
func WorkspaceIaCPlatformPtr ¶
func WorkspaceIaCPlatformPtr(v WorkspaceIaCPlatform) *WorkspaceIaCPlatform
WorkspaceIaCPlatformPtr returns a pointer to the given IaC platform
type WorkspaceList ¶
type WorkspaceList struct { *Pagination Items []*Workspace }
WorkspaceList represents a list of workspaces.
type WorkspaceListOptions ¶
type WorkspaceListOptions struct { ListOptions Include string `url:"include,omitempty"` Filter *WorkspaceFilter `url:"filter,omitempty"` }
WorkspaceListOptions represents the options for listing workspaces.
type WorkspacePermissions ¶
type WorkspacePermissions struct { CanDestroy bool `json:"can-destroy"` CanForceUnlock bool `json:"can-force-unlock"` CanLock bool `json:"can-lock"` CanQueueApply bool `json:"can-queue-apply"` CanQueueDestroy bool `json:"can-queue-destroy"` CanQueueRun bool `json:"can-queue-run"` CanReadSettings bool `json:"can-read-settings"` CanUnlock bool `json:"can-unlock"` CanUpdate bool `json:"can-update"` CanUpdateVariable bool `json:"can-update-variable"` }
WorkspacePermissions represents the workspace permissions.
type WorkspaceRelation ¶
type WorkspaceRelation struct {
ID string `jsonapi:"primary,workspaces"`
}
type WorkspaceRunScheduleOptions ¶
type WorkspaceRunScheduleOptions struct { ApplySchedule *string `json:"apply-schedule"` DestroySchedule *string `json:"destroy-schedule"` }
WorkspaceRunScheduleOptions represents option for setting run schedules for workspace
type WorkspaceTags ¶
type WorkspaceTags interface { Add(ctx context.Context, wsID string, tags []*TagRelation) error Replace(ctx context.Context, wsID string, tags []*TagRelation) error Delete(ctx context.Context, wsID string, tags []*TagRelation) error }
WorkspaceTags describes all the workspace tags related methods that the Scalr API supports.
type WorkspaceTerragrunt ¶
type WorkspaceUpdateOptions ¶
type WorkspaceUpdateOptions struct { // For internal use only! ID string `jsonapi:"primary,workspaces"` // Whether to automatically apply changes when a Terraform plan is successful. AutoApply *bool `jsonapi:"attr,auto-apply,omitempty"` // Whether to automatically raise the priority of the latest new run. ForceLatestRun *bool `jsonapi:"attr,force-latest-run,omitempty"` // Whether to prevent deletion when the workspace has resources. DeletionProtectionEnabled *bool `jsonapi:"attr,deletion-protection-enabled,omitempty"` // A new name for the workspace, which can only include letters, numbers, -, // and _. This will be used as an identifier and must be unique in the // environment. Warning: Changing a workspace's name changes its URL in the // API and UI. Name *string `jsonapi:"attr,name,omitempty"` // Whether to filter runs based on the changed files in a VCS push. If // enabled, the working directory and trigger prefixes describe a set of // paths which must contain changes for a VCS push to trigger a run. If // disabled, any push will trigger a run. FileTriggersEnabled *bool `jsonapi:"attr,file-triggers-enabled,omitempty"` // Whether the workspace will use remote or local execution mode. Operations *bool `jsonapi:"attr,operations,omitempty"` ExecutionMode *WorkspaceExecutionMode `jsonapi:"attr,execution-mode,omitempty"` // The version of Terraform to use for this workspace. TerraformVersion *string `jsonapi:"attr,terraform-version,omitempty"` // Settings for the workspace terragrunt configuration Terragrunt *WorkspaceTerragruntOptions `jsonapi:"attr,terragrunt"` // The IaC platform to use for this workspace. IacPlatform *WorkspaceIaCPlatform `jsonapi:"attr,iac-platform,omitempty"` // To delete a workspace's existing VCS repo, specify null instead of an // object. To modify a workspace's existing VCS repo, include whichever of // the keys below you wish to modify. To add a new VCS repo to a workspace // that didn't previously have one, include at least the oauth-token-id and // identifier keys. VCSRepo *WorkspaceVCSRepoOptions `jsonapi:"attr,vcs-repo"` // Contains configuration for custom hooks, // which can be triggered before init, before or after plan or apply phases Hooks *HooksOptions `jsonapi:"attr,hooks,omitempty"` // A relative path that Terraform will execute within. This defaults to the // root of your repository and is typically set to a subdirectory matching // the environment when multiple environments exist within the same // repository. WorkingDirectory *string `jsonapi:"attr,working-directory,omitempty"` // Indicates if runs have to be queued automatically when a new configuration version is uploaded. AutoQueueRuns *WorkspaceAutoQueueRuns `jsonapi:"attr,auto-queue-runs,omitempty"` // Specifies the VcsProvider for workspace vcs-repo. VcsProvider *VcsProvider `jsonapi:"relation,vcs-provider"` // Specifies the AgentPool for workspace. AgentPool *AgentPool `jsonapi:"relation,agent-pool"` //Specifies the VarFiles for workspace. VarFiles []string `jsonapi:"attr,var_files"` // The type of the Scalr Workspace environment. EnvironmentType *WorkspaceEnvironmentType `jsonapi:"attr,environment-type,omitempty"` // Specifies the ModuleVersion based on create workspace ModuleVersion *ModuleVersion `jsonapi:"relation,module-version"` // Specifies the number of minutes run operation can be executed before termination. RunOperationTimeout *int `jsonapi:"attr,run-operation-timeout"` RemoteStateSharing *bool `jsonapi:"attr,remote-state-sharing,omitempty"` }
WorkspaceUpdateOptions represents the options for updating a workspace.
type WorkspaceVCSRepo ¶
type WorkspaceVCSRepo struct { Branch string `json:"branch"` Identifier string `json:"identifier"` IngressSubmodules bool `json:"ingress-submodules"` Path string `json:"path"` TriggerPrefixes []string `json:"trigger-prefixes,omitempty"` TriggerPatterns string `json:"trigger-patterns,omitempty"` DryRunsEnabled bool `json:"dry-runs-enabled"` }
WorkspaceVCSRepo contains the configuration of a VCS integration.
type WorkspaceVCSRepoOptions ¶
type WorkspaceVCSRepoOptions struct { Branch *string `json:"branch,omitempty"` Identifier *string `json:"identifier,omitempty"` IngressSubmodules *bool `json:"ingress-submodules,omitempty"` Path *string `json:"path,omitempty"` TriggerPrefixes *[]string `json:"trigger-prefixes,omitempty"` TriggerPatterns *string `json:"trigger-patterns,omitempty"` DryRunsEnabled *bool `json:"dry-runs-enabled,omitempty"` }
WorkspaceVCSRepoOptions represents the configuration options of a VCS integration.
type Workspaces ¶
type Workspaces interface { // List all the workspaces within an environment. List(ctx context.Context, options WorkspaceListOptions) (*WorkspaceList, error) // Create is used to create a new workspace. Create(ctx context.Context, options WorkspaceCreateOptions) (*Workspace, error) // Read a workspace by its environment ID and name. Read(ctx context.Context, environmentID, workspaceName string) (*Workspace, error) // ReadByID reads a workspace by its ID. ReadByID(ctx context.Context, workspaceID string) (*Workspace, error) // Update settings of an existing workspace. Update(ctx context.Context, workspaceID string, options WorkspaceUpdateOptions) (*Workspace, error) // Delete deletes a workspace by its ID. Delete(ctx context.Context, workspaceID string) error // SetSchedule sets run schedules for workspace. SetSchedule(ctx context.Context, workspaceID string, options WorkspaceRunScheduleOptions) (*Workspace, error) // Read outputs ReadOutputs(ctx context.Context, workspaceID string) ([]*Output, error) }
Workspaces describes all the workspace related methods that the Scalr API supports.
Source Files
¶
- access_policy.go
- access_token.go
- account.go
- account_user.go
- agent.go
- agent_pool.go
- agent_pool_token.go
- apply.go
- assume_service_account_policy.go
- configuration_version.go
- cost_estimate.go
- environment.go
- environment_hook.go
- environment_tags.go
- event_bridge_integration.go
- hook.go
- identity_provider.go
- infracost_integration.go
- integration.go
- module.go
- module_version.go
- plan.go
- policy_check.go
- policy_group.go
- policy_group_environments.go
- provider_configuration.go
- provider_configuration_link.go
- provider_configuration_parameter.go
- remote_state_consumer.go
- role.go
- run.go
- run_schedule_rule.go
- run_triggers.go
- scalr.go
- service_account.go
- service_account_token.go
- slack_integration.go
- ssh_key.go
- ssh_key_link.go
- tag.go
- team.go
- type_helpers.go
- user.go
- validations.go
- variable.go
- vcs_provider.go
- vcs_revision.go
- webhook_integration.go
- workload_identity_providers.go
- workspace.go
- workspace_tags.go