Documentation
¶
Index ¶
- Constants
- func Delete(client newclient.Client, id string) error
- type IPlatformHubAccount
- type PlatformHubAccountResource
- func (r *PlatformHubAccountResource) GetAccountType() PlatformHubAccountType
- func (r *PlatformHubAccountResource) GetDescription() string
- func (r *PlatformHubAccountResource) GetName() string
- func (r *PlatformHubAccountResource) SetDescription(description string)
- func (r *PlatformHubAccountResource) SetName(name string)
- func (r *PlatformHubAccountResource) ToPlatformHubAccount() (IPlatformHubAccount, error)
- type PlatformHubAccountType
- type PlatformHubAwsAccount
- func (a *PlatformHubAwsAccount) GetAccountType() PlatformHubAccountType
- func (a *PlatformHubAwsAccount) GetDescription() string
- func (a *PlatformHubAwsAccount) GetName() string
- func (a *PlatformHubAwsAccount) SetDescription(description string)
- func (a *PlatformHubAwsAccount) SetName(name string)
- func (a *PlatformHubAwsAccount) Validate() error
- type PlatformHubAwsOIDCAccount
- func (a *PlatformHubAwsOIDCAccount) GetAccountType() PlatformHubAccountType
- func (a *PlatformHubAwsOIDCAccount) GetDescription() string
- func (a *PlatformHubAwsOIDCAccount) GetName() string
- func (a *PlatformHubAwsOIDCAccount) SetDescription(description string)
- func (a *PlatformHubAwsOIDCAccount) SetName(name string)
- func (a *PlatformHubAwsOIDCAccount) Validate() error
- type PlatformHubAzureOidcAccount
- func (a *PlatformHubAzureOidcAccount) GetAccountType() PlatformHubAccountType
- func (a *PlatformHubAzureOidcAccount) GetDescription() string
- func (a *PlatformHubAzureOidcAccount) GetName() string
- func (a *PlatformHubAzureOidcAccount) SetDescription(description string)
- func (a *PlatformHubAzureOidcAccount) SetName(name string)
- func (a *PlatformHubAzureOidcAccount) Validate() error
- type PlatformHubAzureServicePrincipalAccount
- func (a *PlatformHubAzureServicePrincipalAccount) GetAccountType() PlatformHubAccountType
- func (a *PlatformHubAzureServicePrincipalAccount) GetDescription() string
- func (a *PlatformHubAzureServicePrincipalAccount) GetName() string
- func (a *PlatformHubAzureServicePrincipalAccount) SetDescription(description string)
- func (a *PlatformHubAzureServicePrincipalAccount) SetName(name string)
- func (a *PlatformHubAzureServicePrincipalAccount) Validate() error
- type PlatformHubGcpAccount
- func (a *PlatformHubGcpAccount) GetAccountType() PlatformHubAccountType
- func (a *PlatformHubGcpAccount) GetDescription() string
- func (a *PlatformHubGcpAccount) GetName() string
- func (a *PlatformHubGcpAccount) SetDescription(description string)
- func (a *PlatformHubGcpAccount) SetName(name string)
- func (a *PlatformHubGcpAccount) Validate() error
- type PlatformHubGenericOidcAccount
- func (a *PlatformHubGenericOidcAccount) GetAccountType() PlatformHubAccountType
- func (a *PlatformHubGenericOidcAccount) GetDescription() string
- func (a *PlatformHubGenericOidcAccount) GetName() string
- func (a *PlatformHubGenericOidcAccount) SetDescription(description string)
- func (a *PlatformHubGenericOidcAccount) SetName(name string)
- func (a *PlatformHubGenericOidcAccount) Validate() error
- type PlatformHubUsernamePasswordAccount
- func (a *PlatformHubUsernamePasswordAccount) GetAccountType() PlatformHubAccountType
- func (a *PlatformHubUsernamePasswordAccount) GetDescription() string
- func (a *PlatformHubUsernamePasswordAccount) GetName() string
- func (a *PlatformHubUsernamePasswordAccount) SetDescription(description string)
- func (a *PlatformHubUsernamePasswordAccount) SetName(name string)
- func (a *PlatformHubUsernamePasswordAccount) Validate() error
Constants ¶
const ( AccountTypePlatformHubAwsAccount = PlatformHubAccountType("AmazonWebServicesAccount") AccountTypePlatformHubAwsOIDCAccount = PlatformHubAccountType("AmazonWebServicesOidcAccount") AccountTypePlatformHubAzureOidcAccount = PlatformHubAccountType("AzureOidc") AccountTypePlatformHubAzureServicePrincipalAccount = PlatformHubAccountType("AzureServicePrincipal") AccountTypePlatformHubGcpAccount = PlatformHubAccountType("GoogleCloudAccount") AccountTypePlatformHubGenericOidcAccount = PlatformHubAccountType("GenericOidcAccount") AccountTypePlatformHubUsernamePasswordAccount = PlatformHubAccountType("UsernamePassword") )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type IPlatformHubAccount ¶
type IPlatformHubAccount interface {
GetAccountType() PlatformHubAccountType
GetDescription() string
SetDescription(string)
resources.IHasName
resources.IResource
}
IPlatformHubAccount defines the interface for Platform Hub accounts.
func Add ¶
func Add(client newclient.Client, platformHubAccount IPlatformHubAccount) (IPlatformHubAccount, error)
Add creates a new Platform Hub account.
func GetByID ¶
func GetByID(client newclient.Client, id string) (IPlatformHubAccount, error)
GetByID returns the Platform Hub account that matches the input ID.
func Update ¶
func Update(client newclient.Client, platformHubAccount IPlatformHubAccount) (IPlatformHubAccount, error)
Update modifies a Platform Hub account.
type PlatformHubAccountResource ¶
type PlatformHubAccountResource struct {
AccountType PlatformHubAccountType `` /* 185-byte string literal not displayed */
Description string `json:"Description,omitempty"`
Name string `json:"Name" validate:"required,notall"`
AccessKey string `json:"AccessKey,omitempty"`
SecretKey *core.SensitiveValue `json:"SecretKey,omitempty"`
JsonKey *core.SensitiveValue `json:"JsonKey,omitempty"`
ExecutionSubjectKeys []string `json:"ExecutionSubjectKeys,omitempty"`
Audience string `json:"Audience,omitempty"`
Username string `json:"Username,omitempty"`
Password *core.SensitiveValue `json:"Password,omitempty"`
SubscriptionNumber string `json:"SubscriptionNumber,omitempty"`
TenantID string `json:"TenantId,omitempty"`
ApplicationID string `json:"ClientId,omitempty"`
DeploymentSubjectKeys []string `json:"DeploymentSubjectKeys,omitempty"`
HealthCheckSubjectKeys []string `json:"HealthCheckSubjectKeys,omitempty"`
AccountTestSubjectKeys []string `json:"AccountTestSubjectKeys,omitempty"`
AzureEnvironment string `json:"AzureEnvironment,omitempty"`
AuthenticationEndpoint string `json:"ActiveDirectoryEndpointBaseUri,omitempty"`
ResourceManagementEndpoint string `json:"ResourceManagementEndpointBaseUri,omitempty"`
RoleArn string `json:"RoleArn,omitempty"`
SessionDuration string `json:"SessionDuration,omitempty"`
resources.Resource
}
PlatformHubAccountResource represents details for all Platform Hub accounts.
func NewPlatformHubAccountResource ¶
func NewPlatformHubAccountResource(name string, accountType PlatformHubAccountType) *PlatformHubAccountResource
NewPlatformHubAccountResource creates and initializes a Platform Hub account resource.
func ToPlatformHubAccountResource ¶
func ToPlatformHubAccountResource(account IPlatformHubAccount) (*PlatformHubAccountResource, error)
ToPlatformHubAccountResource converts a concrete account type to PlatformHubAccountResource.
func (*PlatformHubAccountResource) GetAccountType ¶
func (r *PlatformHubAccountResource) GetAccountType() PlatformHubAccountType
GetAccountType returns the type of this account resource.
func (*PlatformHubAccountResource) GetDescription ¶
func (r *PlatformHubAccountResource) GetDescription() string
GetDescription returns the description of this account resource.
func (*PlatformHubAccountResource) GetName ¶
func (r *PlatformHubAccountResource) GetName() string
GetName returns the name of this account resource.
func (*PlatformHubAccountResource) SetDescription ¶
func (r *PlatformHubAccountResource) SetDescription(description string)
SetDescription sets the description of the account resource.
func (*PlatformHubAccountResource) SetName ¶
func (r *PlatformHubAccountResource) SetName(name string)
SetName sets the name of this account resource.
func (*PlatformHubAccountResource) ToPlatformHubAccount ¶
func (r *PlatformHubAccountResource) ToPlatformHubAccount() (IPlatformHubAccount, error)
ToPlatformHubAccount converts a PlatformHubAccountResource to the appropriate concrete account type.
type PlatformHubAccountType ¶
type PlatformHubAccountType string
type PlatformHubAwsAccount ¶
type PlatformHubAwsAccount struct {
AccessKey string `json:"AccessKey" validate:"required"`
SecretKey *core.SensitiveValue `json:"SecretKey" validate:"required"`
// contains filtered or unexported fields
}
PlatformHubAwsAccount represents a Platform Hub AWS account.
func NewPlatformHubAwsAccount ¶
func NewPlatformHubAwsAccount(name string, accessKey string, secretKey *core.SensitiveValue) (*PlatformHubAwsAccount, error)
NewPlatformHubAwsAccount initializes and returns a Platform Hub AWS account with a name, access key, and secret key.
func (*PlatformHubAwsAccount) GetAccountType ¶
func (a *PlatformHubAwsAccount) GetAccountType() PlatformHubAccountType
GetAccountType returns the type of this account.
func (*PlatformHubAwsAccount) GetDescription ¶
func (a *PlatformHubAwsAccount) GetDescription() string
GetDescription returns the description of the account.
func (*PlatformHubAwsAccount) GetName ¶
func (a *PlatformHubAwsAccount) GetName() string
GetName returns the name of the account.
func (*PlatformHubAwsAccount) SetDescription ¶
func (a *PlatformHubAwsAccount) SetDescription(description string)
SetDescription sets the description of the account.
func (*PlatformHubAwsAccount) SetName ¶
func (a *PlatformHubAwsAccount) SetName(name string)
SetName sets the name of the account.
func (*PlatformHubAwsAccount) Validate ¶
func (a *PlatformHubAwsAccount) Validate() error
Validate checks the state of this account and returns an error if invalid.
type PlatformHubAwsOIDCAccount ¶ added in v2.94.0
type PlatformHubAwsOIDCAccount struct {
RoleArn string `json:"RoleArn" validate:"required"`
SessionDuration string `json:"SessionDuration,omitempty"`
DeploymentSubjectKeys []string `json:"DeploymentSubjectKeys,omitempty" validate:"omitempty,dive,oneof=space environment project tenant runbook account type'"`
HealthCheckSubjectKeys []string `json:"HealthCheckSubjectKeys,omitempty" validate:"omitempty,dive,oneof=space account target type'"`
AccountTestSubjectKeys []string `json:"AccountTestSubjectKeys,omitempty" validate:"omitempty,dive,oneof=space account type'"`
// contains filtered or unexported fields
}
PlatformHubAwsOIDCAccount represents a Platform Hub AWS OIDC account.
func NewPlatformHubAwsOIDCAccount ¶ added in v2.94.0
func NewPlatformHubAwsOIDCAccount(name string, roleArn string) (*PlatformHubAwsOIDCAccount, error)
NewPlatformHubAwsOIDCAccount initializes and returns a Platform Hub AWS OIDC account with a name and role ARN.
func (*PlatformHubAwsOIDCAccount) GetAccountType ¶ added in v2.94.0
func (a *PlatformHubAwsOIDCAccount) GetAccountType() PlatformHubAccountType
GetAccountType returns the type of this account.
func (*PlatformHubAwsOIDCAccount) GetDescription ¶ added in v2.94.0
func (a *PlatformHubAwsOIDCAccount) GetDescription() string
GetDescription returns the description of the account.
func (*PlatformHubAwsOIDCAccount) GetName ¶ added in v2.94.0
func (a *PlatformHubAwsOIDCAccount) GetName() string
GetName returns the name of the account.
func (*PlatformHubAwsOIDCAccount) SetDescription ¶ added in v2.94.0
func (a *PlatformHubAwsOIDCAccount) SetDescription(description string)
SetDescription sets the description of the account.
func (*PlatformHubAwsOIDCAccount) SetName ¶ added in v2.94.0
func (a *PlatformHubAwsOIDCAccount) SetName(name string)
SetName sets the name of the account.
func (*PlatformHubAwsOIDCAccount) Validate ¶ added in v2.94.0
func (a *PlatformHubAwsOIDCAccount) Validate() error
Validate checks the state of this account and returns an error if invalid.
type PlatformHubAzureOidcAccount ¶ added in v2.95.0
type PlatformHubAzureOidcAccount struct {
SubscriptionID string `json:"SubscriptionNumber" validate:"required"`
ApplicationID string `json:"ClientId" validate:"required"`
TenantID string `json:"TenantId" validate:"required"`
ExecutionSubjectKeys []string `json:"DeploymentSubjectKeys,omitempty" validate:"omitempty,dive,oneof=space environment project tenant runbook account type"`
HealthSubjectKeys []string `json:"HealthCheckSubjectKeys,omitempty" validate:"omitempty,dive,oneof=space account target type"`
AccountTestSubjectKeys []string `json:"AccountTestSubjectKeys,omitempty" validate:"omitempty,dive,oneof=space account type"`
Audience string `json:"Audience,omitempty"`
AzureEnvironment string `json:"AzureEnvironment,omitempty"`
AuthenticationEndpoint string `json:"ActiveDirectoryEndpointBaseUri,omitempty"`
ResourceManagementEndpoint string `json:"ResourceManagementEndpointBaseUri,omitempty"`
// contains filtered or unexported fields
}
PlatformHubAzureOidcAccount represents a Platform Hub Azure OpenID Connect account.
func NewPlatformHubAzureOidcAccount ¶ added in v2.95.0
func NewPlatformHubAzureOidcAccount(name string, subscriptionID string, applicationID string, tenantID string) (*PlatformHubAzureOidcAccount, error)
NewPlatformHubAzureOidcAccount initializes and returns a Platform Hub Azure OpenID Connect account with a name, subscription ID, application ID, and tenant ID.
func (*PlatformHubAzureOidcAccount) GetAccountType ¶ added in v2.95.0
func (a *PlatformHubAzureOidcAccount) GetAccountType() PlatformHubAccountType
GetAccountType returns the type of this account.
func (*PlatformHubAzureOidcAccount) GetDescription ¶ added in v2.95.0
func (a *PlatformHubAzureOidcAccount) GetDescription() string
GetDescription returns the description of the account.
func (*PlatformHubAzureOidcAccount) GetName ¶ added in v2.95.0
func (a *PlatformHubAzureOidcAccount) GetName() string
GetName returns the name of the account.
func (*PlatformHubAzureOidcAccount) SetDescription ¶ added in v2.95.0
func (a *PlatformHubAzureOidcAccount) SetDescription(description string)
SetDescription sets the description of the account.
func (*PlatformHubAzureOidcAccount) SetName ¶ added in v2.95.0
func (a *PlatformHubAzureOidcAccount) SetName(name string)
SetName sets the name of the account.
func (*PlatformHubAzureOidcAccount) Validate ¶ added in v2.95.0
func (a *PlatformHubAzureOidcAccount) Validate() error
type PlatformHubAzureServicePrincipalAccount ¶ added in v2.95.0
type PlatformHubAzureServicePrincipalAccount struct {
SubscriptionID string `json:"SubscriptionNumber" validate:"required"`
TenantID string `json:"TenantId" validate:"required"`
ApplicationID string `json:"ClientId" validate:"required"`
Password *core.SensitiveValue `json:"Password" validate:"required"`
AzureEnvironment string `json:"AzureEnvironment,omitempty"`
AuthenticationEndpoint string `json:"ActiveDirectoryEndpointBaseUri,omitempty"`
ResourceManagementEndpoint string `json:"ResourceManagementEndpointBaseUri,omitempty"`
// contains filtered or unexported fields
}
PlatformHubAzureServicePrincipalAccount represents a Platform Hub Azure Service Principal account.
func NewPlatformHubAzureServicePrincipalAccount ¶ added in v2.95.0
func NewPlatformHubAzureServicePrincipalAccount(name string, subscriptionID string, tenantID string, applicationID string, password *core.SensitiveValue) (*PlatformHubAzureServicePrincipalAccount, error)
NewPlatformHubAzureServicePrincipalAccount initializes and returns a Platform Hub Azure Service Principal account with a name, subscription ID, tenant ID, application ID, and password.
func (*PlatformHubAzureServicePrincipalAccount) GetAccountType ¶ added in v2.95.0
func (a *PlatformHubAzureServicePrincipalAccount) GetAccountType() PlatformHubAccountType
GetAccountType returns the type of this account.
func (*PlatformHubAzureServicePrincipalAccount) GetDescription ¶ added in v2.95.0
func (a *PlatformHubAzureServicePrincipalAccount) GetDescription() string
GetDescription returns the description of the account.
func (*PlatformHubAzureServicePrincipalAccount) GetName ¶ added in v2.95.0
func (a *PlatformHubAzureServicePrincipalAccount) GetName() string
GetName returns the name of the account.
func (*PlatformHubAzureServicePrincipalAccount) SetDescription ¶ added in v2.95.0
func (a *PlatformHubAzureServicePrincipalAccount) SetDescription(description string)
SetDescription sets the description of the account.
func (*PlatformHubAzureServicePrincipalAccount) SetName ¶ added in v2.95.0
func (a *PlatformHubAzureServicePrincipalAccount) SetName(name string)
SetName sets the name of the account.
func (*PlatformHubAzureServicePrincipalAccount) Validate ¶ added in v2.95.0
func (a *PlatformHubAzureServicePrincipalAccount) Validate() error
type PlatformHubGcpAccount ¶ added in v2.95.0
type PlatformHubGcpAccount struct {
JsonKey *core.SensitiveValue `json:"JsonKey" validate:"required"`
// contains filtered or unexported fields
}
PlatformHubGcpAccount represents a Platform Hub GCP account.
func NewPlatformHubGcpAccount ¶ added in v2.95.0
func NewPlatformHubGcpAccount(name string, jsonKey *core.SensitiveValue) (*PlatformHubGcpAccount, error)
NewPlatformHubGcpAccount initializes and returns a Platform Hub GCP account with a name and JSON key.
func (*PlatformHubGcpAccount) GetAccountType ¶ added in v2.95.0
func (a *PlatformHubGcpAccount) GetAccountType() PlatformHubAccountType
GetAccountType returns the type of this account.
func (*PlatformHubGcpAccount) GetDescription ¶ added in v2.95.0
func (a *PlatformHubGcpAccount) GetDescription() string
GetDescription returns the description of the account.
func (*PlatformHubGcpAccount) GetName ¶ added in v2.95.0
func (a *PlatformHubGcpAccount) GetName() string
GetName returns the name of the account.
func (*PlatformHubGcpAccount) SetDescription ¶ added in v2.95.0
func (a *PlatformHubGcpAccount) SetDescription(description string)
SetDescription sets the description of the account.
func (*PlatformHubGcpAccount) SetName ¶ added in v2.95.0
func (a *PlatformHubGcpAccount) SetName(name string)
SetName sets the name of the account.
func (*PlatformHubGcpAccount) Validate ¶ added in v2.95.0
func (a *PlatformHubGcpAccount) Validate() error
Validate checks the state of this account and returns an error if invalid.
type PlatformHubGenericOidcAccount ¶ added in v2.95.0
type PlatformHubGenericOidcAccount struct {
ExecutionSubjectKeys []string `json:"ExecutionSubjectKeys,omitempty" validate:"omitempty,dive,oneof=space environment project tenant runbook account type"`
Audience string `json:"Audience,omitempty"`
// contains filtered or unexported fields
}
PlatformHubGenericOidcAccount represents a Platform Hub Generic OIDC account.
func NewPlatformHubGenericOidcAccount ¶ added in v2.95.0
func NewPlatformHubGenericOidcAccount(name string) (*PlatformHubGenericOidcAccount, error)
NewPlatformHubGenericOidcAccount initializes and returns a Platform Hub Generic OIDC account with a name.
func (*PlatformHubGenericOidcAccount) GetAccountType ¶ added in v2.95.0
func (a *PlatformHubGenericOidcAccount) GetAccountType() PlatformHubAccountType
GetAccountType returns the type of this account.
func (*PlatformHubGenericOidcAccount) GetDescription ¶ added in v2.95.0
func (a *PlatformHubGenericOidcAccount) GetDescription() string
GetDescription returns the description of the account.
func (*PlatformHubGenericOidcAccount) GetName ¶ added in v2.95.0
func (a *PlatformHubGenericOidcAccount) GetName() string
GetName returns the name of the account.
func (*PlatformHubGenericOidcAccount) SetDescription ¶ added in v2.95.0
func (a *PlatformHubGenericOidcAccount) SetDescription(description string)
SetDescription sets the description of the account.
func (*PlatformHubGenericOidcAccount) SetName ¶ added in v2.95.0
func (a *PlatformHubGenericOidcAccount) SetName(name string)
SetName sets the name of the account.
func (*PlatformHubGenericOidcAccount) Validate ¶ added in v2.95.0
func (a *PlatformHubGenericOidcAccount) Validate() error
Validate checks the state of this account and returns an error if invalid.
type PlatformHubUsernamePasswordAccount ¶ added in v2.95.0
type PlatformHubUsernamePasswordAccount struct {
Username string `json:"Username" validate:"required"`
Password *core.SensitiveValue `json:"Password" validate:"required"`
// contains filtered or unexported fields
}
PlatformHubUsernamePasswordAccount represents a Platform Hub Username-Password account.
func NewPlatformHubUsernamePasswordAccount ¶ added in v2.95.0
func NewPlatformHubUsernamePasswordAccount(name string, username string, password *core.SensitiveValue) (*PlatformHubUsernamePasswordAccount, error)
NewPlatformHubUsernamePasswordAccount initializes and returns a Platform Hub Username-Password account with a name, username, and password.
func (*PlatformHubUsernamePasswordAccount) GetAccountType ¶ added in v2.95.0
func (a *PlatformHubUsernamePasswordAccount) GetAccountType() PlatformHubAccountType
GetAccountType returns the type of this account.
func (*PlatformHubUsernamePasswordAccount) GetDescription ¶ added in v2.95.0
func (a *PlatformHubUsernamePasswordAccount) GetDescription() string
GetDescription returns the description of the account.
func (*PlatformHubUsernamePasswordAccount) GetName ¶ added in v2.95.0
func (a *PlatformHubUsernamePasswordAccount) GetName() string
GetName returns the name of the account.
func (*PlatformHubUsernamePasswordAccount) SetDescription ¶ added in v2.95.0
func (a *PlatformHubUsernamePasswordAccount) SetDescription(description string)
SetDescription sets the description of the account.
func (*PlatformHubUsernamePasswordAccount) SetName ¶ added in v2.95.0
func (a *PlatformHubUsernamePasswordAccount) SetName(name string)
SetName sets the name of the account.
func (*PlatformHubUsernamePasswordAccount) Validate ¶ added in v2.95.0
func (a *PlatformHubUsernamePasswordAccount) Validate() error
Source Files
¶
- platform_hub_account.go
- platform_hub_account_resource.go
- platform_hub_account_service.go
- platform_hub_account_types.go
- platform_hub_aws_account.go
- platform_hub_aws_oidc_account.go
- platform_hub_azure_oidc_account.go
- platform_hub_azure_service_principal_account.go
- platform_hub_gcp_account.go
- platform_hub_generic_oidc_account.go
- platform_hub_username_password_account.go