API Documentation | Deno Module Docs | Original docs from AWS-JS-SDK
import { Iot } from "https://aws-api.deno.dev/v0.3/services/iot.ts";
// Autogenerated API client for: AWS IoT
// Generation parameters:
// aws-sdk-js definitions from v2.1060.0
// AWS service UID: iot-2015-05-28
// code generation: v0.3
// generated at: 2025-11-05
//
// Originally served at https://aws-api.deno.dev/v0.3/services/iot.ts
import * as Base64 from "https://deno.land/std@0.120.0/encoding/base64.ts";
import * as client from "https://deno.land/x/aws_api@v0.6.0/client/common.ts";
import * as cmnP from "https://deno.land/x/aws_api@v0.6.0/encoding/common.ts";
import * as jsonP from "https://deno.land/x/aws_api@v0.6.0/encoding/json.ts";
function generateIdemptToken() {
return crypto.randomUUID();
}
function serializeBlob(input: string | Uint8Array | null | undefined) {
if (input == null) return input;
return Base64.encode(input);
}
export class Iot {
#client: client.ServiceClient;
constructor(apiFactory: client.ApiFactory) {
this.#client = apiFactory.buildServiceClient(Iot.ApiMetadata);
}
static ApiMetadata: client.ApiMetadata = {
"apiVersion": "2015-05-28",
"endpointPrefix": "iot",
"protocol": "rest-json",
"serviceFullName": "AWS IoT",
"serviceId": "IoT",
"signatureVersion": "v4",
"signingName": "execute-api",
"uid": "iot-2015-05-28"
};
/** Accepts a pending certificate transfer. */
async acceptCertificateTransfer(
params: AcceptCertificateTransferRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const query = new URLSearchParams;
if (params["setAsActive"] != null) query.set("setAsActive", params["setAsActive"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "AcceptCertificateTransfer",
method: "PATCH",
requestUri: cmnP.encodePath`/accept-certificate-transfer/${params["certificateId"]}`,
});
await resp.body?.cancel();
}
/** Adds a thing to a billing group. */
async addThingToBillingGroup(
params: AddThingToBillingGroupRequest = {},
opts: client.RequestOptions = {},
): Promise<void> {
const body: jsonP.JSONObject = {
billingGroupName: params["billingGroupName"],
billingGroupArn: params["billingGroupArn"],
thingName: params["thingName"],
thingArn: params["thingArn"],
};
const resp = await this.#client.performRequest({
opts, body,
action: "AddThingToBillingGroup",
method: "PUT",
requestUri: "/billing-groups/addThingToBillingGroup",
});
await resp.body?.cancel();
}
/** Adds a thing to a thing group. */
async addThingToThingGroup(
params: AddThingToThingGroupRequest = {},
opts: client.RequestOptions = {},
): Promise<void> {
const body: jsonP.JSONObject = {
thingGroupName: params["thingGroupName"],
thingGroupArn: params["thingGroupArn"],
thingName: params["thingName"],
thingArn: params["thingArn"],
overrideDynamicGroups: params["overrideDynamicGroups"],
};
const resp = await this.#client.performRequest({
opts, body,
action: "AddThingToThingGroup",
method: "PUT",
requestUri: "/thing-groups/addThingToThingGroup",
});
await resp.body?.cancel();
}
/** Associates a group with a continuous job. */
async associateTargetsWithJob(
params: AssociateTargetsWithJobRequest,
opts: client.RequestOptions = {},
): Promise<AssociateTargetsWithJobResponse> {
const query = new URLSearchParams;
const body: jsonP.JSONObject = {
targets: params["targets"],
comment: params["comment"],
};
if (params["namespaceId"] != null) query.set("namespaceId", params["namespaceId"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query, body,
action: "AssociateTargetsWithJob",
requestUri: cmnP.encodePath`/jobs/${params["jobId"]}/targets`,
});
return jsonP.readObj({
required: {},
optional: {
"jobArn": "s",
"jobId": "s",
"description": "s",
},
}, await resp.json());
}
/** Attaches the specified policy to the specified principal (certificate or other credential). */
async attachPolicy(
params: AttachPolicyRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const body: jsonP.JSONObject = {
target: params["target"],
};
const resp = await this.#client.performRequest({
opts, body,
action: "AttachPolicy",
method: "PUT",
requestUri: cmnP.encodePath`/target-policies/${params["policyName"]}`,
});
await resp.body?.cancel();
}
/** Attaches the specified policy to the specified principal (certificate or other credential). */
async attachPrincipalPolicy(
params: AttachPrincipalPolicyRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const headers = new Headers;
headers.append("x-amzn-iot-principal", params["principal"]);
const resp = await this.#client.performRequest({
opts, headers,
action: "AttachPrincipalPolicy",
method: "PUT",
requestUri: cmnP.encodePath`/principal-policies/${params["policyName"]}`,
});
await resp.body?.cancel();
}
/** Associates a Device Defender security profile with a thing group or this account. */
async attachSecurityProfile(
params: AttachSecurityProfileRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const query = new URLSearchParams;
query.set("securityProfileTargetArn", params["securityProfileTargetArn"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "AttachSecurityProfile",
method: "PUT",
requestUri: cmnP.encodePath`/security-profiles/${params["securityProfileName"]}/targets`,
});
await resp.body?.cancel();
}
/** Attaches the specified principal to the specified thing. */
async attachThingPrincipal(
params: AttachThingPrincipalRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const headers = new Headers;
headers.append("x-amzn-principal", params["principal"]);
const resp = await this.#client.performRequest({
opts, headers,
action: "AttachThingPrincipal",
method: "PUT",
requestUri: cmnP.encodePath`/things/${params["thingName"]}/principals`,
});
await resp.body?.cancel();
}
/** Cancels a mitigation action task that is in progress. */
async cancelAuditMitigationActionsTask(
params: CancelAuditMitigationActionsTaskRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const resp = await this.#client.performRequest({
opts,
action: "CancelAuditMitigationActionsTask",
method: "PUT",
requestUri: cmnP.encodePath`/audit/mitigationactions/tasks/${params["taskId"]}/cancel`,
});
await resp.body?.cancel();
}
/** Cancels an audit that is in progress. */
async cancelAuditTask(
params: CancelAuditTaskRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const resp = await this.#client.performRequest({
opts,
action: "CancelAuditTask",
method: "PUT",
requestUri: cmnP.encodePath`/audit/tasks/${params["taskId"]}/cancel`,
});
await resp.body?.cancel();
}
/** Cancels a pending transfer for the specified certificate. */
async cancelCertificateTransfer(
params: CancelCertificateTransferRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const resp = await this.#client.performRequest({
opts,
action: "CancelCertificateTransfer",
method: "PATCH",
requestUri: cmnP.encodePath`/cancel-certificate-transfer/${params["certificateId"]}`,
});
await resp.body?.cancel();
}
/** Cancels a Device Defender ML Detect mitigation action. */
async cancelDetectMitigationActionsTask(
params: CancelDetectMitigationActionsTaskRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const resp = await this.#client.performRequest({
opts,
action: "CancelDetectMitigationActionsTask",
method: "PUT",
requestUri: cmnP.encodePath`/detect/mitigationactions/tasks/${params["taskId"]}/cancel`,
});
await resp.body?.cancel();
}
/** Cancels a job. */
async cancelJob(
params: CancelJobRequest,
opts: client.RequestOptions = {},
): Promise<CancelJobResponse> {
const query = new URLSearchParams;
const body: jsonP.JSONObject = {
reasonCode: params["reasonCode"],
comment: params["comment"],
};
if (params["force"] != null) query.set("force", params["force"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query, body,
action: "CancelJob",
method: "PUT",
requestUri: cmnP.encodePath`/jobs/${params["jobId"]}/cancel`,
});
return jsonP.readObj({
required: {},
optional: {
"jobArn": "s",
"jobId": "s",
"description": "s",
},
}, await resp.json());
}
/** Cancels the execution of a job for a given thing. */
async cancelJobExecution(
params: CancelJobExecutionRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const query = new URLSearchParams;
const body: jsonP.JSONObject = {
expectedVersion: params["expectedVersion"],
statusDetails: params["statusDetails"],
};
if (params["force"] != null) query.set("force", params["force"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query, body,
action: "CancelJobExecution",
method: "PUT",
requestUri: cmnP.encodePath`/things/${params["thingName"]}/jobs/${params["jobId"]}/cancel`,
});
await resp.body?.cancel();
}
/** Clears the default authorizer. */
async clearDefaultAuthorizer(
opts: client.RequestOptions = {},
): Promise<void> {
const body: jsonP.JSONObject = {};
const resp = await this.#client.performRequest({
opts, body,
action: "ClearDefaultAuthorizer",
method: "DELETE",
requestUri: "/default-authorizer",
});
await resp.body?.cancel();
}
/** Confirms a topic rule destination. */
async confirmTopicRuleDestination(
params: ConfirmTopicRuleDestinationRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const resp = await this.#client.performRequest({
opts,
action: "ConfirmTopicRuleDestination",
method: "GET",
requestUri: cmnP.encodePath`/confirmdestination/${params["confirmationToken"].split("/")}`,
});
await resp.body?.cancel();
}
/** Creates a Device Defender audit suppression. */
async createAuditSuppression(
params: CreateAuditSuppressionRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const body: jsonP.JSONObject = {
checkName: params["checkName"],
resourceIdentifier: fromResourceIdentifier(params["resourceIdentifier"]),
expirationDate: jsonP.serializeDate_unixTimestamp(params["expirationDate"]),
suppressIndefinitely: params["suppressIndefinitely"],
description: params["description"],
clientRequestToken: params["clientRequestToken"] ?? generateIdemptToken(),
};
const resp = await this.#client.performRequest({
opts, body,
action: "CreateAuditSuppression",
requestUri: "/audit/suppressions/create",
});
await resp.body?.cancel();
}
/** Creates an authorizer. */
async createAuthorizer(
params: CreateAuthorizerRequest,
opts: client.RequestOptions = {},
): Promise<CreateAuthorizerResponse> {
const body: jsonP.JSONObject = {
authorizerFunctionArn: params["authorizerFunctionArn"],
tokenKeyName: params["tokenKeyName"],
tokenSigningPublicKeys: params["tokenSigningPublicKeys"],
status: params["status"],
tags: params["tags"]?.map(x => fromTag(x)),
signingDisabled: params["signingDisabled"],
enableCachingForHttp: params["enableCachingForHttp"],
};
const resp = await this.#client.performRequest({
opts, body,
action: "CreateAuthorizer",
requestUri: cmnP.encodePath`/authorizer/${params["authorizerName"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"authorizerName": "s",
"authorizerArn": "s",
},
}, await resp.json());
}
/** Creates a billing group. */
async createBillingGroup(
params: CreateBillingGroupRequest,
opts: client.RequestOptions = {},
): Promise<CreateBillingGroupResponse> {
const body: jsonP.JSONObject = {
billingGroupProperties: fromBillingGroupProperties(params["billingGroupProperties"]),
tags: params["tags"]?.map(x => fromTag(x)),
};
const resp = await this.#client.performRequest({
opts, body,
action: "CreateBillingGroup",
requestUri: cmnP.encodePath`/billing-groups/${params["billingGroupName"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"billingGroupName": "s",
"billingGroupArn": "s",
"billingGroupId": "s",
},
}, await resp.json());
}
/** Creates an X.509 certificate using the specified certificate signing request. */
async createCertificateFromCsr(
params: CreateCertificateFromCsrRequest,
opts: client.RequestOptions = {},
): Promise<CreateCertificateFromCsrResponse> {
const query = new URLSearchParams;
const body: jsonP.JSONObject = {
certificateSigningRequest: params["certificateSigningRequest"],
};
if (params["setAsActive"] != null) query.set("setAsActive", params["setAsActive"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query, body,
action: "CreateCertificateFromCsr",
requestUri: "/certificates",
});
return jsonP.readObj({
required: {},
optional: {
"certificateArn": "s",
"certificateId": "s",
"certificatePem": "s",
},
}, await resp.json());
}
/** Use this API to define a Custom Metric published by your devices to Device Defender. */
async createCustomMetric(
params: CreateCustomMetricRequest,
opts: client.RequestOptions = {},
): Promise<CreateCustomMetricResponse> {
const body: jsonP.JSONObject = {
displayName: params["displayName"],
metricType: params["metricType"],
tags: params["tags"]?.map(x => fromTag(x)),
clientRequestToken: params["clientRequestToken"] ?? generateIdemptToken(),
};
const resp = await this.#client.performRequest({
opts, body,
action: "CreateCustomMetric",
requestUri: cmnP.encodePath`/custom-metric/${params["metricName"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"metricName": "s",
"metricArn": "s",
},
}, await resp.json());
}
/** Create a dimension that you can use to limit the scope of a metric used in a security profile for IoT Device Defender. */
async createDimension(
params: CreateDimensionRequest,
opts: client.RequestOptions = {},
): Promise<CreateDimensionResponse> {
const body: jsonP.JSONObject = {
type: params["type"],
stringValues: params["stringValues"],
tags: params["tags"]?.map(x => fromTag(x)),
clientRequestToken: params["clientRequestToken"] ?? generateIdemptToken(),
};
const resp = await this.#client.performRequest({
opts, body,
action: "CreateDimension",
requestUri: cmnP.encodePath`/dimensions/${params["name"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"name": "s",
"arn": "s",
},
}, await resp.json());
}
/** Creates a domain configuration. */
async createDomainConfiguration(
params: CreateDomainConfigurationRequest,
opts: client.RequestOptions = {},
): Promise<CreateDomainConfigurationResponse> {
const body: jsonP.JSONObject = {
domainName: params["domainName"],
serverCertificateArns: params["serverCertificateArns"],
validationCertificateArn: params["validationCertificateArn"],
authorizerConfig: fromAuthorizerConfig(params["authorizerConfig"]),
serviceType: params["serviceType"],
tags: params["tags"]?.map(x => fromTag(x)),
};
const resp = await this.#client.performRequest({
opts, body,
action: "CreateDomainConfiguration",
requestUri: cmnP.encodePath`/domainConfigurations/${params["domainConfigurationName"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"domainConfigurationName": "s",
"domainConfigurationArn": "s",
},
}, await resp.json());
}
/** Creates a dynamic thing group. */
async createDynamicThingGroup(
params: CreateDynamicThingGroupRequest,
opts: client.RequestOptions = {},
): Promise<CreateDynamicThingGroupResponse> {
const body: jsonP.JSONObject = {
thingGroupProperties: fromThingGroupProperties(params["thingGroupProperties"]),
indexName: params["indexName"],
queryString: params["queryString"],
queryVersion: params["queryVersion"],
tags: params["tags"]?.map(x => fromTag(x)),
};
const resp = await this.#client.performRequest({
opts, body,
action: "CreateDynamicThingGroup",
requestUri: cmnP.encodePath`/dynamic-thing-groups/${params["thingGroupName"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"thingGroupName": "s",
"thingGroupArn": "s",
"thingGroupId": "s",
"indexName": "s",
"queryString": "s",
"queryVersion": "s",
},
}, await resp.json());
}
/** Creates a fleet metric. */
async createFleetMetric(
params: CreateFleetMetricRequest,
opts: client.RequestOptions = {},
): Promise<CreateFleetMetricResponse> {
const body: jsonP.JSONObject = {
queryString: params["queryString"],
aggregationType: fromAggregationType(params["aggregationType"]),
period: params["period"],
aggregationField: params["aggregationField"],
description: params["description"],
queryVersion: params["queryVersion"],
indexName: params["indexName"],
unit: params["unit"],
tags: params["tags"]?.map(x => fromTag(x)),
};
const resp = await this.#client.performRequest({
opts, body,
action: "CreateFleetMetric",
method: "PUT",
requestUri: cmnP.encodePath`/fleet-metric/${params["metricName"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"metricName": "s",
"metricArn": "s",
},
}, await resp.json());
}
/** Creates a job. */
async createJob(
params: CreateJobRequest,
opts: client.RequestOptions = {},
): Promise<CreateJobResponse> {
const body: jsonP.JSONObject = {
targets: params["targets"],
documentSource: params["documentSource"],
document: params["document"],
description: params["description"],
presignedUrlConfig: fromPresignedUrlConfig(params["presignedUrlConfig"]),
targetSelection: params["targetSelection"],
jobExecutionsRolloutConfig: fromJobExecutionsRolloutConfig(params["jobExecutionsRolloutConfig"]),
abortConfig: fromAbortConfig(params["abortConfig"]),
timeoutConfig: fromTimeoutConfig(params["timeoutConfig"]),
tags: params["tags"]?.map(x => fromTag(x)),
namespaceId: params["namespaceId"],
jobTemplateArn: params["jobTemplateArn"],
jobExecutionsRetryConfig: fromJobExecutionsRetryConfig(params["jobExecutionsRetryConfig"]),
documentParameters: params["documentParameters"],
};
const resp = await this.#client.performRequest({
opts, body,
action: "CreateJob",
method: "PUT",
requestUri: cmnP.encodePath`/jobs/${params["jobId"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"jobArn": "s",
"jobId": "s",
"description": "s",
},
}, await resp.json());
}
/** Creates a job template. */
async createJobTemplate(
params: CreateJobTemplateRequest,
opts: client.RequestOptions = {},
): Promise<CreateJobTemplateResponse> {
const body: jsonP.JSONObject = {
jobArn: params["jobArn"],
documentSource: params["documentSource"],
document: params["document"],
description: params["description"],
presignedUrlConfig: fromPresignedUrlConfig(params["presignedUrlConfig"]),
jobExecutionsRolloutConfig: fromJobExecutionsRolloutConfig(params["jobExecutionsRolloutConfig"]),
abortConfig: fromAbortConfig(params["abortConfig"]),
timeoutConfig: fromTimeoutConfig(params["timeoutConfig"]),
tags: params["tags"]?.map(x => fromTag(x)),
jobExecutionsRetryConfig: fromJobExecutionsRetryConfig(params["jobExecutionsRetryConfig"]),
};
const resp = await this.#client.performRequest({
opts, body,
action: "CreateJobTemplate",
method: "PUT",
requestUri: cmnP.encodePath`/job-templates/${params["jobTemplateId"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"jobTemplateArn": "s",
"jobTemplateId": "s",
},
}, await resp.json());
}
/** Creates a 2048-bit RSA key pair and issues an X.509 certificate using the issued public key. */
async createKeysAndCertificate(
params: CreateKeysAndCertificateRequest = {},
opts: client.RequestOptions = {},
): Promise<CreateKeysAndCertificateResponse> {
const query = new URLSearchParams;
if (params["setAsActive"] != null) query.set("setAsActive", params["setAsActive"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "CreateKeysAndCertificate",
requestUri: "/keys-and-certificate",
});
return jsonP.readObj({
required: {},
optional: {
"certificateArn": "s",
"certificateId": "s",
"certificatePem": "s",
"keyPair": toKeyPair,
},
}, await resp.json());
}
/** Defines an action that can be applied to audit findings by using StartAuditMitigationActionsTask. */
async createMitigationAction(
params: CreateMitigationActionRequest,
opts: client.RequestOptions = {},
): Promise<CreateMitigationActionResponse> {
const body: jsonP.JSONObject = {
roleArn: params["roleArn"],
actionParams: fromMitigationActionParams(params["actionParams"]),
tags: params["tags"]?.map(x => fromTag(x)),
};
const resp = await this.#client.performRequest({
opts, body,
action: "CreateMitigationAction",
requestUri: cmnP.encodePath`/mitigationactions/actions/${params["actionName"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"actionArn": "s",
"actionId": "s",
},
}, await resp.json());
}
/** Creates an IoT OTA update on a target group of things or groups. */
async createOTAUpdate(
params: CreateOTAUpdateRequest,
opts: client.RequestOptions = {},
): Promise<CreateOTAUpdateResponse> {
const body: jsonP.JSONObject = {
description: params["description"],
targets: params["targets"],
protocols: params["protocols"],
targetSelection: params["targetSelection"],
awsJobExecutionsRolloutConfig: fromAwsJobExecutionsRolloutConfig(params["awsJobExecutionsRolloutConfig"]),
awsJobPresignedUrlConfig: fromAwsJobPresignedUrlConfig(params["awsJobPresignedUrlConfig"]),
awsJobAbortConfig: fromAwsJobAbortConfig(params["awsJobAbortConfig"]),
awsJobTimeoutConfig: fromAwsJobTimeoutConfig(params["awsJobTimeoutConfig"]),
files: params["files"]?.map(x => fromOTAUpdateFile(x)),
roleArn: params["roleArn"],
additionalParameters: params["additionalParameters"],
tags: params["tags"]?.map(x => fromTag(x)),
};
const resp = await this.#client.performRequest({
opts, body,
action: "CreateOTAUpdate",
requestUri: cmnP.encodePath`/otaUpdates/${params["otaUpdateId"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"otaUpdateId": "s",
"awsIotJobId": "s",
"otaUpdateArn": "s",
"awsIotJobArn": "s",
"otaUpdateStatus": (x: jsonP.JSONValue) => cmnP.readEnum<OTAUpdateStatus>(x),
},
}, await resp.json());
}
/** Creates an IoT policy. */
async createPolicy(
params: CreatePolicyRequest,
opts: client.RequestOptions = {},
): Promise<CreatePolicyResponse> {
const body: jsonP.JSONObject = {
policyDocument: params["policyDocument"],
tags: params["tags"]?.map(x => fromTag(x)),
};
const resp = await this.#client.performRequest({
opts, body,
action: "CreatePolicy",
requestUri: cmnP.encodePath`/policies/${params["policyName"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"policyName": "s",
"policyArn": "s",
"policyDocument": "s",
"policyVersionId": "s",
},
}, await resp.json());
}
/** Creates a new version of the specified IoT policy. */
async createPolicyVersion(
params: CreatePolicyVersionRequest,
opts: client.RequestOptions = {},
): Promise<CreatePolicyVersionResponse> {
const query = new URLSearchParams;
const body: jsonP.JSONObject = {
policyDocument: params["policyDocument"],
};
if (params["setAsDefault"] != null) query.set("setAsDefault", params["setAsDefault"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query, body,
action: "CreatePolicyVersion",
requestUri: cmnP.encodePath`/policies/${params["policyName"]}/version`,
});
return jsonP.readObj({
required: {},
optional: {
"policyArn": "s",
"policyDocument": "s",
"policyVersionId": "s",
"isDefaultVersion": "b",
},
}, await resp.json());
}
/** Creates a provisioning claim. */
async createProvisioningClaim(
params: CreateProvisioningClaimRequest,
opts: client.RequestOptions = {},
): Promise<CreateProvisioningClaimResponse> {
const resp = await this.#client.performRequest({
opts,
action: "CreateProvisioningClaim",
requestUri: cmnP.encodePath`/provisioning-templates/${params["templateName"]}/provisioning-claim`,
});
return jsonP.readObj({
required: {},
optional: {
"certificateId": "s",
"certificatePem": "s",
"keyPair": toKeyPair,
"expiration": "d",
},
}, await resp.json());
}
/** Creates a fleet provisioning template. */
async createProvisioningTemplate(
params: CreateProvisioningTemplateRequest,
opts: client.RequestOptions = {},
): Promise<CreateProvisioningTemplateResponse> {
const body: jsonP.JSONObject = {
templateName: params["templateName"],
description: params["description"],
templateBody: params["templateBody"],
enabled: params["enabled"],
provisioningRoleArn: params["provisioningRoleArn"],
preProvisioningHook: fromProvisioningHook(params["preProvisioningHook"]),
tags: params["tags"]?.map(x => fromTag(x)),
};
const resp = await this.#client.performRequest({
opts, body,
action: "CreateProvisioningTemplate",
requestUri: "/provisioning-templates",
});
return jsonP.readObj({
required: {},
optional: {
"templateArn": "s",
"templateName": "s",
"defaultVersionId": "n",
},
}, await resp.json());
}
/** Creates a new version of a fleet provisioning template. */
async createProvisioningTemplateVersion(
params: CreateProvisioningTemplateVersionRequest,
opts: client.RequestOptions = {},
): Promise<CreateProvisioningTemplateVersionResponse> {
const query = new URLSearchParams;
const body: jsonP.JSONObject = {
templateBody: params["templateBody"],
};
if (params["setAsDefault"] != null) query.set("setAsDefault", params["setAsDefault"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query, body,
action: "CreateProvisioningTemplateVersion",
requestUri: cmnP.encodePath`/provisioning-templates/${params["templateName"]}/versions`,
});
return jsonP.readObj({
required: {},
optional: {
"templateArn": "s",
"templateName": "s",
"versionId": "n",
"isDefaultVersion": "b",
},
}, await resp.json());
}
/** Creates a role alias. */
async createRoleAlias(
params: CreateRoleAliasRequest,
opts: client.RequestOptions = {},
): Promise<CreateRoleAliasResponse> {
const body: jsonP.JSONObject = {
roleArn: params["roleArn"],
credentialDurationSeconds: params["credentialDurationSeconds"],
tags: params["tags"]?.map(x => fromTag(x)),
};
const resp = await this.#client.performRequest({
opts, body,
action: "CreateRoleAlias",
requestUri: cmnP.encodePath`/role-aliases/${params["roleAlias"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"roleAlias": "s",
"roleAliasArn": "s",
},
}, await resp.json());
}
/** Creates a scheduled audit that is run at a specified time interval. */
async createScheduledAudit(
params: CreateScheduledAuditRequest,
opts: client.RequestOptions = {},
): Promise<CreateScheduledAuditResponse> {
const body: jsonP.JSONObject = {
frequency: params["frequency"],
dayOfMonth: params["dayOfMonth"],
dayOfWeek: params["dayOfWeek"],
targetCheckNames: params["targetCheckNames"],
tags: params["tags"]?.map(x => fromTag(x)),
};
const resp = await this.#client.performRequest({
opts, body,
action: "CreateScheduledAudit",
requestUri: cmnP.encodePath`/audit/scheduledaudits/${params["scheduledAuditName"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"scheduledAuditArn": "s",
},
}, await resp.json());
}
/** Creates a Device Defender security profile. */
async createSecurityProfile(
params: CreateSecurityProfileRequest,
opts: client.RequestOptions = {},
): Promise<CreateSecurityProfileResponse> {
const body: jsonP.JSONObject = {
securityProfileDescription: params["securityProfileDescription"],
behaviors: params["behaviors"]?.map(x => fromBehavior(x)),
alertTargets: jsonP.serializeMap(params["alertTargets"], x => fromAlertTarget(x)),
additionalMetricsToRetain: params["additionalMetricsToRetain"],
additionalMetricsToRetainV2: params["additionalMetricsToRetainV2"]?.map(x => fromMetricToRetain(x)),
tags: params["tags"]?.map(x => fromTag(x)),
};
const resp = await this.#client.performRequest({
opts, body,
action: "CreateSecurityProfile",
requestUri: cmnP.encodePath`/security-profiles/${params["securityProfileName"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"securityProfileName": "s",
"securityProfileArn": "s",
},
}, await resp.json());
}
/** Creates a stream for delivering one or more large files in chunks over MQTT. */
async createStream(
params: CreateStreamRequest,
opts: client.RequestOptions = {},
): Promise<CreateStreamResponse> {
const body: jsonP.JSONObject = {
description: params["description"],
files: params["files"]?.map(x => fromStreamFile(x)),
roleArn: params["roleArn"],
tags: params["tags"]?.map(x => fromTag(x)),
};
const resp = await this.#client.performRequest({
opts, body,
action: "CreateStream",
requestUri: cmnP.encodePath`/streams/${params["streamId"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"streamId": "s",
"streamArn": "s",
"description": "s",
"streamVersion": "n",
},
}, await resp.json());
}
/** Creates a thing record in the registry. */
async createThing(
params: CreateThingRequest,
opts: client.RequestOptions = {},
): Promise<CreateThingResponse> {
const body: jsonP.JSONObject = {
thingTypeName: params["thingTypeName"],
attributePayload: fromAttributePayload(params["attributePayload"]),
billingGroupName: params["billingGroupName"],
};
const resp = await this.#client.performRequest({
opts, body,
action: "CreateThing",
requestUri: cmnP.encodePath`/things/${params["thingName"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"thingName": "s",
"thingArn": "s",
"thingId": "s",
},
}, await resp.json());
}
/** Create a thing group. */
async createThingGroup(
params: CreateThingGroupRequest,
opts: client.RequestOptions = {},
): Promise<CreateThingGroupResponse> {
const body: jsonP.JSONObject = {
parentGroupName: params["parentGroupName"],
thingGroupProperties: fromThingGroupProperties(params["thingGroupProperties"]),
tags: params["tags"]?.map(x => fromTag(x)),
};
const resp = await this.#client.performRequest({
opts, body,
action: "CreateThingGroup",
requestUri: cmnP.encodePath`/thing-groups/${params["thingGroupName"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"thingGroupName": "s",
"thingGroupArn": "s",
"thingGroupId": "s",
},
}, await resp.json());
}
/** Creates a new thing type. */
async createThingType(
params: CreateThingTypeRequest,
opts: client.RequestOptions = {},
): Promise<CreateThingTypeResponse> {
const body: jsonP.JSONObject = {
thingTypeProperties: fromThingTypeProperties(params["thingTypeProperties"]),
tags: params["tags"]?.map(x => fromTag(x)),
};
const resp = await this.#client.performRequest({
opts, body,
action: "CreateThingType",
requestUri: cmnP.encodePath`/thing-types/${params["thingTypeName"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"thingTypeName": "s",
"thingTypeArn": "s",
"thingTypeId": "s",
},
}, await resp.json());
}
/** Creates a rule. */
async createTopicRule(
params: CreateTopicRuleRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const inner = params["topicRulePayload"];
const body: jsonP.JSONObject = inner ? {
sql: inner["sql"],
description: inner["description"],
actions: inner["actions"]?.map(x => fromAction(x)),
ruleDisabled: inner["ruleDisabled"],
awsIotSqlVersion: inner["awsIotSqlVersion"],
errorAction: fromAction(inner["errorAction"]),
} : {};
const headers = new Headers;
if (params["tags"] != null) headers.append("x-amz-tagging", params["tags"]);
const resp = await this.#client.performRequest({
opts, headers, body,
action: "CreateTopicRule",
requestUri: cmnP.encodePath`/rules/${params["ruleName"]}`,
});
await resp.body?.cancel();
}
/** Creates a topic rule destination. */
async createTopicRuleDestination(
params: CreateTopicRuleDestinationRequest,
opts: client.RequestOptions = {},
): Promise<CreateTopicRuleDestinationResponse> {
const body: jsonP.JSONObject = {
destinationConfiguration: fromTopicRuleDestinationConfiguration(params["destinationConfiguration"]),
};
const resp = await this.#client.performRequest({
opts, body,
action: "CreateTopicRuleDestination",
requestUri: "/destinations",
});
return jsonP.readObj({
required: {},
optional: {
"topicRuleDestination": toTopicRuleDestination,
},
}, await resp.json());
}
/** Restores the default settings for Device Defender audits for this account. */
async deleteAccountAuditConfiguration(
params: DeleteAccountAuditConfigurationRequest = {},
opts: client.RequestOptions = {},
): Promise<void> {
const query = new URLSearchParams;
if (params["deleteScheduledAudits"] != null) query.set("deleteScheduledAudits", params["deleteScheduledAudits"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "DeleteAccountAuditConfiguration",
method: "DELETE",
requestUri: "/audit/configuration",
});
await resp.body?.cancel();
}
/** Deletes a Device Defender audit suppression. */
async deleteAuditSuppression(
params: DeleteAuditSuppressionRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const body: jsonP.JSONObject = {
checkName: params["checkName"],
resourceIdentifier: fromResourceIdentifier(params["resourceIdentifier"]),
};
const resp = await this.#client.performRequest({
opts, body,
action: "DeleteAuditSuppression",
requestUri: "/audit/suppressions/delete",
});
await resp.body?.cancel();
}
/** Deletes an authorizer. */
async deleteAuthorizer(
params: DeleteAuthorizerRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const resp = await this.#client.performRequest({
opts,
action: "DeleteAuthorizer",
method: "DELETE",
requestUri: cmnP.encodePath`/authorizer/${params["authorizerName"]}`,
});
await resp.body?.cancel();
}
/** Deletes the billing group. */
async deleteBillingGroup(
params: DeleteBillingGroupRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const query = new URLSearchParams;
if (params["expectedVersion"] != null) query.set("expectedVersion", params["expectedVersion"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "DeleteBillingGroup",
method: "DELETE",
requestUri: cmnP.encodePath`/billing-groups/${params["billingGroupName"]}`,
});
await resp.body?.cancel();
}
/** Deletes a registered CA certificate. */
async deleteCACertificate(
params: DeleteCACertificateRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const resp = await this.#client.performRequest({
opts,
action: "DeleteCACertificate",
method: "DELETE",
requestUri: cmnP.encodePath`/cacertificate/${params["certificateId"]}`,
});
await resp.body?.cancel();
}
/** Deletes the specified certificate. */
async deleteCertificate(
params: DeleteCertificateRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const query = new URLSearchParams;
if (params["forceDelete"] != null) query.set("forceDelete", params["forceDelete"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "DeleteCertificate",
method: "DELETE",
requestUri: cmnP.encodePath`/certificates/${params["certificateId"]}`,
});
await resp.body?.cancel();
}
/** Deletes a Device Defender detect custom metric. */
async deleteCustomMetric(
params: DeleteCustomMetricRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const resp = await this.#client.performRequest({
opts,
action: "DeleteCustomMetric",
method: "DELETE",
requestUri: cmnP.encodePath`/custom-metric/${params["metricName"]}`,
});
await resp.body?.cancel();
}
/** Removes the specified dimension from your Amazon Web Services accounts. */
async deleteDimension(
params: DeleteDimensionRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const resp = await this.#client.performRequest({
opts,
action: "DeleteDimension",
method: "DELETE",
requestUri: cmnP.encodePath`/dimensions/${params["name"]}`,
});
await resp.body?.cancel();
}
/** Deletes the specified domain configuration. */
async deleteDomainConfiguration(
params: DeleteDomainConfigurationRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const resp = await this.#client.performRequest({
opts,
action: "DeleteDomainConfiguration",
method: "DELETE",
requestUri: cmnP.encodePath`/domainConfigurations/${params["domainConfigurationName"]}`,
});
await resp.body?.cancel();
}
/** Deletes a dynamic thing group. */
async deleteDynamicThingGroup(
params: DeleteDynamicThingGroupRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const query = new URLSearchParams;
if (params["expectedVersion"] != null) query.set("expectedVersion", params["expectedVersion"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "DeleteDynamicThingGroup",
method: "DELETE",
requestUri: cmnP.encodePath`/dynamic-thing-groups/${params["thingGroupName"]}`,
});
await resp.body?.cancel();
}
/** Deletes the specified fleet metric. */
async deleteFleetMetric(
params: DeleteFleetMetricRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const query = new URLSearchParams;
if (params["expectedVersion"] != null) query.set("expectedVersion", params["expectedVersion"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "DeleteFleetMetric",
method: "DELETE",
requestUri: cmnP.encodePath`/fleet-metric/${params["metricName"]}`,
});
await resp.body?.cancel();
}
/** Deletes a job and its related job executions. */
async deleteJob(
params: DeleteJobRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const query = new URLSearchParams;
if (params["force"] != null) query.set("force", params["force"]?.toString() ?? "");
if (params["namespaceId"] != null) query.set("namespaceId", params["namespaceId"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "DeleteJob",
method: "DELETE",
requestUri: cmnP.encodePath`/jobs/${params["jobId"]}`,
});
await resp.body?.cancel();
}
/** Deletes a job execution. */
async deleteJobExecution(
params: DeleteJobExecutionRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const query = new URLSearchParams;
if (params["force"] != null) query.set("force", params["force"]?.toString() ?? "");
if (params["namespaceId"] != null) query.set("namespaceId", params["namespaceId"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "DeleteJobExecution",
method: "DELETE",
requestUri: cmnP.encodePath`/things/${params["thingName"]}/jobs/${params["jobId"]}/executionNumber/${params["executionNumber"].toString()}`,
});
await resp.body?.cancel();
}
/** Deletes the specified job template. */
async deleteJobTemplate(
params: DeleteJobTemplateRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const resp = await this.#client.performRequest({
opts,
action: "DeleteJobTemplate",
method: "DELETE",
requestUri: cmnP.encodePath`/job-templates/${params["jobTemplateId"]}`,
});
await resp.body?.cancel();
}
/** Deletes a defined mitigation action from your Amazon Web Services accounts. */
async deleteMitigationAction(
params: DeleteMitigationActionRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const resp = await this.#client.performRequest({
opts,
action: "DeleteMitigationAction",
method: "DELETE",
requestUri: cmnP.encodePath`/mitigationactions/actions/${params["actionName"]}`,
});
await resp.body?.cancel();
}
/** Delete an OTA update. */
async deleteOTAUpdate(
params: DeleteOTAUpdateRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const query = new URLSearchParams;
if (params["deleteStream"] != null) query.set("deleteStream", params["deleteStream"]?.toString() ?? "");
if (params["forceDeleteAWSJob"] != null) query.set("forceDeleteAWSJob", params["forceDeleteAWSJob"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "DeleteOTAUpdate",
method: "DELETE",
requestUri: cmnP.encodePath`/otaUpdates/${params["otaUpdateId"]}`,
});
await resp.body?.cancel();
}
/** Deletes the specified policy. */
async deletePolicy(
params: DeletePolicyRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const resp = await this.#client.performRequest({
opts,
action: "DeletePolicy",
method: "DELETE",
requestUri: cmnP.encodePath`/policies/${params["policyName"]}`,
});
await resp.body?.cancel();
}
/** Deletes the specified version of the specified policy. */
async deletePolicyVersion(
params: DeletePolicyVersionRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const resp = await this.#client.performRequest({
opts,
action: "DeletePolicyVersion",
method: "DELETE",
requestUri: cmnP.encodePath`/policies/${params["policyName"]}/version/${params["policyVersionId"]}`,
});
await resp.body?.cancel();
}
/** Deletes a fleet provisioning template. */
async deleteProvisioningTemplate(
params: DeleteProvisioningTemplateRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const resp = await this.#client.performRequest({
opts,
action: "DeleteProvisioningTemplate",
method: "DELETE",
requestUri: cmnP.encodePath`/provisioning-templates/${params["templateName"]}`,
});
await resp.body?.cancel();
}
/** Deletes a fleet provisioning template version. */
async deleteProvisioningTemplateVersion(
params: DeleteProvisioningTemplateVersionRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const resp = await this.#client.performRequest({
opts,
action: "DeleteProvisioningTemplateVersion",
method: "DELETE",
requestUri: cmnP.encodePath`/provisioning-templates/${params["templateName"]}/versions/${params["versionId"].toString()}`,
});
await resp.body?.cancel();
}
/** Deletes a CA certificate registration code. */
async deleteRegistrationCode(
opts: client.RequestOptions = {},
): Promise<void> {
const body: jsonP.JSONObject = {};
const resp = await this.#client.performRequest({
opts, body,
action: "DeleteRegistrationCode",
method: "DELETE",
requestUri: "/registrationcode",
});
await resp.body?.cancel();
}
/** Deletes a role alias */
async deleteRoleAlias(
params: DeleteRoleAliasRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const resp = await this.#client.performRequest({
opts,
action: "DeleteRoleAlias",
method: "DELETE",
requestUri: cmnP.encodePath`/role-aliases/${params["roleAlias"]}`,
});
await resp.body?.cancel();
}
/** Deletes a scheduled audit. */
async deleteScheduledAudit(
params: DeleteScheduledAuditRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const resp = await this.#client.performRequest({
opts,
action: "DeleteScheduledAudit",
method: "DELETE",
requestUri: cmnP.encodePath`/audit/scheduledaudits/${params["scheduledAuditName"]}`,
});
await resp.body?.cancel();
}
/** Deletes a Device Defender security profile. */
async deleteSecurityProfile(
params: DeleteSecurityProfileRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const query = new URLSearchParams;
if (params["expectedVersion"] != null) query.set("expectedVersion", params["expectedVersion"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "DeleteSecurityProfile",
method: "DELETE",
requestUri: cmnP.encodePath`/security-profiles/${params["securityProfileName"]}`,
});
await resp.body?.cancel();
}
/** Deletes a stream. */
async deleteStream(
params: DeleteStreamRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const resp = await this.#client.performRequest({
opts,
action: "DeleteStream",
method: "DELETE",
requestUri: cmnP.encodePath`/streams/${params["streamId"]}`,
});
await resp.body?.cancel();
}
/** Deletes the specified thing. */
async deleteThing(
params: DeleteThingRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const query = new URLSearchParams;
if (params["expectedVersion"] != null) query.set("expectedVersion", params["expectedVersion"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "DeleteThing",
method: "DELETE",
requestUri: cmnP.encodePath`/things/${params["thingName"]}`,
});
await resp.body?.cancel();
}
/** Deletes a thing group. */
async deleteThingGroup(
params: DeleteThingGroupRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const query = new URLSearchParams;
if (params["expectedVersion"] != null) query.set("expectedVersion", params["expectedVersion"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "DeleteThingGroup",
method: "DELETE",
requestUri: cmnP.encodePath`/thing-groups/${params["thingGroupName"]}`,
});
await resp.body?.cancel();
}
/** Deletes the specified thing type. */
async deleteThingType(
params: DeleteThingTypeRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const resp = await this.#client.performRequest({
opts,
action: "DeleteThingType",
method: "DELETE",
requestUri: cmnP.encodePath`/thing-types/${params["thingTypeName"]}`,
});
await resp.body?.cancel();
}
/** Deletes the rule. */
async deleteTopicRule(
params: DeleteTopicRuleRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const resp = await this.#client.performRequest({
opts,
action: "DeleteTopicRule",
method: "DELETE",
requestUri: cmnP.encodePath`/rules/${params["ruleName"]}`,
});
await resp.body?.cancel();
}
/** Deletes a topic rule destination. */
async deleteTopicRuleDestination(
params: DeleteTopicRuleDestinationRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const resp = await this.#client.performRequest({
opts,
action: "DeleteTopicRuleDestination",
method: "DELETE",
requestUri: cmnP.encodePath`/destinations/${params["arn"].split("/")}`,
});
await resp.body?.cancel();
}
/** Deletes a logging level. */
async deleteV2LoggingLevel(
params: DeleteV2LoggingLevelRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const query = new URLSearchParams;
query.set("targetType", params["targetType"]?.toString() ?? "");
query.set("targetName", params["targetName"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "DeleteV2LoggingLevel",
method: "DELETE",
requestUri: "/v2LoggingLevel",
});
await resp.body?.cancel();
}
/** Deprecates a thing type. */
async deprecateThingType(
params: DeprecateThingTypeRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const body: jsonP.JSONObject = {
undoDeprecate: params["undoDeprecate"],
};
const resp = await this.#client.performRequest({
opts, body,
action: "DeprecateThingType",
requestUri: cmnP.encodePath`/thing-types/${params["thingTypeName"]}/deprecate`,
});
await resp.body?.cancel();
}
/** Gets information about the Device Defender audit settings for this account. */
async describeAccountAuditConfiguration(
opts: client.RequestOptions = {},
): Promise<DescribeAccountAuditConfigurationResponse> {
const body: jsonP.JSONObject = {};
const resp = await this.#client.performRequest({
opts, body,
action: "DescribeAccountAuditConfiguration",
method: "GET",
requestUri: "/audit/configuration",
});
return jsonP.readObj({
required: {},
optional: {
"roleArn": "s",
"auditNotificationTargetConfigurations": x => jsonP.readMap(x => cmnP.readEnumReq<AuditNotificationType>(x), toAuditNotificationTarget, x),
"auditCheckConfigurations": x => jsonP.readMap(String, toAuditCheckConfiguration, x),
},
}, await resp.json());
}
/** Gets information about a single audit finding. */
async describeAuditFinding(
params: DescribeAuditFindingRequest,
opts: client.RequestOptions = {},
): Promise<DescribeAuditFindingResponse> {
const resp = await this.#client.performRequest({
opts,
action: "DescribeAuditFinding",
method: "GET",
requestUri: cmnP.encodePath`/audit/findings/${params["findingId"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"finding": toAuditFinding,
},
}, await resp.json());
}
/** Gets information about an audit mitigation task that is used to apply mitigation actions to a set of audit findings. */
async describeAuditMitigationActionsTask(
params: DescribeAuditMitigationActionsTaskRequest,
opts: client.RequestOptions = {},
): Promise<DescribeAuditMitigationActionsTaskResponse> {
const resp = await this.#client.performRequest({
opts,
action: "DescribeAuditMitigationActionsTask",
method: "GET",
requestUri: cmnP.encodePath`/audit/mitigationactions/tasks/${params["taskId"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"taskStatus": (x: jsonP.JSONValue) => cmnP.readEnum<AuditMitigationActionsTaskStatus>(x),
"startTime": "d",
"endTime": "d",
"taskStatistics": x => jsonP.readMap(String, toTaskStatisticsForAuditCheck, x),
"target": toAuditMitigationActionsTaskTarget,
"auditCheckToActionsMapping": x => jsonP.readMap(String, l => Array.isArray(l) ? l.map(String) : [], x),
"actionsDefinition": [toMitigationAction],
},
}, await resp.json());
}
/** Gets information about a Device Defender audit suppression. */
async describeAuditSuppression(
params: DescribeAuditSuppressionRequest,
opts: client.RequestOptions = {},
): Promise<DescribeAuditSuppressionResponse> {
const body: jsonP.JSONObject = {
checkName: params["checkName"],
resourceIdentifier: fromResourceIdentifier(params["resourceIdentifier"]),
};
const resp = await this.#client.performRequest({
opts, body,
action: "DescribeAuditSuppression",
requestUri: "/audit/suppressions/describe",
});
return jsonP.readObj({
required: {},
optional: {
"checkName": "s",
"resourceIdentifier": toResourceIdentifier,
"expirationDate": "d",
"suppressIndefinitely": "b",
"description": "s",
},
}, await resp.json());
}
/** Gets information about a Device Defender audit. */
async describeAuditTask(
params: DescribeAuditTaskRequest,
opts: client.RequestOptions = {},
): Promise<DescribeAuditTaskResponse> {
const resp = await this.#client.performRequest({
opts,
action: "DescribeAuditTask",
method: "GET",
requestUri: cmnP.encodePath`/audit/tasks/${params["taskId"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"taskStatus": (x: jsonP.JSONValue) => cmnP.readEnum<AuditTaskStatus>(x),
"taskType": (x: jsonP.JSONValue) => cmnP.readEnum<AuditTaskType>(x),
"taskStartTime": "d",
"taskStatistics": toTaskStatistics,
"scheduledAuditName": "s",
"auditDetails": x => jsonP.readMap(String, toAuditCheckDetails, x),
},
}, await resp.json());
}
/** Describes an authorizer. */
async describeAuthorizer(
params: DescribeAuthorizerRequest,
opts: client.RequestOptions = {},
): Promise<DescribeAuthorizerResponse> {
const resp = await this.#client.performRequest({
opts,
action: "DescribeAuthorizer",
method: "GET",
requestUri: cmnP.encodePath`/authorizer/${params["authorizerName"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"authorizerDescription": toAuthorizerDescription,
},
}, await resp.json());
}
/** Returns information about a billing group. */
async describeBillingGroup(
params: DescribeBillingGroupRequest,
opts: client.RequestOptions = {},
): Promise<DescribeBillingGroupResponse> {
const resp = await this.#client.performRequest({
opts,
action: "DescribeBillingGroup",
method: "GET",
requestUri: cmnP.encodePath`/billing-groups/${params["billingGroupName"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"billingGroupName": "s",
"billingGroupId": "s",
"billingGroupArn": "s",
"version": "n",
"billingGroupProperties": toBillingGroupProperties,
"billingGroupMetadata": toBillingGroupMetadata,
},
}, await resp.json());
}
/** Describes a registered CA certificate. */
async describeCACertificate(
params: DescribeCACertificateRequest,
opts: client.RequestOptions = {},
): Promise<DescribeCACertificateResponse> {
const resp = await this.#client.performRequest({
opts,
action: "DescribeCACertificate",
method: "GET",
requestUri: cmnP.encodePath`/cacertificate/${params["certificateId"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"certificateDescription": toCACertificateDescription,
"registrationConfig": toRegistrationConfig,
},
}, await resp.json());
}
/** Gets information about the specified certificate. */
async describeCertificate(
params: DescribeCertificateRequest,
opts: client.RequestOptions = {},
): Promise<DescribeCertificateResponse> {
const resp = await this.#client.performRequest({
opts,
action: "DescribeCertificate",
method: "GET",
requestUri: cmnP.encodePath`/certificates/${params["certificateId"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"certificateDescription": toCertificateDescription,
},
}, await resp.json());
}
/** Gets information about a Device Defender detect custom metric. */
async describeCustomMetric(
params: DescribeCustomMetricRequest,
opts: client.RequestOptions = {},
): Promise<DescribeCustomMetricResponse> {
const resp = await this.#client.performRequest({
opts,
action: "DescribeCustomMetric",
method: "GET",
requestUri: cmnP.encodePath`/custom-metric/${params["metricName"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"metricName": "s",
"metricArn": "s",
"metricType": (x: jsonP.JSONValue) => cmnP.readEnum<CustomMetricType>(x),
"displayName": "s",
"creationDate": "d",
"lastModifiedDate": "d",
},
}, await resp.json());
}
/** Describes the default authorizer. */
async describeDefaultAuthorizer(
opts: client.RequestOptions = {},
): Promise<DescribeDefaultAuthorizerResponse> {
const body: jsonP.JSONObject = {};
const resp = await this.#client.performRequest({
opts, body,
action: "DescribeDefaultAuthorizer",
method: "GET",
requestUri: "/default-authorizer",
});
return jsonP.readObj({
required: {},
optional: {
"authorizerDescription": toAuthorizerDescription,
},
}, await resp.json());
}
/** Gets information about a Device Defender ML Detect mitigation action. */
async describeDetectMitigationActionsTask(
params: DescribeDetectMitigationActionsTaskRequest,
opts: client.RequestOptions = {},
): Promise<DescribeDetectMitigationActionsTaskResponse> {
const resp = await this.#client.performRequest({
opts,
action: "DescribeDetectMitigationActionsTask",
method: "GET",
requestUri: cmnP.encodePath`/detect/mitigationactions/tasks/${params["taskId"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"taskSummary": toDetectMitigationActionsTaskSummary,
},
}, await resp.json());
}
/** Provides details about a dimension that is defined in your Amazon Web Services accounts. */
async describeDimension(
params: DescribeDimensionRequest,
opts: client.RequestOptions = {},
): Promise<DescribeDimensionResponse> {
const resp = await this.#client.performRequest({
opts,
action: "DescribeDimension",
method: "GET",
requestUri: cmnP.encodePath`/dimensions/${params["name"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"name": "s",
"arn": "s",
"type": (x: jsonP.JSONValue) => cmnP.readEnum<DimensionType>(x),
"stringValues": ["s"],
"creationDate": "d",
"lastModifiedDate": "d",
},
}, await resp.json());
}
/** Gets summary information about a domain configuration. */
async describeDomainConfiguration(
params: DescribeDomainConfigurationRequest,
opts: client.RequestOptions = {},
): Promise<DescribeDomainConfigurationResponse> {
const resp = await this.#client.performRequest({
opts,
action: "DescribeDomainConfiguration",
method: "GET",
requestUri: cmnP.encodePath`/domainConfigurations/${params["domainConfigurationName"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"domainConfigurationName": "s",
"domainConfigurationArn": "s",
"domainName": "s",
"serverCertificates": [toServerCertificateSummary],
"authorizerConfig": toAuthorizerConfig,
"domainConfigurationStatus": (x: jsonP.JSONValue) => cmnP.readEnum<DomainConfigurationStatus>(x),
"serviceType": (x: jsonP.JSONValue) => cmnP.readEnum<ServiceType>(x),
"domainType": (x: jsonP.JSONValue) => cmnP.readEnum<DomainType>(x),
"lastStatusChangeDate": "d",
},
}, await resp.json());
}
/** Returns a unique endpoint specific to the Amazon Web Services account making the call. */
async describeEndpoint(
params: DescribeEndpointRequest = {},
opts: client.RequestOptions = {},
): Promise<DescribeEndpointResponse> {
const query = new URLSearchParams;
if (params["endpointType"] != null) query.set("endpointType", params["endpointType"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "DescribeEndpoint",
method: "GET",
requestUri: "/endpoint",
});
return jsonP.readObj({
required: {},
optional: {
"endpointAddress": "s",
},
}, await resp.json());
}
/** Describes event configurations. */
async describeEventConfigurations(
opts: client.RequestOptions = {},
): Promise<DescribeEventConfigurationsResponse> {
const body: jsonP.JSONObject = {};
const resp = await this.#client.performRequest({
opts, body,
action: "DescribeEventConfigurations",
method: "GET",
requestUri: "/event-configurations",
});
return jsonP.readObj({
required: {},
optional: {
"eventConfigurations": x => jsonP.readMap(x => cmnP.readEnumReq<EventType>(x), toConfiguration, x),
"creationDate": "d",
"lastModifiedDate": "d",
},
}, await resp.json());
}
/** Gets information about the specified fleet metric. */
async describeFleetMetric(
params: DescribeFleetMetricRequest,
opts: client.RequestOptions = {},
): Promise<DescribeFleetMetricResponse> {
const resp = await this.#client.performRequest({
opts,
action: "DescribeFleetMetric",
method: "GET",
requestUri: cmnP.encodePath`/fleet-metric/${params["metricName"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"metricName": "s",
"queryString": "s",
"aggregationType": toAggregationType,
"period": "n",
"aggregationField": "s",
"description": "s",
"queryVersion": "s",
"indexName": "s",
"creationDate": "d",
"lastModifiedDate": "d",
"unit": (x: jsonP.JSONValue) => cmnP.readEnum<FleetMetricUnit>(x),
"version": "n",
"metricArn": "s",
},
}, await resp.json());
}
/** Describes a search index. */
async describeIndex(
params: DescribeIndexRequest,
opts: client.RequestOptions = {},
): Promise<DescribeIndexResponse> {
const resp = await this.#client.performRequest({
opts,
action: "DescribeIndex",
method: "GET",
requestUri: cmnP.encodePath`/indices/${params["indexName"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"indexName": "s",
"indexStatus": (x: jsonP.JSONValue) => cmnP.readEnum<IndexStatus>(x),
"schema": "s",
},
}, await resp.json());
}
/** Describes a job. */
async describeJob(
params: DescribeJobRequest,
opts: client.RequestOptions = {},
): Promise<DescribeJobResponse> {
const resp = await this.#client.performRequest({
opts,
action: "DescribeJob",
method: "GET",
requestUri: cmnP.encodePath`/jobs/${params["jobId"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"documentSource": "s",
"job": toJob,
},
}, await resp.json());
}
/** Describes a job execution. */
async describeJobExecution(
params: DescribeJobExecutionRequest,
opts: client.RequestOptions = {},
): Promise<DescribeJobExecutionResponse> {
const query = new URLSearchParams;
if (params["executionNumber"] != null) query.set("executionNumber", params["executionNumber"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "DescribeJobExecution",
method: "GET",
requestUri: cmnP.encodePath`/things/${params["thingName"]}/jobs/${params["jobId"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"execution": toJobExecution,
},
}, await resp.json());
}
/** Returns information about a job template. */
async describeJobTemplate(
params: DescribeJobTemplateRequest,
opts: client.RequestOptions = {},
): Promise<DescribeJobTemplateResponse> {
const resp = await this.#client.performRequest({
opts,
action: "DescribeJobTemplate",
method: "GET",
requestUri: cmnP.encodePath`/job-templates/${params["jobTemplateId"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"jobTemplateArn": "s",
"jobTemplateId": "s",
"description": "s",
"documentSource": "s",
"document": "s",
"createdAt": "d",
"presignedUrlConfig": toPresignedUrlConfig,
"jobExecutionsRolloutConfig": toJobExecutionsRolloutConfig,
"abortConfig": toAbortConfig,
"timeoutConfig": toTimeoutConfig,
"jobExecutionsRetryConfig": toJobExecutionsRetryConfig,
},
}, await resp.json());
}
/** View details of a managed job template. */
async describeManagedJobTemplate(
params: DescribeManagedJobTemplateRequest,
opts: client.RequestOptions = {},
): Promise<DescribeManagedJobTemplateResponse> {
const query = new URLSearchParams;
if (params["templateVersion"] != null) query.set("templateVersion", params["templateVersion"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "DescribeManagedJobTemplate",
method: "GET",
requestUri: cmnP.encodePath`/managed-job-templates/${params["templateName"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"templateName": "s",
"templateArn": "s",
"description": "s",
"templateVersion": "s",
"environments": ["s"],
"documentParameters": [toDocumentParameter],
"document": "s",
},
}, await resp.json());
}
/** Gets information about a mitigation action. */
async describeMitigationAction(
params: DescribeMitigationActionRequest,
opts: client.RequestOptions = {},
): Promise<DescribeMitigationActionResponse> {
const resp = await this.#client.performRequest({
opts,
action: "DescribeMitigationAction",
method: "GET",
requestUri: cmnP.encodePath`/mitigationactions/actions/${params["actionName"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"actionName": "s",
"actionType": (x: jsonP.JSONValue) => cmnP.readEnum<MitigationActionType>(x),
"actionArn": "s",
"actionId": "s",
"roleArn": "s",
"actionParams": toMitigationActionParams,
"creationDate": "d",
"lastModifiedDate": "d",
},
}, await resp.json());
}
/** Returns information about a fleet provisioning template. */
async describeProvisioningTemplate(
params: DescribeProvisioningTemplateRequest,
opts: client.RequestOptions = {},
): Promise<DescribeProvisioningTemplateResponse> {
const resp = await this.#client.performRequest({
opts,
action: "DescribeProvisioningTemplate",
method: "GET",
requestUri: cmnP.encodePath`/provisioning-templates/${params["templateName"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"templateArn": "s",
"templateName": "s",
"description": "s",
"creationDate": "d",
"lastModifiedDate": "d",
"defaultVersionId": "n",
"templateBody": "s",
"enabled": "b",
"provisioningRoleArn": "s",
"preProvisioningHook": toProvisioningHook,
},
}, await resp.json());
}
/** Returns information about a fleet provisioning template version. */
async describeProvisioningTemplateVersion(
params: DescribeProvisioningTemplateVersionRequest,
opts: client.RequestOptions = {},
): Promise<DescribeProvisioningTemplateVersionResponse> {
const resp = await this.#client.performRequest({
opts,
action: "DescribeProvisioningTemplateVersion",
method: "GET",
requestUri: cmnP.encodePath`/provisioning-templates/${params["templateName"]}/versions/${params["versionId"].toString()}`,
});
return jsonP.readObj({
required: {},
optional: {
"versionId": "n",
"creationDate": "d",
"templateBody": "s",
"isDefaultVersion": "b",
},
}, await resp.json());
}
/** Describes a role alias. */
async describeRoleAlias(
params: DescribeRoleAliasRequest,
opts: client.RequestOptions = {},
): Promise<DescribeRoleAliasResponse> {
const resp = await this.#client.performRequest({
opts,
action: "DescribeRoleAlias",
method: "GET",
requestUri: cmnP.encodePath`/role-aliases/${params["roleAlias"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"roleAliasDescription": toRoleAliasDescription,
},
}, await resp.json());
}
/** Gets information about a scheduled audit. */
async describeScheduledAudit(
params: DescribeScheduledAuditRequest,
opts: client.RequestOptions = {},
): Promise<DescribeScheduledAuditResponse> {
const resp = await this.#client.performRequest({
opts,
action: "DescribeScheduledAudit",
method: "GET",
requestUri: cmnP.encodePath`/audit/scheduledaudits/${params["scheduledAuditName"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"frequency": (x: jsonP.JSONValue) => cmnP.readEnum<AuditFrequency>(x),
"dayOfMonth": "s",
"dayOfWeek": (x: jsonP.JSONValue) => cmnP.readEnum<DayOfWeek>(x),
"targetCheckNames": ["s"],
"scheduledAuditName": "s",
"scheduledAuditArn": "s",
},
}, await resp.json());
}
/** Gets information about a Device Defender security profile. */
async describeSecurityProfile(
params: DescribeSecurityProfileRequest,
opts: client.RequestOptions = {},
): Promise<DescribeSecurityProfileResponse> {
const resp = await this.#client.performRequest({
opts,
action: "DescribeSecurityProfile",
method: "GET",
requestUri: cmnP.encodePath`/security-profiles/${params["securityProfileName"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"securityProfileName": "s",
"securityProfileArn": "s",
"securityProfileDescription": "s",
"behaviors": [toBehavior],
"alertTargets": x => jsonP.readMap(x => cmnP.readEnumReq<AlertTargetType>(x), toAlertTarget, x),
"additionalMetricsToRetain": ["s"],
"additionalMetricsToRetainV2": [toMetricToRetain],
"version": "n",
"creationDate": "d",
"lastModifiedDate": "d",
},
}, await resp.json());
}
/** Gets information about a stream. */
async describeStream(
params: DescribeStreamRequest,
opts: client.RequestOptions = {},
): Promise<DescribeStreamResponse> {
const resp = await this.#client.performRequest({
opts,
action: "DescribeStream",
method: "GET",
requestUri: cmnP.encodePath`/streams/${params["streamId"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"streamInfo": toStreamInfo,
},
}, await resp.json());
}
/** Gets information about the specified thing. */
async describeThing(
params: DescribeThingRequest,
opts: client.RequestOptions = {},
): Promise<DescribeThingResponse> {
const resp = await this.#client.performRequest({
opts,
action: "DescribeThing",
method: "GET",
requestUri: cmnP.encodePath`/things/${params["thingName"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"defaultClientId": "s",
"thingName": "s",
"thingId": "s",
"thingArn": "s",
"thingTypeName": "s",
"attributes": x => jsonP.readMap(String, String, x),
"version": "n",
"billingGroupName": "s",
},
}, await resp.json());
}
/** Describe a thing group. */
async describeThingGroup(
params: DescribeThingGroupRequest,
opts: client.RequestOptions = {},
): Promise<DescribeThingGroupResponse> {
const resp = await this.#client.performRequest({
opts,
action: "DescribeThingGroup",
method: "GET",
requestUri: cmnP.encodePath`/thing-groups/${params["thingGroupName"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"thingGroupName": "s",
"thingGroupId": "s",
"thingGroupArn": "s",
"version": "n",
"thingGroupProperties": toThingGroupProperties,
"thingGroupMetadata": toThingGroupMetadata,
"indexName": "s",
"queryString": "s",
"queryVersion": "s",
"status": (x: jsonP.JSONValue) => cmnP.readEnum<DynamicGroupStatus>(x),
},
}, await resp.json());
}
/** Describes a bulk thing provisioning task. */
async describeThingRegistrationTask(
params: DescribeThingRegistrationTaskRequest,
opts: client.RequestOptions = {},
): Promise<DescribeThingRegistrationTaskResponse> {
const resp = await this.#client.performRequest({
opts,
action: "DescribeThingRegistrationTask",
method: "GET",
requestUri: cmnP.encodePath`/thing-registration-tasks/${params["taskId"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"taskId": "s",
"creationDate": "d",
"lastModifiedDate": "d",
"templateBody": "s",
"inputFileBucket": "s",
"inputFileKey": "s",
"roleArn": "s",
"status": (x: jsonP.JSONValue) => cmnP.readEnum<Status>(x),
"message": "s",
"successCount": "n",
"failureCount": "n",
"percentageProgress": "n",
},
}, await resp.json());
}
/** Gets information about the specified thing type. */
async describeThingType(
params: DescribeThingTypeRequest,
opts: client.RequestOptions = {},
): Promise<DescribeThingTypeResponse> {
const resp = await this.#client.performRequest({
opts,
action: "DescribeThingType",
method: "GET",
requestUri: cmnP.encodePath`/thing-types/${params["thingTypeName"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"thingTypeName": "s",
"thingTypeId": "s",
"thingTypeArn": "s",
"thingTypeProperties": toThingTypeProperties,
"thingTypeMetadata": toThingTypeMetadata,
},
}, await resp.json());
}
/** Detaches a policy from the specified target. */
async detachPolicy(
params: DetachPolicyRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const body: jsonP.JSONObject = {
target: params["target"],
};
const resp = await this.#client.performRequest({
opts, body,
action: "DetachPolicy",
requestUri: cmnP.encodePath`/target-policies/${params["policyName"]}`,
});
await resp.body?.cancel();
}
/** Removes the specified policy from the specified certificate. */
async detachPrincipalPolicy(
params: DetachPrincipalPolicyRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const headers = new Headers;
headers.append("x-amzn-iot-principal", params["principal"]);
const resp = await this.#client.performRequest({
opts, headers,
action: "DetachPrincipalPolicy",
method: "DELETE",
requestUri: cmnP.encodePath`/principal-policies/${params["policyName"]}`,
});
await resp.body?.cancel();
}
/** Disassociates a Device Defender security profile from a thing group or from this account. */
async detachSecurityProfile(
params: DetachSecurityProfileRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const query = new URLSearchParams;
query.set("securityProfileTargetArn", params["securityProfileTargetArn"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "DetachSecurityProfile",
method: "DELETE",
requestUri: cmnP.encodePath`/security-profiles/${params["securityProfileName"]}/targets`,
});
await resp.body?.cancel();
}
/** Detaches the specified principal from the specified thing. */
async detachThingPrincipal(
params: DetachThingPrincipalRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const headers = new Headers;
headers.append("x-amzn-principal", params["principal"]);
const resp = await this.#client.performRequest({
opts, headers,
action: "DetachThingPrincipal",
method: "DELETE",
requestUri: cmnP.encodePath`/things/${params["thingName"]}/principals`,
});
await resp.body?.cancel();
}
/** Disables the rule. */
async disableTopicRule(
params: DisableTopicRuleRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const resp = await this.#client.performRequest({
opts,
action: "DisableTopicRule",
requestUri: cmnP.encodePath`/rules/${params["ruleName"]}/disable`,
});
await resp.body?.cancel();
}
/** Enables the rule. */
async enableTopicRule(
params: EnableTopicRuleRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const resp = await this.#client.performRequest({
opts,
action: "EnableTopicRule",
requestUri: cmnP.encodePath`/rules/${params["ruleName"]}/enable`,
});
await resp.body?.cancel();
}
/** Returns a Device Defender's ML Detect Security Profile training model's status. */
async getBehaviorModelTrainingSummaries(
params: GetBehaviorModelTrainingSummariesRequest = {},
opts: client.RequestOptions = {},
): Promise<GetBehaviorModelTrainingSummariesResponse> {
const query = new URLSearchParams;
if (params["securityProfileName"] != null) query.set("securityProfileName", params["securityProfileName"]?.toString() ?? "");
if (params["maxResults"] != null) query.set("maxResults", params["maxResults"]?.toString() ?? "");
if (params["nextToken"] != null) query.set("nextToken", params["nextToken"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "GetBehaviorModelTrainingSummaries",
method: "GET",
requestUri: "/behavior-model-training/summaries",
});
return jsonP.readObj({
required: {},
optional: {
"summaries": [toBehaviorModelTrainingSummary],
"nextToken": "s",
},
}, await resp.json());
}
/** Aggregates on indexed data with search queries pertaining to particular fields. */
async getBucketsAggregation(
params: GetBucketsAggregationRequest,
opts: client.RequestOptions = {},
): Promise<GetBucketsAggregationResponse> {
const body: jsonP.JSONObject = {
indexName: params["indexName"],
queryString: params["queryString"],
aggregationField: params["aggregationField"],
queryVersion: params["queryVersion"],
bucketsAggregationType: fromBucketsAggregationType(params["bucketsAggregationType"]),
};
const resp = await this.#client.performRequest({
opts, body,
action: "GetBucketsAggregation",
requestUri: "/indices/buckets",
});
return jsonP.readObj({
required: {},
optional: {
"totalCount": "n",
"buckets": [toBucket],
},
}, await resp.json());
}
/** Returns the approximate count of unique values that match the query. */
async getCardinality(
params: GetCardinalityRequest,
opts: client.RequestOptions = {},
): Promise<GetCardinalityResponse> {
const body: jsonP.JSONObject = {
indexName: params["indexName"],
queryString: params["queryString"],
aggregationField: params["aggregationField"],
queryVersion: params["queryVersion"],
};
const resp = await this.#client.performRequest({
opts, body,
action: "GetCardinality",
requestUri: "/indices/cardinality",
});
return jsonP.readObj({
required: {},
optional: {
"cardinality": "n",
},
}, await resp.json());
}
/** Gets a list of the policies that have an effect on the authorization behavior of the specified device when it connects to the IoT device gateway. */
async getEffectivePolicies(
params: GetEffectivePoliciesRequest = {},
opts: client.RequestOptions = {},
): Promise<GetEffectivePoliciesResponse> {
const query = new URLSearchParams;
const body: jsonP.JSONObject = {
principal: params["principal"],
cognitoIdentityPoolId: params["cognitoIdentityPoolId"],
};
if (params["thingName"] != null) query.set("thingName", params["thingName"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query, body,
action: "GetEffectivePolicies",
requestUri: "/effective-policies",
});
return jsonP.readObj({
required: {},
optional: {
"effectivePolicies": [toEffectivePolicy],
},
}, await resp.json());
}
/** Gets the indexing configuration. */
async getIndexingConfiguration(
opts: client.RequestOptions = {},
): Promise<GetIndexingConfigurationResponse> {
const body: jsonP.JSONObject = {};
const resp = await this.#client.performRequest({
opts, body,
action: "GetIndexingConfiguration",
method: "GET",
requestUri: "/indexing/config",
});
return jsonP.readObj({
required: {},
optional: {
"thingIndexingConfiguration": toThingIndexingConfiguration,
"thingGroupIndexingConfiguration": toThingGroupIndexingConfiguration,
},
}, await resp.json());
}
/** Gets a job document. */
async getJobDocument(
params: GetJobDocumentRequest,
opts: client.RequestOptions = {},
): Promise<GetJobDocumentResponse> {
const resp = await this.#client.performRequest({
opts,
action: "GetJobDocument",
method: "GET",
requestUri: cmnP.encodePath`/jobs/${params["jobId"]}/job-document`,
});
return jsonP.readObj({
required: {},
optional: {
"document": "s",
},
}, await resp.json());
}
/** Gets the logging options. */
async getLoggingOptions(
opts: client.RequestOptions = {},
): Promise<GetLoggingOptionsResponse> {
const body: jsonP.JSONObject = {};
const resp = await this.#client.performRequest({
opts, body,
action: "GetLoggingOptions",
method: "GET",
requestUri: "/loggingOptions",
});
return jsonP.readObj({
required: {},
optional: {
"roleArn": "s",
"logLevel": (x: jsonP.JSONValue) => cmnP.readEnum<LogLevel>(x),
},
}, await resp.json());
}
/** Gets an OTA update. */
async getOTAUpdate(
params: GetOTAUpdateRequest,
opts: client.RequestOptions = {},
): Promise<GetOTAUpdateResponse> {
const resp = await this.#client.performRequest({
opts,
action: "GetOTAUpdate",
method: "GET",
requestUri: cmnP.encodePath`/otaUpdates/${params["otaUpdateId"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"otaUpdateInfo": toOTAUpdateInfo,
},
}, await resp.json());
}
/** Groups the aggregated values that match the query into percentile groupings. */
async getPercentiles(
params: GetPercentilesRequest,
opts: client.RequestOptions = {},
): Promise<GetPercentilesResponse> {
const body: jsonP.JSONObject = {
indexName: params["indexName"],
queryString: params["queryString"],
aggregationField: params["aggregationField"],
queryVersion: params["queryVersion"],
percents: params["percents"],
};
const resp = await this.#client.performRequest({
opts, body,
action: "GetPercentiles",
requestUri: "/indices/percentiles",
});
return jsonP.readObj({
required: {},
optional: {
"percentiles": [toPercentPair],
},
}, await resp.json());
}
/** Gets information about the specified policy with the policy document of the default version. */
async getPolicy(
params: GetPolicyRequest,
opts: client.RequestOptions = {},
): Promise<GetPolicyResponse> {
const resp = await this.#client.performRequest({
opts,
action: "GetPolicy",
method: "GET",
requestUri: cmnP.encodePath`/policies/${params["policyName"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"policyName": "s",
"policyArn": "s",
"policyDocument": "s",
"defaultVersionId": "s",
"creationDate": "d",
"lastModifiedDate": "d",
"generationId": "s",
},
}, await resp.json());
}
/** Gets information about the specified policy version. */
async getPolicyVersion(
params: GetPolicyVersionRequest,
opts: client.RequestOptions = {},
): Promise<GetPolicyVersionResponse> {
const resp = await this.#client.performRequest({
opts,
action: "GetPolicyVersion",
method: "GET",
requestUri: cmnP.encodePath`/policies/${params["policyName"]}/version/${params["policyVersionId"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"policyArn": "s",
"policyName": "s",
"policyDocument": "s",
"policyVersionId": "s",
"isDefaultVersion": "b",
"creationDate": "d",
"lastModifiedDate": "d",
"generationId": "s",
},
}, await resp.json());
}
/** Gets a registration code used to register a CA certificate with IoT. */
async getRegistrationCode(
opts: client.RequestOptions = {},
): Promise<GetRegistrationCodeResponse> {
const body: jsonP.JSONObject = {};
const resp = await this.#client.performRequest({
opts, body,
action: "GetRegistrationCode",
method: "GET",
requestUri: "/registrationcode",
});
return jsonP.readObj({
required: {},
optional: {
"registrationCode": "s",
},
}, await resp.json());
}
/** Returns the count, average, sum, minimum, maximum, sum of squares, variance, and standard deviation for the specified aggregated field. */
async getStatistics(
params: GetStatisticsRequest,
opts: client.RequestOptions = {},
): Promise<GetStatisticsResponse> {
const body: jsonP.JSONObject = {
indexName: params["indexName"],
queryString: params["queryString"],
aggregationField: params["aggregationField"],
queryVersion: params["queryVersion"],
};
const resp = await this.#client.performRequest({
opts, body,
action: "GetStatistics",
requestUri: "/indices/statistics",
});
return jsonP.readObj({
required: {},
optional: {
"statistics": toStatistics,
},
}, await resp.json());
}
/** Gets information about the rule. */
async getTopicRule(
params: GetTopicRuleRequest,
opts: client.RequestOptions = {},
): Promise<GetTopicRuleResponse> {
const resp = await this.#client.performRequest({
opts,
action: "GetTopicRule",
method: "GET",
requestUri: cmnP.encodePath`/rules/${params["ruleName"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"ruleArn": "s",
"rule": toTopicRule,
},
}, await resp.json());
}
/** Gets information about a topic rule destination. */
async getTopicRuleDestination(
params: GetTopicRuleDestinationRequest,
opts: client.RequestOptions = {},
): Promise<GetTopicRuleDestinationResponse> {
const resp = await this.#client.performRequest({
opts,
action: "GetTopicRuleDestination",
method: "GET",
requestUri: cmnP.encodePath`/destinations/${params["arn"].split("/")}`,
});
return jsonP.readObj({
required: {},
optional: {
"topicRuleDestination": toTopicRuleDestination,
},
}, await resp.json());
}
/** Gets the fine grained logging options. */
async getV2LoggingOptions(
opts: client.RequestOptions = {},
): Promise<GetV2LoggingOptionsResponse> {
const body: jsonP.JSONObject = {};
const resp = await this.#client.performRequest({
opts, body,
action: "GetV2LoggingOptions",
method: "GET",
requestUri: "/v2LoggingOptions",
});
return jsonP.readObj({
required: {},
optional: {
"roleArn": "s",
"defaultLogLevel": (x: jsonP.JSONValue) => cmnP.readEnum<LogLevel>(x),
"disableAllLogs": "b",
},
}, await resp.json());
}
/** Lists the active violations for a given Device Defender security profile. */
async listActiveViolations(
params: ListActiveViolationsRequest = {},
opts: client.RequestOptions = {},
): Promise<ListActiveViolationsResponse> {
const query = new URLSearchParams;
if (params["thingName"] != null) query.set("thingName", params["thingName"]?.toString() ?? "");
if (params["securityProfileName"] != null) query.set("securityProfileName", params["securityProfileName"]?.toString() ?? "");
if (params["behaviorCriteriaType"] != null) query.set("behaviorCriteriaType", params["behaviorCriteriaType"]?.toString() ?? "");
if (params["listSuppressedAlerts"] != null) query.set("listSuppressedAlerts", params["listSuppressedAlerts"]?.toString() ?? "");
if (params["verificationState"] != null) query.set("verificationState", params["verificationState"]?.toString() ?? "");
if (params["nextToken"] != null) query.set("nextToken", params["nextToken"]?.toString() ?? "");
if (params["maxResults"] != null) query.set("maxResults", params["maxResults"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "ListActiveViolations",
method: "GET",
requestUri: "/active-violations",
});
return jsonP.readObj({
required: {},
optional: {
"activeViolations": [toActiveViolation],
"nextToken": "s",
},
}, await resp.json());
}
/** Lists the policies attached to the specified thing group. */
async listAttachedPolicies(
params: ListAttachedPoliciesRequest,
opts: client.RequestOptions = {},
): Promise<ListAttachedPoliciesResponse> {
const query = new URLSearchParams;
if (params["recursive"] != null) query.set("recursive", params["recursive"]?.toString() ?? "");
if (params["marker"] != null) query.set("marker", params["marker"]?.toString() ?? "");
if (params["pageSize"] != null) query.set("pageSize", params["pageSize"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "ListAttachedPolicies",
requestUri: cmnP.encodePath`/attached-policies/${params["target"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"policies": [toPolicy],
"nextMarker": "s",
},
}, await resp.json());
}
/** Lists the findings (results) of a Device Defender audit or of the audits performed during a specified time period. */
async listAuditFindings(
params: ListAuditFindingsRequest = {},
opts: client.RequestOptions = {},
): Promise<ListAuditFindingsResponse> {
const body: jsonP.JSONObject = {
taskId: params["taskId"],
checkName: params["checkName"],
resourceIdentifier: fromResourceIdentifier(params["resourceIdentifier"]),
maxResults: params["maxResults"],
nextToken: params["nextToken"],
startTime: jsonP.serializeDate_unixTimestamp(params["startTime"]),
endTime: jsonP.serializeDate_unixTimestamp(params["endTime"]),
listSuppressedFindings: params["listSuppressedFindings"],
};
const resp = await this.#client.performRequest({
opts, body,
action: "ListAuditFindings",
requestUri: "/audit/findings",
});
return jsonP.readObj({
required: {},
optional: {
"findings": [toAuditFinding],
"nextToken": "s",
},
}, await resp.json());
}
/** Gets the status of audit mitigation action tasks that were executed. */
async listAuditMitigationActionsExecutions(
params: ListAuditMitigationActionsExecutionsRequest,
opts: client.RequestOptions = {},
): Promise<ListAuditMitigationActionsExecutionsResponse> {
const query = new URLSearchParams;
query.set("taskId", params["taskId"]?.toString() ?? "");
if (params["actionStatus"] != null) query.set("actionStatus", params["actionStatus"]?.toString() ?? "");
query.set("findingId", params["findingId"]?.toString() ?? "");
if (params["maxResults"] != null) query.set("maxResults", params["maxResults"]?.toString() ?? "");
if (params["nextToken"] != null) query.set("nextToken", params["nextToken"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "ListAuditMitigationActionsExecutions",
method: "GET",
requestUri: "/audit/mitigationactions/executions",
});
return jsonP.readObj({
required: {},
optional: {
"actionsExecutions": [toAuditMitigationActionExecutionMetadata],
"nextToken": "s",
},
}, await resp.json());
}
/** Gets a list of audit mitigation action tasks that match the specified filters. */
async listAuditMitigationActionsTasks(
params: ListAuditMitigationActionsTasksRequest,
opts: client.RequestOptions = {},
): Promise<ListAuditMitigationActionsTasksResponse> {
const query = new URLSearchParams;
if (params["auditTaskId"] != null) query.set("auditTaskId", params["auditTaskId"]?.toString() ?? "");
if (params["findingId"] != null) query.set("findingId", params["findingId"]?.toString() ?? "");
if (params["taskStatus"] != null) query.set("taskStatus", params["taskStatus"]?.toString() ?? "");
if (params["maxResults"] != null) query.set("maxResults", params["maxResults"]?.toString() ?? "");
if (params["nextToken"] != null) query.set("nextToken", params["nextToken"]?.toString() ?? "");
query.set("startTime", cmnP.serializeDate_iso8601(params["startTime"]) ?? "");
query.set("endTime", cmnP.serializeDate_iso8601(params["endTime"]) ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "ListAuditMitigationActionsTasks",
method: "GET",
requestUri: "/audit/mitigationactions/tasks",
});
return jsonP.readObj({
required: {},
optional: {
"tasks": [toAuditMitigationActionsTaskMetadata],
"nextToken": "s",
},
}, await resp.json());
}
/** Lists your Device Defender audit listings. */
async listAuditSuppressions(
params: ListAuditSuppressionsRequest = {},
opts: client.RequestOptions = {},
): Promise<ListAuditSuppressionsResponse> {
const body: jsonP.JSONObject = {
checkName: params["checkName"],
resourceIdentifier: fromResourceIdentifier(params["resourceIdentifier"]),
ascendingOrder: params["ascendingOrder"],
nextToken: params["nextToken"],
maxResults: params["maxResults"],
};
const resp = await this.#client.performRequest({
opts, body,
action: "ListAuditSuppressions",
requestUri: "/audit/suppressions/list",
});
return jsonP.readObj({
required: {},
optional: {
"suppressions": [toAuditSuppression],
"nextToken": "s",
},
}, await resp.json());
}
/** Lists the Device Defender audits that have been performed during a given time period. */
async listAuditTasks(
params: ListAuditTasksRequest,
opts: client.RequestOptions = {},
): Promise<ListAuditTasksResponse> {
const query = new URLSearchParams;
query.set("startTime", cmnP.serializeDate_iso8601(params["startTime"]) ?? "");
query.set("endTime", cmnP.serializeDate_iso8601(params["endTime"]) ?? "");
if (params["taskType"] != null) query.set("taskType", params["taskType"]?.toString() ?? "");
if (params["taskStatus"] != null) query.set("taskStatus", params["taskStatus"]?.toString() ?? "");
if (params["nextToken"] != null) query.set("nextToken", params["nextToken"]?.toString() ?? "");
if (params["maxResults"] != null) query.set("maxResults", params["maxResults"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "ListAuditTasks",
method: "GET",
requestUri: "/audit/tasks",
});
return jsonP.readObj({
required: {},
optional: {
"tasks": [toAuditTaskMetadata],
"nextToken": "s",
},
}, await resp.json());
}
/** Lists the authorizers registered in your account. */
async listAuthorizers(
params: ListAuthorizersRequest = {},
opts: client.RequestOptions = {},
): Promise<ListAuthorizersResponse> {
const query = new URLSearchParams;
if (params["pageSize"] != null) query.set("pageSize", params["pageSize"]?.toString() ?? "");
if (params["marker"] != null) query.set("marker", params["marker"]?.toString() ?? "");
if (params["ascendingOrder"] != null) query.set("isAscendingOrder", params["ascendingOrder"]?.toString() ?? "");
if (params["status"] != null) query.set("status", params["status"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "ListAuthorizers",
method: "GET",
requestUri: "/authorizers/",
});
return jsonP.readObj({
required: {},
optional: {
"authorizers": [toAuthorizerSummary],
"nextMarker": "s",
},
}, await resp.json());
}
/** Lists the billing groups you have created. */
async listBillingGroups(
params: ListBillingGroupsRequest = {},
opts: client.RequestOptions = {},
): Promise<ListBillingGroupsResponse> {
const query = new URLSearchParams;
if (params["nextToken"] != null) query.set("nextToken", params["nextToken"]?.toString() ?? "");
if (params["maxResults"] != null) query.set("maxResults", params["maxResults"]?.toString() ?? "");
if (params["namePrefixFilter"] != null) query.set("namePrefixFilter", params["namePrefixFilter"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "ListBillingGroups",
method: "GET",
requestUri: "/billing-groups",
});
return jsonP.readObj({
required: {},
optional: {
"billingGroups": [toGroupNameAndArn],
"nextToken": "s",
},
}, await resp.json());
}
/** Lists the CA certificates registered for your Amazon Web Services account. */
async listCACertificates(
params: ListCACertificatesRequest = {},
opts: client.RequestOptions = {},
): Promise<ListCACertificatesResponse> {
const query = new URLSearchParams;
if (params["pageSize"] != null) query.set("pageSize", params["pageSize"]?.toString() ?? "");
if (params["marker"] != null) query.set("marker", params["marker"]?.toString() ?? "");
if (params["ascendingOrder"] != null) query.set("isAscendingOrder", params["ascendingOrder"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "ListCACertificates",
method: "GET",
requestUri: "/cacertificates",
});
return jsonP.readObj({
required: {},
optional: {
"certificates": [toCACertificate],
"nextMarker": "s",
},
}, await resp.json());
}
/** Lists the certificates registered in your Amazon Web Services account. */
async listCertificates(
params: ListCertificatesRequest = {},
opts: client.RequestOptions = {},
): Promise<ListCertificatesResponse> {
const query = new URLSearchParams;
if (params["pageSize"] != null) query.set("pageSize", params["pageSize"]?.toString() ?? "");
if (params["marker"] != null) query.set("marker", params["marker"]?.toString() ?? "");
if (params["ascendingOrder"] != null) query.set("isAscendingOrder", params["ascendingOrder"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "ListCertificates",
method: "GET",
requestUri: "/certificates",
});
return jsonP.readObj({
required: {},
optional: {
"certificates": [toCertificate],
"nextMarker": "s",
},
}, await resp.json());
}
/** List the device certificates signed by the specified CA certificate. */
async listCertificatesByCA(
params: ListCertificatesByCARequest,
opts: client.RequestOptions = {},
): Promise<ListCertificatesByCAResponse> {
const query = new URLSearchParams;
if (params["pageSize"] != null) query.set("pageSize", params["pageSize"]?.toString() ?? "");
if (params["marker"] != null) query.set("marker", params["marker"]?.toString() ?? "");
if (params["ascendingOrder"] != null) query.set("isAscendingOrder", params["ascendingOrder"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "ListCertificatesByCA",
method: "GET",
requestUri: cmnP.encodePath`/certificates-by-ca/${params["caCertificateId"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"certificates": [toCertificate],
"nextMarker": "s",
},
}, await resp.json());
}
/** Lists your Device Defender detect custom metrics. */
async listCustomMetrics(
params: ListCustomMetricsRequest = {},
opts: client.RequestOptions = {},
): Promise<ListCustomMetricsResponse> {
const query = new URLSearchParams;
if (params["nextToken"] != null) query.set("nextToken", params["nextToken"]?.toString() ?? "");
if (params["maxResults"] != null) query.set("maxResults", params["maxResults"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "ListCustomMetrics",
method: "GET",
requestUri: "/custom-metrics",
});
return jsonP.readObj({
required: {},
optional: {
"metricNames": ["s"],
"nextToken": "s",
},
}, await resp.json());
}
/** Lists mitigation actions executions for a Device Defender ML Detect Security Profile. */
async listDetectMitigationActionsExecutions(
params: ListDetectMitigationActionsExecutionsRequest = {},
opts: client.RequestOptions = {},
): Promise<ListDetectMitigationActionsExecutionsResponse> {
const query = new URLSearchParams;
if (params["taskId"] != null) query.set("taskId", params["taskId"]?.toString() ?? "");
if (params["violationId"] != null) query.set("violationId", params["violationId"]?.toString() ?? "");
if (params["thingName"] != null) query.set("thingName", params["thingName"]?.toString() ?? "");
if (params["startTime"] != null) query.set("startTime", cmnP.serializeDate_iso8601(params["startTime"]) ?? "");
if (params["endTime"] != null) query.set("endTime", cmnP.serializeDate_iso8601(params["endTime"]) ?? "");
if (params["maxResults"] != null) query.set("maxResults", params["maxResults"]?.toString() ?? "");
if (params["nextToken"] != null) query.set("nextToken", params["nextToken"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "ListDetectMitigationActionsExecutions",
method: "GET",
requestUri: "/detect/mitigationactions/executions",
});
return jsonP.readObj({
required: {},
optional: {
"actionsExecutions": [toDetectMitigationActionExecution],
"nextToken": "s",
},
}, await resp.json());
}
/** List of Device Defender ML Detect mitigation actions tasks. */
async listDetectMitigationActionsTasks(
params: ListDetectMitigationActionsTasksRequest,
opts: client.RequestOptions = {},
): Promise<ListDetectMitigationActionsTasksResponse> {
const query = new URLSearchParams;
if (params["maxResults"] != null) query.set("maxResults", params["maxResults"]?.toString() ?? "");
if (params["nextToken"] != null) query.set("nextToken", params["nextToken"]?.toString() ?? "");
query.set("startTime", cmnP.serializeDate_iso8601(params["startTime"]) ?? "");
query.set("endTime", cmnP.serializeDate_iso8601(params["endTime"]) ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "ListDetectMitigationActionsTasks",
method: "GET",
requestUri: "/detect/mitigationactions/tasks",
});
return jsonP.readObj({
required: {},
optional: {
"tasks": [toDetectMitigationActionsTaskSummary],
"nextToken": "s",
},
}, await resp.json());
}
/** List the set of dimensions that are defined for your Amazon Web Services accounts. */
async listDimensions(
params: ListDimensionsRequest = {},
opts: client.RequestOptions = {},
): Promise<ListDimensionsResponse> {
const query = new URLSearchParams;
if (params["nextToken"] != null) query.set("nextToken", params["nextToken"]?.toString() ?? "");
if (params["maxResults"] != null) query.set("maxResults", params["maxResults"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "ListDimensions",
method: "GET",
requestUri: "/dimensions",
});
return jsonP.readObj({
required: {},
optional: {
"dimensionNames": ["s"],
"nextToken": "s",
},
}, await resp.json());
}
/** Gets a list of domain configurations for the user. */
async listDomainConfigurations(
params: ListDomainConfigurationsRequest = {},
opts: client.RequestOptions = {},
): Promise<ListDomainConfigurationsResponse> {
const query = new URLSearchParams;
if (params["marker"] != null) query.set("marker", params["marker"]?.toString() ?? "");
if (params["pageSize"] != null) query.set("pageSize", params["pageSize"]?.toString() ?? "");
if (params["serviceType"] != null) query.set("serviceType", params["serviceType"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "ListDomainConfigurations",
method: "GET",
requestUri: "/domainConfigurations",
});
return jsonP.readObj({
required: {},
optional: {
"domainConfigurations": [toDomainConfigurationSummary],
"nextMarker": "s",
},
}, await resp.json());
}
/** Lists all your fleet metrics. */
async listFleetMetrics(
params: ListFleetMetricsRequest = {},
opts: client.RequestOptions = {},
): Promise<ListFleetMetricsResponse> {
const query = new URLSearchParams;
if (params["nextToken"] != null) query.set("nextToken", params["nextToken"]?.toString() ?? "");
if (params["maxResults"] != null) query.set("maxResults", params["maxResults"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "ListFleetMetrics",
method: "GET",
requestUri: "/fleet-metrics",
});
return jsonP.readObj({
required: {},
optional: {
"fleetMetrics": [toFleetMetricNameAndArn],
"nextToken": "s",
},
}, await resp.json());
}
/** Lists the search indices. */
async listIndices(
params: ListIndicesRequest = {},
opts: client.RequestOptions = {},
): Promise<ListIndicesResponse> {
const query = new URLSearchParams;
if (params["nextToken"] != null) query.set("nextToken", params["nextToken"]?.toString() ?? "");
if (params["maxResults"] != null) query.set("maxResults", params["maxResults"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "ListIndices",
method: "GET",
requestUri: "/indices",
});
return jsonP.readObj({
required: {},
optional: {
"indexNames": ["s"],
"nextToken": "s",
},
}, await resp.json());
}
/** Lists the job executions for a job. */
async listJobExecutionsForJob(
params: ListJobExecutionsForJobRequest,
opts: client.RequestOptions = {},
): Promise<ListJobExecutionsForJobResponse> {
const query = new URLSearchParams;
if (params["status"] != null) query.set("status", params["status"]?.toString() ?? "");
if (params["maxResults"] != null) query.set("maxResults", params["maxResults"]?.toString() ?? "");
if (params["nextToken"] != null) query.set("nextToken", params["nextToken"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "ListJobExecutionsForJob",
method: "GET",
requestUri: cmnP.encodePath`/jobs/${params["jobId"]}/things`,
});
return jsonP.readObj({
required: {},
optional: {
"executionSummaries": [toJobExecutionSummaryForJob],
"nextToken": "s",
},
}, await resp.json());
}
/** Lists the job executions for the specified thing. */
async listJobExecutionsForThing(
params: ListJobExecutionsForThingRequest,
opts: client.RequestOptions = {},
): Promise<ListJobExecutionsForThingResponse> {
const query = new URLSearchParams;
if (params["status"] != null) query.set("status", params["status"]?.toString() ?? "");
if (params["namespaceId"] != null) query.set("namespaceId", params["namespaceId"]?.toString() ?? "");
if (params["maxResults"] != null) query.set("maxResults", params["maxResults"]?.toString() ?? "");
if (params["nextToken"] != null) query.set("nextToken", params["nextToken"]?.toString() ?? "");
if (params["jobId"] != null) query.set("jobId", params["jobId"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "ListJobExecutionsForThing",
method: "GET",
requestUri: cmnP.encodePath`/things/${params["thingName"]}/jobs`,
});
return jsonP.readObj({
required: {},
optional: {
"executionSummaries": [toJobExecutionSummaryForThing],
"nextToken": "s",
},
}, await resp.json());
}
/** Returns a list of job templates. */
async listJobTemplates(
params: ListJobTemplatesRequest = {},
opts: client.RequestOptions = {},
): Promise<ListJobTemplatesResponse> {
const query = new URLSearchParams;
if (params["maxResults"] != null) query.set("maxResults", params["maxResults"]?.toString() ?? "");
if (params["nextToken"] != null) query.set("nextToken", params["nextToken"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "ListJobTemplates",
method: "GET",
requestUri: "/job-templates",
});
return jsonP.readObj({
required: {},
optional: {
"jobTemplates": [toJobTemplateSummary],
"nextToken": "s",
},
}, await resp.json());
}
/** Lists jobs. */
async listJobs(
params: ListJobsRequest = {},
opts: client.RequestOptions = {},
): Promise<ListJobsResponse> {
const query = new URLSearchParams;
if (params["status"] != null) query.set("status", params["status"]?.toString() ?? "");
if (params["targetSelection"] != null) query.set("targetSelection", params["targetSelection"]?.toString() ?? "");
if (params["maxResults"] != null) query.set("maxResults", params["maxResults"]?.toString() ?? "");
if (params["nextToken"] != null) query.set("nextToken", params["nextToken"]?.toString() ?? "");
if (params["thingGroupName"] != null) query.set("thingGroupName", params["thingGroupName"]?.toString() ?? "");
if (params["thingGroupId"] != null) query.set("thingGroupId", params["thingGroupId"]?.toString() ?? "");
if (params["namespaceId"] != null) query.set("namespaceId", params["namespaceId"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "ListJobs",
method: "GET",
requestUri: "/jobs",
});
return jsonP.readObj({
required: {},
optional: {
"jobs": [toJobSummary],
"nextToken": "s",
},
}, await resp.json());
}
/** Returns a list of managed job templates. */
async listManagedJobTemplates(
params: ListManagedJobTemplatesRequest = {},
opts: client.RequestOptions = {},
): Promise<ListManagedJobTemplatesResponse> {
const query = new URLSearchParams;
if (params["templateName"] != null) query.set("templateName", params["templateName"]?.toString() ?? "");
if (params["maxResults"] != null) query.set("maxResults", params["maxResults"]?.toString() ?? "");
if (params["nextToken"] != null) query.set("nextToken", params["nextToken"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "ListManagedJobTemplates",
method: "GET",
requestUri: "/managed-job-templates",
});
return jsonP.readObj({
required: {},
optional: {
"managedJobTemplates": [toManagedJobTemplateSummary],
"nextToken": "s",
},
}, await resp.json());
}
/** Gets a list of all mitigation actions that match the specified filter criteria. */
async listMitigationActions(
params: ListMitigationActionsRequest = {},
opts: client.RequestOptions = {},
): Promise<ListMitigationActionsResponse> {
const query = new URLSearchParams;
if (params["actionType"] != null) query.set("actionType", params["actionType"]?.toString() ?? "");
if (params["maxResults"] != null) query.set("maxResults", params["maxResults"]?.toString() ?? "");
if (params["nextToken"] != null) query.set("nextToken", params["nextToken"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "ListMitigationActions",
method: "GET",
requestUri: "/mitigationactions/actions",
});
return jsonP.readObj({
required: {},
optional: {
"actionIdentifiers": [toMitigationActionIdentifier],
"nextToken": "s",
},
}, await resp.json());
}
/** Lists OTA updates. */
async listOTAUpdates(
params: ListOTAUpdatesRequest = {},
opts: client.RequestOptions = {},
): Promise<ListOTAUpdatesResponse> {
const query = new URLSearchParams;
if (params["maxResults"] != null) query.set("maxResults", params["maxResults"]?.toString() ?? "");
if (params["nextToken"] != null) query.set("nextToken", params["nextToken"]?.toString() ?? "");
if (params["otaUpdateStatus"] != null) query.set("otaUpdateStatus", params["otaUpdateStatus"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "ListOTAUpdates",
method: "GET",
requestUri: "/otaUpdates",
});
return jsonP.readObj({
required: {},
optional: {
"otaUpdates": [toOTAUpdateSummary],
"nextToken": "s",
},
}, await resp.json());
}
/** Lists certificates that are being transferred but not yet accepted. */
async listOutgoingCertificates(
params: ListOutgoingCertificatesRequest = {},
opts: client.RequestOptions = {},
): Promise<ListOutgoingCertificatesResponse> {
const query = new URLSearchParams;
if (params["pageSize"] != null) query.set("pageSize", params["pageSize"]?.toString() ?? "");
if (params["marker"] != null) query.set("marker", params["marker"]?.toString() ?? "");
if (params["ascendingOrder"] != null) query.set("isAscendingOrder", params["ascendingOrder"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "ListOutgoingCertificates",
method: "GET",
requestUri: "/certificates-out-going",
});
return jsonP.readObj({
required: {},
optional: {
"outgoingCertificates": [toOutgoingCertificate],
"nextMarker": "s",
},
}, await resp.json());
}
/** Lists your policies. */
async listPolicies(
params: ListPoliciesRequest = {},
opts: client.RequestOptions = {},
): Promise<ListPoliciesResponse> {
const query = new URLSearchParams;
if (params["marker"] != null) query.set("marker", params["marker"]?.toString() ?? "");
if (params["pageSize"] != null) query.set("pageSize", params["pageSize"]?.toString() ?? "");
if (params["ascendingOrder"] != null) query.set("isAscendingOrder", params["ascendingOrder"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "ListPolicies",
method: "GET",
requestUri: "/policies",
});
return jsonP.readObj({
required: {},
optional: {
"policies": [toPolicy],
"nextMarker": "s",
},
}, await resp.json());
}
/** Lists the principals associated with the specified policy. */
async listPolicyPrincipals(
params: ListPolicyPrincipalsRequest,
opts: client.RequestOptions = {},
): Promise<ListPolicyPrincipalsResponse> {
const headers = new Headers;
const query = new URLSearchParams;
headers.append("x-amzn-iot-policy", params["policyName"]);
if (params["marker"] != null) query.set("marker", params["marker"]?.toString() ?? "");
if (params["pageSize"] != null) query.set("pageSize", params["pageSize"]?.toString() ?? "");
if (params["ascendingOrder"] != null) query.set("isAscendingOrder", params["ascendingOrder"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, headers, query,
action: "ListPolicyPrincipals",
method: "GET",
requestUri: "/policy-principals",
});
return jsonP.readObj({
required: {},
optional: {
"principals": ["s"],
"nextMarker": "s",
},
}, await resp.json());
}
/** Lists the versions of the specified policy and identifies the default version. */
async listPolicyVersions(
params: ListPolicyVersionsRequest,
opts: client.RequestOptions = {},
): Promise<ListPolicyVersionsResponse> {
const resp = await this.#client.performRequest({
opts,
action: "ListPolicyVersions",
method: "GET",
requestUri: cmnP.encodePath`/policies/${params["policyName"]}/version`,
});
return jsonP.readObj({
required: {},
optional: {
"policyVersions": [toPolicyVersion],
},
}, await resp.json());
}
/** Lists the policies attached to the specified principal. */
async listPrincipalPolicies(
params: ListPrincipalPoliciesRequest,
opts: client.RequestOptions = {},
): Promise<ListPrincipalPoliciesResponse> {
const headers = new Headers;
const query = new URLSearchParams;
headers.append("x-amzn-iot-principal", params["principal"]);
if (params["marker"] != null) query.set("marker", params["marker"]?.toString() ?? "");
if (params["pageSize"] != null) query.set("pageSize", params["pageSize"]?.toString() ?? "");
if (params["ascendingOrder"] != null) query.set("isAscendingOrder", params["ascendingOrder"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, headers, query,
action: "ListPrincipalPolicies",
method: "GET",
requestUri: "/principal-policies",
});
return jsonP.readObj({
required: {},
optional: {
"policies": [toPolicy],
"nextMarker": "s",
},
}, await resp.json());
}
/** Lists the things associated with the specified principal. */
async listPrincipalThings(
params: ListPrincipalThingsRequest,
opts: client.RequestOptions = {},
): Promise<ListPrincipalThingsResponse> {
const headers = new Headers;
const query = new URLSearchParams;
if (params["nextToken"] != null) query.set("nextToken", params["nextToken"]?.toString() ?? "");
if (params["maxResults"] != null) query.set("maxResults", params["maxResults"]?.toString() ?? "");
headers.append("x-amzn-principal", params["principal"]);
const resp = await this.#client.performRequest({
opts, headers, query,
action: "ListPrincipalThings",
method: "GET",
requestUri: "/principals/things",
});
return jsonP.readObj({
required: {},
optional: {
"things": ["s"],
"nextToken": "s",
},
}, await resp.json());
}
/** A list of fleet provisioning template versions. */
async listProvisioningTemplateVersions(
params: ListProvisioningTemplateVersionsRequest,
opts: client.RequestOptions = {},
): Promise<ListProvisioningTemplateVersionsResponse> {
const query = new URLSearchParams;
if (params["maxResults"] != null) query.set("maxResults", params["maxResults"]?.toString() ?? "");
if (params["nextToken"] != null) query.set("nextToken", params["nextToken"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "ListProvisioningTemplateVersions",
method: "GET",
requestUri: cmnP.encodePath`/provisioning-templates/${params["templateName"]}/versions`,
});
return jsonP.readObj({
required: {},
optional: {
"versions": [toProvisioningTemplateVersionSummary],
"nextToken": "s",
},
}, await resp.json());
}
/** Lists the fleet provisioning templates in your Amazon Web Services account. */
async listProvisioningTemplates(
params: ListProvisioningTemplatesRequest = {},
opts: client.RequestOptions = {},
): Promise<ListProvisioningTemplatesResponse> {
const query = new URLSearchParams;
if (params["maxResults"] != null) query.set("maxResults", params["maxResults"]?.toString() ?? "");
if (params["nextToken"] != null) query.set("nextToken", params["nextToken"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "ListProvisioningTemplates",
method: "GET",
requestUri: "/provisioning-templates",
});
return jsonP.readObj({
required: {},
optional: {
"templates": [toProvisioningTemplateSummary],
"nextToken": "s",
},
}, await resp.json());
}
/** Lists the role aliases registered in your account. */
async listRoleAliases(
params: ListRoleAliasesRequest = {},
opts: client.RequestOptions = {},
): Promise<ListRoleAliasesResponse> {
const query = new URLSearchParams;
if (params["pageSize"] != null) query.set("pageSize", params["pageSize"]?.toString() ?? "");
if (params["marker"] != null) query.set("marker", params["marker"]?.toString() ?? "");
if (params["ascendingOrder"] != null) query.set("isAscendingOrder", params["ascendingOrder"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "ListRoleAliases",
method: "GET",
requestUri: "/role-aliases",
});
return jsonP.readObj({
required: {},
optional: {
"roleAliases": ["s"],
"nextMarker": "s",
},
}, await resp.json());
}
/** Lists all of your scheduled audits. */
async listScheduledAudits(
params: ListScheduledAuditsRequest = {},
opts: client.RequestOptions = {},
): Promise<ListScheduledAuditsResponse> {
const query = new URLSearchParams;
if (params["nextToken"] != null) query.set("nextToken", params["nextToken"]?.toString() ?? "");
if (params["maxResults"] != null) query.set("maxResults", params["maxResults"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "ListScheduledAudits",
method: "GET",
requestUri: "/audit/scheduledaudits",
});
return jsonP.readObj({
required: {},
optional: {
"scheduledAudits": [toScheduledAuditMetadata],
"nextToken": "s",
},
}, await resp.json());
}
/** Lists the Device Defender security profiles you've created. */
async listSecurityProfiles(
params: ListSecurityProfilesRequest = {},
opts: client.RequestOptions = {},
): Promise<ListSecurityProfilesResponse> {
const query = new URLSearchParams;
if (params["nextToken"] != null) query.set("nextToken", params["nextToken"]?.toString() ?? "");
if (params["maxResults"] != null) query.set("maxResults", params["maxResults"]?.toString() ?? "");
if (params["dimensionName"] != null) query.set("dimensionName", params["dimensionName"]?.toString() ?? "");
if (params["metricName"] != null) query.set("metricName", params["metricName"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "ListSecurityProfiles",
method: "GET",
requestUri: "/security-profiles",
});
return jsonP.readObj({
required: {},
optional: {
"securityProfileIdentifiers": [toSecurityProfileIdentifier],
"nextToken": "s",
},
}, await resp.json());
}
/** Lists the Device Defender security profiles attached to a target (thing group). */
async listSecurityProfilesForTarget(
params: ListSecurityProfilesForTargetRequest,
opts: client.RequestOptions = {},
): Promise<ListSecurityProfilesForTargetResponse> {
const query = new URLSearchParams;
if (params["nextToken"] != null) query.set("nextToken", params["nextToken"]?.toString() ?? "");
if (params["maxResults"] != null) query.set("maxResults", params["maxResults"]?.toString() ?? "");
if (params["recursive"] != null) query.set("recursive", params["recursive"]?.toString() ?? "");
query.set("securityProfileTargetArn", params["securityProfileTargetArn"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "ListSecurityProfilesForTarget",
method: "GET",
requestUri: "/security-profiles-for-target",
});
return jsonP.readObj({
required: {},
optional: {
"securityProfileTargetMappings": [toSecurityProfileTargetMapping],
"nextToken": "s",
},
}, await resp.json());
}
/** Lists all of the streams in your Amazon Web Services account. */
async listStreams(
params: ListStreamsRequest = {},
opts: client.RequestOptions = {},
): Promise<ListStreamsResponse> {
const query = new URLSearchParams;
if (params["maxResults"] != null) query.set("maxResults", params["maxResults"]?.toString() ?? "");
if (params["nextToken"] != null) query.set("nextToken", params["nextToken"]?.toString() ?? "");
if (params["ascendingOrder"] != null) query.set("isAscendingOrder", params["ascendingOrder"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "ListStreams",
method: "GET",
requestUri: "/streams",
});
return jsonP.readObj({
required: {},
optional: {
"streams": [toStreamSummary],
"nextToken": "s",
},
}, await resp.json());
}
/** Lists the tags (metadata) you have assigned to the resource. */
async listTagsForResource(
params: ListTagsForResourceRequest,
opts: client.RequestOptions = {},
): Promise<ListTagsForResourceResponse> {
const query = new URLSearchParams;
query.set("resourceArn", params["resourceArn"]?.toString() ?? "");
if (params["nextToken"] != null) query.set("nextToken", params["nextToken"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "ListTagsForResource",
method: "GET",
requestUri: "/tags",
});
return jsonP.readObj({
required: {},
optional: {
"tags": [toTag],
"nextToken": "s",
},
}, await resp.json());
}
/** List targets for the specified policy. */
async listTargetsForPolicy(
params: ListTargetsForPolicyRequest,
opts: client.RequestOptions = {},
): Promise<ListTargetsForPolicyResponse> {
const query = new URLSearchParams;
if (params["marker"] != null) query.set("marker", params["marker"]?.toString() ?? "");
if (params["pageSize"] != null) query.set("pageSize", params["pageSize"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "ListTargetsForPolicy",
requestUri: cmnP.encodePath`/policy-targets/${params["policyName"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"targets": ["s"],
"nextMarker": "s",
},
}, await resp.json());
}
/** Lists the targets (thing groups) associated with a given Device Defender security profile. */
async listTargetsForSecurityProfile(
params: ListTargetsForSecurityProfileRequest,
opts: client.RequestOptions = {},
): Promise<ListTargetsForSecurityProfileResponse> {
const query = new URLSearchParams;
if (params["nextToken"] != null) query.set("nextToken", params["nextToken"]?.toString() ?? "");
if (params["maxResults"] != null) query.set("maxResults", params["maxResults"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "ListTargetsForSecurityProfile",
method: "GET",
requestUri: cmnP.encodePath`/security-profiles/${params["securityProfileName"]}/targets`,
});
return jsonP.readObj({
required: {},
optional: {
"securityProfileTargets": [toSecurityProfileTarget],
"nextToken": "s",
},
}, await resp.json());
}
/** List the thing groups in your account. */
async listThingGroups(
params: ListThingGroupsRequest = {},
opts: client.RequestOptions = {},
): Promise<ListThingGroupsResponse> {
const query = new URLSearchParams;
if (params["nextToken"] != null) query.set("nextToken", params["nextToken"]?.toString() ?? "");
if (params["maxResults"] != null) query.set("maxResults", params["maxResults"]?.toString() ?? "");
if (params["parentGroup"] != null) query.set("parentGroup", params["parentGroup"]?.toString() ?? "");
if (params["namePrefixFilter"] != null) query.set("namePrefixFilter", params["namePrefixFilter"]?.toString() ?? "");
if (params["recursive"] != null) query.set("recursive", params["recursive"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "ListThingGroups",
method: "GET",
requestUri: "/thing-groups",
});
return jsonP.readObj({
required: {},
optional: {
"thingGroups": [toGroupNameAndArn],
"nextToken": "s",
},
}, await resp.json());
}
/** List the thing groups to which the specified thing belongs. */
async listThingGroupsForThing(
params: ListThingGroupsForThingRequest,
opts: client.RequestOptions = {},
): Promise<ListThingGroupsForThingResponse> {
const query = new URLSearchParams;
if (params["nextToken"] != null) query.set("nextToken", params["nextToken"]?.toString() ?? "");
if (params["maxResults"] != null) query.set("maxResults", params["maxResults"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "ListThingGroupsForThing",
method: "GET",
requestUri: cmnP.encodePath`/things/${params["thingName"]}/thing-groups`,
});
return jsonP.readObj({
required: {},
optional: {
"thingGroups": [toGroupNameAndArn],
"nextToken": "s",
},
}, await resp.json());
}
/** Lists the principals associated with the specified thing. */
async listThingPrincipals(
params: ListThingPrincipalsRequest,
opts: client.RequestOptions = {},
): Promise<ListThingPrincipalsResponse> {
const query = new URLSearchParams;
if (params["nextToken"] != null) query.set("nextToken", params["nextToken"]?.toString() ?? "");
if (params["maxResults"] != null) query.set("maxResults", params["maxResults"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "ListThingPrincipals",
method: "GET",
requestUri: cmnP.encodePath`/things/${params["thingName"]}/principals`,
});
return jsonP.readObj({
required: {},
optional: {
"principals": ["s"],
"nextToken": "s",
},
}, await resp.json());
}
/** Information about the thing registration tasks. */
async listThingRegistrationTaskReports(
params: ListThingRegistrationTaskReportsRequest,
opts: client.RequestOptions = {},
): Promise<ListThingRegistrationTaskReportsResponse> {
const query = new URLSearchParams;
query.set("reportType", params["reportType"]?.toString() ?? "");
if (params["nextToken"] != null) query.set("nextToken", params["nextToken"]?.toString() ?? "");
if (params["maxResults"] != null) query.set("maxResults", params["maxResults"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "ListThingRegistrationTaskReports",
method: "GET",
requestUri: cmnP.encodePath`/thing-registration-tasks/${params["taskId"]}/reports`,
});
return jsonP.readObj({
required: {},
optional: {
"resourceLinks": ["s"],
"reportType": (x: jsonP.JSONValue) => cmnP.readEnum<ReportType>(x),
"nextToken": "s",
},
}, await resp.json());
}
/** List bulk thing provisioning tasks. */
async listThingRegistrationTasks(
params: ListThingRegistrationTasksRequest = {},
opts: client.RequestOptions = {},
): Promise<ListThingRegistrationTasksResponse> {
const query = new URLSearchParams;
if (params["nextToken"] != null) query.set("nextToken", params["nextToken"]?.toString() ?? "");
if (params["maxResults"] != null) query.set("maxResults", params["maxResults"]?.toString() ?? "");
if (params["status"] != null) query.set("status", params["status"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "ListThingRegistrationTasks",
method: "GET",
requestUri: "/thing-registration-tasks",
});
return jsonP.readObj({
required: {},
optional: {
"taskIds": ["s"],
"nextToken": "s",
},
}, await resp.json());
}
/** Lists the existing thing types. */
async listThingTypes(
params: ListThingTypesRequest = {},
opts: client.RequestOptions = {},
): Promise<ListThingTypesResponse> {
const query = new URLSearchParams;
if (params["nextToken"] != null) query.set("nextToken", params["nextToken"]?.toString() ?? "");
if (params["maxResults"] != null) query.set("maxResults", params["maxResults"]?.toString() ?? "");
if (params["thingTypeName"] != null) query.set("thingTypeName", params["thingTypeName"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "ListThingTypes",
method: "GET",
requestUri: "/thing-types",
});
return jsonP.readObj({
required: {},
optional: {
"thingTypes": [toThingTypeDefinition],
"nextToken": "s",
},
}, await resp.json());
}
/** Lists your things. */
async listThings(
params: ListThingsRequest = {},
opts: client.RequestOptions = {},
): Promise<ListThingsResponse> {
const query = new URLSearchParams;
if (params["nextToken"] != null) query.set("nextToken", params["nextToken"]?.toString() ?? "");
if (params["maxResults"] != null) query.set("maxResults", params["maxResults"]?.toString() ?? "");
if (params["attributeName"] != null) query.set("attributeName", params["attributeName"]?.toString() ?? "");
if (params["attributeValue"] != null) query.set("attributeValue", params["attributeValue"]?.toString() ?? "");
if (params["thingTypeName"] != null) query.set("thingTypeName", params["thingTypeName"]?.toString() ?? "");
if (params["usePrefixAttributeValue"] != null) query.set("usePrefixAttributeValue", params["usePrefixAttributeValue"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "ListThings",
method: "GET",
requestUri: "/things",
});
return jsonP.readObj({
required: {},
optional: {
"things": [toThingAttribute],
"nextToken": "s",
},
}, await resp.json());
}
/** Lists the things you have added to the given billing group. */
async listThingsInBillingGroup(
params: ListThingsInBillingGroupRequest,
opts: client.RequestOptions = {},
): Promise<ListThingsInBillingGroupResponse> {
const query = new URLSearchParams;
if (params["nextToken"] != null) query.set("nextToken", params["nextToken"]?.toString() ?? "");
if (params["maxResults"] != null) query.set("maxResults", params["maxResults"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "ListThingsInBillingGroup",
method: "GET",
requestUri: cmnP.encodePath`/billing-groups/${params["billingGroupName"]}/things`,
});
return jsonP.readObj({
required: {},
optional: {
"things": ["s"],
"nextToken": "s",
},
}, await resp.json());
}
/** Lists the things in the specified group. */
async listThingsInThingGroup(
params: ListThingsInThingGroupRequest,
opts: client.RequestOptions = {},
): Promise<ListThingsInThingGroupResponse> {
const query = new URLSearchParams;
if (params["recursive"] != null) query.set("recursive", params["recursive"]?.toString() ?? "");
if (params["nextToken"] != null) query.set("nextToken", params["nextToken"]?.toString() ?? "");
if (params["maxResults"] != null) query.set("maxResults", params["maxResults"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "ListThingsInThingGroup",
method: "GET",
requestUri: cmnP.encodePath`/thing-groups/${params["thingGroupName"]}/things`,
});
return jsonP.readObj({
required: {},
optional: {
"things": ["s"],
"nextToken": "s",
},
}, await resp.json());
}
/** Lists all the topic rule destinations in your Amazon Web Services account. */
async listTopicRuleDestinations(
params: ListTopicRuleDestinationsRequest = {},
opts: client.RequestOptions = {},
): Promise<ListTopicRuleDestinationsResponse> {
const query = new URLSearchParams;
if (params["maxResults"] != null) query.set("maxResults", params["maxResults"]?.toString() ?? "");
if (params["nextToken"] != null) query.set("nextToken", params["nextToken"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "ListTopicRuleDestinations",
method: "GET",
requestUri: "/destinations",
});
return jsonP.readObj({
required: {},
optional: {
"destinationSummaries": [toTopicRuleDestinationSummary],
"nextToken": "s",
},
}, await resp.json());
}
/** Lists the rules for the specific topic. */
async listTopicRules(
params: ListTopicRulesRequest = {},
opts: client.RequestOptions = {},
): Promise<ListTopicRulesResponse> {
const query = new URLSearchParams;
if (params["topic"] != null) query.set("topic", params["topic"]?.toString() ?? "");
if (params["maxResults"] != null) query.set("maxResults", params["maxResults"]?.toString() ?? "");
if (params["nextToken"] != null) query.set("nextToken", params["nextToken"]?.toString() ?? "");
if (params["ruleDisabled"] != null) query.set("ruleDisabled", params["ruleDisabled"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "ListTopicRules",
method: "GET",
requestUri: "/rules",
});
return jsonP.readObj({
required: {},
optional: {
"rules": [toTopicRuleListItem],
"nextToken": "s",
},
}, await resp.json());
}
/** Lists logging levels. */
async listV2LoggingLevels(
params: ListV2LoggingLevelsRequest = {},
opts: client.RequestOptions = {},
): Promise<ListV2LoggingLevelsResponse> {
const query = new URLSearchParams;
if (params["targetType"] != null) query.set("targetType", params["targetType"]?.toString() ?? "");
if (params["nextToken"] != null) query.set("nextToken", params["nextToken"]?.toString() ?? "");
if (params["maxResults"] != null) query.set("maxResults", params["maxResults"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "ListV2LoggingLevels",
method: "GET",
requestUri: "/v2LoggingLevel",
});
return jsonP.readObj({
required: {},
optional: {
"logTargetConfigurations": [toLogTargetConfiguration],
"nextToken": "s",
},
}, await resp.json());
}
/** Lists the Device Defender security profile violations discovered during the given time period. */
async listViolationEvents(
params: ListViolationEventsRequest,
opts: client.RequestOptions = {},
): Promise<ListViolationEventsResponse> {
const query = new URLSearchParams;
query.set("startTime", cmnP.serializeDate_iso8601(params["startTime"]) ?? "");
query.set("endTime", cmnP.serializeDate_iso8601(params["endTime"]) ?? "");
if (params["thingName"] != null) query.set("thingName", params["thingName"]?.toString() ?? "");
if (params["securityProfileName"] != null) query.set("securityProfileName", params["securityProfileName"]?.toString() ?? "");
if (params["behaviorCriteriaType"] != null) query.set("behaviorCriteriaType", params["behaviorCriteriaType"]?.toString() ?? "");
if (params["listSuppressedAlerts"] != null) query.set("listSuppressedAlerts", params["listSuppressedAlerts"]?.toString() ?? "");
if (params["verificationState"] != null) query.set("verificationState", params["verificationState"]?.toString() ?? "");
if (params["nextToken"] != null) query.set("nextToken", params["nextToken"]?.toString() ?? "");
if (params["maxResults"] != null) query.set("maxResults", params["maxResults"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "ListViolationEvents",
method: "GET",
requestUri: "/violation-events",
});
return jsonP.readObj({
required: {},
optional: {
"violationEvents": [toViolationEvent],
"nextToken": "s",
},
}, await resp.json());
}
/** Set a verification state and provide a description of that verification state on a violation (detect alarm). */
async putVerificationStateOnViolation(
params: PutVerificationStateOnViolationRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const body: jsonP.JSONObject = {
verificationState: params["verificationState"],
verificationStateDescription: params["verificationStateDescription"],
};
const resp = await this.#client.performRequest({
opts, body,
action: "PutVerificationStateOnViolation",
requestUri: cmnP.encodePath`/violations/verification-state/${params["violationId"]}`,
});
await resp.body?.cancel();
}
/** Registers a CA certificate with IoT. */
async registerCACertificate(
params: RegisterCACertificateRequest,
opts: client.RequestOptions = {},
): Promise<RegisterCACertificateResponse> {
const query = new URLSearchParams;
const body: jsonP.JSONObject = {
caCertificate: params["caCertificate"],
verificationCertificate: params["verificationCertificate"],
registrationConfig: fromRegistrationConfig(params["registrationConfig"]),
tags: params["tags"]?.map(x => fromTag(x)),
};
if (params["setAsActive"] != null) query.set("setAsActive", params["setAsActive"]?.toString() ?? "");
if (params["allowAutoRegistration"] != null) query.set("allowAutoRegistration", params["allowAutoRegistration"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query, body,
action: "RegisterCACertificate",
requestUri: "/cacertificate",
});
return jsonP.readObj({
required: {},
optional: {
"certificateArn": "s",
"certificateId": "s",
},
}, await resp.json());
}
/** Registers a device certificate with IoT. */
async registerCertificate(
params: RegisterCertificateRequest,
opts: client.RequestOptions = {},
): Promise<RegisterCertificateResponse> {
const query = new URLSearchParams;
const body: jsonP.JSONObject = {
certificatePem: params["certificatePem"],
caCertificatePem: params["caCertificatePem"],
status: params["status"],
};
if (params["setAsActive"] != null) query.set("setAsActive", params["setAsActive"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query, body,
action: "RegisterCertificate",
requestUri: "/certificate/register",
});
return jsonP.readObj({
required: {},
optional: {
"certificateArn": "s",
"certificateId": "s",
},
}, await resp.json());
}
/** Register a certificate that does not have a certificate authority (CA). */
async registerCertificateWithoutCA(
params: RegisterCertificateWithoutCARequest,
opts: client.RequestOptions = {},
): Promise<RegisterCertificateWithoutCAResponse> {
const body: jsonP.JSONObject = {
certificatePem: params["certificatePem"],
status: params["status"],
};
const resp = await this.#client.performRequest({
opts, body,
action: "RegisterCertificateWithoutCA",
requestUri: "/certificate/register-no-ca",
});
return jsonP.readObj({
required: {},
optional: {
"certificateArn": "s",
"certificateId": "s",
},
}, await resp.json());
}
/** Provisions a thing in the device registry. */
async registerThing(
params: RegisterThingRequest,
opts: client.RequestOptions = {},
): Promise<RegisterThingResponse> {
const body: jsonP.JSONObject = {
templateBody: params["templateBody"],
parameters: params["parameters"],
};
const resp = await this.#client.performRequest({
opts, body,
action: "RegisterThing",
requestUri: "/things",
});
return jsonP.readObj({
required: {},
optional: {
"certificatePem": "s",
"resourceArns": x => jsonP.readMap(String, String, x),
},
}, await resp.json());
}
/** Rejects a pending certificate transfer. */
async rejectCertificateTransfer(
params: RejectCertificateTransferRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const body: jsonP.JSONObject = {
rejectReason: params["rejectReason"],
};
const resp = await this.#client.performRequest({
opts, body,
action: "RejectCertificateTransfer",
method: "PATCH",
requestUri: cmnP.encodePath`/reject-certificate-transfer/${params["certificateId"]}`,
});
await resp.body?.cancel();
}
/** Removes the given thing from the billing group. */
async removeThingFromBillingGroup(
params: RemoveThingFromBillingGroupRequest = {},
opts: client.RequestOptions = {},
): Promise<void> {
const body: jsonP.JSONObject = {
billingGroupName: params["billingGroupName"],
billingGroupArn: params["billingGroupArn"],
thingName: params["thingName"],
thingArn: params["thingArn"],
};
const resp = await this.#client.performRequest({
opts, body,
action: "RemoveThingFromBillingGroup",
method: "PUT",
requestUri: "/billing-groups/removeThingFromBillingGroup",
});
await resp.body?.cancel();
}
/** Remove the specified thing from the specified group. */
async removeThingFromThingGroup(
params: RemoveThingFromThingGroupRequest = {},
opts: client.RequestOptions = {},
): Promise<void> {
const body: jsonP.JSONObject = {
thingGroupName: params["thingGroupName"],
thingGroupArn: params["thingGroupArn"],
thingName: params["thingName"],
thingArn: params["thingArn"],
};
const resp = await this.#client.performRequest({
opts, body,
action: "RemoveThingFromThingGroup",
method: "PUT",
requestUri: "/thing-groups/removeThingFromThingGroup",
});
await resp.body?.cancel();
}
/** Replaces the rule. */
async replaceTopicRule(
params: ReplaceTopicRuleRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const inner = params["topicRulePayload"];
const body: jsonP.JSONObject = inner ? {
sql: inner["sql"],
description: inner["description"],
actions: inner["actions"]?.map(x => fromAction(x)),
ruleDisabled: inner["ruleDisabled"],
awsIotSqlVersion: inner["awsIotSqlVersion"],
errorAction: fromAction(inner["errorAction"]),
} : {};
const resp = await this.#client.performRequest({
opts, body,
action: "ReplaceTopicRule",
method: "PATCH",
requestUri: cmnP.encodePath`/rules/${params["ruleName"]}`,
});
await resp.body?.cancel();
}
/** The query search index. */
async searchIndex(
params: SearchIndexRequest,
opts: client.RequestOptions = {},
): Promise<SearchIndexResponse> {
const body: jsonP.JSONObject = {
indexName: params["indexName"],
queryString: params["queryString"],
nextToken: params["nextToken"],
maxResults: params["maxResults"],
queryVersion: params["queryVersion"],
};
const resp = await this.#client.performRequest({
opts, body,
action: "SearchIndex",
requestUri: "/indices/search",
});
return jsonP.readObj({
required: {},
optional: {
"nextToken": "s",
"things": [toThingDocument],
"thingGroups": [toThingGroupDocument],
},
}, await resp.json());
}
/** Sets the default authorizer. */
async setDefaultAuthorizer(
params: SetDefaultAuthorizerRequest,
opts: client.RequestOptions = {},
): Promise<SetDefaultAuthorizerResponse> {
const body: jsonP.JSONObject = {
authorizerName: params["authorizerName"],
};
const resp = await this.#client.performRequest({
opts, body,
action: "SetDefaultAuthorizer",
requestUri: "/default-authorizer",
});
return jsonP.readObj({
required: {},
optional: {
"authorizerName": "s",
"authorizerArn": "s",
},
}, await resp.json());
}
/** Sets the specified version of the specified policy as the policy's default (operative) version. */
async setDefaultPolicyVersion(
params: SetDefaultPolicyVersionRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const resp = await this.#client.performRequest({
opts,
action: "SetDefaultPolicyVersion",
method: "PATCH",
requestUri: cmnP.encodePath`/policies/${params["policyName"]}/version/${params["policyVersionId"]}`,
});
await resp.body?.cancel();
}
/** Sets the logging options. */
async setLoggingOptions(
params: SetLoggingOptionsRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const inner = params["loggingOptionsPayload"];
const body: jsonP.JSONObject = inner ? {
roleArn: inner["roleArn"],
logLevel: inner["logLevel"],
} : {};
const resp = await this.#client.performRequest({
opts, body,
action: "SetLoggingOptions",
requestUri: "/loggingOptions",
});
await resp.body?.cancel();
}
/** Sets the logging level. */
async setV2LoggingLevel(
params: SetV2LoggingLevelRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const body: jsonP.JSONObject = {
logTarget: fromLogTarget(params["logTarget"]),
logLevel: params["logLevel"],
};
const resp = await this.#client.performRequest({
opts, body,
action: "SetV2LoggingLevel",
requestUri: "/v2LoggingLevel",
});
await resp.body?.cancel();
}
/** Sets the logging options for the V2 logging service. */
async setV2LoggingOptions(
params: SetV2LoggingOptionsRequest = {},
opts: client.RequestOptions = {},
): Promise<void> {
const body: jsonP.JSONObject = {
roleArn: params["roleArn"],
defaultLogLevel: params["defaultLogLevel"],
disableAllLogs: params["disableAllLogs"],
};
const resp = await this.#client.performRequest({
opts, body,
action: "SetV2LoggingOptions",
requestUri: "/v2LoggingOptions",
});
await resp.body?.cancel();
}
/** Starts a task that applies a set of mitigation actions to the specified target. */
async startAuditMitigationActionsTask(
params: StartAuditMitigationActionsTaskRequest,
opts: client.RequestOptions = {},
): Promise<StartAuditMitigationActionsTaskResponse> {
const body: jsonP.JSONObject = {
target: fromAuditMitigationActionsTaskTarget(params["target"]),
auditCheckToActionsMapping: params["auditCheckToActionsMapping"],
clientRequestToken: params["clientRequestToken"] ?? generateIdemptToken(),
};
const resp = await this.#client.performRequest({
opts, body,
action: "StartAuditMitigationActionsTask",
requestUri: cmnP.encodePath`/audit/mitigationactions/tasks/${params["taskId"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"taskId": "s",
},
}, await resp.json());
}
/** Starts a Device Defender ML Detect mitigation actions task. */
async startDetectMitigationActionsTask(
params: StartDetectMitigationActionsTaskRequest,
opts: client.RequestOptions = {},
): Promise<StartDetectMitigationActionsTaskResponse> {
const body: jsonP.JSONObject = {
target: fromDetectMitigationActionsTaskTarget(params["target"]),
actions: params["actions"],
violationEventOccurrenceRange: fromViolationEventOccurrenceRange(params["violationEventOccurrenceRange"]),
includeOnlyActiveViolations: params["includeOnlyActiveViolations"],
includeSuppressedAlerts: params["includeSuppressedAlerts"],
clientRequestToken: params["clientRequestToken"] ?? generateIdemptToken(),
};
const resp = await this.#client.performRequest({
opts, body,
action: "StartDetectMitigationActionsTask",
method: "PUT",
requestUri: cmnP.encodePath`/detect/mitigationactions/tasks/${params["taskId"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"taskId": "s",
},
}, await resp.json());
}
/** Starts an on-demand Device Defender audit. */
async startOnDemandAuditTask(
params: StartOnDemandAuditTaskRequest,
opts: client.RequestOptions = {},
): Promise<StartOnDemandAuditTaskResponse> {
const body: jsonP.JSONObject = {
targetCheckNames: params["targetCheckNames"],
};
const resp = await this.#client.performRequest({
opts, body,
action: "StartOnDemandAuditTask",
requestUri: "/audit/tasks",
});
return jsonP.readObj({
required: {},
optional: {
"taskId": "s",
},
}, await resp.json());
}
/** Creates a bulk thing provisioning task. */
async startThingRegistrationTask(
params: StartThingRegistrationTaskRequest,
opts: client.RequestOptions = {},
): Promise<StartThingRegistrationTaskResponse> {
const body: jsonP.JSONObject = {
templateBody: params["templateBody"],
inputFileBucket: params["inputFileBucket"],
inputFileKey: params["inputFileKey"],
roleArn: params["roleArn"],
};
const resp = await this.#client.performRequest({
opts, body,
action: "StartThingRegistrationTask",
requestUri: "/thing-registration-tasks",
});
return jsonP.readObj({
required: {},
optional: {
"taskId": "s",
},
}, await resp.json());
}
/** Cancels a bulk thing provisioning task. */
async stopThingRegistrationTask(
params: StopThingRegistrationTaskRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const resp = await this.#client.performRequest({
opts,
action: "StopThingRegistrationTask",
method: "PUT",
requestUri: cmnP.encodePath`/thing-registration-tasks/${params["taskId"]}/cancel`,
});
await resp.body?.cancel();
}
/** Adds to or modifies the tags of the given resource. */
async tagResource(
params: TagResourceRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const body: jsonP.JSONObject = {
resourceArn: params["resourceArn"],
tags: params["tags"]?.map(x => fromTag(x)),
};
const resp = await this.#client.performRequest({
opts, body,
action: "TagResource",
requestUri: "/tags",
});
await resp.body?.cancel();
}
/** Tests if a specified principal is authorized to perform an IoT action on a specified resource. */
async testAuthorization(
params: TestAuthorizationRequest,
opts: client.RequestOptions = {},
): Promise<TestAuthorizationResponse> {
const query = new URLSearchParams;
const body: jsonP.JSONObject = {
principal: params["principal"],
cognitoIdentityPoolId: params["cognitoIdentityPoolId"],
authInfos: params["authInfos"]?.map(x => fromAuthInfo(x)),
policyNamesToAdd: params["policyNamesToAdd"],
policyNamesToSkip: params["policyNamesToSkip"],
};
if (params["clientId"] != null) query.set("clientId", params["clientId"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query, body,
action: "TestAuthorization",
requestUri: "/test-authorization",
});
return jsonP.readObj({
required: {},
optional: {
"authResults": [toAuthResult],
},
}, await resp.json());
}
/** Tests a custom authorization behavior by invoking a specified custom authorizer. */
async testInvokeAuthorizer(
params: TestInvokeAuthorizerRequest,
opts: client.RequestOptions = {},
): Promise<TestInvokeAuthorizerResponse> {
const body: jsonP.JSONObject = {
token: params["token"],
tokenSignature: params["tokenSignature"],
httpContext: fromHttpContext(params["httpContext"]),
mqttContext: fromMqttContext(params["mqttContext"]),
tlsContext: fromTlsContext(params["tlsContext"]),
};
const resp = await this.#client.performRequest({
opts, body,
action: "TestInvokeAuthorizer",
requestUri: cmnP.encodePath`/authorizer/${params["authorizerName"]}/test`,
});
return jsonP.readObj({
required: {},
optional: {
"isAuthenticated": "b",
"principalId": "s",
"policyDocuments": ["s"],
"refreshAfterInSeconds": "n",
"disconnectAfterInSeconds": "n",
},
}, await resp.json());
}
/** Transfers the specified certificate to the specified Amazon Web Services account. */
async transferCertificate(
params: TransferCertificateRequest,
opts: client.RequestOptions = {},
): Promise<TransferCertificateResponse> {
const query = new URLSearchParams;
const body: jsonP.JSONObject = {
transferMessage: params["transferMessage"],
};
query.set("targetAwsAccount", params["targetAwsAccount"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query, body,
action: "TransferCertificate",
method: "PATCH",
requestUri: cmnP.encodePath`/transfer-certificate/${params["certificateId"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"transferredCertificateArn": "s",
},
}, await resp.json());
}
/** Removes the given tags (metadata) from the resource. */
async untagResource(
params: UntagResourceRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const body: jsonP.JSONObject = {
resourceArn: params["resourceArn"],
tagKeys: params["tagKeys"],
};
const resp = await this.#client.performRequest({
opts, body,
action: "UntagResource",
requestUri: "/untag",
});
await resp.body?.cancel();
}
/** Configures or reconfigures the Device Defender audit settings for this account. */
async updateAccountAuditConfiguration(
params: UpdateAccountAuditConfigurationRequest = {},
opts: client.RequestOptions = {},
): Promise<void> {
const body: jsonP.JSONObject = {
roleArn: params["roleArn"],
auditNotificationTargetConfigurations: jsonP.serializeMap(params["auditNotificationTargetConfigurations"], x => fromAuditNotificationTarget(x)),
auditCheckConfigurations: jsonP.serializeMap(params["auditCheckConfigurations"], x => fromAuditCheckConfiguration(x)),
};
const resp = await this.#client.performRequest({
opts, body,
action: "UpdateAccountAuditConfiguration",
method: "PATCH",
requestUri: "/audit/configuration",
});
await resp.body?.cancel();
}
/** Updates a Device Defender audit suppression. */
async updateAuditSuppression(
params: UpdateAuditSuppressionRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const body: jsonP.JSONObject = {
checkName: params["checkName"],
resourceIdentifier: fromResourceIdentifier(params["resourceIdentifier"]),
expirationDate: jsonP.serializeDate_unixTimestamp(params["expirationDate"]),
suppressIndefinitely: params["suppressIndefinitely"],
description: params["description"],
};
const resp = await this.#client.performRequest({
opts, body,
action: "UpdateAuditSuppression",
method: "PATCH",
requestUri: "/audit/suppressions/update",
});
await resp.body?.cancel();
}
/** Updates an authorizer. */
async updateAuthorizer(
params: UpdateAuthorizerRequest,
opts: client.RequestOptions = {},
): Promise<UpdateAuthorizerResponse> {
const body: jsonP.JSONObject = {
authorizerFunctionArn: params["authorizerFunctionArn"],
tokenKeyName: params["tokenKeyName"],
tokenSigningPublicKeys: params["tokenSigningPublicKeys"],
status: params["status"],
enableCachingForHttp: params["enableCachingForHttp"],
};
const resp = await this.#client.performRequest({
opts, body,
action: "UpdateAuthorizer",
method: "PUT",
requestUri: cmnP.encodePath`/authorizer/${params["authorizerName"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"authorizerName": "s",
"authorizerArn": "s",
},
}, await resp.json());
}
/** Updates information about the billing group. */
async updateBillingGroup(
params: UpdateBillingGroupRequest,
opts: client.RequestOptions = {},
): Promise<UpdateBillingGroupResponse> {
const body: jsonP.JSONObject = {
billingGroupProperties: fromBillingGroupProperties(params["billingGroupProperties"]),
expectedVersion: params["expectedVersion"],
};
const resp = await this.#client.performRequest({
opts, body,
action: "UpdateBillingGroup",
method: "PATCH",
requestUri: cmnP.encodePath`/billing-groups/${params["billingGroupName"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"version": "n",
},
}, await resp.json());
}
/** Updates a registered CA certificate. */
async updateCACertificate(
params: UpdateCACertificateRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const query = new URLSearchParams;
const body: jsonP.JSONObject = {
registrationConfig: fromRegistrationConfig(params["registrationConfig"]),
removeAutoRegistration: params["removeAutoRegistration"],
};
if (params["newStatus"] != null) query.set("newStatus", params["newStatus"]?.toString() ?? "");
if (params["newAutoRegistrationStatus"] != null) query.set("newAutoRegistrationStatus", params["newAutoRegistrationStatus"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query, body,
action: "UpdateCACertificate",
method: "PUT",
requestUri: cmnP.encodePath`/cacertificate/${params["certificateId"]}`,
});
await resp.body?.cancel();
}
/** Updates the status of the specified certificate. */
async updateCertificate(
params: UpdateCertificateRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const query = new URLSearchParams;
query.set("newStatus", params["newStatus"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query,
action: "UpdateCertificate",
method: "PUT",
requestUri: cmnP.encodePath`/certificates/${params["certificateId"]}`,
});
await resp.body?.cancel();
}
/** Updates a Device Defender detect custom metric. */
async updateCustomMetric(
params: UpdateCustomMetricRequest,
opts: client.RequestOptions = {},
): Promise<UpdateCustomMetricResponse> {
const body: jsonP.JSONObject = {
displayName: params["displayName"],
};
const resp = await this.#client.performRequest({
opts, body,
action: "UpdateCustomMetric",
method: "PATCH",
requestUri: cmnP.encodePath`/custom-metric/${params["metricName"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"metricName": "s",
"metricArn": "s",
"metricType": (x: jsonP.JSONValue) => cmnP.readEnum<CustomMetricType>(x),
"displayName": "s",
"creationDate": "d",
"lastModifiedDate": "d",
},
}, await resp.json());
}
/** Updates the definition for a dimension. */
async updateDimension(
params: UpdateDimensionRequest,
opts: client.RequestOptions = {},
): Promise<UpdateDimensionResponse> {
const body: jsonP.JSONObject = {
stringValues: params["stringValues"],
};
const resp = await this.#client.performRequest({
opts, body,
action: "UpdateDimension",
method: "PATCH",
requestUri: cmnP.encodePath`/dimensions/${params["name"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"name": "s",
"arn": "s",
"type": (x: jsonP.JSONValue) => cmnP.readEnum<DimensionType>(x),
"stringValues": ["s"],
"creationDate": "d",
"lastModifiedDate": "d",
},
}, await resp.json());
}
/** Updates values stored in the domain configuration. */
async updateDomainConfiguration(
params: UpdateDomainConfigurationRequest,
opts: client.RequestOptions = {},
): Promise<UpdateDomainConfigurationResponse> {
const body: jsonP.JSONObject = {
authorizerConfig: fromAuthorizerConfig(params["authorizerConfig"]),
domainConfigurationStatus: params["domainConfigurationStatus"],
removeAuthorizerConfig: params["removeAuthorizerConfig"],
};
const resp = await this.#client.performRequest({
opts, body,
action: "UpdateDomainConfiguration",
method: "PUT",
requestUri: cmnP.encodePath`/domainConfigurations/${params["domainConfigurationName"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"domainConfigurationName": "s",
"domainConfigurationArn": "s",
},
}, await resp.json());
}
/** Updates a dynamic thing group. */
async updateDynamicThingGroup(
params: UpdateDynamicThingGroupRequest,
opts: client.RequestOptions = {},
): Promise<UpdateDynamicThingGroupResponse> {
const body: jsonP.JSONObject = {
thingGroupProperties: fromThingGroupProperties(params["thingGroupProperties"]),
expectedVersion: params["expectedVersion"],
indexName: params["indexName"],
queryString: params["queryString"],
queryVersion: params["queryVersion"],
};
const resp = await this.#client.performRequest({
opts, body,
action: "UpdateDynamicThingGroup",
method: "PATCH",
requestUri: cmnP.encodePath`/dynamic-thing-groups/${params["thingGroupName"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"version": "n",
},
}, await resp.json());
}
/** Updates the event configurations. */
async updateEventConfigurations(
params: UpdateEventConfigurationsRequest = {},
opts: client.RequestOptions = {},
): Promise<void> {
const body: jsonP.JSONObject = {
eventConfigurations: jsonP.serializeMap(params["eventConfigurations"], x => fromConfiguration(x)),
};
const resp = await this.#client.performRequest({
opts, body,
action: "UpdateEventConfigurations",
method: "PATCH",
requestUri: "/event-configurations",
});
await resp.body?.cancel();
}
/** Updates the data for a fleet metric. */
async updateFleetMetric(
params: UpdateFleetMetricRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const body: jsonP.JSONObject = {
queryString: params["queryString"],
aggregationType: fromAggregationType(params["aggregationType"]),
period: params["period"],
aggregationField: params["aggregationField"],
description: params["description"],
queryVersion: params["queryVersion"],
indexName: params["indexName"],
unit: params["unit"],
expectedVersion: params["expectedVersion"],
};
const resp = await this.#client.performRequest({
opts, body,
action: "UpdateFleetMetric",
method: "PATCH",
requestUri: cmnP.encodePath`/fleet-metric/${params["metricName"]}`,
});
await resp.body?.cancel();
}
/** Updates the search configuration. */
async updateIndexingConfiguration(
params: UpdateIndexingConfigurationRequest = {},
opts: client.RequestOptions = {},
): Promise<void> {
const body: jsonP.JSONObject = {
thingIndexingConfiguration: fromThingIndexingConfiguration(params["thingIndexingConfiguration"]),
thingGroupIndexingConfiguration: fromThingGroupIndexingConfiguration(params["thingGroupIndexingConfiguration"]),
};
const resp = await this.#client.performRequest({
opts, body,
action: "UpdateIndexingConfiguration",
requestUri: "/indexing/config",
});
await resp.body?.cancel();
}
/** Updates supported fields of the specified job. */
async updateJob(
params: UpdateJobRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const query = new URLSearchParams;
const body: jsonP.JSONObject = {
description: params["description"],
presignedUrlConfig: fromPresignedUrlConfig(params["presignedUrlConfig"]),
jobExecutionsRolloutConfig: fromJobExecutionsRolloutConfig(params["jobExecutionsRolloutConfig"]),
abortConfig: fromAbortConfig(params["abortConfig"]),
timeoutConfig: fromTimeoutConfig(params["timeoutConfig"]),
jobExecutionsRetryConfig: fromJobExecutionsRetryConfig(params["jobExecutionsRetryConfig"]),
};
if (params["namespaceId"] != null) query.set("namespaceId", params["namespaceId"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query, body,
action: "UpdateJob",
method: "PATCH",
requestUri: cmnP.encodePath`/jobs/${params["jobId"]}`,
});
await resp.body?.cancel();
}
/** Updates the definition for the specified mitigation action. */
async updateMitigationAction(
params: UpdateMitigationActionRequest,
opts: client.RequestOptions = {},
): Promise<UpdateMitigationActionResponse> {
const body: jsonP.JSONObject = {
roleArn: params["roleArn"],
actionParams: fromMitigationActionParams(params["actionParams"]),
};
const resp = await this.#client.performRequest({
opts, body,
action: "UpdateMitigationAction",
method: "PATCH",
requestUri: cmnP.encodePath`/mitigationactions/actions/${params["actionName"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"actionArn": "s",
"actionId": "s",
},
}, await resp.json());
}
/** Updates a fleet provisioning template. */
async updateProvisioningTemplate(
params: UpdateProvisioningTemplateRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const body: jsonP.JSONObject = {
description: params["description"],
enabled: params["enabled"],
defaultVersionId: params["defaultVersionId"],
provisioningRoleArn: params["provisioningRoleArn"],
preProvisioningHook: fromProvisioningHook(params["preProvisioningHook"]),
removePreProvisioningHook: params["removePreProvisioningHook"],
};
const resp = await this.#client.performRequest({
opts, body,
action: "UpdateProvisioningTemplate",
method: "PATCH",
requestUri: cmnP.encodePath`/provisioning-templates/${params["templateName"]}`,
});
await resp.body?.cancel();
}
/** Updates a role alias. */
async updateRoleAlias(
params: UpdateRoleAliasRequest,
opts: client.RequestOptions = {},
): Promise<UpdateRoleAliasResponse> {
const body: jsonP.JSONObject = {
roleArn: params["roleArn"],
credentialDurationSeconds: params["credentialDurationSeconds"],
};
const resp = await this.#client.performRequest({
opts, body,
action: "UpdateRoleAlias",
method: "PUT",
requestUri: cmnP.encodePath`/role-aliases/${params["roleAlias"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"roleAlias": "s",
"roleAliasArn": "s",
},
}, await resp.json());
}
/** Updates a scheduled audit, including which checks are performed and how often the audit takes place. */
async updateScheduledAudit(
params: UpdateScheduledAuditRequest,
opts: client.RequestOptions = {},
): Promise<UpdateScheduledAuditResponse> {
const body: jsonP.JSONObject = {
frequency: params["frequency"],
dayOfMonth: params["dayOfMonth"],
dayOfWeek: params["dayOfWeek"],
targetCheckNames: params["targetCheckNames"],
};
const resp = await this.#client.performRequest({
opts, body,
action: "UpdateScheduledAudit",
method: "PATCH",
requestUri: cmnP.encodePath`/audit/scheduledaudits/${params["scheduledAuditName"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"scheduledAuditArn": "s",
},
}, await resp.json());
}
/** Updates a Device Defender security profile. */
async updateSecurityProfile(
params: UpdateSecurityProfileRequest,
opts: client.RequestOptions = {},
): Promise<UpdateSecurityProfileResponse> {
const query = new URLSearchParams;
const body: jsonP.JSONObject = {
securityProfileDescription: params["securityProfileDescription"],
behaviors: params["behaviors"]?.map(x => fromBehavior(x)),
alertTargets: jsonP.serializeMap(params["alertTargets"], x => fromAlertTarget(x)),
additionalMetricsToRetain: params["additionalMetricsToRetain"],
additionalMetricsToRetainV2: params["additionalMetricsToRetainV2"]?.map(x => fromMetricToRetain(x)),
deleteBehaviors: params["deleteBehaviors"],
deleteAlertTargets: params["deleteAlertTargets"],
deleteAdditionalMetricsToRetain: params["deleteAdditionalMetricsToRetain"],
};
if (params["expectedVersion"] != null) query.set("expectedVersion", params["expectedVersion"]?.toString() ?? "");
const resp = await this.#client.performRequest({
opts, query, body,
action: "UpdateSecurityProfile",
method: "PATCH",
requestUri: cmnP.encodePath`/security-profiles/${params["securityProfileName"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"securityProfileName": "s",
"securityProfileArn": "s",
"securityProfileDescription": "s",
"behaviors": [toBehavior],
"alertTargets": x => jsonP.readMap(x => cmnP.readEnumReq<AlertTargetType>(x), toAlertTarget, x),
"additionalMetricsToRetain": ["s"],
"additionalMetricsToRetainV2": [toMetricToRetain],
"version": "n",
"creationDate": "d",
"lastModifiedDate": "d",
},
}, await resp.json());
}
/** Updates an existing stream. */
async updateStream(
params: UpdateStreamRequest,
opts: client.RequestOptions = {},
): Promise<UpdateStreamResponse> {
const body: jsonP.JSONObject = {
description: params["description"],
files: params["files"]?.map(x => fromStreamFile(x)),
roleArn: params["roleArn"],
};
const resp = await this.#client.performRequest({
opts, body,
action: "UpdateStream",
method: "PUT",
requestUri: cmnP.encodePath`/streams/${params["streamId"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"streamId": "s",
"streamArn": "s",
"description": "s",
"streamVersion": "n",
},
}, await resp.json());
}
/** Updates the data for a thing. */
async updateThing(
params: UpdateThingRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const body: jsonP.JSONObject = {
thingTypeName: params["thingTypeName"],
attributePayload: fromAttributePayload(params["attributePayload"]),
expectedVersion: params["expectedVersion"],
removeThingType: params["removeThingType"],
};
const resp = await this.#client.performRequest({
opts, body,
action: "UpdateThing",
method: "PATCH",
requestUri: cmnP.encodePath`/things/${params["thingName"]}`,
});
await resp.body?.cancel();
}
/** Update a thing group. */
async updateThingGroup(
params: UpdateThingGroupRequest,
opts: client.RequestOptions = {},
): Promise<UpdateThingGroupResponse> {
const body: jsonP.JSONObject = {
thingGroupProperties: fromThingGroupProperties(params["thingGroupProperties"]),
expectedVersion: params["expectedVersion"],
};
const resp = await this.#client.performRequest({
opts, body,
action: "UpdateThingGroup",
method: "PATCH",
requestUri: cmnP.encodePath`/thing-groups/${params["thingGroupName"]}`,
});
return jsonP.readObj({
required: {},
optional: {
"version": "n",
},
}, await resp.json());
}
/** Updates the groups to which the thing belongs. */
async updateThingGroupsForThing(
params: UpdateThingGroupsForThingRequest = {},
opts: client.RequestOptions = {},
): Promise<void> {
const body: jsonP.JSONObject = {
thingName: params["thingName"],
thingGroupsToAdd: params["thingGroupsToAdd"],
thingGroupsToRemove: params["thingGroupsToRemove"],
overrideDynamicGroups: params["overrideDynamicGroups"],
};
const resp = await this.#client.performRequest({
opts, body,
action: "UpdateThingGroupsForThing",
method: "PUT",
requestUri: "/thing-groups/updateThingGroupsForThing",
});
await resp.body?.cancel();
}
/** Updates a topic rule destination. */
async updateTopicRuleDestination(
params: UpdateTopicRuleDestinationRequest,
opts: client.RequestOptions = {},
): Promise<void> {
const body: jsonP.JSONObject = {
arn: params["arn"],
status: params["status"],
};
const resp = await this.#client.performRequest({
opts, body,
action: "UpdateTopicRuleDestination",
method: "PATCH",
requestUri: "/destinations",
});
await resp.body?.cancel();
}
/** Validates a Device Defender security profile behaviors specification. */
async validateSecurityProfileBehaviors(
params: ValidateSecurityProfileBehaviorsRequest,
opts: client.RequestOptions = {},
): Promise<ValidateSecurityProfileBehaviorsResponse> {
const body: jsonP.JSONObject = {
behaviors: params["behaviors"]?.map(x => fromBehavior(x)),
};
const resp = await this.#client.performRequest({
opts, body,
action: "ValidateSecurityProfileBehaviors",
requestUri: "/security-profile-behaviors/validate",
});
return jsonP.readObj({
required: {},
optional: {
"valid": "b",
"validationErrors": [toValidationError],
},
}, await resp.json());
}
}
// refs: 1 - tags: named, input
/** The input for the AcceptCertificateTransfer operation. */
export interface AcceptCertificateTransferRequest {
/** The ID of the certificate. */
certificateId: string;
/** Specifies whether the certificate is active. */
setAsActive?: boolean | null;
}
// refs: 1 - tags: named, input
export interface AddThingToBillingGroupRequest {
/** The name of the billing group. */
billingGroupName?: string | null;
/** The ARN of the billing group. */
billingGroupArn?: string | null;
/** The name of the thing to be added to the billing group. */
thingName?: string | null;
/** The ARN of the thing to be added to the billing group. */
thingArn?: string | null;
}
// refs: 1 - tags: named, input
export interface AddThingToThingGroupRequest {
/** The name of the group to which you are adding a thing. */
thingGroupName?: string | null;
/** The ARN of the group to which you are adding a thing. */
thingGroupArn?: string | null;
/** The name of the thing to add to a group. */
thingName?: string | null;
/** The ARN of the thing to add to a group. */
thingArn?: string | null;
/** Override dynamic thing groups with static thing groups when 10-group limit is reached. */
overrideDynamicGroups?: boolean | null;
}
// refs: 1 - tags: named, input
export interface AssociateTargetsWithJobRequest {
/** A list of thing group ARNs that define the targets of the job. */
targets: string[];
/** The unique identifier you assigned to this job when it was created. */
jobId: string;
/** An optional comment string describing why the job was associated with the targets. */
comment?: string | null;
/** The namespace used to indicate that a job is a customer-managed job. */
namespaceId?: string | null;
}
// refs: 1 - tags: named, input
export interface AttachPolicyRequest {
/** The name of the policy to attach. */
policyName: string;
/** The [identity](https://docs.aws.amazon.com/iot/latest/developerguide/security-iam.html) to which the policy is attached. */
target: string;
}
// refs: 1 - tags: named, input
/** The input for the AttachPrincipalPolicy operation. */
export interface AttachPrincipalPolicyRequest {
/** The policy name. */
policyName: string;
/** The principal, which can be a certificate ARN (as returned from the CreateCertificate operation) or an Amazon Cognito ID. */
principal: string;
}
// refs: 1 - tags: named, input
export interface AttachSecurityProfileRequest {
/** The security profile that is attached. */
securityProfileName: string;
/** The ARN of the target (thing group) to which the security profile is attached. */
securityProfileTargetArn: string;
}
// refs: 1 - tags: named, input
/** The input for the AttachThingPrincipal operation. */
export interface AttachThingPrincipalRequest {
/** The name of the thing. */
thingName: string;
/** The principal, which can be a certificate ARN (as returned from the CreateCertificate operation) or an Amazon Cognito ID. */
principal: string;
}
// refs: 1 - tags: named, input
export interface CancelAuditMitigationActionsTaskRequest {
/** The unique identifier for the task that you want to cancel. */
taskId: string;
}
// refs: 1 - tags: named, input
export interface CancelAuditTaskRequest {
/** The ID of the audit you want to cancel. */
taskId: string;
}
// refs: 1 - tags: named, input
/** The input for the CancelCertificateTransfer operation. */
export interface CancelCertificateTransferRequest {
/** The ID of the certificate. */
certificateId: string;
}
// refs: 1 - tags: named, input
export interface CancelDetectMitigationActionsTaskRequest {
/** The unique identifier of the task. */
taskId: string;
}
// refs: 1 - tags: named, input
export interface CancelJobRequest {
/** The unique identifier you assigned to this job when it was created. */
jobId: string;
/** (Optional)A reason code string that explains why the job was canceled. */
reasonCode?: string | null;
/** An optional comment string describing why the job was canceled. */
comment?: string | null;
/** (Optional) If `true` job executions with status "IN_PROGRESS" and "QUEUED" are canceled, otherwise only job executions with status "QUEUED" are canceled. */
force?: boolean | null;
}
// refs: 1 - tags: named, input
export interface CancelJobExecutionRequest {
/** The ID of the job to be canceled. */
jobId: string;
/** The name of the thing whose execution of the job will be canceled. */
thingName: string;
/** (Optional) If `true` the job execution will be canceled if it has status IN_PROGRESS or QUEUED, otherwise the job execution will be canceled only if it has status QUEUED. */
force?: boolean | null;
/** (Optional) The expected current version of the job execution. */
expectedVersion?: number | null;
/** A collection of name/value pairs that describe the status of the job execution. */
statusDetails?: { [key: string]: string | null | undefined } | null;
}
// refs: 1 - tags: named, input
export interface ConfirmTopicRuleDestinationRequest {
/** The token used to confirm ownership or access to the topic rule confirmation URL. */
confirmationToken: string;
}
// refs: 1 - tags: named, input
export interface CreateAuditSuppressionRequest {
checkName: string;
resourceIdentifier: ResourceIdentifier;
/** The epoch timestamp in seconds at which this suppression expires. */
expirationDate?: Date | number | null;
/** Indicates whether a suppression should exist indefinitely or not. */
suppressIndefinitely?: boolean | null;
/** The description of the audit suppression. */
description?: string | null;
/** Each audit supression must have a unique client request token. */
clientRequestToken: string;
}
// refs: 1 - tags: named, input
export interface CreateAuthorizerRequest {
/** The authorizer name. */
authorizerName: string;
/** The ARN of the authorizer's Lambda function. */
authorizerFunctionArn: string;
/** The name of the token key used to extract the token from the HTTP headers. */
tokenKeyName?: string | null;
/** The public keys used to verify the digital signature returned by your custom authentication service. */
tokenSigningPublicKeys?: { [key: string]: string | null | undefined } | null;
/** The status of the create authorizer request. */
status?: AuthorizerStatus | null;
/** Metadata which can be used to manage the custom authorizer. */
tags?: Tag[] | null;
/** Specifies whether IoT validates the token signature in an authorization request. */
signingDisabled?: boolean | null;
/** When `true`, the result from the authorizer’s Lambda function is cached for clients that use persistent HTTP connections. */
enableCachingForHttp?: boolean | null;
}
// refs: 1 - tags: named, input
export interface CreateBillingGroupRequest {
/** The name you wish to give to the billing group. */
billingGroupName: string;
/** The properties of the billing group. */
billingGroupProperties?: BillingGroupProperties | null;
/** Metadata which can be used to manage the billing group. */
tags?: Tag[] | null;
}
// refs: 1 - tags: named, input
/** The input for the CreateCertificateFromCsr operation. */
export interface CreateCertificateFromCsrRequest {
/** The certificate signing request (CSR). */
certificateSigningRequest: string;
/** Specifies whether the certificate is active. */
setAsActive?: boolean | null;
}
// refs: 1 - tags: named, input
export interface CreateCustomMetricRequest {
/** The name of the custom metric. */
metricName: string;
/** Field represents a friendly name in the console for the custom metric; it doesn't have to be unique. */
displayName?: string | null;
/** The type of the custom metric. */
metricType: CustomMetricType;
/** Metadata that can be used to manage the custom metric. */
tags?: Tag[] | null;
/** Each custom metric must have a unique client request token. */
clientRequestToken: string;
}
// refs: 1 - tags: named, input
export interface CreateDimensionRequest {
/** A unique identifier for the dimension. */
name: string;
/** Specifies the type of dimension. */
type: DimensionType;
/** Specifies the value or list of values for the dimension. */
stringValues: string[];
/** Metadata that can be used to manage the dimension. */
tags?: Tag[] | null;
/** Each dimension must have a unique client request token. */
clientRequestToken: string;
}
// refs: 1 - tags: named, input
export interface CreateDomainConfigurationRequest {
/** The name of the domain configuration. */
domainConfigurationName: string;
/** The name of the domain. */
domainName?: string | null;
/** The ARNs of the certificates that IoT passes to the device during the TLS handshake. */
serverCertificateArns?: string[] | null;
/** The certificate used to validate the server certificate and prove domain name ownership. */
validationCertificateArn?: string | null;
/** An object that specifies the authorization service for a domain. */
authorizerConfig?: AuthorizerConfig | null;
/** The type of service delivered by the endpoint. */
serviceType?: ServiceType | null;
/** Metadata which can be used to manage the domain configuration. */
tags?: Tag[] | null;
}
// refs: 1 - tags: named, input
export interface CreateDynamicThingGroupRequest {
/** The dynamic thing group name to create. */
thingGroupName: string;
/** The dynamic thing group properties. */
thingGroupProperties?: ThingGroupProperties | null;
/** The dynamic thing group index name. */
indexName?: string | null;
/** The dynamic thing group search query string. */
queryString: string;
/** The dynamic thing group query version. */
queryVersion?: string | null;
/** Metadata which can be used to manage the dynamic thing group. */
tags?: Tag[] | null;
}
// refs: 1 - tags: named, input
export interface CreateFleetMetricRequest {
/** The name of the fleet metric to create. */
metricName: string;
/** The search query string. */
queryString: string;
/** The type of the aggregation query. */
aggregationType: AggregationType;
/** The time in seconds between fleet metric emissions. */
period: number;
/** The field to aggregate. */
aggregationField: string;
/** The fleet metric description. */
description?: string | null;
/** The query version. */
queryVersion?: string | null;
/** The name of the index to search. */
indexName?: string | null;
/** Used to support unit transformation such as milliseconds to seconds. */
unit?: FleetMetricUnit | null;
/** Metadata, which can be used to manage the fleet metric. */
tags?: Tag[] | null;
}
// refs: 1 - tags: named, input
export interface CreateJobRequest {
/** A job identifier which must be unique for your Amazon Web Services account. */
jobId: string;
/** A list of things and thing groups to which the job should be sent. */
targets: string[];
/** An S3 link to the job document. */
documentSource?: string | null;
/** The job document. */
document?: string | null;
/** A short text description of the job. */
description?: string | null;
/** Configuration information for pre-signed S3 URLs. */
presignedUrlConfig?: PresignedUrlConfig | null;
/** Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things specified as targets have completed the job (SNAPSHOT). */
targetSelection?: TargetSelection | null;
/** Allows you to create a staged rollout of the job. */
jobExecutionsRolloutConfig?: JobExecutionsRolloutConfig | null;
/** Allows you to create the criteria to abort a job. */
abortConfig?: AbortConfig | null;
/** Specifies the amount of time each device has to finish its execution of the job. */
timeoutConfig?: TimeoutConfig | null;
/** Metadata which can be used to manage the job. */
tags?: Tag[] | null;
/** The namespace used to indicate that a job is a customer-managed job. */
namespaceId?: string | null;
/** The ARN of the job template used to create the job. */
jobTemplateArn?: string | null;
/** Allows you to create the criteria to retry a job. */
jobExecutionsRetryConfig?: JobExecutionsRetryConfig | null;
/** Parameters of a managed template that you can specify to create the job document. */
documentParameters?: { [key: string]: string | null | undefined } | null;
}
// refs: 1 - tags: named, input
export interface CreateJobTemplateRequest {
/** A unique identifier for the job template. */
jobTemplateId: string;
/** The ARN of the job to use as the basis for the job template. */
jobArn?: string | null;
/** An S3 link to the job document to use in the template. */
documentSource?: string | null;
/** The job document. */
document?: string | null;
/** A description of the job document. */
description: string;
presignedUrlConfig?: PresignedUrlConfig | null;
jobExecutionsRolloutConfig?: JobExecutionsRolloutConfig | null;
abortConfig?: AbortConfig | null;
timeoutConfig?: TimeoutConfig | null;
/** Metadata that can be used to manage the job template. */
tags?: Tag[] | null;
/** Allows you to create the criteria to retry a job. */
jobExecutionsRetryConfig?: JobExecutionsRetryConfig | null;
}
// refs: 1 - tags: named, input
/** The input for the CreateKeysAndCertificate operation. */
export interface CreateKeysAndCertificateRequest {
/** Specifies whether the certificate is active. */
setAsActive?: boolean | null;
}
// refs: 1 - tags: named, input
export interface CreateMitigationActionRequest {
/** A friendly name for the action. */
actionName: string;
/** The ARN of the IAM role that is used to apply the mitigation action. */
roleArn: string;
/** Defines the type of action and the parameters for that action. */
actionParams: MitigationActionParams;
/** Metadata that can be used to manage the mitigation action. */
tags?: Tag[] | null;
}
// refs: 1 - tags: named, input
export interface CreateOTAUpdateRequest {
/** The ID of the OTA update to be created. */
otaUpdateId: string;
/** The description of the OTA update. */
description?: string | null;
/** The devices targeted to receive OTA updates. */
targets: string[];
/** The protocol used to transfer the OTA update image. */
protocols?: Protocol[] | null;
/** Specifies whether the update will continue to run (CONTINUOUS), or will be complete after all the things specified as targets have completed the update (SNAPSHOT). */
targetSelection?: TargetSelection | null;
/** Configuration for the rollout of OTA updates. */
awsJobExecutionsRolloutConfig?: AwsJobExecutionsRolloutConfig | null;
/** Configuration information for pre-signed URLs. */
awsJobPresignedUrlConfig?: AwsJobPresignedUrlConfig | null;
/** The criteria that determine when and how a job abort takes place. */
awsJobAbortConfig?: AwsJobAbortConfig | null;
/** Specifies the amount of time each device has to finish its execution of the job. */
awsJobTimeoutConfig?: AwsJobTimeoutConfig | null;
/** The files to be streamed by the OTA update. */
files: OTAUpdateFile[];
/** The IAM role that grants Amazon Web Services IoT Core access to the Amazon S3, IoT jobs and Amazon Web Services Code Signing resources to create an OTA update job. */
roleArn: string;
/** A list of additional OTA update parameters which are name-value pairs. */
additionalParameters?: { [key: string]: string | null | undefined } | null;
/** Metadata which can be used to manage updates. */
tags?: Tag[] | null;
}
// refs: 1 - tags: named, input
/** The input for the CreatePolicy operation. */
export interface CreatePolicyRequest {
/** The policy name. */
policyName: string;
/** The JSON document that describes the policy. */
policyDocument: string;
/** Metadata which can be used to manage the policy. */
tags?: Tag[] | null;
}
// refs: 1 - tags: named, input
/** The input for the CreatePolicyVersion operation. */
export interface CreatePolicyVersionRequest {
/** The policy name. */
policyName: string;
/** The JSON document that describes the policy. */
policyDocument: string;
/** Specifies whether the policy version is set as the default. */
setAsDefault?: boolean | null;
}
// refs: 1 - tags: named, input
export interface CreateProvisioningClaimRequest {
/** The name of the provisioning template to use. */
templateName: string;
}
// refs: 1 - tags: named, input
export interface CreateProvisioningTemplateRequest {
/** The name of the fleet provisioning template. */
templateName: string;
/** The description of the fleet provisioning template. */
description?: string | null;
/** The JSON formatted contents of the fleet provisioning template. */
templateBody: string;
/** True to enable the fleet provisioning template, otherwise false. */
enabled?: boolean | null;
/** The role ARN for the role associated with the fleet provisioning template. */
provisioningRoleArn: string;
/** Creates a pre-provisioning hook template. */
preProvisioningHook?: ProvisioningHook | null;
/** Metadata which can be used to manage the fleet provisioning template. */
tags?: Tag[] | null;
}
// refs: 1 - tags: named, input
export interface CreateProvisioningTemplateVersionRequest {
/** The name of the fleet provisioning template. */
templateName: string;
/** The JSON formatted contents of the fleet provisioning template. */
templateBody: string;
/** Sets a fleet provision template version as the default version. */
setAsDefault?: boolean | null;
}
// refs: 1 - tags: named, input
export interface CreateRoleAliasRequest {
/** The role alias that points to a role ARN. */
roleAlias: string;
/** The role ARN. */
roleArn: string;
/** How long (in seconds) the credentials will be valid. */
credentialDurationSeconds?: number | null;
/** Metadata which can be used to manage the role alias. */
tags?: Tag[] | null;
}
// refs: 1 - tags: named, input
export interface CreateScheduledAuditRequest {
/** How often the scheduled audit takes place, either `DAILY`, `WEEKLY`, `BIWEEKLY` or `MONTHLY`. */
frequency: AuditFrequency;
/** The day of the month on which the scheduled audit takes place. */
dayOfMonth?: string | null;
/** The day of the week on which the scheduled audit takes place, either `SUN`, `MON`, `TUE`, `WED`, `THU`, `FRI`, or `SAT`. */
dayOfWeek?: DayOfWeek | null;
/** Which checks are performed during the scheduled audit. */
targetCheckNames: string[];
/** The name you want to give to the scheduled audit. */
scheduledAuditName: string;
/** Metadata that can be used to manage the scheduled audit. */
tags?: Tag[] | null;
}
// refs: 1 - tags: named, input
export interface CreateSecurityProfileRequest {
/** The name you are giving to the security profile. */
securityProfileName: string;
/** A description of the security profile. */
securityProfileDescription?: string | null;
/** Specifies the behaviors that, when violated by a device (thing), cause an alert. */
behaviors?: Behavior[] | null;
/** Specifies the destinations to which alerts are sent. */
alertTargets?: { [key in AlertTargetType]: AlertTarget | null | undefined } | null;
/** _Please use "CreateSecurityProfileRequest$additionalMetricsToRetainV2" instead._ */
additionalMetricsToRetain?: string[] | null;
/** A list of metrics whose data is retained (stored). */
additionalMetricsToRetainV2?: MetricToRetain[] | null;
/** Metadata that can be used to manage the security profile. */
tags?: Tag[] | null;
}
// refs: 1 - tags: named, input
export interface CreateStreamRequest {
/** The stream ID. */
streamId: string;
/** A description of the stream. */
description?: string | null;
/** The files to stream. */
files: StreamFile[];
/** An IAM role that allows the IoT service principal to access your S3 files. */
roleArn: string;
/** Metadata which can be used to manage streams. */
tags?: Tag[] | null;
}
// refs: 1 - tags: named, input
/** The input for the CreateThing operation. */
export interface CreateThingRequest {
/** The name of the thing to create. */
thingName: string;
/** The name of the thing type associated with the new thing. */
thingTypeName?: string | null;
/** The attribute payload, which consists of up to three name/value pairs in a JSON document. */
attributePayload?: AttributePayload | null;
/** The name of the billing group the thing will be added to. */
billingGroupName?: string | null;
}
// refs: 1 - tags: named, input
export interface CreateThingGroupRequest {
/** The thing group name to create. */
thingGroupName: string;
/** The name of the parent thing group. */
parentGroupName?: string | null;
/** The thing group properties. */
thingGroupProperties?: ThingGroupProperties | null;
/** Metadata which can be used to manage the thing group. */
tags?: Tag[] | null;
}
// refs: 1 - tags: named, input
/** The input for the CreateThingType operation. */
export interface CreateThingTypeRequest {
/** The name of the thing type. */
thingTypeName: string;
/** The ThingTypeProperties for the thing type to create. */
thingTypeProperties?: ThingTypeProperties | null;
/** Metadata which can be used to manage the thing type. */
tags?: Tag[] | null;
}
// refs: 1 - tags: named, input
/** The input for the CreateTopicRule operation. */
export interface CreateTopicRuleRequest {
/** The name of the rule. */
ruleName: string;
/** The rule payload. */
topicRulePayload: TopicRulePayload;
/** Metadata which can be used to manage the topic rule. */
tags?: string | null;
}
// refs: 1 - tags: named, input
export interface CreateTopicRuleDestinationRequest {
/** The topic rule destination configuration. */
destinationConfiguration: TopicRuleDestinationConfiguration;
}
// refs: 1 - tags: named, input
export interface DeleteAccountAuditConfigurationRequest {
/** If true, all scheduled audits are deleted. */
deleteScheduledAudits?: boolean | null;
}
// refs: 1 - tags: named, input
export interface DeleteAuditSuppressionRequest {
checkName: string;
resourceIdentifier: ResourceIdentifier;
}
// refs: 1 - tags: named, input
export interface DeleteAuthorizerRequest {
/** The name of the authorizer to delete. */
authorizerName: string;
}
// refs: 1 - tags: named, input
export interface DeleteBillingGroupRequest {
/** The name of the billing group. */
billingGroupName: string;
/** The expected version of the billing group. */
expectedVersion?: number | null;
}
// refs: 1 - tags: named, input
/** Input for the DeleteCACertificate operation. */
export interface DeleteCACertificateRequest {
/** The ID of the certificate to delete. */
certificateId: string;
}
// refs: 1 - tags: named, input
/** The input for the DeleteCertificate operation. */
export interface DeleteCertificateRequest {
/** The ID of the certificate. */
certificateId: string;
/** Forces the deletion of a certificate if it is inactive and is not attached to an IoT thing. */
forceDelete?: boolean | null;
}
// refs: 1 - tags: named, input
export interface DeleteCustomMetricRequest {
/** The name of the custom metric. */
metricName: string;
}
// refs: 1 - tags: named, input
export interface DeleteDimensionRequest {
/** The unique identifier for the dimension that you want to delete. */
name: string;
}
// refs: 1 - tags: named, input
export interface DeleteDomainConfigurationRequest {
/** The name of the domain configuration to be deleted. */
domainConfigurationName: string;
}
// refs: 1 - tags: named, input
export interface DeleteDynamicThingGroupRequest {
/** The name of the dynamic thing group to delete. */
thingGroupName: string;
/** The expected version of the dynamic thing group to delete. */
expectedVersion?: number | null;
}
// refs: 1 - tags: named, input
export interface DeleteFleetMetricRequest {
/** The name of the fleet metric to delete. */
metricName: string;
/** The expected version of the fleet metric to delete. */
expectedVersion?: number | null;
}
// refs: 1 - tags: named, input
export interface DeleteJobRequest {
/** The ID of the job to be deleted. */
jobId: string;
/** (Optional) When true, you can delete a job which is "IN_PROGRESS". */
force?: boolean | null;
/** The namespace used to indicate that a job is a customer-managed job. */
namespaceId?: string | null;
}
// refs: 1 - tags: named, input
export interface DeleteJobExecutionRequest {
/** The ID of the job whose execution on a particular device will be deleted. */
jobId: string;
/** The name of the thing whose job execution will be deleted. */
thingName: string;
/** The ID of the job execution to be deleted. */
executionNumber: number;
/** (Optional) When true, you can delete a job execution which is "IN_PROGRESS". */
force?: boolean | null;
/** The namespace used to indicate that a job is a customer-managed job. */
namespaceId?: string | null;
}
// refs: 1 - tags: named, input
export interface DeleteJobTemplateRequest {
/** The unique identifier of the job template to delete. */
jobTemplateId: string;
}
// refs: 1 - tags: named, input
export interface DeleteMitigationActionRequest {
/** The name of the mitigation action that you want to delete. */
actionName: string;
}
// refs: 1 - tags: named, input
export interface DeleteOTAUpdateRequest {
/** The ID of the OTA update to delete. */
otaUpdateId: string;
/** When true, the stream created by the OTAUpdate process is deleted when the OTA update is deleted. */
deleteStream?: boolean | null;
/** When true, deletes the IoT job created by the OTAUpdate process even if it is "IN_PROGRESS". */
forceDeleteAWSJob?: boolean | null;
}
// refs: 1 - tags: named, input
/** The input for the DeletePolicy operation. */
export interface DeletePolicyRequest {
/** The name of the policy to delete. */
policyName: string;
}
// refs: 1 - tags: named, input
/** The input for the DeletePolicyVersion operation. */
export interface DeletePolicyVersionRequest {
/** The name of the policy. */
policyName: string;
/** The policy version ID. */
policyVersionId: string;
}
// refs: 1 - tags: named, input
export interface DeleteProvisioningTemplateRequest {
/** The name of the fleet provision template to delete. */
templateName: string;
}
// refs: 1 - tags: named, input
export interface DeleteProvisioningTemplateVersionRequest {
/** The name of the fleet provisioning template version to delete. */
templateName: string;
/** The fleet provisioning template version ID to delete. */
versionId: number;
}
// refs: 1 - tags: named, input
export interface DeleteRoleAliasRequest {
/** The role alias to delete. */
roleAlias: string;
}
// refs: 1 - tags: named, input
export interface DeleteScheduledAuditRequest {
/** The name of the scheduled audit you want to delete. */
scheduledAuditName: string;
}
// refs: 1 - tags: named, input
export interface DeleteSecurityProfileRequest {
/** The name of the security profile to be deleted. */
securityProfileName: string;
/** The expected version of the security profile. */
expectedVersion?: number | null;
}
// refs: 1 - tags: named, input
export interface DeleteStreamRequest {
/** The stream ID. */
streamId: string;
}
// refs: 1 - tags: named, input
/** The input for the DeleteThing operation. */
export interface DeleteThingRequest {
/** The name of the thing to delete. */
thingName: string;
/** The expected version of the thing record in the registry. */
expectedVersion?: number | null;
}
// refs: 1 - tags: named, input
export interface DeleteThingGroupRequest {
/** The name of the thing group to delete. */
thingGroupName: string;
/** The expected version of the thing group to delete. */
expectedVersion?: number | null;
}
// refs: 1 - tags: named, input
/** The input for the DeleteThingType operation. */
export interface DeleteThingTypeRequest {
/** The name of the thing type. */
thingTypeName: string;
}
// refs: 1 - tags: named, input
/** The input for the DeleteTopicRule operation. */
export interface DeleteTopicRuleRequest {
/** The name of the rule. */
ruleName: string;
}
// refs: 1 - tags: named, input
export interface DeleteTopicRuleDestinationRequest {
/** The ARN of the topic rule destination to delete. */
arn: string;
}
// refs: 1 - tags: named, input
export interface DeleteV2LoggingLevelRequest {
/** The type of resource for which you are configuring logging. */
targetType: LogTargetType;
/** The name of the resource for which you are configuring logging. */
targetName: string;
}
// refs: 1 - tags: named, input
/** The input for the DeprecateThingType operation. */
export interface DeprecateThingTypeRequest {
/** The name of the thing type to deprecate. */
thingTypeName: string;
/** Whether to undeprecate a deprecated thing type. */
undoDeprecate?: boolean | null;
}
// refs: 1 - tags: named, input
export interface DescribeAuditFindingRequest {
/** A unique identifier for a single audit finding. */
findingId: string;
}
// refs: 1 - tags: named, input
export interface DescribeAuditMitigationActionsTaskRequest {
/** The unique identifier for the audit mitigation task. */
taskId: string;
}
// refs: 1 - tags: named, input
export interface DescribeAuditSuppressionRequest {
checkName: string;
resourceIdentifier: ResourceIdentifier;
}
// refs: 1 - tags: named, input
export interface DescribeAuditTaskRequest {
/** The ID of the audit whose information you want to get. */
taskId: string;
}
// refs: 1 - tags: named, input
export interface DescribeAuthorizerRequest {
/** The name of the authorizer to describe. */
authorizerName: string;
}
// refs: 1 - tags: named, input
export interface DescribeBillingGroupRequest {
/** The name of the billing group. */
billingGroupName: string;
}
// refs: 1 - tags: named, input
/** The input for the DescribeCACertificate operation. */
export interface DescribeCACertificateRequest {
/** The CA certificate identifier. */
certificateId: string;
}
// refs: 1 - tags: named, input
/** The input for the DescribeCertificate operation. */
export interface DescribeCertificateRequest {
/** The ID of the certificate. */
certificateId: string;
}
// refs: 1 - tags: named, input
export interface DescribeCustomMetricRequest {
/** The name of the custom metric. */
metricName: string;
}
// refs: 1 - tags: named, input
export interface DescribeDetectMitigationActionsTaskRequest {
/** The unique identifier of the task. */
taskId: string;
}
// refs: 1 - tags: named, input
export interface DescribeDimensionRequest {
/** The unique identifier for the dimension. */
name: string;
}
// refs: 1 - tags: named, input
export interface DescribeDomainConfigurationRequest {
/** The name of the domain configuration. */
domainConfigurationName: string;
}
// refs: 1 - tags: named, input
/** The input for the DescribeEndpoint operation. */
export interface DescribeEndpointRequest {
/** The endpoint type. */
endpointType?: string | null;
}
// refs: 1 - tags: named, input
export interface DescribeFleetMetricRequest {
/** The name of the fleet metric to describe. */
metricName: string;
}
// refs: 1 - tags: named, input
export interface DescribeIndexRequest {
/** The index name. */
indexName: string;
}
// refs: 1 - tags: named, input
export interface DescribeJobRequest {
/** The unique identifier you assigned to this job when it was created. */
jobId: string;
}
// refs: 1 - tags: named, input
export interface DescribeJobExecutionRequest {
/** The unique identifier you assigned to this job when it was created. */
jobId: string;
/** The name of the thing on which the job execution is running. */
thingName: string;
/** A string (consisting of the digits "0" through "9" which is used to specify a particular job execution on a particular device. */
executionNumber?: number | null;
}
// refs: 1 - tags: named, input
export interface DescribeJobTemplateRequest {
/** The unique identifier of the job template. */
jobTemplateId: string;
}
// refs: 1 - tags: named, input
export interface DescribeManagedJobTemplateRequest {
/** The unique name of a managed job template, which is required. */
templateName: string;
/** An optional parameter to specify version of a managed template. */
templateVersion?: string | null;
}
// refs: 1 - tags: named, input
export interface DescribeMitigationActionRequest {
/** The friendly name that uniquely identifies the mitigation action. */
actionName: string;
}
// refs: 1 - tags: named, input
export interface DescribeProvisioningTemplateRequest {
/** The name of the fleet provisioning template. */
templateName: string;
}
// refs: 1 - tags: named, input
export interface DescribeProvisioningTemplateVersionRequest {
/** The template name. */
templateName: string;
/** The fleet provisioning template version ID. */
versionId: number;
}
// refs: 1 - tags: named, input
export interface DescribeRoleAliasRequest {
/** The role alias to describe. */
roleAlias: string;
}
// refs: 1 - tags: named, input
export interface DescribeScheduledAuditRequest {
/** The name of the scheduled audit whose information you want to get. */
scheduledAuditName: string;
}
// refs: 1 - tags: named, input
export interface DescribeSecurityProfileRequest {
/** The name of the security profile whose information you want to get. */
securityProfileName: string;
}
// refs: 1 - tags: named, input
export interface DescribeStreamRequest {
/** The stream ID. */
streamId: string;
}
// refs: 1 - tags: named, input
/** The input for the DescribeThing operation. */
export interface DescribeThingRequest {
/** The name of the thing. */
thingName: string;
}
// refs: 1 - tags: named, input
export interface DescribeThingGroupRequest {
/** The name of the thing group. */
thingGroupName: string;
}
// refs: 1 - tags: named, input
export interface DescribeThingRegistrationTaskRequest {
/** The task ID. */
taskId: string;
}
// refs: 1 - tags: named, input
/** The input for the DescribeThingType operation. */
export interface DescribeThingTypeRequest {
/** The name of the thing type. */
thingTypeName: string;
}
// refs: 1 - tags: named, input
export interface DetachPolicyRequest {
/** The policy to detach. */
policyName: string;
/** The target from which the policy will be detached. */
target: string;
}
// refs: 1 - tags: named, input
/** The input for the DetachPrincipalPolicy operation. */
export interface DetachPrincipalPolicyRequest {
/** The name of the policy to detach. */
policyName: string;
/** The principal. */
principal: string;
}
// refs: 1 - tags: named, input
export interface DetachSecurityProfileRequest {
/** The security profile that is detached. */
securityProfileName: string;
/** The ARN of the thing group from which the security profile is detached. */
securityProfileTargetArn: string;
}
// refs: 1 - tags: named, input
/** The input for the DetachThingPrincipal operation. */
export interface DetachThingPrincipalRequest {
/** The name of the thing. */
thingName: string;
/** If the principal is a certificate, this value must be ARN of the certificate. */
principal: string;
}
// refs: 1 - tags: named, input
/** The input for the DisableTopicRuleRequest operation. */
export interface DisableTopicRuleRequest {
/** The name of the rule to disable. */
ruleName: string;
}
// refs: 1 - tags: named, input
/** The input for the EnableTopicRuleRequest operation. */
export interface EnableTopicRuleRequest {
/** The name of the topic rule to enable. */
ruleName: string;
}
// refs: 1 - tags: named, input
export interface GetBehaviorModelTrainingSummariesRequest {
/** The name of the security profile. */
securityProfileName?: string | null;
/** The maximum number of results to return at one time. */
maxResults?: number | null;
/** The token for the next set of results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, input
export interface GetBucketsAggregationRequest {
/** The name of the index to search. */
indexName?: string | null;
/** The search query string. */
queryString: string;
/** The aggregation field. */
aggregationField: string;
/** The version of the query. */
queryVersion?: string | null;
/** The basic control of the response shape and the bucket aggregation type to perform. */
bucketsAggregationType: BucketsAggregationType;
}
// refs: 1 - tags: named, input
export interface GetCardinalityRequest {
/** The name of the index to search. */
indexName?: string | null;
/** The search query string. */
queryString: string;
/** The field to aggregate. */
aggregationField?: string | null;
/** The query version. */
queryVersion?: string | null;
}
// refs: 1 - tags: named, input
export interface GetEffectivePoliciesRequest {
/** The principal. */
principal?: string | null;
/** The Cognito identity pool ID. */
cognitoIdentityPoolId?: string | null;
/** The thing name. */
thingName?: string | null;
}
// refs: 1 - tags: named, input
export interface GetJobDocumentRequest {
/** The unique identifier you assigned to this job when it was created. */
jobId: string;
}
// refs: 1 - tags: named, input
export interface GetOTAUpdateRequest {
/** The OTA update ID. */
otaUpdateId: string;
}
// refs: 1 - tags: named, input
export interface GetPercentilesRequest {
/** The name of the index to search. */
indexName?: string | null;
/** The search query string. */
queryString: string;
/** The field to aggregate. */
aggregationField?: string | null;
/** The query version. */
queryVersion?: string | null;
/** The percentile groups returned. */
percents?: number[] | null;
}
// refs: 1 - tags: named, input
/** The input for the GetPolicy operation. */
export interface GetPolicyRequest {
/** The name of the policy. */
policyName: string;
}
// refs: 1 - tags: named, input
/** The input for the GetPolicyVersion operation. */
export interface GetPolicyVersionRequest {
/** The name of the policy. */
policyName: string;
/** The policy version ID. */
policyVersionId: string;
}
// refs: 1 - tags: named, input
export interface GetStatisticsRequest {
/** The name of the index to search. */
indexName?: string | null;
/** The query used to search. */
queryString: string;
/** The aggregation field name. */
aggregationField?: string | null;
/** The version of the query used to search. */
queryVersion?: string | null;
}
// refs: 1 - tags: named, input
/** The input for the GetTopicRule operation. */
export interface GetTopicRuleRequest {
/** The name of the rule. */
ruleName: string;
}
// refs: 1 - tags: named, input
export interface GetTopicRuleDestinationRequest {
/** The ARN of the topic rule destination. */
arn: string;
}
// refs: 1 - tags: named, input
export interface ListActiveViolationsRequest {
/** The name of the thing whose active violations are listed. */
thingName?: string | null;
/** The name of the Device Defender security profile for which violations are listed. */
securityProfileName?: string | null;
/** The criteria for a behavior. */
behaviorCriteriaType?: BehaviorCriteriaType | null;
/** A list of all suppressed alerts. */
listSuppressedAlerts?: boolean | null;
/** The verification state of the violation (detect alarm). */
verificationState?: VerificationState | null;
/** The token for the next set of results. */
nextToken?: string | null;
/** The maximum number of results to return at one time. */
maxResults?: number | null;
}
// refs: 1 - tags: named, input
export interface ListAttachedPoliciesRequest {
/** The group or principal for which the policies will be listed. */
target: string;
/** When true, recursively list attached policies. */
recursive?: boolean | null;
/** The token to retrieve the next set of results. */
marker?: string | null;
/** The maximum number of results to be returned per request. */
pageSize?: number | null;
}
// refs: 1 - tags: named, input
export interface ListAuditFindingsRequest {
/** A filter to limit results to the audit with the specified ID. */
taskId?: string | null;
/** A filter to limit results to the findings for the specified audit check. */
checkName?: string | null;
/** Information identifying the noncompliant resource. */
resourceIdentifier?: ResourceIdentifier | null;
/** The maximum number of results to return at one time. */
maxResults?: number | null;
/** The token for the next set of results. */
nextToken?: string | null;
/** A filter to limit results to those found after the specified time. */
startTime?: Date | number | null;
/** A filter to limit results to those found before the specified time. */
endTime?: Date | number | null;
/** Boolean flag indicating whether only the suppressed findings or the unsuppressed findings should be listed. */
listSuppressedFindings?: boolean | null;
}
// refs: 1 - tags: named, input
export interface ListAuditMitigationActionsExecutionsRequest {
/** Specify this filter to limit results to actions for a specific audit mitigation actions task. */
taskId: string;
/** Specify this filter to limit results to those with a specific status. */
actionStatus?: AuditMitigationActionsExecutionStatus | null;
/** Specify this filter to limit results to those that were applied to a specific audit finding. */
findingId: string;
/** The maximum number of results to return at one time. */
maxResults?: number | null;
/** The token for the next set of results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, input
export interface ListAuditMitigationActionsTasksRequest {
/** Specify this filter to limit results to tasks that were applied to results for a specific audit. */
auditTaskId?: string | null;
/** Specify this filter to limit results to tasks that were applied to a specific audit finding. */
findingId?: string | null;
/** Specify this filter to limit results to tasks that are in a specific state. */
taskStatus?: AuditMitigationActionsTaskStatus | null;
/** The maximum number of results to return at one time. */
maxResults?: number | null;
/** The token for the next set of results. */
nextToken?: string | null;
/** Specify this filter to limit results to tasks that began on or after a specific date and time. */
startTime: Date | number;
/** Specify this filter to limit results to tasks that were completed or canceled on or before a specific date and time. */
endTime: Date | number;
}
// refs: 1 - tags: named, input
export interface ListAuditSuppressionsRequest {
checkName?: string | null;
resourceIdentifier?: ResourceIdentifier | null;
/** Determines whether suppressions are listed in ascending order by expiration date or not. */
ascendingOrder?: boolean | null;
/** The token for the next set of results. */
nextToken?: string | null;
/** The maximum number of results to return at one time. */
maxResults?: number | null;
}
// refs: 1 - tags: named, input
export interface ListAuditTasksRequest {
/** The beginning of the time period. */
startTime: Date | number;
/** The end of the time period. */
endTime: Date | number;
/** A filter to limit the output to the specified type of audit: can be one of "ON_DEMAND_AUDIT_TASK" or "SCHEDULED__AUDIT_TASK". */
taskType?: AuditTaskType | null;
/** A filter to limit the output to audits with the specified completion status: can be one of "IN_PROGRESS", "COMPLETED", "FAILED", or "CANCELED". */
taskStatus?: AuditTaskStatus | null;
/** The token for the next set of results. */
nextToken?: string | null;
/** The maximum number of results to return at one time. */
maxResults?: number | null;
}
// refs: 1 - tags: named, input
export interface ListAuthorizersRequest {
/** The maximum number of results to return at one time. */
pageSize?: number | null;
/** A marker used to get the next set of results. */
marker?: string | null;
/** Return the list of authorizers in ascending alphabetical order. */
ascendingOrder?: boolean | null;
/** The status of the list authorizers request. */
status?: AuthorizerStatus | null;
}
// refs: 1 - tags: named, input
export interface ListBillingGroupsRequest {
/** To retrieve the next set of results, the `nextToken` value from a previous response; otherwise *null* to receive the first set of results. */
nextToken?: string | null;
/** The maximum number of results to return per request. */
maxResults?: number | null;
/** Limit the results to billing groups whose names have the given prefix. */
namePrefixFilter?: string | null;
}
// refs: 1 - tags: named, input
/** Input for the ListCACertificates operation. */
export interface ListCACertificatesRequest {
/** The result page size. */
pageSize?: number | null;
/** The marker for the next set of results. */
marker?: string | null;
/** Determines the order of the results. */
ascendingOrder?: boolean | null;
}
// refs: 1 - tags: named, input
/** The input for the ListCertificates operation. */
export interface ListCertificatesRequest {
/** The result page size. */
pageSize?: number | null;
/** The marker for the next set of results. */
marker?: string | null;
/** Specifies the order for results. */
ascendingOrder?: boolean | null;
}
// refs: 1 - tags: named, input
/** The input to the ListCertificatesByCA operation. */
export interface ListCertificatesByCARequest {
/** The ID of the CA certificate. */
caCertificateId: string;
/** The result page size. */
pageSize?: number | null;
/** The marker for the next set of results. */
marker?: string | null;
/** Specifies the order for results. */
ascendingOrder?: boolean | null;
}
// refs: 1 - tags: named, input
export interface ListCustomMetricsRequest {
/** The token for the next set of results. */
nextToken?: string | null;
/** The maximum number of results to return at one time. */
maxResults?: number | null;
}
// refs: 1 - tags: named, input
export interface ListDetectMitigationActionsExecutionsRequest {
/** The unique identifier of the task. */
taskId?: string | null;
/** The unique identifier of the violation. */
violationId?: string | null;
/** The name of the thing whose mitigation actions are listed. */
thingName?: string | null;
/** A filter to limit results to those found after the specified time. */
startTime?: Date | number | null;
/** The end of the time period for which ML Detect mitigation actions executions are returned. */
endTime?: Date | number | null;
/** The maximum number of results to return at one time. */
maxResults?: number | null;
/** The token for the next set of results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, input
export interface ListDetectMitigationActionsTasksRequest {
/** The maximum number of results to return at one time. */
maxResults?: number | null;
/** The token for the next set of results. */
nextToken?: string | null;
/** A filter to limit results to those found after the specified time. */
startTime: Date | number;
/** The end of the time period for which ML Detect mitigation actions tasks are returned. */
endTime: Date | number;
}
// refs: 1 - tags: named, input
export interface ListDimensionsRequest {
/** The token for the next set of results. */
nextToken?: string | null;
/** The maximum number of results to retrieve at one time. */
maxResults?: number | null;
}
// refs: 1 - tags: named, input
export interface ListDomainConfigurationsRequest {
/** The marker for the next set of results. */
marker?: string | null;
/** The result page size. */
pageSize?: number | null;
/** The type of service delivered by the endpoint. */
serviceType?: ServiceType | null;
}
// refs: 1 - tags: named, input
export interface ListFleetMetricsRequest {
/** To retrieve the next set of results, the `nextToken` value from a previous response; otherwise `null` to receive the first set of results. */
nextToken?: string | null;
/** The maximum number of results to return in this operation. */
maxResults?: number | null;
}
// refs: 1 - tags: named, input
export interface ListIndicesRequest {
/** The token used to get the next set of results, or `null` if there are no additional results. */
nextToken?: string | null;
/** The maximum number of results to return at one time. */
maxResults?: number | null;
}
// refs: 1 - tags: named, input
export interface ListJobExecutionsForJobRequest {
/** The unique identifier you assigned to this job when it was created. */
jobId: string;
/** The status of the job. */
status?: JobExecutionStatus | null;
/** The maximum number of results to be returned per request. */
maxResults?: number | null;
/** The token to retrieve the next set of results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, input
export interface ListJobExecutionsForThingRequest {
/** The thing name. */
thingName: string;
/** An optional filter that lets you search for jobs that have the specified status. */
status?: JobExecutionStatus | null;
/** The namespace used to indicate that a job is a customer-managed job. */
namespaceId?: string | null;
/** The maximum number of results to be returned per request. */
maxResults?: number | null;
/** The token to retrieve the next set of results. */
nextToken?: string | null;
/** The unique identifier you assigned to this job when it was created. */
jobId?: string | null;
}
// refs: 1 - tags: named, input
export interface ListJobTemplatesRequest {
/** The maximum number of results to return in the list. */
maxResults?: number | null;
/** The token to use to return the next set of results in the list. */
nextToken?: string | null;
}
// refs: 1 - tags: named, input
export interface ListJobsRequest {
/** An optional filter that lets you search for jobs that have the specified status. */
status?: JobStatus | null;
/** Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things specified as targets have completed the job (SNAPSHOT). */
targetSelection?: TargetSelection | null;
/** The maximum number of results to return per request. */
maxResults?: number | null;
/** The token to retrieve the next set of results. */
nextToken?: string | null;
/** A filter that limits the returned jobs to those for the specified group. */
thingGroupName?: string | null;
/** A filter that limits the returned jobs to those for the specified group. */
thingGroupId?: string | null;
/** The namespace used to indicate that a job is a customer-managed job. */
namespaceId?: string | null;
}
// refs: 1 - tags: named, input
export interface ListManagedJobTemplatesRequest {
/** An optional parameter for template name. */
templateName?: string | null;
/** Maximum number of entries that can be returned. */
maxResults?: number | null;
/** The token to retrieve the next set of results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, input
export interface ListMitigationActionsRequest {
/** Specify a value to limit the result to mitigation actions with a specific action type. */
actionType?: MitigationActionType | null;
/** The maximum number of results to return at one time. */
maxResults?: number | null;
/** The token for the next set of results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, input
export interface ListOTAUpdatesRequest {
/** The maximum number of results to return at one time. */
maxResults?: number | null;
/** A token used to retrieve the next set of results. */
nextToken?: string | null;
/** The OTA update job status. */
otaUpdateStatus?: OTAUpdateStatus | null;
}
// refs: 1 - tags: named, input
/** The input to the ListOutgoingCertificates operation. */
export interface ListOutgoingCertificatesRequest {
/** The result page size. */
pageSize?: number | null;
/** The marker for the next set of results. */
marker?: string | null;
/** Specifies the order for results. */
ascendingOrder?: boolean | null;
}
// refs: 1 - tags: named, input
/** The input for the ListPolicies operation. */
export interface ListPoliciesRequest {
/** The marker for the next set of results. */
marker?: string | null;
/** The result page size. */
pageSize?: number | null;
/** Specifies the order for results. */
ascendingOrder?: boolean | null;
}
// refs: 1 - tags: named, input
/** The input for the ListPolicyPrincipals operation. */
export interface ListPolicyPrincipalsRequest {
/** The policy name. */
policyName: string;
/** The marker for the next set of results. */
marker?: string | null;
/** The result page size. */
pageSize?: number | null;
/** Specifies the order for results. */
ascendingOrder?: boolean | null;
}
// refs: 1 - tags: named, input
/** The input for the ListPolicyVersions operation. */
export interface ListPolicyVersionsRequest {
/** The policy name. */
policyName: string;
}
// refs: 1 - tags: named, input
/** The input for the ListPrincipalPolicies operation. */
export interface ListPrincipalPoliciesRequest {
/** The principal. */
principal: string;
/** The marker for the next set of results. */
marker?: string | null;
/** The result page size. */
pageSize?: number | null;
/** Specifies the order for results. */
ascendingOrder?: boolean | null;
}
// refs: 1 - tags: named, input
/** The input for the ListPrincipalThings operation. */
export interface ListPrincipalThingsRequest {
/** To retrieve the next set of results, the `nextToken` value from a previous response; otherwise *null* to receive the first set of results. */
nextToken?: string | null;
/** The maximum number of results to return in this operation. */
maxResults?: number | null;
/** The principal. */
principal: string;
}
// refs: 1 - tags: named, input
export interface ListProvisioningTemplateVersionsRequest {
/** The name of the fleet provisioning template. */
templateName: string;
/** The maximum number of results to return at one time. */
maxResults?: number | null;
/** A token to retrieve the next set of results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, input
export interface ListProvisioningTemplatesRequest {
/** The maximum number of results to return at one time. */
maxResults?: number | null;
/** A token to retrieve the next set of results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, input
export interface ListRoleAliasesRequest {
/** The maximum number of results to return at one time. */
pageSize?: number | null;
/** A marker used to get the next set of results. */
marker?: string | null;
/** Return the list of role aliases in ascending alphabetical order. */
ascendingOrder?: boolean | null;
}
// refs: 1 - tags: named, input
export interface ListScheduledAuditsRequest {
/** The token for the next set of results. */
nextToken?: string | null;
/** The maximum number of results to return at one time. */
maxResults?: number | null;
}
// refs: 1 - tags: named, input
export interface ListSecurityProfilesRequest {
/** The token for the next set of results. */
nextToken?: string | null;
/** The maximum number of results to return at one time. */
maxResults?: number | null;
/** A filter to limit results to the security profiles that use the defined dimension. */
dimensionName?: string | null;
/** The name of the custom metric. */
metricName?: string | null;
}
// refs: 1 - tags: named, input
export interface ListSecurityProfilesForTargetRequest {
/** The token for the next set of results. */
nextToken?: string | null;
/** The maximum number of results to return at one time. */
maxResults?: number | null;
/** If true, return child groups too. */
recursive?: boolean | null;
/** The ARN of the target (thing group) whose attached security profiles you want to get. */
securityProfileTargetArn: string;
}
// refs: 1 - tags: named, input
export interface ListStreamsRequest {
/** The maximum number of results to return at a time. */
maxResults?: number | null;
/** A token used to get the next set of results. */
nextToken?: string | null;
/** Set to true to return the list of streams in ascending order. */
ascendingOrder?: boolean | null;
}
// refs: 1 - tags: named, input
export interface ListTagsForResourceRequest {
/** The ARN of the resource. */
resourceArn: string;
/** To retrieve the next set of results, the `nextToken` value from a previous response; otherwise *null* to receive the first set of results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, input
export interface ListTargetsForPolicyRequest {
/** The policy name. */
policyName: string;
/** A marker used to get the next set of results. */
marker?: string | null;
/** The maximum number of results to return at one time. */
pageSize?: number | null;
}
// refs: 1 - tags: named, input
export interface ListTargetsForSecurityProfileRequest {
/** The security profile. */
securityProfileName: string;
/** The token for the next set of results. */
nextToken?: string | null;
/** The maximum number of results to return at one time. */
maxResults?: number | null;
}
// refs: 1 - tags: named, input
export interface ListThingGroupsRequest {
/** To retrieve the next set of results, the `nextToken` value from a previous response; otherwise *null* to receive the first set of results. */
nextToken?: string | null;
/** The maximum number of results to return at one time. */
maxResults?: number | null;
/** A filter that limits the results to those with the specified parent group. */
parentGroup?: string | null;
/** A filter that limits the results to those with the specified name prefix. */
namePrefixFilter?: string | null;
/** If true, return child groups as well. */
recursive?: boolean | null;
}
// refs: 1 - tags: named, input
export interface ListThingGroupsForThingRequest {
/** The thing name. */
thingName: string;
/** To retrieve the next set of results, the `nextToken` value from a previous response; otherwise *null* to receive the first set of results. */
nextToken?: string | null;
/** The maximum number of results to return at one time. */
maxResults?: number | null;
}
// refs: 1 - tags: named, input
/** The input for the ListThingPrincipal operation. */
export interface ListThingPrincipalsRequest {
/** To retrieve the next set of results, the `nextToken` value from a previous response; otherwise *null* to receive the first set of results. */
nextToken?: string | null;
/** The maximum number of results to return in this operation. */
maxResults?: number | null;
/** The name of the thing. */
thingName: string;
}
// refs: 1 - tags: named, input
export interface ListThingRegistrationTaskReportsRequest {
/** The id of the task. */
taskId: string;
/** The type of task report. */
reportType: ReportType;
/** To retrieve the next set of results, the `nextToken` value from a previous response; otherwise *null* to receive the first set of results. */
nextToken?: string | null;
/** The maximum number of results to return per request. */
maxResults?: number | null;
}
// refs: 1 - tags: named, input
export interface ListThingRegistrationTasksRequest {
/** To retrieve the next set of results, the `nextToken` value from a previous response; otherwise *null* to receive the first set of results. */
nextToken?: string | null;
/** The maximum number of results to return at one time. */
maxResults?: number | null;
/** The status of the bulk thing provisioning task. */
status?: Status | null;
}
// refs: 1 - tags: named, input
/** The input for the ListThingTypes operation. */
export interface ListThingTypesRequest {
/** To retrieve the next set of results, the `nextToken` value from a previous response; otherwise *null* to receive the first set of results. */
nextToken?: string | null;
/** The maximum number of results to return in this operation. */
maxResults?: number | null;
/** The name of the thing type. */
thingTypeName?: string | null;
}
// refs: 1 - tags: named, input
/** The input for the ListThings operation. */
export interface ListThingsRequest {
/** To retrieve the next set of results, the `nextToken` value from a previous response; otherwise *null* to receive the first set of results. */
nextToken?: string | null;
/** The maximum number of results to return in this operation. */
maxResults?: number | null;
/** The attribute name used to search for things. */
attributeName?: string | null;
/** The attribute value used to search for things. */
attributeValue?: string | null;
/** The name of the thing type used to search for things. */
thingTypeName?: string | null;
/** When `true`, the action returns the thing resources with attribute values that start with the `attributeValue` provided. */
usePrefixAttributeValue?: boolean | null;
}
// refs: 1 - tags: named, input
export interface ListThingsInBillingGroupRequest {
/** The name of the billing group. */
billingGroupName: string;
/** To retrieve the next set of results, the `nextToken` value from a previous response; otherwise *null* to receive the first set of results. */
nextToken?: string | null;
/** The maximum number of results to return per request. */
maxResults?: number | null;
}
// refs: 1 - tags: named, input
export interface ListThingsInThingGroupRequest {
/** The thing group name. */
thingGroupName: string;
/** When true, list things in this thing group and in all child groups as well. */
recursive?: boolean | null;
/** To retrieve the next set of results, the `nextToken` value from a previous response; otherwise *null* to receive the first set of results. */
nextToken?: string | null;
/** The maximum number of results to return at one time. */
maxResults?: number | null;
}
// refs: 1 - tags: named, input
export interface ListTopicRuleDestinationsRequest {
/** The maximum number of results to return at one time. */
maxResults?: number | null;
/** To retrieve the next set of results, the `nextToken` value from a previous response; otherwise *null* to receive the first set of results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, input
/** The input for the ListTopicRules operation. */
export interface ListTopicRulesRequest {
/** The topic. */
topic?: string | null;
/** The maximum number of results to return. */
maxResults?: number | null;
/** To retrieve the next set of results, the `nextToken` value from a previous response; otherwise *null* to receive the first set of results. */
nextToken?: string | null;
/** Specifies whether the rule is disabled. */
ruleDisabled?: boolean | null;
}
// refs: 1 - tags: named, input
export interface ListV2LoggingLevelsRequest {
/** The type of resource for which you are configuring logging. */
targetType?: LogTargetType | null;
/** To retrieve the next set of results, the `nextToken` value from a previous response; otherwise *null* to receive the first set of results. */
nextToken?: string | null;
/** The maximum number of results to return at one time. */
maxResults?: number | null;
}
// refs: 1 - tags: named, input
export interface ListViolationEventsRequest {
/** The start time for the alerts to be listed. */
startTime: Date | number;
/** The end time for the alerts to be listed. */
endTime: Date | number;
/** A filter to limit results to those alerts caused by the specified thing. */
thingName?: string | null;
/** A filter to limit results to those alerts generated by the specified security profile. */
securityProfileName?: string | null;
/** The criteria for a behavior. */
behaviorCriteriaType?: BehaviorCriteriaType | null;
/** A list of all suppressed alerts. */
listSuppressedAlerts?: boolean | null;
/** The verification state of the violation (detect alarm). */
verificationState?: VerificationState | null;
/** The token for the next set of results. */
nextToken?: string | null;
/** The maximum number of results to return at one time. */
maxResults?: number | null;
}
// refs: 1 - tags: named, input
export interface PutVerificationStateOnViolationRequest {
/** The violation ID. */
violationId: string;
/** The verification state of the violation. */
verificationState: VerificationState;
/** The description of the verification state of the violation (detect alarm). */
verificationStateDescription?: string | null;
}
// refs: 1 - tags: named, input
/** The input to the RegisterCACertificate operation. */
export interface RegisterCACertificateRequest {
/** The CA certificate. */
caCertificate: string;
/** The private key verification certificate. */
verificationCertificate: string;
/** A boolean value that specifies if the CA certificate is set to active. */
setAsActive?: boolean | null;
/** Allows this CA certificate to be used for auto registration of device certificates. */
allowAutoRegistration?: boolean | null;
/** Information about the registration configuration. */
registrationConfig?: RegistrationConfig | null;
/** Metadata which can be used to manage the CA certificate. */
tags?: Tag[] | null;
}
// refs: 1 - tags: named, input
/** The input to the RegisterCertificate operation. */
export interface RegisterCertificateRequest {
/** The certificate data, in PEM format. */
certificatePem: string;
/** The CA certificate used to sign the device certificate being registered. */
caCertificatePem?: string | null;
/** A boolean value that specifies if the certificate is set to active. */
setAsActive?: boolean | null;
/** The status of the register certificate request. */
status?: CertificateStatus | null;
}
// refs: 1 - tags: named, input
export interface RegisterCertificateWithoutCARequest {
/** The certificate data, in PEM format. */
certificatePem: string;
/** The status of the register certificate request. */
status?: CertificateStatus | null;
}
// refs: 1 - tags: named, input
export interface RegisterThingRequest {
/** The provisioning template. */
templateBody: string;
/** The parameters for provisioning a thing. */
parameters?: { [key: string]: string | null | undefined } | null;
}
// refs: 1 - tags: named, input
/** The input for the RejectCertificateTransfer operation. */
export interface RejectCertificateTransferRequest {
/** The ID of the certificate. */
certificateId: string;
/** The reason the certificate transfer was rejected. */
rejectReason?: string | null;
}
// refs: 1 - tags: named, input
export interface RemoveThingFromBillingGroupRequest {
/** The name of the billing group. */
billingGroupName?: string | null;
/** The ARN of the billing group. */
billingGroupArn?: string | null;
/** The name of the thing to be removed from the billing group. */
thingName?: string | null;
/** The ARN of the thing to be removed from the billing group. */
thingArn?: string | null;
}
// refs: 1 - tags: named, input
export interface RemoveThingFromThingGroupRequest {
/** The group name. */
thingGroupName?: string | null;
/** The group ARN. */
thingGroupArn?: string | null;
/** The name of the thing to remove from the group. */
thingName?: string | null;
/** The ARN of the thing to remove from the group. */
thingArn?: string | null;
}
// refs: 1 - tags: named, input
/** The input for the ReplaceTopicRule operation. */
export interface ReplaceTopicRuleRequest {
/** The name of the rule. */
ruleName: string;
/** The rule payload. */
topicRulePayload: TopicRulePayload;
}
// refs: 1 - tags: named, input
export interface SearchIndexRequest {
/** The search index name. */
indexName?: string | null;
/** The search query string. */
queryString: string;
/** The token used to get the next set of results, or `null` if there are no additional results. */
nextToken?: string | null;
/** The maximum number of results to return at one time. */
maxResults?: number | null;
/** The query version. */
queryVersion?: string | null;
}
// refs: 1 - tags: named, input
export interface SetDefaultAuthorizerRequest {
/** The authorizer name. */
authorizerName: string;
}
// refs: 1 - tags: named, input
/** The input for the SetDefaultPolicyVersion operation. */
export interface SetDefaultPolicyVersionRequest {
/** The policy name. */
policyName: string;
/** The policy version ID. */
policyVersionId: string;
}
// refs: 1 - tags: named, input
/** The input for the SetLoggingOptions operation. */
export interface SetLoggingOptionsRequest {
/** The logging options payload. */
loggingOptionsPayload: LoggingOptionsPayload;
}
// refs: 1 - tags: named, input
export interface SetV2LoggingLevelRequest {
/** The log target. */
logTarget: LogTarget;
/** The log level. */
logLevel: LogLevel;
}
// refs: 1 - tags: named, input
export interface SetV2LoggingOptionsRequest {
/** The ARN of the role that allows IoT to write to Cloudwatch logs. */
roleArn?: string | null;
/** The default logging level. */
defaultLogLevel?: LogLevel | null;
/** If true all logs are disabled. */
disableAllLogs?: boolean | null;
}
// refs: 1 - tags: named, input
export interface StartAuditMitigationActionsTaskRequest {
/** A unique identifier for the task. */
taskId: string;
/** Specifies the audit findings to which the mitigation actions are applied. */
target: AuditMitigationActionsTaskTarget;
/** For an audit check, specifies which mitigation actions to apply. */
auditCheckToActionsMapping: { [key: string]: string[] | null | undefined };
/** Each audit mitigation task must have a unique client request token. */
clientRequestToken: string;
}
// refs: 1 - tags: named, input
export interface StartDetectMitigationActionsTaskRequest {
/** The unique identifier of the task. */
taskId: string;
/** Specifies the ML Detect findings to which the mitigation actions are applied. */
target: DetectMitigationActionsTaskTarget;
/** The actions to be performed when a device has unexpected behavior. */
actions: string[];
/** Specifies the time period of which violation events occurred between. */
violationEventOccurrenceRange?: ViolationEventOccurrenceRange | null;
/** Specifies to list only active violations. */
includeOnlyActiveViolations?: boolean | null;
/** Specifies to include suppressed alerts. */
includeSuppressedAlerts?: boolean | null;
/** Each mitigation action task must have a unique client request token. */
clientRequestToken: string;
}
// refs: 1 - tags: named, input
export interface StartOnDemandAuditTaskRequest {
/** Which checks are performed during the audit. */
targetCheckNames: string[];
}
// refs: 1 - tags: named, input
export interface StartThingRegistrationTaskRequest {
/** The provisioning template. */
templateBody: string;
/** The S3 bucket that contains the input file. */
inputFileBucket: string;
/** The name of input file within the S3 bucket. */
inputFileKey: string;
/** The IAM role ARN that grants permission the input file. */
roleArn: string;
}
// refs: 1 - tags: named, input
export interface StopThingRegistrationTaskRequest {
/** The bulk thing provisioning task ID. */
taskId: string;
}
// refs: 1 - tags: named, input
export interface TagResourceRequest {
/** The ARN of the resource. */
resourceArn: string;
/** The new or modified tags for the resource. */
tags: Tag[];
}
// refs: 1 - tags: named, input
export interface TestAuthorizationRequest {
/** The principal. */
principal?: string | null;
/** The Cognito identity pool ID. */
cognitoIdentityPoolId?: string | null;
/** A list of authorization info objects. */
authInfos: AuthInfo[];
/** The MQTT client ID. */
clientId?: string | null;
/** When testing custom authorization, the policies specified here are treated as if they are attached to the principal being authorized. */
policyNamesToAdd?: string[] | null;
/** When testing custom authorization, the policies specified here are treated as if they are not attached to the principal being authorized. */
policyNamesToSkip?: string[] | null;
}
// refs: 1 - tags: named, input
export interface TestInvokeAuthorizerRequest {
/** The custom authorizer name. */
authorizerName: string;
/** The token returned by your custom authentication service. */
token?: string | null;
/** The signature made with the token and your custom authentication service's private key. */
tokenSignature?: string | null;
/** Specifies a test HTTP authorization request. */
httpContext?: HttpContext | null;
/** Specifies a test MQTT authorization request. */
mqttContext?: MqttContext | null;
/** Specifies a test TLS authorization request. */
tlsContext?: TlsContext | null;
}
// refs: 1 - tags: named, input
/** The input for the TransferCertificate operation. */
export interface TransferCertificateRequest {
/** The ID of the certificate. */
certificateId: string;
/** The Amazon Web Services account. */
targetAwsAccount: string;
/** The transfer message. */
transferMessage?: string | null;
}
// refs: 1 - tags: named, input
export interface UntagResourceRequest {
/** The ARN of the resource. */
resourceArn: string;
/** A list of the keys of the tags to be removed from the resource. */
tagKeys: string[];
}
// refs: 1 - tags: named, input
export interface UpdateAccountAuditConfigurationRequest {
/** The Amazon Resource Name (ARN) of the role that grants permission to IoT to access information about your devices, policies, certificates, and other items as required when performing an audit. */
roleArn?: string | null;
/** Information about the targets to which audit notifications are sent. */
auditNotificationTargetConfigurations?: { [key in AuditNotificationType]: AuditNotificationTarget | null | undefined } | null;
/** Specifies which audit checks are enabled and disabled for this account. */
auditCheckConfigurations?: { [key: string]: AuditCheckConfiguration | null | undefined } | null;
}
// refs: 1 - tags: named, input
export interface UpdateAuditSuppressionRequest {
checkName: string;
resourceIdentifier: ResourceIdentifier;
/** The expiration date (epoch timestamp in seconds) that you want the suppression to adhere to. */
expirationDate?: Date | number | null;
/** Indicates whether a suppression should exist indefinitely or not. */
suppressIndefinitely?: boolean | null;
/** The description of the audit suppression. */
description?: string | null;
}
// refs: 1 - tags: named, input
export interface UpdateAuthorizerRequest {
/** The authorizer name. */
authorizerName: string;
/** The ARN of the authorizer's Lambda function. */
authorizerFunctionArn?: string | null;
/** The key used to extract the token from the HTTP headers. */
tokenKeyName?: string | null;
/** The public keys used to verify the token signature. */
tokenSigningPublicKeys?: { [key: string]: string | null | undefined } | null;
/** The status of the update authorizer request. */
status?: AuthorizerStatus | null;
/** When `true`, the result from the authorizer’s Lambda function is cached for the time specified in `refreshAfterInSeconds`. */
enableCachingForHttp?: boolean | null;
}
// refs: 1 - tags: named, input
export interface UpdateBillingGroupRequest {
/** The name of the billing group. */
billingGroupName: string;
/** The properties of the billing group. */
billingGroupProperties: BillingGroupProperties;
/** The expected version of the billing group. */
expectedVersion?: number | null;
}
// refs: 1 - tags: named, input
/** The input to the UpdateCACertificate operation. */
export interface UpdateCACertificateRequest {
/** The CA certificate identifier. */
certificateId: string;
/** The updated status of the CA certificate. */
newStatus?: CACertificateStatus | null;
/** The new value for the auto registration status. */
newAutoRegistrationStatus?: AutoRegistrationStatus | null;
/** Information about the registration configuration. */
registrationConfig?: RegistrationConfig | null;
/** If true, removes auto registration. */
removeAutoRegistration?: boolean | null;
}
// refs: 1 - tags: named, input
/** The input for the UpdateCertificate operation. */
export interface UpdateCertificateRequest {
/** The ID of the certificate. */
certificateId: string;
/** The new status. */
newStatus: CertificateStatus;
}
// refs: 1 - tags: named, input
export interface UpdateCustomMetricRequest {
/** The name of the custom metric. */
metricName: string;
/** Field represents a friendly name in the console for the custom metric, it doesn't have to be unique. */
displayName: string;
}
// refs: 1 - tags: named, input
export interface UpdateDimensionRequest {
/** A unique identifier for the dimension. */
name: string;
/** Specifies the value or list of values for the dimension. */
stringValues: string[];
}
// refs: 1 - tags: named, input
export interface UpdateDomainConfigurationRequest {
/** The name of the domain configuration to be updated. */
domainConfigurationName: string;
/** An object that specifies the authorization service for a domain. */
authorizerConfig?: AuthorizerConfig | null;
/** The status to which the domain configuration should be updated. */
domainConfigurationStatus?: DomainConfigurationStatus | null;
/** Removes the authorization configuration from a domain. */
removeAuthorizerConfig?: boolean | null;
}
// refs: 1 - tags: named, input
export interface UpdateDynamicThingGroupRequest {
/** The name of the dynamic thing group to update. */
thingGroupName: string;
/** The dynamic thing group properties to update. */
thingGroupProperties: ThingGroupProperties;
/** The expected version of the dynamic thing group to update. */
expectedVersion?: number | null;
/** The dynamic thing group index to update. */
indexName?: string | null;
/** The dynamic thing group search query string to update. */
queryString?: string | null;
/** The dynamic thing group query version to update. */
queryVersion?: string | null;
}
// refs: 1 - tags: named, input
export interface UpdateEventConfigurationsRequest {
/** The new event configuration values. */
eventConfigurations?: { [key in EventType]: Configuration | null | undefined } | null;
}
// refs: 1 - tags: named, input
export interface UpdateFleetMetricRequest {
/** The name of the fleet metric to update. */
metricName: string;
/** The search query string. */
queryString?: string | null;
/** The type of the aggregation query. */
aggregationType?: AggregationType | null;
/** The time in seconds between fleet metric emissions. */
period?: number | null;
/** The field to aggregate. */
aggregationField?: string | null;
/** The description of the fleet metric. */
description?: string | null;
/** The version of the query. */
queryVersion?: string | null;
/** The name of the index to search. */
indexName: string;
/** Used to support unit transformation such as milliseconds to seconds. */
unit?: FleetMetricUnit | null;
/** The expected version of the fleet metric record in the registry. */
expectedVersion?: number | null;
}
// refs: 1 - tags: named, input
export interface UpdateIndexingConfigurationRequest {
/** Thing indexing configuration. */
thingIndexingConfiguration?: ThingIndexingConfiguration | null;
/** Thing group indexing configuration. */
thingGroupIndexingConfiguration?: ThingGroupIndexingConfiguration | null;
}
// refs: 1 - tags: named, input
export interface UpdateJobRequest {
/** The ID of the job to be updated. */
jobId: string;
/** A short text description of the job. */
description?: string | null;
/** Configuration information for pre-signed S3 URLs. */
presignedUrlConfig?: PresignedUrlConfig | null;
/** Allows you to create a staged rollout of the job. */
jobExecutionsRolloutConfig?: JobExecutionsRolloutConfig | null;
/** Allows you to create criteria to abort a job. */
abortConfig?: AbortConfig | null;
/** Specifies the amount of time each device has to finish its execution of the job. */
timeoutConfig?: TimeoutConfig | null;
/** The namespace used to indicate that a job is a customer-managed job. */
namespaceId?: string | null;
/** Allows you to create the criteria to retry a job. */
jobExecutionsRetryConfig?: JobExecutionsRetryConfig | null;
}
// refs: 1 - tags: named, input
export interface UpdateMitigationActionRequest {
/** The friendly name for the mitigation action. */
actionName: string;
/** The ARN of the IAM role that is used to apply the mitigation action. */
roleArn?: string | null;
/** Defines the type of action and the parameters for that action. */
actionParams?: MitigationActionParams | null;
}
// refs: 1 - tags: named, input
export interface UpdateProvisioningTemplateRequest {
/** The name of the fleet provisioning template. */
templateName: string;
/** The description of the fleet provisioning template. */
description?: string | null;
/** True to enable the fleet provisioning template, otherwise false. */
enabled?: boolean | null;
/** The ID of the default provisioning template version. */
defaultVersionId?: number | null;
/** The ARN of the role associated with the provisioning template. */
provisioningRoleArn?: string | null;
/** Updates the pre-provisioning hook template. */
preProvisioningHook?: ProvisioningHook | null;
/** Removes pre-provisioning hook template. */
removePreProvisioningHook?: boolean | null;
}
// refs: 1 - tags: named, input
export interface UpdateRoleAliasRequest {
/** The role alias to update. */
roleAlias: string;
/** The role ARN. */
roleArn?: string | null;
/** The number of seconds the credential will be valid. */
credentialDurationSeconds?: number | null;
}
// refs: 1 - tags: named, input
export interface UpdateScheduledAuditRequest {
/** How often the scheduled audit takes place, either `DAILY`, `WEEKLY`, `BIWEEKLY`, or `MONTHLY`. */
frequency?: AuditFrequency | null;
/** The day of the month on which the scheduled audit takes place. */
dayOfMonth?: string | null;
/** The day of the week on which the scheduled audit takes place. */
dayOfWeek?: DayOfWeek | null;
/** Which checks are performed during the scheduled audit. */
targetCheckNames?: string[] | null;
/** The name of the scheduled audit. */
scheduledAuditName: string;
}
// refs: 1 - tags: named, input
export interface UpdateSecurityProfileRequest {
/** The name of the security profile you want to update. */
securityProfileName: string;
/** A description of the security profile. */
securityProfileDescription?: string | null;
/** Specifies the behaviors that, when violated by a device (thing), cause an alert. */
behaviors?: Behavior[] | null;
/** Where the alerts are sent. */
alertTargets?: { [key in AlertTargetType]: AlertTarget | null | undefined } | null;
/** _Please use "UpdateSecurityProfileRequest$additionalMetricsToRetainV2" instead._ */
additionalMetricsToRetain?: string[] | null;
/** A list of metrics whose data is retained (stored). */
additionalMetricsToRetainV2?: MetricToRetain[] | null;
/** If true, delete all `behaviors` defined for this security profile. */
deleteBehaviors?: boolean | null;
/** If true, delete all `alertTargets` defined for this security profile. */
deleteAlertTargets?: boolean | null;
/** If true, delete all `additionalMetricsToRetain` defined for this security profile. */
deleteAdditionalMetricsToRetain?: boolean | null;
/** The expected version of the security profile. */
expectedVersion?: number | null;
}
// refs: 1 - tags: named, input
export interface UpdateStreamRequest {
/** The stream ID. */
streamId: string;
/** The description of the stream. */
description?: string | null;
/** The files associated with the stream. */
files?: StreamFile[] | null;
/** An IAM role that allows the IoT service principal assumes to access your S3 files. */
roleArn?: string | null;
}
// refs: 1 - tags: named, input
/** The input for the UpdateThing operation. */
export interface UpdateThingRequest {
/** The name of the thing to update. */
thingName: string;
/** The name of the thing type. */
thingTypeName?: string | null;
/** A list of thing attributes, a JSON string containing name-value pairs. */
attributePayload?: AttributePayload | null;
/** The expected version of the thing record in the registry. */
expectedVersion?: number | null;
/** Remove a thing type association. */
removeThingType?: boolean | null;
}
// refs: 1 - tags: named, input
export interface UpdateThingGroupRequest {
/** The thing group to update. */
thingGroupName: string;
/** The thing group properties. */
thingGroupProperties: ThingGroupProperties;
/** The expected version of the thing group. */
expectedVersion?: number | null;
}
// refs: 1 - tags: named, input
export interface UpdateThingGroupsForThingRequest {
/** The thing whose group memberships will be updated. */
thingName?: string | null;
/** The groups to which the thing will be added. */
thingGroupsToAdd?: string[] | null;
/** The groups from which the thing will be removed. */
thingGroupsToRemove?: string[] | null;
/** Override dynamic thing groups with static thing groups when 10-group limit is reached. */
overrideDynamicGroups?: boolean | null;
}
// refs: 1 - tags: named, input
export interface UpdateTopicRuleDestinationRequest {
/** The ARN of the topic rule destination. */
arn: string;
/** The status of the topic rule destination. */
status: TopicRuleDestinationStatus;
}
// refs: 1 - tags: named, input
export interface ValidateSecurityProfileBehaviorsRequest {
/** Specifies the behaviors that, when violated by a device (thing), cause an alert. */
behaviors: Behavior[];
}
// refs: 1 - tags: named, output
export interface AssociateTargetsWithJobResponse {
/** An ARN identifying the job. */
jobArn?: string | null;
/** The unique identifier you assigned to this job when it was created. */
jobId?: string | null;
/** A short text description of the job. */
description?: string | null;
}
// refs: 1 - tags: named, output
export interface CancelJobResponse {
/** The job ARN. */
jobArn?: string | null;
/** The unique identifier you assigned to this job when it was created. */
jobId?: string | null;
/** A short text description of the job. */
description?: string | null;
}
// refs: 1 - tags: named, output
export interface CreateAuthorizerResponse {
/** The authorizer's name. */
authorizerName?: string | null;
/** The authorizer ARN. */
authorizerArn?: string | null;
}
// refs: 1 - tags: named, output
export interface CreateBillingGroupResponse {
/** The name you gave to the billing group. */
billingGroupName?: string | null;
/** The ARN of the billing group. */
billingGroupArn?: string | null;
/** The ID of the billing group. */
billingGroupId?: string | null;
}
// refs: 1 - tags: named, output
/** The output from the CreateCertificateFromCsr operation. */
export interface CreateCertificateFromCsrResponse {
/** The Amazon Resource Name (ARN) of the certificate. */
certificateArn?: string | null;
/** The ID of the certificate. */
certificateId?: string | null;
/** The certificate data, in PEM format. */
certificatePem?: string | null;
}
// refs: 1 - tags: named, output
export interface CreateCustomMetricResponse {
/** The name of the custom metric to be used in the metric report. */
metricName?: string | null;
/** The Amazon Resource Number (ARN) of the custom metric, e.g. */
metricArn?: string | null;
}
// refs: 1 - tags: named, output
export interface CreateDimensionResponse {
/** A unique identifier for the dimension. */
name?: string | null;
/** The Amazon Resource Name (ARN) of the created dimension. */
arn?: string | null;
}
// refs: 1 - tags: named, output
export interface CreateDomainConfigurationResponse {
/** The name of the domain configuration. */
domainConfigurationName?: string | null;
/** The ARN of the domain configuration. */
domainConfigurationArn?: string | null;
}
// refs: 1 - tags: named, output
export interface CreateDynamicThingGroupResponse {
/** The dynamic thing group name. */
thingGroupName?: string | null;
/** The dynamic thing group ARN. */
thingGroupArn?: string | null;
/** The dynamic thing group ID. */
thingGroupId?: string | null;
/** The dynamic thing group index name. */
indexName?: string | null;
/** The dynamic thing group search query string. */
queryString?: string | null;
/** The dynamic thing group query version. */
queryVersion?: string | null;
}
// refs: 1 - tags: named, output
export interface CreateFleetMetricResponse {
/** The name of the fleet metric to create. */
metricName?: string | null;
/** The Amazon Resource Name (ARN) of the new fleet metric. */
metricArn?: string | null;
}
// refs: 1 - tags: named, output
export interface CreateJobResponse {
/** The job ARN. */
jobArn?: string | null;
/** The unique identifier you assigned to this job. */
jobId?: string | null;
/** The job description. */
description?: string | null;
}
// refs: 1 - tags: named, output
export interface CreateJobTemplateResponse {
/** The ARN of the job template. */
jobTemplateArn?: string | null;
/** The unique identifier of the job template. */
jobTemplateId?: string | null;
}
// refs: 1 - tags: named, output
/** The output of the CreateKeysAndCertificate operation. */
export interface CreateKeysAndCertificateResponse {
/** The ARN of the certificate. */
certificateArn?: string | null;
/** The ID of the certificate. */
certificateId?: string | null;
/** The certificate data, in PEM format. */
certificatePem?: string | null;
/** The generated key pair. */
keyPair?: KeyPair | null;
}
// refs: 1 - tags: named, output
export interface CreateMitigationActionResponse {
/** The ARN for the new mitigation action. */
actionArn?: string | null;
/** A unique identifier for the new mitigation action. */
actionId?: string | null;
}
// refs: 1 - tags: named, output
export interface CreateOTAUpdateResponse {
/** The OTA update ID. */
otaUpdateId?: string | null;
/** The IoT job ID associated with the OTA update. */
awsIotJobId?: string | null;
/** The OTA update ARN. */
otaUpdateArn?: string | null;
/** The IoT job ARN associated with the OTA update. */
awsIotJobArn?: string | null;
/** The OTA update status. */
otaUpdateStatus?: OTAUpdateStatus | null;
}
// refs: 1 - tags: named, output
/** The output from the CreatePolicy operation. */
export interface CreatePolicyResponse {
/** The policy name. */
policyName?: string | null;
/** The policy ARN. */
policyArn?: string | null;
/** The JSON document that describes the policy. */
policyDocument?: string | null;
/** The policy version ID. */
policyVersionId?: string | null;
}
// refs: 1 - tags: named, output
/** The output of the CreatePolicyVersion operation. */
export interface CreatePolicyVersionResponse {
/** The policy ARN. */
policyArn?: string | null;
/** The JSON document that describes the policy. */
policyDocument?: string | null;
/** The policy version ID. */
policyVersionId?: string | null;
/** Specifies whether the policy version is the default. */
isDefaultVersion?: boolean | null;
}
// refs: 1 - tags: named, output
export interface CreateProvisioningClaimResponse {
/** The ID of the certificate. */
certificateId?: string | null;
/** The provisioning claim certificate. */
certificatePem?: string | null;
/** The provisioning claim key pair. */
keyPair?: KeyPair | null;
/** The provisioning claim expiration time. */
expiration?: Date | number | null;
}
// refs: 1 - tags: named, output
export interface CreateProvisioningTemplateResponse {
/** The ARN that identifies the provisioning template. */
templateArn?: string | null;
/** The name of the fleet provisioning template. */
templateName?: string | null;
/** The default version of the fleet provisioning template. */
defaultVersionId?: number | null;
}
// refs: 1 - tags: named, output
export interface CreateProvisioningTemplateVersionResponse {
/** The ARN that identifies the provisioning template. */
templateArn?: string | null;
/** The name of the fleet provisioning template. */
templateName?: string | null;
/** The version of the fleet provisioning template. */
versionId?: number | null;
/** True if the fleet provisioning template version is the default version, otherwise false. */
isDefaultVersion?: boolean | null;
}
// refs: 1 - tags: named, output
export interface CreateRoleAliasResponse {
/** The role alias. */
roleAlias?: string | null;
/** The role alias ARN. */
roleAliasArn?: string | null;
}
// refs: 1 - tags: named, output
export interface CreateScheduledAuditResponse {
/** The ARN of the scheduled audit. */
scheduledAuditArn?: string | null;
}
// refs: 1 - tags: named, output
export interface CreateSecurityProfileResponse {
/** The name you gave to the security profile. */
securityProfileName?: string | null;
/** The ARN of the security profile. */
securityProfileArn?: string | null;
}
// refs: 1 - tags: named, output
export interface CreateStreamResponse {
/** The stream ID. */
streamId?: string | null;
/** The stream ARN. */
streamArn?: string | null;
/** A description of the stream. */
description?: string | null;
/** The version of the stream. */
streamVersion?: number | null;
}
// refs: 1 - tags: named, output
/** The output of the CreateThing operation. */
export interface CreateThingResponse {
/** The name of the new thing. */
thingName?: string | null;
/** The ARN of the new thing. */
thingArn?: string | null;
/** The thing ID. */
thingId?: string | null;
}
// refs: 1 - tags: named, output
export interface CreateThingGroupResponse {
/** The thing group name. */
thingGroupName?: string | null;
/** The thing group ARN. */
thingGroupArn?: string | null;
/** The thing group ID. */
thingGroupId?: string | null;
}
// refs: 1 - tags: named, output
/** The output of the CreateThingType operation. */
export interface CreateThingTypeResponse {
/** The name of the thing type. */
thingTypeName?: string | null;
/** The Amazon Resource Name (ARN) of the thing type. */
thingTypeArn?: string | null;
/** The thing type ID. */
thingTypeId?: string | null;
}
// refs: 1 - tags: named, output
export interface CreateTopicRuleDestinationResponse {
/** The topic rule destination. */
topicRuleDestination?: TopicRuleDestination | null;
}
// refs: 1 - tags: named, output
export interface DescribeAccountAuditConfigurationResponse {
/** The ARN of the role that grants permission to IoT to access information about your devices, policies, certificates, and other items as required when performing an audit. */
roleArn?: string | null;
/** Information about the targets to which audit notifications are sent for this account. */
auditNotificationTargetConfigurations?: { [key in AuditNotificationType]: AuditNotificationTarget | null | undefined } | null;
/** Which audit checks are enabled and disabled for this account. */
auditCheckConfigurations?: { [key: string]: AuditCheckConfiguration | null | undefined } | null;
}
// refs: 1 - tags: named, output
export interface DescribeAuditFindingResponse {
finding?: AuditFinding | null;
}
// refs: 1 - tags: named, output
export interface DescribeAuditMitigationActionsTaskResponse {
/** The current status of the task. */
taskStatus?: AuditMitigationActionsTaskStatus | null;
/** The date and time when the task was started. */
startTime?: Date | number | null;
/** The date and time when the task was completed or canceled. */
endTime?: Date | number | null;
/** Aggregate counts of the results when the mitigation tasks were applied to the findings for this audit mitigation actions task. */
taskStatistics?: { [key: string]: TaskStatisticsForAuditCheck | null | undefined } | null;
/** Identifies the findings to which the mitigation actions are applied. */
target?: AuditMitigationActionsTaskTarget | null;
/** Specifies the mitigation actions that should be applied to specific audit checks. */
auditCheckToActionsMapping?: { [key: string]: string[] | null | undefined } | null;
/** Specifies the mitigation actions and their parameters that are applied as part of this task. */
actionsDefinition?: MitigationAction[] | null;
}
// refs: 1 - tags: named, output
export interface DescribeAuditSuppressionResponse {
checkName?: string | null;
resourceIdentifier?: ResourceIdentifier | null;
/** The epoch timestamp in seconds at which this suppression expires. */
expirationDate?: Date | number | null;
/** Indicates whether a suppression should exist indefinitely or not. */
suppressIndefinitely?: boolean | null;
/** The description of the audit suppression. */
description?: string | null;
}
// refs: 1 - tags: named, output
export interface DescribeAuditTaskResponse {
/** The status of the audit: one of "IN_PROGRESS", "COMPLETED", "FAILED", or "CANCELED". */
taskStatus?: AuditTaskStatus | null;
/** The type of audit: "ON_DEMAND_AUDIT_TASK" or "SCHEDULED_AUDIT_TASK". */
taskType?: AuditTaskType | null;
/** The time the audit started. */
taskStartTime?: Date | number | null;
/** Statistical information about the audit. */
taskStatistics?: TaskStatistics | null;
/** The name of the scheduled audit (only if the audit was a scheduled audit). */
scheduledAuditName?: string | null;
/** Detailed information about each check performed during this audit. */
auditDetails?: { [key: string]: AuditCheckDetails | null | undefined } | null;
}
// refs: 1 - tags: named, output
export interface DescribeAuthorizerResponse {
/** The authorizer description. */
authorizerDescription?: AuthorizerDescription | null;
}
// refs: 1 - tags: named, output
export interface DescribeBillingGroupResponse {
/** The name of the billing group. */
billingGroupName?: string | null;
/** The ID of the billing group. */
billingGroupId?: string | null;
/** The ARN of the billing group. */
billingGroupArn?: string | null;
/** The version of the billing group. */
version?: number | null;
/** The properties of the billing group. */
billingGroupProperties?: BillingGroupProperties | null;
/** Additional information about the billing group. */
billingGroupMetadata?: BillingGroupMetadata | null;
}
// refs: 1 - tags: named, output
/** The output from the DescribeCACertificate operation. */
export interface DescribeCACertificateResponse {
/** The CA certificate description. */
certificateDescription?: CACertificateDescription | null;
/** Information about the registration configuration. */
registrationConfig?: RegistrationConfig | null;
}
// refs: 1 - tags: named, output
/** The output of the DescribeCertificate operation. */
export interface DescribeCertificateResponse {
/** The description of the certificate. */
certificateDescription?: CertificateDescription | null;
}
// refs: 1 - tags: named, output
export interface DescribeCustomMetricResponse {
/** The name of the custom metric. */
metricName?: string | null;
/** The Amazon Resource Number (ARN) of the custom metric. */
metricArn?: string | null;
/** The type of the custom metric. */
metricType?: CustomMetricType | null;
/** Field represents a friendly name in the console for the custom metric; doesn't have to be unique. */
displayName?: string | null;
/** The creation date of the custom metric in milliseconds since epoch. */
creationDate?: Date | number | null;
/** The time the custom metric was last modified in milliseconds since epoch. */
lastModifiedDate?: Date | number | null;
}
// refs: 1 - tags: named, output
export interface DescribeDefaultAuthorizerResponse {
/** The default authorizer's description. */
authorizerDescription?: AuthorizerDescription | null;
}
// refs: 1 - tags: named, output
export interface DescribeDetectMitigationActionsTaskResponse {
/** The description of a task. */
taskSummary?: DetectMitigationActionsTaskSummary | null;
}
// refs: 1 - tags: named, output
export interface DescribeDimensionResponse {
/** The unique identifier for the dimension. */
name?: string | null;
/** The Amazon Resource Name (ARN) for the dimension. */
arn?: string | null;
/** The type of the dimension. */
type?: DimensionType | null;
/** The value or list of values used to scope the dimension. */
stringValues?: string[] | null;
/** The date the dimension was created. */
creationDate?: Date | number | null;
/** The date the dimension was last modified. */
lastModifiedDate?: Date | number | null;
}
// refs: 1 - tags: named, output
export interface DescribeDomainConfigurationResponse {
/** The name of the domain configuration. */
domainConfigurationName?: string | null;
/** The ARN of the domain configuration. */
domainConfigurationArn?: string | null;
/** The name of the domain. */
domainName?: string | null;
/** A list containing summary information about the server certificate included in the domain configuration. */
serverCertificates?: ServerCertificateSummary[] | null;
/** An object that specifies the authorization service for a domain. */
authorizerConfig?: AuthorizerConfig | null;
/** A Boolean value that specifies the current state of the domain configuration. */
domainConfigurationStatus?: DomainConfigurationStatus | null;
/** The type of service delivered by the endpoint. */
serviceType?: ServiceType | null;
/** The type of the domain. */
domainType?: DomainType | null;
/** The date and time the domain configuration's status was last changed. */
lastStatusChangeDate?: Date | number | null;
}
// refs: 1 - tags: named, output
/** The output from the DescribeEndpoint operation. */
export interface DescribeEndpointResponse {
/** The endpoint. */
endpointAddress?: string | null;
}
// refs: 1 - tags: named, output
export interface DescribeEventConfigurationsResponse {
/** The event configurations. */
eventConfigurations?: { [key in EventType]: Configuration | null | undefined } | null;
/** The creation date of the event configuration. */
creationDate?: Date | number | null;
/** The date the event configurations were last modified. */
lastModifiedDate?: Date | number | null;
}
// refs: 1 - tags: named, output
export interface DescribeFleetMetricResponse {
/** The name of the fleet metric to describe. */
metricName?: string | null;
/** The search query string. */
queryString?: string | null;
/** The type of the aggregation query. */
aggregationType?: AggregationType | null;
/** The time in seconds between fleet metric emissions. */
period?: number | null;
/** The field to aggregate. */
aggregationField?: string | null;
/** The fleet metric description. */
description?: string | null;
/** The query version. */
queryVersion?: string | null;
/** The name of the index to search. */
indexName?: string | null;
/** The date when the fleet metric is created. */
creationDate?: Date | number | null;
/** The date when the fleet metric is last modified. */
lastModifiedDate?: Date | number | null;
/** Used to support unit transformation such as milliseconds to seconds. */
unit?: FleetMetricUnit | null;
/** The version of the fleet metric. */
version?: number | null;
/** The ARN of the fleet metric to describe. */
metricArn?: string | null;
}
// refs: 1 - tags: named, output
export interface DescribeIndexResponse {
/** The index name. */
indexName?: string | null;
/** The index status. */
indexStatus?: IndexStatus | null;
/** Contains a value that specifies the type of indexing performed. */
schema?: string | null;
}
// refs: 1 - tags: named, output
export interface DescribeJobResponse {
/** An S3 link to the job document. */
documentSource?: string | null;
/** Information about the job. */
job?: Job | null;
}
// refs: 1 - tags: named, output
export interface DescribeJobExecutionResponse {
/** Information about the job execution. */
execution?: JobExecution | null;
}
// refs: 1 - tags: named, output
export interface DescribeJobTemplateResponse {
/** The ARN of the job template. */
jobTemplateArn?: string | null;
/** The unique identifier of the job template. */
jobTemplateId?: string | null;
/** A description of the job template. */
description?: string | null;
/** An S3 link to the job document. */
documentSource?: string | null;
/** The job document. */
document?: string | null;
/** The time, in seconds since the epoch, when the job template was created. */
createdAt?: Date | number | null;
presignedUrlConfig?: PresignedUrlConfig | null;
jobExecutionsRolloutConfig?: JobExecutionsRolloutConfig | null;
abortConfig?: AbortConfig | null;
timeoutConfig?: TimeoutConfig | null;
/** The configuration that determines how many retries are allowed for each failure type for a job. */
jobExecutionsRetryConfig?: JobExecutionsRetryConfig | null;
}
// refs: 1 - tags: named, output
export interface DescribeManagedJobTemplateResponse {
/** The unique name of a managed template, such as `AWS-Reboot`. */
templateName?: string | null;
/** The unique Amazon Resource Name (ARN) of the managed template. */
templateArn?: string | null;
/** The unique description of a managed template. */
description?: string | null;
/** The version for a managed template. */
templateVersion?: string | null;
/** A list of environments that are supported with the managed job template. */
environments?: string[] | null;
/** A map of key-value pairs that you can use as guidance to specify the inputs for creating a job from a managed template. */
documentParameters?: DocumentParameter[] | null;
/** The document schema for a managed job template. */
document?: string | null;
}
// refs: 1 - tags: named, output
export interface DescribeMitigationActionResponse {
/** The friendly name that uniquely identifies the mitigation action. */
actionName?: string | null;
/** The type of mitigation action. */
actionType?: MitigationActionType | null;
/** The ARN that identifies this migration action. */
actionArn?: string | null;
/** A unique identifier for this action. */
actionId?: string | null;
/** The ARN of the IAM role used to apply this action. */
roleArn?: string | null;
/** Parameters that control how the mitigation action is applied, specific to the type of mitigation action. */
actionParams?: MitigationActionParams | null;
/** The date and time when the mitigation action was added to your Amazon Web Services accounts. */
creationDate?: Date | number | null;
/** The date and time when the mitigation action was last changed. */
lastModifiedDate?: Date | number | null;
}
// refs: 1 - tags: named, output
export interface DescribeProvisioningTemplateResponse {
/** The ARN of the fleet provisioning template. */
templateArn?: string | null;
/** The name of the fleet provisioning template. */
templateName?: string | null;
/** The description of the fleet provisioning template. */
description?: string | null;
/** The date when the fleet provisioning template was created. */
creationDate?: Date | number | null;
/** The date when the fleet provisioning template was last modified. */
lastModifiedDate?: Date | number | null;
/** The default fleet template version ID. */
defaultVersionId?: number | null;
/** The JSON formatted contents of the fleet provisioning template. */
templateBody?: string | null;
/** True if the fleet provisioning template is enabled, otherwise false. */
enabled?: boolean | null;
/** The ARN of the role associated with the provisioning template. */
provisioningRoleArn?: string | null;
/** Gets information about a pre-provisioned hook. */
preProvisioningHook?: ProvisioningHook | null;
}
// refs: 1 - tags: named, output
export interface DescribeProvisioningTemplateVersionResponse {
/** The fleet provisioning template version ID. */
versionId?: number | null;
/** The date when the fleet provisioning template version was created. */
creationDate?: Date | number | null;
/** The JSON formatted contents of the fleet provisioning template version. */
templateBody?: string | null;
/** True if the fleet provisioning template version is the default version. */
isDefaultVersion?: boolean | null;
}
// refs: 1 - tags: named, output
export interface DescribeRoleAliasResponse {
/** The role alias description. */
roleAliasDescription?: RoleAliasDescription | null;
}
// refs: 1 - tags: named, output
export interface DescribeScheduledAuditResponse {
/** How often the scheduled audit takes place, either one of `DAILY`, `WEEKLY`, `BIWEEKLY`, or `MONTHLY`. */
frequency?: AuditFrequency | null;
/** The day of the month on which the scheduled audit takes place. */
dayOfMonth?: string | null;
/** The day of the week on which the scheduled audit takes place, either one of `SUN`, `MON`, `TUE`, `WED`, `THU`, `FRI`, or `SAT`. */
dayOfWeek?: DayOfWeek | null;
/** Which checks are performed during the scheduled audit. */
targetCheckNames?: string[] | null;
/** The name of the scheduled audit. */
scheduledAuditName?: string | null;
/** The ARN of the scheduled audit. */
scheduledAuditArn?: string | null;
}
// refs: 1 - tags: named, output
export interface DescribeSecurityProfileResponse {
/** The name of the security profile. */
securityProfileName?: string | null;
/** The ARN of the security profile. */
securityProfileArn?: string | null;
/** A description of the security profile (associated with the security profile when it was created or updated). */
securityProfileDescription?: string | null;
/** Specifies the behaviors that, when violated by a device (thing), cause an alert. */
behaviors?: Behavior[] | null;
/** Where the alerts are sent. */
alertTargets?: { [key in AlertTargetType]: AlertTarget | null | undefined } | null;
/** _Please use "DescribeSecurityProfileResponse$additionalMetricsToRetainV2" instead._ */
additionalMetricsToRetain?: string[] | null;
/** A list of metrics whose data is retained (stored). */
additionalMetricsToRetainV2?: MetricToRetain[] | null;
/** The version of the security profile. */
version?: number | null;
/** The time the security profile was created. */
creationDate?: Date | number | null;
/** The time the security profile was last modified. */
lastModifiedDate?: Date | number | null;
}
// refs: 1 - tags: named, output
export interface DescribeStreamResponse {
/** Information about the stream. */
streamInfo?: StreamInfo | null;
}
// refs: 1 - tags: named, output
/** The output from the DescribeThing operation. */
export interface DescribeThingResponse {
/** The default MQTT client ID. */
defaultClientId?: string | null;
/** The name of the thing. */
thingName?: string | null;
/** The ID of the thing to describe. */
thingId?: string | null;
/** The ARN of the thing to describe. */
thingArn?: string | null;
/** The thing type name. */
thingTypeName?: string | null;
/** The thing attributes. */
attributes?: { [key: string]: string | null | undefined } | null;
/** The current version of the thing record in the registry. */
version?: number | null;
/** The name of the billing group the thing belongs to. */
billingGroupName?: string | null;
}
// refs: 1 - tags: named, output
export interface DescribeThingGroupResponse {
/** The name of the thing group. */
thingGroupName?: string | null;
/** The thing group ID. */
thingGroupId?: string | null;
/** The thing group ARN. */
thingGroupArn?: string | null;
/** The version of the thing group. */
version?: number | null;
/** The thing group properties. */
thingGroupProperties?: ThingGroupProperties | null;
/** Thing group metadata. */
thingGroupMetadata?: ThingGroupMetadata | null;
/** The dynamic thing group index name. */
indexName?: string | null;
/** The dynamic thing group search query string. */
queryString?: string | null;
/** The dynamic thing group query version. */
queryVersion?: string | null;
/** The dynamic thing group status. */
status?: DynamicGroupStatus | null;
}
// refs: 1 - tags: named, output
export interface DescribeThingRegistrationTaskResponse {
/** The task ID. */
taskId?: string | null;
/** The task creation date. */
creationDate?: Date | number | null;
/** The date when the task was last modified. */
lastModifiedDate?: Date | number | null;
/** The task's template. */
templateBody?: string | null;
/** The S3 bucket that contains the input file. */
inputFileBucket?: string | null;
/** The input file key. */
inputFileKey?: string | null;
/** The role ARN that grants access to the input file bucket. */
roleArn?: string | null;
/** The status of the bulk thing provisioning task. */
status?: Status | null;
/** The message. */
message?: string | null;
/** The number of things successfully provisioned. */
successCount?: number | null;
/** The number of things that failed to be provisioned. */
failureCount?: number | null;
/** The progress of the bulk provisioning task expressed as a percentage. */
percentageProgress?: number | null;
}
// refs: 1 - tags: named, output
/** The output for the DescribeThingType operation. */
export interface DescribeThingTypeResponse {
/** The name of the thing type. */
thingTypeName?: string | null;
/** The thing type ID. */
thingTypeId?: string | null;
/** The thing type ARN. */
thingTypeArn?: string | null;
/** The ThingTypeProperties contains information about the thing type including description, and a list of searchable thing attribute names. */
thingTypeProperties?: ThingTypeProperties | null;
/** The ThingTypeMetadata contains additional information about the thing type including: creation date and time, a value indicating whether the thing type is deprecated, and a date and time when it was deprecated. */
thingTypeMetadata?: ThingTypeMetadata | null;
}
// refs: 1 - tags: named, output
export interface GetBehaviorModelTrainingSummariesResponse {
/** A list of all ML Detect behaviors and their model status for a given Security Profile. */
summaries?: BehaviorModelTrainingSummary[] | null;
/** A token that can be used to retrieve the next set of results, or `null` if there are no additional results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, output
export interface GetBucketsAggregationResponse {
/** The total number of things that fit the query string criteria. */
totalCount?: number | null;
/** The main part of the response with a list of buckets. */
buckets?: Bucket[] | null;
}
// refs: 1 - tags: named, output
export interface GetCardinalityResponse {
/** The approximate count of unique values that match the query. */
cardinality?: number | null;
}
// refs: 1 - tags: named, output
export interface GetEffectivePoliciesResponse {
/** The effective policies. */
effectivePolicies?: EffectivePolicy[] | null;
}
// refs: 1 - tags: named, output
export interface GetIndexingConfigurationResponse {
/** Thing indexing configuration. */
thingIndexingConfiguration?: ThingIndexingConfiguration | null;
/** The index configuration. */
thingGroupIndexingConfiguration?: ThingGroupIndexingConfiguration | null;
}
// refs: 1 - tags: named, output
export interface GetJobDocumentResponse {
/** The job document content. */
document?: string | null;
}
// refs: 1 - tags: named, output
/** The output from the GetLoggingOptions operation. */
export interface GetLoggingOptionsResponse {
/** The ARN of the IAM role that grants access. */
roleArn?: string | null;
/** The logging level. */
logLevel?: LogLevel | null;
}
// refs: 1 - tags: named, output
export interface GetOTAUpdateResponse {
/** The OTA update info. */
otaUpdateInfo?: OTAUpdateInfo | null;
}
// refs: 1 - tags: named, output
export interface GetPercentilesResponse {
/** The percentile values of the aggregated fields. */
percentiles?: PercentPair[] | null;
}
// refs: 1 - tags: named, output
/** The output from the GetPolicy operation. */
export interface GetPolicyResponse {
/** The policy name. */
policyName?: string | null;
/** The policy ARN. */
policyArn?: string | null;
/** The JSON document that describes the policy. */
policyDocument?: string | null;
/** The default policy version ID. */
defaultVersionId?: string | null;
/** The date the policy was created. */
creationDate?: Date | number | null;
/** The date the policy was last modified. */
lastModifiedDate?: Date | number | null;
/** The generation ID of the policy. */
generationId?: string | null;
}
// refs: 1 - tags: named, output
/** The output from the GetPolicyVersion operation. */
export interface GetPolicyVersionResponse {
/** The policy ARN. */
policyArn?: string | null;
/** The policy name. */
policyName?: string | null;
/** The JSON document that describes the policy. */
policyDocument?: string | null;
/** The policy version ID. */
policyVersionId?: string | null;
/** Specifies whether the policy version is the default. */
isDefaultVersion?: boolean | null;
/** The date the policy was created. */
creationDate?: Date | number | null;
/** The date the policy was last modified. */
lastModifiedDate?: Date | number | null;
/** The generation ID of the policy version. */
generationId?: string | null;
}
// refs: 1 - tags: named, output
/** The output from the GetRegistrationCode operation. */
export interface GetRegistrationCodeResponse {
/** The CA certificate registration code. */
registrationCode?: string | null;
}
// refs: 1 - tags: named, output
export interface GetStatisticsResponse {
/** The statistics returned by the Fleet Indexing service based on the query and aggregation field. */
statistics?: Statistics | null;
}
// refs: 1 - tags: named, output
/** The output from the GetTopicRule operation. */
export interface GetTopicRuleResponse {
/** The rule ARN. */
ruleArn?: string | null;
/** The rule. */
rule?: TopicRule | null;
}
// refs: 1 - tags: named, output
export interface GetTopicRuleDestinationResponse {
/** The topic rule destination. */
topicRuleDestination?: TopicRuleDestination | null;
}
// refs: 1 - tags: named, output
export interface GetV2LoggingOptionsResponse {
/** The IAM role ARN IoT uses to write to your CloudWatch logs. */
roleArn?: string | null;
/** The default log level. */
defaultLogLevel?: LogLevel | null;
/** Disables all logs. */
disableAllLogs?: boolean | null;
}
// refs: 1 - tags: named, output
export interface ListActiveViolationsResponse {
/** The list of active violations. */
activeViolations?: ActiveViolation[] | null;
/** A token that can be used to retrieve the next set of results, or `null` if there are no additional results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, output
export interface ListAttachedPoliciesResponse {
/** The policies. */
policies?: Policy[] | null;
/** The token to retrieve the next set of results, or ``null`` if there are no more results. */
nextMarker?: string | null;
}
// refs: 1 - tags: named, output
export interface ListAuditFindingsResponse {
/** The findings (results) of the audit. */
findings?: AuditFinding[] | null;
/** A token that can be used to retrieve the next set of results, or `null` if there are no additional results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, output
export interface ListAuditMitigationActionsExecutionsResponse {
/** A set of task execution results based on the input parameters. */
actionsExecutions?: AuditMitigationActionExecutionMetadata[] | null;
/** The token for the next set of results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, output
export interface ListAuditMitigationActionsTasksResponse {
/** The collection of audit mitigation tasks that matched the filter criteria. */
tasks?: AuditMitigationActionsTaskMetadata[] | null;
/** The token for the next set of results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, output
export interface ListAuditSuppressionsResponse {
/** List of audit suppressions. */
suppressions?: AuditSuppression[] | null;
/** A token that can be used to retrieve the next set of results, or `null` if there are no additional results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, output
export interface ListAuditTasksResponse {
/** The audits that were performed during the specified time period. */
tasks?: AuditTaskMetadata[] | null;
/** A token that can be used to retrieve the next set of results, or `null` if there are no additional results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, output
export interface ListAuthorizersResponse {
/** The authorizers. */
authorizers?: AuthorizerSummary[] | null;
/** A marker used to get the next set of results. */
nextMarker?: string | null;
}
// refs: 1 - tags: named, output
export interface ListBillingGroupsResponse {
/** The list of billing groups. */
billingGroups?: GroupNameAndArn[] | null;
/** The token to use to get the next set of results, or *null* if there are no additional results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, output
/** The output from the ListCACertificates operation. */
export interface ListCACertificatesResponse {
/** The CA certificates registered in your Amazon Web Services account. */
certificates?: CACertificate[] | null;
/** The current position within the list of CA certificates. */
nextMarker?: string | null;
}
// refs: 1 - tags: named, output
/** The output of the ListCertificates operation. */
export interface ListCertificatesResponse {
/** The descriptions of the certificates. */
certificates?: Certificate[] | null;
/** The marker for the next set of results, or null if there are no additional results. */
nextMarker?: string | null;
}
// refs: 1 - tags: named, output
/** The output of the ListCertificatesByCA operation. */
export interface ListCertificatesByCAResponse {
/** The device certificates signed by the specified CA certificate. */
certificates?: Certificate[] | null;
/** The marker for the next set of results, or null if there are no additional results. */
nextMarker?: string | null;
}
// refs: 1 - tags: named, output
export interface ListCustomMetricsResponse {
/** The name of the custom metric. */
metricNames?: string[] | null;
/** A token that can be used to retrieve the next set of results, or `null` if there are no additional results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, output
export interface ListDetectMitigationActionsExecutionsResponse {
/** List of actions executions. */
actionsExecutions?: DetectMitigationActionExecution[] | null;
/** A token that can be used to retrieve the next set of results, or `null` if there are no additional results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, output
export interface ListDetectMitigationActionsTasksResponse {
/** The collection of ML Detect mitigation tasks that matched the filter criteria. */
tasks?: DetectMitigationActionsTaskSummary[] | null;
/** A token that can be used to retrieve the next set of results, or `null` if there are no additional results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, output
export interface ListDimensionsResponse {
/** A list of the names of the defined dimensions. */
dimensionNames?: string[] | null;
/** A token that can be used to retrieve the next set of results, or `null` if there are no additional results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, output
export interface ListDomainConfigurationsResponse {
/** A list of objects that contain summary information about the user's domain configurations. */
domainConfigurations?: DomainConfigurationSummary[] | null;
/** The marker for the next set of results. */
nextMarker?: string | null;
}
// refs: 1 - tags: named, output
export interface ListFleetMetricsResponse {
/** The list of fleet metrics objects. */
fleetMetrics?: FleetMetricNameAndArn[] | null;
/** The token for the next set of results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, output
export interface ListIndicesResponse {
/** The index names. */
indexNames?: string[] | null;
/** The token used to get the next set of results, or `null` if there are no additional results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, output
export interface ListJobExecutionsForJobResponse {
/** A list of job execution summaries. */
executionSummaries?: JobExecutionSummaryForJob[] | null;
/** The token for the next set of results, or *null* if there are no additional results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, output
export interface ListJobExecutionsForThingResponse {
/** A list of job execution summaries. */
executionSummaries?: JobExecutionSummaryForThing[] | null;
/** The token for the next set of results, or *null* if there are no additional results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, output
export interface ListJobTemplatesResponse {
/** A list of objects that contain information about the job templates. */
jobTemplates?: JobTemplateSummary[] | null;
/** The token for the next set of results, or *null* if there are no additional results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, output
export interface ListJobsResponse {
/** A list of jobs. */
jobs?: JobSummary[] | null;
/** The token for the next set of results, or *null* if there are no additional results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, output
export interface ListManagedJobTemplatesResponse {
/** A list of managed job templates that are returned. */
managedJobTemplates?: ManagedJobTemplateSummary[] | null;
/** The token to retrieve the next set of results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, output
export interface ListMitigationActionsResponse {
/** A set of actions that matched the specified filter criteria. */
actionIdentifiers?: MitigationActionIdentifier[] | null;
/** The token for the next set of results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, output
export interface ListOTAUpdatesResponse {
/** A list of OTA update jobs. */
otaUpdates?: OTAUpdateSummary[] | null;
/** A token to use to get the next set of results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, output
/** The output from the ListOutgoingCertificates operation. */
export interface ListOutgoingCertificatesResponse {
/** The certificates that are being transferred but not yet accepted. */
outgoingCertificates?: OutgoingCertificate[] | null;
/** The marker for the next set of results. */
nextMarker?: string | null;
}
// refs: 1 - tags: named, output
/** The output from the ListPolicies operation. */
export interface ListPoliciesResponse {
/** The descriptions of the policies. */
policies?: Policy[] | null;
/** The marker for the next set of results, or null if there are no additional results. */
nextMarker?: string | null;
}
// refs: 1 - tags: named, output
/** The output from the ListPolicyPrincipals operation. */
export interface ListPolicyPrincipalsResponse {
/** The descriptions of the principals. */
principals?: string[] | null;
/** The marker for the next set of results, or null if there are no additional results. */
nextMarker?: string | null;
}
// refs: 1 - tags: named, output
/** The output from the ListPolicyVersions operation. */
export interface ListPolicyVersionsResponse {
/** The policy versions. */
policyVersions?: PolicyVersion[] | null;
}
// refs: 1 - tags: named, output
/** The output from the ListPrincipalPolicies operation. */
export interface ListPrincipalPoliciesResponse {
/** The policies. */
policies?: Policy[] | null;
/** The marker for the next set of results, or null if there are no additional results. */
nextMarker?: string | null;
}
// refs: 1 - tags: named, output
/** The output from the ListPrincipalThings operation. */
export interface ListPrincipalThingsResponse {
/** The things. */
things?: string[] | null;
/** The token to use to get the next set of results, or *null* if there are no additional results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, output
export interface ListProvisioningTemplateVersionsResponse {
/** The list of fleet provisioning template versions. */
versions?: ProvisioningTemplateVersionSummary[] | null;
/** A token to retrieve the next set of results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, output
export interface ListProvisioningTemplatesResponse {
/** A list of fleet provisioning templates */
templates?: ProvisioningTemplateSummary[] | null;
/** A token to retrieve the next set of results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, output
export interface ListRoleAliasesResponse {
/** The role aliases. */
roleAliases?: string[] | null;
/** A marker used to get the next set of results. */
nextMarker?: string | null;
}
// refs: 1 - tags: named, output
export interface ListScheduledAuditsResponse {
/** The list of scheduled audits. */
scheduledAudits?: ScheduledAuditMetadata[] | null;
/** A token that can be used to retrieve the next set of results, or `null` if there are no additional results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, output
export interface ListSecurityProfilesResponse {
/** A list of security profile identifiers (names and ARNs). */
securityProfileIdentifiers?: SecurityProfileIdentifier[] | null;
/** A token that can be used to retrieve the next set of results, or `null` if there are no additional results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, output
export interface ListSecurityProfilesForTargetResponse {
/** A list of security profiles and their associated targets. */
securityProfileTargetMappings?: SecurityProfileTargetMapping[] | null;
/** A token that can be used to retrieve the next set of results, or `null` if there are no additional results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, output
export interface ListStreamsResponse {
/** A list of streams. */
streams?: StreamSummary[] | null;
/** A token used to get the next set of results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, output
export interface ListTagsForResourceResponse {
/** The list of tags assigned to the resource. */
tags?: Tag[] | null;
/** The token to use to get the next set of results, or *null* if there are no additional results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, output
export interface ListTargetsForPolicyResponse {
/** The policy targets. */
targets?: string[] | null;
/** A marker used to get the next set of results. */
nextMarker?: string | null;
}
// refs: 1 - tags: named, output
export interface ListTargetsForSecurityProfileResponse {
/** The thing groups to which the security profile is attached. */
securityProfileTargets?: SecurityProfileTarget[] | null;
/** A token that can be used to retrieve the next set of results, or `null` if there are no additional results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, output
export interface ListThingGroupsResponse {
/** The thing groups. */
thingGroups?: GroupNameAndArn[] | null;
/** The token to use to get the next set of results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, output
export interface ListThingGroupsForThingResponse {
/** The thing groups. */
thingGroups?: GroupNameAndArn[] | null;
/** The token to use to get the next set of results, or *null* if there are no additional results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, output
/** The output from the ListThingPrincipals operation. */
export interface ListThingPrincipalsResponse {
/** The principals associated with the thing. */
principals?: string[] | null;
/** The token to use to get the next set of results, or *null* if there are no additional results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, output
export interface ListThingRegistrationTaskReportsResponse {
/** Links to the task resources. */
resourceLinks?: string[] | null;
/** The type of task report. */
reportType?: ReportType | null;
/** The token to use to get the next set of results, or *null* if there are no additional results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, output
export interface ListThingRegistrationTasksResponse {
/** A list of bulk thing provisioning task IDs. */
taskIds?: string[] | null;
/** The token to use to get the next set of results, or *null* if there are no additional results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, output
/** The output for the ListThingTypes operation. */
export interface ListThingTypesResponse {
/** The thing types. */
thingTypes?: ThingTypeDefinition[] | null;
/** The token for the next set of results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, output
/** The output from the ListThings operation. */
export interface ListThingsResponse {
/** The things. */
things?: ThingAttribute[] | null;
/** The token to use to get the next set of results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, output
export interface ListThingsInBillingGroupResponse {
/** A list of things in the billing group. */
things?: string[] | null;
/** The token to use to get the next set of results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, output
export interface ListThingsInThingGroupResponse {
/** The things in the specified thing group. */
things?: string[] | null;
/** The token to use to get the next set of results, or *null* if there are no additional results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, output
export interface ListTopicRuleDestinationsResponse {
/** Information about a topic rule destination. */
destinationSummaries?: TopicRuleDestinationSummary[] | null;
/** The token to use to get the next set of results, or *null* if there are no additional results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, output
/** The output from the ListTopicRules operation. */
export interface ListTopicRulesResponse {
/** The rules. */
rules?: TopicRuleListItem[] | null;
/** The token to use to get the next set of results, or *null* if there are no additional results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, output
export interface ListV2LoggingLevelsResponse {
/** The logging configuration for a target. */
logTargetConfigurations?: LogTargetConfiguration[] | null;
/** The token to use to get the next set of results, or *null* if there are no additional results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, output
export interface ListViolationEventsResponse {
/** The security profile violation alerts issued for this account during the given time period, potentially filtered by security profile, behavior violated, or thing (device) violating. */
violationEvents?: ViolationEvent[] | null;
/** A token that can be used to retrieve the next set of results, or `null` if there are no additional results. */
nextToken?: string | null;
}
// refs: 1 - tags: named, output
/** The output from the RegisterCACertificateResponse operation. */
export interface RegisterCACertificateResponse {
/** The CA certificate ARN. */
certificateArn?: string | null;
/** The CA certificate identifier. */
certificateId?: string | null;
}
// refs: 1 - tags: named, output
/** The output from the RegisterCertificate operation. */
export interface RegisterCertificateResponse {
/** The certificate ARN. */
certificateArn?: string | null;
/** The certificate identifier. */
certificateId?: string | null;
}
// refs: 1 - tags: named, output
export interface RegisterCertificateWithoutCAResponse {
/** The Amazon Resource Name (ARN) of the registered certificate. */
certificateArn?: string | null;
/** The ID of the registered certificate. */
certificateId?: string | null;
}
// refs: 1 - tags: named, output
export interface RegisterThingResponse {
/** The certificate data, in PEM format. */
certificatePem?: string | null;
/** ARNs for the generated resources. */
resourceArns?: { [key: string]: string | null | undefined } | null;
}
// refs: 1 - tags: named, output
export interface SearchIndexResponse {
/** The token used to get the next set of results, or `null` if there are no additional results. */
nextToken?: string | null;
/** The things that match the search query. */
things?: ThingDocument[] | null;
/** The thing groups that match the search query. */
thingGroups?: ThingGroupDocument[] | null;
}
// refs: 1 - tags: named, output
export interface SetDefaultAuthorizerResponse {
/** The authorizer name. */
authorizerName?: string | null;
/** The authorizer ARN. */
authorizerArn?: string | null;
}
// refs: 1 - tags: named, output
export interface StartAuditMitigationActionsTaskResponse {
/** The unique identifier for the audit mitigation task. */
taskId?: string | null;
}
// refs: 1 - tags: named, output
export interface StartDetectMitigationActionsTaskResponse {
/** The unique identifier of the task. */
taskId?: string | null;
}
// refs: 1 - tags: named, output
export interface StartOnDemandAuditTaskResponse {
/** The ID of the on-demand audit you started. */
taskId?: string | null;
}
// refs: 1 - tags: named, output
export interface StartThingRegistrationTaskResponse {
/** The bulk thing provisioning task ID. */
taskId?: string | null;
}
// refs: 1 - tags: named, output
export interface TestAuthorizationResponse {
/** The authentication results. */
authResults?: AuthResult[] | null;
}
// refs: 1 - tags: named, output
export interface TestInvokeAuthorizerResponse {
/** True if the token is authenticated, otherwise false. */
isAuthenticated?: boolean | null;
/** The principal ID. */
principalId?: string | null;
/** IAM policy documents. */
policyDocuments?: string[] | null;
/** The number of seconds after which the temporary credentials are refreshed. */
refreshAfterInSeconds?: number | null;
/** The number of seconds after which the connection is terminated. */
disconnectAfterInSeconds?: number | null;
}
// refs: 1 - tags: named, output
/** The output from the TransferCertificate operation. */
export interface TransferCertificateResponse {
/** The ARN of the certificate. */
transferredCertificateArn?: string | null;
}
// refs: 1 - tags: named, output
export interface UpdateAuthorizerResponse {
/** The authorizer name. */
authorizerName?: string | null;
/** The authorizer ARN. */
authorizerArn?: string | null;
}
// refs: 1 - tags: named, output
export interface UpdateBillingGroupResponse {
/** The latest version of the billing group. */
version?: number | null;
}
// refs: 1 - tags: named, output
export interface UpdateCustomMetricResponse {
/** The name of the custom metric. */
metricName?: string | null;
/** The Amazon Resource Number (ARN) of the custom metric. */
metricArn?: string | null;
/** The type of the custom metric. */
metricType?: CustomMetricType | null;
/** A friendly name in the console for the custom metric */
displayName?: string | null;
/** The creation date of the custom metric in milliseconds since epoch. */
creationDate?: Date | number | null;
/** The time the custom metric was last modified in milliseconds since epoch. */
lastModifiedDate?: Date | number | null;
}
// refs: 1 - tags: named, output
export interface UpdateDimensionResponse {
/** A unique identifier for the dimension. */
name?: string | null;
/** The Amazon Resource Name (ARN)of the created dimension. */
arn?: string | null;
/** The type of the dimension. */
type?: DimensionType | null;
/** The value or list of values used to scope the dimension. */
stringValues?: string[] | null;
/** The date and time, in milliseconds since epoch, when the dimension was initially created. */
creationDate?: Date | number | null;
/** The date and time, in milliseconds since epoch, when the dimension was most recently updated. */
lastModifiedDate?: Date | number | null;
}
// refs: 1 - tags: named, output
export interface UpdateDomainConfigurationResponse {
/** The name of the domain configuration that was updated. */
domainConfigurationName?: string | null;
/** The ARN of the domain configuration that was updated. */
domainConfigurationArn?: string | null;
}
// refs: 1 - tags: named, output
export interface UpdateDynamicThingGroupResponse {
/** The dynamic thing group version. */
version?: number | null;
}
// refs: 1 - tags: named, output
export interface UpdateMitigationActionResponse {
/** The ARN for the new mitigation action. */
actionArn?: string | null;
/** A unique identifier for the mitigation action. */
actionId?: string | null;
}
// refs: 1 - tags: named, output
export interface UpdateRoleAliasResponse {
/** The role alias. */
roleAlias?: string | null;
/** The role alias ARN. */
roleAliasArn?: string | null;
}
// refs: 1 - tags: named, output
export interface UpdateScheduledAuditResponse {
/** The ARN of the scheduled audit. */
scheduledAuditArn?: string | null;
}
// refs: 1 - tags: named, output
export interface UpdateSecurityProfileResponse {
/** The name of the security profile that was updated. */
securityProfileName?: string | null;
/** The ARN of the security profile that was updated. */
securityProfileArn?: string | null;
/** The description of the security profile. */
securityProfileDescription?: string | null;
/** Specifies the behaviors that, when violated by a device (thing), cause an alert. */
behaviors?: Behavior[] | null;
/** Where the alerts are sent. */
alertTargets?: { [key in AlertTargetType]: AlertTarget | null | undefined } | null;
/** _Please use "UpdateSecurityProfileResponse$additionalMetricsToRetainV2" instead._ */
additionalMetricsToRetain?: string[] | null;
/** A list of metrics whose data is retained (stored). */
additionalMetricsToRetainV2?: MetricToRetain[] | null;
/** The updated version of the security profile. */
version?: number | null;
/** The time the security profile was created. */
creationDate?: Date | number | null;
/** The time the security profile was last modified. */
lastModifiedDate?: Date | number | null;
}
// refs: 1 - tags: named, output
export interface UpdateStreamResponse {
/** The stream ID. */
streamId?: string | null;
/** The stream ARN. */
streamArn?: string | null;
/** A description of the stream. */
description?: string | null;
/** The stream version. */
streamVersion?: number | null;
}
// refs: 1 - tags: named, output
export interface UpdateThingGroupResponse {
/** The version of the updated thing group. */
version?: number | null;
}
// refs: 1 - tags: named, output
export interface ValidateSecurityProfileBehaviorsResponse {
/** True if the behaviors were valid. */
valid?: boolean | null;
/** The list of any errors found in the behaviors. */
validationErrors?: ValidationError[] | null;
}
// refs: 12 - tags: input, named, interface, output
/** Information that identifies the noncompliant resource. */
export interface ResourceIdentifier {
/** The ID of the certificate attached to the resource. */
deviceCertificateId?: string | null;
/** The ID of the CA certificate used to authorize the certificate. */
caCertificateId?: string | null;
/** The ID of the Amazon Cognito identity pool. */
cognitoIdentityPoolId?: string | null;
/** The client ID. */
clientId?: string | null;
/** The version of the policy associated with the resource. */
policyVersionIdentifier?: PolicyVersionIdentifier | null;
/** The account with which the resource is associated. */
account?: string | null;
/** The ARN of the IAM role that has overly permissive actions. */
iamRoleArn?: string | null;
/** The ARN of the role alias that has overly permissive actions. */
roleAliasArn?: string | null;
}
function fromResourceIdentifier(input?: ResourceIdentifier | null): jsonP.JSONValue {
if (!input) return input;
return {
deviceCertificateId: input["deviceCertificateId"],
caCertificateId: input["caCertificateId"],
cognitoIdentityPoolId: input["cognitoIdentityPoolId"],
clientId: input["clientId"],
policyVersionIdentifier: fromPolicyVersionIdentifier(input["policyVersionIdentifier"]),
account: input["account"],
iamRoleArn: input["iamRoleArn"],
roleAliasArn: input["roleAliasArn"],
}
}
function toResourceIdentifier(root: jsonP.JSONValue): ResourceIdentifier {
return jsonP.readObj({
required: {},
optional: {
"deviceCertificateId": "s",
"caCertificateId": "s",
"cognitoIdentityPoolId": "s",
"clientId": "s",
"policyVersionIdentifier": toPolicyVersionIdentifier,
"account": "s",
"iamRoleArn": "s",
"roleAliasArn": "s",
},
}, root);
}
// refs: 12 - tags: input, named, interface, output
/** Information about the version of the policy associated with the resource. */
export interface PolicyVersionIdentifier {
/** The name of the policy. */
policyName?: string | null;
/** The ID of the version of the policy associated with the resource. */
policyVersionId?: string | null;
}
function fromPolicyVersionIdentifier(input?: PolicyVersionIdentifier | null): jsonP.JSONValue {
if (!input) return input;
return {
policyName: input["policyName"],
policyVersionId: input["policyVersionId"],
}
}
function toPolicyVersionIdentifier(root: jsonP.JSONValue): PolicyVersionIdentifier {
return jsonP.readObj({
required: {},
optional: {
"policyName": "s",
"policyVersionId": "s",
},
}, root);
}
// refs: 5 - tags: input, named, enum, output
export type AuthorizerStatus =
| "ACTIVE"
| "INACTIVE"
| cmnP.UnexpectedEnumValue;
// refs: 22 - tags: input, named, interface, output
/** A set of key/value pairs that are used to manage the resource. */
export interface Tag {
/** The tag's key. */
Key: string;
/** The tag's value. */
Value?: string | null;
}
function fromTag(input?: Tag | null): jsonP.JSONValue {
if (!input) return input;
return {
Key: input["Key"],
Value: input["Value"],
}
}
function toTag(root: jsonP.JSONValue): Tag {
return jsonP.readObj({
required: {
"Key": "s",
},
optional: {
"Value": "s",
},
}, root);
}
// refs: 3 - tags: input, named, interface, output
/** The properties of a billing group. */
export interface BillingGroupProperties {
/** The description of the billing group. */
billingGroupDescription?: string | null;
}
function fromBillingGroupProperties(input?: BillingGroupProperties | null): jsonP.JSONValue {
if (!input) return input;
return {
billingGroupDescription: input["billingGroupDescription"],
}
}
function toBillingGroupProperties(root: jsonP.JSONValue): BillingGroupProperties {
return jsonP.readObj({
required: {},
optional: {
"billingGroupDescription": "s",
},
}, root);
}
// refs: 3 - tags: input, named, enum, output
export type CustomMetricType =
| "string-list"
| "ip-address-list"
| "number-list"
| "number"
| cmnP.UnexpectedEnumValue;
// refs: 3 - tags: input, named, enum, output
export type DimensionType =
| "TOPIC_FILTER"
| cmnP.UnexpectedEnumValue;
// refs: 3 - tags: input, named, interface, output
/** An object that specifies the authorization service for a domain. */
export interface AuthorizerConfig {
/** The name of the authorization service for a domain configuration. */
defaultAuthorizerName?: string | null;
/** A Boolean that specifies whether the domain configuration's authorization service can be overridden. */
allowAuthorizerOverride?: boolean | null;
}
function fromAuthorizerConfig(input?: AuthorizerConfig | null): jsonP.JSONValue {
if (!input) return input;
return {
defaultAuthorizerName: input["defaultAuthorizerName"],
allowAuthorizerOverride: input["allowAuthorizerOverride"],
}
}
function toAuthorizerConfig(root: jsonP.JSONValue): AuthorizerConfig {
return jsonP.readObj({
required: {},
optional: {
"defaultAuthorizerName": "s",
"allowAuthorizerOverride": "b",
},
}, root);
}
// refs: 4 - tags: input, named, enum, output
export type ServiceType =
| "DATA"
| "CREDENTIAL_PROVIDER"
| "JOBS"
| cmnP.UnexpectedEnumValue;
// refs: 5 - tags: input, named, interface, output
/** Thing group properties. */
export interface ThingGroupProperties {
/** The thing group description. */
thingGroupDescription?: string | null;
/** The thing group attributes in JSON format. */
attributePayload?: AttributePayload | null;
}
function fromThingGroupProperties(input?: ThingGroupProperties | null): jsonP.JSONValue {
if (!input) return input;
return {
thingGroupDescription: input["thingGroupDescription"],
attributePayload: fromAttributePayload(input["attributePayload"]),
}
}
function toThingGroupProperties(root: jsonP.JSONValue): ThingGroupProperties {
return jsonP.readObj({
required: {},
optional: {
"thingGroupDescription": "s",
"attributePayload": toAttributePayload,
},
}, root);
}
// refs: 7 - tags: input, named, interface, output
/** The attribute payload. */
export interface AttributePayload {
/** A JSON string containing up to three key-value pair in JSON format. */
attributes?: { [key: string]: string | null | undefined } | null;
/** Specifies whether the list of attributes provided in the `AttributePayload` is merged with the attributes stored in the registry, instead of overwriting them. */
merge?: boolean | null;
}
function fromAttributePayload(input?: AttributePayload | null): jsonP.JSONValue {
if (!input) return input;
return {
attributes: input["attributes"],
merge: input["merge"],
}
}
function toAttributePayload(root: jsonP.JSONValue): AttributePayload {
return jsonP.readObj({
required: {},
optional: {
"attributes": x => jsonP.readMap(String, String, x),
"merge": "b",
},
}, root);
}
// refs: 3 - tags: input, named, interface, output
/** The type of aggregation queries. */
export interface AggregationType {
/** The name of the aggregation type. */
name: AggregationTypeName;
/** A list of the values of aggregation types. */
values?: string[] | null;
}
function fromAggregationType(input?: AggregationType | null): jsonP.JSONValue {
if (!input) return input;
return {
name: input["name"],
values: input["values"],
}
}
function toAggregationType(root: jsonP.JSONValue): AggregationType {
return jsonP.readObj({
required: {
"name": (x: jsonP.JSONValue) => cmnP.readEnum<AggregationTypeName>(x),
},
optional: {
"values": ["s"],
},
}, root);
}
// refs: 3 - tags: input, named, enum, output
export type AggregationTypeName =
| "Statistics"
| "Percentiles"
| "Cardinality"
| cmnP.UnexpectedEnumValue;
// refs: 3 - tags: input, named, enum, output
export type FleetMetricUnit =
| "Seconds"
| "Microseconds"
| "Milliseconds"
| "Bytes"
| "Kilobytes"
| "Megabytes"
| "Gigabytes"
| "Terabytes"
| "Bits"
| "Kilobits"
| "Megabits"
| "Gigabits"
| "Terabits"
| "Percent"
| "Count"
| "Bytes/Second"
| "Kilobytes/Second"
| "Megabytes/Second"
| "Gigabytes/Second"
| "Terabytes/Second"
| "Bits/Second"
| "Kilobits/Second"
| "Megabits/Second"
| "Gigabits/Second"
| "Terabits/Second"
| "Count/Second"
| "None"
| cmnP.UnexpectedEnumValue;
// refs: 5 - tags: input, named, interface, output
/** Configuration for pre-signed S3 URLs. */
export interface PresignedUrlConfig {
/** The ARN of an IAM role that grants grants permission to download files from the S3 bucket where the job data/updates are stored. */
roleArn?: string | null;
/** How long (in seconds) pre-signed URLs are valid. */
expiresInSec?: number | null;
}
function fromPresignedUrlConfig(input?: PresignedUrlConfig | null): jsonP.JSONValue {
if (!input) return input;
return {
roleArn: input["roleArn"],
expiresInSec: input["expiresInSec"],
}
}
function toPresignedUrlConfig(root: jsonP.JSONValue): PresignedUrlConfig {
return jsonP.readObj({
required: {},
optional: {
"roleArn": "s",
"expiresInSec": "n",
},
}, root);
}
// refs: 6 - tags: input, named, enum, output
export type TargetSelection =
| "CONTINUOUS"
| "SNAPSHOT"
| cmnP.UnexpectedEnumValue;
// refs: 5 - tags: input, named, interface, output
/** Allows you to create a staged rollout of a job. */
export interface JobExecutionsRolloutConfig {
/** The maximum number of things that will be notified of a pending job, per minute. */
maximumPerMinute?: number | null;
/** The rate of increase for a job rollout. */
exponentialRate?: ExponentialRolloutRate | null;
}
function fromJobExecutionsRolloutConfig(input?: JobExecutionsRolloutConfig | null): jsonP.JSONValue {
if (!input) return input;
return {
maximumPerMinute: input["maximumPerMinute"],
exponentialRate: fromExponentialRolloutRate(input["exponentialRate"]),
}
}
function toJobExecutionsRolloutConfig(root: jsonP.JSONValue): JobExecutionsRolloutConfig {
return jsonP.readObj({
required: {},
optional: {
"maximumPerMinute": "n",
"exponentialRate": toExponentialRolloutRate,
},
}, root);
}
// refs: 5 - tags: input, named, interface, output
/** Allows you to create an exponential rate of rollout for a job. */
export interface ExponentialRolloutRate {
/** The minimum number of things that will be notified of a pending job, per minute at the start of job rollout. */
baseRatePerMinute: number;
/** The exponential factor to increase the rate of rollout for a job. */
incrementFactor: number;
/** The criteria to initiate the increase in rate of rollout for a job. */
rateIncreaseCriteria: RateIncreaseCriteria;
}
function fromExponentialRolloutRate(input?: ExponentialRolloutRate | null): jsonP.JSONValue {
if (!input) return input;
return {
baseRatePerMinute: input["baseRatePerMinute"],
incrementFactor: input["incrementFactor"],
rateIncreaseCriteria: fromRateIncreaseCriteria(input["rateIncreaseCriteria"]),
}
}
function toExponentialRolloutRate(root: jsonP.JSONValue): ExponentialRolloutRate {
return jsonP.readObj({
required: {
"baseRatePerMinute": "n",
"incrementFactor": "n",
"rateIncreaseCriteria": toRateIncreaseCriteria,
},
optional: {},
}, root);
}
// refs: 5 - tags: input, named, interface, output
/** Allows you to define a criteria to initiate the increase in rate of rollout for a job. */
export interface RateIncreaseCriteria {
/** The threshold for number of notified things that will initiate the increase in rate of rollout. */
numberOfNotifiedThings?: number | null;
/** The threshold for number of succeeded things that will initiate the increase in rate of rollout. */
numberOfSucceededThings?: number | null;
}
function fromRateIncreaseCriteria(input?: RateIncreaseCriteria | null): jsonP.JSONValue {
if (!input) return input;
return {
numberOfNotifiedThings: input["numberOfNotifiedThings"],
numberOfSucceededThings: input["numberOfSucceededThings"],
}
}
function toRateIncreaseCriteria(root: jsonP.JSONValue): RateIncreaseCriteria {
return jsonP.readObj({
required: {},
optional: {
"numberOfNotifiedThings": "n",
"numberOfSucceededThings": "n",
},
}, root);
}
// refs: 5 - tags: input, named, interface, output
/** The criteria that determine when and how a job abort takes place. */
export interface AbortConfig {
/** The list of criteria that determine when and how to abort the job. */
criteriaList: AbortCriteria[];
}
function fromAbortConfig(input?: AbortConfig | null): jsonP.JSONValue {
if (!input) return input;
return {
criteriaList: input["criteriaList"]?.map(x => fromAbortCriteria(x)),
}
}
function toAbortConfig(root: jsonP.JSONValue): AbortConfig {
return jsonP.readObj({
required: {
"criteriaList": [toAbortCriteria],
},
optional: {},
}, root);
}
// refs: 5 - tags: input, named, interface, output
/** The criteria that determine when and how a job abort takes place. */
export interface AbortCriteria {
/** The type of job execution failures that can initiate a job abort. */
failureType: JobExecutionFailureType;
/** The type of job action to take to initiate the job abort. */
action: AbortAction;
/** The minimum percentage of job execution failures that must occur to initiate the job abort. */
thresholdPercentage: number;
/** The minimum number of things which must receive job execution notifications before the job can be aborted. */
minNumberOfExecutedThings: number;
}
function fromAbortCriteria(input?: AbortCriteria | null): jsonP.JSONValue {
if (!input) return input;
return {
failureType: input["failureType"],
action: input["action"],
thresholdPercentage: input["thresholdPercentage"],
minNumberOfExecutedThings: input["minNumberOfExecutedThings"],
}
}
function toAbortCriteria(root: jsonP.JSONValue): AbortCriteria {
return jsonP.readObj({
required: {
"failureType": (x: jsonP.JSONValue) => cmnP.readEnum<JobExecutionFailureType>(x),
"action": (x: jsonP.JSONValue) => cmnP.readEnum<AbortAction>(x),
"thresholdPercentage": "n",
"minNumberOfExecutedThings": "n",
},
optional: {},
}, root);
}
// refs: 5 - tags: input, named, enum, output
export type JobExecutionFailureType =
| "FAILED"
| "REJECTED"
| "TIMED_OUT"
| "ALL"
| cmnP.UnexpectedEnumValue;
// refs: 5 - tags: input, named, enum, output
export type AbortAction =
| "CANCEL"
| cmnP.UnexpectedEnumValue;
// refs: 5 - tags: input, named, interface, output
/** Specifies the amount of time each device has to finish its execution of the job. */
export interface TimeoutConfig {
/** Specifies the amount of time, in minutes, this device has to finish execution of this job. */
inProgressTimeoutInMinutes?: number | null;
}
function fromTimeoutConfig(input?: TimeoutConfig | null): jsonP.JSONValue {
if (!input) return input;
return {
inProgressTimeoutInMinutes: input["inProgressTimeoutInMinutes"],
}
}
function toTimeoutConfig(root: jsonP.JSONValue): TimeoutConfig {
return jsonP.readObj({
required: {},
optional: {
"inProgressTimeoutInMinutes": "n",
},
}, root);
}
// refs: 5 - tags: input, named, interface, output
/** The configuration that determines how many retries are allowed for each failure type for a job. */
export interface JobExecutionsRetryConfig {
/** The list of criteria that determines how many retries are allowed for each failure type for a job. */
criteriaList: RetryCriteria[];
}
function fromJobExecutionsRetryConfig(input?: JobExecutionsRetryConfig | null): jsonP.JSONValue {
if (!input) return input;
return {
criteriaList: input["criteriaList"]?.map(x => fromRetryCriteria(x)),
}
}
function toJobExecutionsRetryConfig(root: jsonP.JSONValue): JobExecutionsRetryConfig {
return jsonP.readObj({
required: {
"criteriaList": [toRetryCriteria],
},
optional: {},
}, root);
}
// refs: 5 - tags: input, named, interface, output
/** The criteria that determines how many retries are allowed for each failure type for a job. */
export interface RetryCriteria {
/** The type of job execution failures that can initiate a job retry. */
failureType: RetryableFailureType;
/** The number of retries allowed for a failure type for the job. */
numberOfRetries: number;
}
function fromRetryCriteria(input?: RetryCriteria | null): jsonP.JSONValue {
if (!input) return input;
return {
failureType: input["failureType"],
numberOfRetries: input["numberOfRetries"],
}
}
function toRetryCriteria(root: jsonP.JSONValue): RetryCriteria {
return jsonP.readObj({
required: {
"failureType": (x: jsonP.JSONValue) => cmnP.readEnum<RetryableFailureType>(x),
"numberOfRetries": "n",
},
optional: {},
}, root);
}
// refs: 5 - tags: input, named, enum, output
export type RetryableFailureType =
| "FAILED"
| "TIMED_OUT"
| "ALL"
| cmnP.UnexpectedEnumValue;
// refs: 6 - tags: input, named, interface, output
/** The set of parameters for this mitigation action. */
export interface MitigationActionParams {
/** Parameters to define a mitigation action that changes the state of the device certificate to inactive. */
updateDeviceCertificateParams?: UpdateDeviceCertificateParams | null;
/** Parameters to define a mitigation action that changes the state of the CA certificate to inactive. */
updateCACertificateParams?: UpdateCACertificateParams | null;
/** Parameters to define a mitigation action that moves devices associated with a certificate to one or more specified thing groups, typically for quarantine. */
addThingsToThingGroupParams?: AddThingsToThingGroupParams | null;
/** Parameters to define a mitigation action that adds a blank policy to restrict permissions. */
replaceDefaultPolicyVersionParams?: ReplaceDefaultPolicyVersionParams | null;
/** Parameters to define a mitigation action that enables Amazon Web Services IoT Core logging at a specified level of detail. */
enableIoTLoggingParams?: EnableIoTLoggingParams | null;
/** Parameters to define a mitigation action that publishes findings to Amazon Simple Notification Service (Amazon SNS. */
publishFindingToSnsParams?: PublishFindingToSnsParams | null;
}
function fromMitigationActionParams(input?: MitigationActionParams | null): jsonP.JSONValue {
if (!input) return input;
return {
updateDeviceCertificateParams: fromUpdateDeviceCertificateParams(input["updateDeviceCertificateParams"]),
updateCACertificateParams: fromUpdateCACertificateParams(input["updateCACertificateParams"]),
addThingsToThingGroupParams: fromAddThingsToThingGroupParams(input["addThingsToThingGroupParams"]),
replaceDefaultPolicyVersionParams: fromReplaceDefaultPolicyVersionParams(input["replaceDefaultPolicyVersionParams"]),
enableIoTLoggingParams: fromEnableIoTLoggingParams(input["enableIoTLoggingParams"]),
publishFindingToSnsParams: fromPublishFindingToSnsParams(input["publishFindingToSnsParams"]),
}
}
function toMitigationActionParams(root: jsonP.JSONValue): MitigationActionParams {
return jsonP.readObj({
required: {},
optional: {
"updateDeviceCertificateParams": toUpdateDeviceCertificateParams,
"updateCACertificateParams": toUpdateCACertificateParams,
"addThingsToThingGroupParams": toAddThingsToThingGroupParams,
"replaceDefaultPolicyVersionParams": toReplaceDefaultPolicyVersionParams,
"enableIoTLoggingParams": toEnableIoTLoggingParams,
"publishFindingToSnsParams": toPublishFindingToSnsParams,
},
}, root);
}
// refs: 6 - tags: input, named, interface, output
/** Parameters to define a mitigation action that changes the state of the device certificate to inactive. */
export interface UpdateDeviceCertificateParams {
/** The action that you want to apply to the device certificate. */
action: DeviceCertificateUpdateAction;
}
function fromUpdateDeviceCertificateParams(input?: UpdateDeviceCertificateParams | null): jsonP.JSONValue {
if (!input) return input;
return {
action: input["action"],
}
}
function toUpdateDeviceCertificateParams(root: jsonP.JSONValue): UpdateDeviceCertificateParams {
return jsonP.readObj({
required: {
"action": (x: jsonP.JSONValue) => cmnP.readEnum<DeviceCertificateUpdateAction>(x),
},
optional: {},
}, root);
}
// refs: 6 - tags: input, named, enum, output
export type DeviceCertificateUpdateAction =
| "DEACTIVATE"
| cmnP.UnexpectedEnumValue;
// refs: 6 - tags: input, named, interface, output
/** Parameters to define a mitigation action that changes the state of the CA certificate to inactive. */
export interface UpdateCACertificateParams {
/** The action that you want to apply to the CA certificate. */
action: CACertificateUpdateAction;
}
function fromUpdateCACertificateParams(input?: UpdateCACertificateParams | null): jsonP.JSONValue {
if (!input) return input;
return {
action: input["action"],
}
}
function toUpdateCACertificateParams(root: jsonP.JSONValue): UpdateCACertificateParams {
return jsonP.readObj({
required: {
"action": (x: jsonP.JSONValue) => cmnP.readEnum<CACertificateUpdateAction>(x),
},
optional: {},
}, root);
}
// refs: 6 - tags: input, named, enum, output
export type CACertificateUpdateAction =
| "DEACTIVATE"
| cmnP.UnexpectedEnumValue;
// refs: 6 - tags: input, named, interface, output
/** Parameters used when defining a mitigation action that move a set of things to a thing group. */
export interface AddThingsToThingGroupParams {
/** The list of groups to which you want to add the things that triggered the mitigation action. */
thingGroupNames: string[];
/** Specifies if this mitigation action can move the things that triggered the mitigation action even if they are part of one or more dynamic thing groups. */
overrideDynamicGroups?: boolean | null;
}
function fromAddThingsToThingGroupParams(input?: AddThingsToThingGroupParams | null): jsonP.JSONValue {
if (!input) return input;
return {
thingGroupNames: input["thingGroupNames"],
overrideDynamicGroups: input["overrideDynamicGroups"],
}
}
function toAddThingsToThingGroupParams(root: jsonP.JSONValue): AddThingsToThingGroupParams {
return jsonP.readObj({
required: {
"thingGroupNames": ["s"],
},
optional: {
"overrideDynamicGroups": "b",
},
}, root);
}
// refs: 6 - tags: input, named, interface, output
/** Parameters to define a mitigation action that adds a blank policy to restrict permissions. */
export interface ReplaceDefaultPolicyVersionParams {
/** The name of the template to be applied. */
templateName: PolicyTemplateName;
}
function fromReplaceDefaultPolicyVersionParams(input?: ReplaceDefaultPolicyVersionParams | null): jsonP.JSONValue {
if (!input) return input;
return {
templateName: input["templateName"],
}
}
function toReplaceDefaultPolicyVersionParams(root: jsonP.JSONValue): ReplaceDefaultPolicyVersionParams {
return jsonP.readObj({
required: {
"templateName": (x: jsonP.JSONValue) => cmnP.readEnum<PolicyTemplateName>(x),
},
optional: {},
}, root);
}
// refs: 6 - tags: input, named, enum, output
export type PolicyTemplateName =
| "BLANK_POLICY"
| cmnP.UnexpectedEnumValue;
// refs: 6 - tags: input, named, interface, output
/** Parameters used when defining a mitigation action that enable Amazon Web Services IoT Core logging. */
export interface EnableIoTLoggingParams {
/** The Amazon Resource Name (ARN) of the IAM role used for logging. */
roleArnForLogging: string;
/** Specifies the type of information to be logged. */
logLevel: LogLevel;
}
function fromEnableIoTLoggingParams(input?: EnableIoTLoggingParams | null): jsonP.JSONValue {
if (!input) return input;
return {
roleArnForLogging: input["roleArnForLogging"],
logLevel: input["logLevel"],
}
}
function toEnableIoTLoggingParams(root: jsonP.JSONValue): EnableIoTLoggingParams {
return jsonP.readObj({
required: {
"roleArnForLogging": "s",
"logLevel": (x: jsonP.JSONValue) => cmnP.readEnum<LogLevel>(x),
},
optional: {},
}, root);
}
// refs: 12 - tags: input, named, enum, output
export type LogLevel =
| "DEBUG"
| "INFO"
| "ERROR"
| "WARN"
| "DISABLED"
| cmnP.UnexpectedEnumValue;
// refs: 6 - tags: input, named, interface, output
/** Parameters to define a mitigation action that publishes findings to Amazon SNS. */
export interface PublishFindingToSnsParams {
/** The ARN of the topic to which you want to publish the findings. */
topicArn: string;
}
function fromPublishFindingToSnsParams(input?: PublishFindingToSnsParams | null): jsonP.JSONValue {
if (!input) return input;
return {
topicArn: input["topicArn"],
}
}
function toPublishFindingToSnsParams(root: jsonP.JSONValue): PublishFindingToSnsParams {
return jsonP.readObj({
required: {
"topicArn": "s",
},
optional: {},
}, root);
}
// refs: 2 - tags: input, named, enum, output
export type Protocol =
| "MQTT"
| "HTTP"
| cmnP.UnexpectedEnumValue;
// refs: 2 - tags: input, named, interface, output
/** Configuration for the rollout of OTA updates. */
export interface AwsJobExecutionsRolloutConfig {
/** The maximum number of OTA update job executions started per minute. */
maximumPerMinute?: number | null;
/** The rate of increase for a job rollout. */
exponentialRate?: AwsJobExponentialRolloutRate | null;
}
function fromAwsJobExecutionsRolloutConfig(input?: AwsJobExecutionsRolloutConfig | null): jsonP.JSONValue {
if (!input) return input;
return {
maximumPerMinute: input["maximumPerMinute"],
exponentialRate: fromAwsJobExponentialRolloutRate(input["exponentialRate"]),
}
}
function toAwsJobExecutionsRolloutConfig(root: jsonP.JSONValue): AwsJobExecutionsRolloutConfig {
return jsonP.readObj({
required: {},
optional: {
"maximumPerMinute": "n",
"exponentialRate": toAwsJobExponentialRolloutRate,
},
}, root);
}
// refs: 2 - tags: input, named, interface, output
/** The rate of increase for a job rollout. */
export interface AwsJobExponentialRolloutRate {
/** The minimum number of things that will be notified of a pending job, per minute, at the start of the job rollout. */
baseRatePerMinute: number;
/** The rate of increase for a job rollout. */
incrementFactor: number;
/** The criteria to initiate the increase in rate of rollout for a job. */
rateIncreaseCriteria: AwsJobRateIncreaseCriteria;
}
function fromAwsJobExponentialRolloutRate(input?: AwsJobExponentialRolloutRate | null): jsonP.JSONValue {
if (!input) return input;
return {
baseRatePerMinute: input["baseRatePerMinute"],
incrementFactor: input["incrementFactor"],
rateIncreaseCriteria: fromAwsJobRateIncreaseCriteria(input["rateIncreaseCriteria"]),
}
}
function toAwsJobExponentialRolloutRate(root: jsonP.JSONValue): AwsJobExponentialRolloutRate {
return jsonP.readObj({
required: {
"baseRatePerMinute": "n",
"incrementFactor": "n",
"rateIncreaseCriteria": toAwsJobRateIncreaseCriteria,
},
optional: {},
}, root);
}
// refs: 2 - tags: input, named, interface, output
/** The criteria to initiate the increase in rate of rollout for a job. */
export interface AwsJobRateIncreaseCriteria {
/** When this number of things have been notified, it will initiate an increase in the rollout rate. */
numberOfNotifiedThings?: number | null;
/** When this number of things have succeeded in their job execution, it will initiate an increase in the rollout rate. */
numberOfSucceededThings?: number | null;
}
function fromAwsJobRateIncreaseCriteria(input?: AwsJobRateIncreaseCriteria | null): jsonP.JSONValue {
if (!input) return input;
return {
numberOfNotifiedThings: input["numberOfNotifiedThings"],
numberOfSucceededThings: input["numberOfSucceededThings"],
}
}
function toAwsJobRateIncreaseCriteria(root: jsonP.JSONValue): AwsJobRateIncreaseCriteria {
return jsonP.readObj({
required: {},
optional: {
"numberOfNotifiedThings": "n",
"numberOfSucceededThings": "n",
},
}, root);
}
// refs: 2 - tags: input, named, interface, output
/** Configuration information for pre-signed URLs. */
export interface AwsJobPresignedUrlConfig {
/** How long (in seconds) pre-signed URLs are valid. */
expiresInSec?: number | null;
}
function fromAwsJobPresignedUrlConfig(input?: AwsJobPresignedUrlConfig | null): jsonP.JSONValue {
if (!input) return input;
return {
expiresInSec: input["expiresInSec"],
}
}
function toAwsJobPresignedUrlConfig(root: jsonP.JSONValue): AwsJobPresignedUrlConfig {
return jsonP.readObj({
required: {},
optional: {
"expiresInSec": "n",
},
}, root);
}
// refs: 1 - tags: input, named, interface
/** The criteria that determine when and how a job abort takes place. */
export interface AwsJobAbortConfig {
/** The list of criteria that determine when and how to abort the job. */
abortCriteriaList: AwsJobAbortCriteria[];
}
function fromAwsJobAbortConfig(input?: AwsJobAbortConfig | null): jsonP.JSONValue {
if (!input) return input;
return {
abortCriteriaList: input["abortCriteriaList"]?.map(x => fromAwsJobAbortCriteria(x)),
}
}
// refs: 1 - tags: input, named, interface
/** The criteria that determine when and how a job abort takes place. */
export interface AwsJobAbortCriteria {
/** The type of job execution failures that can initiate a job abort. */
failureType: AwsJobAbortCriteriaFailureType;
/** The type of job action to take to initiate the job abort. */
action: AwsJobAbortCriteriaAbortAction;
/** The minimum percentage of job execution failures that must occur to initiate the job abort. */
thresholdPercentage: number;
/** The minimum number of things which must receive job execution notifications before the job can be aborted. */
minNumberOfExecutedThings: number;
}
function fromAwsJobAbortCriteria(input?: AwsJobAbortCriteria | null): jsonP.JSONValue {
if (!input) return input;
return {
failureType: input["failureType"],
action: input["action"],
thresholdPercentage: input["thresholdPercentage"],
minNumberOfExecutedThings: input["minNumberOfExecutedThings"],
}
}
// refs: 1 - tags: input, named, enum
export type AwsJobAbortCriteriaFailureType =
| "FAILED"
| "REJECTED"
| "TIMED_OUT"
| "ALL"
| cmnP.UnexpectedEnumValue;
// refs: 1 - tags: input, named, enum
export type AwsJobAbortCriteriaAbortAction =
| "CANCEL"
| cmnP.UnexpectedEnumValue;
// refs: 1 - tags: input, named, interface
/** Specifies the amount of time each device has to finish its execution of the job. */
export interface AwsJobTimeoutConfig {
/** Specifies the amount of time, in minutes, this device has to finish execution of this job. */
inProgressTimeoutInMinutes?: number | null;
}
function fromAwsJobTimeoutConfig(input?: AwsJobTimeoutConfig | null): jsonP.JSONValue {
if (!input) return input;
return {
inProgressTimeoutInMinutes: input["inProgressTimeoutInMinutes"],
}
}
// refs: 2 - tags: input, named, interface, output
/** Describes a file to be associated with an OTA update. */
export interface OTAUpdateFile {
/** The name of the file. */
fileName?: string | null;
/** An integer value you can include in the job document to allow your devices to identify the type of file received from the cloud. */
fileType?: number | null;
/** The file version. */
fileVersion?: string | null;
/** The location of the updated firmware. */
fileLocation?: FileLocation | null;
/** The code signing method of the file. */
codeSigning?: CodeSigning | null;
/** A list of name/attribute pairs. */
attributes?: { [key: string]: string | null | undefined } | null;
}
function fromOTAUpdateFile(input?: OTAUpdateFile | null): jsonP.JSONValue {
if (!input) return input;
return {
fileName: input["fileName"],
fileType: input["fileType"],
fileVersion: input["fileVersion"],
fileLocation: fromFileLocation(input["fileLocation"]),
codeSigning: fromCodeSigning(input["codeSigning"]),
attributes: input["attributes"],
}
}
function toOTAUpdateFile(root: jsonP.JSONValue): OTAUpdateFile {
return jsonP.readObj({
required: {},
optional: {
"fileName": "s",
"fileType": "n",
"fileVersion": "s",
"fileLocation": toFileLocation,
"codeSigning": toCodeSigning,
"attributes": x => jsonP.readMap(String, String, x),
},
}, root);
}
// refs: 2 - tags: input, named, interface, output
/** The location of the OTA update. */
export interface FileLocation {
/** The stream that contains the OTA update. */
stream?: Stream | null;
/** The location of the updated firmware in S3. */
s3Location?: S3Location | null;
}
function fromFileLocation(input?: FileLocation | null): jsonP.JSONValue {
if (!input) return input;
return {
stream: fromStream(input["stream"]),
s3Location: fromS3Location(input["s3Location"]),
}
}
function toFileLocation(root: jsonP.JSONValue): FileLocation {
return jsonP.readObj({
required: {},
optional: {
"stream": toStream,
"s3Location": toS3Location,
},
}, root);
}
// refs: 2 - tags: input, named, interface, output
/** Describes a group of files that can be streamed. */
export interface Stream {
/** The stream ID. */
streamId?: string | null;
/** The ID of a file associated with a stream. */
fileId?: number | null;
}
function fromStream(input?: Stream | null): jsonP.JSONValue {
if (!input) return input;
return {
streamId: input["streamId"],
fileId: input["fileId"],
}
}
function toStream(root: jsonP.JSONValue): Stream {
return jsonP.readObj({
required: {},
optional: {
"streamId": "s",
"fileId": "n",
},
}, root);
}
// refs: 5 - tags: input, named, interface, output
/** The S3 location. */
export interface S3Location {
/** The S3 bucket. */
bucket?: string | null;
/** The S3 key. */
key?: string | null;
/** The S3 bucket version. */
version?: string | null;
}
function fromS3Location(input?: S3Location | null): jsonP.JSONValue {
if (!input) return input;
return {
bucket: input["bucket"],
key: input["key"],
version: input["version"],
}
}
function toS3Location(root: jsonP.JSONValue): S3Location {
return jsonP.readObj({
required: {},
optional: {
"bucket": "s",
"key": "s",
"version": "s",
},
}, root);
}
// refs: 2 - tags: input, named, interface, output
/** Describes the method to use when code signing a file. */
export interface CodeSigning {
/** The ID of the `AWSSignerJob` which was created to sign the file. */
awsSignerJobId?: string | null;
/** Describes the code-signing job. */
startSigningJobParameter?: StartSigningJobParameter | null;
/** A custom method for code signing a file. */
customCodeSigning?: CustomCodeSigning | null;
}
function fromCodeSigning(input?: CodeSigning | null): jsonP.JSONValue {
if (!input) return input;
return {
awsSignerJobId: input["awsSignerJobId"],
startSigningJobParameter: fromStartSigningJobParameter(input["startSigningJobParameter"]),
customCodeSigning: fromCustomCodeSigning(input["customCodeSigning"]),
}
}
function toCodeSigning(root: jsonP.JSONValue): CodeSigning {
return jsonP.readObj({
required: {},
optional: {
"awsSignerJobId": "s",
"startSigningJobParameter": toStartSigningJobParameter,
"customCodeSigning": toCustomCodeSigning,
},
}, root);
}
// refs: 2 - tags: input, named, interface, output
/** Information required to start a signing job. */
export interface StartSigningJobParameter {
/** Describes the code-signing profile. */
signingProfileParameter?: SigningProfileParameter | null;
/** The code-signing profile name. */
signingProfileName?: string | null;
/** The location to write the code-signed file. */
destination?: Destination | null;
}
function fromStartSigningJobParameter(input?: StartSigningJobParameter | null): jsonP.JSONValue {
if (!input) return input;
return {
signingProfileParameter: fromSigningProfileParameter(input["signingProfileParameter"]),
signingProfileName: input["signingProfileName"],
destination: fromDestination(input["destination"]),
}
}
function toStartSigningJobParameter(root: jsonP.JSONValue): StartSigningJobParameter {
return jsonP.readObj({
required: {},
optional: {
"signingProfileParameter": toSigningProfileParameter,
"signingProfileName": "s",
"destination": toDestination,
},
}, root);
}
// refs: 2 - tags: input, named, interface, output
/** Describes the code-signing profile. */
export interface SigningProfileParameter {
/** Certificate ARN. */
certificateArn?: string | null;
/** The hardware platform of your device. */
platform?: string | null;
/** The location of the code-signing certificate on your device. */
certificatePathOnDevice?: string | null;
}
function fromSigningProfileParameter(input?: SigningProfileParameter | null): jsonP.JSONValue {
if (!input) return input;
return {
certificateArn: input["certificateArn"],
platform: input["platform"],
certificatePathOnDevice: input["certificatePathOnDevice"],
}
}
function toSigningProfileParameter(root: jsonP.JSONValue): SigningProfileParameter {
return jsonP.readObj({
required: {},
optional: {
"certificateArn": "s",
"platform": "s",
"certificatePathOnDevice": "s",
},
}, root);
}
// refs: 2 - tags: input, named, interface, output
/** Describes the location of the updated firmware. */
export interface Destination {
/** Describes the location in S3 of the updated firmware. */
s3Destination?: S3Destination | null;
}
function fromDestination(input?: Destination | null): jsonP.JSONValue {
if (!input) return input;
return {
s3Destination: fromS3Destination(input["s3Destination"]),
}
}
function toDestination(root: jsonP.JSONValue): Destination {
return jsonP.readObj({
required: {},
optional: {
"s3Destination": toS3Destination,
},
}, root);
}
// refs: 2 - tags: input, named, interface, output
/** Describes the location of updated firmware in S3. */
export interface S3Destination {
/** The S3 bucket that contains the updated firmware. */
bucket?: string | null;
/** The S3 prefix. */
prefix?: string | null;
}
function fromS3Destination(input?: S3Destination | null): jsonP.JSONValue {
if (!input) return input;
return {
bucket: input["bucket"],
prefix: input["prefix"],
}
}
function toS3Destination(root: jsonP.JSONValue): S3Destination {
return jsonP.readObj({
required: {},
optional: {
"bucket": "s",
"prefix": "s",
},
}, root);
}
// refs: 2 - tags: input, named, interface, output
/** Describes a custom method used to code sign a file. */
export interface CustomCodeSigning {
/** The signature for the file. */
signature?: CodeSigningSignature | null;
/** The certificate chain. */
certificateChain?: CodeSigningCertificateChain | null;
/** The hash algorithm used to code sign the file. */
hashAlgorithm?: string | null;
/** The signature algorithm used to code sign the file. */
signatureAlgorithm?: string | null;
}
function fromCustomCodeSigning(input?: CustomCodeSigning | null): jsonP.JSONValue {
if (!input) return input;
return {
signature: fromCodeSigningSignature(input["signature"]),
certificateChain: fromCodeSigningCertificateChain(input["certificateChain"]),
hashAlgorithm: input["hashAlgorithm"],
signatureAlgorithm: input["signatureAlgorithm"],
}
}
function toCustomCodeSigning(root: jsonP.JSONValue): CustomCodeSigning {
return jsonP.readObj({
required: {},
optional: {
"signature": toCodeSigningSignature,
"certificateChain": toCodeSigningCertificateChain,
"hashAlgorithm": "s",
"signatureAlgorithm": "s",
},
}, root);
}
// refs: 2 - tags: input, named, interface, output
/** Describes the signature for a file. */
export interface CodeSigningSignature {
/** A base64 encoded binary representation of the code signing signature. */
inlineDocument?: Uint8Array | string | null;
}
function fromCodeSigningSignature(input?: CodeSigningSignature | null): jsonP.JSONValue {
if (!input) return input;
return {
inlineDocument: serializeBlob(input["inlineDocument"]),
}
}
function toCodeSigningSignature(root: jsonP.JSONValue): CodeSigningSignature {
return jsonP.readObj({
required: {},
optional: {
"inlineDocument": "a",
},
}, root);
}
// refs: 2 - tags: input, named, interface, output
/** Describes the certificate chain being used when code signing a file. */
export interface CodeSigningCertificateChain {
/** The name of the certificate. */
certificateName?: string | null;
/** A base64 encoded binary representation of the code signing certificate chain. */
inlineDocument?: string | null;
}
function fromCodeSigningCertificateChain(input?: CodeSigningCertificateChain | null): jsonP.JSONValue {
if (!input) return input;
return {
certificateName: input["certificateName"],
inlineDocument: input["inlineDocument"],
}
}
function toCodeSigningCertificateChain(root: jsonP.JSONValue): CodeSigningCertificateChain {
return jsonP.readObj({
required: {},
optional: {
"certificateName": "s",
"inlineDocument": "s",
},
}, root);
}
// refs: 3 - tags: input, named, interface, output
/** Structure that contains `payloadVersion` and `targetArn`. */
export interface ProvisioningHook {
/** The payload that was sent to the target function. */
payloadVersion?: string | null;
/** The ARN of the target function. */
targetArn: string;
}
function fromProvisioningHook(input?: ProvisioningHook | null): jsonP.JSONValue {
if (!input) return input;
return {
payloadVersion: input["payloadVersion"],
targetArn: input["targetArn"],
}
}
function toProvisioningHook(root: jsonP.JSONValue): ProvisioningHook {
return jsonP.readObj({
required: {
"targetArn": "s",
},
optional: {
"payloadVersion": "s",
},
}, root);
}
// refs: 4 - tags: input, named, enum, output
export type AuditFrequency =
| "DAILY"
| "WEEKLY"
| "BIWEEKLY"
| "MONTHLY"
| cmnP.UnexpectedEnumValue;
// refs: 4 - tags: input, named, enum, output
export type DayOfWeek =
| "SUN"
| "MON"
| "TUE"
| "WED"
| "THU"
| "FRI"
| "SAT"
| cmnP.UnexpectedEnumValue;
// refs: 7 - tags: input, named, interface, output
/** A Device Defender security profile behavior. */
export interface Behavior {
/** The name you've given to the behavior. */
name: string;
/** What is measured by the behavior. */
metric?: string | null;
/** The dimension for a metric in your behavior. */
metricDimension?: MetricDimension | null;
/** The criteria that determine if a device is behaving normally in regard to the `metric`. */
criteria?: BehaviorCriteria | null;
/** Suppresses alerts. */
suppressAlerts?: boolean | null;
}
function fromBehavior(input?: Behavior | null): jsonP.JSONValue {
if (!input) return input;
return {
name: input["name"],
metric: input["metric"],
metricDimension: fromMetricDimension(input["metricDimension"]),
criteria: fromBehaviorCriteria(input["criteria"]),
suppressAlerts: input["suppressAlerts"],
}
}
function toBehavior(root: jsonP.JSONValue): Behavior {
return jsonP.readObj({
required: {
"name": "s",
},
optional: {
"metric": "s",
"metricDimension": toMetricDimension,
"criteria": toBehaviorCriteria,
"suppressAlerts": "b",
},
}, root);
}
// refs: 11 - tags: input, named, interface, output
/** The dimension of a metric. */
export interface MetricDimension {
/** A unique identifier for the dimension. */
dimensionName: string;
/** Defines how the `dimensionValues` of a dimension are interpreted. */
operator?: DimensionValueOperator | null;
}
function fromMetricDimension(input?: MetricDimension | null): jsonP.JSONValue {
if (!input) return input;
return {
dimensionName: input["dimensionName"],
operator: input["operator"],
}
}
function toMetricDimension(root: jsonP.JSONValue): MetricDimension {
return jsonP.readObj({
required: {
"dimensionName": "s",
},
optional: {
"operator": (x: jsonP.JSONValue) => cmnP.readEnum<DimensionValueOperator>(x),
},
}, root);
}
// refs: 11 - tags: input, named, enum, output
export type DimensionValueOperator =
| "IN"
| "NOT_IN"
| cmnP.UnexpectedEnumValue;
// refs: 7 - tags: input, named, interface, output
/** The criteria by which the behavior is determined to be normal. */
export interface BehaviorCriteria {
/** The operator that relates the thing measured (`metric`) to the criteria (containing a `value` or `statisticalThreshold`). */
comparisonOperator?: ComparisonOperator | null;
/** The value to be compared with the `metric`. */
value?: MetricValue | null;
/** Use this to specify the time duration over which the behavior is evaluated, for those criteria that have a time dimension (for example, `NUM_MESSAGES_SENT`). */
durationSeconds?: number | null;
/** If a device is in violation of the behavior for the specified number of consecutive datapoints, an alarm occurs. */
consecutiveDatapointsToAlarm?: number | null;
/** If an alarm has occurred and the offending device is no longer in violation of the behavior for the specified number of consecutive datapoints, the alarm is cleared. */
consecutiveDatapointsToClear?: number | null;
/** A statistical ranking (percentile)that indicates a threshold value by which a behavior is determined to be in compliance or in violation of the behavior. */
statisticalThreshold?: StatisticalThreshold | null;
/** The configuration of an ML Detect */
mlDetectionConfig?: MachineLearningDetectionConfig | null;
}
function fromBehaviorCriteria(input?: BehaviorCriteria | null): jsonP.JSONValue {
if (!input) return input;
return {
comparisonOperator: input["comparisonOperator"],
value: fromMetricValue(input["value"]),
durationSeconds: input["durationSeconds"],
consecutiveDatapointsToAlarm: input["consecutiveDatapointsToAlarm"],
consecutiveDatapointsToClear: input["consecutiveDatapointsToClear"],
statisticalThreshold: fromStatisticalThreshold(input["statisticalThreshold"]),
mlDetectionConfig: fromMachineLearningDetectionConfig(input["mlDetectionConfig"]),
}
}
function toBehaviorCriteria(root: jsonP.JSONValue): BehaviorCriteria {
return jsonP.readObj({
required: {},
optional: {
"comparisonOperator": (x: jsonP.JSONValue) => cmnP.readEnum<ComparisonOperator>(x),
"value": toMetricValue,
"durationSeconds": "n",
"consecutiveDatapointsToAlarm": "n",
"consecutiveDatapointsToClear": "n",
"statisticalThreshold": toStatisticalThreshold,
"mlDetectionConfig": toMachineLearningDetectionConfig,
},
}, root);
}
// refs: 7 - tags: input, named, enum, output
export type ComparisonOperator =
| "less-than"
| "less-than-equals"
| "greater-than"
| "greater-than-equals"
| "in-cidr-set"
| "not-in-cidr-set"
| "in-port-set"
| "not-in-port-set"
| "in-set"
| "not-in-set"
| cmnP.UnexpectedEnumValue;
// refs: 9 - tags: input, named, interface, output
/** The value to be compared with the `metric`. */
export interface MetricValue {
/** If the `comparisonOperator` calls for a numeric value, use this to specify that numeric value to be compared with the `metric`. */
count?: number | null;
/** If the `comparisonOperator` calls for a set of CIDRs, use this to specify that set to be compared with the `metric`. */
cidrs?: string[] | null;
/** If the `comparisonOperator` calls for a set of ports, use this to specify that set to be compared with the `metric`. */
ports?: number[] | null;
/** The numeral value of a metric. */
number?: number | null;
/** The numeral values of a metric. */
numbers?: number[] | null;
/** The string values of a metric. */
strings?: string[] | null;
}
function fromMetricValue(input?: MetricValue | null): jsonP.JSONValue {
if (!input) return input;
return {
count: input["count"],
cidrs: input["cidrs"],
ports: input["ports"],
number: input["number"],
numbers: input["numbers"],
strings: input["strings"],
}
}
function toMetricValue(root: jsonP.JSONValue): MetricValue {
return jsonP.readObj({
required: {},
optional: {
"count": "n",
"cidrs": ["s"],
"ports": ["n"],
"number": "n",
"numbers": ["n"],
"strings": ["s"],
},
}, root);
}
// refs: 7 - tags: input, named, interface, output
/** A statistical ranking (percentile) that indicates a threshold value by which a behavior is determined to be in compliance or in violation of the behavior. */
export interface StatisticalThreshold {
/** The percentile that resolves to a threshold value by which compliance with a behavior is determined. */
statistic?: string | null;
}
function fromStatisticalThreshold(input?: StatisticalThreshold | null): jsonP.JSONValue {
if (!input) return input;
return {
statistic: input["statistic"],
}
}
function toStatisticalThreshold(root: jsonP.JSONValue): StatisticalThreshold {
return jsonP.readObj({
required: {},
optional: {
"statistic": "s",
},
}, root);
}
// refs: 7 - tags: input, named, interface, output
/** The configuration of an ML Detect Security Profile. */
export interface MachineLearningDetectionConfig {
/** The sensitivity of anomalous behavior evaluation. */
confidenceLevel: ConfidenceLevel;
}
function fromMachineLearningDetectionConfig(input?: MachineLearningDetectionConfig | null): jsonP.JSONValue {
if (!input) return input;
return {
confidenceLevel: input["confidenceLevel"],
}
}
function toMachineLearningDetectionConfig(root: jsonP.JSONValue): MachineLearningDetectionConfig {
return jsonP.readObj({
required: {
"confidenceLevel": (x: jsonP.JSONValue) => cmnP.readEnum<ConfidenceLevel>(x),
},
optional: {},
}, root);
}
// refs: 9 - tags: input, named, enum, output
export type ConfidenceLevel =
| "LOW"
| "MEDIUM"
| "HIGH"
| cmnP.UnexpectedEnumValue;
// refs: 4 - tags: input, named, enum, output
/** The type of alert target: one of "SNS". */
export type AlertTargetType =
| "SNS"
| cmnP.UnexpectedEnumValue;
// refs: 4 - tags: input, named, interface, output
/** A structure containing the alert target ARN and the role ARN. */
export interface AlertTarget {
/** The Amazon Resource Name (ARN) of the notification target to which alerts are sent. */
alertTargetArn: string;
/** The ARN of the role that grants permission to send alerts to the notification target. */
roleArn: string;
}
function fromAlertTarget(input?: AlertTarget | null): jsonP.JSONValue {
if (!input) return input;
return {
alertTargetArn: input["alertTargetArn"],
roleArn: input["roleArn"],
}
}
function toAlertTarget(root: jsonP.JSONValue): AlertTarget {
return jsonP.readObj({
required: {
"alertTargetArn": "s",
"roleArn": "s",
},
optional: {},
}, root);
}
// refs: 4 - tags: input, named, interface, output
/** The metric you want to retain. */
export interface MetricToRetain {
/** What is measured by the behavior. */
metric: string;
/** The dimension of a metric. */
metricDimension?: MetricDimension | null;
}
function fromMetricToRetain(input?: MetricToRetain | null): jsonP.JSONValue {
if (!input) return input;
return {
metric: input["metric"],
metricDimension: fromMetricDimension(input["metricDimension"]),
}
}
function toMetricToRetain(root: jsonP.JSONValue): MetricToRetain {
return jsonP.readObj({
required: {
"metric": "s",
},
optional: {
"metricDimension": toMetricDimension,
},
}, root);
}
// refs: 3 - tags: input, named, interface, output
/** Represents a file to stream. */
export interface StreamFile {
/** The file ID. */
fileId?: number | null;
/** The location of the file in S3. */
s3Location?: S3Location | null;
}
function fromStreamFile(input?: StreamFile | null): jsonP.JSONValue {
if (!input) return input;
return {
fileId: input["fileId"],
s3Location: fromS3Location(input["s3Location"]),
}
}
function toStreamFile(root: jsonP.JSONValue): StreamFile {
return jsonP.readObj({
required: {},
optional: {
"fileId": "n",
"s3Location": toS3Location,
},
}, root);
}
// refs: 3 - tags: input, named, interface, output
/** The ThingTypeProperties contains information about the thing type including: a thing type description, and a list of searchable thing attribute names. */
export interface ThingTypeProperties {
/** The description of the thing type. */
thingTypeDescription?: string | null;
/** A list of searchable thing attribute names. */
searchableAttributes?: string[] | null;
}
function fromThingTypeProperties(input?: ThingTypeProperties | null): jsonP.JSONValue {
if (!input) return input;
return {
thingTypeDescription: input["thingTypeDescription"],
searchableAttributes: input["searchableAttributes"],
}
}
function toThingTypeProperties(root: jsonP.JSONValue): ThingTypeProperties {
return jsonP.readObj({
required: {},
optional: {
"thingTypeDescription": "s",
"searchableAttributes": ["s"],
},
}, root);
}
// refs: 2 - tags: input, named, interface
/** Describes a rule. */
export interface TopicRulePayload {
/** The SQL statement used to query the topic. */
sql: string;
/** The description of the rule. */
description?: string | null;
/** The actions associated with the rule. */
actions: Action[];
/** Specifies whether the rule is disabled. */
ruleDisabled?: boolean | null;
/** The version of the SQL rules engine to use when evaluating the rule. */
awsIotSqlVersion?: string | null;
/** The action to take when an error occurs. */
errorAction?: Action | null;
}
function fromTopicRulePayload(input?: TopicRulePayload | null): jsonP.JSONValue {
if (!input) return input;
return {
sql: input["sql"],
description: input["description"],
actions: input["actions"]?.map(x => fromAction(x)),
ruleDisabled: input["ruleDisabled"],
awsIotSqlVersion: input["awsIotSqlVersion"],
errorAction: fromAction(input["errorAction"]),
}
}
// refs: 6 - tags: input, named, interface, output
/** Describes the actions associated with a rule. */
export interface Action {
/** Write to a DynamoDB table. */
dynamoDB?: DynamoDBAction | null;
/** Write to a DynamoDB table. */
dynamoDBv2?: DynamoDBv2Action | null;
/** Invoke a Lambda function. */
lambda?: LambdaAction | null;
/** Publish to an Amazon SNS topic. */
sns?: SnsAction | null;
/** Publish to an Amazon SQS queue. */
sqs?: SqsAction | null;
/** Write data to an Amazon Kinesis stream. */
kinesis?: KinesisAction | null;
/** Publish to another MQTT topic. */
republish?: RepublishAction | null;
/** Write to an Amazon S3 bucket. */
s3?: S3Action | null;
/** Write to an Amazon Kinesis Firehose stream. */
firehose?: FirehoseAction | null;
/** Capture a CloudWatch metric. */
cloudwatchMetric?: CloudwatchMetricAction | null;
/** Change the state of a CloudWatch alarm. */
cloudwatchAlarm?: CloudwatchAlarmAction | null;
/** Send data to CloudWatch Logs. */
cloudwatchLogs?: CloudwatchLogsAction | null;
/** Write data to an Amazon OpenSearch Service domain. */
elasticsearch?: ElasticsearchAction | null;
/** Send a message to a Salesforce IoT Cloud Input Stream. */
salesforce?: SalesforceAction | null;
/** Sends message data to an IoT Analytics channel. */
iotAnalytics?: IotAnalyticsAction | null;
/** Sends an input to an IoT Events detector. */
iotEvents?: IotEventsAction | null;
/** Sends data from the MQTT message that triggered the rule to IoT SiteWise asset properties. */
iotSiteWise?: IotSiteWiseAction | null;
/** Starts execution of a Step Functions state machine. */
stepFunctions?: StepFunctionsAction | null;
/** The Timestream rule action writes attributes (measures) from an MQTT message into an Amazon Timestream table. */
timestream?: TimestreamAction | null;
/** Send data to an HTTPS endpoint. */
http?: HttpAction | null;
/** Send messages to an Amazon Managed Streaming for Apache Kafka (Amazon MSK) or self-managed Apache Kafka cluster. */
kafka?: KafkaAction | null;
/** Write data to an Amazon OpenSearch Service domain. */
openSearch?: OpenSearchAction | null;
}
function fromAction(input?: Action | null): jsonP.JSONValue {
if (!input) return input;
return {
dynamoDB: fromDynamoDBAction(input["dynamoDB"]),
dynamoDBv2: fromDynamoDBv2Action(input["dynamoDBv2"]),
lambda: fromLambdaAction(input["lambda"]),
sns: fromSnsAction(input["sns"]),
sqs: fromSqsAction(input["sqs"]),
kinesis: fromKinesisAction(input["kinesis"]),
republish: fromRepublishAction(input["republish"]),
s3: fromS3Action(input["s3"]),
firehose: fromFirehoseAction(input["firehose"]),
cloudwatchMetric: fromCloudwatchMetricAction(input["cloudwatchMetric"]),
cloudwatchAlarm: fromCloudwatchAlarmAction(input["cloudwatchAlarm"]),
cloudwatchLogs: fromCloudwatchLogsAction(input["cloudwatchLogs"]),
elasticsearch: fromElasticsearchAction(input["elasticsearch"]),
salesforce: fromSalesforceAction(input["salesforce"]),
iotAnalytics: fromIotAnalyticsAction(input["iotAnalytics"]),
iotEvents: fromIotEventsAction(input["iotEvents"]),
iotSiteWise: fromIotSiteWiseAction(input["iotSiteWise"]),
stepFunctions: fromStepFunctionsAction(input["stepFunctions"]),
timestream: fromTimestreamAction(input["timestream"]),
http: fromHttpAction(input["http"]),
kafka: fromKafkaAction(input["kafka"]),
openSearch: fromOpenSearchAction(input["openSearch"]),
}
}
function toAction(root: jsonP.JSONValue): Action {
return jsonP.readObj({
required: {},
optional: {
"dynamoDB": toDynamoDBAction,
"dynamoDBv2": toDynamoDBv2Action,
"lambda": toLambdaAction,
"sns": toSnsAction,
"sqs": toSqsAction,
"kinesis": toKinesisAction,
"republish": toRepublishAction,
"s3": toS3Action,
"firehose": toFirehoseAction,
"cloudwatchMetric": toCloudwatchMetricAction,
"cloudwatchAlarm": toCloudwatchAlarmAction,
"cloudwatchLogs": toCloudwatchLogsAction,
"elasticsearch": toElasticsearchAction,
"salesforce": toSalesforceAction,
"iotAnalytics": toIotAnalyticsAction,
"iotEvents": toIotEventsAction,
"iotSiteWise": toIotSiteWiseAction,
"stepFunctions": toStepFunctionsAction,
"timestream": toTimestreamAction,
"http": toHttpAction,
"kafka": toKafkaAction,
"openSearch": toOpenSearchAction,
},
}, root);
}
// refs: 6 - tags: input, named, interface, output
/** Describes an action to write to a DynamoDB table. */
export interface DynamoDBAction {
/** The name of the DynamoDB table. */
tableName: string;
/** The ARN of the IAM role that grants access to the DynamoDB table. */
roleArn: string;
/** The type of operation to be performed. */
operation?: string | null;
/** The hash key name. */
hashKeyField: string;
/** The hash key value. */
hashKeyValue: string;
/** The hash key type. */
hashKeyType?: DynamoKeyType | null;
/** The range key name. */
rangeKeyField?: string | null;
/** The range key value. */
rangeKeyValue?: string | null;
/** The range key type. */
rangeKeyType?: DynamoKeyType | null;
/** The action payload. */
payloadField?: string | null;
}
function fromDynamoDBAction(input?: DynamoDBAction | null): jsonP.JSONValue {
if (!input) return input;
return {
tableName: input["tableName"],
roleArn: input["roleArn"],
operation: input["operation"],
hashKeyField: input["hashKeyField"],
hashKeyValue: input["hashKeyValue"],
hashKeyType: input["hashKeyType"],
rangeKeyField: input["rangeKeyField"],
rangeKeyValue: input["rangeKeyValue"],
rangeKeyType: input["rangeKeyType"],
payloadField: input["payloadField"],
}
}
function toDynamoDBAction(root: jsonP.JSONValue): DynamoDBAction {
return jsonP.readObj({
required: {
"tableName": "s",
"roleArn": "s",
"hashKeyField": "s",
"hashKeyValue": "s",
},
optional: {
"operation": "s",
"hashKeyType": (x: jsonP.JSONValue) => cmnP.readEnum<DynamoKeyType>(x),
"rangeKeyField": "s",
"rangeKeyValue": "s",
"rangeKeyType": (x: jsonP.JSONValue) => cmnP.readEnum<DynamoKeyType>(x),
"payloadField": "s",
},
}, root);
}
// refs: 12 - tags: input, named, enum, output
export type DynamoKeyType =
| "STRING"
| "NUMBER"
| cmnP.UnexpectedEnumValue;
// refs: 6 - tags: input, named, interface, output
/** Describes an action to write to a DynamoDB table. */
export interface DynamoDBv2Action {
/** The ARN of the IAM role that grants access to the DynamoDB table. */
roleArn: string;
/** Specifies the DynamoDB table to which the message data will be written. */
putItem: PutItemInput;
}
function fromDynamoDBv2Action(input?: DynamoDBv2Action | null): jsonP.JSONValue {
if (!input) return input;
return {
roleArn: input["roleArn"],
putItem: fromPutItemInput(input["putItem"]),
}
}
function toDynamoDBv2Action(root: jsonP.JSONValue): DynamoDBv2Action {
return jsonP.readObj({
required: {
"roleArn": "s",
"putItem": toPutItemInput,
},
optional: {},
}, root);
}
// refs: 6 - tags: input, named, interface, output
/** The input for the DynamoActionVS action that specifies the DynamoDB table to which the message data will be written. */
export interface PutItemInput {
/** The table where the message data will be written. */
tableName: string;
}
function fromPutItemInput(input?: PutItemInput | null): jsonP.JSONValue {
if (!input) return input;
return {
tableName: input["tableName"],
}
}
function toPutItemInput(root: jsonP.JSONValue): PutItemInput {
return jsonP.readObj({
required: {
"tableName": "s",
},
optional: {},
}, root);
}
// refs: 6 - tags: input, named, interface, output
/** Describes an action to invoke a Lambda function. */
export interface LambdaAction {
/** The ARN of the Lambda function. */
functionArn: string;
}
function fromLambdaAction(input?: LambdaAction | null): jsonP.JSONValue {
if (!input) return input;
return {
functionArn: input["functionArn"],
}
}
function toLambdaAction(root: jsonP.JSONValue): LambdaAction {
return jsonP.readObj({
required: {
"functionArn": "s",
},
optional: {},
}, root);
}
// refs: 6 - tags: input, named, interface, output
/** Describes an action to publish to an Amazon SNS topic. */
export interface SnsAction {
/** The ARN of the SNS topic. */
targetArn: string;
/** The ARN of the IAM role that grants access. */
roleArn: string;
/** (Optional) The message format of the message to publish. */
messageFormat?: MessageFormat | null;
}
function fromSnsAction(input?: SnsAction | null): jsonP.JSONValue {
if (!input) return input;
return {
targetArn: input["targetArn"],
roleArn: input["roleArn"],
messageFormat: input["messageFormat"],
}
}
function toSnsAction(root: jsonP.JSONValue): SnsAction {
return jsonP.readObj({
required: {
"targetArn": "s",
"roleArn": "s",
},
optional: {
"messageFormat": (x: jsonP.JSONValue) => cmnP.readEnum<MessageFormat>(x),
},
}, root);
}
// refs: 6 - tags: input, named, enum, output
export type MessageFormat =
| "RAW"
| "JSON"
| cmnP.UnexpectedEnumValue;
// refs: 6 - tags: input, named, interface, output
/** Describes an action to publish data to an Amazon SQS queue. */
export interface SqsAction {
/** The ARN of the IAM role that grants access. */
roleArn: string;
/** The URL of the Amazon SQS queue. */
queueUrl: string;
/** Specifies whether to use Base64 encoding. */
useBase64?: boolean | null;
}
function fromSqsAction(input?: SqsAction | null): jsonP.JSONValue {
if (!input) return input;
return {
roleArn: input["roleArn"],
queueUrl: input["queueUrl"],
useBase64: input["useBase64"],
}
}
function toSqsAction(root: jsonP.JSONValue): SqsAction {
return jsonP.readObj({
required: {
"roleArn": "s",
"queueUrl": "s",
},
optional: {
"useBase64": "b",
},
}, root);
}
// refs: 6 - tags: input, named, interface, output
/** Describes an action to write data to an Amazon Kinesis stream. */
export interface KinesisAction {
/** The ARN of the IAM role that grants access to the Amazon Kinesis stream. */
roleArn: string;
/** The name of the Amazon Kinesis stream. */
streamName: string;
/** The partition key. */
partitionKey?: string | null;
}
function fromKinesisAction(input?: KinesisAction | null): jsonP.JSONValue {
if (!input) return input;
return {
roleArn: input["roleArn"],
streamName: input["streamName"],
partitionKey: input["partitionKey"],
}
}
function toKinesisAction(root: jsonP.JSONValue): KinesisAction {
return jsonP.readObj({
required: {
"roleArn": "s",
"streamName": "s",
},
optional: {
"partitionKey": "s",
},
}, root);
}
// refs: 6 - tags: input, named, interface, output
/** Describes an action to republish to another topic. */
export interface RepublishAction {
/** The ARN of the IAM role that grants access. */
roleArn: string;
/** The name of the MQTT topic. */
topic: string;
/** The Quality of Service (QoS) level to use when republishing messages. */
qos?: number | null;
}
function fromRepublishAction(input?: RepublishAction | null): jsonP.JSONValue {
if (!input) return input;
return {
roleArn: input["roleArn"],
topic: input["topic"],
qos: input["qos"],
}
}
function toRepublishAction(root: jsonP.JSONValue): RepublishAction {
return jsonP.readObj({
required: {
"roleArn": "s",
"topic": "s",
},
optional: {
"qos": "n",
},
}, root);
}
// refs: 6 - tags: input, named, interface, output
/** Describes an action to write data to an Amazon S3 bucket. */
export interface S3Action {
/** The ARN of the IAM role that grants access. */
roleArn: string;
/** The Amazon S3 bucket. */
bucketName: string;
/** The object key. */
key: string;
/** The Amazon S3 canned ACL that controls access to the object identified by the object key. */
cannedAcl?: CannedAccessControlList | null;
}
function fromS3Action(input?: S3Action | null): jsonP.JSONValue {
if (!input) return input;
return {
roleArn: input["roleArn"],
bucketName: input["bucketName"],
key: input["key"],
cannedAcl: input["cannedAcl"],
}
}
function toS3Action(root: jsonP.JSONValue): S3Action {
return jsonP.readObj({
required: {
"roleArn": "s",
"bucketName": "s",
"key": "s",
},
optional: {
"cannedAcl": (x: jsonP.JSONValue) => cmnP.readEnum<CannedAccessControlList>(x),
},
}, root);
}
// refs: 6 - tags: input, named, enum, output
export type CannedAccessControlList =
| "private"
| "public-read"
| "public-read-write"
| "aws-exec-read"
| "authenticated-read"
| "bucket-owner-read"
| "bucket-owner-full-control"
| "log-delivery-write"
| cmnP.UnexpectedEnumValue;
// refs: 6 - tags: input, named, interface, output
/** Describes an action that writes data to an Amazon Kinesis Firehose stream. */
export interface FirehoseAction {
/** The IAM role that grants access to the Amazon Kinesis Firehose stream. */
roleArn: string;
/** The delivery stream name. */
deliveryStreamName: string;
/** A character separator that will be used to separate records written to the Firehose stream. */
separator?: string | null;
/** Whether to deliver the Kinesis Data Firehose stream as a batch by using [PutRecordBatch](https://docs.aws.amazon.com/firehose/latest/APIReference/API_PutRecordBatch.html). */
batchMode?: boolean | null;
}
function fromFirehoseAction(input?: FirehoseAction | null): jsonP.JSONValue {
if (!input) return input;
return {
roleArn: input["roleArn"],
deliveryStreamName: input["deliveryStreamName"],
separator: input["separator"],
batchMode: input["batchMode"],
}
}
function toFirehoseAction(root: jsonP.JSONValue): FirehoseAction {
return jsonP.readObj({
required: {
"roleArn": "s",
"deliveryStreamName": "s",
},
optional: {
"separator": "s",
"batchMode": "b",
},
}, root);
}
// refs: 6 - tags: input, named, interface, output
/** Describes an action that captures a CloudWatch metric. */
export interface CloudwatchMetricAction {
/** The IAM role that allows access to the CloudWatch metric. */
roleArn: string;
/** The CloudWatch metric namespace name. */
metricNamespace: string;
/** The CloudWatch metric name. */
metricName: string;
/** The CloudWatch metric value. */
metricValue: string;
/** The [metric unit](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/cloudwatch_concepts.html#Unit) supported by CloudWatch. */
metricUnit: string;
/** An optional [Unix timestamp](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/cloudwatch_concepts.html#about_timestamp). */
metricTimestamp?: string | null;
}
function fromCloudwatchMetricAction(input?: CloudwatchMetricAction | null): jsonP.JSONValue {
if (!input) return input;
return {
roleArn: input["roleArn"],
metricNamespace: input["metricNamespace"],
metricName: input["metricName"],
metricValue: input["metricValue"],
metricUnit: input["metricUnit"],
metricTimestamp: input["metricTimestamp"],
}
}
function toCloudwatchMetricAction(root: jsonP.JSONValue): CloudwatchMetricAction {
return jsonP.readObj({
required: {
"roleArn": "s",
"metricNamespace": "s",
"metricName": "s",
"metricValue": "s",
"metricUnit": "s",
},
optional: {
"metricTimestamp": "s",
},
}, root);
}
// refs: 6 - tags: input, named, interface, output
/** Describes an action that updates a CloudWatch alarm. */
export interface CloudwatchAlarmAction {
/** The IAM role that allows access to the CloudWatch alarm. */
roleArn: string;
/** The CloudWatch alarm name. */
alarmName: string;
/** The reason for the alarm change. */
stateReason: string;
/** The value of the alarm state. */
stateValue: string;
}
function fromCloudwatchAlarmAction(input?: CloudwatchAlarmAction | null): jsonP.JSONValue {
if (!input) return input;
return {
roleArn: input["roleArn"],
alarmName: input["alarmName"],
stateReason: input["stateReason"],
stateValue: input["stateValue"],
}
}
function toCloudwatchAlarmAction(root: jsonP.JSONValue): CloudwatchAlarmAction {
return jsonP.readObj({
required: {
"roleArn": "s",
"alarmName": "s",
"stateReason": "s",
"stateValue": "s",
},
optional: {},
}, root);
}
// refs: 6 - tags: input, named, interface, output
/** Describes an action that sends data to CloudWatch Logs. */
export interface CloudwatchLogsAction {
/** The IAM role that allows access to the CloudWatch log. */
roleArn: string;
/** The CloudWatch log group to which the action sends data. */
logGroupName: string;
}
function fromCloudwatchLogsAction(input?: CloudwatchLogsAction | null): jsonP.JSONValue {
if (!input) return input;
return {
roleArn: input["roleArn"],
logGroupName: input["logGroupName"],
}
}
function toCloudwatchLogsAction(root: jsonP.JSONValue): CloudwatchLogsAction {
return jsonP.readObj({
required: {
"roleArn": "s",
"logGroupName": "s",
},
optional: {},
}, root);
}
// refs: 6 - tags: input, named, interface, output
/** Describes an action that writes data to an Amazon OpenSearch Service domain. */
export interface ElasticsearchAction {
/** The IAM role ARN that has access to OpenSearch. */
roleArn: string;
/** The endpoint of your OpenSearch domain. */
endpoint: string;
/** The index where you want to store your data. */
index: string;
/** The type of document you are storing. */
type: string;
/** The unique identifier for the document you are storing. */
id: string;
}
function fromElasticsearchAction(input?: ElasticsearchAction | null): jsonP.JSONValue {
if (!input) return input;
return {
roleArn: input["roleArn"],
endpoint: input["endpoint"],
index: input["index"],
type: input["type"],
id: input["id"],
}
}
function toElasticsearchAction(root: jsonP.JSONValue): ElasticsearchAction {
return jsonP.readObj({
required: {
"roleArn": "s",
"endpoint": "s",
"index": "s",
"type": "s",
"id": "s",
},
optional: {},
}, root);
}
// refs: 6 - tags: input, named, interface, output
/** Describes an action to write a message to a Salesforce IoT Cloud Input Stream. */
export interface SalesforceAction {
/** The token used to authenticate access to the Salesforce IoT Cloud Input Stream. */
token: string;
/** The URL exposed by the Salesforce IoT Cloud Input Stream. */
url: string;
}
function fromSalesforceAction(input?: SalesforceAction | null): jsonP.JSONValue {
if (!input) return input;
return {
token: input["token"],
url: input["url"],
}
}
function toSalesforceAction(root: jsonP.JSONValue): SalesforceAction {
return jsonP.readObj({
required: {
"token": "s",
"url": "s",
},
optional: {},
}, root);
}
// refs: 6 - tags: input, named, interface, output
/** Sends message data to an IoT Analytics channel. */
export interface IotAnalyticsAction {
/** (deprecated) The ARN of the IoT Analytics channel to which message data will be sent. */
channelArn?: string | null;
/** The name of the IoT Analytics channel to which message data will be sent. */
channelName?: string | null;
/** Whether to process the action as a batch. */
batchMode?: boolean | null;
/** The ARN of the role which has a policy that grants IoT Analytics permission to send message data via IoT Analytics (iotanalytics:BatchPutMessage). */
roleArn?: string | null;
}
function fromIotAnalyticsAction(input?: IotAnalyticsAction | null): jsonP.JSONValue {
if (!input) return input;
return {
channelArn: input["channelArn"],
channelName: input["channelName"],
batchMode: input["batchMode"],
roleArn: input["roleArn"],
}
}
function toIotAnalyticsAction(root: jsonP.JSONValue): IotAnalyticsAction {
return jsonP.readObj({
required: {},
optional: {
"channelArn": "s",
"channelName": "s",
"batchMode": "b",
"roleArn": "s",
},
}, root);
}
// refs: 6 - tags: input, named, interface, output
/** Sends an input to an IoT Events detector. */
export interface IotEventsAction {
/** The name of the IoT Events input. */
inputName: string;
/** The ID of the message. */
messageId?: string | null;
/** Whether to process the event actions as a batch. */
batchMode?: boolean | null;
/** The ARN of the role that grants IoT permission to send an input to an IoT Events detector. */
roleArn: string;
}
function fromIotEventsAction(input?: IotEventsAction | null): jsonP.JSONValue {
if (!input) return input;
return {
inputName: input["inputName"],
messageId: input["messageId"],
batchMode: input["batchMode"],
roleArn: input["roleArn"],
}
}
function toIotEventsAction(root: jsonP.JSONValue): IotEventsAction {
return jsonP.readObj({
required: {
"inputName": "s",
"roleArn": "s",
},
optional: {
"messageId": "s",
"batchMode": "b",
},
}, root);
}
// refs: 6 - tags: input, named, interface, output
/** Describes an action to send data from an MQTT message that triggered the rule to IoT SiteWise asset properties. */
export interface IotSiteWiseAction {
/** A list of asset property value entries. */
putAssetPropertyValueEntries: PutAssetPropertyValueEntry[];
/** The ARN of the role that grants IoT permission to send an asset property value to IoT SiteWise. */
roleArn: string;
}
function fromIotSiteWiseAction(input?: IotSiteWiseAction | null): jsonP.JSONValue {
if (!input) return input;
return {
putAssetPropertyValueEntries: input["putAssetPropertyValueEntries"]?.map(x => fromPutAssetPropertyValueEntry(x)),
roleArn: input["roleArn"],
}
}
function toIotSiteWiseAction(root: jsonP.JSONValue): IotSiteWiseAction {
return jsonP.readObj({
required: {
"putAssetPropertyValueEntries": [toPutAssetPropertyValueEntry],
"roleArn": "s",
},
optional: {},
}, root);
}
// refs: 6 - tags: input, named, interface, output
/** An asset property value entry containing the following information. */
export interface PutAssetPropertyValueEntry {
/** Optional. */
entryId?: string | null;
/** The ID of the IoT SiteWise asset. */
assetId?: string | null;
/** The ID of the asset's property. */
propertyId?: string | null;
/** The name of the property alias associated with your asset property. */
propertyAlias?: string | null;
/** A list of property values to insert that each contain timestamp, quality, and value (TQV) information. */
propertyValues: AssetPropertyValue[];
}
function fromPutAssetPropertyValueEntry(input?: PutAssetPropertyValueEntry | null): jsonP.JSONValue {
if (!input) return input;
return {
entryId: input["entryId"],
assetId: input["assetId"],
propertyId: input["propertyId"],
propertyAlias: input["propertyAlias"],
propertyValues: input["propertyValues"]?.map(x => fromAssetPropertyValue(x)),
}
}
function toPutAssetPropertyValueEntry(root: jsonP.JSONValue): PutAssetPropertyValueEntry {
return jsonP.readObj({
required: {
"propertyValues": [toAssetPropertyValue],
},
optional: {
"entryId": "s",
"assetId": "s",
"propertyId": "s",
"propertyAlias": "s",
},
}, root);
}
// refs: 6 - tags: input, named, interface, output
/** An asset property value entry containing the following information. */
export interface AssetPropertyValue {
/** The value of the asset property. */
value: AssetPropertyVariant;
/** The asset property value timestamp. */
timestamp: AssetPropertyTimestamp;
/** Optional. */
quality?: string | null;
}
function fromAssetPropertyValue(input?: AssetPropertyValue | null): jsonP.JSONValue {
if (!input) return input;
return {
value: fromAssetPropertyVariant(input["value"]),
timestamp: fromAssetPropertyTimestamp(input["timestamp"]),
quality: input["quality"],
}
}
function toAssetPropertyValue(root: jsonP.JSONValue): AssetPropertyValue {
return jsonP.readObj({
required: {
"value": toAssetPropertyVariant,
"timestamp": toAssetPropertyTimestamp,
},
optional: {
"quality": "s",
},
}, root);
}
// refs: 6 - tags: input, named, interface, output
/** Contains an asset property value (of a single type). */
export interface AssetPropertyVariant {
/** Optional. */
stringValue?: string | null;
/** Optional. */
integerValue?: string | null;
/** Optional. */
doubleValue?: string | null;
/** Optional. */
booleanValue?: string | null;
}
function fromAssetPropertyVariant(input?: AssetPropertyVariant | null): jsonP.JSONValue {
if (!input) return input;
return {
stringValue: input["stringValue"],
integerValue: input["integerValue"],
doubleValue: input["doubleValue"],
booleanValue: input["booleanValue"],
}
}
function toAssetPropertyVariant(root: jsonP.JSONValue): AssetPropertyVariant {
return jsonP.readObj({
required: {},
optional: {
"stringValue": "s",
"integerValue": "s",
"doubleValue": "s",
"booleanValue": "s",
},
}, root);
}
// refs: 6 - tags: input, named, interface, output
/** An asset property timestamp entry containing the following information. */
export interface AssetPropertyTimestamp {
/** A string that contains the time in seconds since epoch. */
timeInSeconds: string;
/** Optional. */
offsetInNanos?: string | null;
}
function fromAssetPropertyTimestamp(input?: AssetPropertyTimestamp | null): jsonP.JSONValue {
if (!input) return input;
return {
timeInSeconds: input["timeInSeconds"],
offsetInNanos: input["offsetInNanos"],
}
}
function toAssetPropertyTimestamp(root: jsonP.JSONValue): AssetPropertyTimestamp {
return jsonP.readObj({
required: {
"timeInSeconds": "s",
},
optional: {
"offsetInNanos": "s",
},
}, root);
}
// refs: 6 - tags: input, named, interface, output
/** Starts execution of a Step Functions state machine. */
export interface StepFunctionsAction {
/** (Optional) A name will be given to the state machine execution consisting of this prefix followed by a UUID. */
executionNamePrefix?: string | null;
/** The name of the Step Functions state machine whose execution will be started. */
stateMachineName: string;
/** The ARN of the role that grants IoT permission to start execution of a state machine ("Action":"states:StartExecution"). */
roleArn: string;
}
function fromStepFunctionsAction(input?: StepFunctionsAction | null): jsonP.JSONValue {
if (!input) return input;
return {
executionNamePrefix: input["executionNamePrefix"],
stateMachineName: input["stateMachineName"],
roleArn: input["roleArn"],
}
}
function toStepFunctionsAction(root: jsonP.JSONValue): StepFunctionsAction {
return jsonP.readObj({
required: {
"stateMachineName": "s",
"roleArn": "s",
},
optional: {
"executionNamePrefix": "s",
},
}, root);
}
// refs: 6 - tags: input, named, interface, output
/** The Timestream rule action writes attributes (measures) from an MQTT message into an Amazon Timestream table. */
export interface TimestreamAction {
/** The ARN of the role that grants permission to write to the Amazon Timestream database table. */
roleArn: string;
/** The name of an Amazon Timestream database. */
databaseName: string;
/** The name of the database table into which to write the measure records. */
tableName: string;
/** Metadata attributes of the time series that are written in each measure record. */
dimensions: TimestreamDimension[];
/** Specifies an application-defined value to replace the default value assigned to the Timestream record's timestamp in the `time` column. */
timestamp?: TimestreamTimestamp | null;
}
function fromTimestreamAction(input?: TimestreamAction | null): jsonP.JSONValue {
if (!input) return input;
return {
roleArn: input["roleArn"],
databaseName: input["databaseName"],
tableName: input["tableName"],
dimensions: input["dimensions"]?.map(x => fromTimestreamDimension(x)),
timestamp: fromTimestreamTimestamp(input["timestamp"]),
}
}
function toTimestreamAction(root: jsonP.JSONValue): TimestreamAction {
return jsonP.readObj({
required: {
"roleArn": "s",
"databaseName": "s",
"tableName": "s",
"dimensions": [toTimestreamDimension],
},
optional: {
"timestamp": toTimestreamTimestamp,
},
}, root);
}
// refs: 6 - tags: input, named, interface, output
/** Metadata attributes of the time series that are written in each measure record. */
export interface TimestreamDimension {
/** The metadata dimension name. */
name: string;
/** The value to write in this column of the database record. */
value: string;
}
function fromTimestreamDimension(input?: TimestreamDimension | null): jsonP.JSONValue {
if (!input) return input;
return {
name: input["name"],
value: input["value"],
}
}
function toTimestreamDimension(root: jsonP.JSONValue): TimestreamDimension {
return jsonP.readObj({
required: {
"name": "s",
"value": "s",
},
optional: {},
}, root);
}
// refs: 6 - tags: input, named, interface, output
/** Describes how to interpret an application-defined timestamp value from an MQTT message payload and the precision of that value. */
export interface TimestreamTimestamp {
/** An expression that returns a long epoch time value. */
value: string;
/** The precision of the timestamp value that results from the expression described in `value`. */
unit: string;
}
function fromTimestreamTimestamp(input?: TimestreamTimestamp | null): jsonP.JSONValue {
if (!input) return input;
return {
value: input["value"],
unit: input["unit"],
}
}
function toTimestreamTimestamp(root: jsonP.JSONValue): TimestreamTimestamp {
return jsonP.readObj({
required: {
"value": "s",
"unit": "s",
},
optional: {},
}, root);
}
// refs: 6 - tags: input, named, interface, output
/** Send data to an HTTPS endpoint. */
export interface HttpAction {
/** The endpoint URL. */
url: string;
/** The URL to which IoT sends a confirmation message. */
confirmationUrl?: string | null;
/** The HTTP headers to send with the message data. */
headers?: HttpActionHeader[] | null;
/** The authentication method to use when sending data to an HTTPS endpoint. */
auth?: HttpAuthorization | null;
}
function fromHttpAction(input?: HttpAction | null): jsonP.JSONValue {
if (!input) return input;
return {
url: input["url"],
confirmationUrl: input["confirmationUrl"],
headers: input["headers"]?.map(x => fromHttpActionHeader(x)),
auth: fromHttpAuthorization(input["auth"]),
}
}
function toHttpAction(root: jsonP.JSONValue): HttpAction {
return jsonP.readObj({
required: {
"url": "s",
},
optional: {
"confirmationUrl": "s",
"headers": [toHttpActionHeader],
"auth": toHttpAuthorization,
},
}, root);
}
// refs: 6 - tags: input, named, interface, output
/** The HTTP action header. */
export interface HttpActionHeader {
/** The HTTP header key. */
key: string;
/** The HTTP header value. */
value: string;
}
function fromHttpActionHeader(input?: HttpActionHeader | null): jsonP.JSONValue {
if (!input) return input;
return {
key: input["key"],
value: input["value"],
}
}
function toHttpActionHeader(root: jsonP.JSONValue): HttpActionHeader {
return jsonP.readObj({
required: {
"key": "s",
"value": "s",
},
optional: {},
}, root);
}
// refs: 6 - tags: input, named, interface, output
/** The authorization method used to send messages. */
export interface HttpAuthorization {
/** Use Sig V4 authorization. */
sigv4?: SigV4Authorization | null;
}
function fromHttpAuthorization(input?: HttpAuthorization | null): jsonP.JSONValue {
if (!input) return input;
return {
sigv4: fromSigV4Authorization(input["sigv4"]),
}
}
function toHttpAuthorization(root: jsonP.JSONValue): HttpAuthorization {
return jsonP.readObj({
required: {},
optional: {
"sigv4": toSigV4Authorization,
},
}, root);
}
// refs: 6 - tags: input, named, interface, output
/** For more information, see [Signature Version 4 signing process](https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html). */
export interface SigV4Authorization {
/** The signing region. */
signingRegion: string;
/** The service name to use while signing with Sig V4. */
serviceName: string;
/** The ARN of the signing role. */
roleArn: string;
}
function fromSigV4Authorization(input?: SigV4Authorization | null): jsonP.JSONValue {
if (!input) return input;
return {
signingRegion: input["signingRegion"],
serviceName: input["serviceName"],
roleArn: input["roleArn"],
}
}
function toSigV4Authorization(root: jsonP.JSONValue): SigV4Authorization {
return jsonP.readObj({
required: {
"signingRegion": "s",
"serviceName": "s",
"roleArn": "s",
},
optional: {},
}, root);
}
// refs: 6 - tags: input, named, interface, output
/** Send messages to an Amazon Managed Streaming for Apache Kafka (Amazon MSK) or self-managed Apache Kafka cluster. */
export interface KafkaAction {
/** The ARN of Kafka action's VPC `TopicRuleDestination`. */
destinationArn: string;
/** The Kafka topic for messages to be sent to the Kafka broker. */
topic: string;
/** The Kafka message key. */
key?: string | null;
/** The Kafka message partition. */
partition?: string | null;
/** Properties of the Apache Kafka producer client. */
clientProperties: { [key: string]: string | null | undefined };
}
function fromKafkaAction(input?: KafkaAction | null): jsonP.JSONValue {
if (!input) return input;
return {
destinationArn: input["destinationArn"],
topic: input["topic"],
key: input["key"],
partition: input["partition"],
clientProperties: input["clientProperties"],
}
}
function toKafkaAction(root: jsonP.JSONValue): KafkaAction {
return jsonP.readObj({
required: {
"destinationArn": "s",
"topic": "s",
"clientProperties": x => jsonP.readMap(String, String, x),
},
optional: {
"key": "s",
"partition": "s",
},
}, root);
}
// refs: 6 - tags: input, named, interface, output
/** Describes an action that writes data to an Amazon OpenSearch Service domain. */
export interface OpenSearchAction {
/** The IAM role ARN that has access to OpenSearch. */
roleArn: string;
/** The endpoint of your OpenSearch domain. */
endpoint: string;
/** The OpenSearch index where you want to store your data. */
index: string;
/** The type of document you are storing. */
type: string;
/** The unique identifier for the document you are storing. */
id: string;
}
function fromOpenSearchAction(input?: OpenSearchAction | null): jsonP.JSONValue {
if (!input) return input;
return {
roleArn: input["roleArn"],
endpoint: input["endpoint"],
index: input["index"],
type: input["type"],
id: input["id"],
}
}
function toOpenSearchAction(root: jsonP.JSONValue): OpenSearchAction {
return jsonP.readObj({
required: {
"roleArn": "s",
"endpoint": "s",
"index": "s",
"type": "s",
"id": "s",
},
optional: {},
}, root);
}
// refs: 1 - tags: input, named, interface
/** Configuration of the topic rule destination. */
export interface TopicRuleDestinationConfiguration {
/** Configuration of the HTTP URL. */
httpUrlConfiguration?: HttpUrlDestinationConfiguration | null;
/** Configuration of the virtual private cloud (VPC) connection. */
vpcConfiguration?: VpcDestinationConfiguration | null;
}
function fromTopicRuleDestinationConfiguration(input?: TopicRuleDestinationConfiguration | null): jsonP.JSONValue {
if (!input) return input;
return {
httpUrlConfiguration: fromHttpUrlDestinationConfiguration(input["httpUrlConfiguration"]),
vpcConfiguration: fromVpcDestinationConfiguration(input["vpcConfiguration"]),
}
}
// refs: 1 - tags: input, named, interface
/** HTTP URL destination configuration used by the topic rule's HTTP action. */
export interface HttpUrlDestinationConfiguration {
/** The URL IoT uses to confirm ownership of or access to the topic rule destination URL. */
confirmationUrl: string;
}
function fromHttpUrlDestinationConfiguration(input?: HttpUrlDestinationConfiguration | null): jsonP.JSONValue {
if (!input) return input;
return {
confirmationUrl: input["confirmationUrl"],
}
}
// refs: 1 - tags: input, named, interface
/** The configuration information for a virtual private cloud (VPC) destination. */
export interface VpcDestinationConfiguration {
/** The subnet IDs of the VPC destination. */
subnetIds: string[];
/** The security groups of the VPC destination. */
securityGroups?: string[] | null;
/** The ID of the VPC. */
vpcId: string;
/** The ARN of a role that has permission to create and attach to elastic network interfaces (ENIs). */
roleArn: string;
}
function fromVpcDestinationConfiguration(input?: VpcDestinationConfiguration | null): jsonP.JSONValue {
if (!input) return input;
return {
subnetIds: input["subnetIds"],
securityGroups: input["securityGroups"],
vpcId: input["vpcId"],
roleArn: input["roleArn"],
}
}
// refs: 4 - tags: input, named, enum, output
export type LogTargetType =
| "DEFAULT"
| "THING_GROUP"
| cmnP.UnexpectedEnumValue;
// refs: 1 - tags: input, named, interface
/** The type of bucketed aggregation performed. */
export interface BucketsAggregationType {
/** Performs an aggregation that will return a list of buckets. */
termsAggregation?: TermsAggregation | null;
}
function fromBucketsAggregationType(input?: BucketsAggregationType | null): jsonP.JSONValue {
if (!input) return input;
return {
termsAggregation: fromTermsAggregation(input["termsAggregation"]),
}
}
// refs: 1 - tags: input, named, interface
/** Performs an aggregation that will return a list of buckets. */
export interface TermsAggregation {
/** The number of buckets to return in the response. */
maxBuckets?: number | null;
}
function fromTermsAggregation(input?: TermsAggregation | null): jsonP.JSONValue {
if (!input) return input;
return {
maxBuckets: input["maxBuckets"],
}
}
// refs: 2 - tags: input, named, enum
export type BehaviorCriteriaType =
| "STATIC"
| "STATISTICAL"
| "MACHINE_LEARNING"
| cmnP.UnexpectedEnumValue;
// refs: 5 - tags: input, named, enum, output
export type VerificationState =
| "FALSE_POSITIVE"
| "BENIGN_POSITIVE"
| "TRUE_POSITIVE"
| "UNKNOWN"
| cmnP.UnexpectedEnumValue;
// refs: 2 - tags: input, named, enum, output
export type AuditMitigationActionsExecutionStatus =
| "IN_PROGRESS"
| "COMPLETED"
| "FAILED"
| "CANCELED"
| "SKIPPED"
| "PENDING"
| cmnP.UnexpectedEnumValue;
// refs: 3 - tags: input, named, enum, output
export type AuditMitigationActionsTaskStatus =
| "IN_PROGRESS"
| "COMPLETED"
| "FAILED"
| "CANCELED"
| cmnP.UnexpectedEnumValue;
// refs: 3 - tags: input, named, enum, output
export type AuditTaskType =
| "ON_DEMAND_AUDIT_TASK"
| "SCHEDULED_AUDIT_TASK"
| cmnP.UnexpectedEnumValue;
// refs: 3 - tags: input, named, enum, output
export type AuditTaskStatus =
| "IN_PROGRESS"
| "COMPLETED"
| "FAILED"
| "CANCELED"
| cmnP.UnexpectedEnumValue;
// refs: 5 - tags: input, named, enum, output
export type JobExecutionStatus =
| "QUEUED"
| "IN_PROGRESS"
| "SUCCEEDED"
| "FAILED"
| "TIMED_OUT"
| "REJECTED"
| "REMOVED"
| "CANCELED"
| cmnP.UnexpectedEnumValue;
// refs: 3 - tags: input, named, enum, output
export type JobStatus =
| "IN_PROGRESS"
| "CANCELED"
| "COMPLETED"
| "DELETION_IN_PROGRESS"
| cmnP.UnexpectedEnumValue;
// refs: 2 - tags: input, named, enum, output
export type MitigationActionType =
| "UPDATE_DEVICE_CERTIFICATE"
| "UPDATE_CA_CERTIFICATE"
| "ADD_THINGS_TO_THING_GROUP"
| "REPLACE_DEFAULT_POLICY_VERSION"
| "ENABLE_IOT_LOGGING"
| "PUBLISH_FINDING_TO_SNS"
| cmnP.UnexpectedEnumValue;
// refs: 3 - tags: input, named, enum, output
export type OTAUpdateStatus =
| "CREATE_PENDING"
| "CREATE_IN_PROGRESS"
| "CREATE_COMPLETE"
| "CREATE_FAILED"
| cmnP.UnexpectedEnumValue;
// refs: 2 - tags: input, named, enum, output
export type ReportType =
| "ERRORS"
| "RESULTS"
| cmnP.UnexpectedEnumValue;
// refs: 2 - tags: input, named, enum, output
export type Status =
| "InProgress"
| "Completed"
| "Failed"
| "Cancelled"
| "Cancelling"
| cmnP.UnexpectedEnumValue;
// refs: 3 - tags: input, named, interface, output
/** The registration configuration. */
export interface RegistrationConfig {
/** The template body. */
templateBody?: string | null;
/** The ARN of the role. */
roleArn?: string | null;
}
function fromRegistrationConfig(input?: RegistrationConfig | null): jsonP.JSONValue {
if (!input) return input;
return {
templateBody: input["templateBody"],
roleArn: input["roleArn"],
}
}
function toRegistrationConfig(root: jsonP.JSONValue): RegistrationConfig {
return jsonP.readObj({
required: {},
optional: {
"templateBody": "s",
"roleArn": "s",
},
}, root);
}
// refs: 6 - tags: input, named, enum, output
export type CertificateStatus =
| "ACTIVE"
| "INACTIVE"
| "REVOKED"
| "PENDING_TRANSFER"
| "REGISTER_INACTIVE"
| "PENDING_ACTIVATION"
| cmnP.UnexpectedEnumValue;
// refs: 1 - tags: input, named, interface
/** Describes the logging options payload. */
export interface LoggingOptionsPayload {
/** The ARN of the IAM role that grants access. */
roleArn: string;
/** The log level. */
logLevel?: LogLevel | null;
}
function fromLoggingOptionsPayload(input?: LoggingOptionsPayload | null): jsonP.JSONValue {
if (!input) return input;
return {
roleArn: input["roleArn"],
logLevel: input["logLevel"],
}
}
// refs: 2 - tags: input, named, interface, output
/** A log target. */
export interface LogTarget {
/** The target type. */
targetType: LogTargetType;
/** The target name. */
targetName?: string | null;
}
function fromLogTarget(input?: LogTarget | null): jsonP.JSONValue {
if (!input) return input;
return {
targetType: input["targetType"],
targetName: input["targetName"],
}
}
function toLogTarget(root: jsonP.JSONValue): LogTarget {
return jsonP.readObj({
required: {
"targetType": (x: jsonP.JSONValue) => cmnP.readEnum<LogTargetType>(x),
},
optional: {
"targetName": "s",
},
}, root);
}
// refs: 2 - tags: input, named, interface, output
/** Used in MitigationActionParams, this information identifies the target findings to which the mitigation actions are applied. */
export interface AuditMitigationActionsTaskTarget {
/** If the task will apply a mitigation action to findings from a specific audit, this value uniquely identifies the audit. */
auditTaskId?: string | null;
/** If the task will apply a mitigation action to one or more listed findings, this value uniquely identifies those findings. */
findingIds?: string[] | null;
/** Specifies a filter in the form of an audit check and set of reason codes that identify the findings from the audit to which the audit mitigation actions task apply. */
auditCheckToReasonCodeFilter?: { [key: string]: string[] | null | undefined } | null;
}
function fromAuditMitigationActionsTaskTarget(input?: AuditMitigationActionsTaskTarget | null): jsonP.JSONValue {
if (!input) return input;
return {
auditTaskId: input["auditTaskId"],
findingIds: input["findingIds"],
auditCheckToReasonCodeFilter: input["auditCheckToReasonCodeFilter"],
}
}
function toAuditMitigationActionsTaskTarget(root: jsonP.JSONValue): AuditMitigationActionsTaskTarget {
return jsonP.readObj({
required: {},
optional: {
"auditTaskId": "s",
"findingIds": ["s"],
"auditCheckToReasonCodeFilter": x => jsonP.readMap(String, l => Array.isArray(l) ? l.map(String) : [], x),
},
}, root);
}
// refs: 3 - tags: input, named, interface, output
/** The target of a mitigation action task. */
export interface DetectMitigationActionsTaskTarget {
/** The unique identifiers of the violations. */
violationIds?: string[] | null;
/** The name of the security profile. */
securityProfileName?: string | null;
/** The name of the behavior. */
behaviorName?: string | null;
}
function fromDetectMitigationActionsTaskTarget(input?: DetectMitigationActionsTaskTarget | null): jsonP.JSONValue {
if (!input) return input;
return {
violationIds: input["violationIds"],
securityProfileName: input["securityProfileName"],
behaviorName: input["behaviorName"],
}
}
function toDetectMitigationActionsTaskTarget(root: jsonP.JSONValue): DetectMitigationActionsTaskTarget {
return jsonP.readObj({
required: {},
optional: {
"violationIds": ["s"],
"securityProfileName": "s",
"behaviorName": "s",
},
}, root);
}
// refs: 3 - tags: input, named, interface, output
/** Specifies the time period of which violation events occurred between. */
export interface ViolationEventOccurrenceRange {
/** The start date and time of a time period in which violation events occurred. */
startTime: Date | number;
/** The end date and time of a time period in which violation events occurred. */
endTime: Date | number;
}
function fromViolationEventOccurrenceRange(input?: ViolationEventOccurrenceRange | null): jsonP.JSONValue {
if (!input) return input;
return {
startTime: jsonP.serializeDate_unixTimestamp(input["startTime"]),
endTime: jsonP.serializeDate_unixTimestamp(input["endTime"]),
}
}
function toViolationEventOccurrenceRange(root: jsonP.JSONValue): ViolationEventOccurrenceRange {
return jsonP.readObj({
required: {
"startTime": "d",
"endTime": "d",
},
optional: {},
}, root);
}
// refs: 2 - tags: input, named, interface, output
/** A collection of authorization information. */
export interface AuthInfo {
/** The type of action for which the principal is being authorized. */
actionType?: ActionType | null;
/** The resources for which the principal is being authorized to perform the specified action. */
resources: string[];
}
function fromAuthInfo(input?: AuthInfo | null): jsonP.JSONValue {
if (!input) return input;
return {
actionType: input["actionType"],
resources: input["resources"],
}
}
function toAuthInfo(root: jsonP.JSONValue): AuthInfo {
return jsonP.readObj({
required: {
"resources": ["s"],
},
optional: {
"actionType": (x: jsonP.JSONValue) => cmnP.readEnum<ActionType>(x),
},
}, root);
}
// refs: 2 - tags: input, named, enum, output
export type ActionType =
| "PUBLISH"
| "SUBSCRIBE"
| "RECEIVE"
| "CONNECT"
| cmnP.UnexpectedEnumValue;
// refs: 1 - tags: input, named, interface
/** Specifies the HTTP context to use for the test authorizer request. */
export interface HttpContext {
/** The header keys and values in an HTTP authorization request. */
headers?: { [key: string]: string | null | undefined } | null;
/** The query string keys and values in an HTTP authorization request. */
queryString?: string | null;
}
function fromHttpContext(input?: HttpContext | null): jsonP.JSONValue {
if (!input) return input;
return {
headers: input["headers"],
queryString: input["queryString"],
}
}
// refs: 1 - tags: input, named, interface
/** Specifies the MQTT context to use for the test authorizer request */
export interface MqttContext {
/** The value of the `username` key in an MQTT authorization request. */
username?: string | null;
/** The value of the `password` key in an MQTT authorization request. */
password?: Uint8Array | string | null;
/** The value of the `clientId` key in an MQTT authorization request. */
clientId?: string | null;
}
function fromMqttContext(input?: MqttContext | null): jsonP.JSONValue {
if (!input) return input;
return {
username: input["username"],
password: serializeBlob(input["password"]),
clientId: input["clientId"],
}
}
// refs: 1 - tags: input, named, interface
/** Specifies the TLS context to use for the test authorizer request. */
export interface TlsContext {
/** The value of the `serverName` key in a TLS authorization request. */
serverName?: string | null;
}
function fromTlsContext(input?: TlsContext | null): jsonP.JSONValue {
if (!input) return input;
return {
serverName: input["serverName"],
}
}
// refs: 2 - tags: input, named, enum, output
export type AuditNotificationType =
| "SNS"
| cmnP.UnexpectedEnumValue;
// refs: 2 - tags: input, named, interface, output
/** Information about the targets to which audit notifications are sent. */
export interface AuditNotificationTarget {
/** The ARN of the target (SNS topic) to which audit notifications are sent. */
targetArn?: string | null;
/** The ARN of the role that grants permission to send notifications to the target. */
roleArn?: string | null;
/** True if notifications to the target are enabled. */
enabled?: boolean | null;
}
function fromAuditNotificationTarget(input?: AuditNotificationTarget | null): jsonP.JSONValue {
if (!input) return input;
return {
targetArn: input["targetArn"],
roleArn: input["roleArn"],
enabled: input["enabled"],
}
}
function toAuditNotificationTarget(root: jsonP.JSONValue): AuditNotificationTarget {
return jsonP.readObj({
required: {},
optional: {
"targetArn": "s",
"roleArn": "s",
"enabled": "b",
},
}, root);
}
// refs: 2 - tags: input, named, interface, output
/** Which audit checks are enabled and disabled for this account. */
export interface AuditCheckConfiguration {
/** True if this audit check is enabled for this account. */
enabled?: boolean | null;
}
function fromAuditCheckConfiguration(input?: AuditCheckConfiguration | null): jsonP.JSONValue {
if (!input) return input;
return {
enabled: input["enabled"],
}
}
function toAuditCheckConfiguration(root: jsonP.JSONValue): AuditCheckConfiguration {
return jsonP.readObj({
required: {},
optional: {
"enabled": "b",
},
}, root);
}
// refs: 3 - tags: input, named, enum, output
export type CACertificateStatus =
| "ACTIVE"
| "INACTIVE"
| cmnP.UnexpectedEnumValue;
// refs: 2 - tags: input, named, enum, output
export type AutoRegistrationStatus =
| "ENABLE"
| "DISABLE"
| cmnP.UnexpectedEnumValue;
// refs: 2 - tags: input, named, enum, output
export type DomainConfigurationStatus =
| "ENABLED"
| "DISABLED"
| cmnP.UnexpectedEnumValue;
// refs: 2 - tags: input, named, enum, output
export type EventType =
| "THING"
| "THING_GROUP"
| "THING_TYPE"
| "THING_GROUP_MEMBERSHIP"
| "THING_GROUP_HIERARCHY"
| "THING_TYPE_ASSOCIATION"
| "JOB"
| "JOB_EXECUTION"
| "POLICY"
| "CERTIFICATE"
| "CA_CERTIFICATE"
| cmnP.UnexpectedEnumValue;
// refs: 2 - tags: input, named, interface, output
/** Configuration. */
export interface Configuration {
/** True to enable the configuration. */
Enabled?: boolean | null;
}
function fromConfiguration(input?: Configuration | null): jsonP.JSONValue {
if (!input) return input;
return {
Enabled: input["Enabled"],
}
}
function toConfiguration(root: jsonP.JSONValue): Configuration {
return jsonP.readObj({
required: {},
optional: {
"Enabled": "b",
},
}, root);
}
// refs: 2 - tags: input, named, interface, output
/** The thing indexing configuration. */
export interface ThingIndexingConfiguration {
/** Thing indexing mode. */
thingIndexingMode: ThingIndexingMode;
/** Thing connectivity indexing mode. */
thingConnectivityIndexingMode?: ThingConnectivityIndexingMode | null;
/** Device Defender indexing mode. */
deviceDefenderIndexingMode?: DeviceDefenderIndexingMode | null;
/** Named shadow indexing mode. */
namedShadowIndexingMode?: NamedShadowIndexingMode | null;
/** Contains fields that are indexed and whose types are already known by the Fleet Indexing service. */
managedFields?: Field[] | null;
/** Contains custom field names and their data type. */
customFields?: Field[] | null;
}
function fromThingIndexingConfiguration(input?: ThingIndexingConfiguration | null): jsonP.JSONValue {
if (!input) return input;
return {
thingIndexingMode: input["thingIndexingMode"],
thingConnectivityIndexingMode: input["thingConnectivityIndexingMode"],
deviceDefenderIndexingMode: input["deviceDefenderIndexingMode"],
namedShadowIndexingMode: input["namedShadowIndexingMode"],
managedFields: input["managedFields"]?.map(x => fromField(x)),
customFields: input["customFields"]?.map(x => fromField(x)),
}
}
function toThingIndexingConfiguration(root: jsonP.JSONValue): ThingIndexingConfiguration {
return jsonP.readObj({
required: {
"thingIndexingMode": (x: jsonP.JSONValue) => cmnP.readEnum<ThingIndexingMode>(x),
},
optional: {
"thingConnectivityIndexingMode": (x: jsonP.JSONValue) => cmnP.readEnum<ThingConnectivityIndexingMode>(x),
"deviceDefenderIndexingMode": (x: jsonP.JSONValue) => cmnP.readEnum<DeviceDefenderIndexingMode>(x),
"namedShadowIndexingMode": (x: jsonP.JSONValue) => cmnP.readEnum<NamedShadowIndexingMode>(x),
"managedFields": [toField],
"customFields": [toField],
},
}, root);
}
// refs: 2 - tags: input, named, enum, output
export type ThingIndexingMode =
| "OFF"
| "REGISTRY"
| "REGISTRY_AND_SHADOW"
| cmnP.UnexpectedEnumValue;
// refs: 2 - tags: input, named, enum, output
export type ThingConnectivityIndexingMode =
| "OFF"
| "STATUS"
| cmnP.UnexpectedEnumValue;
// refs: 2 - tags: input, named, enum, output
export type DeviceDefenderIndexingMode =
| "OFF"
| "VIOLATIONS"
| cmnP.UnexpectedEnumValue;
// refs: 2 - tags: input, named, enum, output
export type NamedShadowIndexingMode =
| "OFF"
| "ON"
| cmnP.UnexpectedEnumValue;
// refs: 8 - tags: input, named, interface, output
/** Describes the name and data type at a field. */
export interface Field {
/** The name of the field. */
name?: string | null;
/** The data type of the field. */
type?: FieldType | null;
}
function fromField(input?: Field | null): jsonP.JSONValue {
if (!input) return input;
return {
name: input["name"],
type: input["type"],
}
}
function toField(root: jsonP.JSONValue): Field {
return jsonP.readObj({
required: {},
optional: {
"name": "s",
"type": (x: jsonP.JSONValue) => cmnP.readEnum<FieldType>(x),
},
}, root);
}
// refs: 8 - tags: input, named, enum, output
export type FieldType =
| "Number"
| "String"
| "Boolean"
| cmnP.UnexpectedEnumValue;
// refs: 2 - tags: input, named, interface, output
/** Thing group indexing configuration. */
export interface ThingGroupIndexingConfiguration {
/** Thing group indexing mode. */
thingGroupIndexingMode: ThingGroupIndexingMode;
/** Contains fields that are indexed and whose types are already known by the Fleet Indexing service. */
managedFields?: Field[] | null;
/** A list of thing group fields to index. */
customFields?: Field[] | null;
}
function fromThingGroupIndexingConfiguration(input?: ThingGroupIndexingConfiguration | null): jsonP.JSONValue {
if (!input) return input;
return {
thingGroupIndexingMode: input["thingGroupIndexingMode"],
managedFields: input["managedFields"]?.map(x => fromField(x)),
customFields: input["customFields"]?.map(x => fromField(x)),
}
}
function toThingGroupIndexingConfiguration(root: jsonP.JSONValue): ThingGroupIndexingConfiguration {
return jsonP.readObj({
required: {
"thingGroupIndexingMode": (x: jsonP.JSONValue) => cmnP.readEnum<ThingGroupIndexingMode>(x),
},
optional: {
"managedFields": [toField],
"customFields": [toField],
},
}, root);
}
// refs: 2 - tags: input, named, enum, output
export type ThingGroupIndexingMode =
| "OFF"
| "ON"
| cmnP.UnexpectedEnumValue;
// refs: 4 - tags: input, named, enum, output
export type TopicRuleDestinationStatus =
| "ENABLED"
| "IN_PROGRESS"
| "DISABLED"
| "ERROR"
| "DELETING"
| cmnP.UnexpectedEnumValue;
// refs: 2 - tags: output, named, interface
/** Describes a key pair. */
export interface KeyPair {
/** The public key. */
PublicKey?: string | null;
/** The private key. */
PrivateKey?: string | null;
}
function toKeyPair(root: jsonP.JSONValue): KeyPair {
return jsonP.readObj({
required: {},
optional: {
"PublicKey": "s",
"PrivateKey": "s",
},
}, root);
}
// refs: 2 - tags: output, named, interface
/** A topic rule destination. */
export interface TopicRuleDestination {
/** The topic rule destination URL. */
arn?: string | null;
/** The status of the topic rule destination. */
status?: TopicRuleDestinationStatus | null;
/** The date and time when the topic rule destination was created. */
createdAt?: Date | number | null;
/** The date and time when the topic rule destination was last updated. */
lastUpdatedAt?: Date | number | null;
/** Additional details or reason why the topic rule destination is in the current status. */
statusReason?: string | null;
/** Properties of the HTTP URL. */
httpUrlProperties?: HttpUrlDestinationProperties | null;
/** Properties of the virtual private cloud (VPC) connection. */
vpcProperties?: VpcDestinationProperties | null;
}
function toTopicRuleDestination(root: jsonP.JSONValue): TopicRuleDestination {
return jsonP.readObj({
required: {},
optional: {
"arn": "s",
"status": (x: jsonP.JSONValue) => cmnP.readEnum<TopicRuleDestinationStatus>(x),
"createdAt": "d",
"lastUpdatedAt": "d",
"statusReason": "s",
"httpUrlProperties": toHttpUrlDestinationProperties,
"vpcProperties": toVpcDestinationProperties,
},
}, root);
}
// refs: 2 - tags: output, named, interface
/** HTTP URL destination properties. */
export interface HttpUrlDestinationProperties {
/** The URL used to confirm the HTTP topic rule destination URL. */
confirmationUrl?: string | null;
}
function toHttpUrlDestinationProperties(root: jsonP.JSONValue): HttpUrlDestinationProperties {
return jsonP.readObj({
required: {},
optional: {
"confirmationUrl": "s",
},
}, root);
}
// refs: 2 - tags: output, named, interface
/** The properties of a virtual private cloud (VPC) destination. */
export interface VpcDestinationProperties {
/** The subnet IDs of the VPC destination. */
subnetIds?: string[] | null;
/** The security groups of the VPC destination. */
securityGroups?: string[] | null;
/** The ID of the VPC. */
vpcId?: string | null;
/** The ARN of a role that has permission to create and attach to elastic network interfaces (ENIs). */
roleArn?: string | null;
}
function toVpcDestinationProperties(root: jsonP.JSONValue): VpcDestinationProperties {
return jsonP.readObj({
required: {},
optional: {
"subnetIds": ["s"],
"securityGroups": ["s"],
"vpcId": "s",
"roleArn": "s",
},
}, root);
}
// refs: 2 - tags: output, named, interface
/** The findings (results) of the audit. */
export interface AuditFinding {
/** A unique identifier for this set of audit findings. */
findingId?: string | null;
/** The ID of the audit that generated this result (finding). */
taskId?: string | null;
/** The audit check that generated this result. */
checkName?: string | null;
/** The time the audit started. */
taskStartTime?: Date | number | null;
/** The time the result (finding) was discovered. */
findingTime?: Date | number | null;
/** The severity of the result (finding). */
severity?: AuditFindingSeverity | null;
/** The resource that was found to be noncompliant with the audit check. */
nonCompliantResource?: NonCompliantResource | null;
/** The list of related resources. */
relatedResources?: RelatedResource[] | null;
/** The reason the resource was noncompliant. */
reasonForNonCompliance?: string | null;
/** A code that indicates the reason that the resource was noncompliant. */
reasonForNonComplianceCode?: string | null;
/** Indicates whether the audit finding was suppressed or not during reporting. */
isSuppressed?: boolean | null;
}
function toAuditFinding(root: jsonP.JSONValue): AuditFinding {
return jsonP.readObj({
required: {},
optional: {
"findingId": "s",
"taskId": "s",
"checkName": "s",
"taskStartTime": "d",
"findingTime": "d",
"severity": (x: jsonP.JSONValue) => cmnP.readEnum<AuditFindingSeverity>(x),
"nonCompliantResource": toNonCompliantResource,
"relatedResources": [toRelatedResource],
"reasonForNonCompliance": "s",
"reasonForNonComplianceCode": "s",
"isSuppressed": "b",
},
}, root);
}
// refs: 2 - tags: output, named, enum
export type AuditFindingSeverity =
| "CRITICAL"
| "HIGH"
| "MEDIUM"
| "LOW"
| cmnP.UnexpectedEnumValue;
// refs: 2 - tags: output, named, interface
/** Information about the resource that was noncompliant with the audit check. */
export interface NonCompliantResource {
/** The type of the noncompliant resource. */
resourceType?: ResourceType | null;
/** Information that identifies the noncompliant resource. */
resourceIdentifier?: ResourceIdentifier | null;
/** Other information about the noncompliant resource. */
additionalInfo?: { [key: string]: string | null | undefined } | null;
}
function toNonCompliantResource(root: jsonP.JSONValue): NonCompliantResource {
return jsonP.readObj({
required: {},
optional: {
"resourceType": (x: jsonP.JSONValue) => cmnP.readEnum<ResourceType>(x),
"resourceIdentifier": toResourceIdentifier,
"additionalInfo": x => jsonP.readMap(String, String, x),
},
}, root);
}
// refs: 4 - tags: output, named, enum
export type ResourceType =
| "DEVICE_CERTIFICATE"
| "CA_CERTIFICATE"
| "IOT_POLICY"
| "COGNITO_IDENTITY_POOL"
| "CLIENT_ID"
| "ACCOUNT_SETTINGS"
| "ROLE_ALIAS"
| "IAM_ROLE"
| cmnP.UnexpectedEnumValue;
// refs: 2 - tags: output, named, interface
/** Information about a related resource. */
export interface RelatedResource {
/** The type of resource. */
resourceType?: ResourceType | null;
/** Information that identifies the resource. */
resourceIdentifier?: ResourceIdentifier | null;
/** Other information about the resource. */
additionalInfo?: { [key: string]: string | null | undefined } | null;
}
function toRelatedResource(root: jsonP.JSONValue): RelatedResource {
return jsonP.readObj({
required: {},
optional: {
"resourceType": (x: jsonP.JSONValue) => cmnP.readEnum<ResourceType>(x),
"resourceIdentifier": toResourceIdentifier,
"additionalInfo": x => jsonP.readMap(String, String, x),
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** Provides summary counts of how many tasks for findings are in a particular state. */
export interface TaskStatisticsForAuditCheck {
/** The total number of findings to which a task is being applied. */
totalFindingsCount?: number | null;
/** The number of findings for which at least one of the actions failed when applied. */
failedFindingsCount?: number | null;
/** The number of findings for which all mitigation actions succeeded when applied. */
succeededFindingsCount?: number | null;
/** The number of findings skipped because of filter conditions provided in the parameters to the command. */
skippedFindingsCount?: number | null;
/** The number of findings to which the mitigation action task was canceled when applied. */
canceledFindingsCount?: number | null;
}
function toTaskStatisticsForAuditCheck(root: jsonP.JSONValue): TaskStatisticsForAuditCheck {
return jsonP.readObj({
required: {},
optional: {
"totalFindingsCount": "n",
"failedFindingsCount": "n",
"succeededFindingsCount": "n",
"skippedFindingsCount": "n",
"canceledFindingsCount": "n",
},
}, root);
}
// refs: 3 - tags: output, named, interface
/** Describes which changes should be applied as part of a mitigation action. */
export interface MitigationAction {
/** A user-friendly name for the mitigation action. */
name?: string | null;
/** A unique identifier for the mitigation action. */
id?: string | null;
/** The IAM role ARN used to apply this mitigation action. */
roleArn?: string | null;
/** The set of parameters for this mitigation action. */
actionParams?: MitigationActionParams | null;
}
function toMitigationAction(root: jsonP.JSONValue): MitigationAction {
return jsonP.readObj({
required: {},
optional: {
"name": "s",
"id": "s",
"roleArn": "s",
"actionParams": toMitigationActionParams,
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** Statistics for the checks performed during the audit. */
export interface TaskStatistics {
/** The number of checks in this audit. */
totalChecks?: number | null;
/** The number of checks in progress. */
inProgressChecks?: number | null;
/** The number of checks waiting for data collection. */
waitingForDataCollectionChecks?: number | null;
/** The number of checks that found compliant resources. */
compliantChecks?: number | null;
/** The number of checks that found noncompliant resources. */
nonCompliantChecks?: number | null;
/** The number of checks. */
failedChecks?: number | null;
/** The number of checks that did not run because the audit was canceled. */
canceledChecks?: number | null;
}
function toTaskStatistics(root: jsonP.JSONValue): TaskStatistics {
return jsonP.readObj({
required: {},
optional: {
"totalChecks": "n",
"inProgressChecks": "n",
"waitingForDataCollectionChecks": "n",
"compliantChecks": "n",
"nonCompliantChecks": "n",
"failedChecks": "n",
"canceledChecks": "n",
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** Information about the audit check. */
export interface AuditCheckDetails {
/** The completion status of this check. */
checkRunStatus?: AuditCheckRunStatus | null;
/** True if the check is complete and found all resources compliant. */
checkCompliant?: boolean | null;
/** The number of resources on which the check was performed. */
totalResourcesCount?: number | null;
/** The number of resources that were found noncompliant during the check. */
nonCompliantResourcesCount?: number | null;
/** Describes how many of the non-compliant resources created during the evaluation of an audit check were marked as suppressed. */
suppressedNonCompliantResourcesCount?: number | null;
/** The code of any error encountered when this check is performed during this audit. */
errorCode?: string | null;
/** The message associated with any error encountered when this check is performed during this audit. */
message?: string | null;
}
function toAuditCheckDetails(root: jsonP.JSONValue): AuditCheckDetails {
return jsonP.readObj({
required: {},
optional: {
"checkRunStatus": (x: jsonP.JSONValue) => cmnP.readEnum<AuditCheckRunStatus>(x),
"checkCompliant": "b",
"totalResourcesCount": "n",
"nonCompliantResourcesCount": "n",
"suppressedNonCompliantResourcesCount": "n",
"errorCode": "s",
"message": "s",
},
}, root);
}
// refs: 1 - tags: output, named, enum
export type AuditCheckRunStatus =
| "IN_PROGRESS"
| "WAITING_FOR_DATA_COLLECTION"
| "CANCELED"
| "COMPLETED_COMPLIANT"
| "COMPLETED_NON_COMPLIANT"
| "FAILED"
| cmnP.UnexpectedEnumValue;
// refs: 2 - tags: output, named, interface
/** The authorizer description. */
export interface AuthorizerDescription {
/** The authorizer name. */
authorizerName?: string | null;
/** The authorizer ARN. */
authorizerArn?: string | null;
/** The authorizer's Lambda function ARN. */
authorizerFunctionArn?: string | null;
/** The key used to extract the token from the HTTP headers. */
tokenKeyName?: string | null;
/** The public keys used to validate the token signature returned by your custom authentication service. */
tokenSigningPublicKeys?: { [key: string]: string | null | undefined } | null;
/** The status of the authorizer. */
status?: AuthorizerStatus | null;
/** The UNIX timestamp of when the authorizer was created. */
creationDate?: Date | number | null;
/** The UNIX timestamp of when the authorizer was last updated. */
lastModifiedDate?: Date | number | null;
/** Specifies whether IoT validates the token signature in an authorization request. */
signingDisabled?: boolean | null;
/** When `true`, the result from the authorizer’s Lambda function is cached for the time specified in `refreshAfterInSeconds`. */
enableCachingForHttp?: boolean | null;
}
function toAuthorizerDescription(root: jsonP.JSONValue): AuthorizerDescription {
return jsonP.readObj({
required: {},
optional: {
"authorizerName": "s",
"authorizerArn": "s",
"authorizerFunctionArn": "s",
"tokenKeyName": "s",
"tokenSigningPublicKeys": x => jsonP.readMap(String, String, x),
"status": (x: jsonP.JSONValue) => cmnP.readEnum<AuthorizerStatus>(x),
"creationDate": "d",
"lastModifiedDate": "d",
"signingDisabled": "b",
"enableCachingForHttp": "b",
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** Additional information about the billing group. */
export interface BillingGroupMetadata {
/** The date the billing group was created. */
creationDate?: Date | number | null;
}
function toBillingGroupMetadata(root: jsonP.JSONValue): BillingGroupMetadata {
return jsonP.readObj({
required: {},
optional: {
"creationDate": "d",
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** Describes a CA certificate. */
export interface CACertificateDescription {
/** The CA certificate ARN. */
certificateArn?: string | null;
/** The CA certificate ID. */
certificateId?: string | null;
/** The status of a CA certificate. */
status?: CACertificateStatus | null;
/** The CA certificate data, in PEM format. */
certificatePem?: string | null;
/** The owner of the CA certificate. */
ownedBy?: string | null;
/** The date the CA certificate was created. */
creationDate?: Date | number | null;
/** Whether the CA certificate configured for auto registration of device certificates. */
autoRegistrationStatus?: AutoRegistrationStatus | null;
/** The date the CA certificate was last modified. */
lastModifiedDate?: Date | number | null;
/** The customer version of the CA certificate. */
customerVersion?: number | null;
/** The generation ID of the CA certificate. */
generationId?: string | null;
/** When the CA certificate is valid. */
validity?: CertificateValidity | null;
}
function toCACertificateDescription(root: jsonP.JSONValue): CACertificateDescription {
return jsonP.readObj({
required: {},
optional: {
"certificateArn": "s",
"certificateId": "s",
"status": (x: jsonP.JSONValue) => cmnP.readEnum<CACertificateStatus>(x),
"certificatePem": "s",
"ownedBy": "s",
"creationDate": "d",
"autoRegistrationStatus": (x: jsonP.JSONValue) => cmnP.readEnum<AutoRegistrationStatus>(x),
"lastModifiedDate": "d",
"customerVersion": "n",
"generationId": "s",
"validity": toCertificateValidity,
},
}, root);
}
// refs: 2 - tags: output, named, interface
/** When the certificate is valid. */
export interface CertificateValidity {
/** The certificate is not valid before this date. */
notBefore?: Date | number | null;
/** The certificate is not valid after this date. */
notAfter?: Date | number | null;
}
function toCertificateValidity(root: jsonP.JSONValue): CertificateValidity {
return jsonP.readObj({
required: {},
optional: {
"notBefore": "d",
"notAfter": "d",
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** Describes a certificate. */
export interface CertificateDescription {
/** The ARN of the certificate. */
certificateArn?: string | null;
/** The ID of the certificate. */
certificateId?: string | null;
/** The certificate ID of the CA certificate used to sign this certificate. */
caCertificateId?: string | null;
/** The status of the certificate. */
status?: CertificateStatus | null;
/** The certificate data, in PEM format. */
certificatePem?: string | null;
/** The ID of the Amazon Web Services account that owns the certificate. */
ownedBy?: string | null;
/** The ID of the Amazon Web Services account of the previous owner of the certificate. */
previousOwnedBy?: string | null;
/** The date and time the certificate was created. */
creationDate?: Date | number | null;
/** The date and time the certificate was last modified. */
lastModifiedDate?: Date | number | null;
/** The customer version of the certificate. */
customerVersion?: number | null;
/** The transfer data. */
transferData?: TransferData | null;
/** The generation ID of the certificate. */
generationId?: string | null;
/** When the certificate is valid. */
validity?: CertificateValidity | null;
/** The mode of the certificate. */
certificateMode?: CertificateMode | null;
}
function toCertificateDescription(root: jsonP.JSONValue): CertificateDescription {
return jsonP.readObj({
required: {},
optional: {
"certificateArn": "s",
"certificateId": "s",
"caCertificateId": "s",
"status": (x: jsonP.JSONValue) => cmnP.readEnum<CertificateStatus>(x),
"certificatePem": "s",
"ownedBy": "s",
"previousOwnedBy": "s",
"creationDate": "d",
"lastModifiedDate": "d",
"customerVersion": "n",
"transferData": toTransferData,
"generationId": "s",
"validity": toCertificateValidity,
"certificateMode": (x: jsonP.JSONValue) => cmnP.readEnum<CertificateMode>(x),
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** Data used to transfer a certificate to an Amazon Web Services account. */
export interface TransferData {
/** The transfer message. */
transferMessage?: string | null;
/** The reason why the transfer was rejected. */
rejectReason?: string | null;
/** The date the transfer took place. */
transferDate?: Date | number | null;
/** The date the transfer was accepted. */
acceptDate?: Date | number | null;
/** The date the transfer was rejected. */
rejectDate?: Date | number | null;
}
function toTransferData(root: jsonP.JSONValue): TransferData {
return jsonP.readObj({
required: {},
optional: {
"transferMessage": "s",
"rejectReason": "s",
"transferDate": "d",
"acceptDate": "d",
"rejectDate": "d",
},
}, root);
}
// refs: 3 - tags: output, named, enum
export type CertificateMode =
| "DEFAULT"
| "SNI_ONLY"
| cmnP.UnexpectedEnumValue;
// refs: 2 - tags: output, named, interface
/** The summary of the mitigation action tasks. */
export interface DetectMitigationActionsTaskSummary {
/** The unique identifier of the task. */
taskId?: string | null;
/** The status of the task. */
taskStatus?: DetectMitigationActionsTaskStatus | null;
/** The date the task started. */
taskStartTime?: Date | number | null;
/** The date the task ended. */
taskEndTime?: Date | number | null;
/** Specifies the ML Detect findings to which the mitigation actions are applied. */
target?: DetectMitigationActionsTaskTarget | null;
/** Specifies the time period of which violation events occurred between. */
violationEventOccurrenceRange?: ViolationEventOccurrenceRange | null;
/** Includes only active violations. */
onlyActiveViolationsIncluded?: boolean | null;
/** Includes suppressed alerts. */
suppressedAlertsIncluded?: boolean | null;
/** The definition of the actions. */
actionsDefinition?: MitigationAction[] | null;
/** The statistics of a mitigation action task. */
taskStatistics?: DetectMitigationActionsTaskStatistics | null;
}
function toDetectMitigationActionsTaskSummary(root: jsonP.JSONValue): DetectMitigationActionsTaskSummary {
return jsonP.readObj({
required: {},
optional: {
"taskId": "s",
"taskStatus": (x: jsonP.JSONValue) => cmnP.readEnum<DetectMitigationActionsTaskStatus>(x),
"taskStartTime": "d",
"taskEndTime": "d",
"target": toDetectMitigationActionsTaskTarget,
"violationEventOccurrenceRange": toViolationEventOccurrenceRange,
"onlyActiveViolationsIncluded": "b",
"suppressedAlertsIncluded": "b",
"actionsDefinition": [toMitigationAction],
"taskStatistics": toDetectMitigationActionsTaskStatistics,
},
}, root);
}
// refs: 2 - tags: output, named, enum
export type DetectMitigationActionsTaskStatus =
| "IN_PROGRESS"
| "SUCCESSFUL"
| "FAILED"
| "CANCELED"
| cmnP.UnexpectedEnumValue;
// refs: 2 - tags: output, named, interface
/** The statistics of a mitigation action task. */
export interface DetectMitigationActionsTaskStatistics {
/** The actions that were performed. */
actionsExecuted?: number | null;
/** The actions that were skipped. */
actionsSkipped?: number | null;
/** The actions that failed. */
actionsFailed?: number | null;
}
function toDetectMitigationActionsTaskStatistics(root: jsonP.JSONValue): DetectMitigationActionsTaskStatistics {
return jsonP.readObj({
required: {},
optional: {
"actionsExecuted": "n",
"actionsSkipped": "n",
"actionsFailed": "n",
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** An object that contains information about a server certificate. */
export interface ServerCertificateSummary {
/** The ARN of the server certificate. */
serverCertificateArn?: string | null;
/** The status of the server certificate. */
serverCertificateStatus?: ServerCertificateStatus | null;
/** Details that explain the status of the server certificate. */
serverCertificateStatusDetail?: string | null;
}
function toServerCertificateSummary(root: jsonP.JSONValue): ServerCertificateSummary {
return jsonP.readObj({
required: {},
optional: {
"serverCertificateArn": "s",
"serverCertificateStatus": (x: jsonP.JSONValue) => cmnP.readEnum<ServerCertificateStatus>(x),
"serverCertificateStatusDetail": "s",
},
}, root);
}
// refs: 1 - tags: output, named, enum
export type ServerCertificateStatus =
| "INVALID"
| "VALID"
| cmnP.UnexpectedEnumValue;
// refs: 1 - tags: output, named, enum
export type DomainType =
| "ENDPOINT"
| "AWS_MANAGED"
| "CUSTOMER_MANAGED"
| cmnP.UnexpectedEnumValue;
// refs: 1 - tags: output, named, enum
export type IndexStatus =
| "ACTIVE"
| "BUILDING"
| "REBUILDING"
| cmnP.UnexpectedEnumValue;
// refs: 1 - tags: output, named, interface
/** The `Job` object contains details about a job. */
export interface Job {
/** An ARN identifying the job with format "arn:aws:iot:region:account:job/jobId". */
jobArn?: string | null;
/** The unique identifier you assigned to this job when it was created. */
jobId?: string | null;
/** Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things specified as targets have completed the job (SNAPSHOT). */
targetSelection?: TargetSelection | null;
/** The status of the job, one of `IN_PROGRESS`, `CANCELED`, `DELETION_IN_PROGRESS` or `COMPLETED`. */
status?: JobStatus | null;
/** Will be `true` if the job was canceled with the optional `force` parameter set to `true`. */
forceCanceled?: boolean | null;
/** If the job was updated, provides the reason code for the update. */
reasonCode?: string | null;
/** If the job was updated, describes the reason for the update. */
comment?: string | null;
/** A list of IoT things and thing groups to which the job should be sent. */
targets?: string[] | null;
/** A short text description of the job. */
description?: string | null;
/** Configuration for pre-signed S3 URLs. */
presignedUrlConfig?: PresignedUrlConfig | null;
/** Allows you to create a staged rollout of a job. */
jobExecutionsRolloutConfig?: JobExecutionsRolloutConfig | null;
/** Configuration for criteria to abort the job. */
abortConfig?: AbortConfig | null;
/** The time, in seconds since the epoch, when the job was created. */
createdAt?: Date | number | null;
/** The time, in seconds since the epoch, when the job was last updated. */
lastUpdatedAt?: Date | number | null;
/** The time, in seconds since the epoch, when the job was completed. */
completedAt?: Date | number | null;
/** Details about the job process. */
jobProcessDetails?: JobProcessDetails | null;
/** Specifies the amount of time each device has to finish its execution of the job. */
timeoutConfig?: TimeoutConfig | null;
/** The namespace used to indicate that a job is a customer-managed job. */
namespaceId?: string | null;
/** The ARN of the job template used to create the job. */
jobTemplateArn?: string | null;
/** The configuration for the criteria to retry the job. */
jobExecutionsRetryConfig?: JobExecutionsRetryConfig | null;
/** A key-value map that pairs the patterns that need to be replaced in a managed template job document schema. */
documentParameters?: { [key: string]: string | null | undefined } | null;
}
function toJob(root: jsonP.JSONValue): Job {
return jsonP.readObj({
required: {},
optional: {
"jobArn": "s",
"jobId": "s",
"targetSelection": (x: jsonP.JSONValue) => cmnP.readEnum<TargetSelection>(x),
"status": (x: jsonP.JSONValue) => cmnP.readEnum<JobStatus>(x),
"forceCanceled": "b",
"reasonCode": "s",
"comment": "s",
"targets": ["s"],
"description": "s",
"presignedUrlConfig": toPresignedUrlConfig,
"jobExecutionsRolloutConfig": toJobExecutionsRolloutConfig,
"abortConfig": toAbortConfig,
"createdAt": "d",
"lastUpdatedAt": "d",
"completedAt": "d",
"jobProcessDetails": toJobProcessDetails,
"timeoutConfig": toTimeoutConfig,
"namespaceId": "s",
"jobTemplateArn": "s",
"jobExecutionsRetryConfig": toJobExecutionsRetryConfig,
"documentParameters": x => jsonP.readMap(String, String, x),
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** The job process details. */
export interface JobProcessDetails {
/** The target devices to which the job execution is being rolled out. */
processingTargets?: string[] | null;
/** The number of things that cancelled the job. */
numberOfCanceledThings?: number | null;
/** The number of things which successfully completed the job. */
numberOfSucceededThings?: number | null;
/** The number of things that failed executing the job. */
numberOfFailedThings?: number | null;
/** The number of things that rejected the job. */
numberOfRejectedThings?: number | null;
/** The number of things that are awaiting execution of the job. */
numberOfQueuedThings?: number | null;
/** The number of things currently executing the job. */
numberOfInProgressThings?: number | null;
/** The number of things that are no longer scheduled to execute the job because they have been deleted or have been removed from the group that was a target of the job. */
numberOfRemovedThings?: number | null;
/** The number of things whose job execution status is `TIMED_OUT`. */
numberOfTimedOutThings?: number | null;
}
function toJobProcessDetails(root: jsonP.JSONValue): JobProcessDetails {
return jsonP.readObj({
required: {},
optional: {
"processingTargets": ["s"],
"numberOfCanceledThings": "n",
"numberOfSucceededThings": "n",
"numberOfFailedThings": "n",
"numberOfRejectedThings": "n",
"numberOfQueuedThings": "n",
"numberOfInProgressThings": "n",
"numberOfRemovedThings": "n",
"numberOfTimedOutThings": "n",
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** The job execution object represents the execution of a job on a particular device. */
export interface JobExecution {
/** The unique identifier you assigned to the job when it was created. */
jobId?: string | null;
/** The status of the job execution (IN_PROGRESS, QUEUED, FAILED, SUCCEEDED, TIMED_OUT, CANCELED, or REJECTED). */
status?: JobExecutionStatus | null;
/** Will be `true` if the job execution was canceled with the optional `force` parameter set to `true`. */
forceCanceled?: boolean | null;
/** A collection of name/value pairs that describe the status of the job execution. */
statusDetails?: JobExecutionStatusDetails | null;
/** The ARN of the thing on which the job execution is running. */
thingArn?: string | null;
/** The time, in seconds since the epoch, when the job execution was queued. */
queuedAt?: Date | number | null;
/** The time, in seconds since the epoch, when the job execution started. */
startedAt?: Date | number | null;
/** The time, in seconds since the epoch, when the job execution was last updated. */
lastUpdatedAt?: Date | number | null;
/** A string (consisting of the digits "0" through "9") which identifies this particular job execution on this particular device. */
executionNumber?: number | null;
/** The version of the job execution. */
versionNumber?: number | null;
/** The estimated number of seconds that remain before the job execution status will be changed to `TIMED_OUT`. */
approximateSecondsBeforeTimedOut?: number | null;
}
function toJobExecution(root: jsonP.JSONValue): JobExecution {
return jsonP.readObj({
required: {},
optional: {
"jobId": "s",
"status": (x: jsonP.JSONValue) => cmnP.readEnum<JobExecutionStatus>(x),
"forceCanceled": "b",
"statusDetails": toJobExecutionStatusDetails,
"thingArn": "s",
"queuedAt": "d",
"startedAt": "d",
"lastUpdatedAt": "d",
"executionNumber": "n",
"versionNumber": "n",
"approximateSecondsBeforeTimedOut": "n",
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** Details of the job execution status. */
export interface JobExecutionStatusDetails {
/** The job execution status. */
detailsMap?: { [key: string]: string | null | undefined } | null;
}
function toJobExecutionStatusDetails(root: jsonP.JSONValue): JobExecutionStatusDetails {
return jsonP.readObj({
required: {},
optional: {
"detailsMap": x => jsonP.readMap(String, String, x),
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** A map of key-value pairs containing the patterns that need to be replaced in a managed template job document schema. */
export interface DocumentParameter {
/** Key of the map field containing the patterns that need to be replaced in a managed template job document schema. */
key?: string | null;
/** Description of the map field containing the patterns that need to be replaced in a managed template job document schema. */
description?: string | null;
/** A regular expression of the patterns that need to be replaced in a managed template job document schema. */
regex?: string | null;
/** An example illustrating a pattern that need to be replaced in a managed template job document schema. */
example?: string | null;
/** Specifies whether a pattern that needs to be replaced in a managed template job document schema is optional or required. */
optional?: boolean | null;
}
function toDocumentParameter(root: jsonP.JSONValue): DocumentParameter {
return jsonP.readObj({
required: {},
optional: {
"key": "s",
"description": "s",
"regex": "s",
"example": "s",
"optional": "b",
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** Role alias description. */
export interface RoleAliasDescription {
/** The role alias. */
roleAlias?: string | null;
/** The ARN of the role alias. */
roleAliasArn?: string | null;
/** The role ARN. */
roleArn?: string | null;
/** The role alias owner. */
owner?: string | null;
/** The number of seconds for which the credential is valid. */
credentialDurationSeconds?: number | null;
/** The UNIX timestamp of when the role alias was created. */
creationDate?: Date | number | null;
/** The UNIX timestamp of when the role alias was last modified. */
lastModifiedDate?: Date | number | null;
}
function toRoleAliasDescription(root: jsonP.JSONValue): RoleAliasDescription {
return jsonP.readObj({
required: {},
optional: {
"roleAlias": "s",
"roleAliasArn": "s",
"roleArn": "s",
"owner": "s",
"credentialDurationSeconds": "n",
"creationDate": "d",
"lastModifiedDate": "d",
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** Information about a stream. */
export interface StreamInfo {
/** The stream ID. */
streamId?: string | null;
/** The stream ARN. */
streamArn?: string | null;
/** The stream version. */
streamVersion?: number | null;
/** The description of the stream. */
description?: string | null;
/** The files to stream. */
files?: StreamFile[] | null;
/** The date when the stream was created. */
createdAt?: Date | number | null;
/** The date when the stream was last updated. */
lastUpdatedAt?: Date | number | null;
/** An IAM role IoT assumes to access your S3 files. */
roleArn?: string | null;
}
function toStreamInfo(root: jsonP.JSONValue): StreamInfo {
return jsonP.readObj({
required: {},
optional: {
"streamId": "s",
"streamArn": "s",
"streamVersion": "n",
"description": "s",
"files": [toStreamFile],
"createdAt": "d",
"lastUpdatedAt": "d",
"roleArn": "s",
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** Thing group metadata. */
export interface ThingGroupMetadata {
/** The parent thing group name. */
parentGroupName?: string | null;
/** The root parent thing group. */
rootToParentThingGroups?: GroupNameAndArn[] | null;
/** The UNIX timestamp of when the thing group was created. */
creationDate?: Date | number | null;
}
function toThingGroupMetadata(root: jsonP.JSONValue): ThingGroupMetadata {
return jsonP.readObj({
required: {},
optional: {
"parentGroupName": "s",
"rootToParentThingGroups": [toGroupNameAndArn],
"creationDate": "d",
},
}, root);
}
// refs: 4 - tags: output, named, interface
/** The name and ARN of a group. */
export interface GroupNameAndArn {
/** The group name. */
groupName?: string | null;
/** The group ARN. */
groupArn?: string | null;
}
function toGroupNameAndArn(root: jsonP.JSONValue): GroupNameAndArn {
return jsonP.readObj({
required: {},
optional: {
"groupName": "s",
"groupArn": "s",
},
}, root);
}
// refs: 1 - tags: output, named, enum
export type DynamicGroupStatus =
| "ACTIVE"
| "BUILDING"
| "REBUILDING"
| cmnP.UnexpectedEnumValue;
// refs: 2 - tags: output, named, interface
/** The ThingTypeMetadata contains additional information about the thing type including: creation date and time, a value indicating whether the thing type is deprecated, and a date and time when time was deprecated. */
export interface ThingTypeMetadata {
/** Whether the thing type is deprecated. */
deprecated?: boolean | null;
/** The date and time when the thing type was deprecated. */
deprecationDate?: Date | number | null;
/** The date and time when the thing type was created. */
creationDate?: Date | number | null;
}
function toThingTypeMetadata(root: jsonP.JSONValue): ThingTypeMetadata {
return jsonP.readObj({
required: {},
optional: {
"deprecated": "b",
"deprecationDate": "d",
"creationDate": "d",
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** The summary of an ML Detect behavior model. */
export interface BehaviorModelTrainingSummary {
/** The name of the security profile. */
securityProfileName?: string | null;
/** The name of the behavior. */
behaviorName?: string | null;
/** The date a training model started collecting data. */
trainingDataCollectionStartDate?: Date | number | null;
/** The status of the behavior model. */
modelStatus?: ModelStatus | null;
/** The percentage of datapoints collected. */
datapointsCollectionPercentage?: number | null;
/** The date the model was last refreshed. */
lastModelRefreshDate?: Date | number | null;
}
function toBehaviorModelTrainingSummary(root: jsonP.JSONValue): BehaviorModelTrainingSummary {
return jsonP.readObj({
required: {},
optional: {
"securityProfileName": "s",
"behaviorName": "s",
"trainingDataCollectionStartDate": "d",
"modelStatus": (x: jsonP.JSONValue) => cmnP.readEnum<ModelStatus>(x),
"datapointsCollectionPercentage": "n",
"lastModelRefreshDate": "d",
},
}, root);
}
// refs: 1 - tags: output, named, enum
export type ModelStatus =
| "PENDING_BUILD"
| "ACTIVE"
| "EXPIRED"
| cmnP.UnexpectedEnumValue;
// refs: 1 - tags: output, named, interface
/** A count of documents that meets a specific aggregation criteria. */
export interface Bucket {
/** The value counted for the particular bucket. */
keyValue?: string | null;
/** The number of documents that have the value counted for the particular bucket. */
count?: number | null;
}
function toBucket(root: jsonP.JSONValue): Bucket {
return jsonP.readObj({
required: {},
optional: {
"keyValue": "s",
"count": "n",
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** The policy that has the effect on the authorization results. */
export interface EffectivePolicy {
/** The policy name. */
policyName?: string | null;
/** The policy ARN. */
policyArn?: string | null;
/** The IAM policy document. */
policyDocument?: string | null;
}
function toEffectivePolicy(root: jsonP.JSONValue): EffectivePolicy {
return jsonP.readObj({
required: {},
optional: {
"policyName": "s",
"policyArn": "s",
"policyDocument": "s",
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** Information about an OTA update. */
export interface OTAUpdateInfo {
/** The OTA update ID. */
otaUpdateId?: string | null;
/** The OTA update ARN. */
otaUpdateArn?: string | null;
/** The date when the OTA update was created. */
creationDate?: Date | number | null;
/** The date when the OTA update was last updated. */
lastModifiedDate?: Date | number | null;
/** A description of the OTA update. */
description?: string | null;
/** The targets of the OTA update. */
targets?: string[] | null;
/** The protocol used to transfer the OTA update image. */
protocols?: Protocol[] | null;
/** Configuration for the rollout of OTA updates. */
awsJobExecutionsRolloutConfig?: AwsJobExecutionsRolloutConfig | null;
/** Configuration information for pre-signed URLs. */
awsJobPresignedUrlConfig?: AwsJobPresignedUrlConfig | null;
/** Specifies whether the OTA update will continue to run (CONTINUOUS), or will be complete after all those things specified as targets have completed the OTA update (SNAPSHOT). */
targetSelection?: TargetSelection | null;
/** A list of files associated with the OTA update. */
otaUpdateFiles?: OTAUpdateFile[] | null;
/** The status of the OTA update. */
otaUpdateStatus?: OTAUpdateStatus | null;
/** The IoT job ID associated with the OTA update. */
awsIotJobId?: string | null;
/** The IoT job ARN associated with the OTA update. */
awsIotJobArn?: string | null;
/** Error information associated with the OTA update. */
errorInfo?: ErrorInfo | null;
/** A collection of name/value pairs */
additionalParameters?: { [key: string]: string | null | undefined } | null;
}
function toOTAUpdateInfo(root: jsonP.JSONValue): OTAUpdateInfo {
return jsonP.readObj({
required: {},
optional: {
"otaUpdateId": "s",
"otaUpdateArn": "s",
"creationDate": "d",
"lastModifiedDate": "d",
"description": "s",
"targets": ["s"],
"protocols": [(x: jsonP.JSONValue) => cmnP.readEnum<Protocol>(x)],
"awsJobExecutionsRolloutConfig": toAwsJobExecutionsRolloutConfig,
"awsJobPresignedUrlConfig": toAwsJobPresignedUrlConfig,
"targetSelection": (x: jsonP.JSONValue) => cmnP.readEnum<TargetSelection>(x),
"otaUpdateFiles": [toOTAUpdateFile],
"otaUpdateStatus": (x: jsonP.JSONValue) => cmnP.readEnum<OTAUpdateStatus>(x),
"awsIotJobId": "s",
"awsIotJobArn": "s",
"errorInfo": toErrorInfo,
"additionalParameters": x => jsonP.readMap(String, String, x),
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** Error information. */
export interface ErrorInfo {
/** The error code. */
code?: string | null;
/** The error message. */
message?: string | null;
}
function toErrorInfo(root: jsonP.JSONValue): ErrorInfo {
return jsonP.readObj({
required: {},
optional: {
"code": "s",
"message": "s",
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** Describes the percentile and percentile value. */
export interface PercentPair {
/** The percentile. */
percent?: number | null;
/** The value of the percentile. */
value?: number | null;
}
function toPercentPair(root: jsonP.JSONValue): PercentPair {
return jsonP.readObj({
required: {},
optional: {
"percent": "n",
"value": "n",
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** A map of key-value pairs for all supported statistics. */
export interface Statistics {
/** The count of things that match the query string criteria and contain a valid aggregation field value. */
count?: number | null;
/** The average of the aggregated field values. */
average?: number | null;
/** The sum of the aggregated field values. */
sum?: number | null;
/** The minimum aggregated field value. */
minimum?: number | null;
/** The maximum aggregated field value. */
maximum?: number | null;
/** The sum of the squares of the aggregated field values. */
sumOfSquares?: number | null;
/** The variance of the aggregated field values. */
variance?: number | null;
/** The standard deviation of the aggregated field values. */
stdDeviation?: number | null;
}
function toStatistics(root: jsonP.JSONValue): Statistics {
return jsonP.readObj({
required: {},
optional: {
"count": "n",
"average": "n",
"sum": "n",
"minimum": "n",
"maximum": "n",
"sumOfSquares": "n",
"variance": "n",
"stdDeviation": "n",
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** Describes a rule. */
export interface TopicRule {
/** The name of the rule. */
ruleName?: string | null;
/** The SQL statement used to query the topic. */
sql?: string | null;
/** The description of the rule. */
description?: string | null;
/** The date and time the rule was created. */
createdAt?: Date | number | null;
/** The actions associated with the rule. */
actions?: Action[] | null;
/** Specifies whether the rule is disabled. */
ruleDisabled?: boolean | null;
/** The version of the SQL rules engine to use when evaluating the rule. */
awsIotSqlVersion?: string | null;
/** The action to perform when an error occurs. */
errorAction?: Action | null;
}
function toTopicRule(root: jsonP.JSONValue): TopicRule {
return jsonP.readObj({
required: {},
optional: {
"ruleName": "s",
"sql": "s",
"description": "s",
"createdAt": "d",
"actions": [toAction],
"ruleDisabled": "b",
"awsIotSqlVersion": "s",
"errorAction": toAction,
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** Information about an active Device Defender security profile behavior violation. */
export interface ActiveViolation {
/** The ID of the active violation. */
violationId?: string | null;
/** The name of the thing responsible for the active violation. */
thingName?: string | null;
/** The security profile with the behavior is in violation. */
securityProfileName?: string | null;
/** The behavior that is being violated. */
behavior?: Behavior | null;
/** The value of the metric (the measurement) that caused the most recent violation. */
lastViolationValue?: MetricValue | null;
/** The details of a violation event. */
violationEventAdditionalInfo?: ViolationEventAdditionalInfo | null;
/** The verification state of the violation (detect alarm). */
verificationState?: VerificationState | null;
/** The description of the verification state of the violation. */
verificationStateDescription?: string | null;
/** The time the most recent violation occurred. */
lastViolationTime?: Date | number | null;
/** The time the violation started. */
violationStartTime?: Date | number | null;
}
function toActiveViolation(root: jsonP.JSONValue): ActiveViolation {
return jsonP.readObj({
required: {},
optional: {
"violationId": "s",
"thingName": "s",
"securityProfileName": "s",
"behavior": toBehavior,
"lastViolationValue": toMetricValue,
"violationEventAdditionalInfo": toViolationEventAdditionalInfo,
"verificationState": (x: jsonP.JSONValue) => cmnP.readEnum<VerificationState>(x),
"verificationStateDescription": "s",
"lastViolationTime": "d",
"violationStartTime": "d",
},
}, root);
}
// refs: 2 - tags: output, named, interface
/** The details of a violation event. */
export interface ViolationEventAdditionalInfo {
/** The sensitivity of anomalous behavior evaluation. */
confidenceLevel?: ConfidenceLevel | null;
}
function toViolationEventAdditionalInfo(root: jsonP.JSONValue): ViolationEventAdditionalInfo {
return jsonP.readObj({
required: {},
optional: {
"confidenceLevel": (x: jsonP.JSONValue) => cmnP.readEnum<ConfidenceLevel>(x),
},
}, root);
}
// refs: 6 - tags: output, named, interface
/** Describes an IoT policy. */
export interface Policy {
/** The policy name. */
policyName?: string | null;
/** The policy ARN. */
policyArn?: string | null;
}
function toPolicy(root: jsonP.JSONValue): Policy {
return jsonP.readObj({
required: {},
optional: {
"policyName": "s",
"policyArn": "s",
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** Returned by ListAuditMitigationActionsTask, this object contains information that describes a mitigation action that has been started. */
export interface AuditMitigationActionExecutionMetadata {
/** The unique identifier for the task that applies the mitigation action. */
taskId?: string | null;
/** The unique identifier for the findings to which the task and associated mitigation action are applied. */
findingId?: string | null;
/** The friendly name of the mitigation action being applied by the task. */
actionName?: string | null;
/** The unique identifier for the mitigation action being applied by the task. */
actionId?: string | null;
/** The current status of the task being executed. */
status?: AuditMitigationActionsExecutionStatus | null;
/** The date and time when the task was started. */
startTime?: Date | number | null;
/** The date and time when the task was completed or canceled. */
endTime?: Date | number | null;
/** If an error occurred, the code that indicates which type of error occurred. */
errorCode?: string | null;
/** If an error occurred, a message that describes the error. */
message?: string | null;
}
function toAuditMitigationActionExecutionMetadata(root: jsonP.JSONValue): AuditMitigationActionExecutionMetadata {
return jsonP.readObj({
required: {},
optional: {
"taskId": "s",
"findingId": "s",
"actionName": "s",
"actionId": "s",
"status": (x: jsonP.JSONValue) => cmnP.readEnum<AuditMitigationActionsExecutionStatus>(x),
"startTime": "d",
"endTime": "d",
"errorCode": "s",
"message": "s",
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** Information about an audit mitigation actions task that is returned by `ListAuditMitigationActionsTasks`. */
export interface AuditMitigationActionsTaskMetadata {
/** The unique identifier for the task. */
taskId?: string | null;
/** The time at which the audit mitigation actions task was started. */
startTime?: Date | number | null;
/** The current state of the audit mitigation actions task. */
taskStatus?: AuditMitigationActionsTaskStatus | null;
}
function toAuditMitigationActionsTaskMetadata(root: jsonP.JSONValue): AuditMitigationActionsTaskMetadata {
return jsonP.readObj({
required: {},
optional: {
"taskId": "s",
"startTime": "d",
"taskStatus": (x: jsonP.JSONValue) => cmnP.readEnum<AuditMitigationActionsTaskStatus>(x),
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** Filters out specific findings of a Device Defender audit. */
export interface AuditSuppression {
checkName: string;
resourceIdentifier: ResourceIdentifier;
/** The expiration date (epoch timestamp in seconds) that you want the suppression to adhere to. */
expirationDate?: Date | number | null;
/** Indicates whether a suppression should exist indefinitely or not. */
suppressIndefinitely?: boolean | null;
/** The description of the audit suppression. */
description?: string | null;
}
function toAuditSuppression(root: jsonP.JSONValue): AuditSuppression {
return jsonP.readObj({
required: {
"checkName": "s",
"resourceIdentifier": toResourceIdentifier,
},
optional: {
"expirationDate": "d",
"suppressIndefinitely": "b",
"description": "s",
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** The audits that were performed. */
export interface AuditTaskMetadata {
/** The ID of this audit. */
taskId?: string | null;
/** The status of this audit. */
taskStatus?: AuditTaskStatus | null;
/** The type of this audit. */
taskType?: AuditTaskType | null;
}
function toAuditTaskMetadata(root: jsonP.JSONValue): AuditTaskMetadata {
return jsonP.readObj({
required: {},
optional: {
"taskId": "s",
"taskStatus": (x: jsonP.JSONValue) => cmnP.readEnum<AuditTaskStatus>(x),
"taskType": (x: jsonP.JSONValue) => cmnP.readEnum<AuditTaskType>(x),
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** The authorizer summary. */
export interface AuthorizerSummary {
/** The authorizer name. */
authorizerName?: string | null;
/** The authorizer ARN. */
authorizerArn?: string | null;
}
function toAuthorizerSummary(root: jsonP.JSONValue): AuthorizerSummary {
return jsonP.readObj({
required: {},
optional: {
"authorizerName": "s",
"authorizerArn": "s",
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** A CA certificate. */
export interface CACertificate {
/** The ARN of the CA certificate. */
certificateArn?: string | null;
/** The ID of the CA certificate. */
certificateId?: string | null;
/** The status of the CA certificate. */
status?: CACertificateStatus | null;
/** The date the CA certificate was created. */
creationDate?: Date | number | null;
}
function toCACertificate(root: jsonP.JSONValue): CACertificate {
return jsonP.readObj({
required: {},
optional: {
"certificateArn": "s",
"certificateId": "s",
"status": (x: jsonP.JSONValue) => cmnP.readEnum<CACertificateStatus>(x),
"creationDate": "d",
},
}, root);
}
// refs: 2 - tags: output, named, interface
/** Information about a certificate. */
export interface Certificate {
/** The ARN of the certificate. */
certificateArn?: string | null;
/** The ID of the certificate. */
certificateId?: string | null;
/** The status of the certificate. */
status?: CertificateStatus | null;
/** The mode of the certificate. */
certificateMode?: CertificateMode | null;
/** The date and time the certificate was created. */
creationDate?: Date | number | null;
}
function toCertificate(root: jsonP.JSONValue): Certificate {
return jsonP.readObj({
required: {},
optional: {
"certificateArn": "s",
"certificateId": "s",
"status": (x: jsonP.JSONValue) => cmnP.readEnum<CertificateStatus>(x),
"certificateMode": (x: jsonP.JSONValue) => cmnP.readEnum<CertificateMode>(x),
"creationDate": "d",
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** Describes which mitigation actions should be executed. */
export interface DetectMitigationActionExecution {
/** The unique identifier of the task. */
taskId?: string | null;
/** The unique identifier of the violation. */
violationId?: string | null;
/** The friendly name that uniquely identifies the mitigation action. */
actionName?: string | null;
/** The name of the thing. */
thingName?: string | null;
/** The date a mitigation action was started. */
executionStartDate?: Date | number | null;
/** The date a mitigation action ended. */
executionEndDate?: Date | number | null;
/** The status of a mitigation action. */
status?: DetectMitigationActionExecutionStatus | null;
/** The error code of a mitigation action. */
errorCode?: string | null;
/** The message of a mitigation action. */
message?: string | null;
}
function toDetectMitigationActionExecution(root: jsonP.JSONValue): DetectMitigationActionExecution {
return jsonP.readObj({
required: {},
optional: {
"taskId": "s",
"violationId": "s",
"actionName": "s",
"thingName": "s",
"executionStartDate": "d",
"executionEndDate": "d",
"status": (x: jsonP.JSONValue) => cmnP.readEnum<DetectMitigationActionExecutionStatus>(x),
"errorCode": "s",
"message": "s",
},
}, root);
}
// refs: 1 - tags: output, named, enum
export type DetectMitigationActionExecutionStatus =
| "IN_PROGRESS"
| "SUCCESSFUL"
| "FAILED"
| "SKIPPED"
| cmnP.UnexpectedEnumValue;
// refs: 1 - tags: output, named, interface
/** The summary of a domain configuration. */
export interface DomainConfigurationSummary {
/** The name of the domain configuration. */
domainConfigurationName?: string | null;
/** The ARN of the domain configuration. */
domainConfigurationArn?: string | null;
/** The type of service delivered by the endpoint. */
serviceType?: ServiceType | null;
}
function toDomainConfigurationSummary(root: jsonP.JSONValue): DomainConfigurationSummary {
return jsonP.readObj({
required: {},
optional: {
"domainConfigurationName": "s",
"domainConfigurationArn": "s",
"serviceType": (x: jsonP.JSONValue) => cmnP.readEnum<ServiceType>(x),
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** The name and ARN of a fleet metric. */
export interface FleetMetricNameAndArn {
/** The fleet metric name. */
metricName?: string | null;
/** The fleet metric ARN. */
metricArn?: string | null;
}
function toFleetMetricNameAndArn(root: jsonP.JSONValue): FleetMetricNameAndArn {
return jsonP.readObj({
required: {},
optional: {
"metricName": "s",
"metricArn": "s",
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** Contains a summary of information about job executions for a specific job. */
export interface JobExecutionSummaryForJob {
/** The ARN of the thing on which the job execution is running. */
thingArn?: string | null;
/** Contains a subset of information about a job execution. */
jobExecutionSummary?: JobExecutionSummary | null;
}
function toJobExecutionSummaryForJob(root: jsonP.JSONValue): JobExecutionSummaryForJob {
return jsonP.readObj({
required: {},
optional: {
"thingArn": "s",
"jobExecutionSummary": toJobExecutionSummary,
},
}, root);
}
// refs: 2 - tags: output, named, interface
/** The job execution summary. */
export interface JobExecutionSummary {
/** The status of the job execution. */
status?: JobExecutionStatus | null;
/** The time, in seconds since the epoch, when the job execution was queued. */
queuedAt?: Date | number | null;
/** The time, in seconds since the epoch, when the job execution started. */
startedAt?: Date | number | null;
/** The time, in seconds since the epoch, when the job execution was last updated. */
lastUpdatedAt?: Date | number | null;
/** A string (consisting of the digits "0" through "9") which identifies this particular job execution on this particular device. */
executionNumber?: number | null;
/** The number that indicates how many retry attempts have been completed for this job on this device. */
retryAttempt?: number | null;
}
function toJobExecutionSummary(root: jsonP.JSONValue): JobExecutionSummary {
return jsonP.readObj({
required: {},
optional: {
"status": (x: jsonP.JSONValue) => cmnP.readEnum<JobExecutionStatus>(x),
"queuedAt": "d",
"startedAt": "d",
"lastUpdatedAt": "d",
"executionNumber": "n",
"retryAttempt": "n",
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** The job execution summary for a thing. */
export interface JobExecutionSummaryForThing {
/** The unique identifier you assigned to this job when it was created. */
jobId?: string | null;
/** Contains a subset of information about a job execution. */
jobExecutionSummary?: JobExecutionSummary | null;
}
function toJobExecutionSummaryForThing(root: jsonP.JSONValue): JobExecutionSummaryForThing {
return jsonP.readObj({
required: {},
optional: {
"jobId": "s",
"jobExecutionSummary": toJobExecutionSummary,
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** An object that contains information about the job template. */
export interface JobTemplateSummary {
/** The ARN of the job template. */
jobTemplateArn?: string | null;
/** The unique identifier of the job template. */
jobTemplateId?: string | null;
/** A description of the job template. */
description?: string | null;
/** The time, in seconds since the epoch, when the job template was created. */
createdAt?: Date | number | null;
}
function toJobTemplateSummary(root: jsonP.JSONValue): JobTemplateSummary {
return jsonP.readObj({
required: {},
optional: {
"jobTemplateArn": "s",
"jobTemplateId": "s",
"description": "s",
"createdAt": "d",
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** The job summary. */
export interface JobSummary {
/** The job ARN. */
jobArn?: string | null;
/** The unique identifier you assigned to this job when it was created. */
jobId?: string | null;
/** The ID of the thing group. */
thingGroupId?: string | null;
/** Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things specified as targets have completed the job (SNAPSHOT). */
targetSelection?: TargetSelection | null;
/** The job summary status. */
status?: JobStatus | null;
/** The time, in seconds since the epoch, when the job was created. */
createdAt?: Date | number | null;
/** The time, in seconds since the epoch, when the job was last updated. */
lastUpdatedAt?: Date | number | null;
/** The time, in seconds since the epoch, when the job completed. */
completedAt?: Date | number | null;
}
function toJobSummary(root: jsonP.JSONValue): JobSummary {
return jsonP.readObj({
required: {},
optional: {
"jobArn": "s",
"jobId": "s",
"thingGroupId": "s",
"targetSelection": (x: jsonP.JSONValue) => cmnP.readEnum<TargetSelection>(x),
"status": (x: jsonP.JSONValue) => cmnP.readEnum<JobStatus>(x),
"createdAt": "d",
"lastUpdatedAt": "d",
"completedAt": "d",
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** An object that contains information about the managed template. */
export interface ManagedJobTemplateSummary {
/** The Amazon Resource Name (ARN) for a managed template. */
templateArn?: string | null;
/** The unique Name for a managed template. */
templateName?: string | null;
/** The description for a managed template. */
description?: string | null;
/** A list of environments that are supported with the managed job template. */
environments?: string[] | null;
/** The version for a managed template. */
templateVersion?: string | null;
}
function toManagedJobTemplateSummary(root: jsonP.JSONValue): ManagedJobTemplateSummary {
return jsonP.readObj({
required: {},
optional: {
"templateArn": "s",
"templateName": "s",
"description": "s",
"environments": ["s"],
"templateVersion": "s",
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** Information that identifies a mitigation action. */
export interface MitigationActionIdentifier {
/** The friendly name of the mitigation action. */
actionName?: string | null;
/** The IAM role ARN used to apply this mitigation action. */
actionArn?: string | null;
/** The date when this mitigation action was created. */
creationDate?: Date | number | null;
}
function toMitigationActionIdentifier(root: jsonP.JSONValue): MitigationActionIdentifier {
return jsonP.readObj({
required: {},
optional: {
"actionName": "s",
"actionArn": "s",
"creationDate": "d",
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** An OTA update summary. */
export interface OTAUpdateSummary {
/** The OTA update ID. */
otaUpdateId?: string | null;
/** The OTA update ARN. */
otaUpdateArn?: string | null;
/** The date when the OTA update was created. */
creationDate?: Date | number | null;
}
function toOTAUpdateSummary(root: jsonP.JSONValue): OTAUpdateSummary {
return jsonP.readObj({
required: {},
optional: {
"otaUpdateId": "s",
"otaUpdateArn": "s",
"creationDate": "d",
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** A certificate that has been transferred but not yet accepted. */
export interface OutgoingCertificate {
/** The certificate ARN. */
certificateArn?: string | null;
/** The certificate ID. */
certificateId?: string | null;
/** The Amazon Web Services account to which the transfer was made. */
transferredTo?: string | null;
/** The date the transfer was initiated. */
transferDate?: Date | number | null;
/** The transfer message. */
transferMessage?: string | null;
/** The certificate creation date. */
creationDate?: Date | number | null;
}
function toOutgoingCertificate(root: jsonP.JSONValue): OutgoingCertificate {
return jsonP.readObj({
required: {},
optional: {
"certificateArn": "s",
"certificateId": "s",
"transferredTo": "s",
"transferDate": "d",
"transferMessage": "s",
"creationDate": "d",
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** Describes a policy version. */
export interface PolicyVersion {
/** The policy version ID. */
versionId?: string | null;
/** Specifies whether the policy version is the default. */
isDefaultVersion?: boolean | null;
/** The date and time the policy was created. */
createDate?: Date | number | null;
}
function toPolicyVersion(root: jsonP.JSONValue): PolicyVersion {
return jsonP.readObj({
required: {},
optional: {
"versionId": "s",
"isDefaultVersion": "b",
"createDate": "d",
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** A summary of information about a fleet provision template version. */
export interface ProvisioningTemplateVersionSummary {
/** The ID of the fleet privisioning template version. */
versionId?: number | null;
/** The date when the fleet provisioning template version was created */
creationDate?: Date | number | null;
/** True if the fleet provisioning template version is the default version, otherwise false. */
isDefaultVersion?: boolean | null;
}
function toProvisioningTemplateVersionSummary(root: jsonP.JSONValue): ProvisioningTemplateVersionSummary {
return jsonP.readObj({
required: {},
optional: {
"versionId": "n",
"creationDate": "d",
"isDefaultVersion": "b",
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** A summary of information about a fleet provisioning template. */
export interface ProvisioningTemplateSummary {
/** The ARN of the fleet provisioning template. */
templateArn?: string | null;
/** The name of the fleet provisioning template. */
templateName?: string | null;
/** The description of the fleet provisioning template. */
description?: string | null;
/** The date when the fleet provisioning template summary was created. */
creationDate?: Date | number | null;
/** The date when the fleet provisioning template summary was last modified. */
lastModifiedDate?: Date | number | null;
/** True if the fleet provision template is enabled, otherwise false. */
enabled?: boolean | null;
}
function toProvisioningTemplateSummary(root: jsonP.JSONValue): ProvisioningTemplateSummary {
return jsonP.readObj({
required: {},
optional: {
"templateArn": "s",
"templateName": "s",
"description": "s",
"creationDate": "d",
"lastModifiedDate": "d",
"enabled": "b",
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** Information about the scheduled audit. */
export interface ScheduledAuditMetadata {
/** The name of the scheduled audit. */
scheduledAuditName?: string | null;
/** The ARN of the scheduled audit. */
scheduledAuditArn?: string | null;
/** How often the scheduled audit occurs. */
frequency?: AuditFrequency | null;
/** The day of the month on which the scheduled audit is run (if the `frequency` is "MONTHLY"). */
dayOfMonth?: string | null;
/** The day of the week on which the scheduled audit is run (if the `frequency` is "WEEKLY" or "BIWEEKLY"). */
dayOfWeek?: DayOfWeek | null;
}
function toScheduledAuditMetadata(root: jsonP.JSONValue): ScheduledAuditMetadata {
return jsonP.readObj({
required: {},
optional: {
"scheduledAuditName": "s",
"scheduledAuditArn": "s",
"frequency": (x: jsonP.JSONValue) => cmnP.readEnum<AuditFrequency>(x),
"dayOfMonth": "s",
"dayOfWeek": (x: jsonP.JSONValue) => cmnP.readEnum<DayOfWeek>(x),
},
}, root);
}
// refs: 2 - tags: output, named, interface
/** Identifying information for a Device Defender security profile. */
export interface SecurityProfileIdentifier {
/** The name you've given to the security profile. */
name: string;
/** The ARN of the security profile. */
arn: string;
}
function toSecurityProfileIdentifier(root: jsonP.JSONValue): SecurityProfileIdentifier {
return jsonP.readObj({
required: {
"name": "s",
"arn": "s",
},
optional: {},
}, root);
}
// refs: 1 - tags: output, named, interface
/** Information about a security profile and the target associated with it. */
export interface SecurityProfileTargetMapping {
/** Information that identifies the security profile. */
securityProfileIdentifier?: SecurityProfileIdentifier | null;
/** Information about the target (thing group) associated with the security profile. */
target?: SecurityProfileTarget | null;
}
function toSecurityProfileTargetMapping(root: jsonP.JSONValue): SecurityProfileTargetMapping {
return jsonP.readObj({
required: {},
optional: {
"securityProfileIdentifier": toSecurityProfileIdentifier,
"target": toSecurityProfileTarget,
},
}, root);
}
// refs: 2 - tags: output, named, interface
/** A target to which an alert is sent when a security profile behavior is violated. */
export interface SecurityProfileTarget {
/** The ARN of the security profile. */
arn: string;
}
function toSecurityProfileTarget(root: jsonP.JSONValue): SecurityProfileTarget {
return jsonP.readObj({
required: {
"arn": "s",
},
optional: {},
}, root);
}
// refs: 1 - tags: output, named, interface
/** A summary of a stream. */
export interface StreamSummary {
/** The stream ID. */
streamId?: string | null;
/** The stream ARN. */
streamArn?: string | null;
/** The stream version. */
streamVersion?: number | null;
/** A description of the stream. */
description?: string | null;
}
function toStreamSummary(root: jsonP.JSONValue): StreamSummary {
return jsonP.readObj({
required: {},
optional: {
"streamId": "s",
"streamArn": "s",
"streamVersion": "n",
"description": "s",
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** The definition of the thing type, including thing type name and description. */
export interface ThingTypeDefinition {
/** The name of the thing type. */
thingTypeName?: string | null;
/** The thing type ARN. */
thingTypeArn?: string | null;
/** The ThingTypeProperties for the thing type. */
thingTypeProperties?: ThingTypeProperties | null;
/** The ThingTypeMetadata contains additional information about the thing type including: creation date and time, a value indicating whether the thing type is deprecated, and a date and time when it was deprecated. */
thingTypeMetadata?: ThingTypeMetadata | null;
}
function toThingTypeDefinition(root: jsonP.JSONValue): ThingTypeDefinition {
return jsonP.readObj({
required: {},
optional: {
"thingTypeName": "s",
"thingTypeArn": "s",
"thingTypeProperties": toThingTypeProperties,
"thingTypeMetadata": toThingTypeMetadata,
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** The properties of the thing, including thing name, thing type name, and a list of thing attributes. */
export interface ThingAttribute {
/** The name of the thing. */
thingName?: string | null;
/** The name of the thing type, if the thing has been associated with a type. */
thingTypeName?: string | null;
/** The thing ARN. */
thingArn?: string | null;
/** A list of thing attributes which are name-value pairs. */
attributes?: { [key: string]: string | null | undefined } | null;
/** The version of the thing record in the registry. */
version?: number | null;
}
function toThingAttribute(root: jsonP.JSONValue): ThingAttribute {
return jsonP.readObj({
required: {},
optional: {
"thingName": "s",
"thingTypeName": "s",
"thingArn": "s",
"attributes": x => jsonP.readMap(String, String, x),
"version": "n",
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** Information about the topic rule destination. */
export interface TopicRuleDestinationSummary {
/** The topic rule destination ARN. */
arn?: string | null;
/** The status of the topic rule destination. */
status?: TopicRuleDestinationStatus | null;
/** The date and time when the topic rule destination was created. */
createdAt?: Date | number | null;
/** The date and time when the topic rule destination was last updated. */
lastUpdatedAt?: Date | number | null;
/** The reason the topic rule destination is in the current status. */
statusReason?: string | null;
/** Information about the HTTP URL. */
httpUrlSummary?: HttpUrlDestinationSummary | null;
/** Information about the virtual private cloud (VPC) connection. */
vpcDestinationSummary?: VpcDestinationSummary | null;
}
function toTopicRuleDestinationSummary(root: jsonP.JSONValue): TopicRuleDestinationSummary {
return jsonP.readObj({
required: {},
optional: {
"arn": "s",
"status": (x: jsonP.JSONValue) => cmnP.readEnum<TopicRuleDestinationStatus>(x),
"createdAt": "d",
"lastUpdatedAt": "d",
"statusReason": "s",
"httpUrlSummary": toHttpUrlDestinationSummary,
"vpcDestinationSummary": toVpcDestinationSummary,
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** Information about an HTTP URL destination. */
export interface HttpUrlDestinationSummary {
/** The URL used to confirm ownership of or access to the HTTP topic rule destination URL. */
confirmationUrl?: string | null;
}
function toHttpUrlDestinationSummary(root: jsonP.JSONValue): HttpUrlDestinationSummary {
return jsonP.readObj({
required: {},
optional: {
"confirmationUrl": "s",
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** The summary of a virtual private cloud (VPC) destination. */
export interface VpcDestinationSummary {
/** The subnet IDs of the VPC destination. */
subnetIds?: string[] | null;
/** The security groups of the VPC destination. */
securityGroups?: string[] | null;
/** The ID of the VPC. */
vpcId?: string | null;
/** The ARN of a role that has permission to create and attach to elastic network interfaces (ENIs). */
roleArn?: string | null;
}
function toVpcDestinationSummary(root: jsonP.JSONValue): VpcDestinationSummary {
return jsonP.readObj({
required: {},
optional: {
"subnetIds": ["s"],
"securityGroups": ["s"],
"vpcId": "s",
"roleArn": "s",
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** Describes a rule. */
export interface TopicRuleListItem {
/** The rule ARN. */
ruleArn?: string | null;
/** The name of the rule. */
ruleName?: string | null;
/** The pattern for the topic names that apply. */
topicPattern?: string | null;
/** The date and time the rule was created. */
createdAt?: Date | number | null;
/** Specifies whether the rule is disabled. */
ruleDisabled?: boolean | null;
}
function toTopicRuleListItem(root: jsonP.JSONValue): TopicRuleListItem {
return jsonP.readObj({
required: {},
optional: {
"ruleArn": "s",
"ruleName": "s",
"topicPattern": "s",
"createdAt": "d",
"ruleDisabled": "b",
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** The target configuration. */
export interface LogTargetConfiguration {
/** A log target */
logTarget?: LogTarget | null;
/** The logging level. */
logLevel?: LogLevel | null;
}
function toLogTargetConfiguration(root: jsonP.JSONValue): LogTargetConfiguration {
return jsonP.readObj({
required: {},
optional: {
"logTarget": toLogTarget,
"logLevel": (x: jsonP.JSONValue) => cmnP.readEnum<LogLevel>(x),
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** Information about a Device Defender security profile behavior violation. */
export interface ViolationEvent {
/** The ID of the violation event. */
violationId?: string | null;
/** The name of the thing responsible for the violation event. */
thingName?: string | null;
/** The name of the security profile whose behavior was violated. */
securityProfileName?: string | null;
/** The behavior that was violated. */
behavior?: Behavior | null;
/** The value of the metric (the measurement). */
metricValue?: MetricValue | null;
/** The details of a violation event. */
violationEventAdditionalInfo?: ViolationEventAdditionalInfo | null;
/** The type of violation event. */
violationEventType?: ViolationEventType | null;
/** The verification state of the violation (detect alarm). */
verificationState?: VerificationState | null;
/** The description of the verification state of the violation. */
verificationStateDescription?: string | null;
/** The time the violation event occurred. */
violationEventTime?: Date | number | null;
}
function toViolationEvent(root: jsonP.JSONValue): ViolationEvent {
return jsonP.readObj({
required: {},
optional: {
"violationId": "s",
"thingName": "s",
"securityProfileName": "s",
"behavior": toBehavior,
"metricValue": toMetricValue,
"violationEventAdditionalInfo": toViolationEventAdditionalInfo,
"violationEventType": (x: jsonP.JSONValue) => cmnP.readEnum<ViolationEventType>(x),
"verificationState": (x: jsonP.JSONValue) => cmnP.readEnum<VerificationState>(x),
"verificationStateDescription": "s",
"violationEventTime": "d",
},
}, root);
}
// refs: 1 - tags: output, named, enum
export type ViolationEventType =
| "in-alarm"
| "alarm-cleared"
| "alarm-invalidated"
| cmnP.UnexpectedEnumValue;
// refs: 1 - tags: output, named, interface
/** The thing search index document. */
export interface ThingDocument {
/** The thing name. */
thingName?: string | null;
/** The thing ID. */
thingId?: string | null;
/** The thing type name. */
thingTypeName?: string | null;
/** Thing group names. */
thingGroupNames?: string[] | null;
/** The attributes. */
attributes?: { [key: string]: string | null | undefined } | null;
/** The unnamed shadow and named shadow. */
shadow?: string | null;
/** Contains Device Defender data. */
deviceDefender?: string | null;
/** Indicates whether the thing is connected to the Amazon Web Services IoT Core service. */
connectivity?: ThingConnectivity | null;
}
function toThingDocument(root: jsonP.JSONValue): ThingDocument {
return jsonP.readObj({
required: {},
optional: {
"thingName": "s",
"thingId": "s",
"thingTypeName": "s",
"thingGroupNames": ["s"],
"attributes": x => jsonP.readMap(String, String, x),
"shadow": "s",
"deviceDefender": "s",
"connectivity": toThingConnectivity,
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** The connectivity status of the thing. */
export interface ThingConnectivity {
/** True if the thing is connected to the Amazon Web Services IoT Core service; false if it is not connected. */
connected?: boolean | null;
/** The epoch time (in milliseconds) when the thing last connected or disconnected. */
timestamp?: number | null;
/** The reason why the client is disconnected. */
disconnectReason?: string | null;
}
function toThingConnectivity(root: jsonP.JSONValue): ThingConnectivity {
return jsonP.readObj({
required: {},
optional: {
"connected": "b",
"timestamp": "n",
"disconnectReason": "s",
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** The thing group search index document. */
export interface ThingGroupDocument {
/** The thing group name. */
thingGroupName?: string | null;
/** The thing group ID. */
thingGroupId?: string | null;
/** The thing group description. */
thingGroupDescription?: string | null;
/** The thing group attributes. */
attributes?: { [key: string]: string | null | undefined } | null;
/** Parent group names. */
parentGroupNames?: string[] | null;
}
function toThingGroupDocument(root: jsonP.JSONValue): ThingGroupDocument {
return jsonP.readObj({
required: {},
optional: {
"thingGroupName": "s",
"thingGroupId": "s",
"thingGroupDescription": "s",
"attributes": x => jsonP.readMap(String, String, x),
"parentGroupNames": ["s"],
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** The authorizer result. */
export interface AuthResult {
/** Authorization information. */
authInfo?: AuthInfo | null;
/** The policies and statements that allowed the specified action. */
allowed?: Allowed | null;
/** The policies and statements that denied the specified action. */
denied?: Denied | null;
/** The final authorization decision of this scenario. */
authDecision?: AuthDecision | null;
/** Contains any missing context values found while evaluating policy. */
missingContextValues?: string[] | null;
}
function toAuthResult(root: jsonP.JSONValue): AuthResult {
return jsonP.readObj({
required: {},
optional: {
"authInfo": toAuthInfo,
"allowed": toAllowed,
"denied": toDenied,
"authDecision": (x: jsonP.JSONValue) => cmnP.readEnum<AuthDecision>(x),
"missingContextValues": ["s"],
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** Contains information that allowed the authorization. */
export interface Allowed {
/** A list of policies that allowed the authentication. */
policies?: Policy[] | null;
}
function toAllowed(root: jsonP.JSONValue): Allowed {
return jsonP.readObj({
required: {},
optional: {
"policies": [toPolicy],
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** Contains information that denied the authorization. */
export interface Denied {
/** Information that implicitly denies the authorization. */
implicitDeny?: ImplicitDeny | null;
/** Information that explicitly denies the authorization. */
explicitDeny?: ExplicitDeny | null;
}
function toDenied(root: jsonP.JSONValue): Denied {
return jsonP.readObj({
required: {},
optional: {
"implicitDeny": toImplicitDeny,
"explicitDeny": toExplicitDeny,
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** Information that implicitly denies authorization. */
export interface ImplicitDeny {
/** Policies that don't contain a matching allow or deny statement for the specified action on the specified resource. */
policies?: Policy[] | null;
}
function toImplicitDeny(root: jsonP.JSONValue): ImplicitDeny {
return jsonP.readObj({
required: {},
optional: {
"policies": [toPolicy],
},
}, root);
}
// refs: 1 - tags: output, named, interface
/** Information that explicitly denies authorization. */
export interface ExplicitDeny {
/** The policies that denied the authorization. */
policies?: Policy[] | null;
}
function toExplicitDeny(root: jsonP.JSONValue): ExplicitDeny {
return jsonP.readObj({
required: {},
optional: {
"policies": [toPolicy],
},
}, root);
}
// refs: 1 - tags: output, named, enum
export type AuthDecision =
| "ALLOWED"
| "EXPLICIT_DENY"
| "IMPLICIT_DENY"
| cmnP.UnexpectedEnumValue;
// refs: 1 - tags: output, named, interface
/** Information about an error found in a behavior specification. */
export interface ValidationError {
/** The description of an error found in the behaviors. */
errorMessage?: string | null;
}
function toValidationError(root: jsonP.JSONValue): ValidationError {
return jsonP.readObj({
required: {},
optional: {
"errorMessage": "s",
},
}, root);
}