ZiWei Chen 2024-03-19 15:00:12 +08:00 коммит произвёл GitHub
Родитель 9b6fc5d15e
Коммит 600c5dece3
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
147 изменённых файлов: 7171 добавлений и 7964 удалений

Просмотреть файл

@ -14141,7 +14141,7 @@ packages:
dev: false
file:projects/arm-iotfirmwaredefense.tgz:
resolution: {integrity: sha512-WjogQNEjuVkfiAN9gnaphl5L0qQxUQQeHY9TIv1ntiGFcHFuK4X5irE3erwuZa8aBPCE3lBEnFWIGTfk/ix7Jw==, tarball: file:projects/arm-iotfirmwaredefense.tgz}
resolution: {integrity: sha512-6L8z9n7SicAg/+uC8iXs4gq7+GkDPfDYGLRTxOPP1+A/+8dkBSuxnbcCZWiNmO6pt9GNuhpWJ7Zv0Brvq3I0pQ==, tarball: file:projects/arm-iotfirmwaredefense.tgz}
name: '@rush-temp/arm-iotfirmwaredefense'
version: 0.0.0
dependencies:
@ -14153,6 +14153,7 @@ packages:
chai: 4.3.10
cross-env: 7.0.3
dotenv: 16.4.5
esm: 3.2.25
mkdirp: 2.1.6
mocha: 10.3.0
rimraf: 5.0.5

Просмотреть файл

@ -1,15 +1,5 @@
# Release History
## 1.0.0-beta.2 (Unreleased)
### Features Added
### Breaking Changes
### Bugs Fixed
### Other Changes
## 1.0.0-beta.1 (2023-07-19)
## 1.0.0 (2024-03-08)
The package of @azure/arm-iotfirmwaredefense is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart ).

Просмотреть файл

@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2023 Microsoft
Copyright (c) 2024 Microsoft
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

Просмотреть файл

@ -2,11 +2,11 @@
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure IoTFirmwareDefense client.
The definitions and parameters in this swagger specification will be used to manage the IoT Firmware Defense resources.
Firmware & IoT Security REST API
[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense) |
[Package (NPM)](https://www.npmjs.com/package/@azure/arm-iotfirmwaredefense) |
[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-iotfirmwaredefense?view=azure-node-preview) |
[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-iotfirmwaredefense) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)
## Getting started

Просмотреть файл

@ -1,8 +1,8 @@
{
"commit": "14a3cf043a4567366366f3d70829b4ef57711eb3",
"commit": "1a011ff0d72315ef3c530fe545c4fe82d0450201",
"readme": "specification/fist/resource-manager/readme.md",
"autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\fist\\resource-manager\\readme.md --use=@autorest/typescript@6.0.5 --generate-sample=true",
"autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\fist\\resource-manager\\readme.md --use=@autorest/typescript@6.0.17 --generate-sample=true",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"release_tool": "@azure-tools/js-sdk-release-tools@2.7.0",
"use": "@autorest/typescript@6.0.5"
"release_tool": "@azure-tools/js-sdk-release-tools@2.7.4",
"use": "@autorest/typescript@6.0.17"
}

Просмотреть файл

@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "js",
"TagPrefix": "js/iotfirmwaredefense/arm-iotfirmwaredefense",
"Tag": "js/iotfirmwaredefense/arm-iotfirmwaredefense_30d53907bb"
"Tag": "js/iotfirmwaredefense/arm-iotfirmwaredefense_153e6c5c5a"
}

Просмотреть файл

@ -3,15 +3,15 @@
"sdk-type": "mgmt",
"author": "Microsoft Corporation",
"description": "A generated SDK for IoTFirmwareDefenseClient.",
"version": "1.0.0-beta.2",
"version": "1.0.0",
"engines": {
"node": ">=18.0.0"
},
"dependencies": {
"@azure/core-paging": "^1.2.0",
"@azure/core-client": "^1.7.0",
"@azure/core-auth": "^1.3.0",
"@azure/core-rest-pipeline": "^1.8.0",
"@azure/core-auth": "^1.6.0",
"@azure/core-rest-pipeline": "^1.14.0",
"tslib": "^2.2.0"
},
"keywords": [
@ -30,19 +30,20 @@
"mkdirp": "^2.1.2",
"typescript": "~5.3.3",
"uglify-js": "^3.4.9",
"rimraf": "^5.0.5",
"rimraf": "^5.0.0",
"dotenv": "^16.0.0",
"@azure/dev-tool": "^1.0.0",
"@azure/identity": "^4.0.1",
"@azure-tools/test-recorder": "^3.0.0",
"@azure-tools/test-credential": "^1.0.0",
"mocha": "^10.0.0",
"@types/mocha": "^10.0.0",
"esm": "^3.2.18",
"@types/chai": "^4.2.8",
"chai": "^4.2.0",
"cross-env": "^7.0.2",
"@types/node": "^18.0.0",
"@azure/dev-tool": "^1.0.0",
"ts-node": "^10.0.0",
"@types/mocha": "^10.0.0"
"ts-node": "^10.0.0"
},
"repository": {
"type": "git",
@ -75,7 +76,6 @@
"pack": "npm pack 2>&1",
"extract-api": "api-extractor run --local",
"lint": "echo skipped",
"audit": "echo skipped",
"clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
"build:node": "echo skipped",
"build:browser": "echo skipped",

Просмотреть файл

@ -13,55 +13,65 @@ export type ActionType = string;
// @public
export interface BinaryHardening {
listByFirmware(resourceGroupName: string, workspaceName: string, firmwareId: string, options?: BinaryHardeningListByFirmwareOptionalParams): PagedAsyncIterableIterator<BinaryHardeningResource>;
}
// @public
export interface BinaryHardeningFeatures {
canary?: boolean;
nx?: boolean;
pie?: boolean;
relro?: boolean;
stripped?: boolean;
}
// @public
export interface BinaryHardeningListByFirmwareNextOptionalParams extends coreClient.OperationOptions {
}
// @public
export type BinaryHardeningListByFirmwareNextResponse = BinaryHardeningListResult;
// @public
export interface BinaryHardeningListByFirmwareOptionalParams extends coreClient.OperationOptions {
}
// @public
export type BinaryHardeningListByFirmwareResponse = BinaryHardeningListResult;
// @public
export interface BinaryHardeningListResult {
nextLink?: string;
readonly value?: BinaryHardeningResource[];
}
// @public
export interface BinaryHardeningResource extends Resource {
properties?: BinaryHardeningResult;
}
// @public
export interface BinaryHardeningResult {
architecture?: string;
binaryHardeningId?: string;
canary?: CanaryFlag;
class?: string;
nx?: NxFlag;
path?: string;
pie?: PieFlag;
relro?: RelroFlag;
features?: BinaryHardeningFeatures;
filePath?: string;
rpath?: string;
runpath?: string;
stripped?: StrippedFlag;
}
// @public
export interface BinaryHardeningList {
nextLink?: string;
readonly value?: BinaryHardening[];
}
// @public
export interface BinaryHardeningSummary {
export interface BinaryHardeningSummaryResource extends SummaryResourceProperties {
canary?: number;
nx?: number;
pie?: number;
relro?: number;
stripped?: number;
summaryType: "BinaryHardening";
totalFiles?: number;
}
// @public
export type CanaryFlag = string;
// @public
export interface Component {
componentId?: string;
componentName?: string;
isUpdateAvailable?: IsUpdateAvailable;
license?: string;
paths?: string[];
releaseDate?: Date;
version?: string;
}
// @public
export interface ComponentList {
nextLink?: string;
readonly value?: Component[];
}
// @public
export type CreatedByType = string;
@ -72,12 +82,12 @@ export interface CryptoCertificate {
expirationDate?: Date;
readonly filePaths?: string[];
fingerprint?: string;
isExpired?: IsExpired;
isSelfSigned?: IsSelfSigned;
isShortKeySize?: IsShortKeySize;
isExpired?: boolean;
isSelfSigned?: boolean;
isShortKeySize?: boolean;
issuedDate?: Date;
issuer?: CryptoCertificateEntity;
isWeakSignature?: IsWeakSignature;
isWeakSignature?: boolean;
keyAlgorithm?: string;
keySize?: number;
name?: string;
@ -99,18 +109,43 @@ export interface CryptoCertificateEntity {
}
// @public
export interface CryptoCertificateList {
export interface CryptoCertificateListResult {
nextLink?: string;
readonly value?: CryptoCertificate[];
readonly value?: CryptoCertificateResource[];
}
// @public
export interface CryptoCertificateSummary {
export interface CryptoCertificateResource extends Resource {
properties?: CryptoCertificate;
}
// @public
export interface CryptoCertificates {
listByFirmware(resourceGroupName: string, workspaceName: string, firmwareId: string, options?: CryptoCertificatesListByFirmwareOptionalParams): PagedAsyncIterableIterator<CryptoCertificateResource>;
}
// @public
export interface CryptoCertificatesListByFirmwareNextOptionalParams extends coreClient.OperationOptions {
}
// @public
export type CryptoCertificatesListByFirmwareNextResponse = CryptoCertificateListResult;
// @public
export interface CryptoCertificatesListByFirmwareOptionalParams extends coreClient.OperationOptions {
}
// @public
export type CryptoCertificatesListByFirmwareResponse = CryptoCertificateListResult;
// @public
export interface CryptoCertificateSummaryResource extends SummaryResourceProperties {
expired?: number;
expiringSoon?: number;
pairedKeys?: number;
selfSigned?: number;
shortKeySize?: number;
summaryType: "CryptoCertificate";
totalCertificates?: number;
weakSignature?: number;
}
@ -119,7 +154,7 @@ export interface CryptoCertificateSummary {
interface CryptoKey_2 {
cryptoKeyId?: string;
readonly filePaths?: string[];
isShortKeySize?: IsShortKeySize;
isShortKeySize?: boolean;
keyAlgorithm?: string;
keySize?: number;
keyType?: string;
@ -129,36 +164,45 @@ interface CryptoKey_2 {
export { CryptoKey_2 as CryptoKey }
// @public
export interface CryptoKeyList {
export interface CryptoKeyListResult {
nextLink?: string;
readonly value?: CryptoKey_2[];
readonly value?: CryptoKeyResource[];
}
// @public
export interface CryptoKeySummary {
export interface CryptoKeyResource extends Resource {
properties?: CryptoKey_2;
}
// @public
export interface CryptoKeys {
listByFirmware(resourceGroupName: string, workspaceName: string, firmwareId: string, options?: CryptoKeysListByFirmwareOptionalParams): PagedAsyncIterableIterator<CryptoKeyResource>;
}
// @public
export interface CryptoKeysListByFirmwareNextOptionalParams extends coreClient.OperationOptions {
}
// @public
export type CryptoKeysListByFirmwareNextResponse = CryptoKeyListResult;
// @public
export interface CryptoKeysListByFirmwareOptionalParams extends coreClient.OperationOptions {
}
// @public
export type CryptoKeysListByFirmwareResponse = CryptoKeyListResult;
// @public
export interface CryptoKeySummaryResource extends SummaryResourceProperties {
pairedKeys?: number;
privateKeys?: number;
publicKeys?: number;
shortKeySize?: number;
summaryType: "CryptoKey";
totalKeys?: number;
}
// @public
export interface Cve {
component?: Record<string, unknown>;
cveId?: string;
cvssScore?: string;
cvssV2Score?: string;
cvssV3Score?: string;
cvssVersion?: string;
description?: string;
readonly links?: CveLink[];
name?: string;
publishDate?: Date;
severity?: string;
updatedDate?: Date;
}
// @public
export interface CveComponent {
componentId?: string;
@ -173,18 +217,56 @@ export interface CveLink {
}
// @public
export interface CveList {
export interface CveListResult {
nextLink?: string;
readonly value?: Cve[];
readonly value?: CveResource[];
}
// @public
export interface CveSummary {
export interface CveResource extends Resource {
properties?: CveResult;
}
// @public
export interface CveResult {
component?: CveComponent;
cveId?: string;
cvssScore?: string;
cvssV2Score?: string;
cvssV3Score?: string;
cvssVersion?: string;
description?: string;
readonly links?: CveLink[];
name?: string;
severity?: string;
}
// @public
export interface Cves {
listByFirmware(resourceGroupName: string, workspaceName: string, firmwareId: string, options?: CvesListByFirmwareOptionalParams): PagedAsyncIterableIterator<CveResource>;
}
// @public
export interface CvesListByFirmwareNextOptionalParams extends coreClient.OperationOptions {
}
// @public
export type CvesListByFirmwareNextResponse = CveListResult;
// @public
export interface CvesListByFirmwareOptionalParams extends coreClient.OperationOptions {
}
// @public
export type CvesListByFirmwareResponse = CveListResult;
// @public
export interface CveSummary extends SummaryResourceProperties {
critical?: number;
high?: number;
low?: number;
medium?: number;
undefined?: number;
summaryType: "CVE";
unknown?: number;
}
@ -209,99 +291,10 @@ export interface ErrorResponse {
}
// @public
export interface Firmware extends ProxyResource {
description?: string;
fileName?: string;
fileSize?: number;
model?: string;
readonly provisioningState?: ProvisioningState;
status?: Status;
statusMessages?: Record<string, unknown>[];
vendor?: string;
version?: string;
export interface Firmware extends Resource {
properties?: FirmwareProperties;
}
// @public
export interface FirmwareCreateOptionalParams extends coreClient.OperationOptions {
}
// @public
export type FirmwareCreateResponse = Firmware;
// @public
export interface FirmwareDeleteOptionalParams extends coreClient.OperationOptions {
}
// @public
export interface FirmwareGenerateBinaryHardeningDetailsOptionalParams extends coreClient.OperationOptions {
}
// @public
export type FirmwareGenerateBinaryHardeningDetailsResponse = BinaryHardening;
// @public
export interface FirmwareGenerateBinaryHardeningSummaryOptionalParams extends coreClient.OperationOptions {
}
// @public
export type FirmwareGenerateBinaryHardeningSummaryResponse = BinaryHardeningSummary;
// @public
export interface FirmwareGenerateComponentDetailsOptionalParams extends coreClient.OperationOptions {
}
// @public
export type FirmwareGenerateComponentDetailsResponse = Component;
// @public
export interface FirmwareGenerateCryptoCertificateSummaryOptionalParams extends coreClient.OperationOptions {
}
// @public
export type FirmwareGenerateCryptoCertificateSummaryResponse = CryptoCertificateSummary;
// @public
export interface FirmwareGenerateCryptoKeySummaryOptionalParams extends coreClient.OperationOptions {
}
// @public
export type FirmwareGenerateCryptoKeySummaryResponse = CryptoKeySummary;
// @public
export interface FirmwareGenerateCveSummaryOptionalParams extends coreClient.OperationOptions {
}
// @public
export type FirmwareGenerateCveSummaryResponse = CveSummary;
// @public
export interface FirmwareGenerateDownloadUrlOptionalParams extends coreClient.OperationOptions {
}
// @public
export type FirmwareGenerateDownloadUrlResponse = UrlToken;
// @public
export interface FirmwareGenerateFilesystemDownloadUrlOptionalParams extends coreClient.OperationOptions {
}
// @public
export type FirmwareGenerateFilesystemDownloadUrlResponse = UrlToken;
// @public
export interface FirmwareGenerateSummaryOptionalParams extends coreClient.OperationOptions {
}
// @public
export type FirmwareGenerateSummaryResponse = FirmwareSummary;
// @public
export interface FirmwareGetOptionalParams extends coreClient.OperationOptions {
}
// @public
export type FirmwareGetResponse = Firmware;
// @public
export interface FirmwareList {
nextLink?: string;
@ -309,129 +302,77 @@ export interface FirmwareList {
}
// @public
export interface FirmwareListByWorkspaceNextOptionalParams extends coreClient.OperationOptions {
export interface FirmwareProperties {
description?: string;
fileName?: string;
fileSize?: number;
model?: string;
readonly provisioningState?: ProvisioningState;
status?: Status;
statusMessages?: StatusMessage[];
vendor?: string;
version?: string;
}
// @public
export type FirmwareListByWorkspaceNextResponse = FirmwareList;
// @public
export interface FirmwareListByWorkspaceOptionalParams extends coreClient.OperationOptions {
export interface Firmwares {
create(resourceGroupName: string, workspaceName: string, firmwareId: string, firmware: Firmware, options?: FirmwaresCreateOptionalParams): Promise<FirmwaresCreateResponse>;
delete(resourceGroupName: string, workspaceName: string, firmwareId: string, options?: FirmwaresDeleteOptionalParams): Promise<void>;
generateDownloadUrl(resourceGroupName: string, workspaceName: string, firmwareId: string, options?: FirmwaresGenerateDownloadUrlOptionalParams): Promise<FirmwaresGenerateDownloadUrlResponse>;
generateFilesystemDownloadUrl(resourceGroupName: string, workspaceName: string, firmwareId: string, options?: FirmwaresGenerateFilesystemDownloadUrlOptionalParams): Promise<FirmwaresGenerateFilesystemDownloadUrlResponse>;
get(resourceGroupName: string, workspaceName: string, firmwareId: string, options?: FirmwaresGetOptionalParams): Promise<FirmwaresGetResponse>;
listByWorkspace(resourceGroupName: string, workspaceName: string, options?: FirmwaresListByWorkspaceOptionalParams): PagedAsyncIterableIterator<Firmware>;
update(resourceGroupName: string, workspaceName: string, firmwareId: string, firmware: FirmwareUpdateDefinition, options?: FirmwaresUpdateOptionalParams): Promise<FirmwaresUpdateResponse>;
}
// @public
export type FirmwareListByWorkspaceResponse = FirmwareList;
// @public
export interface FirmwareListGenerateBinaryHardeningListNextOptionalParams extends coreClient.OperationOptions {
export interface FirmwaresCreateOptionalParams extends coreClient.OperationOptions {
}
// @public
export type FirmwareListGenerateBinaryHardeningListNextResponse = BinaryHardeningList;
export type FirmwaresCreateResponse = Firmware;
// @public
export interface FirmwareListGenerateBinaryHardeningListOptionalParams extends coreClient.OperationOptions {
export interface FirmwaresDeleteOptionalParams extends coreClient.OperationOptions {
}
// @public
export type FirmwareListGenerateBinaryHardeningListResponse = BinaryHardeningList;
// @public
export interface FirmwareListGenerateComponentListNextOptionalParams extends coreClient.OperationOptions {
export interface FirmwaresGenerateDownloadUrlOptionalParams extends coreClient.OperationOptions {
}
// @public
export type FirmwareListGenerateComponentListNextResponse = ComponentList;
export type FirmwaresGenerateDownloadUrlResponse = UrlToken;
// @public
export interface FirmwareListGenerateComponentListOptionalParams extends coreClient.OperationOptions {
export interface FirmwaresGenerateFilesystemDownloadUrlOptionalParams extends coreClient.OperationOptions {
}
// @public
export type FirmwareListGenerateComponentListResponse = ComponentList;
export type FirmwaresGenerateFilesystemDownloadUrlResponse = UrlToken;
// @public
export interface FirmwareListGenerateCryptoCertificateListNextOptionalParams extends coreClient.OperationOptions {
export interface FirmwaresGetOptionalParams extends coreClient.OperationOptions {
}
// @public
export type FirmwareListGenerateCryptoCertificateListNextResponse = CryptoCertificateList;
export type FirmwaresGetResponse = Firmware;
// @public
export interface FirmwareListGenerateCryptoCertificateListOptionalParams extends coreClient.OperationOptions {
export interface FirmwaresListByWorkspaceNextOptionalParams extends coreClient.OperationOptions {
}
// @public
export type FirmwareListGenerateCryptoCertificateListResponse = CryptoCertificateList;
export type FirmwaresListByWorkspaceNextResponse = FirmwareList;
// @public
export interface FirmwareListGenerateCryptoKeyListNextOptionalParams extends coreClient.OperationOptions {
export interface FirmwaresListByWorkspaceOptionalParams extends coreClient.OperationOptions {
}
// @public
export type FirmwareListGenerateCryptoKeyListNextResponse = CryptoKeyList;
export type FirmwaresListByWorkspaceResponse = FirmwareList;
// @public
export interface FirmwareListGenerateCryptoKeyListOptionalParams extends coreClient.OperationOptions {
}
// @public
export type FirmwareListGenerateCryptoKeyListResponse = CryptoKeyList;
// @public
export interface FirmwareListGenerateCveListNextOptionalParams extends coreClient.OperationOptions {
}
// @public
export type FirmwareListGenerateCveListNextResponse = CveList;
// @public
export interface FirmwareListGenerateCveListOptionalParams extends coreClient.OperationOptions {
}
// @public
export type FirmwareListGenerateCveListResponse = CveList;
// @public
export interface FirmwareListGeneratePasswordHashListNextOptionalParams extends coreClient.OperationOptions {
}
// @public
export type FirmwareListGeneratePasswordHashListNextResponse = PasswordHashList;
// @public
export interface FirmwareListGeneratePasswordHashListOptionalParams extends coreClient.OperationOptions {
}
// @public
export type FirmwareListGeneratePasswordHashListResponse = PasswordHashList;
// @public
export interface FirmwareOperations {
create(resourceGroupName: string, workspaceName: string, firmwareId: string, firmware: Firmware, options?: FirmwareCreateOptionalParams): Promise<FirmwareCreateResponse>;
delete(resourceGroupName: string, workspaceName: string, firmwareId: string, options?: FirmwareDeleteOptionalParams): Promise<void>;
generateBinaryHardeningDetails(resourceGroupName: string, workspaceName: string, firmwareId: string, options?: FirmwareGenerateBinaryHardeningDetailsOptionalParams): Promise<FirmwareGenerateBinaryHardeningDetailsResponse>;
generateBinaryHardeningSummary(resourceGroupName: string, workspaceName: string, firmwareId: string, options?: FirmwareGenerateBinaryHardeningSummaryOptionalParams): Promise<FirmwareGenerateBinaryHardeningSummaryResponse>;
generateComponentDetails(resourceGroupName: string, workspaceName: string, firmwareId: string, options?: FirmwareGenerateComponentDetailsOptionalParams): Promise<FirmwareGenerateComponentDetailsResponse>;
generateCryptoCertificateSummary(resourceGroupName: string, workspaceName: string, firmwareId: string, options?: FirmwareGenerateCryptoCertificateSummaryOptionalParams): Promise<FirmwareGenerateCryptoCertificateSummaryResponse>;
generateCryptoKeySummary(resourceGroupName: string, workspaceName: string, firmwareId: string, options?: FirmwareGenerateCryptoKeySummaryOptionalParams): Promise<FirmwareGenerateCryptoKeySummaryResponse>;
generateCveSummary(resourceGroupName: string, workspaceName: string, firmwareId: string, options?: FirmwareGenerateCveSummaryOptionalParams): Promise<FirmwareGenerateCveSummaryResponse>;
generateDownloadUrl(resourceGroupName: string, workspaceName: string, firmwareId: string, options?: FirmwareGenerateDownloadUrlOptionalParams): Promise<FirmwareGenerateDownloadUrlResponse>;
generateFilesystemDownloadUrl(resourceGroupName: string, workspaceName: string, firmwareId: string, options?: FirmwareGenerateFilesystemDownloadUrlOptionalParams): Promise<FirmwareGenerateFilesystemDownloadUrlResponse>;
generateSummary(resourceGroupName: string, workspaceName: string, firmwareId: string, options?: FirmwareGenerateSummaryOptionalParams): Promise<FirmwareGenerateSummaryResponse>;
get(resourceGroupName: string, workspaceName: string, firmwareId: string, options?: FirmwareGetOptionalParams): Promise<FirmwareGetResponse>;
listByWorkspace(resourceGroupName: string, workspaceName: string, options?: FirmwareListByWorkspaceOptionalParams): PagedAsyncIterableIterator<Firmware>;
listGenerateBinaryHardeningList(resourceGroupName: string, workspaceName: string, firmwareId: string, options?: FirmwareListGenerateBinaryHardeningListOptionalParams): PagedAsyncIterableIterator<BinaryHardening>;
listGenerateComponentList(resourceGroupName: string, workspaceName: string, firmwareId: string, options?: FirmwareListGenerateComponentListOptionalParams): PagedAsyncIterableIterator<Component>;
listGenerateCryptoCertificateList(resourceGroupName: string, workspaceName: string, firmwareId: string, options?: FirmwareListGenerateCryptoCertificateListOptionalParams): PagedAsyncIterableIterator<CryptoCertificate>;
listGenerateCryptoKeyList(resourceGroupName: string, workspaceName: string, firmwareId: string, options?: FirmwareListGenerateCryptoKeyListOptionalParams): PagedAsyncIterableIterator<CryptoKey_2>;
listGenerateCveList(resourceGroupName: string, workspaceName: string, firmwareId: string, options?: FirmwareListGenerateCveListOptionalParams): PagedAsyncIterableIterator<Cve>;
listGeneratePasswordHashList(resourceGroupName: string, workspaceName: string, firmwareId: string, options?: FirmwareListGeneratePasswordHashListOptionalParams): PagedAsyncIterableIterator<PasswordHash>;
update(resourceGroupName: string, workspaceName: string, firmwareId: string, firmware: FirmwareUpdateDefinition, options?: FirmwareUpdateOptionalParams): Promise<FirmwareUpdateResponse>;
}
// @public
export interface FirmwareSummary {
export interface FirmwareSummary extends SummaryResourceProperties {
analysisTimeSeconds?: number;
binaryCount?: number;
componentCount?: number;
@ -439,28 +380,21 @@ export interface FirmwareSummary {
extractedSize?: number;
fileSize?: number;
rootFileSystems?: number;
summaryType: "Firmware";
}
// @public
export interface FirmwaresUpdateOptionalParams extends coreClient.OperationOptions {
}
// @public
export type FirmwaresUpdateResponse = Firmware;
// @public
export interface FirmwareUpdateDefinition {
description?: string;
fileName?: string;
fileSize?: number;
model?: string;
readonly provisioningState?: ProvisioningState;
status?: Status;
statusMessages?: Record<string, unknown>[];
vendor?: string;
version?: string;
properties?: FirmwareProperties;
}
// @public
export interface FirmwareUpdateOptionalParams extends coreClient.OperationOptions {
}
// @public
export type FirmwareUpdateResponse = Firmware;
// @public
export interface GenerateUploadUrlRequest {
firmwareId?: string;
@ -477,12 +411,26 @@ export class IoTFirmwareDefenseClient extends coreClient.ServiceClient {
// (undocumented)
apiVersion: string;
// (undocumented)
firmwareOperations: FirmwareOperations;
binaryHardening: BinaryHardening;
// (undocumented)
cryptoCertificates: CryptoCertificates;
// (undocumented)
cryptoKeys: CryptoKeys;
// (undocumented)
cves: Cves;
// (undocumented)
firmwares: Firmwares;
// (undocumented)
operations: Operations;
// (undocumented)
passwordHashes: PasswordHashes;
// (undocumented)
sbomComponents: SbomComponents;
// (undocumented)
subscriptionId: string;
// (undocumented)
summaries: Summaries;
// (undocumented)
workspaces: Workspaces;
}
@ -493,32 +441,11 @@ export interface IoTFirmwareDefenseClientOptionalParams extends coreClient.Servi
endpoint?: string;
}
// @public
export type IsExpired = string;
// @public
export type IsSelfSigned = string;
// @public
export type IsShortKeySize = string;
// @public
export type IsUpdateAvailable = string;
// @public
export type IsWeakSignature = string;
// @public
export enum KnownActionType {
Internal = "Internal"
}
// @public
export enum KnownCanaryFlag {
False = "False",
True = "True"
}
// @public
export enum KnownCreatedByType {
Application = "Application",
@ -527,42 +454,6 @@ export enum KnownCreatedByType {
User = "User"
}
// @public
export enum KnownIsExpired {
False = "False",
True = "True"
}
// @public
export enum KnownIsSelfSigned {
False = "False",
True = "True"
}
// @public
export enum KnownIsShortKeySize {
False = "False",
True = "True"
}
// @public
export enum KnownIsUpdateAvailable {
False = "False",
True = "True"
}
// @public
export enum KnownIsWeakSignature {
False = "False",
True = "True"
}
// @public
export enum KnownNxFlag {
False = "False",
True = "True"
}
// @public
export enum KnownOrigin {
System = "system",
@ -570,12 +461,6 @@ export enum KnownOrigin {
UserSystem = "user,system"
}
// @public
export enum KnownPieFlag {
False = "False",
True = "True"
}
// @public
export enum KnownProvisioningState {
Accepted = "Accepted",
@ -584,12 +469,6 @@ export enum KnownProvisioningState {
Succeeded = "Succeeded"
}
// @public
export enum KnownRelroFlag {
False = "False",
True = "True"
}
// @public
export enum KnownStatus {
Analyzing = "Analyzing",
@ -600,13 +479,22 @@ export enum KnownStatus {
}
// @public
export enum KnownStrippedFlag {
False = "False",
True = "True"
export enum KnownSummaryName {
BinaryHardening = "BinaryHardening",
CryptoCertificate = "CryptoCertificate",
CryptoKey = "CryptoKey",
CVE = "CVE",
Firmware = "Firmware"
}
// @public
export type NxFlag = string;
export enum KnownSummaryType {
BinaryHardening = "BinaryHardening",
CryptoCertificate = "CryptoCertificate",
CryptoKey = "CryptoKey",
CVE = "CVE",
Firmware = "Firmware"
}
// @public
export interface Operation {
@ -655,7 +543,6 @@ export type Origin = string;
// @public
export interface PairedKey {
additionalProperties?: Record<string, unknown>;
id?: string;
type?: string;
}
@ -672,24 +559,38 @@ export interface PasswordHash {
}
// @public
export interface PasswordHashList {
nextLink?: string;
readonly value?: PasswordHash[];
export interface PasswordHashes {
listByFirmware(resourceGroupName: string, workspaceName: string, firmwareId: string, options?: PasswordHashesListByFirmwareOptionalParams): PagedAsyncIterableIterator<PasswordHashResource>;
}
// @public
export type PieFlag = string;
export interface PasswordHashesListByFirmwareNextOptionalParams extends coreClient.OperationOptions {
}
// @public
export type PasswordHashesListByFirmwareNextResponse = PasswordHashListResult;
// @public
export interface PasswordHashesListByFirmwareOptionalParams extends coreClient.OperationOptions {
}
// @public
export type PasswordHashesListByFirmwareResponse = PasswordHashListResult;
// @public
export interface PasswordHashListResult {
nextLink?: string;
readonly value?: PasswordHashResource[];
}
// @public
export interface PasswordHashResource extends Resource {
properties?: PasswordHash;
}
// @public
export type ProvisioningState = string;
// @public
export interface ProxyResource extends Resource {
}
// @public
export type RelroFlag = string;
// @public
export interface Resource {
readonly id?: string;
@ -698,11 +599,105 @@ export interface Resource {
readonly type?: string;
}
// @public
export interface SbomComponent {
componentId?: string;
componentName?: string;
filePaths?: string[];
license?: string;
version?: string;
}
// @public
export interface SbomComponentListResult {
nextLink?: string;
readonly value?: SbomComponentResource[];
}
// @public
export interface SbomComponentResource extends Resource {
properties?: SbomComponent;
}
// @public
export interface SbomComponents {
listByFirmware(resourceGroupName: string, workspaceName: string, firmwareId: string, options?: SbomComponentsListByFirmwareOptionalParams): PagedAsyncIterableIterator<SbomComponentResource>;
}
// @public
export interface SbomComponentsListByFirmwareNextOptionalParams extends coreClient.OperationOptions {
}
// @public
export type SbomComponentsListByFirmwareNextResponse = SbomComponentListResult;
// @public
export interface SbomComponentsListByFirmwareOptionalParams extends coreClient.OperationOptions {
}
// @public
export type SbomComponentsListByFirmwareResponse = SbomComponentListResult;
// @public
export type Status = string;
// @public
export type StrippedFlag = string;
export interface StatusMessage {
errorCode?: number;
message?: string;
}
// @public
export interface Summaries {
get(resourceGroupName: string, workspaceName: string, firmwareId: string, summaryName: SummaryName, options?: SummariesGetOptionalParams): Promise<SummariesGetResponse>;
listByFirmware(resourceGroupName: string, workspaceName: string, firmwareId: string, options?: SummariesListByFirmwareOptionalParams): PagedAsyncIterableIterator<SummaryResource>;
}
// @public
export interface SummariesGetOptionalParams extends coreClient.OperationOptions {
}
// @public
export type SummariesGetResponse = SummaryResource;
// @public
export interface SummariesListByFirmwareNextOptionalParams extends coreClient.OperationOptions {
}
// @public
export type SummariesListByFirmwareNextResponse = SummaryListResult;
// @public
export interface SummariesListByFirmwareOptionalParams extends coreClient.OperationOptions {
}
// @public
export type SummariesListByFirmwareResponse = SummaryListResult;
// @public
export interface SummaryListResult {
nextLink?: string;
readonly value?: SummaryResource[];
}
// @public
export type SummaryName = string;
// @public
export interface SummaryResource extends Resource {
readonly properties?: SummaryResourcePropertiesUnion;
}
// @public
export interface SummaryResourceProperties {
summaryType: "Firmware" | "CVE" | "BinaryHardening" | "CryptoCertificate" | "CryptoKey";
}
// @public (undocumented)
export type SummaryResourcePropertiesUnion = SummaryResourceProperties | FirmwareSummary | CveSummary | BinaryHardeningSummaryResource | CryptoCertificateSummaryResource | CryptoKeySummaryResource;
// @public
export type SummaryType = string;
// @public
export interface SystemData {
@ -724,13 +719,12 @@ export interface TrackedResource extends Resource {
// @public
export interface UrlToken {
readonly uploadUrl?: string;
readonly url?: string;
}
// @public
export interface Workspace extends TrackedResource {
readonly provisioningState?: ProvisioningState;
properties?: WorkspaceProperties;
}
// @public
@ -739,6 +733,11 @@ export interface WorkspaceList {
readonly value?: Workspace[];
}
// @public
export interface WorkspaceProperties {
readonly provisioningState?: ProvisioningState;
}
// @public
export interface Workspaces {
create(resourceGroupName: string, workspaceName: string, workspace: Workspace, options?: WorkspacesCreateOptionalParams): Promise<WorkspacesCreateResponse>;
@ -812,7 +811,7 @@ export type WorkspacesUpdateResponse = Workspace;
// @public
export interface WorkspaceUpdateDefinition {
readonly provisioningState?: ProvisioningState;
properties?: WorkspaceProperties;
}
// (No @packageDocumentation comment for this package)

Просмотреть файл

@ -15,26 +15,26 @@ import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to The operation to list all crypto keys for a firmware.
* This sample demonstrates how to Lists binary hardening analysis results of a firmware.
*
* @summary The operation to list all crypto keys for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateCryptoKeyList_MaximumSet_Gen.json
* @summary Lists binary hardening analysis results of a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/BinaryHardening_ListByFirmware_MaximumSet_Gen.json
*/
async function firmwareListGenerateCryptoKeyListMaximumSetGen() {
async function binaryHardeningListByFirmwareMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"C589E84A-5C11-4A25-9CF9-4E9C2F1EBFCA";
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "FirmwareAnalysisRG";
const workspaceName = "default";
const firmwareId = "DECAFBAD-0000-0000-0000-BADBADBADBAD";
const firmwareId = "109a9886-50bf-85a8-9d75-000000000000";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.firmwareOperations.listGenerateCryptoKeyList(
for await (let item of client.binaryHardening.listByFirmware(
resourceGroupName,
workspaceName,
firmwareId
firmwareId,
)) {
resArray.push(item);
}
@ -42,27 +42,26 @@ async function firmwareListGenerateCryptoKeyListMaximumSetGen() {
}
/**
* This sample demonstrates how to The operation to list all crypto keys for a firmware.
* This sample demonstrates how to Lists binary hardening analysis results of a firmware.
*
* @summary The operation to list all crypto keys for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateCryptoKeyList_MinimumSet_Gen.json
* @summary Lists binary hardening analysis results of a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/BinaryHardening_ListByFirmware_MinimumSet_Gen.json
*/
async function firmwareListGenerateCryptoKeyListMinimumSetGen() {
async function binaryHardeningListByFirmwareMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"C589E84A-5C11-4A25-9CF9-4E9C2F1EBFCA";
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] ||
"rgworkspaces-firmwares";
const workspaceName = "j5QE_";
const firmwareId = "wujtpcgypfpqseyrsebolarkspy";
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "FirmwareAnalysisRG";
const workspaceName = "default";
const firmwareId = "109a9886-50bf-85a8-9d75-000000000000";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.firmwareOperations.listGenerateCryptoKeyList(
for await (let item of client.binaryHardening.listByFirmware(
resourceGroupName,
workspaceName,
firmwareId
firmwareId,
)) {
resArray.push(item);
}
@ -70,8 +69,8 @@ async function firmwareListGenerateCryptoKeyListMinimumSetGen() {
}
async function main() {
firmwareListGenerateCryptoKeyListMaximumSetGen();
firmwareListGenerateCryptoKeyListMinimumSetGen();
binaryHardeningListByFirmwareMaximumSetGen();
binaryHardeningListByFirmwareMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -15,26 +15,26 @@ import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to The operation to list all crypto certificates for a firmware.
* This sample demonstrates how to Lists cryptographic certificate analysis results found in a firmware.
*
* @summary The operation to list all crypto certificates for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateCryptoCertificateList_MaximumSet_Gen.json
* @summary Lists cryptographic certificate analysis results found in a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/CryptoCertificates_ListByFirmware_MaximumSet_Gen.json
*/
async function firmwareListGenerateCryptoCertificateListMaximumSetGen() {
async function cryptoCertificatesListByFirmwareMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"C589E84A-5C11-4A25-9CF9-4E9C2F1EBFCA";
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "FirmwareAnalysisRG";
const workspaceName = "default";
const firmwareId = "DECAFBAD-0000-0000-0000-BADBADBADBAD";
const firmwareId = "109a9886-50bf-85a8-9d75-000000000000";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.firmwareOperations.listGenerateCryptoCertificateList(
for await (let item of client.cryptoCertificates.listByFirmware(
resourceGroupName,
workspaceName,
firmwareId
firmwareId,
)) {
resArray.push(item);
}
@ -42,27 +42,26 @@ async function firmwareListGenerateCryptoCertificateListMaximumSetGen() {
}
/**
* This sample demonstrates how to The operation to list all crypto certificates for a firmware.
* This sample demonstrates how to Lists cryptographic certificate analysis results found in a firmware.
*
* @summary The operation to list all crypto certificates for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateCryptoCertificateList_MinimumSet_Gen.json
* @summary Lists cryptographic certificate analysis results found in a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/CryptoCertificates_ListByFirmware_MinimumSet_Gen.json
*/
async function firmwareListGenerateCryptoCertificateListMinimumSetGen() {
async function cryptoCertificatesListByFirmwareMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"C589E84A-5C11-4A25-9CF9-4E9C2F1EBFCA";
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] ||
"rgworkspaces-firmwares";
const workspaceName = "j5QE_";
const firmwareId = "wujtpcgypfpqseyrsebolarkspy";
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "FirmwareAnalysisRG";
const workspaceName = "default";
const firmwareId = "109a9886-50bf-85a8-9d75-000000000000";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.firmwareOperations.listGenerateCryptoCertificateList(
for await (let item of client.cryptoCertificates.listByFirmware(
resourceGroupName,
workspaceName,
firmwareId
firmwareId,
)) {
resArray.push(item);
}
@ -70,8 +69,8 @@ async function firmwareListGenerateCryptoCertificateListMinimumSetGen() {
}
async function main() {
firmwareListGenerateCryptoCertificateListMaximumSetGen();
firmwareListGenerateCryptoCertificateListMinimumSetGen();
cryptoCertificatesListByFirmwareMaximumSetGen();
cryptoCertificatesListByFirmwareMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -15,26 +15,26 @@ import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to The operation to list all crypto keys for a firmware.
* This sample demonstrates how to Lists cryptographic key analysis results found in a firmware.
*
* @summary The operation to list all crypto keys for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateCryptoKeyList_MaximumSet_Gen.json
* @summary Lists cryptographic key analysis results found in a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/CryptoKeys_ListByFirmware_MaximumSet_Gen.json
*/
async function firmwareListGenerateCryptoKeyListMaximumSetGen() {
async function cryptoKeysListByFirmwareMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"C589E84A-5C11-4A25-9CF9-4E9C2F1EBFCA";
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "FirmwareAnalysisRG";
const workspaceName = "default";
const firmwareId = "DECAFBAD-0000-0000-0000-BADBADBADBAD";
const firmwareId = "109a9886-50bf-85a8-9d75-000000000000";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.firmwareOperations.listGenerateCryptoKeyList(
for await (let item of client.cryptoKeys.listByFirmware(
resourceGroupName,
workspaceName,
firmwareId
firmwareId,
)) {
resArray.push(item);
}
@ -42,27 +42,26 @@ async function firmwareListGenerateCryptoKeyListMaximumSetGen() {
}
/**
* This sample demonstrates how to The operation to list all crypto keys for a firmware.
* This sample demonstrates how to Lists cryptographic key analysis results found in a firmware.
*
* @summary The operation to list all crypto keys for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateCryptoKeyList_MinimumSet_Gen.json
* @summary Lists cryptographic key analysis results found in a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/CryptoKeys_ListByFirmware_MinimumSet_Gen.json
*/
async function firmwareListGenerateCryptoKeyListMinimumSetGen() {
async function cryptoKeysListByFirmwareMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"C589E84A-5C11-4A25-9CF9-4E9C2F1EBFCA";
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] ||
"rgworkspaces-firmwares";
const workspaceName = "j5QE_";
const firmwareId = "wujtpcgypfpqseyrsebolarkspy";
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "FirmwareAnalysisRG";
const workspaceName = "default";
const firmwareId = "109a9886-50bf-85a8-9d75-000000000000";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.firmwareOperations.listGenerateCryptoKeyList(
for await (let item of client.cryptoKeys.listByFirmware(
resourceGroupName,
workspaceName,
firmwareId
firmwareId,
)) {
resArray.push(item);
}
@ -70,8 +69,8 @@ async function firmwareListGenerateCryptoKeyListMinimumSetGen() {
}
async function main() {
firmwareListGenerateCryptoKeyListMaximumSetGen();
firmwareListGenerateCryptoKeyListMinimumSetGen();
cryptoKeysListByFirmwareMaximumSetGen();
cryptoKeysListByFirmwareMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,76 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { IoTFirmwareDefenseClient } from "@azure/arm-iotfirmwaredefense";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Lists CVE analysis results of a firmware.
*
* @summary Lists CVE analysis results of a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Cves_ListByFirmware_MaximumSet_Gen.json
*/
async function cvesListByFirmwareMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "FirmwareAnalysisRG";
const workspaceName = "default";
const firmwareId = "109a9886-50bf-85a8-9d75-000000000000";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.cves.listByFirmware(
resourceGroupName,
workspaceName,
firmwareId,
)) {
resArray.push(item);
}
console.log(resArray);
}
/**
* This sample demonstrates how to Lists CVE analysis results of a firmware.
*
* @summary Lists CVE analysis results of a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Cves_ListByFirmware_MinimumSet_Gen.json
*/
async function cvesListByFirmwareMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "FirmwareAnalysisRG";
const workspaceName = "default";
const firmwareId = "109a9886-50bf-85a8-9d75-000000000000";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.cves.listByFirmware(
resourceGroupName,
workspaceName,
firmwareId,
)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
cvesListByFirmwareMaximumSetGen();
cvesListByFirmwareMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -1,72 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { IoTFirmwareDefenseClient } from "@azure/arm-iotfirmwaredefense";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to The operation to get binary hardening details for a firmware.
*
* @summary The operation to get binary hardening details for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateBinaryHardeningDetails_MaximumSet_Gen.json
*/
async function firmwareGenerateBinaryHardeningDetailsMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] ||
"rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateBinaryHardeningDetails(
resourceGroupName,
workspaceName,
firmwareId
);
console.log(result);
}
/**
* This sample demonstrates how to The operation to get binary hardening details for a firmware.
*
* @summary The operation to get binary hardening details for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateBinaryHardeningDetails_MinimumSet_Gen.json
*/
async function firmwareGenerateBinaryHardeningDetailsMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] ||
"rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateBinaryHardeningDetails(
resourceGroupName,
workspaceName,
firmwareId
);
console.log(result);
}
async function main() {
firmwareGenerateBinaryHardeningDetailsMaximumSetGen();
firmwareGenerateBinaryHardeningDetailsMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -1,72 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { IoTFirmwareDefenseClient } from "@azure/arm-iotfirmwaredefense";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to The operation to list the binary hardening summary percentages for a firmware.
*
* @summary The operation to list the binary hardening summary percentages for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateBinaryHardeningSummary_MaximumSet_Gen.json
*/
async function firmwareGenerateBinaryHardeningSummaryMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] ||
"rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateBinaryHardeningSummary(
resourceGroupName,
workspaceName,
firmwareId
);
console.log(result);
}
/**
* This sample demonstrates how to The operation to list the binary hardening summary percentages for a firmware.
*
* @summary The operation to list the binary hardening summary percentages for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateBinaryHardeningSummary_MinimumSet_Gen.json
*/
async function firmwareGenerateBinaryHardeningSummaryMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] ||
"rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateBinaryHardeningSummary(
resourceGroupName,
workspaceName,
firmwareId
);
console.log(result);
}
async function main() {
firmwareGenerateBinaryHardeningSummaryMaximumSetGen();
firmwareGenerateBinaryHardeningSummaryMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -1,72 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { IoTFirmwareDefenseClient } from "@azure/arm-iotfirmwaredefense";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to The operation to get component details for a firmware.
*
* @summary The operation to get component details for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateComponentDetails_MaximumSet_Gen.json
*/
async function firmwareGenerateComponentDetailsMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] ||
"rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateComponentDetails(
resourceGroupName,
workspaceName,
firmwareId
);
console.log(result);
}
/**
* This sample demonstrates how to The operation to get component details for a firmware.
*
* @summary The operation to get component details for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateComponentDetails_MinimumSet_Gen.json
*/
async function firmwareGenerateComponentDetailsMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] ||
"rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateComponentDetails(
resourceGroupName,
workspaceName,
firmwareId
);
console.log(result);
}
async function main() {
firmwareGenerateComponentDetailsMaximumSetGen();
firmwareGenerateComponentDetailsMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -1,71 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { IoTFirmwareDefenseClient } from "@azure/arm-iotfirmwaredefense";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to The operation to provide a high level summary of the discovered cryptographic certificates reported for the firmware image.
*
* @summary The operation to provide a high level summary of the discovered cryptographic certificates reported for the firmware image.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateCryptoCertificateSummary_MaximumSet_Gen.json
*/
async function firmwareGenerateCryptoCertificateSummaryMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"C589E84A-5C11-4A25-9CF9-4E9C2F1EBFCA";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "FirmwareAnalysisRG";
const workspaceName = "default";
const firmwareId = "DECAFBAD-0000-0000-0000-BADBADBADBAD";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateCryptoCertificateSummary(
resourceGroupName,
workspaceName,
firmwareId
);
console.log(result);
}
/**
* This sample demonstrates how to The operation to provide a high level summary of the discovered cryptographic certificates reported for the firmware image.
*
* @summary The operation to provide a high level summary of the discovered cryptographic certificates reported for the firmware image.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateCryptoCertificateSummary_MinimumSet_Gen.json
*/
async function firmwareGenerateCryptoCertificateSummaryMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"C589E84A-5C11-4A25-9CF9-4E9C2F1EBFCA";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] ||
"rgworkspaces-firmwares";
const workspaceName = "j5QE_";
const firmwareId = "wujtpcgypfpqseyrsebolarkspy";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateCryptoCertificateSummary(
resourceGroupName,
workspaceName,
firmwareId
);
console.log(result);
}
async function main() {
firmwareGenerateCryptoCertificateSummaryMaximumSetGen();
firmwareGenerateCryptoCertificateSummaryMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -1,71 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { IoTFirmwareDefenseClient } from "@azure/arm-iotfirmwaredefense";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to The operation to provide a high level summary of the discovered cryptographic keys reported for the firmware image.
*
* @summary The operation to provide a high level summary of the discovered cryptographic keys reported for the firmware image.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateCryptoKeySummary_MaximumSet_Gen.json
*/
async function firmwareGenerateCryptoKeySummaryMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"C589E84A-5C11-4A25-9CF9-4E9C2F1EBFCA";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "FirmwareAnalysisRG";
const workspaceName = "default";
const firmwareId = "DECAFBAD-0000-0000-0000-BADBADBADBAD";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateCryptoKeySummary(
resourceGroupName,
workspaceName,
firmwareId
);
console.log(result);
}
/**
* This sample demonstrates how to The operation to provide a high level summary of the discovered cryptographic keys reported for the firmware image.
*
* @summary The operation to provide a high level summary of the discovered cryptographic keys reported for the firmware image.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateCryptoKeySummary_MinimumSet_Gen.json
*/
async function firmwareGenerateCryptoKeySummaryMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"C589E84A-5C11-4A25-9CF9-4E9C2F1EBFCA";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] ||
"rgworkspaces-firmwares";
const workspaceName = "j5QE_";
const firmwareId = "wujtpcgypfpqseyrsebolarkspy";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateCryptoKeySummary(
resourceGroupName,
workspaceName,
firmwareId
);
console.log(result);
}
async function main() {
firmwareGenerateCryptoKeySummaryMaximumSetGen();
firmwareGenerateCryptoKeySummaryMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -1,72 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { IoTFirmwareDefenseClient } from "@azure/arm-iotfirmwaredefense";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to The operation to provide a high level summary of the CVEs reported for the firmware image.
*
* @summary The operation to provide a high level summary of the CVEs reported for the firmware image.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateCveSummary_MaximumSet_Gen.json
*/
async function firmwareGenerateCveSummaryMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] ||
"rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateCveSummary(
resourceGroupName,
workspaceName,
firmwareId
);
console.log(result);
}
/**
* This sample demonstrates how to The operation to provide a high level summary of the CVEs reported for the firmware image.
*
* @summary The operation to provide a high level summary of the CVEs reported for the firmware image.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateCveSummary_MinimumSet_Gen.json
*/
async function firmwareGenerateCveSummaryMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] ||
"rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateCveSummary(
resourceGroupName,
workspaceName,
firmwareId
);
console.log(result);
}
async function main() {
firmwareGenerateCveSummaryMaximumSetGen();
firmwareGenerateCveSummaryMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -1,78 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { IoTFirmwareDefenseClient } from "@azure/arm-iotfirmwaredefense";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to The operation to list all binary hardening result for a firmware.
*
* @summary The operation to list all binary hardening result for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateBinaryHardeningList_MaximumSet_Gen.json
*/
async function firmwareListGenerateBinaryHardeningListMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] ||
"rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.firmwareOperations.listGenerateBinaryHardeningList(
resourceGroupName,
workspaceName,
firmwareId
)) {
resArray.push(item);
}
console.log(resArray);
}
/**
* This sample demonstrates how to The operation to list all binary hardening result for a firmware.
*
* @summary The operation to list all binary hardening result for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateBinaryHardeningList_MinimumSet_Gen.json
*/
async function firmwareListGenerateBinaryHardeningListMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] ||
"rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.firmwareOperations.listGenerateBinaryHardeningList(
resourceGroupName,
workspaceName,
firmwareId
)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
firmwareListGenerateBinaryHardeningListMaximumSetGen();
firmwareListGenerateBinaryHardeningListMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -1,78 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { IoTFirmwareDefenseClient } from "@azure/arm-iotfirmwaredefense";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to The operation to list all components result for a firmware.
*
* @summary The operation to list all components result for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateComponentList_MaximumSet_Gen.json
*/
async function firmwareListGenerateComponentListMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] ||
"rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.firmwareOperations.listGenerateComponentList(
resourceGroupName,
workspaceName,
firmwareId
)) {
resArray.push(item);
}
console.log(resArray);
}
/**
* This sample demonstrates how to The operation to list all components result for a firmware.
*
* @summary The operation to list all components result for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateComponentList_MinimumSet_Gen.json
*/
async function firmwareListGenerateComponentListMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] ||
"rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.firmwareOperations.listGenerateComponentList(
resourceGroupName,
workspaceName,
firmwareId
)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
firmwareListGenerateComponentListMaximumSetGen();
firmwareListGenerateComponentListMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -1,78 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { IoTFirmwareDefenseClient } from "@azure/arm-iotfirmwaredefense";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to The operation to list all cve results for a firmware.
*
* @summary The operation to list all cve results for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateCveList_MaximumSet_Gen.json
*/
async function firmwareListGenerateCveListMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] ||
"rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.firmwareOperations.listGenerateCveList(
resourceGroupName,
workspaceName,
firmwareId
)) {
resArray.push(item);
}
console.log(resArray);
}
/**
* This sample demonstrates how to The operation to list all cve results for a firmware.
*
* @summary The operation to list all cve results for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateCveList_MinimumSet_Gen.json
*/
async function firmwareListGenerateCveListMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] ||
"rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.firmwareOperations.listGenerateCveList(
resourceGroupName,
workspaceName,
firmwareId
)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
firmwareListGenerateCveListMaximumSetGen();
firmwareListGenerateCveListMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -1,78 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { IoTFirmwareDefenseClient } from "@azure/arm-iotfirmwaredefense";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to The operation to list all password hashes for a firmware.
*
* @summary The operation to list all password hashes for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGeneratePasswordHashList_MaximumSet_Gen.json
*/
async function firmwareListGeneratePasswordHashListMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] ||
"rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.firmwareOperations.listGeneratePasswordHashList(
resourceGroupName,
workspaceName,
firmwareId
)) {
resArray.push(item);
}
console.log(resArray);
}
/**
* This sample demonstrates how to The operation to list all password hashes for a firmware.
*
* @summary The operation to list all password hashes for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGeneratePasswordHashList_MinimumSet_Gen.json
*/
async function firmwareListGeneratePasswordHashListMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] ||
"rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.firmwareOperations.listGeneratePasswordHashList(
resourceGroupName,
workspaceName,
firmwareId
)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
firmwareListGeneratePasswordHashListMaximumSetGen();
firmwareListGeneratePasswordHashListMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -10,7 +10,7 @@
// Licensed under the MIT License.
import {
Firmware,
IoTFirmwareDefenseClient
IoTFirmwareDefenseClient,
} from "@azure/arm-iotfirmwaredefense";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
@ -21,9 +21,9 @@ dotenv.config();
* This sample demonstrates how to The operation to create a firmware.
*
* @summary The operation to create a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_Create_MaximumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_Create_MaximumSet_Gen.json
*/
async function firmwareCreateMaximumSetGen() {
async function firmwaresCreateMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
@ -33,6 +33,7 @@ async function firmwareCreateMaximumSetGen() {
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const firmware: Firmware = {
properties: {
description: "uz",
fileName: "wresexxulcdsdd",
fileSize: 17,
@ -40,15 +41,16 @@ async function firmwareCreateMaximumSetGen() {
status: "Pending",
statusMessages: [{ message: "ulvhmhokezathzzauiitu" }],
vendor: "vycmdhgtmepcptyoubztiuudpkcpd",
version: "s"
version: "s",
},
};
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.create(
const result = await client.firmwares.create(
resourceGroupName,
workspaceName,
firmwareId,
firmware
firmware,
);
console.log(result);
}
@ -57,9 +59,9 @@ async function firmwareCreateMaximumSetGen() {
* This sample demonstrates how to The operation to create a firmware.
*
* @summary The operation to create a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_Create_MinimumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_Create_MinimumSet_Gen.json
*/
async function firmwareCreateMinimumSetGen() {
async function firmwaresCreateMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
@ -71,18 +73,18 @@ async function firmwareCreateMinimumSetGen() {
const firmware: Firmware = {};
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.create(
const result = await client.firmwares.create(
resourceGroupName,
workspaceName,
firmwareId,
firmware
firmware,
);
console.log(result);
}
async function main() {
firmwareCreateMaximumSetGen();
firmwareCreateMinimumSetGen();
firmwaresCreateMaximumSetGen();
firmwaresCreateMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -18,9 +18,9 @@ dotenv.config();
* This sample demonstrates how to The operation to delete a firmware.
*
* @summary The operation to delete a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_Delete_MaximumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_Delete_MaximumSet_Gen.json
*/
async function firmwareDeleteMaximumSetGen() {
async function firmwaresDeleteMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
@ -31,10 +31,10 @@ async function firmwareDeleteMaximumSetGen() {
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.delete(
const result = await client.firmwares.delete(
resourceGroupName,
workspaceName,
firmwareId
firmwareId,
);
console.log(result);
}
@ -43,9 +43,9 @@ async function firmwareDeleteMaximumSetGen() {
* This sample demonstrates how to The operation to delete a firmware.
*
* @summary The operation to delete a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_Delete_MinimumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_Delete_MinimumSet_Gen.json
*/
async function firmwareDeleteMinimumSetGen() {
async function firmwaresDeleteMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
@ -56,17 +56,17 @@ async function firmwareDeleteMinimumSetGen() {
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.delete(
const result = await client.firmwares.delete(
resourceGroupName,
workspaceName,
firmwareId
firmwareId,
);
console.log(result);
}
async function main() {
firmwareDeleteMaximumSetGen();
firmwareDeleteMinimumSetGen();
firmwaresDeleteMaximumSetGen();
firmwaresDeleteMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -18,9 +18,9 @@ dotenv.config();
* This sample demonstrates how to The operation to a url for file download.
*
* @summary The operation to a url for file download.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateDownloadUrl_MaximumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_GenerateDownloadUrl_MaximumSet_Gen.json
*/
async function firmwareGenerateDownloadUrlMaximumSetGen() {
async function firmwaresGenerateDownloadUrlMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
@ -31,10 +31,10 @@ async function firmwareGenerateDownloadUrlMaximumSetGen() {
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateDownloadUrl(
const result = await client.firmwares.generateDownloadUrl(
resourceGroupName,
workspaceName,
firmwareId
firmwareId,
);
console.log(result);
}
@ -43,9 +43,9 @@ async function firmwareGenerateDownloadUrlMaximumSetGen() {
* This sample demonstrates how to The operation to a url for file download.
*
* @summary The operation to a url for file download.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateDownloadUrl_MinimumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_GenerateDownloadUrl_MinimumSet_Gen.json
*/
async function firmwareGenerateDownloadUrlMinimumSetGen() {
async function firmwaresGenerateDownloadUrlMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
@ -56,17 +56,17 @@ async function firmwareGenerateDownloadUrlMinimumSetGen() {
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateDownloadUrl(
const result = await client.firmwares.generateDownloadUrl(
resourceGroupName,
workspaceName,
firmwareId
firmwareId,
);
console.log(result);
}
async function main() {
firmwareGenerateDownloadUrlMaximumSetGen();
firmwareGenerateDownloadUrlMinimumSetGen();
firmwaresGenerateDownloadUrlMaximumSetGen();
firmwaresGenerateDownloadUrlMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -18,9 +18,9 @@ dotenv.config();
* This sample demonstrates how to The operation to a url for tar file download.
*
* @summary The operation to a url for tar file download.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateFilesystemDownloadUrl_MaximumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_GenerateFilesystemDownloadUrl_MaximumSet_Gen.json
*/
async function firmwareGenerateFilesystemDownloadUrlMaximumSetGen() {
async function firmwaresGenerateFilesystemDownloadUrlMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
@ -31,10 +31,10 @@ async function firmwareGenerateFilesystemDownloadUrlMaximumSetGen() {
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateFilesystemDownloadUrl(
const result = await client.firmwares.generateFilesystemDownloadUrl(
resourceGroupName,
workspaceName,
firmwareId
firmwareId,
);
console.log(result);
}
@ -43,9 +43,9 @@ async function firmwareGenerateFilesystemDownloadUrlMaximumSetGen() {
* This sample demonstrates how to The operation to a url for tar file download.
*
* @summary The operation to a url for tar file download.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateFilesystemDownloadUrl_MinimumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_GenerateFilesystemDownloadUrl_MinimumSet_Gen.json
*/
async function firmwareGenerateFilesystemDownloadUrlMinimumSetGen() {
async function firmwaresGenerateFilesystemDownloadUrlMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
@ -56,17 +56,17 @@ async function firmwareGenerateFilesystemDownloadUrlMinimumSetGen() {
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateFilesystemDownloadUrl(
const result = await client.firmwares.generateFilesystemDownloadUrl(
resourceGroupName,
workspaceName,
firmwareId
firmwareId,
);
console.log(result);
}
async function main() {
firmwareGenerateFilesystemDownloadUrlMaximumSetGen();
firmwareGenerateFilesystemDownloadUrlMinimumSetGen();
firmwaresGenerateFilesystemDownloadUrlMaximumSetGen();
firmwaresGenerateFilesystemDownloadUrlMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -18,9 +18,9 @@ dotenv.config();
* This sample demonstrates how to Get firmware.
*
* @summary Get firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_Get_MaximumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_Get_MaximumSet_Gen.json
*/
async function firmwareGetMaximumSetGen() {
async function firmwaresGetMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
@ -31,10 +31,10 @@ async function firmwareGetMaximumSetGen() {
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.get(
const result = await client.firmwares.get(
resourceGroupName,
workspaceName,
firmwareId
firmwareId,
);
console.log(result);
}
@ -43,9 +43,9 @@ async function firmwareGetMaximumSetGen() {
* This sample demonstrates how to Get firmware.
*
* @summary Get firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_Get_MinimumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_Get_MinimumSet_Gen.json
*/
async function firmwareGetMinimumSetGen() {
async function firmwaresGetMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
@ -56,17 +56,17 @@ async function firmwareGetMinimumSetGen() {
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.get(
const result = await client.firmwares.get(
resourceGroupName,
workspaceName,
firmwareId
firmwareId,
);
console.log(result);
}
async function main() {
firmwareGetMaximumSetGen();
firmwareGetMinimumSetGen();
firmwaresGetMaximumSetGen();
firmwaresGetMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -18,9 +18,9 @@ dotenv.config();
* This sample demonstrates how to Lists all of firmwares inside a workspace.
*
* @summary Lists all of firmwares inside a workspace.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListByWorkspace_MaximumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_ListByWorkspace_MaximumSet_Gen.json
*/
async function firmwareListByWorkspaceMaximumSetGen() {
async function firmwaresListByWorkspaceMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
@ -31,9 +31,9 @@ async function firmwareListByWorkspaceMaximumSetGen() {
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.firmwareOperations.listByWorkspace(
for await (let item of client.firmwares.listByWorkspace(
resourceGroupName,
workspaceName
workspaceName,
)) {
resArray.push(item);
}
@ -44,9 +44,9 @@ async function firmwareListByWorkspaceMaximumSetGen() {
* This sample demonstrates how to Lists all of firmwares inside a workspace.
*
* @summary Lists all of firmwares inside a workspace.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListByWorkspace_MinimumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_ListByWorkspace_MinimumSet_Gen.json
*/
async function firmwareListByWorkspaceMinimumSetGen() {
async function firmwaresListByWorkspaceMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
@ -57,9 +57,9 @@ async function firmwareListByWorkspaceMinimumSetGen() {
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.firmwareOperations.listByWorkspace(
for await (let item of client.firmwares.listByWorkspace(
resourceGroupName,
workspaceName
workspaceName,
)) {
resArray.push(item);
}
@ -67,8 +67,8 @@ async function firmwareListByWorkspaceMinimumSetGen() {
}
async function main() {
firmwareListByWorkspaceMaximumSetGen();
firmwareListByWorkspaceMinimumSetGen();
firmwaresListByWorkspaceMaximumSetGen();
firmwaresListByWorkspaceMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -10,7 +10,7 @@
// Licensed under the MIT License.
import {
FirmwareUpdateDefinition,
IoTFirmwareDefenseClient
IoTFirmwareDefenseClient,
} from "@azure/arm-iotfirmwaredefense";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
@ -21,9 +21,9 @@ dotenv.config();
* This sample demonstrates how to The operation to update firmware.
*
* @summary The operation to update firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_Update_MaximumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_Update_MaximumSet_Gen.json
*/
async function firmwareUpdateMaximumSetGen() {
async function firmwaresUpdateMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
@ -33,6 +33,7 @@ async function firmwareUpdateMaximumSetGen() {
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const firmware: FirmwareUpdateDefinition = {
properties: {
description: "uz",
fileName: "wresexxulcdsdd",
fileSize: 17,
@ -40,15 +41,16 @@ async function firmwareUpdateMaximumSetGen() {
status: "Pending",
statusMessages: [{ message: "ulvhmhokezathzzauiitu" }],
vendor: "vycmdhgtmepcptyoubztiuudpkcpd",
version: "s"
version: "s",
},
};
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.update(
const result = await client.firmwares.update(
resourceGroupName,
workspaceName,
firmwareId,
firmware
firmware,
);
console.log(result);
}
@ -57,9 +59,9 @@ async function firmwareUpdateMaximumSetGen() {
* This sample demonstrates how to The operation to update firmware.
*
* @summary The operation to update firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_Update_MinimumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_Update_MinimumSet_Gen.json
*/
async function firmwareUpdateMinimumSetGen() {
async function firmwaresUpdateMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
@ -71,18 +73,18 @@ async function firmwareUpdateMinimumSetGen() {
const firmware: FirmwareUpdateDefinition = {};
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.update(
const result = await client.firmwares.update(
resourceGroupName,
workspaceName,
firmwareId,
firmware
firmware,
);
console.log(result);
}
async function main() {
firmwareUpdateMaximumSetGen();
firmwareUpdateMinimumSetGen();
firmwaresUpdateMaximumSetGen();
firmwaresUpdateMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to Lists the operations for this resource provider
*
* @summary Lists the operations for this resource provider
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Operations_List_MaximumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Operations_List_MaximumSet_Gen.json
*/
async function operationsListMaximumSetGen() {
const subscriptionId =
@ -37,7 +37,7 @@ async function operationsListMaximumSetGen() {
* This sample demonstrates how to Lists the operations for this resource provider
*
* @summary Lists the operations for this resource provider
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Operations_List_MinimumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Operations_List_MinimumSet_Gen.json
*/
async function operationsListMinimumSetGen() {
const subscriptionId =

Просмотреть файл

@ -0,0 +1,76 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { IoTFirmwareDefenseClient } from "@azure/arm-iotfirmwaredefense";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Lists password hash analysis results of a firmware.
*
* @summary Lists password hash analysis results of a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/PasswordHashes_ListByFirmware_MaximumSet_Gen.json
*/
async function passwordHashesListByFirmwareMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "FirmwareAnalysisRG";
const workspaceName = "default";
const firmwareId = "109a9886-50bf-85a8-9d75-000000000000";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.passwordHashes.listByFirmware(
resourceGroupName,
workspaceName,
firmwareId,
)) {
resArray.push(item);
}
console.log(resArray);
}
/**
* This sample demonstrates how to Lists password hash analysis results of a firmware.
*
* @summary Lists password hash analysis results of a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/PasswordHashes_ListByFirmware_MinimumSet_Gen.json
*/
async function passwordHashesListByFirmwareMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "FirmwareAnalysisRG";
const workspaceName = "default";
const firmwareId = "109a9886-50bf-85a8-9d75-000000000000";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.passwordHashes.listByFirmware(
resourceGroupName,
workspaceName,
firmwareId,
)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
passwordHashesListByFirmwareMaximumSetGen();
passwordHashesListByFirmwareMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,76 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { IoTFirmwareDefenseClient } from "@azure/arm-iotfirmwaredefense";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Lists SBOM analysis results of a firmware.
*
* @summary Lists SBOM analysis results of a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/SbomComponents_ListByFirmware_MaximumSet_Gen.json
*/
async function sbomComponentsListByFirmwareMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "FirmwareAnalysisRG";
const workspaceName = "default";
const firmwareId = "109a9886-50bf-85a8-9d75-000000000000";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.sbomComponents.listByFirmware(
resourceGroupName,
workspaceName,
firmwareId,
)) {
resArray.push(item);
}
console.log(resArray);
}
/**
* This sample demonstrates how to Lists SBOM analysis results of a firmware.
*
* @summary Lists SBOM analysis results of a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/SbomComponents_ListByFirmware_MinimumSet_Gen.json
*/
async function sbomComponentsListByFirmwareMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "FirmwareAnalysisRG";
const workspaceName = "default";
const firmwareId = "109a9886-50bf-85a8-9d75-000000000000";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.sbomComponents.listByFirmware(
resourceGroupName,
workspaceName,
firmwareId,
)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
sbomComponentsListByFirmwareMaximumSetGen();
sbomComponentsListByFirmwareMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -15,58 +15,60 @@ import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to The operation to get a scan summary.
* This sample demonstrates how to Get an analysis result summary of a firmware by name.
*
* @summary The operation to get a scan summary.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateSummary_MaximumSet_Gen.json
* @summary Get an analysis result summary of a firmware by name.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Summaries_Get_MaximumSet_Gen.json
*/
async function firmwareGenerateSummaryMaximumSetGen() {
async function summariesGetMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] ||
"rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "FirmwareAnalysisRG";
const workspaceName = "default";
const firmwareId = "109a9886-50bf-85a8-9d75-000000000000";
const summaryName = "Firmware";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateSummary(
const result = await client.summaries.get(
resourceGroupName,
workspaceName,
firmwareId
firmwareId,
summaryName,
);
console.log(result);
}
/**
* This sample demonstrates how to The operation to get a scan summary.
* This sample demonstrates how to Get an analysis result summary of a firmware by name.
*
* @summary The operation to get a scan summary.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateSummary_MinimumSet_Gen.json
* @summary Get an analysis result summary of a firmware by name.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Summaries_Get_MinimumSet_Gen.json
*/
async function firmwareGenerateSummaryMinimumSetGen() {
async function summariesGetMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] ||
"rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "FirmwareAnalysisRG";
const workspaceName = "default";
const firmwareId = "109a9886-50bf-85a8-9d75-000000000000";
const summaryName = "Firmware";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateSummary(
const result = await client.summaries.get(
resourceGroupName,
workspaceName,
firmwareId
firmwareId,
summaryName,
);
console.log(result);
}
async function main() {
firmwareGenerateSummaryMaximumSetGen();
firmwareGenerateSummaryMinimumSetGen();
summariesGetMaximumSetGen();
summariesGetMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,76 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { IoTFirmwareDefenseClient } from "@azure/arm-iotfirmwaredefense";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Lists analysis result summary names of a firmware. To fetch the full summary data, get that summary by name.
*
* @summary Lists analysis result summary names of a firmware. To fetch the full summary data, get that summary by name.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Summaries_ListByFirmware_MaximumSet_Gen.json
*/
async function summariesListByFirmwareMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "FirmwareAnalysisRG";
const workspaceName = "default";
const firmwareId = "109a9886-50bf-85a8-9d75-000000000000";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.summaries.listByFirmware(
resourceGroupName,
workspaceName,
firmwareId,
)) {
resArray.push(item);
}
console.log(resArray);
}
/**
* This sample demonstrates how to Lists analysis result summary names of a firmware. To fetch the full summary data, get that summary by name.
*
* @summary Lists analysis result summary names of a firmware. To fetch the full summary data, get that summary by name.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Summaries_ListByFirmware_MinimumSet_Gen.json
*/
async function summariesListByFirmwareMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "FirmwareAnalysisRG";
const workspaceName = "default";
const firmwareId = "109a9886-50bf-85a8-9d75-000000000000";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.summaries.listByFirmware(
resourceGroupName,
workspaceName,
firmwareId,
)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
summariesListByFirmwareMaximumSetGen();
summariesListByFirmwareMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -10,7 +10,7 @@
// Licensed under the MIT License.
import {
Workspace,
IoTFirmwareDefenseClient
IoTFirmwareDefenseClient,
} from "@azure/arm-iotfirmwaredefense";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
@ -21,7 +21,7 @@ dotenv.config();
* This sample demonstrates how to The operation to create or update a firmware analysis workspace.
*
* @summary The operation to create or update a firmware analysis workspace.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_Create_MaximumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_Create_MaximumSet_Gen.json
*/
async function workspacesCreateMaximumSetGen() {
const subscriptionId =
@ -32,14 +32,15 @@ async function workspacesCreateMaximumSetGen() {
const workspaceName = "E___-3";
const workspace: Workspace = {
location: "jjwbseilitjgdrhbvvkwviqj",
tags: { key450: "rzqqumbpfsbibnpirsm" }
properties: {},
tags: { key450: "rzqqumbpfsbibnpirsm" },
};
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.workspaces.create(
resourceGroupName,
workspaceName,
workspace
workspace,
);
console.log(result);
}
@ -48,7 +49,7 @@ async function workspacesCreateMaximumSetGen() {
* This sample demonstrates how to The operation to create or update a firmware analysis workspace.
*
* @summary The operation to create or update a firmware analysis workspace.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_Create_MinimumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_Create_MinimumSet_Gen.json
*/
async function workspacesCreateMinimumSetGen() {
const subscriptionId =
@ -63,7 +64,7 @@ async function workspacesCreateMinimumSetGen() {
const result = await client.workspaces.create(
resourceGroupName,
workspaceName,
workspace
workspace,
);
console.log(result);
}

Просмотреть файл

@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to The operation to delete a firmware analysis workspace.
*
* @summary The operation to delete a firmware analysis workspace.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_Delete_MaximumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_Delete_MaximumSet_Gen.json
*/
async function workspacesDeleteMaximumSetGen() {
const subscriptionId =
@ -31,7 +31,7 @@ async function workspacesDeleteMaximumSetGen() {
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.workspaces.delete(
resourceGroupName,
workspaceName
workspaceName,
);
console.log(result);
}
@ -40,7 +40,7 @@ async function workspacesDeleteMaximumSetGen() {
* This sample demonstrates how to The operation to delete a firmware analysis workspace.
*
* @summary The operation to delete a firmware analysis workspace.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_Delete_MinimumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_Delete_MinimumSet_Gen.json
*/
async function workspacesDeleteMinimumSetGen() {
const subscriptionId =
@ -53,7 +53,7 @@ async function workspacesDeleteMinimumSetGen() {
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.workspaces.delete(
resourceGroupName,
workspaceName
workspaceName,
);
console.log(result);
}

Просмотреть файл

@ -10,7 +10,7 @@
// Licensed under the MIT License.
import {
GenerateUploadUrlRequest,
IoTFirmwareDefenseClient
IoTFirmwareDefenseClient,
} from "@azure/arm-iotfirmwaredefense";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
@ -21,7 +21,7 @@ dotenv.config();
* This sample demonstrates how to The operation to get a url for file upload.
*
* @summary The operation to get a url for file upload.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_GenerateUploadUrl_MaximumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_GenerateUploadUrl_MaximumSet_Gen.json
*/
async function workspacesGenerateUploadUrlMaximumSetGen() {
const subscriptionId =
@ -31,14 +31,14 @@ async function workspacesGenerateUploadUrlMaximumSetGen() {
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "rgworkspaces";
const workspaceName = "E___-3";
const generateUploadUrl: GenerateUploadUrlRequest = {
firmwareId: "ytsfprbywi"
firmwareId: "ytsfprbywi",
};
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.workspaces.generateUploadUrl(
resourceGroupName,
workspaceName,
generateUploadUrl
generateUploadUrl,
);
console.log(result);
}
@ -47,7 +47,7 @@ async function workspacesGenerateUploadUrlMaximumSetGen() {
* This sample demonstrates how to The operation to get a url for file upload.
*
* @summary The operation to get a url for file upload.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_GenerateUploadUrl_MinimumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_GenerateUploadUrl_MinimumSet_Gen.json
*/
async function workspacesGenerateUploadUrlMinimumSetGen() {
const subscriptionId =
@ -62,7 +62,7 @@ async function workspacesGenerateUploadUrlMinimumSetGen() {
const result = await client.workspaces.generateUploadUrl(
resourceGroupName,
workspaceName,
generateUploadUrl
generateUploadUrl,
);
console.log(result);
}

Просмотреть файл

@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to Get firmware analysis workspace.
*
* @summary Get firmware analysis workspace.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_Get_MaximumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_Get_MaximumSet_Gen.json
*/
async function workspacesGetMaximumSetGen() {
const subscriptionId =
@ -37,7 +37,7 @@ async function workspacesGetMaximumSetGen() {
* This sample demonstrates how to Get firmware analysis workspace.
*
* @summary Get firmware analysis workspace.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_Get_MinimumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_Get_MinimumSet_Gen.json
*/
async function workspacesGetMinimumSetGen() {
const subscriptionId =

Просмотреть файл

@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to Lists all of the firmware analysis workspaces in the specified resource group.
*
* @summary Lists all of the firmware analysis workspaces in the specified resource group.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_ListByResourceGroup_MaximumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_ListByResourceGroup_MaximumSet_Gen.json
*/
async function workspacesListByResourceGroupMaximumSetGen() {
const subscriptionId =
@ -30,7 +30,7 @@ async function workspacesListByResourceGroupMaximumSetGen() {
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.workspaces.listByResourceGroup(
resourceGroupName
resourceGroupName,
)) {
resArray.push(item);
}
@ -41,7 +41,7 @@ async function workspacesListByResourceGroupMaximumSetGen() {
* This sample demonstrates how to Lists all of the firmware analysis workspaces in the specified resource group.
*
* @summary Lists all of the firmware analysis workspaces in the specified resource group.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_ListByResourceGroup_MinimumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_ListByResourceGroup_MinimumSet_Gen.json
*/
async function workspacesListByResourceGroupMinimumSetGen() {
const subscriptionId =
@ -53,7 +53,7 @@ async function workspacesListByResourceGroupMinimumSetGen() {
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.workspaces.listByResourceGroup(
resourceGroupName
resourceGroupName,
)) {
resArray.push(item);
}

Просмотреть файл

@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to Lists all of the firmware analysis workspaces in the specified subscription.
*
* @summary Lists all of the firmware analysis workspaces in the specified subscription.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_ListBySubscription_MaximumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_ListBySubscription_MaximumSet_Gen.json
*/
async function workspacesListBySubscriptionMaximumSetGen() {
const subscriptionId =
@ -37,7 +37,7 @@ async function workspacesListBySubscriptionMaximumSetGen() {
* This sample demonstrates how to Lists all of the firmware analysis workspaces in the specified subscription.
*
* @summary Lists all of the firmware analysis workspaces in the specified subscription.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_ListBySubscription_MinimumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_ListBySubscription_MinimumSet_Gen.json
*/
async function workspacesListBySubscriptionMinimumSetGen() {
const subscriptionId =

Просмотреть файл

@ -10,7 +10,7 @@
// Licensed under the MIT License.
import {
WorkspaceUpdateDefinition,
IoTFirmwareDefenseClient
IoTFirmwareDefenseClient,
} from "@azure/arm-iotfirmwaredefense";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
@ -21,7 +21,7 @@ dotenv.config();
* This sample demonstrates how to The operation to update a firmware analysis workspaces.
*
* @summary The operation to update a firmware analysis workspaces.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_Update_MaximumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_Update_MaximumSet_Gen.json
*/
async function workspacesUpdateMaximumSetGen() {
const subscriptionId =
@ -30,13 +30,13 @@ async function workspacesUpdateMaximumSetGen() {
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "rgworkspaces";
const workspaceName = "E___-3";
const workspace: WorkspaceUpdateDefinition = {};
const workspace: WorkspaceUpdateDefinition = { properties: {} };
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.workspaces.update(
resourceGroupName,
workspaceName,
workspace
workspace,
);
console.log(result);
}
@ -45,7 +45,7 @@ async function workspacesUpdateMaximumSetGen() {
* This sample demonstrates how to The operation to update a firmware analysis workspaces.
*
* @summary The operation to update a firmware analysis workspaces.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_Update_MinimumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_Update_MinimumSet_Gen.json
*/
async function workspacesUpdateMinimumSetGen() {
const subscriptionId =
@ -60,7 +60,7 @@ async function workspacesUpdateMinimumSetGen() {
const result = await client.workspaces.update(
resourceGroupName,
workspaceName,
workspace
workspace,
);
console.log(result);
}

Просмотреть файл

@ -1,104 +0,0 @@
# client library samples for JavaScript (Beta)
These sample programs show how to use the JavaScript client libraries for in some common scenarios.
| **File Name** | **Description** |
| ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [firmwareCreateSample.js][firmwarecreatesample] | The operation to create a firmware. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_Create_MaximumSet_Gen.json |
| [firmwareDeleteSample.js][firmwaredeletesample] | The operation to delete a firmware. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_Delete_MaximumSet_Gen.json |
| [firmwareGenerateBinaryHardeningDetailsSample.js][firmwaregeneratebinaryhardeningdetailssample] | The operation to get binary hardening details for a firmware. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateBinaryHardeningDetails_MaximumSet_Gen.json |
| [firmwareGenerateBinaryHardeningSummarySample.js][firmwaregeneratebinaryhardeningsummarysample] | The operation to list the binary hardening summary percentages for a firmware. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateBinaryHardeningSummary_MaximumSet_Gen.json |
| [firmwareGenerateComponentDetailsSample.js][firmwaregeneratecomponentdetailssample] | The operation to get component details for a firmware. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateComponentDetails_MaximumSet_Gen.json |
| [firmwareGenerateCryptoCertificateSummarySample.js][firmwaregeneratecryptocertificatesummarysample] | The operation to provide a high level summary of the discovered cryptographic certificates reported for the firmware image. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateCryptoCertificateSummary_MaximumSet_Gen.json |
| [firmwareGenerateCryptoKeySummarySample.js][firmwaregeneratecryptokeysummarysample] | The operation to provide a high level summary of the discovered cryptographic keys reported for the firmware image. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateCryptoKeySummary_MaximumSet_Gen.json |
| [firmwareGenerateCveSummarySample.js][firmwaregeneratecvesummarysample] | The operation to provide a high level summary of the CVEs reported for the firmware image. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateCveSummary_MaximumSet_Gen.json |
| [firmwareGenerateDownloadUrlSample.js][firmwaregeneratedownloadurlsample] | The operation to a url for file download. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateDownloadUrl_MaximumSet_Gen.json |
| [firmwareGenerateFilesystemDownloadUrlSample.js][firmwaregeneratefilesystemdownloadurlsample] | The operation to a url for tar file download. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateFilesystemDownloadUrl_MaximumSet_Gen.json |
| [firmwareGenerateSummarySample.js][firmwaregeneratesummarysample] | The operation to get a scan summary. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateSummary_MaximumSet_Gen.json |
| [firmwareGetSample.js][firmwaregetsample] | Get firmware. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_Get_MaximumSet_Gen.json |
| [firmwareListByWorkspaceSample.js][firmwarelistbyworkspacesample] | Lists all of firmwares inside a workspace. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListByWorkspace_MaximumSet_Gen.json |
| [firmwareListGenerateBinaryHardeningListSample.js][firmwarelistgeneratebinaryhardeninglistsample] | The operation to list all binary hardening result for a firmware. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateBinaryHardeningList_MaximumSet_Gen.json |
| [firmwareListGenerateComponentListSample.js][firmwarelistgeneratecomponentlistsample] | The operation to list all components result for a firmware. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateComponentList_MaximumSet_Gen.json |
| [firmwareListGenerateCryptoCertificateListSample.js][firmwarelistgeneratecryptocertificatelistsample] | The operation to list all crypto certificates for a firmware. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateCryptoCertificateList_MaximumSet_Gen.json |
| [firmwareListGenerateCryptoKeyListSample.js][firmwarelistgeneratecryptokeylistsample] | The operation to list all crypto keys for a firmware. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateCryptoKeyList_MaximumSet_Gen.json |
| [firmwareListGenerateCveListSample.js][firmwarelistgeneratecvelistsample] | The operation to list all cve results for a firmware. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateCveList_MaximumSet_Gen.json |
| [firmwareListGeneratePasswordHashListSample.js][firmwarelistgeneratepasswordhashlistsample] | The operation to list all password hashes for a firmware. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGeneratePasswordHashList_MaximumSet_Gen.json |
| [firmwareUpdateSample.js][firmwareupdatesample] | The operation to update firmware. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_Update_MaximumSet_Gen.json |
| [operationsListSample.js][operationslistsample] | Lists the operations for this resource provider x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Operations_List_MaximumSet_Gen.json |
| [workspacesCreateSample.js][workspacescreatesample] | The operation to create or update a firmware analysis workspace. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_Create_MaximumSet_Gen.json |
| [workspacesDeleteSample.js][workspacesdeletesample] | The operation to delete a firmware analysis workspace. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_Delete_MaximumSet_Gen.json |
| [workspacesGenerateUploadUrlSample.js][workspacesgenerateuploadurlsample] | The operation to get a url for file upload. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_GenerateUploadUrl_MaximumSet_Gen.json |
| [workspacesGetSample.js][workspacesgetsample] | Get firmware analysis workspace. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_Get_MaximumSet_Gen.json |
| [workspacesListByResourceGroupSample.js][workspaceslistbyresourcegroupsample] | Lists all of the firmware analysis workspaces in the specified resource group. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_ListByResourceGroup_MaximumSet_Gen.json |
| [workspacesListBySubscriptionSample.js][workspaceslistbysubscriptionsample] | Lists all of the firmware analysis workspaces in the specified subscription. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_ListBySubscription_MaximumSet_Gen.json |
| [workspacesUpdateSample.js][workspacesupdatesample] | The operation to update a firmware analysis workspaces. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_Update_MaximumSet_Gen.json |
## Prerequisites
The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule).
You need [an Azure subscription][freesub] to run these sample programs.
Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function.
Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package].
## Setup
To run the samples using the published version of the package:
1. Install the dependencies using `npm`:
```bash
npm install
```
2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically.
3. Run whichever samples you like (note that some samples may require additional setup, see the table above):
```bash
node firmwareCreateSample.js
```
Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform):
```bash
npx cross-env IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID="<iotfirmwaredefense subscription id>" IOTFIRMWAREDEFENSE_RESOURCE_GROUP="<iotfirmwaredefense resource group>" node firmwareCreateSample.js
```
## Next Steps
Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients.
[firmwarecreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/javascript/firmwareCreateSample.js
[firmwaredeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/javascript/firmwareDeleteSample.js
[firmwaregeneratebinaryhardeningdetailssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/javascript/firmwareGenerateBinaryHardeningDetailsSample.js
[firmwaregeneratebinaryhardeningsummarysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/javascript/firmwareGenerateBinaryHardeningSummarySample.js
[firmwaregeneratecomponentdetailssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/javascript/firmwareGenerateComponentDetailsSample.js
[firmwaregeneratecryptocertificatesummarysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/javascript/firmwareGenerateCryptoCertificateSummarySample.js
[firmwaregeneratecryptokeysummarysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/javascript/firmwareGenerateCryptoKeySummarySample.js
[firmwaregeneratecvesummarysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/javascript/firmwareGenerateCveSummarySample.js
[firmwaregeneratedownloadurlsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/javascript/firmwareGenerateDownloadUrlSample.js
[firmwaregeneratefilesystemdownloadurlsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/javascript/firmwareGenerateFilesystemDownloadUrlSample.js
[firmwaregeneratesummarysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/javascript/firmwareGenerateSummarySample.js
[firmwaregetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/javascript/firmwareGetSample.js
[firmwarelistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/javascript/firmwareListByWorkspaceSample.js
[firmwarelistgeneratebinaryhardeninglistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/javascript/firmwareListGenerateBinaryHardeningListSample.js
[firmwarelistgeneratecomponentlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/javascript/firmwareListGenerateComponentListSample.js
[firmwarelistgeneratecryptocertificatelistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/javascript/firmwareListGenerateCryptoCertificateListSample.js
[firmwarelistgeneratecryptokeylistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/javascript/firmwareListGenerateCryptoKeyListSample.js
[firmwarelistgeneratecvelistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/javascript/firmwareListGenerateCveListSample.js
[firmwarelistgeneratepasswordhashlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/javascript/firmwareListGeneratePasswordHashListSample.js
[firmwareupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/javascript/firmwareUpdateSample.js
[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/javascript/operationsListSample.js
[workspacescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/javascript/workspacesCreateSample.js
[workspacesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/javascript/workspacesDeleteSample.js
[workspacesgenerateuploadurlsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/javascript/workspacesGenerateUploadUrlSample.js
[workspacesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/javascript/workspacesGetSample.js
[workspaceslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/javascript/workspacesListByResourceGroupSample.js
[workspaceslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/javascript/workspacesListBySubscriptionSample.js
[workspacesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/javascript/workspacesUpdateSample.js
[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-iotfirmwaredefense?view=azure-node-preview
[freesub]: https://azure.microsoft.com/free/
[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/README.md

Просмотреть файл

@ -1,66 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { IoTFirmwareDefenseClient } = require("@azure/arm-iotfirmwaredefense");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to The operation to get binary hardening details for a firmware.
*
* @summary The operation to get binary hardening details for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateBinaryHardeningDetails_MaximumSet_Gen.json
*/
async function firmwareGenerateBinaryHardeningDetailsMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateBinaryHardeningDetails(
resourceGroupName,
workspaceName,
firmwareId,
);
console.log(result);
}
/**
* This sample demonstrates how to The operation to get binary hardening details for a firmware.
*
* @summary The operation to get binary hardening details for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateBinaryHardeningDetails_MinimumSet_Gen.json
*/
async function firmwareGenerateBinaryHardeningDetailsMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateBinaryHardeningDetails(
resourceGroupName,
workspaceName,
firmwareId,
);
console.log(result);
}
async function main() {
firmwareGenerateBinaryHardeningDetailsMaximumSetGen();
firmwareGenerateBinaryHardeningDetailsMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -1,66 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { IoTFirmwareDefenseClient } = require("@azure/arm-iotfirmwaredefense");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to The operation to list the binary hardening summary percentages for a firmware.
*
* @summary The operation to list the binary hardening summary percentages for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateBinaryHardeningSummary_MaximumSet_Gen.json
*/
async function firmwareGenerateBinaryHardeningSummaryMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateBinaryHardeningSummary(
resourceGroupName,
workspaceName,
firmwareId,
);
console.log(result);
}
/**
* This sample demonstrates how to The operation to list the binary hardening summary percentages for a firmware.
*
* @summary The operation to list the binary hardening summary percentages for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateBinaryHardeningSummary_MinimumSet_Gen.json
*/
async function firmwareGenerateBinaryHardeningSummaryMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateBinaryHardeningSummary(
resourceGroupName,
workspaceName,
firmwareId,
);
console.log(result);
}
async function main() {
firmwareGenerateBinaryHardeningSummaryMaximumSetGen();
firmwareGenerateBinaryHardeningSummaryMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -1,66 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { IoTFirmwareDefenseClient } = require("@azure/arm-iotfirmwaredefense");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to The operation to get component details for a firmware.
*
* @summary The operation to get component details for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateComponentDetails_MaximumSet_Gen.json
*/
async function firmwareGenerateComponentDetailsMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateComponentDetails(
resourceGroupName,
workspaceName,
firmwareId,
);
console.log(result);
}
/**
* This sample demonstrates how to The operation to get component details for a firmware.
*
* @summary The operation to get component details for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateComponentDetails_MinimumSet_Gen.json
*/
async function firmwareGenerateComponentDetailsMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateComponentDetails(
resourceGroupName,
workspaceName,
firmwareId,
);
console.log(result);
}
async function main() {
firmwareGenerateComponentDetailsMaximumSetGen();
firmwareGenerateComponentDetailsMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -1,66 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { IoTFirmwareDefenseClient } = require("@azure/arm-iotfirmwaredefense");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to The operation to provide a high level summary of the discovered cryptographic certificates reported for the firmware image.
*
* @summary The operation to provide a high level summary of the discovered cryptographic certificates reported for the firmware image.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateCryptoCertificateSummary_MaximumSet_Gen.json
*/
async function firmwareGenerateCryptoCertificateSummaryMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "C589E84A-5C11-4A25-9CF9-4E9C2F1EBFCA";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "FirmwareAnalysisRG";
const workspaceName = "default";
const firmwareId = "DECAFBAD-0000-0000-0000-BADBADBADBAD";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateCryptoCertificateSummary(
resourceGroupName,
workspaceName,
firmwareId,
);
console.log(result);
}
/**
* This sample demonstrates how to The operation to provide a high level summary of the discovered cryptographic certificates reported for the firmware image.
*
* @summary The operation to provide a high level summary of the discovered cryptographic certificates reported for the firmware image.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateCryptoCertificateSummary_MinimumSet_Gen.json
*/
async function firmwareGenerateCryptoCertificateSummaryMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "C589E84A-5C11-4A25-9CF9-4E9C2F1EBFCA";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "rgworkspaces-firmwares";
const workspaceName = "j5QE_";
const firmwareId = "wujtpcgypfpqseyrsebolarkspy";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateCryptoCertificateSummary(
resourceGroupName,
workspaceName,
firmwareId,
);
console.log(result);
}
async function main() {
firmwareGenerateCryptoCertificateSummaryMaximumSetGen();
firmwareGenerateCryptoCertificateSummaryMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -1,66 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { IoTFirmwareDefenseClient } = require("@azure/arm-iotfirmwaredefense");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to The operation to provide a high level summary of the discovered cryptographic keys reported for the firmware image.
*
* @summary The operation to provide a high level summary of the discovered cryptographic keys reported for the firmware image.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateCryptoKeySummary_MaximumSet_Gen.json
*/
async function firmwareGenerateCryptoKeySummaryMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "C589E84A-5C11-4A25-9CF9-4E9C2F1EBFCA";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "FirmwareAnalysisRG";
const workspaceName = "default";
const firmwareId = "DECAFBAD-0000-0000-0000-BADBADBADBAD";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateCryptoKeySummary(
resourceGroupName,
workspaceName,
firmwareId,
);
console.log(result);
}
/**
* This sample demonstrates how to The operation to provide a high level summary of the discovered cryptographic keys reported for the firmware image.
*
* @summary The operation to provide a high level summary of the discovered cryptographic keys reported for the firmware image.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateCryptoKeySummary_MinimumSet_Gen.json
*/
async function firmwareGenerateCryptoKeySummaryMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "C589E84A-5C11-4A25-9CF9-4E9C2F1EBFCA";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "rgworkspaces-firmwares";
const workspaceName = "j5QE_";
const firmwareId = "wujtpcgypfpqseyrsebolarkspy";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateCryptoKeySummary(
resourceGroupName,
workspaceName,
firmwareId,
);
console.log(result);
}
async function main() {
firmwareGenerateCryptoKeySummaryMaximumSetGen();
firmwareGenerateCryptoKeySummaryMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -1,66 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { IoTFirmwareDefenseClient } = require("@azure/arm-iotfirmwaredefense");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to The operation to provide a high level summary of the CVEs reported for the firmware image.
*
* @summary The operation to provide a high level summary of the CVEs reported for the firmware image.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateCveSummary_MaximumSet_Gen.json
*/
async function firmwareGenerateCveSummaryMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateCveSummary(
resourceGroupName,
workspaceName,
firmwareId,
);
console.log(result);
}
/**
* This sample demonstrates how to The operation to provide a high level summary of the CVEs reported for the firmware image.
*
* @summary The operation to provide a high level summary of the CVEs reported for the firmware image.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateCveSummary_MinimumSet_Gen.json
*/
async function firmwareGenerateCveSummaryMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateCveSummary(
resourceGroupName,
workspaceName,
firmwareId,
);
console.log(result);
}
async function main() {
firmwareGenerateCveSummaryMaximumSetGen();
firmwareGenerateCveSummaryMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -1,66 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { IoTFirmwareDefenseClient } = require("@azure/arm-iotfirmwaredefense");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to The operation to get a scan summary.
*
* @summary The operation to get a scan summary.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateSummary_MaximumSet_Gen.json
*/
async function firmwareGenerateSummaryMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateSummary(
resourceGroupName,
workspaceName,
firmwareId,
);
console.log(result);
}
/**
* This sample demonstrates how to The operation to get a scan summary.
*
* @summary The operation to get a scan summary.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateSummary_MinimumSet_Gen.json
*/
async function firmwareGenerateSummaryMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateSummary(
resourceGroupName,
workspaceName,
firmwareId,
);
console.log(result);
}
async function main() {
firmwareGenerateSummaryMaximumSetGen();
firmwareGenerateSummaryMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -1,72 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { IoTFirmwareDefenseClient } = require("@azure/arm-iotfirmwaredefense");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to The operation to list all binary hardening result for a firmware.
*
* @summary The operation to list all binary hardening result for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateBinaryHardeningList_MaximumSet_Gen.json
*/
async function firmwareListGenerateBinaryHardeningListMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.firmwareOperations.listGenerateBinaryHardeningList(
resourceGroupName,
workspaceName,
firmwareId,
)) {
resArray.push(item);
}
console.log(resArray);
}
/**
* This sample demonstrates how to The operation to list all binary hardening result for a firmware.
*
* @summary The operation to list all binary hardening result for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateBinaryHardeningList_MinimumSet_Gen.json
*/
async function firmwareListGenerateBinaryHardeningListMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.firmwareOperations.listGenerateBinaryHardeningList(
resourceGroupName,
workspaceName,
firmwareId,
)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
firmwareListGenerateBinaryHardeningListMaximumSetGen();
firmwareListGenerateBinaryHardeningListMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -1,72 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { IoTFirmwareDefenseClient } = require("@azure/arm-iotfirmwaredefense");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to The operation to list all components result for a firmware.
*
* @summary The operation to list all components result for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateComponentList_MaximumSet_Gen.json
*/
async function firmwareListGenerateComponentListMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.firmwareOperations.listGenerateComponentList(
resourceGroupName,
workspaceName,
firmwareId,
)) {
resArray.push(item);
}
console.log(resArray);
}
/**
* This sample demonstrates how to The operation to list all components result for a firmware.
*
* @summary The operation to list all components result for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateComponentList_MinimumSet_Gen.json
*/
async function firmwareListGenerateComponentListMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.firmwareOperations.listGenerateComponentList(
resourceGroupName,
workspaceName,
firmwareId,
)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
firmwareListGenerateComponentListMaximumSetGen();
firmwareListGenerateComponentListMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -1,72 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { IoTFirmwareDefenseClient } = require("@azure/arm-iotfirmwaredefense");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to The operation to list all cve results for a firmware.
*
* @summary The operation to list all cve results for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateCveList_MaximumSet_Gen.json
*/
async function firmwareListGenerateCveListMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.firmwareOperations.listGenerateCveList(
resourceGroupName,
workspaceName,
firmwareId,
)) {
resArray.push(item);
}
console.log(resArray);
}
/**
* This sample demonstrates how to The operation to list all cve results for a firmware.
*
* @summary The operation to list all cve results for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateCveList_MinimumSet_Gen.json
*/
async function firmwareListGenerateCveListMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.firmwareOperations.listGenerateCveList(
resourceGroupName,
workspaceName,
firmwareId,
)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
firmwareListGenerateCveListMaximumSetGen();
firmwareListGenerateCveListMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -1,72 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { IoTFirmwareDefenseClient } = require("@azure/arm-iotfirmwaredefense");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to The operation to list all password hashes for a firmware.
*
* @summary The operation to list all password hashes for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGeneratePasswordHashList_MaximumSet_Gen.json
*/
async function firmwareListGeneratePasswordHashListMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.firmwareOperations.listGeneratePasswordHashList(
resourceGroupName,
workspaceName,
firmwareId,
)) {
resArray.push(item);
}
console.log(resArray);
}
/**
* This sample demonstrates how to The operation to list all password hashes for a firmware.
*
* @summary The operation to list all password hashes for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGeneratePasswordHashList_MinimumSet_Gen.json
*/
async function firmwareListGeneratePasswordHashListMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.firmwareOperations.listGeneratePasswordHashList(
resourceGroupName,
workspaceName,
firmwareId,
)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
firmwareListGeneratePasswordHashListMaximumSetGen();
firmwareListGeneratePasswordHashListMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -1,117 +0,0 @@
# client library samples for TypeScript (Beta)
These sample programs show how to use the TypeScript client libraries for in some common scenarios.
| **File Name** | **Description** |
| ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [firmwareCreateSample.ts][firmwarecreatesample] | The operation to create a firmware. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_Create_MaximumSet_Gen.json |
| [firmwareDeleteSample.ts][firmwaredeletesample] | The operation to delete a firmware. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_Delete_MaximumSet_Gen.json |
| [firmwareGenerateBinaryHardeningDetailsSample.ts][firmwaregeneratebinaryhardeningdetailssample] | The operation to get binary hardening details for a firmware. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateBinaryHardeningDetails_MaximumSet_Gen.json |
| [firmwareGenerateBinaryHardeningSummarySample.ts][firmwaregeneratebinaryhardeningsummarysample] | The operation to list the binary hardening summary percentages for a firmware. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateBinaryHardeningSummary_MaximumSet_Gen.json |
| [firmwareGenerateComponentDetailsSample.ts][firmwaregeneratecomponentdetailssample] | The operation to get component details for a firmware. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateComponentDetails_MaximumSet_Gen.json |
| [firmwareGenerateCryptoCertificateSummarySample.ts][firmwaregeneratecryptocertificatesummarysample] | The operation to provide a high level summary of the discovered cryptographic certificates reported for the firmware image. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateCryptoCertificateSummary_MaximumSet_Gen.json |
| [firmwareGenerateCryptoKeySummarySample.ts][firmwaregeneratecryptokeysummarysample] | The operation to provide a high level summary of the discovered cryptographic keys reported for the firmware image. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateCryptoKeySummary_MaximumSet_Gen.json |
| [firmwareGenerateCveSummarySample.ts][firmwaregeneratecvesummarysample] | The operation to provide a high level summary of the CVEs reported for the firmware image. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateCveSummary_MaximumSet_Gen.json |
| [firmwareGenerateDownloadUrlSample.ts][firmwaregeneratedownloadurlsample] | The operation to a url for file download. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateDownloadUrl_MaximumSet_Gen.json |
| [firmwareGenerateFilesystemDownloadUrlSample.ts][firmwaregeneratefilesystemdownloadurlsample] | The operation to a url for tar file download. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateFilesystemDownloadUrl_MaximumSet_Gen.json |
| [firmwareGenerateSummarySample.ts][firmwaregeneratesummarysample] | The operation to get a scan summary. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateSummary_MaximumSet_Gen.json |
| [firmwareGetSample.ts][firmwaregetsample] | Get firmware. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_Get_MaximumSet_Gen.json |
| [firmwareListByWorkspaceSample.ts][firmwarelistbyworkspacesample] | Lists all of firmwares inside a workspace. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListByWorkspace_MaximumSet_Gen.json |
| [firmwareListGenerateBinaryHardeningListSample.ts][firmwarelistgeneratebinaryhardeninglistsample] | The operation to list all binary hardening result for a firmware. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateBinaryHardeningList_MaximumSet_Gen.json |
| [firmwareListGenerateComponentListSample.ts][firmwarelistgeneratecomponentlistsample] | The operation to list all components result for a firmware. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateComponentList_MaximumSet_Gen.json |
| [firmwareListGenerateCryptoCertificateListSample.ts][firmwarelistgeneratecryptocertificatelistsample] | The operation to list all crypto certificates for a firmware. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateCryptoCertificateList_MaximumSet_Gen.json |
| [firmwareListGenerateCryptoKeyListSample.ts][firmwarelistgeneratecryptokeylistsample] | The operation to list all crypto keys for a firmware. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateCryptoKeyList_MaximumSet_Gen.json |
| [firmwareListGenerateCveListSample.ts][firmwarelistgeneratecvelistsample] | The operation to list all cve results for a firmware. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateCveList_MaximumSet_Gen.json |
| [firmwareListGeneratePasswordHashListSample.ts][firmwarelistgeneratepasswordhashlistsample] | The operation to list all password hashes for a firmware. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGeneratePasswordHashList_MaximumSet_Gen.json |
| [firmwareUpdateSample.ts][firmwareupdatesample] | The operation to update firmware. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_Update_MaximumSet_Gen.json |
| [operationsListSample.ts][operationslistsample] | Lists the operations for this resource provider x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Operations_List_MaximumSet_Gen.json |
| [workspacesCreateSample.ts][workspacescreatesample] | The operation to create or update a firmware analysis workspace. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_Create_MaximumSet_Gen.json |
| [workspacesDeleteSample.ts][workspacesdeletesample] | The operation to delete a firmware analysis workspace. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_Delete_MaximumSet_Gen.json |
| [workspacesGenerateUploadUrlSample.ts][workspacesgenerateuploadurlsample] | The operation to get a url for file upload. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_GenerateUploadUrl_MaximumSet_Gen.json |
| [workspacesGetSample.ts][workspacesgetsample] | Get firmware analysis workspace. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_Get_MaximumSet_Gen.json |
| [workspacesListByResourceGroupSample.ts][workspaceslistbyresourcegroupsample] | Lists all of the firmware analysis workspaces in the specified resource group. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_ListByResourceGroup_MaximumSet_Gen.json |
| [workspacesListBySubscriptionSample.ts][workspaceslistbysubscriptionsample] | Lists all of the firmware analysis workspaces in the specified subscription. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_ListBySubscription_MaximumSet_Gen.json |
| [workspacesUpdateSample.ts][workspacesupdatesample] | The operation to update a firmware analysis workspaces. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_Update_MaximumSet_Gen.json |
## Prerequisites
The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule).
Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using:
```bash
npm install -g typescript
```
You need [an Azure subscription][freesub] to run these sample programs.
Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function.
Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package].
## Setup
To run the samples using the published version of the package:
1. Install the dependencies using `npm`:
```bash
npm install
```
2. Compile the samples:
```bash
npm run build
```
3. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically.
4. Run whichever samples you like (note that some samples may require additional setup, see the table above):
```bash
node dist/firmwareCreateSample.js
```
Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform):
```bash
npx cross-env IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID="<iotfirmwaredefense subscription id>" IOTFIRMWAREDEFENSE_RESOURCE_GROUP="<iotfirmwaredefense resource group>" node dist/firmwareCreateSample.js
```
## Next Steps
Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients.
[firmwarecreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/typescript/src/firmwareCreateSample.ts
[firmwaredeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/typescript/src/firmwareDeleteSample.ts
[firmwaregeneratebinaryhardeningdetailssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/typescript/src/firmwareGenerateBinaryHardeningDetailsSample.ts
[firmwaregeneratebinaryhardeningsummarysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/typescript/src/firmwareGenerateBinaryHardeningSummarySample.ts
[firmwaregeneratecomponentdetailssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/typescript/src/firmwareGenerateComponentDetailsSample.ts
[firmwaregeneratecryptocertificatesummarysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/typescript/src/firmwareGenerateCryptoCertificateSummarySample.ts
[firmwaregeneratecryptokeysummarysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/typescript/src/firmwareGenerateCryptoKeySummarySample.ts
[firmwaregeneratecvesummarysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/typescript/src/firmwareGenerateCveSummarySample.ts
[firmwaregeneratedownloadurlsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/typescript/src/firmwareGenerateDownloadUrlSample.ts
[firmwaregeneratefilesystemdownloadurlsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/typescript/src/firmwareGenerateFilesystemDownloadUrlSample.ts
[firmwaregeneratesummarysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/typescript/src/firmwareGenerateSummarySample.ts
[firmwaregetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/typescript/src/firmwareGetSample.ts
[firmwarelistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/typescript/src/firmwareListByWorkspaceSample.ts
[firmwarelistgeneratebinaryhardeninglistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/typescript/src/firmwareListGenerateBinaryHardeningListSample.ts
[firmwarelistgeneratecomponentlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/typescript/src/firmwareListGenerateComponentListSample.ts
[firmwarelistgeneratecryptocertificatelistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/typescript/src/firmwareListGenerateCryptoCertificateListSample.ts
[firmwarelistgeneratecryptokeylistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/typescript/src/firmwareListGenerateCryptoKeyListSample.ts
[firmwarelistgeneratecvelistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/typescript/src/firmwareListGenerateCveListSample.ts
[firmwarelistgeneratepasswordhashlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/typescript/src/firmwareListGeneratePasswordHashListSample.ts
[firmwareupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/typescript/src/firmwareUpdateSample.ts
[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/typescript/src/operationsListSample.ts
[workspacescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/typescript/src/workspacesCreateSample.ts
[workspacesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/typescript/src/workspacesDeleteSample.ts
[workspacesgenerateuploadurlsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/typescript/src/workspacesGenerateUploadUrlSample.ts
[workspacesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/typescript/src/workspacesGetSample.ts
[workspaceslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/typescript/src/workspacesListByResourceGroupSample.ts
[workspaceslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/typescript/src/workspacesListBySubscriptionSample.ts
[workspacesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1-beta/typescript/src/workspacesUpdateSample.ts
[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-iotfirmwaredefense?view=azure-node-preview
[freesub]: https://azure.microsoft.com/free/
[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/README.md
[typescript]: https://www.typescriptlang.org/docs/home.html

Просмотреть файл

@ -1,72 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { IoTFirmwareDefenseClient } from "@azure/arm-iotfirmwaredefense";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to The operation to get binary hardening details for a firmware.
*
* @summary The operation to get binary hardening details for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateBinaryHardeningDetails_MaximumSet_Gen.json
*/
async function firmwareGenerateBinaryHardeningDetailsMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] ||
"rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateBinaryHardeningDetails(
resourceGroupName,
workspaceName,
firmwareId
);
console.log(result);
}
/**
* This sample demonstrates how to The operation to get binary hardening details for a firmware.
*
* @summary The operation to get binary hardening details for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateBinaryHardeningDetails_MinimumSet_Gen.json
*/
async function firmwareGenerateBinaryHardeningDetailsMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] ||
"rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateBinaryHardeningDetails(
resourceGroupName,
workspaceName,
firmwareId
);
console.log(result);
}
async function main() {
firmwareGenerateBinaryHardeningDetailsMaximumSetGen();
firmwareGenerateBinaryHardeningDetailsMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -1,72 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { IoTFirmwareDefenseClient } from "@azure/arm-iotfirmwaredefense";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to The operation to list the binary hardening summary percentages for a firmware.
*
* @summary The operation to list the binary hardening summary percentages for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateBinaryHardeningSummary_MaximumSet_Gen.json
*/
async function firmwareGenerateBinaryHardeningSummaryMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] ||
"rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateBinaryHardeningSummary(
resourceGroupName,
workspaceName,
firmwareId
);
console.log(result);
}
/**
* This sample demonstrates how to The operation to list the binary hardening summary percentages for a firmware.
*
* @summary The operation to list the binary hardening summary percentages for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateBinaryHardeningSummary_MinimumSet_Gen.json
*/
async function firmwareGenerateBinaryHardeningSummaryMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] ||
"rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateBinaryHardeningSummary(
resourceGroupName,
workspaceName,
firmwareId
);
console.log(result);
}
async function main() {
firmwareGenerateBinaryHardeningSummaryMaximumSetGen();
firmwareGenerateBinaryHardeningSummaryMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -1,72 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { IoTFirmwareDefenseClient } from "@azure/arm-iotfirmwaredefense";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to The operation to get component details for a firmware.
*
* @summary The operation to get component details for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateComponentDetails_MaximumSet_Gen.json
*/
async function firmwareGenerateComponentDetailsMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] ||
"rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateComponentDetails(
resourceGroupName,
workspaceName,
firmwareId
);
console.log(result);
}
/**
* This sample demonstrates how to The operation to get component details for a firmware.
*
* @summary The operation to get component details for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateComponentDetails_MinimumSet_Gen.json
*/
async function firmwareGenerateComponentDetailsMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] ||
"rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateComponentDetails(
resourceGroupName,
workspaceName,
firmwareId
);
console.log(result);
}
async function main() {
firmwareGenerateComponentDetailsMaximumSetGen();
firmwareGenerateComponentDetailsMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -1,71 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { IoTFirmwareDefenseClient } from "@azure/arm-iotfirmwaredefense";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to The operation to provide a high level summary of the discovered cryptographic certificates reported for the firmware image.
*
* @summary The operation to provide a high level summary of the discovered cryptographic certificates reported for the firmware image.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateCryptoCertificateSummary_MaximumSet_Gen.json
*/
async function firmwareGenerateCryptoCertificateSummaryMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"C589E84A-5C11-4A25-9CF9-4E9C2F1EBFCA";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "FirmwareAnalysisRG";
const workspaceName = "default";
const firmwareId = "DECAFBAD-0000-0000-0000-BADBADBADBAD";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateCryptoCertificateSummary(
resourceGroupName,
workspaceName,
firmwareId
);
console.log(result);
}
/**
* This sample demonstrates how to The operation to provide a high level summary of the discovered cryptographic certificates reported for the firmware image.
*
* @summary The operation to provide a high level summary of the discovered cryptographic certificates reported for the firmware image.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateCryptoCertificateSummary_MinimumSet_Gen.json
*/
async function firmwareGenerateCryptoCertificateSummaryMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"C589E84A-5C11-4A25-9CF9-4E9C2F1EBFCA";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] ||
"rgworkspaces-firmwares";
const workspaceName = "j5QE_";
const firmwareId = "wujtpcgypfpqseyrsebolarkspy";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateCryptoCertificateSummary(
resourceGroupName,
workspaceName,
firmwareId
);
console.log(result);
}
async function main() {
firmwareGenerateCryptoCertificateSummaryMaximumSetGen();
firmwareGenerateCryptoCertificateSummaryMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -1,71 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { IoTFirmwareDefenseClient } from "@azure/arm-iotfirmwaredefense";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to The operation to provide a high level summary of the discovered cryptographic keys reported for the firmware image.
*
* @summary The operation to provide a high level summary of the discovered cryptographic keys reported for the firmware image.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateCryptoKeySummary_MaximumSet_Gen.json
*/
async function firmwareGenerateCryptoKeySummaryMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"C589E84A-5C11-4A25-9CF9-4E9C2F1EBFCA";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "FirmwareAnalysisRG";
const workspaceName = "default";
const firmwareId = "DECAFBAD-0000-0000-0000-BADBADBADBAD";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateCryptoKeySummary(
resourceGroupName,
workspaceName,
firmwareId
);
console.log(result);
}
/**
* This sample demonstrates how to The operation to provide a high level summary of the discovered cryptographic keys reported for the firmware image.
*
* @summary The operation to provide a high level summary of the discovered cryptographic keys reported for the firmware image.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateCryptoKeySummary_MinimumSet_Gen.json
*/
async function firmwareGenerateCryptoKeySummaryMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"C589E84A-5C11-4A25-9CF9-4E9C2F1EBFCA";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] ||
"rgworkspaces-firmwares";
const workspaceName = "j5QE_";
const firmwareId = "wujtpcgypfpqseyrsebolarkspy";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateCryptoKeySummary(
resourceGroupName,
workspaceName,
firmwareId
);
console.log(result);
}
async function main() {
firmwareGenerateCryptoKeySummaryMaximumSetGen();
firmwareGenerateCryptoKeySummaryMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -1,72 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { IoTFirmwareDefenseClient } from "@azure/arm-iotfirmwaredefense";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to The operation to provide a high level summary of the CVEs reported for the firmware image.
*
* @summary The operation to provide a high level summary of the CVEs reported for the firmware image.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateCveSummary_MaximumSet_Gen.json
*/
async function firmwareGenerateCveSummaryMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] ||
"rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateCveSummary(
resourceGroupName,
workspaceName,
firmwareId
);
console.log(result);
}
/**
* This sample demonstrates how to The operation to provide a high level summary of the CVEs reported for the firmware image.
*
* @summary The operation to provide a high level summary of the CVEs reported for the firmware image.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateCveSummary_MinimumSet_Gen.json
*/
async function firmwareGenerateCveSummaryMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] ||
"rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateCveSummary(
resourceGroupName,
workspaceName,
firmwareId
);
console.log(result);
}
async function main() {
firmwareGenerateCveSummaryMaximumSetGen();
firmwareGenerateCveSummaryMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -1,72 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { IoTFirmwareDefenseClient } from "@azure/arm-iotfirmwaredefense";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to The operation to get a scan summary.
*
* @summary The operation to get a scan summary.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateSummary_MaximumSet_Gen.json
*/
async function firmwareGenerateSummaryMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] ||
"rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateSummary(
resourceGroupName,
workspaceName,
firmwareId
);
console.log(result);
}
/**
* This sample demonstrates how to The operation to get a scan summary.
*
* @summary The operation to get a scan summary.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateSummary_MinimumSet_Gen.json
*/
async function firmwareGenerateSummaryMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] ||
"rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateSummary(
resourceGroupName,
workspaceName,
firmwareId
);
console.log(result);
}
async function main() {
firmwareGenerateSummaryMaximumSetGen();
firmwareGenerateSummaryMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -1,78 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { IoTFirmwareDefenseClient } from "@azure/arm-iotfirmwaredefense";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to The operation to list all binary hardening result for a firmware.
*
* @summary The operation to list all binary hardening result for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateBinaryHardeningList_MaximumSet_Gen.json
*/
async function firmwareListGenerateBinaryHardeningListMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] ||
"rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.firmwareOperations.listGenerateBinaryHardeningList(
resourceGroupName,
workspaceName,
firmwareId
)) {
resArray.push(item);
}
console.log(resArray);
}
/**
* This sample demonstrates how to The operation to list all binary hardening result for a firmware.
*
* @summary The operation to list all binary hardening result for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateBinaryHardeningList_MinimumSet_Gen.json
*/
async function firmwareListGenerateBinaryHardeningListMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] ||
"rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.firmwareOperations.listGenerateBinaryHardeningList(
resourceGroupName,
workspaceName,
firmwareId
)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
firmwareListGenerateBinaryHardeningListMaximumSetGen();
firmwareListGenerateBinaryHardeningListMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -1,78 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { IoTFirmwareDefenseClient } from "@azure/arm-iotfirmwaredefense";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to The operation to list all components result for a firmware.
*
* @summary The operation to list all components result for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateComponentList_MaximumSet_Gen.json
*/
async function firmwareListGenerateComponentListMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] ||
"rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.firmwareOperations.listGenerateComponentList(
resourceGroupName,
workspaceName,
firmwareId
)) {
resArray.push(item);
}
console.log(resArray);
}
/**
* This sample demonstrates how to The operation to list all components result for a firmware.
*
* @summary The operation to list all components result for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateComponentList_MinimumSet_Gen.json
*/
async function firmwareListGenerateComponentListMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] ||
"rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.firmwareOperations.listGenerateComponentList(
resourceGroupName,
workspaceName,
firmwareId
)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
firmwareListGenerateComponentListMaximumSetGen();
firmwareListGenerateComponentListMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -1,78 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { IoTFirmwareDefenseClient } from "@azure/arm-iotfirmwaredefense";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to The operation to list all cve results for a firmware.
*
* @summary The operation to list all cve results for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateCveList_MaximumSet_Gen.json
*/
async function firmwareListGenerateCveListMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] ||
"rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.firmwareOperations.listGenerateCveList(
resourceGroupName,
workspaceName,
firmwareId
)) {
resArray.push(item);
}
console.log(resArray);
}
/**
* This sample demonstrates how to The operation to list all cve results for a firmware.
*
* @summary The operation to list all cve results for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateCveList_MinimumSet_Gen.json
*/
async function firmwareListGenerateCveListMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] ||
"rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.firmwareOperations.listGenerateCveList(
resourceGroupName,
workspaceName,
firmwareId
)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
firmwareListGenerateCveListMaximumSetGen();
firmwareListGenerateCveListMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -1,78 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { IoTFirmwareDefenseClient } from "@azure/arm-iotfirmwaredefense";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to The operation to list all password hashes for a firmware.
*
* @summary The operation to list all password hashes for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGeneratePasswordHashList_MaximumSet_Gen.json
*/
async function firmwareListGeneratePasswordHashListMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] ||
"rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.firmwareOperations.listGeneratePasswordHashList(
resourceGroupName,
workspaceName,
firmwareId
)) {
resArray.push(item);
}
console.log(resArray);
}
/**
* This sample demonstrates how to The operation to list all password hashes for a firmware.
*
* @summary The operation to list all password hashes for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGeneratePasswordHashList_MinimumSet_Gen.json
*/
async function firmwareListGeneratePasswordHashListMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] ||
"rgworkspaces-firmwares";
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.firmwareOperations.listGeneratePasswordHashList(
resourceGroupName,
workspaceName,
firmwareId
)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
firmwareListGeneratePasswordHashListMaximumSetGen();
firmwareListGeneratePasswordHashListMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,94 @@
# client library samples for JavaScript
These sample programs show how to use the JavaScript client libraries for in some common scenarios.
| **File Name** | **Description** |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [binaryHardeningListByFirmwareSample.js][binaryhardeninglistbyfirmwaresample] | Lists binary hardening analysis results of a firmware. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/BinaryHardening_ListByFirmware_MaximumSet_Gen.json |
| [cryptoCertificatesListByFirmwareSample.js][cryptocertificateslistbyfirmwaresample] | Lists cryptographic certificate analysis results found in a firmware. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/CryptoCertificates_ListByFirmware_MaximumSet_Gen.json |
| [cryptoKeysListByFirmwareSample.js][cryptokeyslistbyfirmwaresample] | Lists cryptographic key analysis results found in a firmware. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/CryptoKeys_ListByFirmware_MaximumSet_Gen.json |
| [cvesListByFirmwareSample.js][cveslistbyfirmwaresample] | Lists CVE analysis results of a firmware. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Cves_ListByFirmware_MaximumSet_Gen.json |
| [firmwaresCreateSample.js][firmwarescreatesample] | The operation to create a firmware. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_Create_MaximumSet_Gen.json |
| [firmwaresDeleteSample.js][firmwaresdeletesample] | The operation to delete a firmware. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_Delete_MaximumSet_Gen.json |
| [firmwaresGenerateDownloadUrlSample.js][firmwaresgeneratedownloadurlsample] | The operation to a url for file download. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_GenerateDownloadUrl_MaximumSet_Gen.json |
| [firmwaresGenerateFilesystemDownloadUrlSample.js][firmwaresgeneratefilesystemdownloadurlsample] | The operation to a url for tar file download. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_GenerateFilesystemDownloadUrl_MaximumSet_Gen.json |
| [firmwaresGetSample.js][firmwaresgetsample] | Get firmware. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_Get_MaximumSet_Gen.json |
| [firmwaresListByWorkspaceSample.js][firmwareslistbyworkspacesample] | Lists all of firmwares inside a workspace. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_ListByWorkspace_MaximumSet_Gen.json |
| [firmwaresUpdateSample.js][firmwaresupdatesample] | The operation to update firmware. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_Update_MaximumSet_Gen.json |
| [operationsListSample.js][operationslistsample] | Lists the operations for this resource provider x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Operations_List_MaximumSet_Gen.json |
| [passwordHashesListByFirmwareSample.js][passwordhasheslistbyfirmwaresample] | Lists password hash analysis results of a firmware. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/PasswordHashes_ListByFirmware_MaximumSet_Gen.json |
| [sbomComponentsListByFirmwareSample.js][sbomcomponentslistbyfirmwaresample] | Lists SBOM analysis results of a firmware. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/SbomComponents_ListByFirmware_MaximumSet_Gen.json |
| [summariesGetSample.js][summariesgetsample] | Get an analysis result summary of a firmware by name. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Summaries_Get_MaximumSet_Gen.json |
| [summariesListByFirmwareSample.js][summarieslistbyfirmwaresample] | Lists analysis result summary names of a firmware. To fetch the full summary data, get that summary by name. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Summaries_ListByFirmware_MaximumSet_Gen.json |
| [workspacesCreateSample.js][workspacescreatesample] | The operation to create or update a firmware analysis workspace. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_Create_MaximumSet_Gen.json |
| [workspacesDeleteSample.js][workspacesdeletesample] | The operation to delete a firmware analysis workspace. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_Delete_MaximumSet_Gen.json |
| [workspacesGenerateUploadUrlSample.js][workspacesgenerateuploadurlsample] | The operation to get a url for file upload. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_GenerateUploadUrl_MaximumSet_Gen.json |
| [workspacesGetSample.js][workspacesgetsample] | Get firmware analysis workspace. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_Get_MaximumSet_Gen.json |
| [workspacesListByResourceGroupSample.js][workspaceslistbyresourcegroupsample] | Lists all of the firmware analysis workspaces in the specified resource group. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_ListByResourceGroup_MaximumSet_Gen.json |
| [workspacesListBySubscriptionSample.js][workspaceslistbysubscriptionsample] | Lists all of the firmware analysis workspaces in the specified subscription. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_ListBySubscription_MaximumSet_Gen.json |
| [workspacesUpdateSample.js][workspacesupdatesample] | The operation to update a firmware analysis workspaces. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_Update_MaximumSet_Gen.json |
## Prerequisites
The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule).
You need [an Azure subscription][freesub] to run these sample programs.
Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function.
Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package].
## Setup
To run the samples using the published version of the package:
1. Install the dependencies using `npm`:
```bash
npm install
```
2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically.
3. Run whichever samples you like (note that some samples may require additional setup, see the table above):
```bash
node binaryHardeningListByFirmwareSample.js
```
Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform):
```bash
npx cross-env IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID="<iotfirmwaredefense subscription id>" IOTFIRMWAREDEFENSE_RESOURCE_GROUP="<iotfirmwaredefense resource group>" node binaryHardeningListByFirmwareSample.js
```
## Next Steps
Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients.
[binaryhardeninglistbyfirmwaresample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/javascript/binaryHardeningListByFirmwareSample.js
[cryptocertificateslistbyfirmwaresample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/javascript/cryptoCertificatesListByFirmwareSample.js
[cryptokeyslistbyfirmwaresample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/javascript/cryptoKeysListByFirmwareSample.js
[cveslistbyfirmwaresample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/javascript/cvesListByFirmwareSample.js
[firmwarescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/javascript/firmwaresCreateSample.js
[firmwaresdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/javascript/firmwaresDeleteSample.js
[firmwaresgeneratedownloadurlsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/javascript/firmwaresGenerateDownloadUrlSample.js
[firmwaresgeneratefilesystemdownloadurlsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/javascript/firmwaresGenerateFilesystemDownloadUrlSample.js
[firmwaresgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/javascript/firmwaresGetSample.js
[firmwareslistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/javascript/firmwaresListByWorkspaceSample.js
[firmwaresupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/javascript/firmwaresUpdateSample.js
[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/javascript/operationsListSample.js
[passwordhasheslistbyfirmwaresample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/javascript/passwordHashesListByFirmwareSample.js
[sbomcomponentslistbyfirmwaresample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/javascript/sbomComponentsListByFirmwareSample.js
[summariesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/javascript/summariesGetSample.js
[summarieslistbyfirmwaresample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/javascript/summariesListByFirmwareSample.js
[workspacescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/javascript/workspacesCreateSample.js
[workspacesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/javascript/workspacesDeleteSample.js
[workspacesgenerateuploadurlsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/javascript/workspacesGenerateUploadUrlSample.js
[workspacesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/javascript/workspacesGetSample.js
[workspaceslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/javascript/workspacesListByResourceGroupSample.js
[workspaceslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/javascript/workspacesListBySubscriptionSample.js
[workspacesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/javascript/workspacesUpdateSample.js
[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-iotfirmwaredefense?view=azure-node-preview
[freesub]: https://azure.microsoft.com/free/
[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/README.md

Просмотреть файл

@ -13,22 +13,22 @@ const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to The operation to list all crypto keys for a firmware.
* This sample demonstrates how to Lists binary hardening analysis results of a firmware.
*
* @summary The operation to list all crypto keys for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateCryptoKeyList_MaximumSet_Gen.json
* @summary Lists binary hardening analysis results of a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/BinaryHardening_ListByFirmware_MaximumSet_Gen.json
*/
async function firmwareListGenerateCryptoKeyListMaximumSetGen() {
async function binaryHardeningListByFirmwareMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "C589E84A-5C11-4A25-9CF9-4E9C2F1EBFCA";
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "FirmwareAnalysisRG";
const workspaceName = "default";
const firmwareId = "DECAFBAD-0000-0000-0000-BADBADBADBAD";
const firmwareId = "109a9886-50bf-85a8-9d75-000000000000";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.firmwareOperations.listGenerateCryptoKeyList(
for await (let item of client.binaryHardening.listByFirmware(
resourceGroupName,
workspaceName,
firmwareId,
@ -39,22 +39,22 @@ async function firmwareListGenerateCryptoKeyListMaximumSetGen() {
}
/**
* This sample demonstrates how to The operation to list all crypto keys for a firmware.
* This sample demonstrates how to Lists binary hardening analysis results of a firmware.
*
* @summary The operation to list all crypto keys for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateCryptoKeyList_MinimumSet_Gen.json
* @summary Lists binary hardening analysis results of a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/BinaryHardening_ListByFirmware_MinimumSet_Gen.json
*/
async function firmwareListGenerateCryptoKeyListMinimumSetGen() {
async function binaryHardeningListByFirmwareMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "C589E84A-5C11-4A25-9CF9-4E9C2F1EBFCA";
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "rgworkspaces-firmwares";
const workspaceName = "j5QE_";
const firmwareId = "wujtpcgypfpqseyrsebolarkspy";
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "FirmwareAnalysisRG";
const workspaceName = "default";
const firmwareId = "109a9886-50bf-85a8-9d75-000000000000";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.firmwareOperations.listGenerateCryptoKeyList(
for await (let item of client.binaryHardening.listByFirmware(
resourceGroupName,
workspaceName,
firmwareId,
@ -65,8 +65,8 @@ async function firmwareListGenerateCryptoKeyListMinimumSetGen() {
}
async function main() {
firmwareListGenerateCryptoKeyListMaximumSetGen();
firmwareListGenerateCryptoKeyListMinimumSetGen();
binaryHardeningListByFirmwareMaximumSetGen();
binaryHardeningListByFirmwareMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,72 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { IoTFirmwareDefenseClient } = require("@azure/arm-iotfirmwaredefense");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Lists cryptographic certificate analysis results found in a firmware.
*
* @summary Lists cryptographic certificate analysis results found in a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/CryptoCertificates_ListByFirmware_MaximumSet_Gen.json
*/
async function cryptoCertificatesListByFirmwareMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "FirmwareAnalysisRG";
const workspaceName = "default";
const firmwareId = "109a9886-50bf-85a8-9d75-000000000000";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.cryptoCertificates.listByFirmware(
resourceGroupName,
workspaceName,
firmwareId,
)) {
resArray.push(item);
}
console.log(resArray);
}
/**
* This sample demonstrates how to Lists cryptographic certificate analysis results found in a firmware.
*
* @summary Lists cryptographic certificate analysis results found in a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/CryptoCertificates_ListByFirmware_MinimumSet_Gen.json
*/
async function cryptoCertificatesListByFirmwareMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "FirmwareAnalysisRG";
const workspaceName = "default";
const firmwareId = "109a9886-50bf-85a8-9d75-000000000000";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.cryptoCertificates.listByFirmware(
resourceGroupName,
workspaceName,
firmwareId,
)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
cryptoCertificatesListByFirmwareMaximumSetGen();
cryptoCertificatesListByFirmwareMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -13,22 +13,22 @@ const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to The operation to list all crypto certificates for a firmware.
* This sample demonstrates how to Lists cryptographic key analysis results found in a firmware.
*
* @summary The operation to list all crypto certificates for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateCryptoCertificateList_MaximumSet_Gen.json
* @summary Lists cryptographic key analysis results found in a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/CryptoKeys_ListByFirmware_MaximumSet_Gen.json
*/
async function firmwareListGenerateCryptoCertificateListMaximumSetGen() {
async function cryptoKeysListByFirmwareMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "C589E84A-5C11-4A25-9CF9-4E9C2F1EBFCA";
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "FirmwareAnalysisRG";
const workspaceName = "default";
const firmwareId = "DECAFBAD-0000-0000-0000-BADBADBADBAD";
const firmwareId = "109a9886-50bf-85a8-9d75-000000000000";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.firmwareOperations.listGenerateCryptoCertificateList(
for await (let item of client.cryptoKeys.listByFirmware(
resourceGroupName,
workspaceName,
firmwareId,
@ -39,22 +39,22 @@ async function firmwareListGenerateCryptoCertificateListMaximumSetGen() {
}
/**
* This sample demonstrates how to The operation to list all crypto certificates for a firmware.
* This sample demonstrates how to Lists cryptographic key analysis results found in a firmware.
*
* @summary The operation to list all crypto certificates for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateCryptoCertificateList_MinimumSet_Gen.json
* @summary Lists cryptographic key analysis results found in a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/CryptoKeys_ListByFirmware_MinimumSet_Gen.json
*/
async function firmwareListGenerateCryptoCertificateListMinimumSetGen() {
async function cryptoKeysListByFirmwareMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "C589E84A-5C11-4A25-9CF9-4E9C2F1EBFCA";
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "rgworkspaces-firmwares";
const workspaceName = "j5QE_";
const firmwareId = "wujtpcgypfpqseyrsebolarkspy";
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "FirmwareAnalysisRG";
const workspaceName = "default";
const firmwareId = "109a9886-50bf-85a8-9d75-000000000000";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.firmwareOperations.listGenerateCryptoCertificateList(
for await (let item of client.cryptoKeys.listByFirmware(
resourceGroupName,
workspaceName,
firmwareId,
@ -65,8 +65,8 @@ async function firmwareListGenerateCryptoCertificateListMinimumSetGen() {
}
async function main() {
firmwareListGenerateCryptoCertificateListMaximumSetGen();
firmwareListGenerateCryptoCertificateListMinimumSetGen();
cryptoKeysListByFirmwareMaximumSetGen();
cryptoKeysListByFirmwareMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,64 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { IoTFirmwareDefenseClient } = require("@azure/arm-iotfirmwaredefense");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Lists CVE analysis results of a firmware.
*
* @summary Lists CVE analysis results of a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Cves_ListByFirmware_MaximumSet_Gen.json
*/
async function cvesListByFirmwareMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "FirmwareAnalysisRG";
const workspaceName = "default";
const firmwareId = "109a9886-50bf-85a8-9d75-000000000000";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.cves.listByFirmware(resourceGroupName, workspaceName, firmwareId)) {
resArray.push(item);
}
console.log(resArray);
}
/**
* This sample demonstrates how to Lists CVE analysis results of a firmware.
*
* @summary Lists CVE analysis results of a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Cves_ListByFirmware_MinimumSet_Gen.json
*/
async function cvesListByFirmwareMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "FirmwareAnalysisRG";
const workspaceName = "default";
const firmwareId = "109a9886-50bf-85a8-9d75-000000000000";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.cves.listByFirmware(resourceGroupName, workspaceName, firmwareId)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
cvesListByFirmwareMaximumSetGen();
cvesListByFirmwareMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -16,9 +16,9 @@ require("dotenv").config();
* This sample demonstrates how to The operation to create a firmware.
*
* @summary The operation to create a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_Create_MaximumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_Create_MaximumSet_Gen.json
*/
async function firmwareCreateMaximumSetGen() {
async function firmwaresCreateMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
@ -26,6 +26,7 @@ async function firmwareCreateMaximumSetGen() {
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const firmware = {
properties: {
description: "uz",
fileName: "wresexxulcdsdd",
fileSize: 17,
@ -34,10 +35,11 @@ async function firmwareCreateMaximumSetGen() {
statusMessages: [{ message: "ulvhmhokezathzzauiitu" }],
vendor: "vycmdhgtmepcptyoubztiuudpkcpd",
version: "s",
},
};
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.create(
const result = await client.firmwares.create(
resourceGroupName,
workspaceName,
firmwareId,
@ -50,9 +52,9 @@ async function firmwareCreateMaximumSetGen() {
* This sample demonstrates how to The operation to create a firmware.
*
* @summary The operation to create a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_Create_MinimumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_Create_MinimumSet_Gen.json
*/
async function firmwareCreateMinimumSetGen() {
async function firmwaresCreateMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
@ -62,7 +64,7 @@ async function firmwareCreateMinimumSetGen() {
const firmware = {};
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.create(
const result = await client.firmwares.create(
resourceGroupName,
workspaceName,
firmwareId,
@ -72,8 +74,8 @@ async function firmwareCreateMinimumSetGen() {
}
async function main() {
firmwareCreateMaximumSetGen();
firmwareCreateMinimumSetGen();
firmwaresCreateMaximumSetGen();
firmwaresCreateMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -16,9 +16,9 @@ require("dotenv").config();
* This sample demonstrates how to The operation to delete a firmware.
*
* @summary The operation to delete a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_Delete_MaximumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_Delete_MaximumSet_Gen.json
*/
async function firmwareDeleteMaximumSetGen() {
async function firmwaresDeleteMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
@ -27,11 +27,7 @@ async function firmwareDeleteMaximumSetGen() {
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.delete(
resourceGroupName,
workspaceName,
firmwareId,
);
const result = await client.firmwares.delete(resourceGroupName, workspaceName, firmwareId);
console.log(result);
}
@ -39,9 +35,9 @@ async function firmwareDeleteMaximumSetGen() {
* This sample demonstrates how to The operation to delete a firmware.
*
* @summary The operation to delete a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_Delete_MinimumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_Delete_MinimumSet_Gen.json
*/
async function firmwareDeleteMinimumSetGen() {
async function firmwaresDeleteMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
@ -50,17 +46,13 @@ async function firmwareDeleteMinimumSetGen() {
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.delete(
resourceGroupName,
workspaceName,
firmwareId,
);
const result = await client.firmwares.delete(resourceGroupName, workspaceName, firmwareId);
console.log(result);
}
async function main() {
firmwareDeleteMaximumSetGen();
firmwareDeleteMinimumSetGen();
firmwaresDeleteMaximumSetGen();
firmwaresDeleteMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -16,9 +16,9 @@ require("dotenv").config();
* This sample demonstrates how to The operation to a url for file download.
*
* @summary The operation to a url for file download.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateDownloadUrl_MaximumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_GenerateDownloadUrl_MaximumSet_Gen.json
*/
async function firmwareGenerateDownloadUrlMaximumSetGen() {
async function firmwaresGenerateDownloadUrlMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
@ -27,7 +27,7 @@ async function firmwareGenerateDownloadUrlMaximumSetGen() {
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateDownloadUrl(
const result = await client.firmwares.generateDownloadUrl(
resourceGroupName,
workspaceName,
firmwareId,
@ -39,9 +39,9 @@ async function firmwareGenerateDownloadUrlMaximumSetGen() {
* This sample demonstrates how to The operation to a url for file download.
*
* @summary The operation to a url for file download.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateDownloadUrl_MinimumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_GenerateDownloadUrl_MinimumSet_Gen.json
*/
async function firmwareGenerateDownloadUrlMinimumSetGen() {
async function firmwaresGenerateDownloadUrlMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
@ -50,7 +50,7 @@ async function firmwareGenerateDownloadUrlMinimumSetGen() {
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateDownloadUrl(
const result = await client.firmwares.generateDownloadUrl(
resourceGroupName,
workspaceName,
firmwareId,
@ -59,8 +59,8 @@ async function firmwareGenerateDownloadUrlMinimumSetGen() {
}
async function main() {
firmwareGenerateDownloadUrlMaximumSetGen();
firmwareGenerateDownloadUrlMinimumSetGen();
firmwaresGenerateDownloadUrlMaximumSetGen();
firmwaresGenerateDownloadUrlMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -16,9 +16,9 @@ require("dotenv").config();
* This sample demonstrates how to The operation to a url for tar file download.
*
* @summary The operation to a url for tar file download.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateFilesystemDownloadUrl_MaximumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_GenerateFilesystemDownloadUrl_MaximumSet_Gen.json
*/
async function firmwareGenerateFilesystemDownloadUrlMaximumSetGen() {
async function firmwaresGenerateFilesystemDownloadUrlMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
@ -27,7 +27,7 @@ async function firmwareGenerateFilesystemDownloadUrlMaximumSetGen() {
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateFilesystemDownloadUrl(
const result = await client.firmwares.generateFilesystemDownloadUrl(
resourceGroupName,
workspaceName,
firmwareId,
@ -39,9 +39,9 @@ async function firmwareGenerateFilesystemDownloadUrlMaximumSetGen() {
* This sample demonstrates how to The operation to a url for tar file download.
*
* @summary The operation to a url for tar file download.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_GenerateFilesystemDownloadUrl_MinimumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_GenerateFilesystemDownloadUrl_MinimumSet_Gen.json
*/
async function firmwareGenerateFilesystemDownloadUrlMinimumSetGen() {
async function firmwaresGenerateFilesystemDownloadUrlMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
@ -50,7 +50,7 @@ async function firmwareGenerateFilesystemDownloadUrlMinimumSetGen() {
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.generateFilesystemDownloadUrl(
const result = await client.firmwares.generateFilesystemDownloadUrl(
resourceGroupName,
workspaceName,
firmwareId,
@ -59,8 +59,8 @@ async function firmwareGenerateFilesystemDownloadUrlMinimumSetGen() {
}
async function main() {
firmwareGenerateFilesystemDownloadUrlMaximumSetGen();
firmwareGenerateFilesystemDownloadUrlMinimumSetGen();
firmwaresGenerateFilesystemDownloadUrlMaximumSetGen();
firmwaresGenerateFilesystemDownloadUrlMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -16,9 +16,9 @@ require("dotenv").config();
* This sample demonstrates how to Get firmware.
*
* @summary Get firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_Get_MaximumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_Get_MaximumSet_Gen.json
*/
async function firmwareGetMaximumSetGen() {
async function firmwaresGetMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
@ -27,7 +27,7 @@ async function firmwareGetMaximumSetGen() {
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.get(resourceGroupName, workspaceName, firmwareId);
const result = await client.firmwares.get(resourceGroupName, workspaceName, firmwareId);
console.log(result);
}
@ -35,9 +35,9 @@ async function firmwareGetMaximumSetGen() {
* This sample demonstrates how to Get firmware.
*
* @summary Get firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_Get_MinimumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_Get_MinimumSet_Gen.json
*/
async function firmwareGetMinimumSetGen() {
async function firmwaresGetMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
@ -46,13 +46,13 @@ async function firmwareGetMinimumSetGen() {
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.get(resourceGroupName, workspaceName, firmwareId);
const result = await client.firmwares.get(resourceGroupName, workspaceName, firmwareId);
console.log(result);
}
async function main() {
firmwareGetMaximumSetGen();
firmwareGetMinimumSetGen();
firmwaresGetMaximumSetGen();
firmwaresGetMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -16,9 +16,9 @@ require("dotenv").config();
* This sample demonstrates how to Lists all of firmwares inside a workspace.
*
* @summary Lists all of firmwares inside a workspace.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListByWorkspace_MaximumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_ListByWorkspace_MaximumSet_Gen.json
*/
async function firmwareListByWorkspaceMaximumSetGen() {
async function firmwaresListByWorkspaceMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
@ -27,10 +27,7 @@ async function firmwareListByWorkspaceMaximumSetGen() {
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.firmwareOperations.listByWorkspace(
resourceGroupName,
workspaceName,
)) {
for await (let item of client.firmwares.listByWorkspace(resourceGroupName, workspaceName)) {
resArray.push(item);
}
console.log(resArray);
@ -40,9 +37,9 @@ async function firmwareListByWorkspaceMaximumSetGen() {
* This sample demonstrates how to Lists all of firmwares inside a workspace.
*
* @summary Lists all of firmwares inside a workspace.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListByWorkspace_MinimumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_ListByWorkspace_MinimumSet_Gen.json
*/
async function firmwareListByWorkspaceMinimumSetGen() {
async function firmwaresListByWorkspaceMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
@ -51,18 +48,15 @@ async function firmwareListByWorkspaceMinimumSetGen() {
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.firmwareOperations.listByWorkspace(
resourceGroupName,
workspaceName,
)) {
for await (let item of client.firmwares.listByWorkspace(resourceGroupName, workspaceName)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
firmwareListByWorkspaceMaximumSetGen();
firmwareListByWorkspaceMinimumSetGen();
firmwaresListByWorkspaceMaximumSetGen();
firmwaresListByWorkspaceMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -16,9 +16,9 @@ require("dotenv").config();
* This sample demonstrates how to The operation to update firmware.
*
* @summary The operation to update firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_Update_MaximumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_Update_MaximumSet_Gen.json
*/
async function firmwareUpdateMaximumSetGen() {
async function firmwaresUpdateMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
@ -26,6 +26,7 @@ async function firmwareUpdateMaximumSetGen() {
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const firmware = {
properties: {
description: "uz",
fileName: "wresexxulcdsdd",
fileSize: 17,
@ -34,10 +35,11 @@ async function firmwareUpdateMaximumSetGen() {
statusMessages: [{ message: "ulvhmhokezathzzauiitu" }],
vendor: "vycmdhgtmepcptyoubztiuudpkcpd",
version: "s",
},
};
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.update(
const result = await client.firmwares.update(
resourceGroupName,
workspaceName,
firmwareId,
@ -50,9 +52,9 @@ async function firmwareUpdateMaximumSetGen() {
* This sample demonstrates how to The operation to update firmware.
*
* @summary The operation to update firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_Update_MinimumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_Update_MinimumSet_Gen.json
*/
async function firmwareUpdateMinimumSetGen() {
async function firmwaresUpdateMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
const resourceGroupName =
@ -62,7 +64,7 @@ async function firmwareUpdateMinimumSetGen() {
const firmware = {};
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.update(
const result = await client.firmwares.update(
resourceGroupName,
workspaceName,
firmwareId,
@ -72,8 +74,8 @@ async function firmwareUpdateMinimumSetGen() {
}
async function main() {
firmwareUpdateMaximumSetGen();
firmwareUpdateMinimumSetGen();
firmwaresUpdateMaximumSetGen();
firmwaresUpdateMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -16,7 +16,7 @@ require("dotenv").config();
* This sample demonstrates how to Lists the operations for this resource provider
*
* @summary Lists the operations for this resource provider
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Operations_List_MaximumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Operations_List_MaximumSet_Gen.json
*/
async function operationsListMaximumSetGen() {
const subscriptionId =
@ -34,7 +34,7 @@ async function operationsListMaximumSetGen() {
* This sample demonstrates how to Lists the operations for this resource provider
*
* @summary Lists the operations for this resource provider
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Operations_List_MinimumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Operations_List_MinimumSet_Gen.json
*/
async function operationsListMinimumSetGen() {
const subscriptionId =

Просмотреть файл

@ -1,8 +1,8 @@
{
"name": "@azure-samples/arm-iotfirmwaredefense-js-beta",
"name": "@azure-samples/arm-iotfirmwaredefense-js",
"private": true,
"version": "1.0.0",
"description": " client library samples for JavaScript (Beta)",
"description": " client library samples for JavaScript",
"engines": {
"node": ">=18.0.0"
},
@ -25,7 +25,7 @@
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense",
"dependencies": {
"@azure/arm-iotfirmwaredefense": "next",
"@azure/arm-iotfirmwaredefense": "latest",
"dotenv": "latest",
"@azure/identity": "^4.0.1"
}

Просмотреть файл

@ -0,0 +1,72 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { IoTFirmwareDefenseClient } = require("@azure/arm-iotfirmwaredefense");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Lists password hash analysis results of a firmware.
*
* @summary Lists password hash analysis results of a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/PasswordHashes_ListByFirmware_MaximumSet_Gen.json
*/
async function passwordHashesListByFirmwareMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "FirmwareAnalysisRG";
const workspaceName = "default";
const firmwareId = "109a9886-50bf-85a8-9d75-000000000000";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.passwordHashes.listByFirmware(
resourceGroupName,
workspaceName,
firmwareId,
)) {
resArray.push(item);
}
console.log(resArray);
}
/**
* This sample demonstrates how to Lists password hash analysis results of a firmware.
*
* @summary Lists password hash analysis results of a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/PasswordHashes_ListByFirmware_MinimumSet_Gen.json
*/
async function passwordHashesListByFirmwareMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "FirmwareAnalysisRG";
const workspaceName = "default";
const firmwareId = "109a9886-50bf-85a8-9d75-000000000000";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.passwordHashes.listByFirmware(
resourceGroupName,
workspaceName,
firmwareId,
)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
passwordHashesListByFirmwareMaximumSetGen();
passwordHashesListByFirmwareMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,72 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { IoTFirmwareDefenseClient } = require("@azure/arm-iotfirmwaredefense");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Lists SBOM analysis results of a firmware.
*
* @summary Lists SBOM analysis results of a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/SbomComponents_ListByFirmware_MaximumSet_Gen.json
*/
async function sbomComponentsListByFirmwareMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "FirmwareAnalysisRG";
const workspaceName = "default";
const firmwareId = "109a9886-50bf-85a8-9d75-000000000000";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.sbomComponents.listByFirmware(
resourceGroupName,
workspaceName,
firmwareId,
)) {
resArray.push(item);
}
console.log(resArray);
}
/**
* This sample demonstrates how to Lists SBOM analysis results of a firmware.
*
* @summary Lists SBOM analysis results of a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/SbomComponents_ListByFirmware_MinimumSet_Gen.json
*/
async function sbomComponentsListByFirmwareMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "FirmwareAnalysisRG";
const workspaceName = "default";
const firmwareId = "109a9886-50bf-85a8-9d75-000000000000";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.sbomComponents.listByFirmware(
resourceGroupName,
workspaceName,
firmwareId,
)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
sbomComponentsListByFirmwareMaximumSetGen();
sbomComponentsListByFirmwareMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,70 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { IoTFirmwareDefenseClient } = require("@azure/arm-iotfirmwaredefense");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Get an analysis result summary of a firmware by name.
*
* @summary Get an analysis result summary of a firmware by name.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Summaries_Get_MaximumSet_Gen.json
*/
async function summariesGetMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "FirmwareAnalysisRG";
const workspaceName = "default";
const firmwareId = "109a9886-50bf-85a8-9d75-000000000000";
const summaryName = "Firmware";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.summaries.get(
resourceGroupName,
workspaceName,
firmwareId,
summaryName,
);
console.log(result);
}
/**
* This sample demonstrates how to Get an analysis result summary of a firmware by name.
*
* @summary Get an analysis result summary of a firmware by name.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Summaries_Get_MinimumSet_Gen.json
*/
async function summariesGetMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "FirmwareAnalysisRG";
const workspaceName = "default";
const firmwareId = "109a9886-50bf-85a8-9d75-000000000000";
const summaryName = "Firmware";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.summaries.get(
resourceGroupName,
workspaceName,
firmwareId,
summaryName,
);
console.log(result);
}
async function main() {
summariesGetMaximumSetGen();
summariesGetMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,72 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { IoTFirmwareDefenseClient } = require("@azure/arm-iotfirmwaredefense");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Lists analysis result summary names of a firmware. To fetch the full summary data, get that summary by name.
*
* @summary Lists analysis result summary names of a firmware. To fetch the full summary data, get that summary by name.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Summaries_ListByFirmware_MaximumSet_Gen.json
*/
async function summariesListByFirmwareMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "FirmwareAnalysisRG";
const workspaceName = "default";
const firmwareId = "109a9886-50bf-85a8-9d75-000000000000";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.summaries.listByFirmware(
resourceGroupName,
workspaceName,
firmwareId,
)) {
resArray.push(item);
}
console.log(resArray);
}
/**
* This sample demonstrates how to Lists analysis result summary names of a firmware. To fetch the full summary data, get that summary by name.
*
* @summary Lists analysis result summary names of a firmware. To fetch the full summary data, get that summary by name.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Summaries_ListByFirmware_MinimumSet_Gen.json
*/
async function summariesListByFirmwareMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "FirmwareAnalysisRG";
const workspaceName = "default";
const firmwareId = "109a9886-50bf-85a8-9d75-000000000000";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.summaries.listByFirmware(
resourceGroupName,
workspaceName,
firmwareId,
)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
summariesListByFirmwareMaximumSetGen();
summariesListByFirmwareMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -16,7 +16,7 @@ require("dotenv").config();
* This sample demonstrates how to The operation to create or update a firmware analysis workspace.
*
* @summary The operation to create or update a firmware analysis workspace.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_Create_MaximumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_Create_MaximumSet_Gen.json
*/
async function workspacesCreateMaximumSetGen() {
const subscriptionId =
@ -25,6 +25,7 @@ async function workspacesCreateMaximumSetGen() {
const workspaceName = "E___-3";
const workspace = {
location: "jjwbseilitjgdrhbvvkwviqj",
properties: {},
tags: { key450: "rzqqumbpfsbibnpirsm" },
};
const credential = new DefaultAzureCredential();
@ -37,7 +38,7 @@ async function workspacesCreateMaximumSetGen() {
* This sample demonstrates how to The operation to create or update a firmware analysis workspace.
*
* @summary The operation to create or update a firmware analysis workspace.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_Create_MinimumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_Create_MinimumSet_Gen.json
*/
async function workspacesCreateMinimumSetGen() {
const subscriptionId =

Просмотреть файл

@ -16,7 +16,7 @@ require("dotenv").config();
* This sample demonstrates how to The operation to delete a firmware analysis workspace.
*
* @summary The operation to delete a firmware analysis workspace.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_Delete_MaximumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_Delete_MaximumSet_Gen.json
*/
async function workspacesDeleteMaximumSetGen() {
const subscriptionId =
@ -33,7 +33,7 @@ async function workspacesDeleteMaximumSetGen() {
* This sample demonstrates how to The operation to delete a firmware analysis workspace.
*
* @summary The operation to delete a firmware analysis workspace.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_Delete_MinimumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_Delete_MinimumSet_Gen.json
*/
async function workspacesDeleteMinimumSetGen() {
const subscriptionId =

Просмотреть файл

@ -16,7 +16,7 @@ require("dotenv").config();
* This sample demonstrates how to The operation to get a url for file upload.
*
* @summary The operation to get a url for file upload.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_GenerateUploadUrl_MaximumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_GenerateUploadUrl_MaximumSet_Gen.json
*/
async function workspacesGenerateUploadUrlMaximumSetGen() {
const subscriptionId =
@ -40,7 +40,7 @@ async function workspacesGenerateUploadUrlMaximumSetGen() {
* This sample demonstrates how to The operation to get a url for file upload.
*
* @summary The operation to get a url for file upload.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_GenerateUploadUrl_MinimumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_GenerateUploadUrl_MinimumSet_Gen.json
*/
async function workspacesGenerateUploadUrlMinimumSetGen() {
const subscriptionId =

Просмотреть файл

@ -16,7 +16,7 @@ require("dotenv").config();
* This sample demonstrates how to Get firmware analysis workspace.
*
* @summary Get firmware analysis workspace.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_Get_MaximumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_Get_MaximumSet_Gen.json
*/
async function workspacesGetMaximumSetGen() {
const subscriptionId =
@ -33,7 +33,7 @@ async function workspacesGetMaximumSetGen() {
* This sample demonstrates how to Get firmware analysis workspace.
*
* @summary Get firmware analysis workspace.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_Get_MinimumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_Get_MinimumSet_Gen.json
*/
async function workspacesGetMinimumSetGen() {
const subscriptionId =

Просмотреть файл

@ -16,7 +16,7 @@ require("dotenv").config();
* This sample demonstrates how to Lists all of the firmware analysis workspaces in the specified resource group.
*
* @summary Lists all of the firmware analysis workspaces in the specified resource group.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_ListByResourceGroup_MaximumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_ListByResourceGroup_MaximumSet_Gen.json
*/
async function workspacesListByResourceGroupMaximumSetGen() {
const subscriptionId =
@ -35,7 +35,7 @@ async function workspacesListByResourceGroupMaximumSetGen() {
* This sample demonstrates how to Lists all of the firmware analysis workspaces in the specified resource group.
*
* @summary Lists all of the firmware analysis workspaces in the specified resource group.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_ListByResourceGroup_MinimumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_ListByResourceGroup_MinimumSet_Gen.json
*/
async function workspacesListByResourceGroupMinimumSetGen() {
const subscriptionId =

Просмотреть файл

@ -16,7 +16,7 @@ require("dotenv").config();
* This sample demonstrates how to Lists all of the firmware analysis workspaces in the specified subscription.
*
* @summary Lists all of the firmware analysis workspaces in the specified subscription.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_ListBySubscription_MaximumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_ListBySubscription_MaximumSet_Gen.json
*/
async function workspacesListBySubscriptionMaximumSetGen() {
const subscriptionId =
@ -34,7 +34,7 @@ async function workspacesListBySubscriptionMaximumSetGen() {
* This sample demonstrates how to Lists all of the firmware analysis workspaces in the specified subscription.
*
* @summary Lists all of the firmware analysis workspaces in the specified subscription.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_ListBySubscription_MinimumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_ListBySubscription_MinimumSet_Gen.json
*/
async function workspacesListBySubscriptionMinimumSetGen() {
const subscriptionId =

Просмотреть файл

@ -16,14 +16,14 @@ require("dotenv").config();
* This sample demonstrates how to The operation to update a firmware analysis workspaces.
*
* @summary The operation to update a firmware analysis workspaces.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_Update_MaximumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_Update_MaximumSet_Gen.json
*/
async function workspacesUpdateMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] || "5443A01A-5242-4950-AC1A-2DD362180254";
const resourceGroupName = process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "rgworkspaces";
const workspaceName = "E___-3";
const workspace = {};
const workspace = { properties: {} };
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.workspaces.update(resourceGroupName, workspaceName, workspace);
@ -34,7 +34,7 @@ async function workspacesUpdateMaximumSetGen() {
* This sample demonstrates how to The operation to update a firmware analysis workspaces.
*
* @summary The operation to update a firmware analysis workspaces.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Workspaces_Update_MinimumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_Update_MinimumSet_Gen.json
*/
async function workspacesUpdateMinimumSetGen() {
const subscriptionId =

Просмотреть файл

@ -0,0 +1,107 @@
# client library samples for TypeScript
These sample programs show how to use the TypeScript client libraries for in some common scenarios.
| **File Name** | **Description** |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [binaryHardeningListByFirmwareSample.ts][binaryhardeninglistbyfirmwaresample] | Lists binary hardening analysis results of a firmware. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/BinaryHardening_ListByFirmware_MaximumSet_Gen.json |
| [cryptoCertificatesListByFirmwareSample.ts][cryptocertificateslistbyfirmwaresample] | Lists cryptographic certificate analysis results found in a firmware. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/CryptoCertificates_ListByFirmware_MaximumSet_Gen.json |
| [cryptoKeysListByFirmwareSample.ts][cryptokeyslistbyfirmwaresample] | Lists cryptographic key analysis results found in a firmware. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/CryptoKeys_ListByFirmware_MaximumSet_Gen.json |
| [cvesListByFirmwareSample.ts][cveslistbyfirmwaresample] | Lists CVE analysis results of a firmware. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Cves_ListByFirmware_MaximumSet_Gen.json |
| [firmwaresCreateSample.ts][firmwarescreatesample] | The operation to create a firmware. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_Create_MaximumSet_Gen.json |
| [firmwaresDeleteSample.ts][firmwaresdeletesample] | The operation to delete a firmware. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_Delete_MaximumSet_Gen.json |
| [firmwaresGenerateDownloadUrlSample.ts][firmwaresgeneratedownloadurlsample] | The operation to a url for file download. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_GenerateDownloadUrl_MaximumSet_Gen.json |
| [firmwaresGenerateFilesystemDownloadUrlSample.ts][firmwaresgeneratefilesystemdownloadurlsample] | The operation to a url for tar file download. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_GenerateFilesystemDownloadUrl_MaximumSet_Gen.json |
| [firmwaresGetSample.ts][firmwaresgetsample] | Get firmware. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_Get_MaximumSet_Gen.json |
| [firmwaresListByWorkspaceSample.ts][firmwareslistbyworkspacesample] | Lists all of firmwares inside a workspace. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_ListByWorkspace_MaximumSet_Gen.json |
| [firmwaresUpdateSample.ts][firmwaresupdatesample] | The operation to update firmware. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_Update_MaximumSet_Gen.json |
| [operationsListSample.ts][operationslistsample] | Lists the operations for this resource provider x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Operations_List_MaximumSet_Gen.json |
| [passwordHashesListByFirmwareSample.ts][passwordhasheslistbyfirmwaresample] | Lists password hash analysis results of a firmware. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/PasswordHashes_ListByFirmware_MaximumSet_Gen.json |
| [sbomComponentsListByFirmwareSample.ts][sbomcomponentslistbyfirmwaresample] | Lists SBOM analysis results of a firmware. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/SbomComponents_ListByFirmware_MaximumSet_Gen.json |
| [summariesGetSample.ts][summariesgetsample] | Get an analysis result summary of a firmware by name. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Summaries_Get_MaximumSet_Gen.json |
| [summariesListByFirmwareSample.ts][summarieslistbyfirmwaresample] | Lists analysis result summary names of a firmware. To fetch the full summary data, get that summary by name. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Summaries_ListByFirmware_MaximumSet_Gen.json |
| [workspacesCreateSample.ts][workspacescreatesample] | The operation to create or update a firmware analysis workspace. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_Create_MaximumSet_Gen.json |
| [workspacesDeleteSample.ts][workspacesdeletesample] | The operation to delete a firmware analysis workspace. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_Delete_MaximumSet_Gen.json |
| [workspacesGenerateUploadUrlSample.ts][workspacesgenerateuploadurlsample] | The operation to get a url for file upload. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_GenerateUploadUrl_MaximumSet_Gen.json |
| [workspacesGetSample.ts][workspacesgetsample] | Get firmware analysis workspace. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_Get_MaximumSet_Gen.json |
| [workspacesListByResourceGroupSample.ts][workspaceslistbyresourcegroupsample] | Lists all of the firmware analysis workspaces in the specified resource group. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_ListByResourceGroup_MaximumSet_Gen.json |
| [workspacesListBySubscriptionSample.ts][workspaceslistbysubscriptionsample] | Lists all of the firmware analysis workspaces in the specified subscription. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_ListBySubscription_MaximumSet_Gen.json |
| [workspacesUpdateSample.ts][workspacesupdatesample] | The operation to update a firmware analysis workspaces. x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_Update_MaximumSet_Gen.json |
## Prerequisites
The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule).
Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using:
```bash
npm install -g typescript
```
You need [an Azure subscription][freesub] to run these sample programs.
Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function.
Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package].
## Setup
To run the samples using the published version of the package:
1. Install the dependencies using `npm`:
```bash
npm install
```
2. Compile the samples:
```bash
npm run build
```
3. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically.
4. Run whichever samples you like (note that some samples may require additional setup, see the table above):
```bash
node dist/binaryHardeningListByFirmwareSample.js
```
Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform):
```bash
npx cross-env IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID="<iotfirmwaredefense subscription id>" IOTFIRMWAREDEFENSE_RESOURCE_GROUP="<iotfirmwaredefense resource group>" node dist/binaryHardeningListByFirmwareSample.js
```
## Next Steps
Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients.
[binaryhardeninglistbyfirmwaresample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/typescript/src/binaryHardeningListByFirmwareSample.ts
[cryptocertificateslistbyfirmwaresample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/typescript/src/cryptoCertificatesListByFirmwareSample.ts
[cryptokeyslistbyfirmwaresample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/typescript/src/cryptoKeysListByFirmwareSample.ts
[cveslistbyfirmwaresample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/typescript/src/cvesListByFirmwareSample.ts
[firmwarescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/typescript/src/firmwaresCreateSample.ts
[firmwaresdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/typescript/src/firmwaresDeleteSample.ts
[firmwaresgeneratedownloadurlsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/typescript/src/firmwaresGenerateDownloadUrlSample.ts
[firmwaresgeneratefilesystemdownloadurlsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/typescript/src/firmwaresGenerateFilesystemDownloadUrlSample.ts
[firmwaresgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/typescript/src/firmwaresGetSample.ts
[firmwareslistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/typescript/src/firmwaresListByWorkspaceSample.ts
[firmwaresupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/typescript/src/firmwaresUpdateSample.ts
[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/typescript/src/operationsListSample.ts
[passwordhasheslistbyfirmwaresample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/typescript/src/passwordHashesListByFirmwareSample.ts
[sbomcomponentslistbyfirmwaresample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/typescript/src/sbomComponentsListByFirmwareSample.ts
[summariesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/typescript/src/summariesGetSample.ts
[summarieslistbyfirmwaresample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/typescript/src/summariesListByFirmwareSample.ts
[workspacescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/typescript/src/workspacesCreateSample.ts
[workspacesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/typescript/src/workspacesDeleteSample.ts
[workspacesgenerateuploadurlsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/typescript/src/workspacesGenerateUploadUrlSample.ts
[workspacesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/typescript/src/workspacesGetSample.ts
[workspaceslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/typescript/src/workspacesListByResourceGroupSample.ts
[workspaceslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/typescript/src/workspacesListBySubscriptionSample.ts
[workspacesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/samples/v1/typescript/src/workspacesUpdateSample.ts
[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-iotfirmwaredefense?view=azure-node-preview
[freesub]: https://azure.microsoft.com/free/
[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense/README.md
[typescript]: https://www.typescriptlang.org/docs/home.html

Просмотреть файл

@ -1,8 +1,8 @@
{
"name": "@azure-samples/arm-iotfirmwaredefense-ts-beta",
"name": "@azure-samples/arm-iotfirmwaredefense-ts",
"private": true,
"version": "1.0.0",
"description": " client library samples for TypeScript (Beta)",
"description": " client library samples for TypeScript",
"engines": {
"node": ">=18.0.0"
},
@ -29,7 +29,7 @@
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/iotfirmwaredefense/arm-iotfirmwaredefense",
"dependencies": {
"@azure/arm-iotfirmwaredefense": "next",
"@azure/arm-iotfirmwaredefense": "latest",
"dotenv": "latest",
"@azure/identity": "^4.0.1"
},

Просмотреть файл

@ -0,0 +1,76 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { IoTFirmwareDefenseClient } from "@azure/arm-iotfirmwaredefense";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Lists binary hardening analysis results of a firmware.
*
* @summary Lists binary hardening analysis results of a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/BinaryHardening_ListByFirmware_MaximumSet_Gen.json
*/
async function binaryHardeningListByFirmwareMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "FirmwareAnalysisRG";
const workspaceName = "default";
const firmwareId = "109a9886-50bf-85a8-9d75-000000000000";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.binaryHardening.listByFirmware(
resourceGroupName,
workspaceName,
firmwareId,
)) {
resArray.push(item);
}
console.log(resArray);
}
/**
* This sample demonstrates how to Lists binary hardening analysis results of a firmware.
*
* @summary Lists binary hardening analysis results of a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/BinaryHardening_ListByFirmware_MinimumSet_Gen.json
*/
async function binaryHardeningListByFirmwareMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "FirmwareAnalysisRG";
const workspaceName = "default";
const firmwareId = "109a9886-50bf-85a8-9d75-000000000000";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.binaryHardening.listByFirmware(
resourceGroupName,
workspaceName,
firmwareId,
)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
binaryHardeningListByFirmwareMaximumSetGen();
binaryHardeningListByFirmwareMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,76 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { IoTFirmwareDefenseClient } from "@azure/arm-iotfirmwaredefense";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Lists cryptographic certificate analysis results found in a firmware.
*
* @summary Lists cryptographic certificate analysis results found in a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/CryptoCertificates_ListByFirmware_MaximumSet_Gen.json
*/
async function cryptoCertificatesListByFirmwareMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "FirmwareAnalysisRG";
const workspaceName = "default";
const firmwareId = "109a9886-50bf-85a8-9d75-000000000000";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.cryptoCertificates.listByFirmware(
resourceGroupName,
workspaceName,
firmwareId,
)) {
resArray.push(item);
}
console.log(resArray);
}
/**
* This sample demonstrates how to Lists cryptographic certificate analysis results found in a firmware.
*
* @summary Lists cryptographic certificate analysis results found in a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/CryptoCertificates_ListByFirmware_MinimumSet_Gen.json
*/
async function cryptoCertificatesListByFirmwareMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "FirmwareAnalysisRG";
const workspaceName = "default";
const firmwareId = "109a9886-50bf-85a8-9d75-000000000000";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.cryptoCertificates.listByFirmware(
resourceGroupName,
workspaceName,
firmwareId,
)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
cryptoCertificatesListByFirmwareMaximumSetGen();
cryptoCertificatesListByFirmwareMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -15,26 +15,26 @@ import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to The operation to list all crypto certificates for a firmware.
* This sample demonstrates how to Lists cryptographic key analysis results found in a firmware.
*
* @summary The operation to list all crypto certificates for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateCryptoCertificateList_MaximumSet_Gen.json
* @summary Lists cryptographic key analysis results found in a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/CryptoKeys_ListByFirmware_MaximumSet_Gen.json
*/
async function firmwareListGenerateCryptoCertificateListMaximumSetGen() {
async function cryptoKeysListByFirmwareMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"C589E84A-5C11-4A25-9CF9-4E9C2F1EBFCA";
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "FirmwareAnalysisRG";
const workspaceName = "default";
const firmwareId = "DECAFBAD-0000-0000-0000-BADBADBADBAD";
const firmwareId = "109a9886-50bf-85a8-9d75-000000000000";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.firmwareOperations.listGenerateCryptoCertificateList(
for await (let item of client.cryptoKeys.listByFirmware(
resourceGroupName,
workspaceName,
firmwareId
firmwareId,
)) {
resArray.push(item);
}
@ -42,27 +42,26 @@ async function firmwareListGenerateCryptoCertificateListMaximumSetGen() {
}
/**
* This sample demonstrates how to The operation to list all crypto certificates for a firmware.
* This sample demonstrates how to Lists cryptographic key analysis results found in a firmware.
*
* @summary The operation to list all crypto certificates for a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_ListGenerateCryptoCertificateList_MinimumSet_Gen.json
* @summary Lists cryptographic key analysis results found in a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/CryptoKeys_ListByFirmware_MinimumSet_Gen.json
*/
async function firmwareListGenerateCryptoCertificateListMinimumSetGen() {
async function cryptoKeysListByFirmwareMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"C589E84A-5C11-4A25-9CF9-4E9C2F1EBFCA";
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] ||
"rgworkspaces-firmwares";
const workspaceName = "j5QE_";
const firmwareId = "wujtpcgypfpqseyrsebolarkspy";
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "FirmwareAnalysisRG";
const workspaceName = "default";
const firmwareId = "109a9886-50bf-85a8-9d75-000000000000";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.firmwareOperations.listGenerateCryptoCertificateList(
for await (let item of client.cryptoKeys.listByFirmware(
resourceGroupName,
workspaceName,
firmwareId
firmwareId,
)) {
resArray.push(item);
}
@ -70,8 +69,8 @@ async function firmwareListGenerateCryptoCertificateListMinimumSetGen() {
}
async function main() {
firmwareListGenerateCryptoCertificateListMaximumSetGen();
firmwareListGenerateCryptoCertificateListMinimumSetGen();
cryptoKeysListByFirmwareMaximumSetGen();
cryptoKeysListByFirmwareMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -0,0 +1,76 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { IoTFirmwareDefenseClient } from "@azure/arm-iotfirmwaredefense";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Lists CVE analysis results of a firmware.
*
* @summary Lists CVE analysis results of a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Cves_ListByFirmware_MaximumSet_Gen.json
*/
async function cvesListByFirmwareMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "FirmwareAnalysisRG";
const workspaceName = "default";
const firmwareId = "109a9886-50bf-85a8-9d75-000000000000";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.cves.listByFirmware(
resourceGroupName,
workspaceName,
firmwareId,
)) {
resArray.push(item);
}
console.log(resArray);
}
/**
* This sample demonstrates how to Lists CVE analysis results of a firmware.
*
* @summary Lists CVE analysis results of a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Cves_ListByFirmware_MinimumSet_Gen.json
*/
async function cvesListByFirmwareMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["IOTFIRMWAREDEFENSE_RESOURCE_GROUP"] || "FirmwareAnalysisRG";
const workspaceName = "default";
const firmwareId = "109a9886-50bf-85a8-9d75-000000000000";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.cves.listByFirmware(
resourceGroupName,
workspaceName,
firmwareId,
)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
cvesListByFirmwareMaximumSetGen();
cvesListByFirmwareMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -10,7 +10,7 @@
// Licensed under the MIT License.
import {
Firmware,
IoTFirmwareDefenseClient
IoTFirmwareDefenseClient,
} from "@azure/arm-iotfirmwaredefense";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
@ -21,9 +21,9 @@ dotenv.config();
* This sample demonstrates how to The operation to create a firmware.
*
* @summary The operation to create a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_Create_MaximumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_Create_MaximumSet_Gen.json
*/
async function firmwareCreateMaximumSetGen() {
async function firmwaresCreateMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
@ -33,6 +33,7 @@ async function firmwareCreateMaximumSetGen() {
const workspaceName = "A7";
const firmwareId = "umrkdttp";
const firmware: Firmware = {
properties: {
description: "uz",
fileName: "wresexxulcdsdd",
fileSize: 17,
@ -40,15 +41,16 @@ async function firmwareCreateMaximumSetGen() {
status: "Pending",
statusMessages: [{ message: "ulvhmhokezathzzauiitu" }],
vendor: "vycmdhgtmepcptyoubztiuudpkcpd",
version: "s"
version: "s",
},
};
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.create(
const result = await client.firmwares.create(
resourceGroupName,
workspaceName,
firmwareId,
firmware
firmware,
);
console.log(result);
}
@ -57,9 +59,9 @@ async function firmwareCreateMaximumSetGen() {
* This sample demonstrates how to The operation to create a firmware.
*
* @summary The operation to create a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_Create_MinimumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_Create_MinimumSet_Gen.json
*/
async function firmwareCreateMinimumSetGen() {
async function firmwaresCreateMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
@ -71,18 +73,18 @@ async function firmwareCreateMinimumSetGen() {
const firmware: Firmware = {};
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.create(
const result = await client.firmwares.create(
resourceGroupName,
workspaceName,
firmwareId,
firmware
firmware,
);
console.log(result);
}
async function main() {
firmwareCreateMaximumSetGen();
firmwareCreateMinimumSetGen();
firmwaresCreateMaximumSetGen();
firmwaresCreateMinimumSetGen();
}
main().catch(console.error);

Просмотреть файл

@ -18,9 +18,9 @@ dotenv.config();
* This sample demonstrates how to The operation to delete a firmware.
*
* @summary The operation to delete a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_Delete_MaximumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_Delete_MaximumSet_Gen.json
*/
async function firmwareDeleteMaximumSetGen() {
async function firmwaresDeleteMaximumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
@ -31,10 +31,10 @@ async function firmwareDeleteMaximumSetGen() {
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.delete(
const result = await client.firmwares.delete(
resourceGroupName,
workspaceName,
firmwareId
firmwareId,
);
console.log(result);
}
@ -43,9 +43,9 @@ async function firmwareDeleteMaximumSetGen() {
* This sample demonstrates how to The operation to delete a firmware.
*
* @summary The operation to delete a firmware.
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/preview/2023-02-08-preview/examples/Firmware_Delete_MinimumSet_Gen.json
* x-ms-original-file: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_Delete_MinimumSet_Gen.json
*/
async function firmwareDeleteMinimumSetGen() {
async function firmwaresDeleteMinimumSetGen() {
const subscriptionId =
process.env["IOTFIRMWAREDEFENSE_SUBSCRIPTION_ID"] ||
"685C0C6F-9867-4B1C-A534-AA3A05B54BCE";
@ -56,17 +56,17 @@ async function firmwareDeleteMinimumSetGen() {
const firmwareId = "umrkdttp";
const credential = new DefaultAzureCredential();
const client = new IoTFirmwareDefenseClient(credential, subscriptionId);
const result = await client.firmwareOperations.delete(
const result = await client.firmwares.delete(
resourceGroupName,
workspaceName,
firmwareId
firmwareId,
);
console.log(result);
}
async function main() {
firmwareDeleteMaximumSetGen();
firmwareDeleteMinimumSetGen();
firmwaresDeleteMaximumSetGen();
firmwaresDeleteMinimumSetGen();
}
main().catch(console.error);

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше