diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml index b343fff..0d869ec 100644 --- a/.trunk/trunk.yaml +++ b/.trunk/trunk.yaml @@ -2,7 +2,7 @@ # To learn more about the format of this file, see https://docs.trunk.io/reference/trunk-yaml version: 0.1 cli: - version: 1.22.8 + version: 1.22.9 # Trunk provides extensibility via plugins. (https://docs.trunk.io/plugins) plugins: sources: @@ -18,16 +18,16 @@ runtimes: # This is the section where you manage your linters. (https://docs.trunk.io/check/configuration) lint: enabled: - - actionlint@1.7.5 - - checkov@3.2.346 + - actionlint@1.7.6 + - checkov@3.2.353 - git-diff-check - gofmt@1.20.4 - - golangci-lint@1.62.2 + - golangci-lint@1.63.4 - markdownlint@0.43.0 - osv-scanner@1.9.2 - prettier@3.4.2 - - trivy@0.58.1 - - trufflehog@3.88.0 + - trivy@0.58.2 + - trufflehog@3.88.2 - yamllint@1.35.1 actions: enabled: diff --git a/generator/main.go b/generator/main.go index c36995e..c03e001 100644 --- a/generator/main.go +++ b/generator/main.go @@ -553,7 +553,9 @@ func fmtStruct(s *Schema) *jen.Statement { // Adds json tags tag := jsonName - if !p.required { + if !(p.required || p.Nullable) { + // There are optional nullable fields. + // Which become required in Go. tag += ",omitempty" } diff --git a/generator/models.go b/generator/models.go index 3846f76..692b7c4 100644 --- a/generator/models.go +++ b/generator/models.go @@ -163,6 +163,7 @@ type Schema struct { Ref string `json:"$ref"` Description string `json:"description"` CamelName string `json:"for-hash-only!"` + Nullable bool `json:"nullable"` required bool name string propertyNames []string diff --git a/handler/account/account.go b/handler/account/account.go index 2bc1134..2f1bd1c 100644 --- a/handler/account/account.go +++ b/handler/account/account.go @@ -555,37 +555,39 @@ type EventOut struct { type MemberType string const ( - MemberTypeAdmin MemberType = "admin" - MemberTypeDeveloper MemberType = "developer" - MemberTypeOperator MemberType = "operator" - MemberTypeOrganizationAppUsersWrite MemberType = "organization:app_users:write" - MemberTypeOrganizationAuditLogsRead MemberType = "organization:audit_logs:read" - MemberTypeOrganizationDomainsWrite MemberType = "organization:domains:write" - MemberTypeOrganizationGroupsWrite MemberType = "organization:groups:write" - MemberTypeOrganizationIdpsWrite MemberType = "organization:idps:write" - MemberTypeOrganizationProjectsWrite MemberType = "organization:projects:write" - MemberTypeOrganizationUsersWrite MemberType = "organization:users:write" - MemberTypeProjectAuditLogsRead MemberType = "project:audit_logs:read" - MemberTypeProjectIntegrationsRead MemberType = "project:integrations:read" - MemberTypeProjectIntegrationsWrite MemberType = "project:integrations:write" - MemberTypeProjectNetworkingRead MemberType = "project:networking:read" - MemberTypeProjectNetworkingWrite MemberType = "project:networking:write" - MemberTypeProjectPermissionsRead MemberType = "project:permissions:read" - MemberTypeProjectServicesRead MemberType = "project:services:read" - MemberTypeProjectServicesWrite MemberType = "project:services:write" - MemberTypeReadOnly MemberType = "read_only" - MemberTypeRoleOrganizationAdmin MemberType = "role:organization:admin" - MemberTypeRoleServicesMaintenance MemberType = "role:services:maintenance" - MemberTypeRoleServicesRecover MemberType = "role:services:recover" - MemberTypeServiceConfigurationWrite MemberType = "service:configuration:write" - MemberTypeServiceDataWrite MemberType = "service:data:write" - MemberTypeServiceLogsRead MemberType = "service:logs:read" - MemberTypeServiceSecretsRead MemberType = "service:secrets:read" - MemberTypeServiceUsersWrite MemberType = "service:users:write" + MemberTypeAdmin MemberType = "admin" + MemberTypeDeveloper MemberType = "developer" + MemberTypeOperator MemberType = "operator" + MemberTypeOrganizationAppUsersWrite MemberType = "organization:app_users:write" + MemberTypeOrganizationAuditLogsRead MemberType = "organization:audit_logs:read" + MemberTypeOrganizationDomainsWrite MemberType = "organization:domains:write" + MemberTypeOrganizationGroupsWrite MemberType = "organization:groups:write" + MemberTypeOrganizationIdpsWrite MemberType = "organization:idps:write" + MemberTypeOrganizationNetworkingRead MemberType = "organization:networking:read" + MemberTypeOrganizationNetworkingWrite MemberType = "organization:networking:write" + MemberTypeOrganizationProjectsWrite MemberType = "organization:projects:write" + MemberTypeOrganizationUsersWrite MemberType = "organization:users:write" + MemberTypeProjectAuditLogsRead MemberType = "project:audit_logs:read" + MemberTypeProjectIntegrationsRead MemberType = "project:integrations:read" + MemberTypeProjectIntegrationsWrite MemberType = "project:integrations:write" + MemberTypeProjectNetworkingRead MemberType = "project:networking:read" + MemberTypeProjectNetworkingWrite MemberType = "project:networking:write" + MemberTypeProjectPermissionsRead MemberType = "project:permissions:read" + MemberTypeProjectServicesRead MemberType = "project:services:read" + MemberTypeProjectServicesWrite MemberType = "project:services:write" + MemberTypeReadOnly MemberType = "read_only" + MemberTypeRoleOrganizationAdmin MemberType = "role:organization:admin" + MemberTypeRoleServicesMaintenance MemberType = "role:services:maintenance" + MemberTypeRoleServicesRecover MemberType = "role:services:recover" + MemberTypeServiceConfigurationWrite MemberType = "service:configuration:write" + MemberTypeServiceDataWrite MemberType = "service:data:write" + MemberTypeServiceLogsRead MemberType = "service:logs:read" + MemberTypeServiceSecretsRead MemberType = "service:secrets:read" + MemberTypeServiceUsersWrite MemberType = "service:users:write" ) func MemberTypeChoices() []string { - return []string{"admin", "developer", "operator", "organization:app_users:write", "organization:audit_logs:read", "organization:domains:write", "organization:groups:write", "organization:idps:write", "organization:projects:write", "organization:users:write", "project:audit_logs:read", "project:integrations:read", "project:integrations:write", "project:networking:read", "project:networking:write", "project:permissions:read", "project:services:read", "project:services:write", "read_only", "role:organization:admin", "role:services:maintenance", "role:services:recover", "service:configuration:write", "service:data:write", "service:logs:read", "service:secrets:read", "service:users:write"} + return []string{"admin", "developer", "operator", "organization:app_users:write", "organization:audit_logs:read", "organization:domains:write", "organization:groups:write", "organization:idps:write", "organization:networking:read", "organization:networking:write", "organization:projects:write", "organization:users:write", "project:audit_logs:read", "project:integrations:read", "project:integrations:write", "project:networking:read", "project:networking:write", "project:permissions:read", "project:services:read", "project:services:write", "read_only", "role:organization:admin", "role:services:maintenance", "role:services:recover", "service:configuration:write", "service:data:write", "service:logs:read", "service:secrets:read", "service:users:write"} } type OrderByType string @@ -661,37 +663,39 @@ type TeamOut struct { type TeamType string const ( - TeamTypeAdmin TeamType = "admin" - TeamTypeOperator TeamType = "operator" - TeamTypeDeveloper TeamType = "developer" - TeamTypeReadOnly TeamType = "read_only" - TeamTypeProjectIntegrationsRead TeamType = "project:integrations:read" - TeamTypeProjectIntegrationsWrite TeamType = "project:integrations:write" - TeamTypeProjectNetworkingRead TeamType = "project:networking:read" - TeamTypeProjectNetworkingWrite TeamType = "project:networking:write" - TeamTypeProjectPermissionsRead TeamType = "project:permissions:read" - TeamTypeServiceConfigurationWrite TeamType = "service:configuration:write" - TeamTypeServiceLogsRead TeamType = "service:logs:read" - TeamTypeProjectServicesRead TeamType = "project:services:read" - TeamTypeProjectServicesWrite TeamType = "project:services:write" - TeamTypeProjectAuditLogsRead TeamType = "project:audit_logs:read" - TeamTypeServiceDataWrite TeamType = "service:data:write" - TeamTypeServiceSecretsRead TeamType = "service:secrets:read" - TeamTypeServiceUsersWrite TeamType = "service:users:write" - TeamTypeRoleServicesMaintenance TeamType = "role:services:maintenance" - TeamTypeRoleServicesRecover TeamType = "role:services:recover" - TeamTypeOrganizationAuditLogsRead TeamType = "organization:audit_logs:read" - TeamTypeOrganizationProjectsWrite TeamType = "organization:projects:write" - TeamTypeOrganizationUsersWrite TeamType = "organization:users:write" - TeamTypeOrganizationAppUsersWrite TeamType = "organization:app_users:write" - TeamTypeOrganizationGroupsWrite TeamType = "organization:groups:write" - TeamTypeOrganizationIdpsWrite TeamType = "organization:idps:write" - TeamTypeOrganizationDomainsWrite TeamType = "organization:domains:write" - TeamTypeRoleOrganizationAdmin TeamType = "role:organization:admin" + TeamTypeAdmin TeamType = "admin" + TeamTypeOperator TeamType = "operator" + TeamTypeDeveloper TeamType = "developer" + TeamTypeReadOnly TeamType = "read_only" + TeamTypeProjectIntegrationsRead TeamType = "project:integrations:read" + TeamTypeProjectIntegrationsWrite TeamType = "project:integrations:write" + TeamTypeProjectNetworkingRead TeamType = "project:networking:read" + TeamTypeProjectNetworkingWrite TeamType = "project:networking:write" + TeamTypeProjectPermissionsRead TeamType = "project:permissions:read" + TeamTypeServiceConfigurationWrite TeamType = "service:configuration:write" + TeamTypeServiceLogsRead TeamType = "service:logs:read" + TeamTypeProjectServicesRead TeamType = "project:services:read" + TeamTypeProjectServicesWrite TeamType = "project:services:write" + TeamTypeProjectAuditLogsRead TeamType = "project:audit_logs:read" + TeamTypeServiceDataWrite TeamType = "service:data:write" + TeamTypeServiceSecretsRead TeamType = "service:secrets:read" + TeamTypeServiceUsersWrite TeamType = "service:users:write" + TeamTypeRoleServicesMaintenance TeamType = "role:services:maintenance" + TeamTypeRoleServicesRecover TeamType = "role:services:recover" + TeamTypeOrganizationAuditLogsRead TeamType = "organization:audit_logs:read" + TeamTypeOrganizationProjectsWrite TeamType = "organization:projects:write" + TeamTypeOrganizationUsersWrite TeamType = "organization:users:write" + TeamTypeOrganizationAppUsersWrite TeamType = "organization:app_users:write" + TeamTypeOrganizationGroupsWrite TeamType = "organization:groups:write" + TeamTypeOrganizationIdpsWrite TeamType = "organization:idps:write" + TeamTypeOrganizationDomainsWrite TeamType = "organization:domains:write" + TeamTypeOrganizationNetworkingRead TeamType = "organization:networking:read" + TeamTypeOrganizationNetworkingWrite TeamType = "organization:networking:write" + TeamTypeRoleOrganizationAdmin TeamType = "role:organization:admin" ) func TeamTypeChoices() []string { - return []string{"admin", "operator", "developer", "read_only", "project:integrations:read", "project:integrations:write", "project:networking:read", "project:networking:write", "project:permissions:read", "service:configuration:write", "service:logs:read", "project:services:read", "project:services:write", "project:audit_logs:read", "service:data:write", "service:secrets:read", "service:users:write", "role:services:maintenance", "role:services:recover", "organization:audit_logs:read", "organization:projects:write", "organization:users:write", "organization:app_users:write", "organization:groups:write", "organization:idps:write", "organization:domains:write", "role:organization:admin"} + return []string{"admin", "operator", "developer", "read_only", "project:integrations:read", "project:integrations:write", "project:networking:read", "project:networking:write", "project:permissions:read", "service:configuration:write", "service:logs:read", "project:services:read", "project:services:write", "project:audit_logs:read", "service:data:write", "service:secrets:read", "service:users:write", "role:services:maintenance", "role:services:recover", "organization:audit_logs:read", "organization:projects:write", "organization:users:write", "organization:app_users:write", "organization:groups:write", "organization:idps:write", "organization:domains:write", "organization:networking:read", "organization:networking:write", "role:organization:admin"} } type TechEmailOut struct { diff --git a/handler/accountteam/accountteam.go b/handler/accountteam/accountteam.go index ec80318..965e5f7 100644 --- a/handler/accountteam/accountteam.go +++ b/handler/accountteam/accountteam.go @@ -244,37 +244,39 @@ type TeamOut struct { type TeamType string const ( - TeamTypeAdmin TeamType = "admin" - TeamTypeOperator TeamType = "operator" - TeamTypeDeveloper TeamType = "developer" - TeamTypeReadOnly TeamType = "read_only" - TeamTypeProjectIntegrationsRead TeamType = "project:integrations:read" - TeamTypeProjectIntegrationsWrite TeamType = "project:integrations:write" - TeamTypeProjectNetworkingRead TeamType = "project:networking:read" - TeamTypeProjectNetworkingWrite TeamType = "project:networking:write" - TeamTypeProjectPermissionsRead TeamType = "project:permissions:read" - TeamTypeServiceConfigurationWrite TeamType = "service:configuration:write" - TeamTypeServiceLogsRead TeamType = "service:logs:read" - TeamTypeProjectServicesRead TeamType = "project:services:read" - TeamTypeProjectServicesWrite TeamType = "project:services:write" - TeamTypeProjectAuditLogsRead TeamType = "project:audit_logs:read" - TeamTypeServiceDataWrite TeamType = "service:data:write" - TeamTypeServiceSecretsRead TeamType = "service:secrets:read" - TeamTypeServiceUsersWrite TeamType = "service:users:write" - TeamTypeRoleServicesMaintenance TeamType = "role:services:maintenance" - TeamTypeRoleServicesRecover TeamType = "role:services:recover" - TeamTypeOrganizationAuditLogsRead TeamType = "organization:audit_logs:read" - TeamTypeOrganizationProjectsWrite TeamType = "organization:projects:write" - TeamTypeOrganizationUsersWrite TeamType = "organization:users:write" - TeamTypeOrganizationAppUsersWrite TeamType = "organization:app_users:write" - TeamTypeOrganizationGroupsWrite TeamType = "organization:groups:write" - TeamTypeOrganizationIdpsWrite TeamType = "organization:idps:write" - TeamTypeOrganizationDomainsWrite TeamType = "organization:domains:write" - TeamTypeRoleOrganizationAdmin TeamType = "role:organization:admin" + TeamTypeAdmin TeamType = "admin" + TeamTypeOperator TeamType = "operator" + TeamTypeDeveloper TeamType = "developer" + TeamTypeReadOnly TeamType = "read_only" + TeamTypeProjectIntegrationsRead TeamType = "project:integrations:read" + TeamTypeProjectIntegrationsWrite TeamType = "project:integrations:write" + TeamTypeProjectNetworkingRead TeamType = "project:networking:read" + TeamTypeProjectNetworkingWrite TeamType = "project:networking:write" + TeamTypeProjectPermissionsRead TeamType = "project:permissions:read" + TeamTypeServiceConfigurationWrite TeamType = "service:configuration:write" + TeamTypeServiceLogsRead TeamType = "service:logs:read" + TeamTypeProjectServicesRead TeamType = "project:services:read" + TeamTypeProjectServicesWrite TeamType = "project:services:write" + TeamTypeProjectAuditLogsRead TeamType = "project:audit_logs:read" + TeamTypeServiceDataWrite TeamType = "service:data:write" + TeamTypeServiceSecretsRead TeamType = "service:secrets:read" + TeamTypeServiceUsersWrite TeamType = "service:users:write" + TeamTypeRoleServicesMaintenance TeamType = "role:services:maintenance" + TeamTypeRoleServicesRecover TeamType = "role:services:recover" + TeamTypeOrganizationAuditLogsRead TeamType = "organization:audit_logs:read" + TeamTypeOrganizationProjectsWrite TeamType = "organization:projects:write" + TeamTypeOrganizationUsersWrite TeamType = "organization:users:write" + TeamTypeOrganizationAppUsersWrite TeamType = "organization:app_users:write" + TeamTypeOrganizationGroupsWrite TeamType = "organization:groups:write" + TeamTypeOrganizationIdpsWrite TeamType = "organization:idps:write" + TeamTypeOrganizationDomainsWrite TeamType = "organization:domains:write" + TeamTypeOrganizationNetworkingRead TeamType = "organization:networking:read" + TeamTypeOrganizationNetworkingWrite TeamType = "organization:networking:write" + TeamTypeRoleOrganizationAdmin TeamType = "role:organization:admin" ) func TeamTypeChoices() []string { - return []string{"admin", "operator", "developer", "read_only", "project:integrations:read", "project:integrations:write", "project:networking:read", "project:networking:write", "project:permissions:read", "service:configuration:write", "service:logs:read", "project:services:read", "project:services:write", "project:audit_logs:read", "service:data:write", "service:secrets:read", "service:users:write", "role:services:maintenance", "role:services:recover", "organization:audit_logs:read", "organization:projects:write", "organization:users:write", "organization:app_users:write", "organization:groups:write", "organization:idps:write", "organization:domains:write", "role:organization:admin"} + return []string{"admin", "operator", "developer", "read_only", "project:integrations:read", "project:integrations:write", "project:networking:read", "project:networking:write", "project:permissions:read", "service:configuration:write", "service:logs:read", "project:services:read", "project:services:write", "project:audit_logs:read", "service:data:write", "service:secrets:read", "service:users:write", "role:services:maintenance", "role:services:recover", "organization:audit_logs:read", "organization:projects:write", "organization:users:write", "organization:app_users:write", "organization:groups:write", "organization:idps:write", "organization:domains:write", "organization:networking:read", "organization:networking:write", "role:organization:admin"} } // accountTeamCreateOut AccountTeamCreateResponse diff --git a/handler/applicationuser/applicationuser.go b/handler/applicationuser/applicationuser.go index 5fba212..6fdad2e 100644 --- a/handler/applicationuser/applicationuser.go +++ b/handler/applicationuser/applicationuser.go @@ -158,6 +158,7 @@ func (h *ApplicationUserHandler) ApplicationUsersList(ctx context.Context, organ type ApplicationUserAccessTokenCreateIn struct { Description string `json:"description"` ExtendWhenUsed *bool `json:"extend_when_used,omitempty"` // Extend token expiration time when token is used. Only applicable if max_age_seconds is specified. + IpAllowlist *[]string `json:"ip_allowlist,omitempty"` // List of allowed IP ranges MaxAgeSeconds *int `json:"max_age_seconds,omitempty"` // Time the token remains valid since creation (or since last use if extend_when_used is true) Scopes *[]string `json:"scopes,omitempty"` // Scopes this token is restricted to if specified } @@ -216,6 +217,7 @@ type TokenOut struct { Description *string `json:"description,omitempty"` ExpiryTime *time.Time `json:"expiry_time,omitempty"` // Timestamp when the access token will expire unless extended, if ever ExtendWhenUsed *bool `json:"extend_when_used,omitempty"` // Extend token expiration time when token is used. Only applicable if max_age_seconds is specified. + IpAllowlist []string `json:"ip_allowlist,omitempty"` // List of allowed IP ranges LastIp *string `json:"last_ip,omitempty"` // IP address the access token was last used from in case it has ever been used LastUsedTime *time.Time `json:"last_used_time,omitempty"` // Timestamp when the access token was last used, if ever LastUserAgent *string `json:"last_user_agent,omitempty"` // User agent string of the client that last used the token in case it has ever been used diff --git a/handler/kafka/kafka.go b/handler/kafka/kafka.go index c870ce5..8007070 100644 --- a/handler/kafka/kafka.go +++ b/handler/kafka/kafka.go @@ -361,16 +361,16 @@ type QuotaOut struct { type ResourceType string const ( - ResourceTypeTopic ResourceType = "Topic" - ResourceTypeGroup ResourceType = "Group" ResourceTypeCluster ResourceType = "Cluster" - ResourceTypeTransactionalId ResourceType = "TransactionalId" ResourceTypeDelegationToken ResourceType = "DelegationToken" + ResourceTypeGroup ResourceType = "Group" + ResourceTypeTopic ResourceType = "Topic" + ResourceTypeTransactionalId ResourceType = "TransactionalId" ResourceTypeUser ResourceType = "User" ) func ResourceTypeChoices() []string { - return []string{"Topic", "Group", "Cluster", "TransactionalId", "DelegationToken", "User"} + return []string{"Cluster", "DelegationToken", "Group", "Topic", "TransactionalId", "User"} } // ServiceKafkaAclAddIn ServiceKafkaAclAddRequestBody diff --git a/handler/kafkaconnect/kafkaconnect.go b/handler/kafkaconnect/kafkaconnect.go index 59d13e8..3a2fcff 100644 --- a/handler/kafkaconnect/kafkaconnect.go +++ b/handler/kafkaconnect/kafkaconnect.go @@ -183,6 +183,12 @@ func (h *KafkaConnectHandler) ServiceKafkaConnectResumeConnector(ctx context.Con return err } +type AvailableVersionOut struct { + Deprecated *bool `json:"deprecated,omitempty"` // If the version is deprecated. + NeedsMaintenance *bool `json:"needs_maintenance,omitempty"` // Using this version requires a maintenance update. + Version *string `json:"version,omitempty"` // Connector version number +} + // ConfigOut Connector configuration parameters type ConfigOut struct { ConnectorClass string `json:"connector.class"` // The Java class for the connector @@ -238,14 +244,16 @@ func ImportanceTypeChoices() []string { // PluginOut Kafka Connector plugin information type PluginOut struct { - Author string `json:"author"` // Connector author name - Class string `json:"class"` // Connector class name - DocUrl string `json:"docURL"` // Connector documentation URL - Preview *bool `json:"preview,omitempty"` // Describes if connector is in beta - PreviewInfo *string `json:"preview_info,omitempty"` // Information about beta stage of connector - Title string `json:"title"` // Descriptive human readable name defined by Aiven - Type PluginType `json:"type"` // Describes whether data flows from or to Kafka - Version string `json:"version"` // Connector version number + Author string `json:"author"` // Connector author name + AvailableVersions []AvailableVersionOut `json:"available_versions,omitempty"` // Versions available on the service + Class string `json:"class"` // Connector class name + DocUrl string `json:"docURL"` // Connector documentation URL + PluginName *string `json:"plugin_name,omitempty"` // Connector plugin name + Preview *bool `json:"preview,omitempty"` // Describes if connector is in beta + PreviewInfo *string `json:"preview_info,omitempty"` // Information about beta stage of connector + Title string `json:"title"` // Descriptive human readable name defined by Aiven + Type PluginType `json:"type"` // Describes whether data flows from or to Kafka + Version string `json:"version"` // Connector version number } type PluginType string @@ -300,14 +308,16 @@ type ServiceKafkaConnectEditConnectorOut struct { Tasks []TaskOut `json:"tasks"` // List of tasks of a connector } type ServiceKafkaConnectGetAvailableConnectorsOut struct { - Author string `json:"author"` // Connector author name - Class string `json:"class"` // Connector class name - DocUrl string `json:"docURL"` // Connector documentation URL - Preview *bool `json:"preview,omitempty"` // Describes if connector is in beta - PreviewInfo *string `json:"preview_info,omitempty"` // Information about beta stage of connector - Title string `json:"title"` // Descriptive human readable name defined by Aiven - Type PluginType `json:"type"` // Describes whether data flows from or to Kafka - Version string `json:"version"` // Connector version number + Author string `json:"author"` // Connector author name + AvailableVersions []AvailableVersionOut `json:"available_versions,omitempty"` // Versions available on the service + Class string `json:"class"` // Connector class name + DocUrl string `json:"docURL"` // Connector documentation URL + PluginName *string `json:"plugin_name,omitempty"` // Connector plugin name + Preview *bool `json:"preview,omitempty"` // Describes if connector is in beta + PreviewInfo *string `json:"preview_info,omitempty"` // Information about beta stage of connector + Title string `json:"title"` // Descriptive human readable name defined by Aiven + Type PluginType `json:"type"` // Describes whether data flows from or to Kafka + Version string `json:"version"` // Connector version number } // ServiceKafkaConnectGetConnectorStatusOut Connector status information diff --git a/handler/organizationuser/organizationuser.go b/handler/organizationuser/organizationuser.go index 33c6182..353adc3 100644 --- a/handler/organizationuser/organizationuser.go +++ b/handler/organizationuser/organizationuser.go @@ -274,6 +274,7 @@ type OrganizationUserUpdateOut struct { } type TokenOut struct { Description string `json:"description"` + IpAllowlist []string `json:"ip_allowlist"` // List of IP addresses that are allowed to use the token LastIp string `json:"last_ip"` // Last-used IP LastUsedTime time.Time `json:"last_used_time"` // Last-used time LastUserAgent string `json:"last_user_agent"` // Last-used user agent diff --git a/handler/project/project.go b/handler/project/project.go index 27f315b..5e8e676 100644 --- a/handler/project/project.go +++ b/handler/project/project.go @@ -447,37 +447,39 @@ type AlloydbomniOut struct { type AnyType string const ( - AnyTypeAdmin AnyType = "admin" - AnyTypeDeveloper AnyType = "developer" - AnyTypeOperator AnyType = "operator" - AnyTypeOrganizationAppUsersWrite AnyType = "organization:app_users:write" - AnyTypeOrganizationAuditLogsRead AnyType = "organization:audit_logs:read" - AnyTypeOrganizationDomainsWrite AnyType = "organization:domains:write" - AnyTypeOrganizationGroupsWrite AnyType = "organization:groups:write" - AnyTypeOrganizationIdpsWrite AnyType = "organization:idps:write" - AnyTypeOrganizationProjectsWrite AnyType = "organization:projects:write" - AnyTypeOrganizationUsersWrite AnyType = "organization:users:write" - AnyTypeProjectAuditLogsRead AnyType = "project:audit_logs:read" - AnyTypeProjectIntegrationsRead AnyType = "project:integrations:read" - AnyTypeProjectIntegrationsWrite AnyType = "project:integrations:write" - AnyTypeProjectNetworkingRead AnyType = "project:networking:read" - AnyTypeProjectNetworkingWrite AnyType = "project:networking:write" - AnyTypeProjectPermissionsRead AnyType = "project:permissions:read" - AnyTypeProjectServicesRead AnyType = "project:services:read" - AnyTypeProjectServicesWrite AnyType = "project:services:write" - AnyTypeReadOnly AnyType = "read_only" - AnyTypeRoleOrganizationAdmin AnyType = "role:organization:admin" - AnyTypeRoleServicesMaintenance AnyType = "role:services:maintenance" - AnyTypeRoleServicesRecover AnyType = "role:services:recover" - AnyTypeServiceConfigurationWrite AnyType = "service:configuration:write" - AnyTypeServiceDataWrite AnyType = "service:data:write" - AnyTypeServiceLogsRead AnyType = "service:logs:read" - AnyTypeServiceSecretsRead AnyType = "service:secrets:read" - AnyTypeServiceUsersWrite AnyType = "service:users:write" + AnyTypeAdmin AnyType = "admin" + AnyTypeDeveloper AnyType = "developer" + AnyTypeOperator AnyType = "operator" + AnyTypeOrganizationAppUsersWrite AnyType = "organization:app_users:write" + AnyTypeOrganizationAuditLogsRead AnyType = "organization:audit_logs:read" + AnyTypeOrganizationDomainsWrite AnyType = "organization:domains:write" + AnyTypeOrganizationGroupsWrite AnyType = "organization:groups:write" + AnyTypeOrganizationIdpsWrite AnyType = "organization:idps:write" + AnyTypeOrganizationNetworkingRead AnyType = "organization:networking:read" + AnyTypeOrganizationNetworkingWrite AnyType = "organization:networking:write" + AnyTypeOrganizationProjectsWrite AnyType = "organization:projects:write" + AnyTypeOrganizationUsersWrite AnyType = "organization:users:write" + AnyTypeProjectAuditLogsRead AnyType = "project:audit_logs:read" + AnyTypeProjectIntegrationsRead AnyType = "project:integrations:read" + AnyTypeProjectIntegrationsWrite AnyType = "project:integrations:write" + AnyTypeProjectNetworkingRead AnyType = "project:networking:read" + AnyTypeProjectNetworkingWrite AnyType = "project:networking:write" + AnyTypeProjectPermissionsRead AnyType = "project:permissions:read" + AnyTypeProjectServicesRead AnyType = "project:services:read" + AnyTypeProjectServicesWrite AnyType = "project:services:write" + AnyTypeReadOnly AnyType = "read_only" + AnyTypeRoleOrganizationAdmin AnyType = "role:organization:admin" + AnyTypeRoleServicesMaintenance AnyType = "role:services:maintenance" + AnyTypeRoleServicesRecover AnyType = "role:services:recover" + AnyTypeServiceConfigurationWrite AnyType = "service:configuration:write" + AnyTypeServiceDataWrite AnyType = "service:data:write" + AnyTypeServiceLogsRead AnyType = "service:logs:read" + AnyTypeServiceSecretsRead AnyType = "service:secrets:read" + AnyTypeServiceUsersWrite AnyType = "service:users:write" ) func AnyTypeChoices() []string { - return []string{"admin", "developer", "operator", "organization:app_users:write", "organization:audit_logs:read", "organization:domains:write", "organization:groups:write", "organization:idps:write", "organization:projects:write", "organization:users:write", "project:audit_logs:read", "project:integrations:read", "project:integrations:write", "project:networking:read", "project:networking:write", "project:permissions:read", "project:services:read", "project:services:write", "read_only", "role:organization:admin", "role:services:maintenance", "role:services:recover", "service:configuration:write", "service:data:write", "service:logs:read", "service:secrets:read", "service:users:write"} + return []string{"admin", "developer", "operator", "organization:app_users:write", "organization:audit_logs:read", "organization:domains:write", "organization:groups:write", "organization:idps:write", "organization:networking:read", "organization:networking:write", "organization:projects:write", "organization:users:write", "project:audit_logs:read", "project:integrations:read", "project:integrations:write", "project:networking:read", "project:networking:write", "project:permissions:read", "project:services:read", "project:services:write", "read_only", "role:organization:admin", "role:services:maintenance", "role:services:recover", "service:configuration:write", "service:data:write", "service:logs:read", "service:secrets:read", "service:users:write"} } // BackupConfigOut Backup configuration for this service plan @@ -644,37 +646,39 @@ type KafkaOut struct { type MemberType string const ( - MemberTypeAdmin MemberType = "admin" - MemberTypeDeveloper MemberType = "developer" - MemberTypeOperator MemberType = "operator" - MemberTypeOrganizationAppUsersWrite MemberType = "organization:app_users:write" - MemberTypeOrganizationAuditLogsRead MemberType = "organization:audit_logs:read" - MemberTypeOrganizationDomainsWrite MemberType = "organization:domains:write" - MemberTypeOrganizationGroupsWrite MemberType = "organization:groups:write" - MemberTypeOrganizationIdpsWrite MemberType = "organization:idps:write" - MemberTypeOrganizationProjectsWrite MemberType = "organization:projects:write" - MemberTypeOrganizationUsersWrite MemberType = "organization:users:write" - MemberTypeProjectAuditLogsRead MemberType = "project:audit_logs:read" - MemberTypeProjectIntegrationsRead MemberType = "project:integrations:read" - MemberTypeProjectIntegrationsWrite MemberType = "project:integrations:write" - MemberTypeProjectNetworkingRead MemberType = "project:networking:read" - MemberTypeProjectNetworkingWrite MemberType = "project:networking:write" - MemberTypeProjectPermissionsRead MemberType = "project:permissions:read" - MemberTypeProjectServicesRead MemberType = "project:services:read" - MemberTypeProjectServicesWrite MemberType = "project:services:write" - MemberTypeReadOnly MemberType = "read_only" - MemberTypeRoleOrganizationAdmin MemberType = "role:organization:admin" - MemberTypeRoleServicesMaintenance MemberType = "role:services:maintenance" - MemberTypeRoleServicesRecover MemberType = "role:services:recover" - MemberTypeServiceConfigurationWrite MemberType = "service:configuration:write" - MemberTypeServiceDataWrite MemberType = "service:data:write" - MemberTypeServiceLogsRead MemberType = "service:logs:read" - MemberTypeServiceSecretsRead MemberType = "service:secrets:read" - MemberTypeServiceUsersWrite MemberType = "service:users:write" + MemberTypeAdmin MemberType = "admin" + MemberTypeDeveloper MemberType = "developer" + MemberTypeOperator MemberType = "operator" + MemberTypeOrganizationAppUsersWrite MemberType = "organization:app_users:write" + MemberTypeOrganizationAuditLogsRead MemberType = "organization:audit_logs:read" + MemberTypeOrganizationDomainsWrite MemberType = "organization:domains:write" + MemberTypeOrganizationGroupsWrite MemberType = "organization:groups:write" + MemberTypeOrganizationIdpsWrite MemberType = "organization:idps:write" + MemberTypeOrganizationNetworkingRead MemberType = "organization:networking:read" + MemberTypeOrganizationNetworkingWrite MemberType = "organization:networking:write" + MemberTypeOrganizationProjectsWrite MemberType = "organization:projects:write" + MemberTypeOrganizationUsersWrite MemberType = "organization:users:write" + MemberTypeProjectAuditLogsRead MemberType = "project:audit_logs:read" + MemberTypeProjectIntegrationsRead MemberType = "project:integrations:read" + MemberTypeProjectIntegrationsWrite MemberType = "project:integrations:write" + MemberTypeProjectNetworkingRead MemberType = "project:networking:read" + MemberTypeProjectNetworkingWrite MemberType = "project:networking:write" + MemberTypeProjectPermissionsRead MemberType = "project:permissions:read" + MemberTypeProjectServicesRead MemberType = "project:services:read" + MemberTypeProjectServicesWrite MemberType = "project:services:write" + MemberTypeReadOnly MemberType = "read_only" + MemberTypeRoleOrganizationAdmin MemberType = "role:organization:admin" + MemberTypeRoleServicesMaintenance MemberType = "role:services:maintenance" + MemberTypeRoleServicesRecover MemberType = "role:services:recover" + MemberTypeServiceConfigurationWrite MemberType = "service:configuration:write" + MemberTypeServiceDataWrite MemberType = "service:data:write" + MemberTypeServiceLogsRead MemberType = "service:logs:read" + MemberTypeServiceSecretsRead MemberType = "service:secrets:read" + MemberTypeServiceUsersWrite MemberType = "service:users:write" ) func MemberTypeChoices() []string { - return []string{"admin", "developer", "operator", "organization:app_users:write", "organization:audit_logs:read", "organization:domains:write", "organization:groups:write", "organization:idps:write", "organization:projects:write", "organization:users:write", "project:audit_logs:read", "project:integrations:read", "project:integrations:write", "project:networking:read", "project:networking:write", "project:permissions:read", "project:services:read", "project:services:write", "read_only", "role:organization:admin", "role:services:maintenance", "role:services:recover", "service:configuration:write", "service:data:write", "service:logs:read", "service:secrets:read", "service:users:write"} + return []string{"admin", "developer", "operator", "organization:app_users:write", "organization:audit_logs:read", "organization:domains:write", "organization:groups:write", "organization:idps:write", "organization:networking:read", "organization:networking:write", "organization:projects:write", "organization:users:write", "project:audit_logs:read", "project:integrations:read", "project:integrations:write", "project:networking:read", "project:networking:write", "project:permissions:read", "project:services:read", "project:services:write", "read_only", "role:organization:admin", "role:services:maintenance", "role:services:recover", "service:configuration:write", "service:data:write", "service:logs:read", "service:secrets:read", "service:users:write"} } // MysqlOut Service type information diff --git a/handler/service/service.go b/handler/service/service.go index d7f75a5..4c1c749 100644 --- a/handler/service/service.go +++ b/handler/service/service.go @@ -59,7 +59,7 @@ type Handler interface { // ServiceBackupsGet get service backup information // GET /v1/project/{project}/service/{service_name}/backups // https://api.aiven.io/doc/#tag/Service/operation/ServiceBackupsGet - ServiceBackupsGet(ctx context.Context, project string, serviceName string) ([]BackupOut, error) + ServiceBackupsGet(ctx context.Context, project string, serviceName string) (*ServiceBackupsGetOut, error) // ServiceCancelQuery cancel specified query from service // POST /v1/project/{project}/service/{service_name}/query/cancel @@ -361,18 +361,18 @@ func (h *ServiceHandler) ServiceBackupToAnotherRegionReport(ctx context.Context, } return out.Metrics, nil } -func (h *ServiceHandler) ServiceBackupsGet(ctx context.Context, project string, serviceName string) ([]BackupOut, error) { +func (h *ServiceHandler) ServiceBackupsGet(ctx context.Context, project string, serviceName string) (*ServiceBackupsGetOut, error) { path := fmt.Sprintf("/v1/project/%s/service/%s/backups", url.PathEscape(project), url.PathEscape(serviceName)) b, err := h.doer.Do(ctx, "ServiceBackupsGet", "GET", path, nil) if err != nil { return nil, err } - out := new(serviceBackupsGetOut) + out := new(ServiceBackupsGetOut) err = json.Unmarshal(b, out) if err != nil { return nil, err } - return out.Backups, nil + return out, nil } func (h *ServiceHandler) ServiceCancelQuery(ctx context.Context, project string, serviceName string, in *ServiceCancelQueryIn) (bool, error) { path := fmt.Sprintf("/v1/project/%s/service/%s/query/cancel", url.PathEscape(project), url.PathEscape(serviceName)) @@ -854,12 +854,6 @@ type AclOut struct { Topic string `json:"topic"` // Topic name pattern Username string `json:"username"` } -type AdditionalRegionOut struct { - Cloud string `json:"cloud"` // Target cloud - PauseReason *string `json:"pause_reason,omitempty"` // Reason for pausing the backup synchronization - Paused *bool `json:"paused,omitempty"` // Indicates additional backup synchronization is paused - Region *string `json:"region,omitempty"` // Cloud storage region name -} // AggregatorOut Service type information type AggregatorOut struct { @@ -910,11 +904,17 @@ type BackupConfigOut struct { RecoveryMode RecoveryModeType `json:"recovery_mode"` // Mechanism how backups can be restored. 'basic' means a backup is restored as is so that the system is restored to the state it was when the backup was generated. 'pitr' means point-in-time-recovery, which allows restoring the system to any state since the first available full snapshot. } type BackupOut struct { - AdditionalRegions []AdditionalRegionOut `json:"additional_regions,omitempty"` // Additional backup regions, if available - BackupName string `json:"backup_name"` // Internal name of this backup - BackupTime time.Time `json:"backup_time"` // Backup timestamp (ISO 8601) - DataSize int `json:"data_size"` // Backup's original size before compression - StorageLocation *string `json:"storage_location,omitempty"` // Location where this backup is stored + AdditionalRegions []struct { + Cloud string `json:"cloud"` // Target cloud + PauseReason *string `json:"pause_reason,omitempty"` // Reason for pausing the backup synchronization + Paused *bool `json:"paused,omitempty"` // Indicates additional backup synchronization is paused + Region *string `json:"region,omitempty"` // Cloud storage region name + } `json:"additional_regions,omitempty"` // Additional backup regions, if available + BackupName string `json:"backup_name"` // Internal name of this backup + BackupTime time.Time `json:"backup_time"` // Backup timestamp (ISO 8601) + DataSize int `json:"data_size"` // Backup's original size before compression + StorageLocation *string `json:"storage_location,omitempty"` // Location where this backup is stored + TieredStorageDataSize *int `json:"tiered_storage_data_size,omitempty"` // The amount of tiered storage data in bytes referenced by this backup. } // CassandraOut Service type information @@ -1081,6 +1081,7 @@ const ( EndpointTypeExternalAwsCloudwatchLogs EndpointType = "external_aws_cloudwatch_logs" EndpointTypeExternalAwsCloudwatchMetrics EndpointType = "external_aws_cloudwatch_metrics" EndpointTypeExternalAwsS3 EndpointType = "external_aws_s3" + EndpointTypeExternalAzureBlobStorage EndpointType = "external_azure_blob_storage" EndpointTypeExternalClickhouse EndpointType = "external_clickhouse" EndpointTypeExternalElasticsearchLogs EndpointType = "external_elasticsearch_logs" EndpointTypeExternalGoogleCloudBigquery EndpointType = "external_google_cloud_bigquery" @@ -1099,7 +1100,7 @@ const ( ) func EndpointTypeChoices() []string { - return []string{"autoscaler", "datadog", "external_aws_cloudwatch_logs", "external_aws_cloudwatch_metrics", "external_aws_s3", "external_clickhouse", "external_elasticsearch_logs", "external_google_cloud_bigquery", "external_google_cloud_logging", "external_kafka", "external_mysql", "external_opensearch_logs", "external_postgresql", "external_prometheus", "external_redis", "external_schema_registry", "external_sumologic_logs", "jolokia", "prometheus", "rsyslog"} + return []string{"autoscaler", "datadog", "external_aws_cloudwatch_logs", "external_aws_cloudwatch_metrics", "external_aws_s3", "external_azure_blob_storage", "external_clickhouse", "external_elasticsearch_logs", "external_google_cloud_bigquery", "external_google_cloud_logging", "external_kafka", "external_mysql", "external_opensearch_logs", "external_postgresql", "external_prometheus", "external_redis", "external_schema_registry", "external_sumologic_logs", "jolokia", "prometheus", "rsyslog"} } type EndpointTypeOut struct { @@ -1622,6 +1623,18 @@ func PhaseTypeChoices() []string { return []string{"prepare", "basebackup", "stream", "finalize"} } +type PitrAdditionalRegionOut struct { + Cloud string `json:"cloud"` // Target cloud + PitrRangeEnd string `json:"pitr_range_end"` // Latest timestamp usable for PITR (ISO 8601) (always set) + PitrRangeStart string `json:"pitr_range_start"` // Earliest timestamp usable for PITR (ISO 8601) (always set) + Region string `json:"region"` // Cloud storage region name +} + +// PitrOut Backup PITR metadata. Point-in-time-recovery metadata for the service. If not set, service type does not support PITR. +type PitrOut struct { + AdditionalRegions []PitrAdditionalRegionOut `json:"additional_regions"` // Backup PITR metadata for additional backup regions. Empty array if BTAR is not enabled or BTAR+PITR is not supported. + PrimaryRegion PrimaryRegionOut `json:"primary_region"` // Backup PITR metadata primary. Point-in-time-recovery metadata related to the primary backup location of the service. +} type PoolModeType string const ( @@ -1634,6 +1647,11 @@ func PoolModeTypeChoices() []string { return []string{"session", "transaction", "statement"} } +// PrimaryRegionOut Backup PITR metadata primary. Point-in-time-recovery metadata related to the primary backup location of the service. +type PrimaryRegionOut struct { + PitrRangeEnd string `json:"pitr_range_end"` // Latest timestamp usable for PITR (ISO 8601) (null means current time) + PitrRangeStart string `json:"pitr_range_start"` // Earliest timestamp usable for PITR (ISO 8601) (null means no available backup for PITR) +} type ProgressUpdateOut struct { Completed bool `json:"completed"` // Indicates whether this phase has been completed or not Current *int `json:"current,omitempty"` // Current progress for this phase. May be missing or null. @@ -1729,16 +1747,16 @@ type RedisOut struct { type ResourceType string const ( - ResourceTypeTopic ResourceType = "Topic" - ResourceTypeGroup ResourceType = "Group" ResourceTypeCluster ResourceType = "Cluster" - ResourceTypeTransactionalId ResourceType = "TransactionalId" ResourceTypeDelegationToken ResourceType = "DelegationToken" + ResourceTypeGroup ResourceType = "Group" + ResourceTypeTopic ResourceType = "Topic" + ResourceTypeTransactionalId ResourceType = "TransactionalId" ResourceTypeUser ResourceType = "User" ) func ResourceTypeChoices() []string { - return []string{"Topic", "Group", "Cluster", "TransactionalId", "DelegationToken", "User"} + return []string{"Cluster", "DelegationToken", "Group", "Topic", "TransactionalId", "User"} } type ResultCodeOut struct { @@ -1798,6 +1816,12 @@ type ServiceBackupToAnotherRegionReportIn struct { Period PeriodType `json:"period,omitempty"` // Metrics time period } +// ServiceBackupsGetOut ServiceBackupsGetResponse +type ServiceBackupsGetOut struct { + Backups []BackupOut `json:"backups"` // List of backups for the service + Pitr *PitrOut `json:"pitr,omitempty"` // Backup PITR metadata. Point-in-time-recovery metadata for the service. If not set, service type does not support PITR. +} + // ServiceCancelQueryIn ServiceCancelQueryRequestBody type ServiceCancelQueryIn struct { Pid *int `json:"pid,omitempty"` // Database server connection ID @@ -1812,7 +1836,7 @@ type ServiceCreateIn struct { GroupName *string `json:"group_name,omitempty"` // Service group name (DEPRECATED: do not use) Maintenance *MaintenanceIn `json:"maintenance,omitempty"` // Automatic maintenance settings Plan string `json:"plan"` // Subscription plan - ProjectVpcId *string `json:"project_vpc_id,omitempty"` // Project VPC ID + ProjectVpcId *string `json:"project_vpc_id"` // Project VPC ID ServiceIntegrations *[]ServiceIntegrationIn `json:"service_integrations,omitempty"` // Service integrations to enable for the service. Some integration types affect how a service is created and they must be provided as part of the creation call instead of being defined later. ServiceName string `json:"service_name"` // Service name ServiceType string `json:"service_type"` // Service type code @@ -2209,7 +2233,7 @@ type ServiceUpdateIn struct { Maintenance *MaintenanceIn `json:"maintenance,omitempty"` // Automatic maintenance settings Plan *string `json:"plan,omitempty"` // Subscription plan Powered *bool `json:"powered,omitempty"` // Power-on the service (true) or power-off (false) - ProjectVpcId *string `json:"project_vpc_id,omitempty"` // Project VPC ID + ProjectVpcId *string `json:"project_vpc_id"` // Project VPC ID SchemaRegistryAuthz *bool `json:"schema_registry_authz,omitempty"` // Enable or disable Schema Registry authorization TechEmails *[]TechEmailIn `json:"tech_emails,omitempty"` // List of service technical email addresses TerminationProtection *bool `json:"termination_protection,omitempty"` // Service is protected against termination and powering off @@ -2592,11 +2616,6 @@ type serviceBackupToAnotherRegionReportOut struct { Metrics map[string]any `json:"metrics"` // Service metrics in Google chart compatible format } -// serviceBackupsGetOut ServiceBackupsGetResponse -type serviceBackupsGetOut struct { - Backups []BackupOut `json:"backups"` // List of backups for the service -} - // serviceCancelQueryOut ServiceCancelQueryResponse type serviceCancelQueryOut struct { Success bool `json:"success"` // Status reported by the database server diff --git a/handler/user/user.go b/handler/user/user.go index f1e1009..f62fdb6 100644 --- a/handler/user/user.go +++ b/handler/user/user.go @@ -444,6 +444,7 @@ func (h *UserHandler) ValidateReferralCode(ctx context.Context, referralCode str type AccessTokenCreateIn struct { Description string `json:"description"` // Name / description of an access token ExtendWhenUsed *bool `json:"extend_when_used,omitempty"` // Extend token expiration time when token is used. Only applicable if max_age_seconds is specified. + IpAllowlist *[]string `json:"ip_allowlist,omitempty"` // List of allowed IP ranges MaxAgeSeconds *float64 `json:"max_age_seconds,omitempty"` // Time the token remains valid since creation (or since last use if extend_when_used is true) Scopes *[]string `json:"scopes,omitempty"` // Scopes this token is restricted to, if specified } @@ -457,6 +458,7 @@ type AccessTokenCreateOut struct { ExpiryTime *time.Time `json:"expiry_time,omitempty"` // Timestamp when the access token will expire unless extended, if ever ExtendWhenUsed bool `json:"extend_when_used"` // Extend token expiration time when token is used. Only applicable if max_age_seconds is specified. FullToken string `json:"full_token"` // This full access token can be used to make API calls. This can also be used to update or revoke tokens. Note that when using this token with the update and revoke APIs it must be URL encoded because it may contain /, + and = characters (/ => %2F, + => %2B, = => %3D). + IpAllowlist []string `json:"ip_allowlist,omitempty"` // List of allowed IP ranges LastIp *string `json:"last_ip,omitempty"` // IP address the access token was last used from in case it has ever been used LastUsedTime *time.Time `json:"last_used_time,omitempty"` // Timestamp when the access token was last used, if ever LastUserAgent *string `json:"last_user_agent,omitempty"` // User agent string of the client that last used the token in case it has ever been used @@ -479,6 +481,7 @@ type AccessTokenUpdateOut struct { Description *string `json:"description,omitempty"` // Name / description of an access token ExpiryTime *time.Time `json:"expiry_time,omitempty"` // Timestamp when the access token will expire unless extended, if ever ExtendWhenUsed bool `json:"extend_when_used"` // Extend token expiration time when token is used. Only applicable if max_age_seconds is specified. + IpAllowlist []string `json:"ip_allowlist,omitempty"` // List of allowed IP ranges LastIp *string `json:"last_ip,omitempty"` // IP address the access token was last used from in case it has ever been used LastUsedTime *time.Time `json:"last_used_time,omitempty"` // Timestamp when the access token was last used, if ever LastUserAgent *string `json:"last_user_agent,omitempty"` // User agent string of the client that last used the token in case it has ever been used @@ -515,37 +518,39 @@ func ActionTypeChoices() []string { type AnyType string const ( - AnyTypeAdmin AnyType = "admin" - AnyTypeDeveloper AnyType = "developer" - AnyTypeOperator AnyType = "operator" - AnyTypeOrganizationAppUsersWrite AnyType = "organization:app_users:write" - AnyTypeOrganizationAuditLogsRead AnyType = "organization:audit_logs:read" - AnyTypeOrganizationDomainsWrite AnyType = "organization:domains:write" - AnyTypeOrganizationGroupsWrite AnyType = "organization:groups:write" - AnyTypeOrganizationIdpsWrite AnyType = "organization:idps:write" - AnyTypeOrganizationProjectsWrite AnyType = "organization:projects:write" - AnyTypeOrganizationUsersWrite AnyType = "organization:users:write" - AnyTypeProjectAuditLogsRead AnyType = "project:audit_logs:read" - AnyTypeProjectIntegrationsRead AnyType = "project:integrations:read" - AnyTypeProjectIntegrationsWrite AnyType = "project:integrations:write" - AnyTypeProjectNetworkingRead AnyType = "project:networking:read" - AnyTypeProjectNetworkingWrite AnyType = "project:networking:write" - AnyTypeProjectPermissionsRead AnyType = "project:permissions:read" - AnyTypeProjectServicesRead AnyType = "project:services:read" - AnyTypeProjectServicesWrite AnyType = "project:services:write" - AnyTypeReadOnly AnyType = "read_only" - AnyTypeRoleOrganizationAdmin AnyType = "role:organization:admin" - AnyTypeRoleServicesMaintenance AnyType = "role:services:maintenance" - AnyTypeRoleServicesRecover AnyType = "role:services:recover" - AnyTypeServiceConfigurationWrite AnyType = "service:configuration:write" - AnyTypeServiceDataWrite AnyType = "service:data:write" - AnyTypeServiceLogsRead AnyType = "service:logs:read" - AnyTypeServiceSecretsRead AnyType = "service:secrets:read" - AnyTypeServiceUsersWrite AnyType = "service:users:write" + AnyTypeAdmin AnyType = "admin" + AnyTypeDeveloper AnyType = "developer" + AnyTypeOperator AnyType = "operator" + AnyTypeOrganizationAppUsersWrite AnyType = "organization:app_users:write" + AnyTypeOrganizationAuditLogsRead AnyType = "organization:audit_logs:read" + AnyTypeOrganizationDomainsWrite AnyType = "organization:domains:write" + AnyTypeOrganizationGroupsWrite AnyType = "organization:groups:write" + AnyTypeOrganizationIdpsWrite AnyType = "organization:idps:write" + AnyTypeOrganizationNetworkingRead AnyType = "organization:networking:read" + AnyTypeOrganizationNetworkingWrite AnyType = "organization:networking:write" + AnyTypeOrganizationProjectsWrite AnyType = "organization:projects:write" + AnyTypeOrganizationUsersWrite AnyType = "organization:users:write" + AnyTypeProjectAuditLogsRead AnyType = "project:audit_logs:read" + AnyTypeProjectIntegrationsRead AnyType = "project:integrations:read" + AnyTypeProjectIntegrationsWrite AnyType = "project:integrations:write" + AnyTypeProjectNetworkingRead AnyType = "project:networking:read" + AnyTypeProjectNetworkingWrite AnyType = "project:networking:write" + AnyTypeProjectPermissionsRead AnyType = "project:permissions:read" + AnyTypeProjectServicesRead AnyType = "project:services:read" + AnyTypeProjectServicesWrite AnyType = "project:services:write" + AnyTypeReadOnly AnyType = "read_only" + AnyTypeRoleOrganizationAdmin AnyType = "role:organization:admin" + AnyTypeRoleServicesMaintenance AnyType = "role:services:maintenance" + AnyTypeRoleServicesRecover AnyType = "role:services:recover" + AnyTypeServiceConfigurationWrite AnyType = "service:configuration:write" + AnyTypeServiceDataWrite AnyType = "service:data:write" + AnyTypeServiceLogsRead AnyType = "service:logs:read" + AnyTypeServiceSecretsRead AnyType = "service:secrets:read" + AnyTypeServiceUsersWrite AnyType = "service:users:write" ) func AnyTypeChoices() []string { - return []string{"admin", "developer", "operator", "organization:app_users:write", "organization:audit_logs:read", "organization:domains:write", "organization:groups:write", "organization:idps:write", "organization:projects:write", "organization:users:write", "project:audit_logs:read", "project:integrations:read", "project:integrations:write", "project:networking:read", "project:networking:write", "project:permissions:read", "project:services:read", "project:services:write", "read_only", "role:organization:admin", "role:services:maintenance", "role:services:recover", "service:configuration:write", "service:data:write", "service:logs:read", "service:secrets:read", "service:users:write"} + return []string{"admin", "developer", "operator", "organization:app_users:write", "organization:audit_logs:read", "organization:domains:write", "organization:groups:write", "organization:idps:write", "organization:networking:read", "organization:networking:write", "organization:projects:write", "organization:users:write", "project:audit_logs:read", "project:integrations:read", "project:integrations:write", "project:networking:read", "project:networking:write", "project:permissions:read", "project:services:read", "project:services:write", "read_only", "role:organization:admin", "role:services:maintenance", "role:services:recover", "service:configuration:write", "service:data:write", "service:logs:read", "service:secrets:read", "service:users:write"} } type AuthenticationMethodOut struct { @@ -632,6 +637,7 @@ type TokenOut struct { Description *string `json:"description,omitempty"` // Name / description of an access token ExpiryTime *time.Time `json:"expiry_time,omitempty"` // Timestamp when the access token will expire unless extended, if ever ExtendWhenUsed bool `json:"extend_when_used"` // Extend token expiration time when token is used. Only applicable if max_age_seconds is specified. + IpAllowlist []string `json:"ip_allowlist,omitempty"` // List of allowed IP ranges LastIp *string `json:"last_ip,omitempty"` // IP address the access token was last used from in case it has ever been used LastUsedTime *time.Time `json:"last_used_time,omitempty"` // Timestamp when the access token was last used, if ever LastUserAgent *string `json:"last_user_agent,omitempty"` // User agent string of the client that last used the token in case it has ever been used diff --git a/openapi_patch.yaml b/openapi_patch.yaml index 61cb8c2..466bdc6 100644 --- a/openapi_patch.yaml +++ b/openapi_patch.yaml @@ -316,6 +316,16 @@ components: items: type: string type: array + ServiceCreateRequestBody: + properties: + project_vpc_id: + # When VPC is not specified, the service will be created in the existing VPC. + # We must send null to create a service in the public network. + nullable: true + ServiceUpdateRequestBody: + properties: + project_vpc_id: + nullable: true parameters: service_kafka_quota_user: in: query diff --git a/version.go b/version.go index c8bb44e..3bfa26f 100644 --- a/version.go +++ b/version.go @@ -1,4 +1,4 @@ package aiven // Version returns aiven-go-client version string -func Version() string { return "v0.76.0" } +func Version() string { return "v0.79.0" }