iot

package
v1.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2026 License: MIT Imports: 33 Imported by: 0

README

IoT Core

Parity grade: B · SDK aws-sdk-go-v2/service/iot@v1.76.0 · last audited 2026-07-12 (5256fdde84d37f54adca98c9cf44f1499fbd9bdf)

Coverage

Metric Value
Operations audited 30 (30 ok)
Feature families 14 (8 ok, 1 partial, 5 deferred)
Known gaps 2
Deferred items 6
Resource leaks clean
Known gaps
  • DescribeCertificate/ListCertificates response missing ownedBy/previousOwnedBy/generationId/validity/certificateMode fields present in real CertificateDescription (bd: gopherstack-jy57)
  • Several ops (AssociateTargetsWithJob, CancelAuditTask, CancelAuditMitigationActionsTask, AttachSecurityProfile) mutate/read state without validating the referenced resource (job/task/profile) exists, so unknown IDs succeed instead of returning ResourceNotFoundException (bd: gopherstack-ep0r)
Deferred
  • thing_type (field-by-field wire audit)
  • certificate_provider
  • job_and_jobtemplate
  • device_defender (audit/mitigation/detect tasks, violations)
  • fleet_indexing (SearchIndex/aggregations)
  • …and 1 more — see PARITY.md

More

Documentation

Overview

Package iot provides a mock AWS IoT Core service with an embedded MQTT broker, IoT SQL rules engine, and action dispatch to SQS and Lambda.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrThingNotFound is returned when a Thing does not exist.
	ErrThingNotFound = errors.New("thing not found")

	// ErrRuleNotFound is returned when a TopicRule does not exist.
	ErrRuleNotFound = errors.New("topic rule not found")

	// ErrPolicyNotFound is returned when a Policy does not exist.
	ErrPolicyNotFound = errors.New("policy not found")

	// ErrValidation is returned when an input fails validation.
	ErrValidation = errors.New("validation error")

	// ErrAlreadyExists is returned when a resource already exists.
	ErrAlreadyExists = errors.New("resource already exists")

	// ErrVersionConflict is returned when an optimistic-lock version check fails.
	ErrVersionConflict = errors.New("version conflict")

	// ErrDeleteConflict is returned when a resource cannot be deleted due to dependencies.
	ErrDeleteConflict = errors.New("delete conflict")

	// ErrIndexNotFound is returned when a fleet index does not exist.
	ErrIndexNotFound = errors.New("index not found")

	// ErrVersionsLimitExceeded is returned when a policy already has the maximum allowed versions.
	ErrVersionsLimitExceeded = errors.New("versions limit exceeded")

	// ErrShadowNotFound is returned when a Device Shadow does not exist.
	ErrShadowNotFound = errors.New("shadow not found")
)
View Source
var ErrBrokerNotStarted = errors.New("mqtt broker not started")

ErrBrokerNotStarted is returned when a publish is attempted before the broker is started.

View Source
var ErrCannotParseFloat = errors.New("cannot parse value as float")

ErrCannotParseFloat is returned when a numeric value cannot be parsed.

View Source
var ErrCertificateNotFound = errors.New("certificate not found")

ErrCertificateNotFound is returned when a Certificate does not exist.

View Source
var ErrCertificateProviderNotFound = errors.New("certificate provider not found")

ErrCertificateProviderNotFound is returned when a CertificateProvider does not exist.

View Source
var ErrManagedJobTemplateNotFound = errors.New("managed job template not found")

ErrManagedJobTemplateNotFound is returned when a managed job template does not exist.

View Source
var ErrNilAppContext = errors.New("AppContext is required")

ErrNilAppContext is returned by Init when appCtx is nil.

View Source
var ErrPolicyVersionNotFound = errors.New("policy version not found")

ErrPolicyVersionNotFound is returned when a PolicyVersion does not exist.

View Source
var ErrRegistrationTaskNotFound = errors.New("thing registration task not found")

ErrRegistrationTaskNotFound is returned when a bulk thing registration task does not exist.

View Source
var ErrResourceNotFound = errors.New("ResourceNotFoundException")

ErrResourceNotFound is returned when a new-op resource is not found.

View Source
var ErrThingGroupNotFound = errors.New("thing group not found")

ErrThingGroupNotFound is returned when a ThingGroup does not exist.

View Source
var ErrThingTypeNotFound = errors.New("thing type not found")

ErrThingTypeNotFound is returned when a ThingType does not exist.

View Source
var ErrTopicRuleDestinationNotFound = errors.New("topic rule destination not found")

ErrTopicRuleDestinationNotFound is returned when a TopicRuleDestination does not exist.

Functions

func EvaluateRule

func EvaluateRule(rule *TopicRule, topic string, payload []byte) bool

EvaluateRule reports whether the given topic and payload satisfy the rule's SQL predicate.

func MatchesTopic

func MatchesTopic(topicPattern, topic string) bool

MatchesTopic reports whether the MQTT topic matches the given pattern. Wildcard semantics:

  • # matches zero or more levels (must be the last segment)
  • + matches exactly one level

Types

type AbortConfig

type AbortConfig struct {
	CriteriaList []AbortCriteria `json:"criteriaList,omitempty"`
}

AbortConfig holds abort criteria for a job.

type AbortCriteria

type AbortCriteria struct {
	Action                    string  `json:"action,omitempty"`
	FailureType               string  `json:"failureType,omitempty"`
	MinNumberOfExecutedThings int     `json:"minNumberOfExecutedThings,omitempty"`
	ThresholdPercentage       float64 `json:"thresholdPercentage,omitempty"`
}

AbortCriteria is a single abort criterion.

type AcceptCertificateTransferInput

type AcceptCertificateTransferInput struct {
	CertificateID string
	SetAsActive   bool
}

AcceptCertificateTransferInput is the input for AcceptCertificateTransfer.

type AccountAuditConfiguration

type AccountAuditConfiguration struct {
	AuditCheckConfigurations map[string]*AuditCheckConfig `json:"auditCheckConfigurations,omitempty"`
	AuditNotificationTarget  any                          `json:"auditNotificationTargetConfigurations,omitempty"`
	RoleARN                  string                       `json:"roleArn,omitempty"`
}

AccountAuditConfiguration holds the account-level audit configuration.

type AccountEncryptionConfiguration

type AccountEncryptionConfiguration struct {
	ConfigurationDetails *EncryptionConfigurationDetails `json:"configurationDetails,omitempty"`
	EncryptionType       string                          `json:"encryptionType"`
	KMSKeyARN            string                          `json:"kmsKeyArn,omitempty"`
	KMSAccessRoleARN     string                          `json:"kmsAccessRoleArn,omitempty"`
	LastModifiedDate     float64                         `json:"lastModifiedDate,omitempty"`
}

AccountEncryptionConfiguration represents the account-wide encryption configuration for data at rest.

type ActiveViolation

type ActiveViolation struct {
	Behavior                     *ViolationBehavior `json:"behavior,omitempty"`
	LastViolationValue           map[string]any     `json:"lastViolationValue,omitempty"`
	ViolationID                  string             `json:"violationId"`
	ThingName                    string             `json:"thingName"`
	SecurityProfileName          string             `json:"securityProfileName"`
	VerificationState            string             `json:"verificationState,omitempty"`
	VerificationStateDescription string             `json:"verificationStateDescription,omitempty"`
	ViolationStartTime           float64            `json:"violationStartTime,omitempty"`
}

ActiveViolation represents a currently active Device Defender Detect violation of a security-profile behavior by a thing.

type AddThingToBillingGroupInput

type AddThingToBillingGroupInput struct {
	BillingGroupName string `json:"billingGroupName"`
	BillingGroupArn  string `json:"billingGroupArn"`
	ThingName        string `json:"thingName"`
	ThingArn         string `json:"thingArn"`
}

AddThingToBillingGroupInput is the input for AddThingToBillingGroup.

type AddThingToThingGroupInput

type AddThingToThingGroupInput struct {
	ThingGroupName        string `json:"thingGroupName"`
	ThingGroupArn         string `json:"thingGroupArn"`
	ThingName             string `json:"thingName"`
	ThingArn              string `json:"thingArn"`
	OverrideDynamicGroups bool   `json:"overrideDynamicGroups"`
}

AddThingToThingGroupInput is the input for AddThingToThingGroup.

type AggregationInput

type AggregationInput struct {
	IndexName        string
	QueryString      string
	AggregationField string
}

AggregationInput carries the inputs shared by GetCardinality, GetStatistics, GetPercentiles and GetBucketsAggregation.

type AssociateSbomWithPackageVersionInput

type AssociateSbomWithPackageVersionInput struct {
	Sbom        *SbomDocument `json:"sbom"`
	PackageName string        `json:"packageName"`
	VersionName string        `json:"versionName"`
}

AssociateSbomWithPackageVersionInput is the input for AssociateSbomWithPackageVersion.

type AssociateSbomWithPackageVersionOutput

type AssociateSbomWithPackageVersionOutput struct {
	PackageName          string        `json:"packageName"`
	VersionName          string        `json:"versionName"`
	Sbom                 *SbomDocument `json:"sbom,omitempty"`
	SbomValidationStatus string        `json:"sbomValidationStatus,omitempty"`
}

AssociateSbomWithPackageVersionOutput is the output for AssociateSbomWithPackageVersion.

type AssociateTargetsWithJobInput

type AssociateTargetsWithJobInput struct {
	JobID       string   `json:"jobId"`
	Comment     string   `json:"comment"`
	NamespaceID string   `json:"namespaceId"`
	Targets     []string `json:"targets"`
}

AssociateTargetsWithJobInput is the input for AssociateTargetsWithJob.

type AssociateTargetsWithJobOutput

type AssociateTargetsWithJobOutput struct {
	JobID       string `json:"jobId"`
	JobArn      string `json:"jobArn"`
	Description string `json:"description"`
}

AssociateTargetsWithJobOutput is the output for AssociateTargetsWithJob.

type AttachPolicyInput

type AttachPolicyInput struct {
	PolicyName string `json:"policyName"`
	Target     string `json:"target"`
}

AttachPolicyInput is the input for AttachPolicy.

type AttachPrincipalPolicyInput

type AttachPrincipalPolicyInput struct {
	PolicyName string
	Principal  string
}

AttachPrincipalPolicyInput is the input for AttachPrincipalPolicy.

type AttachSecurityProfileInput

type AttachSecurityProfileInput struct {
	SecurityProfileName      string
	SecurityProfileTargetArn string `json:"securityProfileTargetArn"`
}

AttachSecurityProfileInput is the input for AttachSecurityProfile.

type AttachThingPrincipalInput

type AttachThingPrincipalInput struct {
	ThingName          string
	Principal          string `json:"principal"`
	ThingPrincipalType string `json:"thingPrincipalType"`
}

AttachThingPrincipalInput is the input for AttachThingPrincipal.

type AttributePayload

type AttributePayload struct {
	Attributes map[string]string `json:"attributes"`
	// Merge controls whether attributes are merged (true, default) or replaced (false).
	Merge *bool `json:"merge,omitempty"`
}

AttributePayload holds thing attributes.

type AuditCheckConfig

type AuditCheckConfig struct {
	Enabled bool `json:"enabled"`
}

AuditCheckConfig holds config for a single audit check.

type AuditFinding

type AuditFinding struct {
	NonCompliantResource map[string]any   `json:"nonCompliantResource,omitempty"`
	FindingID            string           `json:"findingId"`
	TaskID               string           `json:"taskId,omitempty"`
	CheckName            string           `json:"checkName"`
	Severity             string           `json:"severity"`
	RelatedResources     []map[string]any `json:"relatedResources,omitempty"`
	FindingTime          float64          `json:"findingTime,omitempty"`
}

AuditFinding represents an AWS IoT audit finding.

type AuditMitigationActionExecution

type AuditMitigationActionExecution struct {
	TaskID     string  `json:"taskId"`
	FindingID  string  `json:"findingId"`
	ActionName string  `json:"actionName"`
	ActionID   string  `json:"actionId,omitempty"`
	Status     string  `json:"status"`
	ErrorCode  string  `json:"errorCode,omitempty"`
	Message    string  `json:"message,omitempty"`
	StartTime  float64 `json:"startTime,omitempty"`
	EndTime    float64 `json:"endTime,omitempty"`
}

AuditMitigationActionExecution represents one mitigation action applied (or to be applied) to one audit finding as part of an AuditMitigationTask.

type AuditMitigationActionsTaskTarget

type AuditMitigationActionsTaskTarget struct {
	AuditCheckToReasonCodeFilter map[string][]string `json:"auditCheckToReasonCodeFilter,omitempty"`
	AuditTaskID                  string              `json:"auditTaskId,omitempty"`
	FindingIDs                   []string            `json:"findingIds,omitempty"`
}

AuditMitigationActionsTaskTarget identifies the audit findings that a StartAuditMitigationActionsTask task's mitigation actions are applied to.

type AuditMitigationTask

type AuditMitigationTask struct {
	Target                     *AuditMitigationActionsTaskTarget       `json:"target,omitempty"`
	AuditCheckToActionsMapping map[string][]string                     `json:"auditCheckToActionsMapping,omitempty"`
	TaskStatistics             map[string]*TaskStatisticsForAuditCheck `json:"taskStatistics,omitempty"`
	TaskID                     string                                  `json:"taskId"`
	TaskStatus                 string                                  `json:"taskStatus"`
	StartTime                  float64                                 `json:"startTime,omitempty"`
	EndTime                    float64                                 `json:"endTime,omitempty"`
}

AuditMitigationTask represents a task started by StartAuditMitigationActionsTask.

type AuditSuppression

type AuditSuppression struct {
	ResourceIdentifier   map[string]any `json:"resourceIdentifier"`
	CheckName            string         `json:"checkName"`
	Description          string         `json:"description,omitempty"`
	ExpirationDate       float64        `json:"expirationDate,omitempty"`
	SuppressIndefinitely bool           `json:"suppressIndefinitely"`
}

AuditSuppression represents an AWS IoT audit suppression.

type AuditTask

type AuditTask struct {
	TaskID             string  `json:"taskId"`
	TaskStatus         string  `json:"taskStatus"`
	TaskType           string  `json:"taskType"`
	ScheduledAuditName string  `json:"scheduledAuditName,omitempty"`
	TaskStartTime      float64 `json:"taskStartTime,omitempty"`
}

AuditTask represents an IoT audit task.

type AuthDecisionPolicies

type AuthDecisionPolicies struct {
	Policies []PolicyIdentifier `json:"policies,omitempty"`
}

AuthDecisionPolicies is the set of policies backing an allow/deny decision.

type AuthInfo

type AuthInfo struct {
	ActionType string   `json:"actionType,omitempty"`
	Resources  []string `json:"resources"`
}

AuthInfo describes one action/resources pair to evaluate authorization for.

type AuthResult

type AuthResult struct {
	AuthInfo     *AuthInfo             `json:"authInfo,omitempty"`
	Allowed      *AuthDecisionPolicies `json:"allowed,omitempty"`
	Denied       *AuthDecisionPolicies `json:"denied,omitempty"`
	AuthDecision string                `json:"authDecision"`
}

AuthResult is the per-authInfo evaluation result of TestAuthorization.

type Authorizer

type Authorizer struct {
	Tags                   map[string]string `json:"tags,omitempty"`
	TokenSigningPublicKeys map[string]string `json:"tokenSigningPublicKeys,omitempty"`
	AuthorizerName         string            `json:"authorizerName"`
	AuthorizerARN          string            `json:"authorizerArn"`
	AuthorizerFunctionARN  string            `json:"authorizerFunctionArn,omitempty"`
	TokenKeyName           string            `json:"tokenKeyName,omitempty"`
	Status                 string            `json:"status"`
	SigningDisabled        bool              `json:"signingDisabled"`
	EnableCachingForHTTP   bool              `json:"enableCachingForHttp"`
	CreationDate           float64           `json:"creationDate,omitempty"`
	LastModifiedDate       float64           `json:"lastModifiedDate,omitempty"`
}

Authorizer represents an IoT authorizer.

type BehaviorModelTrainingSummary

type BehaviorModelTrainingSummary struct {
	SecurityProfileName             string  `json:"securityProfileName"`
	BehaviorName                    string  `json:"behaviorName"`
	ModelStatus                     string  `json:"modelStatus,omitempty"`
	DatapointsCollectionPercentage  float64 `json:"datapointsCollectionPercentage,omitempty"`
	LastModelRefreshDate            float64 `json:"lastModelRefreshDate,omitempty"`
	TrainingDataCollectionStartDate float64 `json:"trainingDataCollectionStartDate,omitempty"`
}

BehaviorModelTrainingSummary reports ML Detect model-training progress for one behavior of a security profile.

type BillingGroup

type BillingGroup struct {
	Tags                   map[string]string      `json:"tags,omitempty"`
	BillingGroupName       string                 `json:"billingGroupName"`
	BillingGroupARN        string                 `json:"billingGroupArn"`
	BillingGroupID         string                 `json:"billingGroupId"`
	BillingGroupProperties BillingGroupProperties `json:"billingGroupProperties,omitzero"`
	BillingGroupMetadata   BillingGroupMetadata   `json:"billingGroupMetadata,omitzero"`
	Version                int64                  `json:"version"`
}

BillingGroup represents an IoT billing group.

type BillingGroupMetadata

type BillingGroupMetadata struct {
	CreationDate float64 `json:"creationDate,omitempty"`
}

BillingGroupMetadata holds metadata for a billing group.

type BillingGroupProperties

type BillingGroupProperties struct {
	BillingGroupDescription string `json:"billingGroupDescription,omitempty"`
}

BillingGroupProperties holds description for a billing group.

type Broker

type Broker struct {
	// contains filtered or unexported fields
}

Broker wraps a mochi-mqtt server to provide the IoT MQTT endpoint.

func NewBroker

func NewBroker(backend *InMemoryBackend, port int) *Broker

NewBroker creates a new Broker using the given backend and port.

func (*Broker) Publish

func (b *Broker) Publish(topic string, payload []byte, retain bool, qos byte) error

Publish delivers a message directly to the broker (used by the IoT Data Plane).

func (*Broker) Start

func (b *Broker) Start(ctx context.Context) error

Start initialises the MQTT server, registers the rule hook, and begins listening. It blocks until ctx is cancelled.

type Bucket

type Bucket struct {
	KeyValue string
	Count    int64
}

Bucket is a single term bucket with its match count, returned by GetBucketsAggregation.

type BucketsAggregationInput

type BucketsAggregationInput struct {
	AggregationInput
	MaxBuckets int32
}

BucketsAggregationInput is the input for GetBucketsAggregation.

type CACertificate

type CACertificate struct {
	CertificateARN   string  `json:"certificateArn"`
	CertificateID    string  `json:"certificateId"`
	Status           string  `json:"status"`
	CertificatePem   string  `json:"certificatePem,omitempty"`
	OwnedBy          string  `json:"ownedBy,omitempty"`
	AutoRegistration string  `json:"autoRegistrationStatus,omitempty"`
	CreationDate     float64 `json:"creationDate,omitempty"`
	LastModifiedDate float64 `json:"lastModifiedDate,omitempty"`
}

CACertificate represents an IoT CA certificate.

type CancelAuditMitigationActionsTaskInput

type CancelAuditMitigationActionsTaskInput struct {
	TaskID string
}

CancelAuditMitigationActionsTaskInput is the input for CancelAuditMitigationActionsTask.

type CancelAuditTaskInput

type CancelAuditTaskInput struct {
	AuditTaskID string
}

CancelAuditTaskInput is the input for CancelAuditTask.

type Certificate

type Certificate struct {
	CreatedAt       time.Time `json:"createdAt"`
	LastModifiedAt  time.Time `json:"lastModifiedDate"`
	CertificateID   string    `json:"certificateId"`
	CACertificateID string    `json:"caCertificateId,omitempty"`
	ARN             string    `json:"certificateArn"`
	Status          string    `json:"status"`
	PEM             string    `json:"certificatePem"`
}

Certificate represents an AWS IoT Certificate.

type CertificateProvider

type CertificateProvider struct {
	CreatedAt                   time.Time `json:"creationDate"`
	LastModifiedAt              time.Time `json:"lastModifiedDate"`
	CertificateProviderName     string    `json:"certificateProviderName"`
	ARN                         string    `json:"certificateProviderArn"`
	LambdaFunctionARN           string    `json:"lambdaFunctionArn"`
	AccountDefaultForOperations []string  `json:"accountDefaultForOperations"`
}

CertificateProvider represents an AWS IoT Certificate Provider.

type CreateAuthorizerInput

type CreateAuthorizerInput struct {
	Tags                   map[string]string `json:"tags,omitempty"`
	TokenSigningPublicKeys map[string]string `json:"tokenSigningPublicKeys,omitempty"`
	AuthorizerName         string            `json:"authorizerName"`
	AuthorizerFunctionARN  string            `json:"authorizerFunctionArn,omitempty"`
	TokenKeyName           string            `json:"tokenKeyName,omitempty"`
	Status                 string            `json:"status,omitempty"`
	SigningDisabled        bool              `json:"signingDisabled"`
	EnableCachingForHTTP   bool              `json:"enableCachingForHttp"`
}

CreateAuthorizerInput holds input for CreateAuthorizer.

type CreateBillingGroupInput

type CreateBillingGroupInput struct {
	Tags                   map[string]string      `json:"tags,omitempty"`
	BillingGroupName       string                 `json:"billingGroupName"`
	BillingGroupProperties BillingGroupProperties `json:"billingGroupProperties,omitzero"`
}

CreateBillingGroupInput holds input for CreateBillingGroup.

type CreateCertificateFromCsrInput

type CreateCertificateFromCsrInput struct {
	CertificateSigningRequest string
	SetAsActive               bool
}

CreateCertificateFromCsrInput is the input for CreateCertificateFromCsr.

type CreateCertificateProviderInput

type CreateCertificateProviderInput struct {
	CertificateProviderName     string
	LambdaFunctionARN           string
	AccountDefaultForOperations []string
}

CreateCertificateProviderInput is the input for CreateCertificateProvider.

type CreateCustomMetricInput

type CreateCustomMetricInput struct {
	Tags               map[string]string `json:"tags,omitempty"`
	MetricName         string            `json:"metricName"`
	MetricType         string            `json:"metricType"`
	DisplayName        string            `json:"displayName,omitempty"`
	ClientRequestToken string            `json:"clientRequestToken,omitempty"`
}

CreateCustomMetricInput holds input for CreateCustomMetric.

type CreateDimensionInput

type CreateDimensionInput struct {
	Tags               map[string]string `json:"tags,omitempty"`
	Name               string            `json:"name"`
	Type               string            `json:"type"`
	ClientRequestToken string            `json:"clientRequestToken,omitempty"`
	StringValues       []string          `json:"stringValues"`
}

CreateDimensionInput holds input for CreateDimension.

type CreateDomainConfigurationInput

type CreateDomainConfigurationInput struct {
	Tags                    map[string]string `json:"tags,omitempty"`
	DomainConfigurationName string            `json:"domainConfigurationName"`
	DomainName              string            `json:"domainName,omitempty"`
	ServiceType             string            `json:"serviceType,omitempty"`
}

CreateDomainConfigurationInput holds input for CreateDomainConfiguration.

type CreateFleetMetricInput

type CreateFleetMetricInput struct {
	Tags         map[string]string `json:"tags,omitempty"`
	MetricName   string            `json:"metricName"`
	QueryString  string            `json:"queryString,omitempty"`
	IndexName    string            `json:"indexName,omitempty"`
	QueryVersion string            `json:"queryVersion,omitempty"`
	Description  string            `json:"description,omitempty"`
	Unit         string            `json:"unit,omitempty"`
	Period       int32             `json:"period,omitempty"`
}

CreateFleetMetricInput holds input for CreateFleetMetric.

type CreateJobInput

type CreateJobInput struct {
	Tags                       map[string]string           `json:"tags,omitempty"`
	DocumentParameters         map[string]string           `json:"documentParameters,omitempty"`
	AbortConfig                *AbortConfig                `json:"abortConfig,omitempty"`
	JobExecutionsRolloutConfig *JobExecutionsRolloutConfig `json:"jobExecutionsRolloutConfig,omitempty"`
	TimeoutConfig              *TimeoutConfig              `json:"timeoutConfig,omitempty"`
	JobID                      string                      `json:"jobId"`
	Description                string                      `json:"description,omitempty"`
	Document                   string                      `json:"document,omitempty"`
	DocumentSource             string                      `json:"documentSource,omitempty"`
	JobTemplateARN             string                      `json:"jobTemplateArn,omitempty"`
	TargetSelection            string                      `json:"targetSelection,omitempty"`
	Targets                    []string                    `json:"targets"`
}

CreateJobInput holds input for CreateJob.

type CreateJobTemplateInput

type CreateJobTemplateInput struct {
	Tags                       map[string]string           `json:"tags,omitempty"`
	AbortConfig                *AbortConfig                `json:"abortConfig,omitempty"`
	JobExecutionsRolloutConfig *JobExecutionsRolloutConfig `json:"jobExecutionsRolloutConfig,omitempty"`
	TimeoutConfig              *TimeoutConfig              `json:"timeoutConfig,omitempty"`
	JobTemplateID              string                      `json:"jobTemplateId"`
	Description                string                      `json:"description,omitempty"`
	Document                   string                      `json:"document,omitempty"`
	DocumentSource             string                      `json:"documentSource,omitempty"`
	JobARN                     string                      `json:"jobArn,omitempty"`
}

CreateJobTemplateInput holds input for CreateJobTemplate.

type CreateMitigationActionInput

type CreateMitigationActionInput struct {
	Tags         map[string]string `json:"tags,omitempty"`
	ActionParams map[string]any    `json:"actionParams,omitempty"`
	ActionName   string            `json:"actionName"`
	RoleARN      string            `json:"roleArn,omitempty"`
}

CreateMitigationActionInput holds input for CreateMitigationAction.

type CreatePolicyInput

type CreatePolicyInput struct {
	PolicyName     string
	PolicyDocument string
}

CreatePolicyInput is the input for CreatePolicy.

type CreatePolicyOutput

type CreatePolicyOutput struct {
	PolicyName      string
	PolicyARN       string
	PolicyDocument  string
	PolicyVersionID string
}

CreatePolicyOutput is the output for CreatePolicy.

type CreatePolicyVersionInput

type CreatePolicyVersionInput struct {
	PolicyName     string
	PolicyDocument string
	SetAsDefault   bool
}

CreatePolicyVersionInput is the input for CreatePolicyVersion.

type CreateProvisioningTemplateInput

type CreateProvisioningTemplateInput struct {
	Tags                map[string]string `json:"tags,omitempty"`
	TemplateName        string            `json:"templateName"`
	Description         string            `json:"description,omitempty"`
	TemplateBody        string            `json:"templateBody,omitempty"`
	ProvisioningRoleARN string            `json:"provisioningRoleArn,omitempty"`
	Type                string            `json:"type,omitempty"`
	Enabled             bool              `json:"enabled"`
}

CreateProvisioningTemplateInput holds input for CreateProvisioningTemplate.

type CreateRoleAliasInput

type CreateRoleAliasInput struct {
	Tags                      map[string]string `json:"tags,omitempty"`
	RoleAlias                 string            `json:"roleAlias"`
	RoleARN                   string            `json:"roleArn"`
	CredentialDurationSeconds int               `json:"credentialDurationSeconds,omitempty"`
}

CreateRoleAliasInput holds input for CreateRoleAlias.

type CreateScheduledAuditInput

type CreateScheduledAuditInput struct {
	Tags               map[string]string `json:"tags,omitempty"`
	ScheduledAuditName string            `json:"scheduledAuditName"`
	Frequency          string            `json:"frequency"`
	DayOfMonth         string            `json:"dayOfMonth,omitempty"`
	DayOfWeek          string            `json:"dayOfWeek,omitempty"`
	TargetCheckNames   []string          `json:"targetCheckNames,omitempty"`
}

CreateScheduledAuditInput holds input for CreateScheduledAudit.

type CreateSecurityProfileInput

type CreateSecurityProfileInput struct {
	Tags                       map[string]string `json:"tags,omitempty"`
	SecurityProfileName        string            `json:"securityProfileName"`
	SecurityProfileDescription string            `json:"securityProfileDescription,omitempty"`
}

CreateSecurityProfileInput holds input for CreateSecurityProfile.

type CreateStreamInput

type CreateStreamInput struct {
	Tags        map[string]string `json:"tags,omitempty"`
	StreamID    string            `json:"streamId"`
	Description string            `json:"description,omitempty"`
	RoleARN     string            `json:"roleArn,omitempty"`
	Files       []StreamFile      `json:"files"`
}

CreateStreamInput holds input for CreateStream.

type CreateThingGroupInput

type CreateThingGroupInput struct {
	Attributes      map[string]string
	ThingGroupName  string
	ParentGroupName string
	Description     string
	QueryString     string
}

CreateThingGroupInput is the input for CreateThingGroup.

type CreateThingInput

type CreateThingInput struct {
	AttributePayload *AttributePayload
	ThingName        string
	ThingTypeName    string
	BillingGroupName string
}

CreateThingInput is the input for CreateThing.

type CreateThingOutput

type CreateThingOutput struct {
	ThingName string
	ThingARN  string
	ThingID   string
}

CreateThingOutput is the output for CreateThing.

type CreateThingTypeInput

type CreateThingTypeInput struct {
	ThingTypeName        string
	Description          string
	SearchableAttributes []string
}

CreateThingTypeInput is the input for CreateThingType.

type CreateTopicRuleDestinationInput

type CreateTopicRuleDestinationInput struct {
	DestinationConfiguration *TopicRuleDestinationConfiguration
}

CreateTopicRuleDestinationInput is the input for CreateTopicRuleDestination.

type CreateTopicRuleInput

type CreateTopicRuleInput struct {
	TopicRulePayload *TopicRulePayload
	RuleName         string
}

CreateTopicRuleInput is the input for CreateTopicRule.

type CustomMetric

type CustomMetric struct {
	Tags             map[string]string `json:"tags,omitempty"`
	MetricName       string            `json:"metricName"`
	MetricARN        string            `json:"metricArn"`
	MetricType       string            `json:"metricType"`
	DisplayName      string            `json:"displayName,omitempty"`
	Version          int64             `json:"version"`
	CreationDate     float64           `json:"creationDate,omitempty"`
	LastModifiedDate float64           `json:"lastModifiedDate,omitempty"`
}

CustomMetric represents an IoT custom metric.

type DeprecateThingTypeInput

type DeprecateThingTypeInput struct {
	ThingTypeName string
	UndoDeprecate bool
}

DeprecateThingTypeInput is the input for DeprecateThingType.

type DescribeEndpointOutput

type DescribeEndpointOutput struct {
	EndpointAddress string
}

DescribeEndpointOutput is the output for DescribeEndpoint.

type DetachPolicyInput

type DetachPolicyInput struct {
	PolicyName string `json:"policyName"`
	Target     string `json:"target"`
}

DetachPolicyInput is the input for DetachPolicy.

type DetectMitigationActionExecution

type DetectMitigationActionExecution struct {
	TaskID             string  `json:"taskId"`
	ViolationID        string  `json:"violationId"`
	ActionName         string  `json:"actionName"`
	ThingName          string  `json:"thingName,omitempty"`
	Status             string  `json:"status"`
	ErrorCode          string  `json:"errorCode,omitempty"`
	Message            string  `json:"message,omitempty"`
	ExecutionStartTime float64 `json:"executionStartTime,omitempty"`
	ExecutionEndTime   float64 `json:"executionEndTime,omitempty"`
}

DetectMitigationActionExecution represents one mitigation action applied (or to be applied) to one violation as part of a DetectMitigationTask.

type DetectMitigationActionsTaskTarget

type DetectMitigationActionsTaskTarget struct {
	SecurityProfileName string   `json:"securityProfileName,omitempty"`
	BehaviorName        string   `json:"behaviorName,omitempty"`
	ViolationIDs        []string `json:"violationIds,omitempty"`
}

DetectMitigationActionsTaskTarget identifies the ML Detect violations that a StartDetectMitigationActionsTask task's actions are applied to.

type DetectMitigationTask

type DetectMitigationTask struct {
	Target                       *DetectMitigationActionsTaskTarget `json:"target,omitempty"`
	TaskStatistics               *DetectMitigationTaskStatistics    `json:"taskStatistics,omitempty"`
	TaskID                       string                             `json:"taskId"`
	TaskStatus                   string                             `json:"taskStatus"`
	Actions                      []string                           `json:"actions,omitempty"`
	StartTime                    float64                            `json:"taskStartTime,omitempty"`
	EndTime                      float64                            `json:"taskEndTime,omitempty"`
	OnlyActiveViolationsIncluded bool                               `json:"onlyActiveViolationsIncluded"`
	SuppressedAlertsIncluded     bool                               `json:"suppressedAlertsIncluded"`
}

DetectMitigationTask represents a task started by StartDetectMitigationActionsTask.

type DetectMitigationTaskStatistics

type DetectMitigationTaskStatistics struct {
	ActionsExecuted int64 `json:"actionsExecuted"`
	ActionsSkipped  int64 `json:"actionsSkipped"`
	ActionsFailed   int64 `json:"actionsFailed"`
}

DetectMitigationTaskStatistics aggregates the mitigation-action execution counts for a DetectMitigationTask.

type Dimension

type Dimension struct {
	Tags             map[string]string `json:"tags,omitempty"`
	Name             string            `json:"name"`
	ARN              string            `json:"arn"`
	Type             string            `json:"type"`
	StringValues     []string          `json:"stringValues,omitempty"`
	CreationDate     float64           `json:"creationDate,omitempty"`
	LastModifiedDate float64           `json:"lastModifiedDate,omitempty"`
}

Dimension represents an IoT dimension.

type DisableTopicRuleInput

type DisableTopicRuleInput struct {
	RuleName string
}

DisableTopicRuleInput is the input for DisableTopicRule.

type DomainConfiguration

type DomainConfiguration struct {
	Tags                      map[string]string `json:"tags,omitempty"`
	DomainConfigurationName   string            `json:"domainConfigurationName"`
	DomainConfigurationARN    string            `json:"domainConfigurationArn"`
	DomainName                string            `json:"domainName,omitempty"`
	ServiceType               string            `json:"serviceType,omitempty"`
	DomainConfigurationStatus string            `json:"domainConfigurationStatus"`
	DomainType                string            `json:"domainType,omitempty"`
	CreationDate              float64           `json:"creationDate,omitempty"`
	LastModifiedDate          float64           `json:"lastModifiedDate,omitempty"`
}

DomainConfiguration represents an IoT domain configuration.

type EnableTopicRuleInput

type EnableTopicRuleInput struct {
	RuleName string
}

EnableTopicRuleInput is the input for EnableTopicRule.

type EncryptionConfigurationDetails

type EncryptionConfigurationDetails struct {
	ConfigurationStatus string `json:"configurationStatus"`
	ErrorCode           string `json:"errorCode,omitempty"`
	ErrorMessage        string `json:"errorMessage,omitempty"`
}

EncryptionConfigurationDetails describes the health of the KMS key/role backing a customer-managed encryption configuration.

type EventConfigEntry

type EventConfigEntry struct {
	Enabled bool `json:"Enabled"`
}

EventConfigEntry holds the enabled flag for an event type.

type EventConfigurations

type EventConfigurations struct {
	EventConfigurations map[string]*EventConfigEntry `json:"eventConfigurations"`
}

EventConfigurations holds the IoT event configurations.

type FleetMetric

type FleetMetric struct {
	Tags         map[string]string `json:"tags,omitempty"`
	MetricName   string            `json:"metricName"`
	MetricARN    string            `json:"metricArn"`
	QueryString  string            `json:"queryString,omitempty"`
	IndexName    string            `json:"indexName,omitempty"`
	QueryVersion string            `json:"queryVersion,omitempty"`
	Description  string            `json:"description,omitempty"`
	Unit         string            `json:"unit,omitempty"`
	Period       int32             `json:"period,omitempty"`
	Version      int64             `json:"version"`
	CreationDate float64           `json:"creationDate,omitempty"`
	LastModified float64           `json:"lastModifiedDate,omitempty"`
}

FleetMetric represents an IoT fleet metric.

type GetIndexingConfigurationOutput

type GetIndexingConfigurationOutput struct {
	ThingIndexingConfiguration      *ThingIndexingConfiguration
	ThingGroupIndexingConfiguration *ThingGroupIndexingConfiguration
}

GetIndexingConfigurationOutput is the output for GetIndexingConfiguration.

type GetPolicyOutput

type GetPolicyOutput struct {
	CreatedAt        time.Time `json:"creationDate"`
	LastModifiedAt   time.Time `json:"lastModifiedDate"`
	PolicyName       string    `json:"policyName"`
	PolicyARN        string    `json:"policyArn"`
	PolicyDocument   string    `json:"policyDocument"`
	DefaultVersionID string    `json:"defaultVersionId"`
}

GetPolicyOutput is the output for GetPolicy.

type HTTPURLDestinationConfiguration

type HTTPURLDestinationConfiguration struct {
	ConfirmationURL string `json:"confirmationUrl"`
}

HTTPURLDestinationConfiguration holds configuration for an HTTP URL destination.

type HTTPURLDestinationProperties

type HTTPURLDestinationProperties struct {
	ConfirmationURL string `json:"confirmationUrl"`
}

HTTPURLDestinationProperties holds properties for an HTTP URL destination.

type Handler

type Handler struct {
	Backend StorageBackend
	// contains filtered or unexported fields
}

Handler is the Echo HTTP handler for IoT control-plane operations.

func NewHandler

func NewHandler(backend StorageBackend, broker *Broker) *Handler

NewHandler creates a new IoT Handler.

func (*Handler) Broker

func (h *Handler) Broker() *Broker

Broker returns the embedded MQTT broker (used for cross-service wiring).

func (*Handler) ChaosOperations

func (h *Handler) ChaosOperations() []string

ChaosOperations returns all operations that can be fault-injected.

func (*Handler) ChaosRegions

func (h *Handler) ChaosRegions() []string

ChaosRegions returns all regions this IoT instance handles.

func (*Handler) ChaosServiceName

func (h *Handler) ChaosServiceName() string

ChaosServiceName returns the lowercase AWS service name for fault rule matching.

func (*Handler) ExtractOperation

func (h *Handler) ExtractOperation(c *echo.Context) string

ExtractOperation extracts the IoT operation name from the request method + path.

func (*Handler) ExtractResource

func (h *Handler) ExtractResource(c *echo.Context) string

ExtractResource extracts the resource name (thing/rule/policy) from the URL path.

func (*Handler) GetSupportedOperations

func (h *Handler) GetSupportedOperations() []string

GetSupportedOperations returns the list of supported IoT control-plane operations.

func (*Handler) Handler

func (h *Handler) Handler() echo.HandlerFunc

Handler returns the Echo handler function for IoT operations.

func (*Handler) MatchPriority

func (h *Handler) MatchPriority() int

MatchPriority returns the routing priority for the IoT handler.

func (*Handler) Name

func (h *Handler) Name() string

Name returns the service name.

func (*Handler) Reset

func (h *Handler) Reset()

Reset clears all backend state and resets the handler. Used for test isolation.

func (*Handler) Restore

func (h *Handler) Restore(ctx context.Context, data []byte) error

Restore implements persistence.Persistable by delegating to the backend when it implements Snapshottable. Non-snapshottable backends are skipped.

func (*Handler) RouteMatcher

func (h *Handler) RouteMatcher() service.Matcher

func (*Handler) Snapshot

func (h *Handler) Snapshot(ctx context.Context) []byte

Snapshot implements persistence.Persistable by delegating to the backend when it implements Snapshottable. Returns nil for non-snapshottable backends.

func (*Handler) StartWorker

func (h *Handler) StartWorker(ctx context.Context) error

StartWorker starts the embedded MQTT broker as a background worker.

type InMemoryBackend

type InMemoryBackend struct {
	// contains filtered or unexported fields
}

InMemoryBackend is the in-memory implementation of StorageBackend.

func NewInMemoryBackend

func NewInMemoryBackend() *InMemoryBackend

NewInMemoryBackend creates a new InMemoryBackend with default values.

func NewInMemoryBackendWithConfig

func NewInMemoryBackendWithConfig(accountID, region string) *InMemoryBackend

NewInMemoryBackendWithConfig creates a new InMemoryBackend with the given account and region.

func (*InMemoryBackend) AcceptCertificateTransfer

func (b *InMemoryBackend) AcceptCertificateTransfer(input *AcceptCertificateTransferInput) error

AcceptCertificateTransfer accepts a pending certificate transfer.

func (*InMemoryBackend) AddBehaviorModelTrainingSummaryInternal

func (b *InMemoryBackend) AddBehaviorModelTrainingSummaryInternal(
	securityProfileName string, s BehaviorModelTrainingSummary,
)

AddBehaviorModelTrainingSummaryInternal seeds a training summary for a security profile (there is no public API to trigger ML Detect training; AWS populates this asynchronously once enough data is collected).

func (*InMemoryBackend) AddCommandExecutionInternal

func (b *InMemoryBackend) AddCommandExecutionInternal(commandID, executionID string, ex IoTCommandExecution)

AddCommandExecutionInternal seeds a command execution directly into the backend for testing (there is no public CreateCommandExecution control- plane operation; executions are normally created by device SDKs).

func (*InMemoryBackend) AddMetricValueInternal

func (b *InMemoryBackend) AddMetricValueInternal(thingName, metricName string, dp MetricDatapoint)

AddMetricValueInternal seeds a metric datapoint for a thing/metric pair (there is no public PutMetricValue control-plane operation; values are normally reported by the device SDK's Device Defender metrics agent).

func (*InMemoryBackend) AddPolicyInternal

func (b *InMemoryBackend) AddPolicyInternal(p Policy)

AddPolicyInternal seeds a Policy directly into the backend for testing.

func (*InMemoryBackend) AddRuleInternal

func (b *InMemoryBackend) AddRuleInternal(r TopicRule)

AddRuleInternal seeds a TopicRule directly into the backend for testing.

func (*InMemoryBackend) AddThingInternal

func (b *InMemoryBackend) AddThingInternal(t Thing)

AddThingInternal seeds a Thing directly into the backend for testing.

func (*InMemoryBackend) AddThingToBillingGroup

func (b *InMemoryBackend) AddThingToBillingGroup(input *AddThingToBillingGroupInput) error

AddThingToBillingGroup adds a thing to a billing group.

func (*InMemoryBackend) AddThingToThingGroup

func (b *InMemoryBackend) AddThingToThingGroup(input *AddThingToThingGroupInput) error

AddThingToThingGroup adds a thing to a thing group.

func (*InMemoryBackend) AssociateSbomWithPackageVersion

func (b *InMemoryBackend) AssociateSbomWithPackageVersion(
	input *AssociateSbomWithPackageVersionInput,
) (*AssociateSbomWithPackageVersionOutput, error)

AssociateSbomWithPackageVersion associates an SBOM with a package version.

func (*InMemoryBackend) AssociateTargetsWithJob

func (b *InMemoryBackend) AssociateTargetsWithJob(
	input *AssociateTargetsWithJobInput,
) (*AssociateTargetsWithJobOutput, error)

AssociateTargetsWithJob associates targets with a continuous job.

func (*InMemoryBackend) AttachPolicy

func (b *InMemoryBackend) AttachPolicy(input *AttachPolicyInput) error

AttachPolicy attaches a policy to a target (thing group or certificate).

func (*InMemoryBackend) AttachPrincipalPolicy

func (b *InMemoryBackend) AttachPrincipalPolicy(input *AttachPrincipalPolicyInput) error

AttachPrincipalPolicy attaches a policy to a principal. The attachment is recorded in the same policyTargets index used by AttachPolicy/DetachPolicy so that ListPrincipalPolicies, ListPolicyPrincipals, and DetachPrincipalPolicy observe it.

func (*InMemoryBackend) AttachSecurityProfile

func (b *InMemoryBackend) AttachSecurityProfile(input *AttachSecurityProfileInput) error

AttachSecurityProfile attaches a security profile to a target.

func (*InMemoryBackend) AttachThingPrincipal

func (b *InMemoryBackend) AttachThingPrincipal(input *AttachThingPrincipalInput) error

AttachThingPrincipal attaches a principal (certificate or Cognito identity) to a thing.

func (*InMemoryBackend) CancelAuditMitigationActionsTask

func (b *InMemoryBackend) CancelAuditMitigationActionsTask(input *CancelAuditMitigationActionsTaskInput) error

CancelAuditMitigationActionsTask cancels an audit mitigation actions task. Unknown task IDs still succeed (matching the legacy behavior of this operation) but, when the task is known, its rich AuditMitigationTask record (as returned by DescribeAuditMitigationActionsTask) is transitioned to CANCELED with an end time, keeping the two representations consistent.

func (*InMemoryBackend) CancelAuditTask

func (b *InMemoryBackend) CancelAuditTask(input *CancelAuditTaskInput) error

CancelAuditTask cancels an audit task.

func (*InMemoryBackend) CancelCertificateTransfer

func (b *InMemoryBackend) CancelCertificateTransfer(certID string) error

func (*InMemoryBackend) CancelDetectMitigationActionsTask

func (b *InMemoryBackend) CancelDetectMitigationActionsTask(taskID string) error

CancelDetectMitigationActionsTask transitions a detect mitigation actions task to CANCELED, or returns ErrResourceNotFound if taskID is unknown.

func (*InMemoryBackend) CancelJob

func (b *InMemoryBackend) CancelJob(jobID, _ string) (*Job, error)

func (*InMemoryBackend) CancelJobExecution

func (b *InMemoryBackend) CancelJobExecution(jobID, thingName string) error

func (*InMemoryBackend) ClearDefaultAuthorizer

func (b *InMemoryBackend) ClearDefaultAuthorizer() error

func (*InMemoryBackend) ConfirmTopicRuleDestination

func (b *InMemoryBackend) ConfirmTopicRuleDestination(token string) error

ConfirmTopicRuleDestination transitions a topic rule destination created with an HTTP URL configuration from IN_PROGRESS to ENABLED, given the confirmation token that was generated at creation time.

func (*InMemoryBackend) CreateAuditSuppression

func (b *InMemoryBackend) CreateAuditSuppression(
	checkName string,
	resourceID map[string]any,
	description string,
	suppressIndefinitely bool,
	expirationDate float64,
) error

func (*InMemoryBackend) CreateAuthorizer

func (b *InMemoryBackend) CreateAuthorizer(input *CreateAuthorizerInput) (*Authorizer, error)

func (*InMemoryBackend) CreateBillingGroup

func (b *InMemoryBackend) CreateBillingGroup(
	input *CreateBillingGroupInput,
) (*BillingGroup, error)

func (*InMemoryBackend) CreateCertificateFromCsr

func (b *InMemoryBackend) CreateCertificateFromCsr(input *CreateCertificateFromCsrInput) (*Certificate, error)

CreateCertificateFromCsr creates a new certificate from a CSR.

func (*InMemoryBackend) CreateCertificateProvider

func (b *InMemoryBackend) CreateCertificateProvider(
	input *CreateCertificateProviderInput,
) (*CertificateProvider, error)

CreateCertificateProvider creates a new certificate provider.

func (*InMemoryBackend) CreateCommand

func (b *InMemoryBackend) CreateCommand(
	id, displayName, description, namespace string,
	payload map[string]any,
	tags map[string]string,
) (*IoTCommand, error)

func (*InMemoryBackend) CreateCustomMetric

func (b *InMemoryBackend) CreateCustomMetric(input *CreateCustomMetricInput) (*CustomMetric, error)

func (*InMemoryBackend) CreateDimension

func (b *InMemoryBackend) CreateDimension(input *CreateDimensionInput) (*Dimension, error)

func (*InMemoryBackend) CreateDomainConfiguration

func (b *InMemoryBackend) CreateDomainConfiguration(
	input *CreateDomainConfigurationInput,
) (*DomainConfiguration, error)

func (*InMemoryBackend) CreateDynamicThingGroup

func (b *InMemoryBackend) CreateDynamicThingGroup(input *CreateThingGroupInput) (*ThingGroup, error)

CreateDynamicThingGroup creates a dynamic thing group with a query string.

func (*InMemoryBackend) CreateFleetMetric

func (b *InMemoryBackend) CreateFleetMetric(input *CreateFleetMetricInput) (*FleetMetric, error)

func (*InMemoryBackend) CreateIoTPackage

func (b *InMemoryBackend) CreateIoTPackage(name, description string, tags map[string]string) (*IoTPackage, error)

func (*InMemoryBackend) CreateIoTPackageVersion

func (b *InMemoryBackend) CreateIoTPackageVersion(
	packageName, versionName, description string,
	tags map[string]string,
) (*IoTPackageVersion, error)

func (*InMemoryBackend) CreateJob

func (b *InMemoryBackend) CreateJob(input *CreateJobInput) (*Job, error)

func (*InMemoryBackend) CreateJobTemplate

func (b *InMemoryBackend) CreateJobTemplate(input *CreateJobTemplateInput) (*JobTemplate, error)

func (*InMemoryBackend) CreateKeysAndCertificate

func (b *InMemoryBackend) CreateKeysAndCertificate(setAsActive bool) (*Certificate, string, string, error)

CreateKeysAndCertificate creates a new certificate with generated fake keys.

func (*InMemoryBackend) CreateMitigationAction

func (b *InMemoryBackend) CreateMitigationAction(
	input *CreateMitigationActionInput,
) (*MitigationAction, error)

func (*InMemoryBackend) CreateOTAUpdate

func (b *InMemoryBackend) CreateOTAUpdate(
	id, description, roleARN string,
	targets []string,
	files []any,
) (*OTAUpdate, error)

func (*InMemoryBackend) CreatePolicy

func (b *InMemoryBackend) CreatePolicy(input *CreatePolicyInput) (*CreatePolicyOutput, error)

CreatePolicy creates a new IoT Policy.

func (*InMemoryBackend) CreatePolicyVersion

func (b *InMemoryBackend) CreatePolicyVersion(input *CreatePolicyVersionInput) (*PolicyVersion, error)

CreatePolicyVersion creates a new version of an existing policy.

func (*InMemoryBackend) CreateProvisioningClaim

func (b *InMemoryBackend) CreateProvisioningClaim(templateName string) (string, string, string, error)

CreateProvisioningClaim returns a fake cert/key pair for the given template.

func (*InMemoryBackend) CreateProvisioningTemplate

func (b *InMemoryBackend) CreateProvisioningTemplate(
	input *CreateProvisioningTemplateInput,
) (*ProvisioningTemplate, error)

func (*InMemoryBackend) CreateProvisioningTemplateVersion

func (b *InMemoryBackend) CreateProvisioningTemplateVersion(
	name, body string,
) (*ProvisioningTemplateVersion, error)

func (*InMemoryBackend) CreateRoleAlias

func (b *InMemoryBackend) CreateRoleAlias(input *CreateRoleAliasInput) (*RoleAlias, error)

func (*InMemoryBackend) CreateScheduledAudit

func (b *InMemoryBackend) CreateScheduledAudit(
	input *CreateScheduledAuditInput,
) (*ScheduledAudit, error)

func (*InMemoryBackend) CreateSecurityProfile

func (b *InMemoryBackend) CreateSecurityProfile(
	input *CreateSecurityProfileInput,
) (*SecurityProfile, error)

func (*InMemoryBackend) CreateStream

func (b *InMemoryBackend) CreateStream(input *CreateStreamInput) (*IoTStream, error)

func (*InMemoryBackend) CreateThing

func (b *InMemoryBackend) CreateThing(input *CreateThingInput) (*CreateThingOutput, error)

CreateThing creates a new IoT Thing.

func (*InMemoryBackend) CreateThingGroup

func (b *InMemoryBackend) CreateThingGroup(input *CreateThingGroupInput) (*ThingGroup, error)

CreateThingGroup creates a new IoT Thing Group.

func (*InMemoryBackend) CreateThingType

func (b *InMemoryBackend) CreateThingType(input *CreateThingTypeInput) (*ThingType, error)

CreateThingType creates a new IoT Thing Type.

func (*InMemoryBackend) CreateTopicRule

func (b *InMemoryBackend) CreateTopicRule(input *CreateTopicRuleInput) error

CreateTopicRule creates a new IoT Topic Rule.

func (*InMemoryBackend) CreateTopicRuleDestination

func (b *InMemoryBackend) CreateTopicRuleDestination(
	input *CreateTopicRuleDestinationInput,
) (*TopicRuleDestination, error)

CreateTopicRuleDestination creates a new topic rule destination.

func (*InMemoryBackend) DeleteAccountAuditConfiguration

func (b *InMemoryBackend) DeleteAccountAuditConfiguration() error

DeleteAccountAuditConfiguration clears the account-level audit configuration, restoring it to its unconfigured state. It is idempotent: deleting an unconfigured account still succeeds, matching AWS IoT behavior.

func (*InMemoryBackend) DeleteAuditSuppression

func (b *InMemoryBackend) DeleteAuditSuppression(checkName string, resourceID map[string]any) error

func (*InMemoryBackend) DeleteAuthorizer

func (b *InMemoryBackend) DeleteAuthorizer(name string) error

func (*InMemoryBackend) DeleteBillingGroup

func (b *InMemoryBackend) DeleteBillingGroup(name string) error

func (*InMemoryBackend) DeleteCACertificate

func (b *InMemoryBackend) DeleteCACertificate(id string) error

func (*InMemoryBackend) DeleteCertificate

func (b *InMemoryBackend) DeleteCertificate(certificateID string) error

DeleteCertificate deletes a certificate by ID.

func (*InMemoryBackend) DeleteCertificateProvider

func (b *InMemoryBackend) DeleteCertificateProvider(name string) error

DeleteCertificateProvider deletes a certificate provider by name.

func (*InMemoryBackend) DeleteCommand

func (b *InMemoryBackend) DeleteCommand(id string) error

func (*InMemoryBackend) DeleteCommandExecution

func (b *InMemoryBackend) DeleteCommandExecution(executionID, targetARN string) error

DeleteCommandExecution removes a stored command execution identified by its executionId and (optionally) the ARN of its target device, matching AWS's real request shape where executions are addressed by executionId+targetArn rather than commandId.

func (*InMemoryBackend) DeleteCustomMetric

func (b *InMemoryBackend) DeleteCustomMetric(name string) error

func (*InMemoryBackend) DeleteDimension

func (b *InMemoryBackend) DeleteDimension(name string) error

func (*InMemoryBackend) DeleteDomainConfiguration

func (b *InMemoryBackend) DeleteDomainConfiguration(name string) error

func (*InMemoryBackend) DeleteDynamicThingGroup

func (b *InMemoryBackend) DeleteDynamicThingGroup(name string) error

DeleteDynamicThingGroup deletes a dynamic thing group.

func (*InMemoryBackend) DeleteFleetMetric

func (b *InMemoryBackend) DeleteFleetMetric(name string) error

func (*InMemoryBackend) DeleteIoTPackage

func (b *InMemoryBackend) DeleteIoTPackage(name string) error

func (*InMemoryBackend) DeleteIoTPackageVersion

func (b *InMemoryBackend) DeleteIoTPackageVersion(packageName, versionName string) error

func (*InMemoryBackend) DeleteJob

func (b *InMemoryBackend) DeleteJob(jobID string) error

func (*InMemoryBackend) DeleteJobExecution

func (b *InMemoryBackend) DeleteJobExecution(jobID, thingName string) error

func (*InMemoryBackend) DeleteJobTemplate

func (b *InMemoryBackend) DeleteJobTemplate(id string) error

func (*InMemoryBackend) DeleteMitigationAction

func (b *InMemoryBackend) DeleteMitigationAction(name string) error

func (*InMemoryBackend) DeleteOTAUpdate

func (b *InMemoryBackend) DeleteOTAUpdate(id string) error

func (*InMemoryBackend) DeletePolicy

func (b *InMemoryBackend) DeletePolicy(policyName string) error

DeletePolicy removes a Policy by name.

func (*InMemoryBackend) DeletePolicyVersion

func (b *InMemoryBackend) DeletePolicyVersion(policyName, versionID string) error

DeletePolicyVersion deletes a specific version of a policy. The default version cannot be deleted.

func (*InMemoryBackend) DeleteProvisioningTemplate

func (b *InMemoryBackend) DeleteProvisioningTemplate(name string) error

func (*InMemoryBackend) DeleteProvisioningTemplateVersion

func (b *InMemoryBackend) DeleteProvisioningTemplateVersion(name string, versionID int32) error

func (*InMemoryBackend) DeleteRegistrationCode

func (b *InMemoryBackend) DeleteRegistrationCode() error

func (*InMemoryBackend) DeleteRoleAlias

func (b *InMemoryBackend) DeleteRoleAlias(alias string) error

func (*InMemoryBackend) DeleteScheduledAudit

func (b *InMemoryBackend) DeleteScheduledAudit(name string) error

func (*InMemoryBackend) DeleteSecurityProfile

func (b *InMemoryBackend) DeleteSecurityProfile(name string) error

func (*InMemoryBackend) DeleteStream

func (b *InMemoryBackend) DeleteStream(id string) error

func (*InMemoryBackend) DeleteThing

func (b *InMemoryBackend) DeleteThing(thingName string) error

DeleteThing deletes a Thing by name.

func (*InMemoryBackend) DeleteThingGroup

func (b *InMemoryBackend) DeleteThingGroup(thingGroupName string) error

DeleteThingGroup deletes a thing group by name.

func (*InMemoryBackend) DeleteThingShadow

func (b *InMemoryBackend) DeleteThingShadow(thingName, shadowName string) error

DeleteThingShadow deletes the shadow for a thing.

func (*InMemoryBackend) DeleteThingType

func (b *InMemoryBackend) DeleteThingType(thingTypeName string) error

DeleteThingType deletes a thing type by name. The type must be deprecated first.

func (*InMemoryBackend) DeleteTopicRule

func (b *InMemoryBackend) DeleteTopicRule(ruleName string) error

DeleteTopicRule deletes a Topic Rule by name.

func (*InMemoryBackend) DeleteTopicRuleDestination

func (b *InMemoryBackend) DeleteTopicRuleDestination(arn string) error

DeleteTopicRuleDestination deletes a topic rule destination by ARN.

func (*InMemoryBackend) DeleteV2LoggingLevel

func (b *InMemoryBackend) DeleteV2LoggingLevel(target map[string]any) error

func (*InMemoryBackend) DeprecateThingType

func (b *InMemoryBackend) DeprecateThingType(input *DeprecateThingTypeInput) error

DeprecateThingType marks a thing type as deprecated (or un-deprecates it).

func (*InMemoryBackend) DescribeAccountAuditConfiguration

func (b *InMemoryBackend) DescribeAccountAuditConfiguration() *AccountAuditConfiguration

func (*InMemoryBackend) DescribeAuditFinding

func (b *InMemoryBackend) DescribeAuditFinding(findingID string) (*AuditFinding, error)

func (*InMemoryBackend) DescribeAuditMitigationActionsTask

func (b *InMemoryBackend) DescribeAuditMitigationActionsTask(taskID string) (*AuditMitigationTask, error)

DescribeAuditMitigationActionsTask returns a previously started audit mitigation actions task, or ErrResourceNotFound if taskID is unknown.

func (*InMemoryBackend) DescribeAuditSuppression

func (b *InMemoryBackend) DescribeAuditSuppression(
	checkName string,
	resourceID map[string]any,
) (*AuditSuppression, error)

func (*InMemoryBackend) DescribeAuditTask

func (b *InMemoryBackend) DescribeAuditTask(taskID string) (*AuditTask, error)

func (*InMemoryBackend) DescribeAuthorizer

func (b *InMemoryBackend) DescribeAuthorizer(name string) (*Authorizer, error)

func (*InMemoryBackend) DescribeBillingGroup

func (b *InMemoryBackend) DescribeBillingGroup(name string) (*BillingGroup, error)

func (*InMemoryBackend) DescribeCACertificate

func (b *InMemoryBackend) DescribeCACertificate(id string) (*CACertificate, error)

func (*InMemoryBackend) DescribeCertificate

func (b *InMemoryBackend) DescribeCertificate(certificateID string) (*Certificate, error)

DescribeCertificate returns a Certificate by ID.

func (*InMemoryBackend) DescribeCertificateProvider

func (b *InMemoryBackend) DescribeCertificateProvider(name string) (*CertificateProvider, error)

DescribeCertificateProvider returns a certificate provider by name.

func (*InMemoryBackend) DescribeCustomMetric

func (b *InMemoryBackend) DescribeCustomMetric(name string) (*CustomMetric, error)

func (*InMemoryBackend) DescribeDefaultAuthorizer

func (b *InMemoryBackend) DescribeDefaultAuthorizer() (string, error)

func (*InMemoryBackend) DescribeDetectMitigationActionsTask

func (b *InMemoryBackend) DescribeDetectMitigationActionsTask(taskID string) (*DetectMitigationTask, error)

DescribeDetectMitigationActionsTask returns a previously started detect mitigation actions task, or ErrResourceNotFound if taskID is unknown.

func (*InMemoryBackend) DescribeDimension

func (b *InMemoryBackend) DescribeDimension(name string) (*Dimension, error)

func (*InMemoryBackend) DescribeDomainConfiguration

func (b *InMemoryBackend) DescribeDomainConfiguration(name string) (*DomainConfiguration, error)

func (*InMemoryBackend) DescribeEncryptionConfiguration

func (b *InMemoryBackend) DescribeEncryptionConfiguration() *AccountEncryptionConfiguration

DescribeEncryptionConfiguration returns the account's encryption configuration, defaulting to the AWS-owned key when never configured.

func (*InMemoryBackend) DescribeEndpoint

func (b *InMemoryBackend) DescribeEndpoint(_ string) (*DescribeEndpointOutput, error)

DescribeEndpoint returns the MQTT broker endpoint address.

func (*InMemoryBackend) DescribeEventConfigurations

func (b *InMemoryBackend) DescribeEventConfigurations() *EventConfigurations

func (*InMemoryBackend) DescribeFleetMetric

func (b *InMemoryBackend) DescribeFleetMetric(name string) (*FleetMetric, error)

func (*InMemoryBackend) DescribeIndex

func (b *InMemoryBackend) DescribeIndex(indexName string) (*IndexDescription, error)

DescribeIndex returns the status and schema of a known fleet index.

func (*InMemoryBackend) DescribeJob

func (b *InMemoryBackend) DescribeJob(jobID string) (*Job, error)

func (*InMemoryBackend) DescribeJobExecution

func (b *InMemoryBackend) DescribeJobExecution(jobID, thingName string) (*JobExecution, error)

func (*InMemoryBackend) DescribeJobTemplate

func (b *InMemoryBackend) DescribeJobTemplate(id string) (*JobTemplate, error)

func (*InMemoryBackend) DescribeManagedJobTemplate

func (b *InMemoryBackend) DescribeManagedJobTemplate(
	templateName, templateVersion string,
) (*ManagedJobTemplate, error)

DescribeManagedJobTemplate returns an AWS-managed job template by name (and optional version; the catalog only has one version per template today).

func (*InMemoryBackend) DescribeMitigationAction

func (b *InMemoryBackend) DescribeMitigationAction(name string) (*MitigationAction, error)

func (*InMemoryBackend) DescribeProvisioningTemplate

func (b *InMemoryBackend) DescribeProvisioningTemplate(name string) (*ProvisioningTemplate, error)

func (*InMemoryBackend) DescribeProvisioningTemplateVersion

func (b *InMemoryBackend) DescribeProvisioningTemplateVersion(
	name string, versionID int32,
) (*ProvisioningTemplateVersion, error)

DescribeProvisioningTemplateVersion returns a specific stored version of a provisioning template.

func (*InMemoryBackend) DescribeRoleAlias

func (b *InMemoryBackend) DescribeRoleAlias(alias string) (*RoleAlias, error)

func (*InMemoryBackend) DescribeScheduledAudit

func (b *InMemoryBackend) DescribeScheduledAudit(name string) (*ScheduledAudit, error)

func (*InMemoryBackend) DescribeSecurityProfile

func (b *InMemoryBackend) DescribeSecurityProfile(name string) (*SecurityProfile, error)

func (*InMemoryBackend) DescribeStream

func (b *InMemoryBackend) DescribeStream(id string) (*IoTStream, error)

func (*InMemoryBackend) DescribeThing

func (b *InMemoryBackend) DescribeThing(thingName string) (*Thing, error)

DescribeThing returns a deep copy of an existing Thing.

func (*InMemoryBackend) DescribeThingGroup

func (b *InMemoryBackend) DescribeThingGroup(thingGroupName string) (*ThingGroup, error)

DescribeThingGroup returns a ThingGroup by name.

func (*InMemoryBackend) DescribeThingRegistrationTask

func (b *InMemoryBackend) DescribeThingRegistrationTask(taskID string) (*ThingRegistrationTask, error)

DescribeThingRegistrationTask returns a bulk thing provisioning task by ID.

func (*InMemoryBackend) DescribeThingType

func (b *InMemoryBackend) DescribeThingType(thingTypeName string) (*ThingType, error)

DescribeThingType returns a ThingType by name.

func (*InMemoryBackend) DetachPolicy

func (b *InMemoryBackend) DetachPolicy(input *DetachPolicyInput) error

DetachPolicy detaches a policy from a target.

func (*InMemoryBackend) DetachPrincipalPolicy

func (b *InMemoryBackend) DetachPrincipalPolicy(policyName, principal string) error

DetachPrincipalPolicy removes a principal from a policy's target list, mirroring AttachPrincipalPolicy/DetachPolicy's use of policyTargets.

func (*InMemoryBackend) DetachSecurityProfile

func (b *InMemoryBackend) DetachSecurityProfile(profileName, targetARN string) error

DetachSecurityProfile removes a target ARN from a security profile.

func (*InMemoryBackend) DetachThingPrincipal

func (b *InMemoryBackend) DetachThingPrincipal(thingName, principal string) error

func (*InMemoryBackend) DisableTopicRule

func (b *InMemoryBackend) DisableTopicRule(ruleName string) error

DisableTopicRule disables an existing topic rule.

func (*InMemoryBackend) DisassociateSbomFromPackageVersion

func (b *InMemoryBackend) DisassociateSbomFromPackageVersion(packageName, versionName string) error

DisassociateSbomFromPackageVersion clears the SBOM (and its validation results) associated with a package version.

func (*InMemoryBackend) EnableTopicRule

func (b *InMemoryBackend) EnableTopicRule(ruleName string) error

EnableTopicRule enables an existing topic rule.

func (*InMemoryBackend) GetBehaviorModelTrainingSummaries

func (b *InMemoryBackend) GetBehaviorModelTrainingSummaries(
	securityProfileName string, maxResults int32, nextToken string,
) ([]*BehaviorModelTrainingSummary, string, error)

GetBehaviorModelTrainingSummaries returns stored per-behavior training summaries, optionally scoped to one security profile, paginated.

func (*InMemoryBackend) GetBucketsAggregation

func (b *InMemoryBackend) GetBucketsAggregation(input *BucketsAggregationInput) ([]Bucket, error)

GetBucketsAggregation computes term buckets (distinct value -> match count) of AggregationField among Things matching QueryString, sorted by count descending then key ascending, limited to MaxBuckets.

func (*InMemoryBackend) GetCardinality

func (b *InMemoryBackend) GetCardinality(input *AggregationInput) (int64, error)

GetCardinality returns the number of distinct values of AggregationField among Things matching QueryString.

func (*InMemoryBackend) GetCommand

func (b *InMemoryBackend) GetCommand(id string) (*IoTCommand, error)

func (*InMemoryBackend) GetCommandExecution

func (b *InMemoryBackend) GetCommandExecution(commandID, executionID string) (*IoTCommandExecution, error)

func (*InMemoryBackend) GetDispatcher

func (b *InMemoryBackend) GetDispatcher() RuleDispatcher

GetDispatcher returns the current rule dispatcher (used by the broker hook).

func (*InMemoryBackend) GetEffectivePolicies

func (b *InMemoryBackend) GetEffectivePolicies(thingName, principal string) []*Policy

func (*InMemoryBackend) GetIndexingConfiguration

func (b *InMemoryBackend) GetIndexingConfiguration() *GetIndexingConfigurationOutput

GetIndexingConfiguration returns the current thing/thing-group indexing configuration.

func (*InMemoryBackend) GetIoTPackage

func (b *InMemoryBackend) GetIoTPackage(name string) (*IoTPackage, error)

func (*InMemoryBackend) GetIoTPackageVersion

func (b *InMemoryBackend) GetIoTPackageVersion(packageName, versionName string) (*IoTPackageVersion, error)

func (*InMemoryBackend) GetJobDocument

func (b *InMemoryBackend) GetJobDocument(jobID string) (string, error)

func (*InMemoryBackend) GetLoggingOptions

func (b *InMemoryBackend) GetLoggingOptions() *LoggingOptions

func (*InMemoryBackend) GetOTAUpdate

func (b *InMemoryBackend) GetOTAUpdate(id string) (*OTAUpdate, error)

func (*InMemoryBackend) GetPackageConfiguration

func (b *InMemoryBackend) GetPackageConfiguration() *PackageConfiguration

func (*InMemoryBackend) GetPercentiles

func (b *InMemoryBackend) GetPercentiles(input *PercentilesInput) ([]PercentileValue, error)

GetPercentiles computes percentile values of AggregationField (interpreted numerically) among Things matching QueryString, using the nearest-rank (linear interpolation) method.

func (*InMemoryBackend) GetPolicy

func (b *InMemoryBackend) GetPolicy(policyName string) (*GetPolicyOutput, error)

GetPolicy retrieves an existing Policy by name.

func (*InMemoryBackend) GetPolicyVersion

func (b *InMemoryBackend) GetPolicyVersion(policyName, versionID string) (*PolicyVersion, error)

GetPolicyVersion retrieves a specific version of a policy.

func (*InMemoryBackend) GetRegistrationCode

func (b *InMemoryBackend) GetRegistrationCode() string

func (*InMemoryBackend) GetRules

func (b *InMemoryBackend) GetRules() []*TopicRule

GetRules returns a snapshot of all active rules (used by the broker hook).

func (*InMemoryBackend) GetStatistics

func (b *InMemoryBackend) GetStatistics(input *AggregationInput) (*Statistics, error)

GetStatistics computes count/min/max/sum/average/stdDeviation of AggregationField (interpreted numerically) among Things matching QueryString.

func (*InMemoryBackend) GetThingConnectivityData

func (b *InMemoryBackend) GetThingConnectivityData(thingName string) (*ThingConnectivityData, error)

GetThingConnectivityData returns a thing's stored connectivity data, defaulting to "not connected" when nothing has been recorded yet.

func (*InMemoryBackend) GetThingShadow

func (b *InMemoryBackend) GetThingShadow(thingName, shadowName string) (*ThingShadow, error)

GetThingShadow returns the shadow for a thing (classic or named).

func (*InMemoryBackend) GetTopicRule

func (b *InMemoryBackend) GetTopicRule(ruleName string) (*TopicRule, error)

GetTopicRule returns a deep copy of an existing Topic Rule.

func (*InMemoryBackend) GetTopicRuleDestination

func (b *InMemoryBackend) GetTopicRuleDestination(arn string) (*TopicRuleDestination, error)

GetTopicRuleDestination returns a topic rule destination by ARN.

func (*InMemoryBackend) GetV2LoggingOptions

func (b *InMemoryBackend) GetV2LoggingOptions() *V2LoggingOptions

func (*InMemoryBackend) ListActiveViolations

func (b *InMemoryBackend) ListActiveViolations(
	thingName, securityProfileName, verificationState string,
) []*ActiveViolation

ListActiveViolations returns currently active violations, optionally filtered by thing name, security profile name, and/or verification state.

func (*InMemoryBackend) ListAttachedPolicies

func (b *InMemoryBackend) ListAttachedPolicies(input *ListAttachedPoliciesInput) ([]*Policy, error)

ListAttachedPolicies returns all policies attached to a target.

func (*InMemoryBackend) ListAuditFindings

func (b *InMemoryBackend) ListAuditFindings() []*AuditFinding

func (*InMemoryBackend) ListAuditMitigationActionsExecutions

func (b *InMemoryBackend) ListAuditMitigationActionsExecutions(
	taskID, findingID, actionStatus string,
) []*AuditMitigationActionExecution

ListAuditMitigationActionsExecutions returns the mitigation-action execution records for a task, optionally filtered by finding ID and/or execution status.

func (*InMemoryBackend) ListAuditMitigationActionsTasks

func (b *InMemoryBackend) ListAuditMitigationActionsTasks(auditTaskID, taskStatus string) []*AuditMitigationTask

ListAuditMitigationActionsTasks returns stored audit mitigation actions tasks, optionally filtered by the audit task they target and/or their current status.

func (*InMemoryBackend) ListAuditSuppressions

func (b *InMemoryBackend) ListAuditSuppressions() []*AuditSuppression

func (*InMemoryBackend) ListAuditTasks

func (b *InMemoryBackend) ListAuditTasks(taskType string) []*AuditTask

func (*InMemoryBackend) ListAuthorizers

func (b *InMemoryBackend) ListAuthorizers() []*Authorizer

func (*InMemoryBackend) ListBillingGroups

func (b *InMemoryBackend) ListBillingGroups() []*BillingGroup

func (*InMemoryBackend) ListCACertificates

func (b *InMemoryBackend) ListCACertificates() []*CACertificate

func (*InMemoryBackend) ListCertificateProviders

func (b *InMemoryBackend) ListCertificateProviders() []*CertificateProvider

ListCertificateProviders returns all certificate providers sorted by name.

func (*InMemoryBackend) ListCertificates

func (b *InMemoryBackend) ListCertificates() []*Certificate

ListCertificates returns all certificates sorted by ID.

func (*InMemoryBackend) ListCertificatesByCA

func (b *InMemoryBackend) ListCertificatesByCA(caID string) []*Certificate

func (*InMemoryBackend) ListCommandExecutions

func (b *InMemoryBackend) ListCommandExecutions(commandID string) []*IoTCommandExecution

func (*InMemoryBackend) ListCommands

func (b *InMemoryBackend) ListCommands() []*IoTCommand

func (*InMemoryBackend) ListCustomMetrics

func (b *InMemoryBackend) ListCustomMetrics() []*CustomMetric

func (*InMemoryBackend) ListDetectMitigationActionsExecutions

func (b *InMemoryBackend) ListDetectMitigationActionsExecutions(
	taskID, violationID, thingName string,
) []*DetectMitigationActionExecution

ListDetectMitigationActionsExecutions returns the mitigation-action execution records for a task, optionally filtered by violation ID and/or thing name.

func (*InMemoryBackend) ListDetectMitigationActionsTasks

func (b *InMemoryBackend) ListDetectMitigationActionsTasks(startTime, endTime float64) []*DetectMitigationTask

ListDetectMitigationActionsTasks returns stored detect mitigation actions tasks, optionally filtered to those started within [startTime, endTime] (epoch seconds; zero means unbounded).

func (*InMemoryBackend) ListDimensions

func (b *InMemoryBackend) ListDimensions() []*Dimension

func (*InMemoryBackend) ListDomainConfigurations

func (b *InMemoryBackend) ListDomainConfigurations() []*DomainConfiguration

func (*InMemoryBackend) ListFleetMetrics

func (b *InMemoryBackend) ListFleetMetrics() []*FleetMetric

func (*InMemoryBackend) ListIndices

func (b *InMemoryBackend) ListIndices() []string

ListIndices returns the names of the fleet indices currently active, derived from the stored indexing configuration.

func (*InMemoryBackend) ListIoTPackageVersions

func (b *InMemoryBackend) ListIoTPackageVersions(packageName string) []*IoTPackageVersion

func (*InMemoryBackend) ListIoTPackages

func (b *InMemoryBackend) ListIoTPackages() []*IoTPackage

func (*InMemoryBackend) ListJobExecutionsForJob

func (b *InMemoryBackend) ListJobExecutionsForJob(jobID string) []*JobExecution

ListJobExecutionsForJob returns summaries of all executions for a job.

func (*InMemoryBackend) ListJobExecutionsForThing

func (b *InMemoryBackend) ListJobExecutionsForThing(thingName string) []*JobExecution

ListJobExecutionsForThing returns summaries of all executions for a thing.

func (*InMemoryBackend) ListJobTemplates

func (b *InMemoryBackend) ListJobTemplates() []*JobTemplate

func (*InMemoryBackend) ListJobs

func (b *InMemoryBackend) ListJobs() []*Job

func (*InMemoryBackend) ListManagedJobTemplates

func (b *InMemoryBackend) ListManagedJobTemplates(templateName string) []*ManagedJobTemplateSummary

ListManagedJobTemplates lists the AWS-managed job templates, optionally filtered by template name.

func (*InMemoryBackend) ListMetricValues

func (b *InMemoryBackend) ListMetricValues(
	thingName, metricName string, startTime, endTime float64, maxResults int32, nextToken string,
) ([]*MetricDatapoint, string, error)

ListMetricValues returns stored metric datapoints for a thing/metric over [startTime, endTime], paginated.

func (*InMemoryBackend) ListMitigationActions

func (b *InMemoryBackend) ListMitigationActions() []*MitigationAction

func (*InMemoryBackend) ListNamedShadowsForThing

func (b *InMemoryBackend) ListNamedShadowsForThing(thingName string) ([]string, error)

ListNamedShadowsForThing returns all named shadow names for a thing.

func (*InMemoryBackend) ListOTAUpdates

func (b *InMemoryBackend) ListOTAUpdates() []*OTAUpdate

func (*InMemoryBackend) ListOutgoingCertificates

func (b *InMemoryBackend) ListOutgoingCertificates() []*OutgoingCertificate

ListOutgoingCertificates lists certificates whose status is PENDING_TRANSFER, derived from real, stored certificate state.

func (*InMemoryBackend) ListPolicies

func (b *InMemoryBackend) ListPolicies() []*Policy

ListPolicies returns all policies sorted by name.

func (*InMemoryBackend) ListPolicyPrincipals

func (b *InMemoryBackend) ListPolicyPrincipals(policyName string) []string

func (*InMemoryBackend) ListPolicyVersions

func (b *InMemoryBackend) ListPolicyVersions(policyName string) ([]*PolicyVersion, error)

ListPolicyVersions returns all versions of a policy.

func (*InMemoryBackend) ListPrincipalPolicies

func (b *InMemoryBackend) ListPrincipalPolicies(principal string) []*Policy

func (*InMemoryBackend) ListPrincipalThings

func (b *InMemoryBackend) ListPrincipalThings(principal string) []string

func (*InMemoryBackend) ListProvisioningTemplateVersions

func (b *InMemoryBackend) ListProvisioningTemplateVersions(
	name string,
) ([]*ProvisioningTemplateVersion, error)

func (*InMemoryBackend) ListProvisioningTemplates

func (b *InMemoryBackend) ListProvisioningTemplates() []*ProvisioningTemplate

func (*InMemoryBackend) ListRelatedResourcesForAuditFinding

func (b *InMemoryBackend) ListRelatedResourcesForAuditFinding(findingID string) ([]map[string]any, error)

ListRelatedResourcesForAuditFinding returns the resources related to a stored audit finding (e.g. certificates, policies) identified when the audit ran.

func (*InMemoryBackend) ListRoleAliases

func (b *InMemoryBackend) ListRoleAliases() []*RoleAlias

func (*InMemoryBackend) ListSbomValidationResults

func (b *InMemoryBackend) ListSbomValidationResults(
	packageName, versionName string, maxResults int32, nextToken string,
) ([]*SbomValidationResult, string, error)

ListSbomValidationResults returns the stored validation results for a package version's associated SBOM, paginated.

func (*InMemoryBackend) ListScheduledAudits

func (b *InMemoryBackend) ListScheduledAudits() []*ScheduledAudit

func (*InMemoryBackend) ListSecurityProfiles

func (b *InMemoryBackend) ListSecurityProfiles() []*SecurityProfile

func (*InMemoryBackend) ListSecurityProfilesForTarget

func (b *InMemoryBackend) ListSecurityProfilesForTarget(targetARN string) []string

ListSecurityProfilesForTarget returns profile names attached to a target ARN.

func (*InMemoryBackend) ListStreams

func (b *InMemoryBackend) ListStreams() []*IoTStream

func (*InMemoryBackend) ListTagsForResource

func (b *InMemoryBackend) ListTagsForResource(resourceARN string) map[string]string

func (*InMemoryBackend) ListTargetsForPolicy

func (b *InMemoryBackend) ListTargetsForPolicy(policyName string) []string

func (*InMemoryBackend) ListTargetsForSecurityProfile

func (b *InMemoryBackend) ListTargetsForSecurityProfile(profileName string) []string

ListTargetsForSecurityProfile returns the target ARNs attached to a security profile.

func (*InMemoryBackend) ListThingGroups

func (b *InMemoryBackend) ListThingGroups() []*ThingGroup

ListThingGroups returns all thing groups sorted by name.

func (*InMemoryBackend) ListThingGroupsForThing

func (b *InMemoryBackend) ListThingGroupsForThing(thingName string) []string

func (*InMemoryBackend) ListThingPrincipals

func (b *InMemoryBackend) ListThingPrincipals(thingName string) ([]string, error)

ListThingPrincipals returns principals attached to the given thing.

func (*InMemoryBackend) ListThingPrincipalsV2

func (b *InMemoryBackend) ListThingPrincipalsV2(thingName string) ([]*ThingPrincipalObject, error)

ListThingPrincipalsV2 returns typed principal objects attached to a thing.

func (*InMemoryBackend) ListThingRegistrationTaskReports

func (b *InMemoryBackend) ListThingRegistrationTaskReports(taskID, reportType string) ([]string, error)

ListThingRegistrationTaskReports returns the resource-report links for a bulk thing provisioning task.

func (*InMemoryBackend) ListThingRegistrationTasks

func (b *InMemoryBackend) ListThingRegistrationTasks(status string) []*ThingRegistrationTask

ListThingRegistrationTasks lists bulk thing provisioning tasks, optionally filtered by status.

func (*InMemoryBackend) ListThingTypes

func (b *InMemoryBackend) ListThingTypes() []*ThingType

ListThingTypes returns all thing types sorted by name.

func (*InMemoryBackend) ListThings

func (b *InMemoryBackend) ListThings() []*Thing

ListThings returns all Things sorted by name.

func (*InMemoryBackend) ListThingsInBillingGroup

func (b *InMemoryBackend) ListThingsInBillingGroup(groupName string) []string

func (*InMemoryBackend) ListThingsInThingGroup

func (b *InMemoryBackend) ListThingsInThingGroup(input *ListThingsInThingGroupInput) ([]string, error)

ListThingsInThingGroup returns all things in a given thing group.

func (*InMemoryBackend) ListTopicRuleDestinations

func (b *InMemoryBackend) ListTopicRuleDestinations() []*TopicRuleDestination

ListTopicRuleDestinations returns all topic rule destinations.

func (*InMemoryBackend) ListTopicRules

func (b *InMemoryBackend) ListTopicRules() []*TopicRule

ListTopicRules returns all Topic Rules sorted by name.

func (*InMemoryBackend) ListV2LoggingLevels

func (b *InMemoryBackend) ListV2LoggingLevels() []*V2LoggingLevel

func (*InMemoryBackend) ListViolationEvents

func (b *InMemoryBackend) ListViolationEvents(
	thingName, securityProfileName, verificationState string,
	startTime, endTime float64,
) []*ViolationEvent

ListViolationEvents returns recorded violation events, optionally filtered by thing name, security profile name, verification state, and/or an [startTime, endTime] window (epoch seconds; zero means unbounded).

func (*InMemoryBackend) MQTTPort

func (b *InMemoryBackend) MQTTPort() int

MQTTPort returns the configured TCP port for the MQTT broker.

func (*InMemoryBackend) PutVerificationStateOnViolation

func (b *InMemoryBackend) PutVerificationStateOnViolation(violationID, verificationState, description string) error

PutVerificationStateOnViolation mutates the verification state (and optional description) of an active violation, or returns ErrResourceNotFound if violationID is unknown.

func (*InMemoryBackend) RegisterCACertificate

func (b *InMemoryBackend) RegisterCACertificate(pem, status string) (*CACertificate, error)

func (*InMemoryBackend) RegisterCertificate

func (b *InMemoryBackend) RegisterCertificate(input *RegisterCertificateInput) (*Certificate, error)

RegisterCertificate registers a certificate.

func (*InMemoryBackend) RegisterCertificateWithoutCA

func (b *InMemoryBackend) RegisterCertificateWithoutCA(input *RegisterCertificateInput) (*Certificate, error)

RegisterCertificateWithoutCA registers a certificate without a CA.

func (*InMemoryBackend) RegisterThing

func (b *InMemoryBackend) RegisterThing(input *RegisterThingInput) (*RegisterThingOutput, error)

RegisterThing provisions (creates or updates) a thing from a provisioning template body and parameters, generating a device certificate and attaching it to the thing.

func (*InMemoryBackend) RejectCertificateTransfer

func (b *InMemoryBackend) RejectCertificateTransfer(certID string) error

RejectCertificateTransfer rejects a pending certificate transfer.

func (*InMemoryBackend) RemoveThingFromBillingGroup

func (b *InMemoryBackend) RemoveThingFromBillingGroup(thingName, _ string) error

func (*InMemoryBackend) RemoveThingFromThingGroup

func (b *InMemoryBackend) RemoveThingFromThingGroup(input *RemoveThingFromThingGroupInput) error

RemoveThingFromThingGroup removes a thing from a thing group.

func (*InMemoryBackend) ReplaceTopicRule

func (b *InMemoryBackend) ReplaceTopicRule(input *ReplaceTopicRuleInput) error

ReplaceTopicRule replaces the payload of an existing topic rule.

func (*InMemoryBackend) Reset

func (b *InMemoryBackend) Reset()

Reset clears all backend state. Useful for test isolation.

func (*InMemoryBackend) Restore

func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error

Restore loads backend state from a JSON snapshot.

func (*InMemoryBackend) SearchIndex

func (b *InMemoryBackend) SearchIndex(input *SearchIndexInput) (*SearchIndexOutput, error)

SearchIndex runs QueryString against the fleet index named by IndexName (default AWS_Things) and returns matching Thing or ThingGroup documents.

func (*InMemoryBackend) SeedActiveViolation

func (b *InMemoryBackend) SeedActiveViolation(input *SeedActiveViolationInput) (*ActiveViolation, error)

SeedActiveViolation records a Device Defender Detect violation. AWS IoT raises violations internally from behavior evaluation against reported device metrics rather than through a public "create violation" API; this hook lets gopherstack populate realistic state for ListActiveViolations, ListViolationEvents, PutVerificationStateOnViolation, and detect mitigation-action targeting instead of those always returning an empty set.

func (*InMemoryBackend) SeedAuditFinding

func (b *InMemoryBackend) SeedAuditFinding(f *AuditFinding) *AuditFinding

SeedAuditFinding injects an audit finding into the backend so that DescribeAuditFinding, ListAuditFindings, and ListRelatedResourcesForAuditFinding return realistic data. AWS IoT populates audit findings internally when an audit task runs; this is the additive hook gopherstack exposes so callers (and tests) can populate findings deterministically instead of always seeing an empty set. It returns the stored finding, generating a FindingID when none is supplied.

func (*InMemoryBackend) SetDefaultAuthorizer

func (b *InMemoryBackend) SetDefaultAuthorizer(authorizerName string) error

func (*InMemoryBackend) SetDefaultPolicyVersion

func (b *InMemoryBackend) SetDefaultPolicyVersion(policyName, versionID string) error

SetDefaultPolicyVersion sets the default version of a policy.

func (*InMemoryBackend) SetLoggingOptions

func (b *InMemoryBackend) SetLoggingOptions(roleARN, logLevel string) error

func (*InMemoryBackend) SetRuleDispatcher

func (b *InMemoryBackend) SetRuleDispatcher(d RuleDispatcher)

SetRuleDispatcher wires the SQS/Lambda action dispatcher.

func (*InMemoryBackend) SetThingConnectivityInternal

func (b *InMemoryBackend) SetThingConnectivityInternal(thingName string, data ThingConnectivityData)

SetThingConnectivityInternal seeds/updates a thing's connectivity data for testing (real connectivity is derived from live MQTT session events, which this in-memory backend does not yet wire into fleet indexing).

func (*InMemoryBackend) SetV2LoggingLevel

func (b *InMemoryBackend) SetV2LoggingLevel(target map[string]any, logLevel string) error

func (*InMemoryBackend) SetV2LoggingOptions

func (b *InMemoryBackend) SetV2LoggingOptions(roleARN, defaultLogLevel string, disableAllLogs bool) error

func (*InMemoryBackend) Snapshot

func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte

Snapshot serialises the backend state to JSON.

func (*InMemoryBackend) StartAuditMitigationActionsTask

func (b *InMemoryBackend) StartAuditMitigationActionsTask(
	input *StartAuditMitigationActionsTaskInput,
) (*AuditMitigationTask, error)

StartAuditMitigationActionsTask creates a task that applies mitigation actions to the audit findings identified by input.Target, seeding one execution record per (finding, action) pair resolved from AuditCheckToActionsMapping.

func (*InMemoryBackend) StartDetectMitigationActionsTask

func (b *InMemoryBackend) StartDetectMitigationActionsTask(
	input *StartDetectMitigationActionsTaskInput,
) (*DetectMitigationTask, error)

StartDetectMitigationActionsTask creates a Device Defender ML Detect mitigation-action task, seeding one execution record per (violation, action) pair resolved from the task target.

func (*InMemoryBackend) StartOnDemandAuditTask

func (b *InMemoryBackend) StartOnDemandAuditTask(_ []string) (string, error)

func (*InMemoryBackend) StartThingRegistrationTask

func (b *InMemoryBackend) StartThingRegistrationTask(
	input *StartThingRegistrationTaskInput,
) (*ThingRegistrationTask, error)

StartThingRegistrationTask creates a bulk thing provisioning task.

func (*InMemoryBackend) StopThingRegistrationTask

func (b *InMemoryBackend) StopThingRegistrationTask(taskID string) error

StopThingRegistrationTask cancels a bulk thing provisioning task.

func (*InMemoryBackend) TagResourceGeneric

func (b *InMemoryBackend) TagResourceGeneric(resourceARN string, tags map[string]string) error

func (*InMemoryBackend) TestAuthorization

func (b *InMemoryBackend) TestAuthorization(input *TestAuthorizationInput) ([]*AuthResult, error)

TestAuthorization evaluates the effective policy set for a principal (plus PolicyNamesToAdd, minus PolicyNamesToSkip) against each requested authInfo/resource pair using real, stored IoT policy documents.

func (*InMemoryBackend) TestInvokeAuthorizer

func (b *InMemoryBackend) TestInvokeAuthorizer(
	authorizerName string,
	input *TestInvokeAuthorizerInput,
) (*TestInvokeAuthorizerOutput, error)

TestInvokeAuthorizer evaluates a stored custom authorizer's configuration (status, signing requirement) against the supplied token/signature and returns a deterministic authentication result derived from that stored state.

func (*InMemoryBackend) TransferCertificate

func (b *InMemoryBackend) TransferCertificate(certID, targetAccount string) error

TransferCertificate initiates a certificate transfer to another account.

func (*InMemoryBackend) UntagResource

func (b *InMemoryBackend) UntagResource(resourceARN string, tagKeys []string) error

func (*InMemoryBackend) UpdateAccountAuditConfiguration

func (b *InMemoryBackend) UpdateAccountAuditConfiguration(roleARN string, checks map[string]*AuditCheckConfig) error

func (*InMemoryBackend) UpdateAuditSuppression

func (b *InMemoryBackend) UpdateAuditSuppression(
	checkName string,
	resourceID map[string]any,
	description string,
	suppressIndefinitely bool,
	expirationDate float64,
) error

func (*InMemoryBackend) UpdateAuthorizer

func (b *InMemoryBackend) UpdateAuthorizer(name, functionARN, status string) (*Authorizer, error)

func (*InMemoryBackend) UpdateBillingGroup

func (b *InMemoryBackend) UpdateBillingGroup(
	name string,
	props BillingGroupProperties,
) (int64, error)

func (*InMemoryBackend) UpdateCACertificate

func (b *InMemoryBackend) UpdateCACertificate(id, status string) error

func (*InMemoryBackend) UpdateCertificate

func (b *InMemoryBackend) UpdateCertificate(input *UpdateCertificateInput) error

UpdateCertificate updates the status of a certificate.

func (*InMemoryBackend) UpdateCertificateProvider

func (b *InMemoryBackend) UpdateCertificateProvider(input *UpdateCertificateProviderInput) error

UpdateCertificateProvider updates an existing certificate provider.

func (*InMemoryBackend) UpdateCommand

func (b *InMemoryBackend) UpdateCommand(id, displayName, description string, deprecated bool) error

func (*InMemoryBackend) UpdateCustomMetric

func (b *InMemoryBackend) UpdateCustomMetric(name, displayName string) (*CustomMetric, error)

func (*InMemoryBackend) UpdateDimension

func (b *InMemoryBackend) UpdateDimension(name string, stringValues []string) (*Dimension, error)

func (*InMemoryBackend) UpdateDomainConfiguration

func (b *InMemoryBackend) UpdateDomainConfiguration(
	name, status string,
) (*DomainConfiguration, error)

func (*InMemoryBackend) UpdateDynamicThingGroup

func (b *InMemoryBackend) UpdateDynamicThingGroup(input *UpdateThingGroupInput) (int64, error)

UpdateDynamicThingGroup updates a dynamic thing group and returns the new version.

func (*InMemoryBackend) UpdateEncryptionConfiguration

func (b *InMemoryBackend) UpdateEncryptionConfiguration(input *UpdateEncryptionConfigurationInput) error

UpdateEncryptionConfiguration validates and mutates the account's encryption configuration.

func (*InMemoryBackend) UpdateEventConfigurations

func (b *InMemoryBackend) UpdateEventConfigurations(cfgs map[string]*EventConfigEntry) error

func (*InMemoryBackend) UpdateFleetMetric

func (b *InMemoryBackend) UpdateFleetMetric(name, queryString, description string, period int32) error

func (*InMemoryBackend) UpdateIndexingConfiguration

func (b *InMemoryBackend) UpdateIndexingConfiguration(input *UpdateIndexingConfigurationInput) error

UpdateIndexingConfiguration validates and stores a new fleet indexing configuration.

func (*InMemoryBackend) UpdateIoTPackage

func (b *InMemoryBackend) UpdateIoTPackage(name, description, defaultVersionName string) error

func (*InMemoryBackend) UpdateIoTPackageVersion

func (b *InMemoryBackend) UpdateIoTPackageVersion(packageName, versionName, description, status string) error

func (*InMemoryBackend) UpdateJob

func (b *InMemoryBackend) UpdateJob(jobID, description string) error

func (*InMemoryBackend) UpdateMitigationAction

func (b *InMemoryBackend) UpdateMitigationAction(
	name, roleARN string,
	params map[string]any,
) (*MitigationAction, error)

func (*InMemoryBackend) UpdatePackageConfiguration

func (b *InMemoryBackend) UpdatePackageConfiguration(cfg map[string]any) error

func (*InMemoryBackend) UpdateProvisioningTemplate

func (b *InMemoryBackend) UpdateProvisioningTemplate(
	name, description string,
	enabled *bool,
	provRoleARN string,
) error

func (*InMemoryBackend) UpdateRoleAlias

func (b *InMemoryBackend) UpdateRoleAlias(
	alias, roleARN string,
	credDuration int,
) (*RoleAlias, error)

func (*InMemoryBackend) UpdateScheduledAudit

func (b *InMemoryBackend) UpdateScheduledAudit(
	name, frequency, dayOfMonth, dayOfWeek string,
	checks []string,
) (*ScheduledAudit, error)

func (*InMemoryBackend) UpdateSecurityProfile

func (b *InMemoryBackend) UpdateSecurityProfile(
	name, description string,
) (*SecurityProfile, error)

func (*InMemoryBackend) UpdateStream

func (b *InMemoryBackend) UpdateStream(id, description, roleARN string, files []StreamFile) (*IoTStream, error)

func (*InMemoryBackend) UpdateThing

func (b *InMemoryBackend) UpdateThing(input *UpdateThingInput) error

UpdateThing updates attributes and/or type of an existing thing.

func (*InMemoryBackend) UpdateThingGroup

func (b *InMemoryBackend) UpdateThingGroup(input *UpdateThingGroupInput) (int64, error)

UpdateThingGroup updates an existing thing group and returns the new version.

func (*InMemoryBackend) UpdateThingGroupsForThing

func (b *InMemoryBackend) UpdateThingGroupsForThing(input *UpdateThingGroupsForThingInput) error

UpdateThingGroupsForThing adds and/or removes a thing from the named thing groups, keeping the thing->groups and group->things indexes consistent.

func (*InMemoryBackend) UpdateThingShadow

func (b *InMemoryBackend) UpdateThingShadow(thingName, shadowName string, state map[string]any) (*ThingShadow, error)

UpdateThingShadow creates or updates the shadow for a thing.

func (*InMemoryBackend) UpdateThingType

func (b *InMemoryBackend) UpdateThingType(input *UpdateThingTypeInput) error

UpdateThingType updates the description and/or searchable attributes of an existing thing type. Searchable attributes are additive, matching the real AWS IoT behavior (existing searchable attributes cannot be removed this way).

func (*InMemoryBackend) UpdateTopicRuleDestination

func (b *InMemoryBackend) UpdateTopicRuleDestination(input *UpdateTopicRuleDestinationInput) error

UpdateTopicRuleDestination updates the status of a topic rule destination.

func (*InMemoryBackend) ValidateSecurityProfileBehaviors

func (b *InMemoryBackend) ValidateSecurityProfileBehaviors(
	behaviors []SecurityProfileBehavior,
) (bool, []string)

ValidateSecurityProfileBehaviors validates the supplied behaviors against AWS's structural rules (name required, criteria required, comparison operator must be a known value, non-negative durations/thresholds).

type IndexDescription

type IndexDescription struct {
	IndexName   string
	IndexStatus string
	Schema      string
}

IndexDescription describes a fleet index (returned by DescribeIndex).

type IndexingField

type IndexingField struct {
	Name string `json:"name"`
	Type string `json:"type"`
}

IndexingField describes a custom field included in a fleet index.

type IndexingFilter

type IndexingFilter struct {
	NamedShadowNames []string `json:"namedShadowNames,omitempty"`
}

IndexingFilter restricts which named shadows are indexed.

type IoTCommand

type IoTCommand struct {
	Tags            map[string]string `json:"tags,omitempty"`
	Payload         map[string]any    `json:"payload,omitempty"`
	CommandARN      string            `json:"commandArn"`
	CommandID       string            `json:"commandId"`
	DisplayName     string            `json:"displayName,omitempty"`
	Description     string            `json:"description,omitempty"`
	Namespace       string            `json:"namespace,omitempty"`
	CreationDate    float64           `json:"creationDate,omitempty"`
	LastUpdated     float64           `json:"lastUpdatedAt,omitempty"`
	Deprecated      bool              `json:"deprecated"`
	PendingDeletion bool              `json:"pendingDeletion"`
}

IoTCommand represents an AWS IoT command.

type IoTCommandExecution

type IoTCommandExecution struct {
	CommandARN   string  `json:"commandArn"`
	ExecutionID  string  `json:"executionId"`
	ThingARN     string  `json:"thingArn"`
	Status       string  `json:"status"`
	CreationDate float64 `json:"createdAt,omitempty"`
}

IoTCommandExecution represents an execution of an IoT command.

type IoTPackage

type IoTPackage struct {
	Tags               map[string]string `json:"tags,omitempty"`
	PackageARN         string            `json:"packageArn"`
	PackageName        string            `json:"packageName"`
	Description        string            `json:"description,omitempty"`
	DefaultVersionName string            `json:"defaultVersionName,omitempty"`
	CreationDate       float64           `json:"creationDate,omitempty"`
	LastModifiedDate   float64           `json:"lastModifiedDate,omitempty"`
}

IoTPackage represents an AWS IoT software package.

type IoTPackageVersion

type IoTPackageVersion struct {
	Tags              map[string]string `json:"tags,omitempty"`
	PackageVersionARN string            `json:"packageVersionArn"`
	PackageName       string            `json:"packageName"`
	VersionName       string            `json:"versionName"`
	Description       string            `json:"description,omitempty"`
	Status            string            `json:"status"`
	CreationDate      float64           `json:"creationDate,omitempty"`
	LastModifiedDate  float64           `json:"lastModifiedDate,omitempty"`
}

IoTPackageVersion represents a version of an AWS IoT software package.

type IoTStream

type IoTStream struct {
	Tags          map[string]string `json:"tags,omitempty"`
	StreamID      string            `json:"streamId"`
	StreamARN     string            `json:"streamArn"`
	Description   string            `json:"description,omitempty"`
	RoleARN       string            `json:"roleArn,omitempty"`
	Files         []StreamFile      `json:"files,omitempty"`
	CreatedAt     float64           `json:"createdAt,omitempty"`
	LastUpdated   float64           `json:"lastUpdatedAt,omitempty"`
	StreamVersion int32             `json:"streamVersion,omitempty"`
}

IoTStream represents an IoT data stream.

type Job

type Job struct {
	Tags                       map[string]string           `json:"tags,omitempty"`
	DocumentParameters         map[string]string           `json:"documentParameters,omitempty"`
	AbortConfig                *AbortConfig                `json:"abortConfig,omitempty"`
	JobExecutionsRolloutConfig *JobExecutionsRolloutConfig `json:"jobExecutionsRolloutConfig,omitempty"`
	TimeoutConfig              *TimeoutConfig              `json:"timeoutConfig,omitempty"`
	JobID                      string                      `json:"jobId"`
	JobARN                     string                      `json:"jobArn"`
	Description                string                      `json:"description,omitempty"`
	Document                   string                      `json:"document,omitempty"`
	DocumentSource             string                      `json:"documentSource,omitempty"`
	JobTemplateARN             string                      `json:"jobTemplateArn,omitempty"`
	Status                     JobStatus                   `json:"status"`
	TargetSelection            string                      `json:"targetSelection,omitempty"`
	Targets                    []string                    `json:"targets,omitempty"`
	CreatedAt                  float64                     `json:"createdAt,omitempty"`
	LastUpdatedAt              float64                     `json:"lastUpdatedAt,omitempty"`
	CompletedAt                float64                     `json:"completedAt,omitempty"`
}

Job represents an IoT job.

type JobExecution

type JobExecution struct {
	JobID           string             `json:"jobId"`
	ThingName       string             `json:"thingName"`
	Status          JobExecutionStatus `json:"status"`
	ExecutionNumber int64              `json:"executionNumber,omitempty"`
	QueuedAt        float64            `json:"queuedAt,omitempty"`
	StartedAt       float64            `json:"startedAt,omitempty"`
	LastUpdatedAt   float64            `json:"lastUpdatedAt,omitempty"`
}

JobExecution represents a single job execution on a thing.

type JobExecutionStatus

type JobExecutionStatus string

JobExecutionStatus represents the status of a job execution on a thing.

const (
	JobExecQueued     JobExecutionStatus = "QUEUED"
	JobExecInProgress JobExecutionStatus = "IN_PROGRESS"
	JobExecSucceeded  JobExecutionStatus = "SUCCEEDED"
	JobExecFailed     JobExecutionStatus = "FAILED"
	JobExecCanceled   JobExecutionStatus = "CANCELED"
	JobExecRejected   JobExecutionStatus = "REJECTED"
	JobExecRemoved    JobExecutionStatus = "REMOVED"
)

type JobExecutionsRolloutConfig

type JobExecutionsRolloutConfig struct {
	MaximumPerMinute int `json:"maximumPerMinute,omitempty"`
}

JobExecutionsRolloutConfig holds rollout config for a job.

type JobStatus

type JobStatus string

JobStatus represents the status of a job.

const (
	JobStatusInProgress JobStatus = "IN_PROGRESS"
	JobStatusCompleted  JobStatus = "COMPLETED"
	JobStatusFailed     JobStatus = "FAILED"
	JobStatusCanceled   JobStatus = "CANCELED"
	JobStatusDeletion   JobStatus = "DELETION_IN_PROGRESS"
)

type JobTemplate

type JobTemplate struct {
	Tags                       map[string]string           `json:"tags,omitempty"`
	AbortConfig                *AbortConfig                `json:"abortConfig,omitempty"`
	JobExecutionsRolloutConfig *JobExecutionsRolloutConfig `json:"jobExecutionsRolloutConfig,omitempty"`
	TimeoutConfig              *TimeoutConfig              `json:"timeoutConfig,omitempty"`
	JobTemplateID              string                      `json:"jobTemplateId"`
	JobTemplateARN             string                      `json:"jobTemplateArn"`
	Description                string                      `json:"description,omitempty"`
	Document                   string                      `json:"document,omitempty"`
	DocumentSource             string                      `json:"documentSource,omitempty"`
	CreatedAt                  float64                     `json:"createdAt,omitempty"`
}

JobTemplate represents an IoT job template.

type LambdaAction

type LambdaAction struct {
	FunctionARN string `json:"functionArn"`
}

LambdaAction invokes a Lambda function with the matched message payload.

type ListAttachedPoliciesInput

type ListAttachedPoliciesInput struct {
	Target    string
	Recursive bool
}

ListAttachedPoliciesInput is the input for ListAttachedPolicies.

type ListThingsInThingGroupInput

type ListThingsInThingGroupInput struct {
	ThingGroupName string
	Recursive      bool
}

ListThingsInThingGroupInput is the input for ListThingsInThingGroup.

type LoggingOptions

type LoggingOptions struct {
	RoleARN  string `json:"roleArn"`
	LogLevel string `json:"logLevel"`
}

LoggingOptions holds the IoT account-level logging configuration.

type ManagedJobTemplate

type ManagedJobTemplate struct {
	TemplateName       string                        `json:"templateName"`
	TemplateArn        string                        `json:"templateArn"`
	TemplateVersion    string                        `json:"templateVersion"`
	Description        string                        `json:"description,omitempty"`
	Document           string                        `json:"document"`
	Environments       []string                      `json:"environments,omitempty"`
	DocumentParameters []ManagedJobTemplateParameter `json:"documentParameters,omitempty"`
}

ManagedJobTemplate represents an AWS-managed job template.

type ManagedJobTemplateParameter

type ManagedJobTemplateParameter struct {
	Key         string `json:"key"`
	Description string `json:"description,omitempty"`
	Regex       string `json:"regex,omitempty"`
	Example     string `json:"example,omitempty"`
	Optional    bool   `json:"optional"`
}

ManagedJobTemplateParameter describes one substitutable field in a managed job template document.

type ManagedJobTemplateSummary

type ManagedJobTemplateSummary struct {
	TemplateName    string   `json:"templateName"`
	TemplateArn     string   `json:"templateArn"`
	TemplateVersion string   `json:"templateVersion"`
	Description     string   `json:"description,omitempty"`
	Environments    []string `json:"environments,omitempty"`
}

ManagedJobTemplateSummary is the summary form of a ManagedJobTemplate returned by ListManagedJobTemplates.

type MetricDatapoint

type MetricDatapoint struct {
	Value     *MetricValueData `json:"value,omitempty"`
	Timestamp float64          `json:"timestamp"`
}

MetricDatapoint is one reported value of a security-profile metric for a thing at a point in time.

type MetricValueData

type MetricValueData struct {
	Count  *int64   `json:"count,omitempty"`
	Number *float64 `json:"number,omitempty"`
	Cidrs  []string `json:"cidrs,omitempty"`
	Ports  []int32  `json:"ports,omitempty"`
}

MetricValueData is the polymorphic value of a metric datapoint.

type MitigationAction

type MitigationAction struct {
	Tags             map[string]string `json:"tags,omitempty"`
	ActionParams     map[string]any    `json:"actionParams,omitempty"`
	ActionName       string            `json:"actionName"`
	ActionARN        string            `json:"actionArn"`
	ActionID         string            `json:"actionId"`
	RoleARN          string            `json:"roleArn,omitempty"`
	CreationDate     float64           `json:"creationDate,omitempty"`
	LastModifiedDate float64           `json:"lastModifiedDate,omitempty"`
}

MitigationAction represents an IoT mitigation action.

type OTAUpdate

type OTAUpdate struct {
	OTAUpdateARN     string   `json:"otaUpdateArn"`
	OTAUpdateID      string   `json:"otaUpdateId"`
	Description      string   `json:"description,omitempty"`
	RoleARN          string   `json:"roleArn,omitempty"`
	Status           string   `json:"otaUpdateStatus"`
	Files            []any    `json:"files,omitempty"`
	Targets          []string `json:"targets,omitempty"`
	CreationDate     float64  `json:"creationDate,omitempty"`
	LastModifiedDate float64  `json:"lastModifiedDate,omitempty"`
}

OTAUpdate represents an AWS IoT OTA update.

type OutgoingCertificate

type OutgoingCertificate struct {
	CertificateARN  string  `json:"certificateArn"`
	CertificateID   string  `json:"certificateId"`
	TransferredTo   string  `json:"transferredTo,omitempty"`
	TransferMessage string  `json:"transferMessage,omitempty"`
	CreationDate    float64 `json:"creationDate,omitempty"`
	TransferDate    float64 `json:"transferDate,omitempty"`
}

OutgoingCertificate describes a certificate pending transfer to another AWS account.

type PackageConfiguration

type PackageConfiguration struct {
	VersionUpdateByJobsConfig map[string]any `json:"versionUpdateByJobsConfig,omitempty"`
}

PackageConfiguration holds the software package configuration.

type ParsedRule

type ParsedRule struct {
	// TopicPattern is the MQTT topic pattern extracted from the FROM clause.
	TopicPattern string
	// Condition is the optional WHERE clause predicate.
	Condition string
}

ParsedRule holds the parsed components of an IoT SQL rule statement.

func ParseRuleSQL

func ParseRuleSQL(sql string) (*ParsedRule, error)

ParseRuleSQL parses a simplified AWS IoT SQL rule statement. Supported format: SELECT * FROM 'topic/pattern' [WHERE condition].

type PercentileValue

type PercentileValue struct {
	Percent float64
	Value   float64
}

PercentileValue is a single (percent, value) pair returned by GetPercentiles.

type PercentilesInput

type PercentilesInput struct {
	AggregationInput
	Percents []float64
}

PercentilesInput is the input for GetPercentiles.

type Policy

type Policy struct {
	CreatedAt      time.Time `json:"creationDate"`
	LastModifiedAt time.Time `json:"lastModifiedDate"`
	PolicyName     string    `json:"policyName"`
	PolicyDocument string    `json:"policyDocument"`
	ARN            string    `json:"policyArn"`
}

Policy represents an AWS IoT Policy.

type PolicyIdentifier

type PolicyIdentifier struct {
	PolicyName string `json:"policyName,omitempty"`
	PolicyARN  string `json:"policyArn,omitempty"`
}

PolicyIdentifier identifies a policy referenced by an authorization result.

type PolicyVersion

type PolicyVersion struct {
	CreatedAt        time.Time `json:"createDate"`
	VersionID        string    `json:"versionId"`
	PolicyDocument   string    `json:"policyDocument"`
	IsDefaultVersion bool      `json:"isDefaultVersion"`
}

PolicyVersion represents a version of an AWS IoT policy.

type Provider

type Provider struct{}

Provider implements service.Provider for the IoT service.

func (*Provider) Init

Init initialises the IoT backend, MQTT broker, and handler.

func (*Provider) Name

func (p *Provider) Name() string

Name returns the service provider name.

type ProvisioningTemplate

type ProvisioningTemplate struct {
	Tags                map[string]string `json:"tags,omitempty"`
	TemplateName        string            `json:"templateName"`
	TemplateARN         string            `json:"templateArn"`
	Description         string            `json:"description,omitempty"`
	TemplateBody        string            `json:"templateBody,omitempty"`
	ProvisioningRoleARN string            `json:"provisioningRoleArn,omitempty"`
	TemplateType        string            `json:"type,omitempty"`
	Enabled             bool              `json:"enabled"`
	DefaultVersionID    int32             `json:"defaultVersionId,omitempty"`
	CreationDate        float64           `json:"creationDate,omitempty"`
	LastModifiedDate    float64           `json:"lastModifiedDate,omitempty"`
}

ProvisioningTemplate represents an IoT fleet provisioning template.

type ProvisioningTemplateVersion

type ProvisioningTemplateVersion struct {
	TemplateBody     string  `json:"templateBody,omitempty"`
	CreationDate     float64 `json:"creationDate,omitempty"`
	VersionID        int32   `json:"versionId"`
	IsDefaultVersion bool    `json:"isDefaultVersion"`
}

ProvisioningTemplateVersion represents a version of a provisioning template.

type RegisterCertificateInput

type RegisterCertificateInput struct {
	CertificatePem string
	Status         string
}

RegisterCertificateInput is the input for RegisterCertificate.

type RegisterThingInput

type RegisterThingInput struct {
	Parameters   map[string]string `json:"parameters"`
	TemplateBody string            `json:"templateBody"`
}

RegisterThingInput is the input for RegisterThing.

type RegisterThingOutput

type RegisterThingOutput struct {
	ResourceArns   map[string]string `json:"resourceArns"`
	CertificatePem string            `json:"certificatePem"`
}

RegisterThingOutput is the output for RegisterThing.

type RemoveThingFromThingGroupInput

type RemoveThingFromThingGroupInput struct {
	ThingGroupName string `json:"thingGroupName"`
	ThingGroupArn  string `json:"thingGroupArn"`
	ThingName      string `json:"thingName"`
	ThingArn       string `json:"thingArn"`
}

RemoveThingFromThingGroupInput is the input for RemoveThingFromThingGroup.

type ReplaceTopicRuleInput

type ReplaceTopicRuleInput struct {
	TopicRulePayload *TopicRulePayload
	RuleName         string
}

ReplaceTopicRuleInput is the input for ReplaceTopicRule.

type Resettable

type Resettable interface {
	Reset()
}

Resettable is an optional interface that a StorageBackend may implement to support clearing all state (used for test isolation).

type RoleAlias

type RoleAlias struct {
	Tags                      map[string]string `json:"tags,omitempty"`
	RoleAlias                 string            `json:"roleAlias"`
	RoleAliasARN              string            `json:"roleAliasArn"`
	RoleARN                   string            `json:"roleArn"`
	Owner                     string            `json:"owner,omitempty"`
	CredentialDurationSeconds int               `json:"credentialDurationSeconds,omitempty"`
	CreationDate              float64           `json:"creationDate,omitempty"`
	LastModifiedDate          float64           `json:"lastModifiedDate,omitempty"`
}

RoleAlias represents an IoT role alias.

type RuleAction

type RuleAction struct {
	SQS    *SQSAction    `json:"sqs,omitempty"`
	Lambda *LambdaAction `json:"lambda,omitempty"`
}

RuleAction represents an action taken when a rule matches.

type RuleDispatcher

type RuleDispatcher interface {
	SendToSQS(queueURL, body string) error
	InvokeLambda(ctx context.Context, functionARN string, payload []byte) error
}

RuleDispatcher is implemented by the CLI wiring layer and dispatches rule actions.

type S3Location

type S3Location struct {
	Bucket  string `json:"bucket"`
	Key     string `json:"key"`
	Version string `json:"version"`
}

S3Location represents an S3 object location.

type SQSAction

type SQSAction struct {
	QueueURL string `json:"queueUrl"`
	RoleARN  string `json:"roleArn"`
}

SQSAction sends the matched message to an SQS queue.

type SbomDocument

type SbomDocument struct {
	S3Location *S3Location `json:"s3Location"`
}

SbomDocument represents an SBOM document reference.

type SbomValidationResult

type SbomValidationResult struct {
	FileName         string `json:"fileName,omitempty"`
	ValidationResult string `json:"validationResult"`
	ErrorCode        string `json:"errorCode,omitempty"`
	ErrorMessage     string `json:"errorMessage,omitempty"`
}

SbomValidationResult reports the outcome of validating one SBOM file associated with a package version.

type ScheduledAudit

type ScheduledAudit struct {
	Tags               map[string]string `json:"tags,omitempty"`
	ScheduledAuditName string            `json:"scheduledAuditName"`
	ScheduledAuditARN  string            `json:"scheduledAuditArn"`
	Frequency          string            `json:"frequency"`
	DayOfMonth         string            `json:"dayOfMonth,omitempty"`
	DayOfWeek          string            `json:"dayOfWeek,omitempty"`
	TargetCheckNames   []string          `json:"targetCheckNames,omitempty"`
}

ScheduledAudit represents an IoT scheduled audit.

type SearchIndexInput

type SearchIndexInput struct {
	IndexName   string
	QueryString string
	NextToken   string
	MaxResults  int32
}

SearchIndexInput is the input for SearchIndex.

type SearchIndexOutput

type SearchIndexOutput struct {
	NextToken   string
	Things      []*SearchIndexThingResult
	ThingGroups []*SearchIndexThingGroupResult
}

SearchIndexOutput is the output for SearchIndex.

type SearchIndexThingGroupResult

type SearchIndexThingGroupResult struct {
	Attributes      map[string]string `json:"attributes"`
	ThingGroupName  string            `json:"thingGroupName"`
	ThingGroupID    string            `json:"thingGroupId"`
	ParentGroupName string            `json:"parentGroupName,omitempty"`
}

SearchIndexThingGroupResult is a ThingGroup document returned by SearchIndex.

type SearchIndexThingResult

type SearchIndexThingResult struct {
	Attributes      map[string]string `json:"attributes"`
	ThingName       string            `json:"thingName"`
	ThingID         string            `json:"thingId"`
	ThingTypeName   string            `json:"thingTypeName,omitempty"`
	ThingGroupNames []string          `json:"thingGroupNames,omitempty"`
}

SearchIndexThingResult is a Thing document returned by SearchIndex.

type SecurityProfile

type SecurityProfile struct {
	Tags                       map[string]string `json:"tags,omitempty"`
	SecurityProfileName        string            `json:"securityProfileName"`
	SecurityProfileARN         string            `json:"securityProfileArn"`
	SecurityProfileDescription string            `json:"securityProfileDescription,omitempty"`
	Version                    int64             `json:"version"`
	CreationDate               float64           `json:"creationDate,omitempty"`
	LastModifiedDate           float64           `json:"lastModifiedDate,omitempty"`
}

SecurityProfile represents an IoT security profile.

type SecurityProfileBehavior

type SecurityProfileBehavior struct {
	Criteria *SecurityProfileBehaviorCriteria `json:"criteria,omitempty"`
	Name     string                           `json:"name"`
	Metric   string                           `json:"metric,omitempty"`
}

SecurityProfileBehavior describes one behavior to validate.

type SecurityProfileBehaviorCriteria

type SecurityProfileBehaviorCriteria struct {
	ComparisonOperator           string `json:"comparisonOperator,omitempty"`
	DurationSeconds              int32  `json:"durationSeconds,omitempty"`
	ConsecutiveDatapointsToAlarm int32  `json:"consecutiveDatapointsToAlarm,omitempty"`
	ConsecutiveDatapointsToClear int32  `json:"consecutiveDatapointsToClear,omitempty"`
}

SecurityProfileBehaviorCriteria is the criteria portion of a behavior.

type SeedActiveViolationInput

type SeedActiveViolationInput struct {
	Behavior            *ViolationBehavior
	LastViolationValue  map[string]any
	ViolationID         string
	ThingName           string
	SecurityProfileName string
	VerificationState   string
}

SeedActiveViolationInput seeds a Device Defender Detect violation.

type Snapshottable

type Snapshottable interface {
	Snapshot(ctx context.Context) []byte
	Restore(ctx context.Context, data []byte) error
}

Snapshottable is an optional interface that a StorageBackend may implement to support snapshot-based persistence.

type StartAuditMitigationActionsTaskInput

type StartAuditMitigationActionsTaskInput struct {
	AuditCheckToActionsMapping map[string][]string
	Target                     *AuditMitigationActionsTaskTarget
	TaskID                     string
}

StartAuditMitigationActionsTaskInput is the input for StartAuditMitigationActionsTask.

type StartDetectMitigationActionsTaskInput

type StartDetectMitigationActionsTaskInput struct {
	Target                      *DetectMitigationActionsTaskTarget
	TaskID                      string
	Actions                     []string
	IncludeOnlyActiveViolations bool
	IncludeSuppressedAlerts     bool
}

StartDetectMitigationActionsTaskInput is the input for StartDetectMitigationActionsTask.

type StartThingRegistrationTaskInput

type StartThingRegistrationTaskInput struct {
	TemplateBody    string `json:"templateBody"`
	InputFileBucket string `json:"inputFileBucket"`
	InputFileKey    string `json:"inputFileKey"`
	RoleArn         string `json:"roleArn"`
}

StartThingRegistrationTaskInput is the input for StartThingRegistrationTask.

type Statistics

type Statistics struct {
	Count        int64
	Average      float64
	Sum          float64
	Minimum      float64
	Maximum      float64
	Variance     float64
	StdDeviation float64
}

Statistics is the output for GetStatistics.

type StorageBackend

type StorageBackend interface {
	CreateThing(input *CreateThingInput) (*CreateThingOutput, error)
	DescribeThing(thingName string) (*Thing, error)
	ListThings() []*Thing
	DeleteThing(thingName string) error
	UpdateThing(input *UpdateThingInput) error

	CreateTopicRule(input *CreateTopicRuleInput) error
	GetTopicRule(ruleName string) (*TopicRule, error)
	ListTopicRules() []*TopicRule
	DeleteTopicRule(ruleName string) error
	DisableTopicRule(ruleName string) error
	EnableTopicRule(ruleName string) error
	ReplaceTopicRule(input *ReplaceTopicRuleInput) error

	GetPolicy(policyName string) (*GetPolicyOutput, error)
	DeletePolicy(policyName string) error
	ListPolicies() []*Policy
	CreatePolicy(input *CreatePolicyInput) (*CreatePolicyOutput, error)
	AttachPrincipalPolicy(input *AttachPrincipalPolicyInput) error

	DescribeEndpoint(endpointType string) (*DescribeEndpointOutput, error)

	AcceptCertificateTransfer(input *AcceptCertificateTransferInput) error
	AddThingToBillingGroup(input *AddThingToBillingGroupInput) error
	AddThingToThingGroup(input *AddThingToThingGroupInput) error
	AssociateSbomWithPackageVersion(
		input *AssociateSbomWithPackageVersionInput,
	) (*AssociateSbomWithPackageVersionOutput, error)
	AssociateTargetsWithJob(input *AssociateTargetsWithJobInput) (*AssociateTargetsWithJobOutput, error)
	AttachPolicy(input *AttachPolicyInput) error
	AttachSecurityProfile(input *AttachSecurityProfileInput) error
	AttachThingPrincipal(input *AttachThingPrincipalInput) error
	CancelAuditMitigationActionsTask(input *CancelAuditMitigationActionsTaskInput) error
	CancelAuditTask(input *CancelAuditTaskInput) error
	ListThingPrincipals(thingName string) ([]string, error)

	// ThingType operations.
	CreateThingType(input *CreateThingTypeInput) (*ThingType, error)
	DescribeThingType(thingTypeName string) (*ThingType, error)
	ListThingTypes() []*ThingType
	DeprecateThingType(input *DeprecateThingTypeInput) error
	DeleteThingType(thingTypeName string) error

	// ThingGroup operations.
	CreateThingGroup(input *CreateThingGroupInput) (*ThingGroup, error)
	DescribeThingGroup(thingGroupName string) (*ThingGroup, error)
	ListThingGroups() []*ThingGroup
	UpdateThingGroup(input *UpdateThingGroupInput) (int64, error)
	DeleteThingGroup(thingGroupName string) error
	RemoveThingFromThingGroup(input *RemoveThingFromThingGroupInput) error
	ListThingsInThingGroup(input *ListThingsInThingGroupInput) ([]string, error)

	// Certificate operations.
	CreateCertificateFromCsr(input *CreateCertificateFromCsrInput) (*Certificate, error)
	RegisterCertificate(input *RegisterCertificateInput) (*Certificate, error)
	RegisterCertificateWithoutCA(input *RegisterCertificateInput) (*Certificate, error)
	DescribeCertificate(certificateID string) (*Certificate, error)
	ListCertificates() []*Certificate
	UpdateCertificate(input *UpdateCertificateInput) error
	DeleteCertificate(certificateID string) error

	// Policy attachment operations.
	DetachPolicy(input *DetachPolicyInput) error
	ListAttachedPolicies(input *ListAttachedPoliciesInput) ([]*Policy, error)

	// PolicyVersion operations.
	CreatePolicyVersion(input *CreatePolicyVersionInput) (*PolicyVersion, error)
	GetPolicyVersion(policyName, versionID string) (*PolicyVersion, error)
	ListPolicyVersions(policyName string) ([]*PolicyVersion, error)
	DeletePolicyVersion(policyName, versionID string) error
	SetDefaultPolicyVersion(policyName, versionID string) error

	// TopicRuleDestination operations.
	CreateTopicRuleDestination(input *CreateTopicRuleDestinationInput) (*TopicRuleDestination, error)
	GetTopicRuleDestination(arn string) (*TopicRuleDestination, error)
	ListTopicRuleDestinations() []*TopicRuleDestination
	UpdateTopicRuleDestination(input *UpdateTopicRuleDestinationInput) error
	DeleteTopicRuleDestination(arn string) error

	// CertificateProvider operations.
	CreateCertificateProvider(input *CreateCertificateProviderInput) (*CertificateProvider, error)
	DescribeCertificateProvider(name string) (*CertificateProvider, error)
	ListCertificateProviders() []*CertificateProvider
	UpdateCertificateProvider(input *UpdateCertificateProviderInput) error
	DeleteCertificateProvider(name string) error

	// Job operations.
	CreateJob(input *CreateJobInput) (*Job, error)
	DescribeJob(jobID string) (*Job, error)
	ListJobs() []*Job
	UpdateJob(jobID, description string) error
	CancelJob(jobID, comment string) (*Job, error)
	DeleteJob(jobID string) error
	GetJobDocument(jobID string) (string, error)
	DescribeJobExecution(jobID, thingName string) (*JobExecution, error)
	CancelJobExecution(jobID, thingName string) error
	DeleteJobExecution(jobID, thingName string) error

	// JobTemplate operations.
	CreateJobTemplate(input *CreateJobTemplateInput) (*JobTemplate, error)
	DescribeJobTemplate(id string) (*JobTemplate, error)
	ListJobTemplates() []*JobTemplate
	DeleteJobTemplate(id string) error

	// RoleAlias operations.
	CreateRoleAlias(input *CreateRoleAliasInput) (*RoleAlias, error)
	DescribeRoleAlias(alias string) (*RoleAlias, error)
	ListRoleAliases() []*RoleAlias
	UpdateRoleAlias(alias, roleARN string, credDuration int) (*RoleAlias, error)
	DeleteRoleAlias(alias string) error

	// DomainConfiguration operations.
	CreateDomainConfiguration(input *CreateDomainConfigurationInput) (*DomainConfiguration, error)
	DescribeDomainConfiguration(name string) (*DomainConfiguration, error)
	ListDomainConfigurations() []*DomainConfiguration
	UpdateDomainConfiguration(name, status string) (*DomainConfiguration, error)
	DeleteDomainConfiguration(name string) error

	// ProvisioningTemplate operations.
	CreateProvisioningTemplate(input *CreateProvisioningTemplateInput) (*ProvisioningTemplate, error)
	DescribeProvisioningTemplate(name string) (*ProvisioningTemplate, error)
	ListProvisioningTemplates() []*ProvisioningTemplate
	UpdateProvisioningTemplate(name, description string, enabled *bool, provRoleARN string) error
	DeleteProvisioningTemplate(name string) error
	CreateProvisioningTemplateVersion(name, body string) (*ProvisioningTemplateVersion, error)
	ListProvisioningTemplateVersions(name string) ([]*ProvisioningTemplateVersion, error)
	DeleteProvisioningTemplateVersion(name string, versionID int32) error

	// Authorizer operations.
	CreateAuthorizer(input *CreateAuthorizerInput) (*Authorizer, error)
	DescribeAuthorizer(name string) (*Authorizer, error)
	ListAuthorizers() []*Authorizer
	UpdateAuthorizer(name, functionARN, status string) (*Authorizer, error)
	DeleteAuthorizer(name string) error

	// BillingGroup operations.
	CreateBillingGroup(input *CreateBillingGroupInput) (*BillingGroup, error)
	DescribeBillingGroup(name string) (*BillingGroup, error)
	ListBillingGroups() []*BillingGroup
	UpdateBillingGroup(name string, props BillingGroupProperties) (int64, error)
	DeleteBillingGroup(name string) error

	// ScheduledAudit operations.
	CreateScheduledAudit(input *CreateScheduledAuditInput) (*ScheduledAudit, error)
	DescribeScheduledAudit(name string) (*ScheduledAudit, error)
	ListScheduledAudits() []*ScheduledAudit
	UpdateScheduledAudit(name, frequency, dayOfMonth, dayOfWeek string, checks []string) (*ScheduledAudit, error)
	DeleteScheduledAudit(name string) error

	// MitigationAction operations.
	CreateMitigationAction(input *CreateMitigationActionInput) (*MitigationAction, error)
	DescribeMitigationAction(name string) (*MitigationAction, error)
	ListMitigationActions() []*MitigationAction
	UpdateMitigationAction(name, roleARN string, params map[string]any) (*MitigationAction, error)
	DeleteMitigationAction(name string) error

	// SecurityProfile operations.
	CreateSecurityProfile(input *CreateSecurityProfileInput) (*SecurityProfile, error)
	DescribeSecurityProfile(name string) (*SecurityProfile, error)
	ListSecurityProfiles() []*SecurityProfile
	UpdateSecurityProfile(name, description string) (*SecurityProfile, error)
	DeleteSecurityProfile(name string) error

	// Batch 2: CACertificate operations.
	RegisterCACertificate(pem, status string) (*CACertificate, error)
	DescribeCACertificate(id string) (*CACertificate, error)
	ListCACertificates() []*CACertificate
	UpdateCACertificate(id, status string) error
	DeleteCACertificate(id string) error
	ListCertificatesByCA(caID string) []*Certificate

	// Batch 2: Stream operations.
	CreateStream(input *CreateStreamInput) (*IoTStream, error)
	DescribeStream(id string) (*IoTStream, error)
	ListStreams() []*IoTStream
	UpdateStream(id, description, roleARN string, files []StreamFile) (*IoTStream, error)
	DeleteStream(id string) error

	// Batch 2: FleetMetric operations.
	CreateFleetMetric(input *CreateFleetMetricInput) (*FleetMetric, error)
	DescribeFleetMetric(name string) (*FleetMetric, error)
	ListFleetMetrics() []*FleetMetric
	UpdateFleetMetric(name, queryString, description string, period int32) error
	DeleteFleetMetric(name string) error

	// Batch 2: CustomMetric operations.
	CreateCustomMetric(input *CreateCustomMetricInput) (*CustomMetric, error)
	DescribeCustomMetric(name string) (*CustomMetric, error)
	ListCustomMetrics() []*CustomMetric
	UpdateCustomMetric(name, displayName string) (*CustomMetric, error)
	DeleteCustomMetric(name string) error

	// Batch 2: Dimension operations.
	CreateDimension(input *CreateDimensionInput) (*Dimension, error)
	DescribeDimension(name string) (*Dimension, error)
	ListDimensions() []*Dimension
	UpdateDimension(name string, stringValues []string) (*Dimension, error)
	DeleteDimension(name string) error

	// Batch 2: Tag operations.
	TagResourceGeneric(resourceARN string, tags map[string]string) error
	UntagResource(resourceARN string, tagKeys []string) error
	ListTagsForResource(resourceARN string) map[string]string

	// Batch 2: Audit configuration.
	UpdateAccountAuditConfiguration(roleARN string, checks map[string]*AuditCheckConfig) error
	DescribeAccountAuditConfiguration() *AccountAuditConfiguration
	DeleteAccountAuditConfiguration() error

	// Batch 2: Audit task.
	StartOnDemandAuditTask(checks []string) (string, error)
	DescribeAuditTask(taskID string) (*AuditTask, error)
	ListAuditTasks(taskType string) []*AuditTask

	// Batch 2: Misc.
	DetachThingPrincipal(thingName, principal string) error
	CancelCertificateTransfer(certID string) error
	GetRegistrationCode() string
	DeleteRegistrationCode() error
	ListThingGroupsForThing(thingName string) []string
	ListThingsInBillingGroup(groupName string) []string
	RemoveThingFromBillingGroup(thingName, billingGroupName string) error
	ListPrincipalPolicies(principal string) []*Policy
	ListPolicyPrincipals(policyName string) []string
	ListTargetsForPolicy(policyName string) []string
	ListPrincipalThings(principal string) []string
	GetEffectivePolicies(thingName, principal string) []*Policy
	SetDefaultAuthorizer(authorizerName string) error
	ClearDefaultAuthorizer() error
	DescribeDefaultAuthorizer() (string, error)
	ListJobExecutionsForJob(jobID string) []*JobExecution
	ListJobExecutionsForThing(thingName string) []*JobExecution

	// Batch 3: OTA Updates.
	CreateOTAUpdate(id, description, roleARN string, targets []string, files []any) (*OTAUpdate, error)
	GetOTAUpdate(id string) (*OTAUpdate, error)
	DeleteOTAUpdate(id string) error
	ListOTAUpdates() []*OTAUpdate

	// Batch 3: IoT Packages.
	CreateIoTPackage(name, description string, tags map[string]string) (*IoTPackage, error)
	GetIoTPackage(name string) (*IoTPackage, error)
	UpdateIoTPackage(name, description, defaultVersionName string) error
	DeleteIoTPackage(name string) error
	ListIoTPackages() []*IoTPackage

	// Batch 3: IoT Package Versions.
	CreateIoTPackageVersion(
		packageName, versionName, description string,
		tags map[string]string,
	) (*IoTPackageVersion, error)
	GetIoTPackageVersion(packageName, versionName string) (*IoTPackageVersion, error)
	UpdateIoTPackageVersion(packageName, versionName, description, status string) error
	DeleteIoTPackageVersion(packageName, versionName string) error
	ListIoTPackageVersions(packageName string) []*IoTPackageVersion

	// Batch 3: Package configuration.
	GetPackageConfiguration() *PackageConfiguration
	UpdatePackageConfiguration(cfg map[string]any) error

	// Batch 3: Audit suppressions.
	CreateAuditSuppression(
		checkName string,
		resourceID map[string]any,
		description string,
		suppressIndefinitely bool,
		expirationDate float64,
	) error
	DescribeAuditSuppression(checkName string, resourceID map[string]any) (*AuditSuppression, error)
	UpdateAuditSuppression(
		checkName string,
		resourceID map[string]any,
		description string,
		suppressIndefinitely bool,
		expirationDate float64,
	) error
	DeleteAuditSuppression(checkName string, resourceID map[string]any) error
	ListAuditSuppressions() []*AuditSuppression

	// Batch 3: Audit findings.
	DescribeAuditFinding(findingID string) (*AuditFinding, error)
	ListAuditFindings() []*AuditFinding
	ListRelatedResourcesForAuditFinding(findingID string) ([]map[string]any, error)

	// Batch 3: V2 logging.
	GetV2LoggingOptions() *V2LoggingOptions
	SetV2LoggingOptions(roleARN, defaultLogLevel string, disableAllLogs bool) error
	SetV2LoggingLevel(target map[string]any, logLevel string) error
	DeleteV2LoggingLevel(target map[string]any) error
	ListV2LoggingLevels() []*V2LoggingLevel

	// Batch 3: Logging options.
	GetLoggingOptions() *LoggingOptions
	SetLoggingOptions(roleARN, logLevel string) error

	// Batch 3: Provisioning claim.
	CreateProvisioningClaim(templateName string) (string, string, string, error)

	// Batch 3: Keys and certs.
	CreateKeysAndCertificate(setAsActive bool) (*Certificate, string, string, error)
	TransferCertificate(certID, targetAccount string) error
	RejectCertificateTransfer(certID string) error

	// Batch 3: Event configurations.
	DescribeEventConfigurations() *EventConfigurations
	UpdateEventConfigurations(cfgs map[string]*EventConfigEntry) error

	// Batch 3: Security profile targets.
	DetachSecurityProfile(profileName, targetARN string) error
	ListTargetsForSecurityProfile(profileName string) []string
	ListSecurityProfilesForTarget(targetARN string) []string

	// Batch 3: Dynamic thing groups.
	CreateDynamicThingGroup(input *CreateThingGroupInput) (*ThingGroup, error)
	DeleteDynamicThingGroup(name string) error
	UpdateDynamicThingGroup(input *UpdateThingGroupInput) (int64, error)

	// Batch 3: Commands.
	CreateCommand(
		id, displayName, description, namespace string,
		payload map[string]any,
		tags map[string]string,
	) (*IoTCommand, error)
	GetCommand(id string) (*IoTCommand, error)
	UpdateCommand(id, displayName, description string, deprecated bool) error
	DeleteCommand(id string) error
	ListCommands() []*IoTCommand
	GetCommandExecution(commandID, executionID string) (*IoTCommandExecution, error)
	ListCommandExecutions(commandID string) []*IoTCommandExecution

	// Fleet indexing: configuration.
	GetIndexingConfiguration() *GetIndexingConfigurationOutput
	UpdateIndexingConfiguration(input *UpdateIndexingConfigurationInput) error

	// Fleet indexing: indices.
	ListIndices() []string
	DescribeIndex(indexName string) (*IndexDescription, error)

	// Fleet indexing: search and aggregations.
	SearchIndex(input *SearchIndexInput) (*SearchIndexOutput, error)
	GetCardinality(input *AggregationInput) (int64, error)
	GetStatistics(input *AggregationInput) (*Statistics, error)
	GetPercentiles(input *PercentilesInput) ([]PercentileValue, error)
	GetBucketsAggregation(input *BucketsAggregationInput) ([]Bucket, error)

	// Batch 4: RegisterThing.
	RegisterThing(input *RegisterThingInput) (*RegisterThingOutput, error)

	// Batch 4: bulk thing registration tasks.
	StartThingRegistrationTask(input *StartThingRegistrationTaskInput) (*ThingRegistrationTask, error)
	StopThingRegistrationTask(taskID string) error
	DescribeThingRegistrationTask(taskID string) (*ThingRegistrationTask, error)
	ListThingRegistrationTasks(status string) []*ThingRegistrationTask
	ListThingRegistrationTaskReports(taskID, reportType string) ([]string, error)

	// Batch 4: ThingType/ThingGroup updates.
	UpdateThingType(input *UpdateThingTypeInput) error
	UpdateThingGroupsForThing(input *UpdateThingGroupsForThingInput) error

	// Batch 4: typed thing-principal listing.
	ListThingPrincipalsV2(thingName string) ([]*ThingPrincipalObject, error)

	// Batch 4: managed job templates.
	DescribeManagedJobTemplate(templateName, templateVersion string) (*ManagedJobTemplate, error)
	ListManagedJobTemplates(templateName string) []*ManagedJobTemplateSummary

	// Device Defender: audit mitigation-action tasks.
	StartAuditMitigationActionsTask(
		input *StartAuditMitigationActionsTaskInput,
	) (*AuditMitigationTask, error)
	DescribeAuditMitigationActionsTask(taskID string) (*AuditMitigationTask, error)
	ListAuditMitigationActionsTasks(auditTaskID, taskStatus string) []*AuditMitigationTask
	ListAuditMitigationActionsExecutions(taskID, findingID, actionStatus string) []*AuditMitigationActionExecution

	// Device Defender: detect mitigation-action tasks.
	StartDetectMitigationActionsTask(
		input *StartDetectMitigationActionsTaskInput,
	) (*DetectMitigationTask, error)
	DescribeDetectMitigationActionsTask(taskID string) (*DetectMitigationTask, error)
	ListDetectMitigationActionsTasks(startTime, endTime float64) []*DetectMitigationTask
	ListDetectMitigationActionsExecutions(taskID, violationID, thingName string) []*DetectMitigationActionExecution
	CancelDetectMitigationActionsTask(taskID string) error

	// Device Defender: violations.
	ListActiveViolations(thingName, securityProfileName, verificationState string) []*ActiveViolation
	ListViolationEvents(
		thingName, securityProfileName, verificationState string,
		startTime, endTime float64,
	) []*ViolationEvent
	PutVerificationStateOnViolation(violationID, verificationState, description string) error
	SeedActiveViolation(input *SeedActiveViolationInput) (*ActiveViolation, error)

	// Final stub batch: encryption configuration.
	DescribeEncryptionConfiguration() *AccountEncryptionConfiguration
	UpdateEncryptionConfiguration(input *UpdateEncryptionConfigurationInput) error

	// Final stub batch: authorization testing.
	TestAuthorization(input *TestAuthorizationInput) ([]*AuthResult, error)
	TestInvokeAuthorizer(authorizerName string, input *TestInvokeAuthorizerInput) (*TestInvokeAuthorizerOutput, error)

	// Final stub batch: principal-policy detachment.
	DetachPrincipalPolicy(policyName, principal string) error

	// Final stub batch: topic rule destination confirmation.
	ConfirmTopicRuleDestination(token string) error

	// Final stub batch: command executions.
	DeleteCommandExecution(executionID, targetARN string) error

	// Final stub batch: Device Defender ML behavior model training.
	GetBehaviorModelTrainingSummaries(
		securityProfileName string, maxResults int32, nextToken string,
	) ([]*BehaviorModelTrainingSummary, string, error)

	// Final stub batch: outgoing certificate transfers.
	ListOutgoingCertificates() []*OutgoingCertificate

	// Final stub batch: SBOM validation.
	DisassociateSbomFromPackageVersion(packageName, versionName string) error
	ListSbomValidationResults(
		packageName, versionName string, maxResults int32, nextToken string,
	) ([]*SbomValidationResult, string, error)

	// Final stub batch: security profile metric values.
	ListMetricValues(
		thingName, metricName string, startTime, endTime float64, maxResults int32, nextToken string,
	) ([]*MetricDatapoint, string, error)

	// Final stub batch: thing connectivity.
	GetThingConnectivityData(thingName string) (*ThingConnectivityData, error)

	// Final stub batch: provisioning template versions.
	DescribeProvisioningTemplateVersion(name string, versionID int32) (*ProvisioningTemplateVersion, error)

	// Final stub batch: security profile behavior validation.
	ValidateSecurityProfileBehaviors(behaviors []SecurityProfileBehavior) (bool, []string)

	// Device Shadow operations.
	GetThingShadow(thingName, shadowName string) (*ThingShadow, error)
	UpdateThingShadow(thingName, shadowName string, state map[string]any) (*ThingShadow, error)
	DeleteThingShadow(thingName, shadowName string) error
	ListNamedShadowsForThing(thingName string) ([]string, error)
}

StorageBackend defines the interface for the IoT control-plane backend.

type StreamFile

type StreamFile struct {
	S3Bucket string `json:"s3Bucket,omitempty"`
	S3Key    string `json:"s3Key,omitempty"`
	FileID   int32  `json:"fileId,omitempty"`
}

StreamFile holds file info for an IoT stream.

type TaskStatisticsForAuditCheck

type TaskStatisticsForAuditCheck struct {
	TotalFindingsCount     int64 `json:"totalFindingsCount"`
	FailedFindingsCount    int64 `json:"failedFindingsCount"`
	SucceededFindingsCount int64 `json:"succeededFindingsCount"`
	SkippedFindingsCount   int64 `json:"skippedFindingsCount"`
	CanceledFindingsCount  int64 `json:"canceledFindingsCount"`
}

TaskStatisticsForAuditCheck aggregates the mitigation-action execution counts for a single audit check within an AuditMitigationTask.

type TestAuthorizationInput

type TestAuthorizationInput struct {
	Principal             string
	CognitoIdentityPoolID string
	ClientID              string
	PolicyNamesToAdd      []string
	PolicyNamesToSkip     []string
	AuthInfos             []AuthInfo
}

TestAuthorizationInput is the input for TestAuthorization.

type TestInvokeAuthorizerInput

type TestInvokeAuthorizerInput struct {
	Token          string
	TokenSignature string
	MQTTClientID   string
}

TestInvokeAuthorizerInput is the input for TestInvokeAuthorizer.

type TestInvokeAuthorizerOutput

type TestInvokeAuthorizerOutput struct {
	PrincipalID              string
	PolicyDocuments          []string
	IsAuthenticated          bool
	DisconnectAfterInSeconds int32
	RefreshAfterInSeconds    int32
}

TestInvokeAuthorizerOutput is the output for TestInvokeAuthorizer.

type Thing

type Thing struct {
	CreatedAt        time.Time         `json:"createdAt"`
	Attributes       map[string]string `json:"attributes"`
	ThingName        string            `json:"thingName"`
	ThingTypeName    string            `json:"thingTypeName,omitempty"`
	ThingType        string            `json:"thingType,omitempty"`
	ThingID          string            `json:"thingId"`
	ARN              string            `json:"thingArn"`
	BillingGroupName string            `json:"billingGroupName,omitempty"`
	Version          int64             `json:"version"`
}

Thing represents an AWS IoT Thing.

BillingGroupName is populated transiently by DescribeThing from the backend's thingBillingGroups index; it is not itself the source of truth (see AddThingToBillingGroup/RemoveThingFromBillingGroup) and is not persisted as part of the Thing record.

type ThingConnectivityData

type ThingConnectivityData struct {
	DisconnectReason string  `json:"disconnectReason,omitempty"`
	Timestamp        float64 `json:"timestamp,omitempty"`
	Connected        bool    `json:"connected"`
}

ThingConnectivityData is a thing's most recently reported connectivity status.

type ThingGroup

type ThingGroup struct {
	CreatedAt       time.Time         `json:"createdAt"`
	Attributes      map[string]string `json:"attributes"`
	ThingGroupName  string            `json:"thingGroupName"`
	ThingGroupARN   string            `json:"thingGroupArn"`
	ThingGroupID    string            `json:"thingGroupId"`
	Description     string            `json:"description,omitempty"`
	ParentGroupName string            `json:"parentGroupName,omitempty"`
	QueryString     string            `json:"queryString,omitempty"`
	Members         []string          `json:"members"`
	Version         int64             `json:"version"`
	IsDynamic       bool              `json:"isDynamic,omitempty"`
}

ThingGroup represents an AWS IoT Thing Group.

type ThingGroupIndexingConfiguration

type ThingGroupIndexingConfiguration struct {
	ThingGroupIndexingMode string          `json:"thingGroupIndexingMode"`
	CustomFields           []IndexingField `json:"customFields,omitempty"`
}

ThingGroupIndexingConfiguration controls fleet indexing for Thing Groups.

type ThingIndexingConfiguration

type ThingIndexingConfiguration struct {
	Filter                        *IndexingFilter `json:"filter,omitempty"`
	ThingIndexingMode             string          `json:"thingIndexingMode"`
	ThingConnectivityIndexingMode string          `json:"thingConnectivityIndexingMode,omitempty"`
	NamedShadowIndexingMode       string          `json:"namedShadowIndexingMode,omitempty"`
	CustomFields                  []IndexingField `json:"customFields,omitempty"`
}

ThingIndexingConfiguration controls fleet indexing for Things.

type ThingPrincipalObject

type ThingPrincipalObject struct {
	Principal          string `json:"principal"`
	ThingPrincipalType string `json:"thingPrincipalType"`
}

ThingPrincipalObject represents a principal and its relation type to a thing, as returned by ListThingPrincipalsV2.

type ThingRegistrationTask

type ThingRegistrationTask struct {
	TaskID             string  `json:"taskId"`
	Status             string  `json:"status"`
	Message            string  `json:"message,omitempty"`
	TemplateBody       string  `json:"templateBody,omitempty"`
	InputFileBucket    string  `json:"inputFileBucket,omitempty"`
	InputFileKey       string  `json:"inputFileKey,omitempty"`
	RoleArn            string  `json:"roleArn,omitempty"`
	CreationDate       float64 `json:"creationDate"`
	LastModifiedDate   float64 `json:"lastModifiedDate"`
	SuccessCount       int32   `json:"successCount"`
	FailureCount       int32   `json:"failureCount"`
	PercentageProgress int32   `json:"percentageProgress"`
}

ThingRegistrationTask represents a bulk thing provisioning task.

CreationDate/LastModifiedDate are epoch-seconds (float64), matching the real AWS IoT JSON wire shape and the convention used elsewhere in this package (see thing_registration.go), not RFC3339 strings.

type ThingShadow

type ThingShadow struct {
	State    map[string]any `json:"state"`
	Metadata map[string]any `json:"metadata,omitempty"`
	Version  int64          `json:"version"`
}

ThingShadow represents the state of an AWS IoT Device Shadow.

type ThingType

type ThingType struct {
	CreatedAt            time.Time `json:"createdAt"`
	DeprecationDate      time.Time `json:"deprecationDate"`
	ThingTypeName        string    `json:"thingTypeName"`
	ThingTypeID          string    `json:"thingTypeId"`
	ThingTypeARN         string    `json:"thingTypeArn"`
	Description          string    `json:"description,omitempty"`
	SearchableAttributes []string  `json:"searchableAttributes,omitempty"`
	Deprecated           bool      `json:"deprecated"`
}

ThingType represents an AWS IoT Thing Type.

type TimeoutConfig

type TimeoutConfig struct {
	InProgressTimeoutInMinutes int64 `json:"inProgressTimeoutInMinutes,omitempty"`
}

TimeoutConfig holds timeout settings for a job.

type TopicRule

type TopicRule struct {
	CreatedAt        time.Time    `json:"createdAt"`
	RuleName         string       `json:"ruleName"`
	ARN              string       `json:"arn"`
	SQL              string       `json:"sql"`
	AWSIoTSQLVersion string       `json:"awsIotSqlVersion,omitempty"`
	Description      string       `json:"description,omitempty"`
	Actions          []RuleAction `json:"actions"`
	Enabled          bool         `json:"enabled"`
}

TopicRule represents an AWS IoT Topic Rule.

type TopicRuleDestination

type TopicRuleDestination struct {
	HTTPURLProperties *HTTPURLDestinationProperties `json:"httpUrlProperties,omitempty"`
	ARN               string                        `json:"arn"`
	Status            string                        `json:"status"`
	// ConfirmationToken is the token that must be presented to
	// ConfirmTopicRuleDestination to transition an HTTP destination from
	// IN_PROGRESS to ENABLED. AWS delivers this out-of-band (via a
	// confirmation request sent to the destination URL), so it is never
	// serialized back to callers.
	ConfirmationToken string `json:"-"`
}

TopicRuleDestination represents an AWS IoT Topic Rule Destination.

type TopicRuleDestinationConfiguration

type TopicRuleDestinationConfiguration struct {
	HTTPURLConfiguration *HTTPURLDestinationConfiguration `json:"httpUrlConfiguration,omitempty"`
}

TopicRuleDestinationConfiguration is the configuration for a topic rule destination.

type TopicRulePayload

type TopicRulePayload struct {
	SQL              string       `json:"sql"`
	Description      string       `json:"description"`
	AWSIoTSQLVersion string       `json:"awsIotSqlVersion,omitempty"`
	Actions          []RuleAction `json:"actions"`
	RuleDisabled     bool         `json:"ruleDisabled"`
}

TopicRulePayload is the payload for a topic rule.

type UpdateCertificateInput

type UpdateCertificateInput struct {
	CertificateID string
	NewStatus     string
}

UpdateCertificateInput is the input for UpdateCertificate.

type UpdateCertificateProviderInput

type UpdateCertificateProviderInput struct {
	CertificateProviderName     string
	LambdaFunctionARN           string
	AccountDefaultForOperations []string
}

UpdateCertificateProviderInput is the input for UpdateCertificateProvider.

type UpdateEncryptionConfigurationInput

type UpdateEncryptionConfigurationInput struct {
	EncryptionType   string `json:"encryptionType"`
	KMSKeyARN        string `json:"kmsKeyArn,omitempty"`
	KMSAccessRoleARN string `json:"kmsAccessRoleArn,omitempty"`
}

UpdateEncryptionConfigurationInput is the input for UpdateEncryptionConfiguration.

type UpdateIndexingConfigurationInput

type UpdateIndexingConfigurationInput struct {
	ThingIndexingConfiguration      *ThingIndexingConfiguration
	ThingGroupIndexingConfiguration *ThingGroupIndexingConfiguration
}

UpdateIndexingConfigurationInput is the input for UpdateIndexingConfiguration.

type UpdateThingGroupInput

type UpdateThingGroupInput struct {
	Attributes      map[string]string
	Merge           *bool
	ThingGroupName  string
	Description     string
	QueryString     string
	ExpectedVersion int64
}

UpdateThingGroupInput is the input for UpdateThingGroup.

Merge controls whether Attributes are merged (true) or replace the existing attribute set (false/nil, the AWS default). See applyAttributePayload.

type UpdateThingGroupsForThingInput

type UpdateThingGroupsForThingInput struct {
	ThingName             string   `json:"thingName"`
	ThingGroupsToAdd      []string `json:"thingGroupsToAdd"`
	ThingGroupsToRemove   []string `json:"thingGroupsToRemove"`
	OverrideDynamicGroups bool     `json:"overrideDynamicGroups"`
}

UpdateThingGroupsForThingInput is the input for UpdateThingGroupsForThing.

type UpdateThingInput

type UpdateThingInput struct {
	AttributePayload *AttributePayload `json:"attributePayload"`
	ThingName        string            `json:"thingName"`
	ThingTypeName    string            `json:"thingTypeName,omitempty"`
	RemoveThingType  bool              `json:"removeThingType,omitempty"`
	ExpectedVersion  int64             `json:"expectedVersion,omitempty"`
}

UpdateThingInput is the input for UpdateThing.

type UpdateThingTypeInput

type UpdateThingTypeInput struct {
	ThingTypeName        string
	Description          string
	SearchableAttributes []string
}

UpdateThingTypeInput is the input for UpdateThingType.

type UpdateTopicRuleDestinationInput

type UpdateTopicRuleDestinationInput struct {
	ARN    string `json:"arn"`
	Status string `json:"status"`
}

UpdateTopicRuleDestinationInput is the input for UpdateTopicRuleDestination.

type V2LoggingLevel

type V2LoggingLevel struct {
	Target   map[string]any `json:"logTarget"`
	LogLevel string         `json:"logLevel"`
}

V2LoggingLevel holds a per-target logging level.

type V2LoggingOptions

type V2LoggingOptions struct {
	DefaultLogLevel string `json:"defaultLogLevel"`
	RoleARN         string `json:"roleArn,omitempty"`
	DisableAllLogs  bool   `json:"disableAllLogs"`
}

V2LoggingOptions holds the account-level V2 logging configuration.

type ViolationBehavior

type ViolationBehavior struct {
	Name   string `json:"name,omitempty"`
	Metric string `json:"metric,omitempty"`
}

ViolationBehavior identifies the security-profile behavior that a violation or violation event relates to.

type ViolationEvent

type ViolationEvent struct {
	Behavior            *ViolationBehavior `json:"behavior,omitempty"`
	MetricValue         map[string]any     `json:"metricValue,omitempty"`
	ViolationID         string             `json:"violationId"`
	ThingName           string             `json:"thingName"`
	SecurityProfileName string             `json:"securityProfileName"`
	ViolationEventType  string             `json:"violationEventType,omitempty"`
	VerificationState   string             `json:"verificationState,omitempty"`
	ViolationEventTime  float64            `json:"violationEventTime,omitempty"`
}

ViolationEvent represents a historical occurrence of a Detect violation starting, being cleared, or having its verification state changed.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL