armiotfirmwaredefense

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: MIT Imports: 14 Imported by: 0

README

Azure Iotfirmwaredefense Module for Go

PkgGoDev

The armiotfirmwaredefense module provides operations for working with Azure Iotfirmwaredefense.

Source code

Getting started

Prerequisites

  • an Azure subscription
  • Go 1.18 or above (You could download and install the latest version of Go from here. It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this doc.)

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure Iotfirmwaredefense module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Iotfirmwaredefense. The azidentity module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more.

cred, err := azidentity.NewDefaultAzureCredential(nil)

For more information on authentication, please see the documentation for azidentity at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity.

Client Factory

Azure Iotfirmwaredefense module consists of one or more clients. We provide a client factory which could be used to create any client in this module.

clientFactory, err := armiotfirmwaredefense.NewClientFactory(<subscription ID>, cred, nil)

You can use ClientOptions in package github.com/Azure/azure-sdk-for-go/sdk/azcore/arm to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for azcore at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore.

options := arm.ClientOptions {
    ClientOptions: azcore.ClientOptions {
        Cloud: cloud.AzureChina,
    },
}
client, err := armiotfirmwaredefense.NewClientFactory(<subscription ID>, cred, &options)

Clients

A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory.

client := clientFactory.NewBinaryHardeningClient()

Fakes

The fake package contains types used for constructing in-memory fake servers used in unit tests. This allows writing tests to cover various success/error conditions without the need for connecting to a live service.

Please see https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/samples/fakes for details and examples on how to use fakes.

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the Iotfirmwaredefense label.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionType

type ActionType string

ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.

const (
	ActionTypeInternal ActionType = "Internal"
)

func PossibleActionTypeValues

func PossibleActionTypeValues() []ActionType

PossibleActionTypeValues returns the possible values for the ActionType const type.

type BinaryHardeningClient added in v1.0.0

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

BinaryHardeningClient contains the methods for the BinaryHardening group. Don't use this type directly, use NewBinaryHardeningClient() instead.

func NewBinaryHardeningClient added in v1.0.0

func NewBinaryHardeningClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BinaryHardeningClient, error)

NewBinaryHardeningClient creates a new instance of BinaryHardeningClient with the specified values.

  • subscriptionID - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*BinaryHardeningClient) NewListByFirmwarePager added in v1.0.0

func (client *BinaryHardeningClient) NewListByFirmwarePager(resourceGroupName string, workspaceName string, firmwareID string, options *BinaryHardeningClientListByFirmwareOptions) *runtime.Pager[BinaryHardeningClientListByFirmwareResponse]

NewListByFirmwarePager - Lists binary hardening analysis results of a firmware.

Generated from API version 2024-01-10

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • workspaceName - The name of the firmware analysis workspace.
  • firmwareID - The id of the firmware.
  • options - BinaryHardeningClientListByFirmwareOptions contains the optional parameters for the BinaryHardeningClient.NewListByFirmwarePager method.
Example (BinaryHardeningListByFirmwareMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/BinaryHardening_ListByFirmware_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotfirmwaredefense.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewBinaryHardeningClient().NewListByFirmwarePager("FirmwareAnalysisRG", "default", "109a9886-50bf-85a8-9d75-000000000000", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.BinaryHardeningListResult = armiotfirmwaredefense.BinaryHardeningListResult{
		// 	Value: []*armiotfirmwaredefense.BinaryHardeningResource{
		// 		{
		// 			Name: to.Ptr("cd31ca40-6772-44f8-9180-000000000000"),
		// 			Type: to.Ptr("Microsoft.IoTFirmwareDefense/workspaces/firmwares/binaryHardeningResults"),
		// 			ID: to.Ptr("/subscriptions/07aed47b-60ad-4d6e-a07a-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/109a9886-50bf-85a8-9d75-000000000000/binaryHardeningResults/cd31ca40-6772-44f8-9180-000000000000"),
		// 			Properties: &armiotfirmwaredefense.BinaryHardeningResult{
		// 				Architecture: to.Ptr("ARM"),
		// 				BinaryHardeningID: to.Ptr("cd31ca40-6772-44f8-9180-000000000000"),
		// 				Class: to.Ptr("Bit32"),
		// 				Features: &armiotfirmwaredefense.BinaryHardeningFeatures{
		// 					Canary: to.Ptr(false),
		// 					Nx: to.Ptr(true),
		// 					Pie: to.Ptr(false),
		// 					Relro: to.Ptr(true),
		// 					Stripped: to.Ptr(true),
		// 				},
		// 				FilePath: to.Ptr("/path/to/squashfs-root/bin/bcm_boot_launcher"),
		// 				Rpath: to.Ptr("no"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("5924e71d-5f38-444e-8b08-000000000000"),
		// 			Type: to.Ptr("Microsoft.IoTFirmwareDefense/workspaces/firmwares/binaryHardeningResults"),
		// 			ID: to.Ptr("/subscriptions/07aed47b-60ad-4d6e-a07a-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/109a9886-50bf-85a8-9d75-000000000000/binaryHardeningResults/5924e71d-5f38-444e-8b08-000000000000"),
		// 			Properties: &armiotfirmwaredefense.BinaryHardeningResult{
		// 				Architecture: to.Ptr("ARM"),
		// 				BinaryHardeningID: to.Ptr("5924e71d-5f38-444e-8b08-000000000000"),
		// 				Class: to.Ptr("Bit32"),
		// 				Features: &armiotfirmwaredefense.BinaryHardeningFeatures{
		// 					Canary: to.Ptr(false),
		// 					Nx: to.Ptr(true),
		// 					Pie: to.Ptr(false),
		// 					Relro: to.Ptr(true),
		// 					Stripped: to.Ptr(true),
		// 				},
		// 				FilePath: to.Ptr("/path/to/squashfs-root/bin/archerctl"),
		// 				Rpath: to.Ptr("no"),
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (BinaryHardeningListByFirmwareMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/BinaryHardening_ListByFirmware_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotfirmwaredefense.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewBinaryHardeningClient().NewListByFirmwarePager("FirmwareAnalysisRG", "default", "109a9886-50bf-85a8-9d75-000000000000", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.BinaryHardeningListResult = armiotfirmwaredefense.BinaryHardeningListResult{
		// }
	}
}
Output:

type BinaryHardeningClientListByFirmwareOptions added in v1.0.0

type BinaryHardeningClientListByFirmwareOptions struct {
}

BinaryHardeningClientListByFirmwareOptions contains the optional parameters for the BinaryHardeningClient.NewListByFirmwarePager method.

type BinaryHardeningClientListByFirmwareResponse added in v1.0.0

type BinaryHardeningClientListByFirmwareResponse struct {
	// List of binary hardening results.
	BinaryHardeningListResult
}

BinaryHardeningClientListByFirmwareResponse contains the response from method BinaryHardeningClient.NewListByFirmwarePager.

type BinaryHardeningFeatures

type BinaryHardeningFeatures struct {
	// Canary (stack canaries) flag.
	Canary *bool

	// NX (no-execute) flag.
	Nx *bool

	// PIE (position independent executable) flag.
	Pie *bool

	// RELRO (relocation read-only) flag.
	Relro *bool

	// Stripped flag.
	Stripped *bool
}

BinaryHardeningFeatures - Binary hardening features.

func (BinaryHardeningFeatures) MarshalJSON

func (b BinaryHardeningFeatures) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BinaryHardeningFeatures.

func (*BinaryHardeningFeatures) UnmarshalJSON

func (b *BinaryHardeningFeatures) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BinaryHardeningFeatures.

type BinaryHardeningListResult added in v1.0.0

type BinaryHardeningListResult struct {
	// The uri to fetch the next page of resources.
	NextLink *string

	// READ-ONLY; The list of binary hardening results.
	Value []*BinaryHardeningResource
}

BinaryHardeningListResult - List of binary hardening results.

func (BinaryHardeningListResult) MarshalJSON added in v1.0.0

func (b BinaryHardeningListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BinaryHardeningListResult.

func (*BinaryHardeningListResult) UnmarshalJSON added in v1.0.0

func (b *BinaryHardeningListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BinaryHardeningListResult.

type BinaryHardeningResource added in v1.0.0

type BinaryHardeningResource struct {
	// The properties of a binary hardening result found within a firmware image
	Properties *BinaryHardeningResult

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

BinaryHardeningResource - binary hardening analysis result resource

func (BinaryHardeningResource) MarshalJSON added in v1.0.0

func (b BinaryHardeningResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BinaryHardeningResource.

func (*BinaryHardeningResource) UnmarshalJSON added in v1.0.0

func (b *BinaryHardeningResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BinaryHardeningResource.

type BinaryHardeningResult added in v1.0.0

type BinaryHardeningResult struct {
	// The architecture of the uploaded firmware.
	Architecture *string

	// ID for the binary hardening result.
	BinaryHardeningID *string

	// The executable class to indicate 32 or 64 bit.
	Class *string

	// Binary hardening features.
	Features *BinaryHardeningFeatures

	// The executable path.
	FilePath *string

	// The rpath of the uploaded firmware.
	Rpath *string

	// The runpath of the uploaded firmware.
	Runpath *string
}

BinaryHardeningResult - Binary hardening of a firmware.

func (BinaryHardeningResult) MarshalJSON added in v1.0.0

func (b BinaryHardeningResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BinaryHardeningResult.

func (*BinaryHardeningResult) UnmarshalJSON added in v1.0.0

func (b *BinaryHardeningResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BinaryHardeningResult.

type BinaryHardeningSummaryResource added in v1.0.0

type BinaryHardeningSummaryResource struct {
	// REQUIRED; Describes the type of summary.
	SummaryType *SummaryType

	// Canary summary percentage
	Canary *int32

	// NX summary percentage
	Nx *int32

	// PIE summary percentage
	Pie *int32

	// RELRO summary percentage
	Relro *int32

	// Stripped summary percentage
	Stripped *int32

	// Total number of binaries that were analyzed
	TotalFiles *int64
}

BinaryHardeningSummaryResource - Properties for a binary hardening analysis summary.

func (*BinaryHardeningSummaryResource) GetSummaryResourceProperties added in v1.0.0

func (b *BinaryHardeningSummaryResource) GetSummaryResourceProperties() *SummaryResourceProperties

GetSummaryResourceProperties implements the SummaryResourcePropertiesClassification interface for type BinaryHardeningSummaryResource.

func (BinaryHardeningSummaryResource) MarshalJSON added in v1.0.0

func (b BinaryHardeningSummaryResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BinaryHardeningSummaryResource.

func (*BinaryHardeningSummaryResource) UnmarshalJSON added in v1.0.0

func (b *BinaryHardeningSummaryResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BinaryHardeningSummaryResource.

type ClientFactory

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

ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.

func NewClientFactory

func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)

NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.

  • subscriptionID - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ClientFactory) NewBinaryHardeningClient added in v1.0.0

func (c *ClientFactory) NewBinaryHardeningClient() *BinaryHardeningClient

NewBinaryHardeningClient creates a new instance of BinaryHardeningClient.

func (*ClientFactory) NewCryptoCertificatesClient added in v1.0.0

func (c *ClientFactory) NewCryptoCertificatesClient() *CryptoCertificatesClient

NewCryptoCertificatesClient creates a new instance of CryptoCertificatesClient.

func (*ClientFactory) NewCryptoKeysClient added in v1.0.0

func (c *ClientFactory) NewCryptoKeysClient() *CryptoKeysClient

NewCryptoKeysClient creates a new instance of CryptoKeysClient.

func (*ClientFactory) NewCvesClient added in v1.0.0

func (c *ClientFactory) NewCvesClient() *CvesClient

NewCvesClient creates a new instance of CvesClient.

func (*ClientFactory) NewFirmwaresClient added in v1.0.0

func (c *ClientFactory) NewFirmwaresClient() *FirmwaresClient

NewFirmwaresClient creates a new instance of FirmwaresClient.

func (*ClientFactory) NewOperationsClient

func (c *ClientFactory) NewOperationsClient() *OperationsClient

NewOperationsClient creates a new instance of OperationsClient.

func (*ClientFactory) NewPasswordHashesClient added in v1.0.0

func (c *ClientFactory) NewPasswordHashesClient() *PasswordHashesClient

NewPasswordHashesClient creates a new instance of PasswordHashesClient.

func (*ClientFactory) NewSbomComponentsClient added in v1.0.0

func (c *ClientFactory) NewSbomComponentsClient() *SbomComponentsClient

NewSbomComponentsClient creates a new instance of SbomComponentsClient.

func (*ClientFactory) NewSummariesClient added in v1.0.0

func (c *ClientFactory) NewSummariesClient() *SummariesClient

NewSummariesClient creates a new instance of SummariesClient.

func (*ClientFactory) NewWorkspacesClient

func (c *ClientFactory) NewWorkspacesClient() *WorkspacesClient

NewWorkspacesClient creates a new instance of WorkspacesClient.

type CreatedByType

type CreatedByType string

CreatedByType - The type of identity that created the resource.

const (
	CreatedByTypeApplication     CreatedByType = "Application"
	CreatedByTypeKey             CreatedByType = "Key"
	CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity"
	CreatedByTypeUser            CreatedByType = "User"
)

func PossibleCreatedByTypeValues

func PossibleCreatedByTypeValues() []CreatedByType

PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.

type CryptoCertificate

type CryptoCertificate struct {
	// ID for the certificate result.
	CryptoCertID *string

	// Encoding used for the certificate.
	Encoding *string

	// Expiration date for the certificate.
	ExpirationDate *time.Time

	// Fingerprint of the certificate.
	Fingerprint *string

	// Indicates if the certificate is expired.
	IsExpired *bool

	// Indicates if the certificate is self-signed.
	IsSelfSigned *bool

	// Indicates the certificate's key size is considered too small to be secure for the key algorithm.
	IsShortKeySize *bool

	// Indicates the signature algorithm used is insecure.
	IsWeakSignature *bool

	// Issue date for the certificate.
	IssuedDate *time.Time

	// Issuer information of the certificate.
	Issuer *CryptoCertificateEntity

	// Key algorithm used in the certificate.
	KeyAlgorithm *string

	// Size of the certificate's key in bits
	KeySize *int64

	// Name of the certificate.
	Name *string

	// A matching paired private key.
	PairedKey *PairedKey

	// Role of the certificate (Root CA, etc)
	Role *string

	// Serial number of the certificate.
	SerialNumber *string

	// The signature algorithm used in the certificate.
	SignatureAlgorithm *string

	// Subject information of the certificate.
	Subject *CryptoCertificateEntity

	// List of functions the certificate can fulfill.
	Usage []*string

	// READ-ONLY; List of files where this certificate was found.
	FilePaths []*string
}

CryptoCertificate - Crypto certificate properties

func (CryptoCertificate) MarshalJSON

func (c CryptoCertificate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CryptoCertificate.

func (*CryptoCertificate) UnmarshalJSON

func (c *CryptoCertificate) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CryptoCertificate.

type CryptoCertificateEntity

type CryptoCertificateEntity struct {
	// Common name of the certificate entity.
	CommonName *string

	// Country code of the certificate entity.
	Country *string

	// Organization of the certificate entity.
	Organization *string

	// The organizational unit of the certificate entity.
	OrganizationalUnit *string

	// Geographical state or province of the certificate entity.
	State *string
}

CryptoCertificateEntity - Information on an entity (distinguished name) in a cryptographic certificate.

func (CryptoCertificateEntity) MarshalJSON

func (c CryptoCertificateEntity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CryptoCertificateEntity.

func (*CryptoCertificateEntity) UnmarshalJSON

func (c *CryptoCertificateEntity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CryptoCertificateEntity.

type CryptoCertificateListResult added in v1.0.0

type CryptoCertificateListResult struct {
	// The uri to fetch the next page of resources.
	NextLink *string

	// READ-ONLY; The list of crypto certificate results.
	Value []*CryptoCertificateResource
}

CryptoCertificateListResult - List of crypto certificates.

func (CryptoCertificateListResult) MarshalJSON added in v1.0.0

func (c CryptoCertificateListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CryptoCertificateListResult.

func (*CryptoCertificateListResult) UnmarshalJSON added in v1.0.0

func (c *CryptoCertificateListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CryptoCertificateListResult.

type CryptoCertificateResource added in v1.0.0

type CryptoCertificateResource struct {
	// The properties of a crypto certificate found within a firmware image
	Properties *CryptoCertificate

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

CryptoCertificateResource - Crypto certificate resource

func (CryptoCertificateResource) MarshalJSON added in v1.0.0

func (c CryptoCertificateResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CryptoCertificateResource.

func (*CryptoCertificateResource) UnmarshalJSON added in v1.0.0

func (c *CryptoCertificateResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CryptoCertificateResource.

type CryptoCertificateSummaryResource added in v1.0.0

type CryptoCertificateSummaryResource struct {
	// REQUIRED; Describes the type of summary.
	SummaryType *SummaryType

	// Total number of expired certificates found.
	Expired *int64

	// Total number of nearly expired certificates found.
	ExpiringSoon *int64

	// Total number of paired private keys found for the certificates.
	PairedKeys *int64

	// Total number of certificates found that are self-signed.
	SelfSigned *int64

	// Total number of certificates found that have an insecure key size for the key algorithm.
	ShortKeySize *int64

	// Total number of certificates found.
	TotalCertificates *int64

	// Total number of certificates found using a weak signature algorithm.
	WeakSignature *int64
}

CryptoCertificateSummaryResource - Properties for cryptographic certificate summary.

func (*CryptoCertificateSummaryResource) GetSummaryResourceProperties added in v1.0.0

func (c *CryptoCertificateSummaryResource) GetSummaryResourceProperties() *SummaryResourceProperties

GetSummaryResourceProperties implements the SummaryResourcePropertiesClassification interface for type CryptoCertificateSummaryResource.

func (CryptoCertificateSummaryResource) MarshalJSON added in v1.0.0

func (c CryptoCertificateSummaryResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CryptoCertificateSummaryResource.

func (*CryptoCertificateSummaryResource) UnmarshalJSON added in v1.0.0

func (c *CryptoCertificateSummaryResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CryptoCertificateSummaryResource.

type CryptoCertificatesClient added in v1.0.0

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

CryptoCertificatesClient contains the methods for the CryptoCertificates group. Don't use this type directly, use NewCryptoCertificatesClient() instead.

func NewCryptoCertificatesClient added in v1.0.0

func NewCryptoCertificatesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CryptoCertificatesClient, error)

NewCryptoCertificatesClient creates a new instance of CryptoCertificatesClient with the specified values.

  • subscriptionID - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*CryptoCertificatesClient) NewListByFirmwarePager added in v1.0.0

func (client *CryptoCertificatesClient) NewListByFirmwarePager(resourceGroupName string, workspaceName string, firmwareID string, options *CryptoCertificatesClientListByFirmwareOptions) *runtime.Pager[CryptoCertificatesClientListByFirmwareResponse]

NewListByFirmwarePager - Lists cryptographic certificate analysis results found in a firmware.

Generated from API version 2024-01-10

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • workspaceName - The name of the firmware analysis workspace.
  • firmwareID - The id of the firmware.
  • options - CryptoCertificatesClientListByFirmwareOptions contains the optional parameters for the CryptoCertificatesClient.NewListByFirmwarePager method.
Example (CryptoCertificatesListByFirmwareMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/CryptoCertificates_ListByFirmware_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotfirmwaredefense.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewCryptoCertificatesClient().NewListByFirmwarePager("FirmwareAnalysisRG", "default", "109a9886-50bf-85a8-9d75-000000000000", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.CryptoCertificateListResult = armiotfirmwaredefense.CryptoCertificateListResult{
		// 	Value: []*armiotfirmwaredefense.CryptoCertificateResource{
		// 		{
		// 			Name: to.Ptr("d402993a-eca1-4ef4-a13d-000000000000"),
		// 			Type: to.Ptr("Microsoft.IoTFirmwareDefense/workspaces/firmwares/cryptoCertificates"),
		// 			ID: to.Ptr("/subscriptions/07aed47b-60ad-4d6e-a07a-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/109a9886-50bf-85a8-9d75-000000000000/cryptoCertificates/d402993a-eca1-4ef4-a13d-000000000000"),
		// 			Properties: &armiotfirmwaredefense.CryptoCertificate{
		// 				Name: to.Ptr("PolarSSL Test Client 2"),
		// 				CryptoCertID: to.Ptr("d402993a-eca1-4ef4-a13d-000000000000"),
		// 				Encoding: to.Ptr("DER"),
		// 				ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2035-09-22T15:52:04.000Z"); return t}()),
		// 				FilePaths: []*string{
		// 					to.Ptr("/path/to/keys-certs/ntgr_ra_aws")},
		// 					Fingerprint: to.Ptr("EA:70:F9:B4:45:F3:41:BC:33:22:34:A4:98:DD:69:04:1D:E8:82:05"),
		// 					IsExpired: to.Ptr(false),
		// 					IsSelfSigned: to.Ptr(false),
		// 					IsShortKeySize: to.Ptr(false),
		// 					IssuedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-24T15:52:04.000Z"); return t}()),
		// 					Issuer: &armiotfirmwaredefense.CryptoCertificateEntity{
		// 						CommonName: to.Ptr("Polarssl Test EC CA"),
		// 						Country: to.Ptr("NL"),
		// 						Organization: to.Ptr("PolarSSL"),
		// 						OrganizationalUnit: to.Ptr(""),
		// 						State: to.Ptr(""),
		// 					},
		// 					KeyAlgorithm: to.Ptr("ECC"),
		// 					KeySize: to.Ptr[int64](256),
		// 					PairedKey: &armiotfirmwaredefense.PairedKey{
		// 						Type: to.Ptr("Private"),
		// 						ID: to.Ptr("cd1bdece-0576-4ff5-8039-000000000000"),
		// 					},
		// 					Role: to.Ptr("Non-CA"),
		// 					SerialNumber: to.Ptr("0D"),
		// 					SignatureAlgorithm: to.Ptr("sha256ECDSA"),
		// 					Subject: &armiotfirmwaredefense.CryptoCertificateEntity{
		// 						CommonName: to.Ptr("PolarSSL Test Client 2"),
		// 						Country: to.Ptr("NL"),
		// 						Organization: to.Ptr("PolarSSL"),
		// 						OrganizationalUnit: to.Ptr(""),
		// 						State: to.Ptr(""),
		// 					},
		// 					Usage: []*string{
		// 					},
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("78fd7929-fac1-45cd-bfc6-000000000000"),
		// 				Type: to.Ptr("Microsoft.IoTFirmwareDefense/workspaces/firmwares/cryptoCertificates"),
		// 				ID: to.Ptr("/subscriptions/07aed47b-60ad-4d6e-a07a-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/109a9886-50bf-85a8-9d75-000000000000/cryptoCertificates/78fd7929-fac1-45cd-bfc6-000000000000"),
		// 				Properties: &armiotfirmwaredefense.CryptoCertificate{
		// 					Name: to.Ptr("DigiCert SHA2 Secure Server CA"),
		// 					CryptoCertID: to.Ptr("78fd7929-fac1-45cd-bfc6-000000000000"),
		// 					Encoding: to.Ptr("DER"),
		// 					ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-03-08T12:00:00.000Z"); return t}()),
		// 					FilePaths: []*string{
		// 						to.Ptr("/path/to/keys-certs/revoke.pem"),
		// 						to.Ptr("/path/to/keys-certs/sample.crt")},
		// 						Fingerprint: to.Ptr("1F:B8:6B:11:68:EC:74:31:54:06:2E:8C:9C:C5:B1:71:A4:B7:CC:B4"),
		// 						IsExpired: to.Ptr(true),
		// 						IsSelfSigned: to.Ptr(false),
		// 						IsShortKeySize: to.Ptr(false),
		// 						IssuedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2013-03-08T12:00:00.000Z"); return t}()),
		// 						Issuer: &armiotfirmwaredefense.CryptoCertificateEntity{
		// 							CommonName: to.Ptr("DigiCert Global Root CA"),
		// 							Country: to.Ptr("US"),
		// 							Organization: to.Ptr("DigiCert Inc"),
		// 							OrganizationalUnit: to.Ptr("www.digicert.com"),
		// 							State: to.Ptr(""),
		// 						},
		// 						KeyAlgorithm: to.Ptr("RSA"),
		// 						KeySize: to.Ptr[int64](2048),
		// 						PairedKey: &armiotfirmwaredefense.PairedKey{
		// 						},
		// 						Role: to.Ptr("Intermediate"),
		// 						SerialNumber: to.Ptr("01:FD:A3:EB:6E:CA:75:C8:88:43:8B:72:4B:CF:BC:91"),
		// 						SignatureAlgorithm: to.Ptr("sha256RSA"),
		// 						Subject: &armiotfirmwaredefense.CryptoCertificateEntity{
		// 							CommonName: to.Ptr("DigiCert SHA2 Secure Server CA"),
		// 							Country: to.Ptr("US"),
		// 							Organization: to.Ptr("DigiCert Inc"),
		// 							OrganizationalUnit: to.Ptr(""),
		// 							State: to.Ptr(""),
		// 						},
		// 						Usage: []*string{
		// 							to.Ptr("CrlSign"),
		// 							to.Ptr("KeyCertSign"),
		// 							to.Ptr("DigitalSignature")},
		// 						},
		// 				}},
		// 			}
	}
}
Output:

Example (CryptoCertificatesListByFirmwareMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/CryptoCertificates_ListByFirmware_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotfirmwaredefense.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewCryptoCertificatesClient().NewListByFirmwarePager("FirmwareAnalysisRG", "default", "109a9886-50bf-85a8-9d75-000000000000", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.CryptoCertificateListResult = armiotfirmwaredefense.CryptoCertificateListResult{
		// }
	}
}
Output:

type CryptoCertificatesClientListByFirmwareOptions added in v1.0.0

type CryptoCertificatesClientListByFirmwareOptions struct {
}

CryptoCertificatesClientListByFirmwareOptions contains the optional parameters for the CryptoCertificatesClient.NewListByFirmwarePager method.

type CryptoCertificatesClientListByFirmwareResponse added in v1.0.0

type CryptoCertificatesClientListByFirmwareResponse struct {
	// List of crypto certificates.
	CryptoCertificateListResult
}

CryptoCertificatesClientListByFirmwareResponse contains the response from method CryptoCertificatesClient.NewListByFirmwarePager.

type CryptoKey

type CryptoKey struct {
	// ID for the key result.
	CryptoKeyID *string

	// Indicates the key size is considered too small to be secure for the algorithm.
	IsShortKeySize *bool

	// Key algorithm name.
	KeyAlgorithm *string

	// Size of the key in bits.
	KeySize *int64

	// Type of the key (public or private).
	KeyType *string

	// A matching paired key or certificate.
	PairedKey *PairedKey

	// Functions the key can fulfill.
	Usage []*string

	// READ-ONLY; List of files where this key was found.
	FilePaths []*string
}

CryptoKey - Crypto key properties

func (CryptoKey) MarshalJSON

func (c CryptoKey) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CryptoKey.

func (*CryptoKey) UnmarshalJSON

func (c *CryptoKey) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CryptoKey.

type CryptoKeyListResult added in v1.0.0

type CryptoKeyListResult struct {
	// The uri to fetch the next page of resources.
	NextLink *string

	// READ-ONLY; The list of crypto key results.
	Value []*CryptoKeyResource
}

CryptoKeyListResult - List of crypto keys.

func (CryptoKeyListResult) MarshalJSON added in v1.0.0

func (c CryptoKeyListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CryptoKeyListResult.

func (*CryptoKeyListResult) UnmarshalJSON added in v1.0.0

func (c *CryptoKeyListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CryptoKeyListResult.

type CryptoKeyResource added in v1.0.0

type CryptoKeyResource struct {
	// The properties of a crypto key found within a firmware image
	Properties *CryptoKey

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

CryptoKeyResource - Crypto key resource

func (CryptoKeyResource) MarshalJSON added in v1.0.0

func (c CryptoKeyResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CryptoKeyResource.

func (*CryptoKeyResource) UnmarshalJSON added in v1.0.0

func (c *CryptoKeyResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CryptoKeyResource.

type CryptoKeySummaryResource added in v1.0.0

type CryptoKeySummaryResource struct {
	// REQUIRED; Describes the type of summary.
	SummaryType *SummaryType

	// Total number of keys found that have a matching paired key or certificate.
	PairedKeys *int64

	// Total number of private keys found.
	PrivateKeys *int64

	// Total number of (non-certificate) public keys found.
	PublicKeys *int64

	// Total number of keys found that have an insecure key size for the algorithm.
	ShortKeySize *int64

	// Total number of cryptographic keys found.
	TotalKeys *int64
}

CryptoKeySummaryResource - Properties for cryptographic key summary.

func (*CryptoKeySummaryResource) GetSummaryResourceProperties added in v1.0.0

func (c *CryptoKeySummaryResource) GetSummaryResourceProperties() *SummaryResourceProperties

GetSummaryResourceProperties implements the SummaryResourcePropertiesClassification interface for type CryptoKeySummaryResource.

func (CryptoKeySummaryResource) MarshalJSON added in v1.0.0

func (c CryptoKeySummaryResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CryptoKeySummaryResource.

func (*CryptoKeySummaryResource) UnmarshalJSON added in v1.0.0

func (c *CryptoKeySummaryResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CryptoKeySummaryResource.

type CryptoKeysClient added in v1.0.0

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

CryptoKeysClient contains the methods for the CryptoKeys group. Don't use this type directly, use NewCryptoKeysClient() instead.

func NewCryptoKeysClient added in v1.0.0

func NewCryptoKeysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CryptoKeysClient, error)

NewCryptoKeysClient creates a new instance of CryptoKeysClient with the specified values.

  • subscriptionID - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*CryptoKeysClient) NewListByFirmwarePager added in v1.0.0

func (client *CryptoKeysClient) NewListByFirmwarePager(resourceGroupName string, workspaceName string, firmwareID string, options *CryptoKeysClientListByFirmwareOptions) *runtime.Pager[CryptoKeysClientListByFirmwareResponse]

NewListByFirmwarePager - Lists cryptographic key analysis results found in a firmware.

Generated from API version 2024-01-10

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • workspaceName - The name of the firmware analysis workspace.
  • firmwareID - The id of the firmware.
  • options - CryptoKeysClientListByFirmwareOptions contains the optional parameters for the CryptoKeysClient.NewListByFirmwarePager method.
Example (CryptoKeysListByFirmwareMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/CryptoKeys_ListByFirmware_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotfirmwaredefense.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewCryptoKeysClient().NewListByFirmwarePager("FirmwareAnalysisRG", "default", "109a9886-50bf-85a8-9d75-000000000000", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.CryptoKeyListResult = armiotfirmwaredefense.CryptoKeyListResult{
		// 	Value: []*armiotfirmwaredefense.CryptoKeyResource{
		// 		{
		// 			Name: to.Ptr("cd1bdece-0576-4ff5-8039-000000000000"),
		// 			Type: to.Ptr("Microsoft.IoTFirmwareDefense/workspaces/firmwares/cryptoKeys"),
		// 			ID: to.Ptr("/subscriptions/07aed47b-60ad-4d6e-a07a-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/109a9886-50bf-85a8-9d75-000000000000/cryptoKeys/cd1bdece-0576-4ff5-8039-000000000000"),
		// 			Properties: &armiotfirmwaredefense.CryptoKey{
		// 				CryptoKeyID: to.Ptr("cd1bdece-0576-4ff5-8039-000000000000"),
		// 				FilePaths: []*string{
		// 					to.Ptr("/path/to/keys-certs/ntgr_ra_aws")},
		// 					IsShortKeySize: to.Ptr(false),
		// 					KeyAlgorithm: to.Ptr("ECDsa"),
		// 					KeySize: to.Ptr[int64](256),
		// 					KeyType: to.Ptr("Private"),
		// 					PairedKey: &armiotfirmwaredefense.PairedKey{
		// 						Type: to.Ptr("Public"),
		// 						ID: to.Ptr("95f41328-cc3b-41a1-bd70-000000000000"),
		// 					},
		// 					Usage: []*string{
		// 					},
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("5adeaa85-f30a-4295-9b4a-000000000000"),
		// 				Type: to.Ptr("Microsoft.IoTFirmwareDefense/workspaces/firmwares/cryptoKeys"),
		// 				ID: to.Ptr("/subscriptions/07aed47b-60ad-4d6e-a07a-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/109a9886-50bf-85a8-9d75-000000000000/cryptoKeys/5adeaa85-f30a-4295-9b4a-000000000000"),
		// 				Properties: &armiotfirmwaredefense.CryptoKey{
		// 					CryptoKeyID: to.Ptr("5adeaa85-f30a-4295-9b4a-000000000000"),
		// 					FilePaths: []*string{
		// 						to.Ptr("/path/to/keys-certs/addon.key")},
		// 						IsShortKeySize: to.Ptr(true),
		// 						KeyAlgorithm: to.Ptr("RSA"),
		// 						KeySize: to.Ptr[int64](1024),
		// 						KeyType: to.Ptr("Public"),
		// 						PairedKey: &armiotfirmwaredefense.PairedKey{
		// 						},
		// 						Usage: []*string{
		// 						},
		// 					},
		// 			}},
		// 		}
	}
}
Output:

Example (CryptoKeysListByFirmwareMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/CryptoKeys_ListByFirmware_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotfirmwaredefense.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewCryptoKeysClient().NewListByFirmwarePager("FirmwareAnalysisRG", "default", "109a9886-50bf-85a8-9d75-000000000000", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.CryptoKeyListResult = armiotfirmwaredefense.CryptoKeyListResult{
		// }
	}
}
Output:

type CryptoKeysClientListByFirmwareOptions added in v1.0.0

type CryptoKeysClientListByFirmwareOptions struct {
}

CryptoKeysClientListByFirmwareOptions contains the optional parameters for the CryptoKeysClient.NewListByFirmwarePager method.

type CryptoKeysClientListByFirmwareResponse added in v1.0.0

type CryptoKeysClientListByFirmwareResponse struct {
	// List of crypto keys.
	CryptoKeyListResult
}

CryptoKeysClientListByFirmwareResponse contains the response from method CryptoKeysClient.NewListByFirmwarePager.

type CveComponent added in v1.0.0

type CveComponent struct {
	// ID of the SBOM component
	ComponentID *string

	// Name of the SBOM component
	Name *string

	// Version of the SBOM component.
	Version *string
}

CveComponent - Properties of the SBOM component for a CVE.

func (CveComponent) MarshalJSON added in v1.0.0

func (c CveComponent) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CveComponent.

func (*CveComponent) UnmarshalJSON added in v1.0.0

func (c *CveComponent) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CveComponent.

type CveLink struct {
	// The destination of the reference link.
	Href *string

	// The label of the reference link.
	Label *string
}

CveLink - Properties of a reference link for a CVE.

func (CveLink) MarshalJSON

func (c CveLink) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CveLink.

func (*CveLink) UnmarshalJSON

func (c *CveLink) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CveLink.

type CveListResult added in v1.0.0

type CveListResult struct {
	// The uri to fetch the next page of resources.
	NextLink *string

	// READ-ONLY; The list of CVE results.
	Value []*CveResource
}

CveListResult - List of CVE results.

func (CveListResult) MarshalJSON added in v1.0.0

func (c CveListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CveListResult.

func (*CveListResult) UnmarshalJSON added in v1.0.0

func (c *CveListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CveListResult.

type CveResource added in v1.0.0

type CveResource struct {
	// The properties of a CVE result found within a firmware image
	Properties *CveResult

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

CveResource - CVE analysis result resource

func (CveResource) MarshalJSON added in v1.0.0

func (c CveResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CveResource.

func (*CveResource) UnmarshalJSON added in v1.0.0

func (c *CveResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CveResource.

type CveResult added in v1.0.0

type CveResult struct {
	// The SBOM component for the CVE.
	Component *CveComponent

	// ID of the CVE result.
	CveID *string

	// A single CVSS score to represent the CVE. If a V3 score is specified, then it will use the V3 score. Otherwise if the V2
	// score is specified it will be the V2 score.
	CvssScore *string

	// CVSS V2 score of the CVE.
	CvssV2Score *string

	// CVSS V3 score of the CVE.
	CvssV3Score *string

	// CVSS version of the CVE.
	CvssVersion *string

	// The CVE description.
	Description *string

	// Name of the CVE.
	Name *string

	// Severity of the CVE.
	Severity *string

	// READ-ONLY; The list of reference links for the CVE.
	Links []*CveLink
}

CveResult - Details of a CVE detected in firmware.

func (CveResult) MarshalJSON added in v1.0.0

func (c CveResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CveResult.

func (*CveResult) UnmarshalJSON added in v1.0.0

func (c *CveResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CveResult.

type CveSummary

type CveSummary struct {
	// REQUIRED; Describes the type of summary.
	SummaryType *SummaryType

	// The total number of critical severity CVEs detected
	Critical *int64

	// The total number of high severity CVEs detected
	High *int64

	// The total number of low severity CVEs detected
	Low *int64

	// The total number of medium severity CVEs detected
	Medium *int64

	// The total number of unknown severity CVEs detected
	Unknown *int64
}

CveSummary - Properties for a CVE analysis summary.

func (*CveSummary) GetSummaryResourceProperties added in v1.0.0

func (c *CveSummary) GetSummaryResourceProperties() *SummaryResourceProperties

GetSummaryResourceProperties implements the SummaryResourcePropertiesClassification interface for type CveSummary.

func (CveSummary) MarshalJSON

func (c CveSummary) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CveSummary.

func (*CveSummary) UnmarshalJSON

func (c *CveSummary) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CveSummary.

type CvesClient added in v1.0.0

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

CvesClient contains the methods for the Cves group. Don't use this type directly, use NewCvesClient() instead.

func NewCvesClient added in v1.0.0

func NewCvesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CvesClient, error)

NewCvesClient creates a new instance of CvesClient with the specified values.

  • subscriptionID - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*CvesClient) NewListByFirmwarePager added in v1.0.0

func (client *CvesClient) NewListByFirmwarePager(resourceGroupName string, workspaceName string, firmwareID string, options *CvesClientListByFirmwareOptions) *runtime.Pager[CvesClientListByFirmwareResponse]

NewListByFirmwarePager - Lists CVE analysis results of a firmware.

Generated from API version 2024-01-10

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • workspaceName - The name of the firmware analysis workspace.
  • firmwareID - The id of the firmware.
  • options - CvesClientListByFirmwareOptions contains the optional parameters for the CvesClient.NewListByFirmwarePager method.
Example (CvesListByFirmwareMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Cves_ListByFirmware_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotfirmwaredefense.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewCvesClient().NewListByFirmwarePager("FirmwareAnalysisRG", "default", "109a9886-50bf-85a8-9d75-000000000000", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.CveListResult = armiotfirmwaredefense.CveListResult{
		// 	Value: []*armiotfirmwaredefense.CveResource{
		// 		{
		// 			Name: to.Ptr("7496e8a7-537e-40e4-a43b-000000000000"),
		// 			Type: to.Ptr("Microsoft.IoTFirmwareDefense/workspaces/firmwares/cves"),
		// 			ID: to.Ptr("/subscriptions/07aed47b-60ad-4d6e-a07a-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/109a9886-50bf-85a8-9d75-000000000000/cves/7496e8a7-537e-40e4-a43b-000000000000"),
		// 			Properties: &armiotfirmwaredefense.CveResult{
		// 				Name: to.Ptr("CVE-2018-1000500"),
		// 				Description: to.Ptr("Busybox contains a Missing SSL certificate validation vulnerability in The \"busybox wget\" applet that can result in arbitrary code execution. This attack appear to be exploitable via Simply download any file over HTTPS using \"busybox wget https://compromised-domain.com/important-file\"."),
		// 				Component: &armiotfirmwaredefense.CveComponent{
		// 				},
		// 				CveID: to.Ptr("7496e8a7-537e-40e4-a43b-000000000000"),
		// 				CvssScore: to.Ptr("8.1"),
		// 				CvssV2Score: to.Ptr("6.8"),
		// 				CvssV3Score: to.Ptr("8.1"),
		// 				CvssVersion: to.Ptr("3"),
		// 				Links: []*armiotfirmwaredefense.CveLink{
		// 					{
		// 						Href: to.Ptr("http://lists.busybox.net/pipermail/busybox/2018-May/086462.html"),
		// 						Label: to.Ptr("http://lists.busybox.net/pipermail/busybox/2018-May/086462.html"),
		// 					},
		// 					{
		// 						Href: to.Ptr("https://git.busybox.net/busybox/commit/?id=45fa3f18adf57ef9d743038743d9c90573aeeb91"),
		// 						Label: to.Ptr("https://git.busybox.net/busybox/commit/?id=45fa3f18adf57ef9d743038743d9c90573aeeb91"),
		// 					},
		// 					{
		// 						Href: to.Ptr("https://usn.ubuntu.com/4531-1/"),
		// 				}},
		// 				Severity: to.Ptr("High"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("fad414da-0055-4dfb-a3d4-000000000000"),
		// 			Type: to.Ptr("Microsoft.IoTFirmwareDefense/workspaces/firmwares/cves"),
		// 			ID: to.Ptr("/subscriptions/07aed47b-60ad-4d6e-a07a-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/109a9886-50bf-85a8-9d75-000000000000/cves/fad414da-0055-4dfb-a3d4-000000000000"),
		// 			Properties: &armiotfirmwaredefense.CveResult{
		// 				Name: to.Ptr("CVE-2022-28391"),
		// 				Description: to.Ptr("BusyBox through 1.35.0 allows remote attackers to execute arbitrary code if netstat is used to print a DNS PTR record's value to a VT compatible terminal. Alternatively, the attacker could choose to change the terminal's colors."),
		// 				Component: &armiotfirmwaredefense.CveComponent{
		// 				},
		// 				CveID: to.Ptr("fad414da-0055-4dfb-a3d4-000000000000"),
		// 				CvssScore: to.Ptr("8.8"),
		// 				CvssV2Score: to.Ptr("6.8"),
		// 				CvssV3Score: to.Ptr("8.8"),
		// 				CvssVersion: to.Ptr("3"),
		// 				Links: []*armiotfirmwaredefense.CveLink{
		// 					{
		// 						Href: to.Ptr("https://git.alpinelinux.org/aports/plain/main/busybox/0002-nslookup-sanitize-all-printed-strings-with-printable.patch"),
		// 						Label: to.Ptr("https://git.alpinelinux.org/aports/plain/main/busybox/0002-nslookup-sanitize-all-printed-strings-with-printable.patch"),
		// 					},
		// 					{
		// 						Href: to.Ptr("https://gitlab.alpinelinux.org/alpine/aports/-/issues/13661"),
		// 						Label: to.Ptr("https://gitlab.alpinelinux.org/alpine/aports/-/issues/13661"),
		// 					},
		// 					{
		// 						Href: to.Ptr("https://git.alpinelinux.org/aports/plain/main/busybox/0001-libbb-sockaddr2str-ensure-only-printable-characters-.patch"),
		// 						Label: to.Ptr("https://git.alpinelinux.org/aports/plain/main/busybox/0001-libbb-sockaddr2str-ensure-only-printable-characters-.patch"),
		// 				}},
		// 				Severity: to.Ptr("High"),
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (CvesListByFirmwareMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Cves_ListByFirmware_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotfirmwaredefense.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewCvesClient().NewListByFirmwarePager("FirmwareAnalysisRG", "default", "109a9886-50bf-85a8-9d75-000000000000", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.CveListResult = armiotfirmwaredefense.CveListResult{
		// }
	}
}
Output:

type CvesClientListByFirmwareOptions added in v1.0.0

type CvesClientListByFirmwareOptions struct {
}

CvesClientListByFirmwareOptions contains the optional parameters for the CvesClient.NewListByFirmwarePager method.

type CvesClientListByFirmwareResponse added in v1.0.0

type CvesClientListByFirmwareResponse struct {
	// List of CVE results.
	CveListResult
}

CvesClientListByFirmwareResponse contains the response from method CvesClient.NewListByFirmwarePager.

type Firmware

type Firmware struct {
	// The properties of a firmware
	Properties *FirmwareProperties

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

Firmware definition

func (Firmware) MarshalJSON

func (f Firmware) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Firmware.

func (*Firmware) UnmarshalJSON

func (f *Firmware) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Firmware.

type FirmwareList

type FirmwareList struct {
	// The uri to fetch the next page of asset.
	NextLink *string

	// READ-ONLY; The list of firmwares.
	Value []*Firmware
}

FirmwareList - List of firmwares

func (FirmwareList) MarshalJSON

func (f FirmwareList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FirmwareList.

func (*FirmwareList) UnmarshalJSON

func (f *FirmwareList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type FirmwareList.

type FirmwareProperties

type FirmwareProperties struct {
	// User-specified description of the firmware.
	Description *string

	// File name for a firmware that user uploaded.
	FileName *string

	// File size of the uploaded firmware image.
	FileSize *int64

	// Firmware model.
	Model *string

	// The status of firmware scan.
	Status *Status

	// A list of errors or other messages generated during firmware analysis
	StatusMessages []*StatusMessage

	// Firmware vendor.
	Vendor *string

	// Firmware version.
	Version *string

	// READ-ONLY; Provisioning state of the resource.
	ProvisioningState *ProvisioningState
}

FirmwareProperties - Firmware properties.

func (FirmwareProperties) MarshalJSON

func (f FirmwareProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FirmwareProperties.

func (*FirmwareProperties) UnmarshalJSON

func (f *FirmwareProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type FirmwareProperties.

type FirmwareSummary

type FirmwareSummary struct {
	// REQUIRED; Describes the type of summary.
	SummaryType *SummaryType

	// Time used for analysis
	AnalysisTimeSeconds *int64

	// Binary count
	BinaryCount *int64

	// Components count.
	ComponentCount *int64

	// Extracted file count.
	ExtractedFileCount *int64

	// Total extracted size of the firmware in bytes.
	ExtractedSize *int64

	// Firmware file size in bytes.
	FileSize *int64

	// The number of root file systems found.
	RootFileSystems *int64
}

FirmwareSummary - Properties for high level summary of firmware analysis results.

func (*FirmwareSummary) GetSummaryResourceProperties added in v1.0.0

func (f *FirmwareSummary) GetSummaryResourceProperties() *SummaryResourceProperties

GetSummaryResourceProperties implements the SummaryResourcePropertiesClassification interface for type FirmwareSummary.

func (FirmwareSummary) MarshalJSON

func (f FirmwareSummary) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FirmwareSummary.

func (*FirmwareSummary) UnmarshalJSON

func (f *FirmwareSummary) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type FirmwareSummary.

type FirmwareUpdateDefinition

type FirmwareUpdateDefinition struct {
	// The editable properties of a firmware
	Properties *FirmwareProperties
}

FirmwareUpdateDefinition - Firmware definition

func (FirmwareUpdateDefinition) MarshalJSON

func (f FirmwareUpdateDefinition) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FirmwareUpdateDefinition.

func (*FirmwareUpdateDefinition) UnmarshalJSON

func (f *FirmwareUpdateDefinition) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type FirmwareUpdateDefinition.

type FirmwaresClient added in v1.0.0

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

FirmwaresClient contains the methods for the Firmwares group. Don't use this type directly, use NewFirmwaresClient() instead.

func NewFirmwaresClient added in v1.0.0

func NewFirmwaresClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FirmwaresClient, error)

NewFirmwaresClient creates a new instance of FirmwaresClient with the specified values.

  • subscriptionID - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*FirmwaresClient) Create added in v1.0.0

func (client *FirmwaresClient) Create(ctx context.Context, resourceGroupName string, workspaceName string, firmwareID string, firmware Firmware, options *FirmwaresClientCreateOptions) (FirmwaresClientCreateResponse, error)

Create - The operation to create a firmware. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-10

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • workspaceName - The name of the firmware analysis workspace.
  • firmwareID - The id of the firmware.
  • firmware - Details of the firmware being created or updated.
  • options - FirmwaresClientCreateOptions contains the optional parameters for the FirmwaresClient.Create method.
Example (FirmwaresCreateMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_Create_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotfirmwaredefense.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewFirmwaresClient().Create(ctx, "rgworkspaces-firmwares", "A7", "umrkdttp", armiotfirmwaredefense.Firmware{
		Properties: &armiotfirmwaredefense.FirmwareProperties{
			Description: to.Ptr("uz"),
			FileName:    to.Ptr("wresexxulcdsdd"),
			FileSize:    to.Ptr[int64](17),
			Model:       to.Ptr("f"),
			Status:      to.Ptr(armiotfirmwaredefense.StatusPending),
			StatusMessages: []*armiotfirmwaredefense.StatusMessage{
				{
					Message: to.Ptr("ulvhmhokezathzzauiitu"),
				}},
			Vendor:  to.Ptr("vycmdhgtmepcptyoubztiuudpkcpd"),
			Version: to.Ptr("s"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Firmware = armiotfirmwaredefense.Firmware{
	// 	Name: to.Ptr("brmvnojpmxsgckdviynhxhftvcvbw"),
	// 	Type: to.Ptr("vlxhdbrphhnttmxvawwwewza"),
	// 	ID: to.Ptr("/subscriptions/blah/resourceGroups/blah/providers/blah/firmwares/blah"),
	// 	SystemData: &armiotfirmwaredefense.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-02-19T06:40:29.228Z"); return t}()),
	// 		CreatedBy: to.Ptr("aylilpicryidesowemwnl"),
	// 		CreatedByType: to.Ptr(armiotfirmwaredefense.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-02-19T06:40:29.228Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("bgtifu"),
	// 		LastModifiedByType: to.Ptr(armiotfirmwaredefense.CreatedByTypeUser),
	// 	},
	// 	Properties: &armiotfirmwaredefense.FirmwareProperties{
	// 		Description: to.Ptr("uz"),
	// 		FileName: to.Ptr("wresexxulcdsdd"),
	// 		FileSize: to.Ptr[int64](17),
	// 		Model: to.Ptr("f"),
	// 		ProvisioningState: to.Ptr(armiotfirmwaredefense.ProvisioningStateSucceeded),
	// 		Status: to.Ptr(armiotfirmwaredefense.StatusPending),
	// 		StatusMessages: []*armiotfirmwaredefense.StatusMessage{
	// 			{
	// 				Message: to.Ptr("ulvhmhokezathzzauiitu"),
	// 		}},
	// 		Vendor: to.Ptr("vycmdhgtmepcptyoubztiuudpkcpd"),
	// 		Version: to.Ptr("s"),
	// 	},
	// }
}
Output:

Example (FirmwaresCreateMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_Create_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotfirmwaredefense.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewFirmwaresClient().Create(ctx, "rgworkspaces-firmwares", "A7", "umrkdttp", armiotfirmwaredefense.Firmware{}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Firmware = armiotfirmwaredefense.Firmware{
	// }
}
Output:

func (*FirmwaresClient) Delete added in v1.0.0

func (client *FirmwaresClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, firmwareID string, options *FirmwaresClientDeleteOptions) (FirmwaresClientDeleteResponse, error)

Delete - The operation to delete a firmware. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-10

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • workspaceName - The name of the firmware analysis workspace.
  • firmwareID - The id of the firmware.
  • options - FirmwaresClientDeleteOptions contains the optional parameters for the FirmwaresClient.Delete method.
Example (FirmwaresDeleteMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_Delete_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotfirmwaredefense.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewFirmwaresClient().Delete(ctx, "rgworkspaces-firmwares", "A7", "umrkdttp", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

Example (FirmwaresDeleteMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_Delete_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotfirmwaredefense.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewFirmwaresClient().Delete(ctx, "rgworkspaces-firmwares", "A7", "umrkdttp", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*FirmwaresClient) GenerateDownloadURL added in v1.0.0

func (client *FirmwaresClient) GenerateDownloadURL(ctx context.Context, resourceGroupName string, workspaceName string, firmwareID string, options *FirmwaresClientGenerateDownloadURLOptions) (FirmwaresClientGenerateDownloadURLResponse, error)

GenerateDownloadURL - The operation to a url for file download. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-10

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • workspaceName - The name of the firmware analysis workspace.
  • firmwareID - The id of the firmware.
  • options - FirmwaresClientGenerateDownloadURLOptions contains the optional parameters for the FirmwaresClient.GenerateDownloadURL method.
Example (FirmwaresGenerateDownloadUrlMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_GenerateDownloadUrl_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotfirmwaredefense.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewFirmwaresClient().GenerateDownloadURL(ctx, "rgworkspaces-firmwares", "A7", "umrkdttp", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.URLToken = armiotfirmwaredefense.URLToken{
	// 	URL: to.Ptr("https://i/am/a/sas/token"),
	// }
}
Output:

Example (FirmwaresGenerateDownloadUrlMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_GenerateDownloadUrl_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotfirmwaredefense.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewFirmwaresClient().GenerateDownloadURL(ctx, "rgworkspaces-firmwares", "A7", "umrkdttp", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.URLToken = armiotfirmwaredefense.URLToken{
	// }
}
Output:

func (*FirmwaresClient) GenerateFilesystemDownloadURL added in v1.0.0

func (client *FirmwaresClient) GenerateFilesystemDownloadURL(ctx context.Context, resourceGroupName string, workspaceName string, firmwareID string, options *FirmwaresClientGenerateFilesystemDownloadURLOptions) (FirmwaresClientGenerateFilesystemDownloadURLResponse, error)

GenerateFilesystemDownloadURL - The operation to a url for tar file download. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-10

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • workspaceName - The name of the firmware analysis workspace.
  • firmwareID - The id of the firmware.
  • options - FirmwaresClientGenerateFilesystemDownloadURLOptions contains the optional parameters for the FirmwaresClient.GenerateFilesystemDownloadURL method.
Example (FirmwaresGenerateFilesystemDownloadUrlMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_GenerateFilesystemDownloadUrl_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotfirmwaredefense.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewFirmwaresClient().GenerateFilesystemDownloadURL(ctx, "rgworkspaces-firmwares", "A7", "umrkdttp", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.URLToken = armiotfirmwaredefense.URLToken{
	// 	URL: to.Ptr("https://i/am/a/sas/token"),
	// }
}
Output:

Example (FirmwaresGenerateFilesystemDownloadUrlMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_GenerateFilesystemDownloadUrl_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotfirmwaredefense.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewFirmwaresClient().GenerateFilesystemDownloadURL(ctx, "rgworkspaces-firmwares", "A7", "umrkdttp", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.URLToken = armiotfirmwaredefense.URLToken{
	// }
}
Output:

func (*FirmwaresClient) Get added in v1.0.0

func (client *FirmwaresClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, firmwareID string, options *FirmwaresClientGetOptions) (FirmwaresClientGetResponse, error)

Get - Get firmware. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-10

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • workspaceName - The name of the firmware analysis workspace.
  • firmwareID - The id of the firmware.
  • options - FirmwaresClientGetOptions contains the optional parameters for the FirmwaresClient.Get method.
Example (FirmwaresGetMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_Get_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotfirmwaredefense.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewFirmwaresClient().Get(ctx, "rgworkspaces-firmwares", "A7", "umrkdttp", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Firmware = armiotfirmwaredefense.Firmware{
	// 	Name: to.Ptr("brmvnojpmxsgckdviynhxhftvcvbw"),
	// 	Type: to.Ptr("vlxhdbrphhnttmxvawwwewza"),
	// 	ID: to.Ptr("/subscriptions/blah/resourceGroups/blah/providers/blah/firmwares/blah"),
	// 	SystemData: &armiotfirmwaredefense.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-02-19T06:40:29.228Z"); return t}()),
	// 		CreatedBy: to.Ptr("aylilpicryidesowemwnl"),
	// 		CreatedByType: to.Ptr(armiotfirmwaredefense.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-02-19T06:40:29.228Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("bgtifu"),
	// 		LastModifiedByType: to.Ptr(armiotfirmwaredefense.CreatedByTypeUser),
	// 	},
	// 	Properties: &armiotfirmwaredefense.FirmwareProperties{
	// 		Description: to.Ptr("uz"),
	// 		FileName: to.Ptr("wresexxulcdsdd"),
	// 		FileSize: to.Ptr[int64](17),
	// 		Model: to.Ptr("f"),
	// 		ProvisioningState: to.Ptr(armiotfirmwaredefense.ProvisioningStateSucceeded),
	// 		Status: to.Ptr(armiotfirmwaredefense.StatusPending),
	// 		StatusMessages: []*armiotfirmwaredefense.StatusMessage{
	// 			{
	// 				Message: to.Ptr("ulvhmhokezathzzauiitu"),
	// 		}},
	// 		Vendor: to.Ptr("vycmdhgtmepcptyoubztiuudpkcpd"),
	// 		Version: to.Ptr("s"),
	// 	},
	// }
}
Output:

Example (FirmwaresGetMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_Get_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotfirmwaredefense.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewFirmwaresClient().Get(ctx, "rgworkspaces-firmwares", "A7", "umrkdttp", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Firmware = armiotfirmwaredefense.Firmware{
	// }
}
Output:

func (*FirmwaresClient) NewListByWorkspacePager added in v1.0.0

func (client *FirmwaresClient) NewListByWorkspacePager(resourceGroupName string, workspaceName string, options *FirmwaresClientListByWorkspaceOptions) *runtime.Pager[FirmwaresClientListByWorkspaceResponse]

NewListByWorkspacePager - Lists all of firmwares inside a workspace.

Generated from API version 2024-01-10

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • workspaceName - The name of the firmware analysis workspace.
  • options - FirmwaresClientListByWorkspaceOptions contains the optional parameters for the FirmwaresClient.NewListByWorkspacePager method.
Example (FirmwaresListByWorkspaceMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_ListByWorkspace_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotfirmwaredefense.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewFirmwaresClient().NewListByWorkspacePager("rgworkspaces-firmwares", "A7", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.FirmwareList = armiotfirmwaredefense.FirmwareList{
		// 	Value: []*armiotfirmwaredefense.Firmware{
		// 		{
		// 			Name: to.Ptr("brmvnojpmxsgckdviynhxhftvcvbw"),
		// 			Type: to.Ptr("vlxhdbrphhnttmxvawwwewza"),
		// 			ID: to.Ptr("/subscriptions/blah/resourceGroups/blah/providers/blah/firmwares/blah"),
		// 			SystemData: &armiotfirmwaredefense.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-02-19T06:40:29.228Z"); return t}()),
		// 				CreatedBy: to.Ptr("aylilpicryidesowemwnl"),
		// 				CreatedByType: to.Ptr(armiotfirmwaredefense.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-02-19T06:40:29.228Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("bgtifu"),
		// 				LastModifiedByType: to.Ptr(armiotfirmwaredefense.CreatedByTypeUser),
		// 			},
		// 			Properties: &armiotfirmwaredefense.FirmwareProperties{
		// 				Description: to.Ptr("uz"),
		// 				FileName: to.Ptr("wresexxulcdsdd"),
		// 				FileSize: to.Ptr[int64](17),
		// 				Model: to.Ptr("f"),
		// 				ProvisioningState: to.Ptr(armiotfirmwaredefense.ProvisioningStateSucceeded),
		// 				Status: to.Ptr(armiotfirmwaredefense.StatusPending),
		// 				StatusMessages: []*armiotfirmwaredefense.StatusMessage{
		// 					{
		// 						Message: to.Ptr("ulvhmhokezathzzauiitu"),
		// 				}},
		// 				Vendor: to.Ptr("vycmdhgtmepcptyoubztiuudpkcpd"),
		// 				Version: to.Ptr("s"),
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (FirmwaresListByWorkspaceMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_ListByWorkspace_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotfirmwaredefense.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewFirmwaresClient().NewListByWorkspacePager("rgworkspaces-firmwares", "A7", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.FirmwareList = armiotfirmwaredefense.FirmwareList{
		// }
	}
}
Output:

func (*FirmwaresClient) Update added in v1.0.0

func (client *FirmwaresClient) Update(ctx context.Context, resourceGroupName string, workspaceName string, firmwareID string, firmware FirmwareUpdateDefinition, options *FirmwaresClientUpdateOptions) (FirmwaresClientUpdateResponse, error)

Update - The operation to update firmware. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-10

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • workspaceName - The name of the firmware analysis workspace.
  • firmwareID - The id of the firmware.
  • firmware - Details of the firmware being created or updated.
  • options - FirmwaresClientUpdateOptions contains the optional parameters for the FirmwaresClient.Update method.
Example (FirmwaresUpdateMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_Update_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotfirmwaredefense.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewFirmwaresClient().Update(ctx, "rgworkspaces-firmwares", "A7", "umrkdttp", armiotfirmwaredefense.FirmwareUpdateDefinition{
		Properties: &armiotfirmwaredefense.FirmwareProperties{
			Description: to.Ptr("uz"),
			FileName:    to.Ptr("wresexxulcdsdd"),
			FileSize:    to.Ptr[int64](17),
			Model:       to.Ptr("f"),
			Status:      to.Ptr(armiotfirmwaredefense.StatusPending),
			StatusMessages: []*armiotfirmwaredefense.StatusMessage{
				{
					Message: to.Ptr("ulvhmhokezathzzauiitu"),
				}},
			Vendor:  to.Ptr("vycmdhgtmepcptyoubztiuudpkcpd"),
			Version: to.Ptr("s"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Firmware = armiotfirmwaredefense.Firmware{
	// 	Name: to.Ptr("brmvnojpmxsgckdviynhxhftvcvbw"),
	// 	Type: to.Ptr("vlxhdbrphhnttmxvawwwewza"),
	// 	ID: to.Ptr("/subscriptions/blah/resourceGroups/blah/providers/blah/firmwares/blah"),
	// 	SystemData: &armiotfirmwaredefense.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-02-19T06:40:29.228Z"); return t}()),
	// 		CreatedBy: to.Ptr("aylilpicryidesowemwnl"),
	// 		CreatedByType: to.Ptr(armiotfirmwaredefense.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-02-19T06:40:29.228Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("bgtifu"),
	// 		LastModifiedByType: to.Ptr(armiotfirmwaredefense.CreatedByTypeUser),
	// 	},
	// 	Properties: &armiotfirmwaredefense.FirmwareProperties{
	// 		Description: to.Ptr("uz"),
	// 		FileName: to.Ptr("wresexxulcdsdd"),
	// 		FileSize: to.Ptr[int64](17),
	// 		Model: to.Ptr("f"),
	// 		ProvisioningState: to.Ptr(armiotfirmwaredefense.ProvisioningStateSucceeded),
	// 		Status: to.Ptr(armiotfirmwaredefense.StatusPending),
	// 		StatusMessages: []*armiotfirmwaredefense.StatusMessage{
	// 			{
	// 				Message: to.Ptr("ulvhmhokezathzzauiitu"),
	// 		}},
	// 		Vendor: to.Ptr("vycmdhgtmepcptyoubztiuudpkcpd"),
	// 		Version: to.Ptr("s"),
	// 	},
	// }
}
Output:

Example (FirmwaresUpdateMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Firmwares_Update_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotfirmwaredefense.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewFirmwaresClient().Update(ctx, "rgworkspaces-firmwares", "A7", "umrkdttp", armiotfirmwaredefense.FirmwareUpdateDefinition{}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Firmware = armiotfirmwaredefense.Firmware{
	// }
}
Output:

type FirmwaresClientCreateOptions added in v1.0.0

type FirmwaresClientCreateOptions struct {
}

FirmwaresClientCreateOptions contains the optional parameters for the FirmwaresClient.Create method.

type FirmwaresClientCreateResponse added in v1.0.0

type FirmwaresClientCreateResponse struct {
	// Firmware definition
	Firmware
}

FirmwaresClientCreateResponse contains the response from method FirmwaresClient.Create.

type FirmwaresClientDeleteOptions added in v1.0.0

type FirmwaresClientDeleteOptions struct {
}

FirmwaresClientDeleteOptions contains the optional parameters for the FirmwaresClient.Delete method.

type FirmwaresClientDeleteResponse added in v1.0.0

type FirmwaresClientDeleteResponse struct {
}

FirmwaresClientDeleteResponse contains the response from method FirmwaresClient.Delete.

type FirmwaresClientGenerateDownloadURLOptions added in v1.0.0

type FirmwaresClientGenerateDownloadURLOptions struct {
}

FirmwaresClientGenerateDownloadURLOptions contains the optional parameters for the FirmwaresClient.GenerateDownloadURL method.

type FirmwaresClientGenerateDownloadURLResponse added in v1.0.0

type FirmwaresClientGenerateDownloadURLResponse struct {
	// Url data for creating or accessing a blob file.
	URLToken
}

FirmwaresClientGenerateDownloadURLResponse contains the response from method FirmwaresClient.GenerateDownloadURL.

type FirmwaresClientGenerateFilesystemDownloadURLOptions added in v1.0.0

type FirmwaresClientGenerateFilesystemDownloadURLOptions struct {
}

FirmwaresClientGenerateFilesystemDownloadURLOptions contains the optional parameters for the FirmwaresClient.GenerateFilesystemDownloadURL method.

type FirmwaresClientGenerateFilesystemDownloadURLResponse added in v1.0.0

type FirmwaresClientGenerateFilesystemDownloadURLResponse struct {
	// Url data for creating or accessing a blob file.
	URLToken
}

FirmwaresClientGenerateFilesystemDownloadURLResponse contains the response from method FirmwaresClient.GenerateFilesystemDownloadURL.

type FirmwaresClientGetOptions added in v1.0.0

type FirmwaresClientGetOptions struct {
}

FirmwaresClientGetOptions contains the optional parameters for the FirmwaresClient.Get method.

type FirmwaresClientGetResponse added in v1.0.0

type FirmwaresClientGetResponse struct {
	// Firmware definition
	Firmware
}

FirmwaresClientGetResponse contains the response from method FirmwaresClient.Get.

type FirmwaresClientListByWorkspaceOptions added in v1.0.0

type FirmwaresClientListByWorkspaceOptions struct {
}

FirmwaresClientListByWorkspaceOptions contains the optional parameters for the FirmwaresClient.NewListByWorkspacePager method.

type FirmwaresClientListByWorkspaceResponse added in v1.0.0

type FirmwaresClientListByWorkspaceResponse struct {
	// List of firmwares
	FirmwareList
}

FirmwaresClientListByWorkspaceResponse contains the response from method FirmwaresClient.NewListByWorkspacePager.

type FirmwaresClientUpdateOptions added in v1.0.0

type FirmwaresClientUpdateOptions struct {
}

FirmwaresClientUpdateOptions contains the optional parameters for the FirmwaresClient.Update method.

type FirmwaresClientUpdateResponse added in v1.0.0

type FirmwaresClientUpdateResponse struct {
	// Firmware definition
	Firmware
}

FirmwaresClientUpdateResponse contains the response from method FirmwaresClient.Update.

type GenerateUploadURLRequest

type GenerateUploadURLRequest struct {
	// A unique ID for the firmware to be uploaded.
	FirmwareID *string
}

GenerateUploadURLRequest - Properties for generating an upload URL

func (GenerateUploadURLRequest) MarshalJSON

func (g GenerateUploadURLRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GenerateUploadURLRequest.

func (*GenerateUploadURLRequest) UnmarshalJSON

func (g *GenerateUploadURLRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GenerateUploadURLRequest.

type Operation

type Operation struct {
	// Localized display information for this particular operation.
	Display *OperationDisplay

	// READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
	ActionType *ActionType

	// READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane
	// operations.
	IsDataAction *bool

	// READ-ONLY; The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write",
	// "Microsoft.Compute/virtualMachines/capture/action"
	Name *string

	// READ-ONLY; The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default
	// value is "user,system"
	Origin *Origin
}

Operation - Details of a REST API operation, returned from the Resource Provider Operations API

func (Operation) MarshalJSON

func (o Operation) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Operation.

func (*Operation) UnmarshalJSON

func (o *Operation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Operation.

type OperationDisplay

type OperationDisplay struct {
	// READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views.
	Description *string

	// READ-ONLY; The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual
	// Machine", "Restart Virtual Machine".
	Operation *string

	// READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft
	// Compute".
	Provider *string

	// READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job
	// Schedule Collections".
	Resource *string
}

OperationDisplay - Localized display information for this particular operation.

func (OperationDisplay) MarshalJSON

func (o OperationDisplay) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationDisplay.

func (*OperationDisplay) UnmarshalJSON

func (o *OperationDisplay) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.

type OperationListResult

type OperationListResult struct {
	// READ-ONLY; URL to get the next set of operation list results (if there are any).
	NextLink *string

	// READ-ONLY; List of operations supported by the resource provider
	Value []*Operation
}

OperationListResult - A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.

func (OperationListResult) MarshalJSON

func (o OperationListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationListResult.

func (*OperationListResult) UnmarshalJSON

func (o *OperationListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.

type OperationsClient

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

OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.

func NewOperationsClient

func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)

NewOperationsClient creates a new instance of OperationsClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*OperationsClient) NewListPager

NewListPager - Lists the operations for this resource provider

Generated from API version 2024-01-10

  • options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
Example (OperationsListMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Operations_List_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotfirmwaredefense.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewOperationsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.OperationListResult = armiotfirmwaredefense.OperationListResult{
		// 	Value: []*armiotfirmwaredefense.Operation{
		// 		{
		// 			Name: to.Ptr("fvpbaphlxaooymk"),
		// 			ActionType: to.Ptr(armiotfirmwaredefense.ActionTypeInternal),
		// 			Display: &armiotfirmwaredefense.OperationDisplay{
		// 				Description: to.Ptr("xxtlajuenswnnpgrivilipjqc"),
		// 				Operation: to.Ptr("tcikadfeehm"),
		// 				Provider: to.Ptr("hjnmhvyawkrqwpakyneaal"),
		// 				Resource: to.Ptr("erhsibwfehcpdah"),
		// 			},
		// 			IsDataAction: to.Ptr(true),
		// 			Origin: to.Ptr(armiotfirmwaredefense.OriginUser),
		// 	}},
		// }
	}
}
Output:

Example (OperationsListMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Operations_List_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotfirmwaredefense.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewOperationsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.OperationListResult = armiotfirmwaredefense.OperationListResult{
		// }
	}
}
Output:

type OperationsClientListOptions

type OperationsClientListOptions struct {
}

OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.

type OperationsClientListResponse

type OperationsClientListResponse struct {
	// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.
	OperationListResult
}

OperationsClientListResponse contains the response from method OperationsClient.NewListPager.

type Origin

type Origin string

Origin - The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system"

const (
	OriginSystem     Origin = "system"
	OriginUser       Origin = "user"
	OriginUserSystem Origin = "user,system"
)

func PossibleOriginValues

func PossibleOriginValues() []Origin

PossibleOriginValues returns the possible values for the Origin const type.

type PairedKey

type PairedKey struct {
	// ID of the paired key or certificate.
	ID *string

	// The type indicating whether the paired object is a key or certificate.
	Type *string
}

PairedKey - Details of a matching paired key or certificate.

func (PairedKey) MarshalJSON

func (p PairedKey) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PairedKey.

func (*PairedKey) UnmarshalJSON

func (p *PairedKey) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PairedKey.

type PasswordHash

type PasswordHash struct {
	// Algorithm of the password hash
	Algorithm *string

	// Context of password hash
	Context *string

	// File path of the password hash
	FilePath *string

	// Hash of the password
	Hash *string

	// ID for password hash
	PasswordHashID *string

	// Salt of the password hash
	Salt *string

	// User name of password hash
	Username *string
}

PasswordHash - Password hash properties

func (PasswordHash) MarshalJSON

func (p PasswordHash) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PasswordHash.

func (*PasswordHash) UnmarshalJSON

func (p *PasswordHash) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PasswordHash.

type PasswordHashListResult added in v1.0.0

type PasswordHashListResult struct {
	// The uri to fetch the next page of resources.
	NextLink *string

	// READ-ONLY; The list of password hash results.
	Value []*PasswordHashResource
}

PasswordHashListResult - List of password hash results

func (PasswordHashListResult) MarshalJSON added in v1.0.0

func (p PasswordHashListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PasswordHashListResult.

func (*PasswordHashListResult) UnmarshalJSON added in v1.0.0

func (p *PasswordHashListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PasswordHashListResult.

type PasswordHashResource added in v1.0.0

type PasswordHashResource struct {
	// The properties of a password hash found within a firmware image
	Properties *PasswordHash

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

PasswordHashResource - Password hash resource

func (PasswordHashResource) MarshalJSON added in v1.0.0

func (p PasswordHashResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PasswordHashResource.

func (*PasswordHashResource) UnmarshalJSON added in v1.0.0

func (p *PasswordHashResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PasswordHashResource.

type PasswordHashesClient added in v1.0.0

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

PasswordHashesClient contains the methods for the PasswordHashes group. Don't use this type directly, use NewPasswordHashesClient() instead.

func NewPasswordHashesClient added in v1.0.0

func NewPasswordHashesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PasswordHashesClient, error)

NewPasswordHashesClient creates a new instance of PasswordHashesClient with the specified values.

  • subscriptionID - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*PasswordHashesClient) NewListByFirmwarePager added in v1.0.0

func (client *PasswordHashesClient) NewListByFirmwarePager(resourceGroupName string, workspaceName string, firmwareID string, options *PasswordHashesClientListByFirmwareOptions) *runtime.Pager[PasswordHashesClientListByFirmwareResponse]

NewListByFirmwarePager - Lists password hash analysis results of a firmware.

Generated from API version 2024-01-10

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • workspaceName - The name of the firmware analysis workspace.
  • firmwareID - The id of the firmware.
  • options - PasswordHashesClientListByFirmwareOptions contains the optional parameters for the PasswordHashesClient.NewListByFirmwarePager method.
Example (PasswordHashesListByFirmwareMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/PasswordHashes_ListByFirmware_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotfirmwaredefense.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewPasswordHashesClient().NewListByFirmwarePager("FirmwareAnalysisRG", "default", "109a9886-50bf-85a8-9d75-000000000000", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.PasswordHashListResult = armiotfirmwaredefense.PasswordHashListResult{
		// 	Value: []*armiotfirmwaredefense.PasswordHashResource{
		// 		{
		// 			Name: to.Ptr("d6c0397f-e52f-4808-a9df-000000000000"),
		// 			Type: to.Ptr("Microsoft.IoTFirmwareDefense/workspaces/firmwares/passwordHashes"),
		// 			ID: to.Ptr("/subscriptions/07aed47b-60ad-4d6e-a07a-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/109a9886-50bf-85a8-9d75-000000000000/passwordHashes/d6c0397f-e52f-4808-a9df-000000000000"),
		// 			Properties: &armiotfirmwaredefense.PasswordHash{
		// 				Algorithm: to.Ptr("MD5"),
		// 				Context: to.Ptr("anonymous:$1$A17c6z5w$5OsdHjBn1p000000000000:2:0:99999:7:0:99999:0"),
		// 				FilePath: to.Ptr("/GzipExtractor/1/decompressed.bin"),
		// 				Hash: to.Ptr("5OsdHjBn1p000000000000"),
		// 				PasswordHashID: to.Ptr("d6c0397f-e52f-4808-a9df-000000000000"),
		// 				Salt: to.Ptr("A17c6z5w"),
		// 				Username: to.Ptr("anonymous"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("7a4f58c4-8613-41be-8a08-000000000000"),
		// 			Type: to.Ptr("Microsoft.IoTFirmwareDefense/workspaces/firmwares/passwordHashes"),
		// 			ID: to.Ptr("/subscriptions/07aed47b-60ad-4d6e-a07a-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/109a9886-50bf-85a8-9d75-000000000000/passwordHashes/7a4f58c4-8613-41be-8a08-000000000000"),
		// 			Properties: &armiotfirmwaredefense.PasswordHash{
		// 				Algorithm: to.Ptr("DES"),
		// 				Context: to.Ptr("root:absxc000000000:0:0:root:/:/bin/sh"),
		// 				FilePath: to.Ptr("/GzipExtractor/1/decompressed.bin"),
		// 				Hash: to.Ptr("sxc000000000"),
		// 				PasswordHashID: to.Ptr("7a4f58c4-8613-41be-8a08-000000000000"),
		// 				Salt: to.Ptr("ab"),
		// 				Username: to.Ptr("root"),
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (PasswordHashesListByFirmwareMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/PasswordHashes_ListByFirmware_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotfirmwaredefense.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewPasswordHashesClient().NewListByFirmwarePager("FirmwareAnalysisRG", "default", "109a9886-50bf-85a8-9d75-000000000000", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.PasswordHashListResult = armiotfirmwaredefense.PasswordHashListResult{
		// }
	}
}
Output:

type PasswordHashesClientListByFirmwareOptions added in v1.0.0

type PasswordHashesClientListByFirmwareOptions struct {
}

PasswordHashesClientListByFirmwareOptions contains the optional parameters for the PasswordHashesClient.NewListByFirmwarePager method.

type PasswordHashesClientListByFirmwareResponse added in v1.0.0

type PasswordHashesClientListByFirmwareResponse struct {
	// List of password hash results
	PasswordHashListResult
}

PasswordHashesClientListByFirmwareResponse contains the response from method PasswordHashesClient.NewListByFirmwarePager.

type ProvisioningState

type ProvisioningState string

ProvisioningState - Provisioning state of the resource.

const (
	ProvisioningStateAccepted  ProvisioningState = "Accepted"
	ProvisioningStateCanceled  ProvisioningState = "Canceled"
	ProvisioningStateFailed    ProvisioningState = "Failed"
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
)

func PossibleProvisioningStateValues

func PossibleProvisioningStateValues() []ProvisioningState

PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.

type SbomComponent added in v1.0.0

type SbomComponent struct {
	// ID for the component.
	ComponentID *string

	// Name for the component.
	ComponentName *string

	// File paths related to the component.
	FilePaths []*string

	// License for the component.
	License *string

	// Version for the component.
	Version *string
}

SbomComponent - SBOM component of a firmware.

func (SbomComponent) MarshalJSON added in v1.0.0

func (s SbomComponent) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SbomComponent.

func (*SbomComponent) UnmarshalJSON added in v1.0.0

func (s *SbomComponent) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SbomComponent.

type SbomComponentListResult added in v1.0.0

type SbomComponentListResult struct {
	// The uri to fetch the next page of resources.
	NextLink *string

	// READ-ONLY; The list of SBOM components.
	Value []*SbomComponentResource
}

SbomComponentListResult - List of SBOM results.

func (SbomComponentListResult) MarshalJSON added in v1.0.0

func (s SbomComponentListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SbomComponentListResult.

func (*SbomComponentListResult) UnmarshalJSON added in v1.0.0

func (s *SbomComponentListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SbomComponentListResult.

type SbomComponentResource added in v1.0.0

type SbomComponentResource struct {
	// The properties of an SBOM component found within a firmware image
	Properties *SbomComponent

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

SbomComponentResource - SBOM analysis result resource

func (SbomComponentResource) MarshalJSON added in v1.0.0

func (s SbomComponentResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SbomComponentResource.

func (*SbomComponentResource) UnmarshalJSON added in v1.0.0

func (s *SbomComponentResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SbomComponentResource.

type SbomComponentsClient added in v1.0.0

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

SbomComponentsClient contains the methods for the SbomComponents group. Don't use this type directly, use NewSbomComponentsClient() instead.

func NewSbomComponentsClient added in v1.0.0

func NewSbomComponentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SbomComponentsClient, error)

NewSbomComponentsClient creates a new instance of SbomComponentsClient with the specified values.

  • subscriptionID - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*SbomComponentsClient) NewListByFirmwarePager added in v1.0.0

func (client *SbomComponentsClient) NewListByFirmwarePager(resourceGroupName string, workspaceName string, firmwareID string, options *SbomComponentsClientListByFirmwareOptions) *runtime.Pager[SbomComponentsClientListByFirmwareResponse]

NewListByFirmwarePager - Lists SBOM analysis results of a firmware.

Generated from API version 2024-01-10

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • workspaceName - The name of the firmware analysis workspace.
  • firmwareID - The id of the firmware.
  • options - SbomComponentsClientListByFirmwareOptions contains the optional parameters for the SbomComponentsClient.NewListByFirmwarePager method.
Example (SbomComponentsListByFirmwareMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/SbomComponents_ListByFirmware_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotfirmwaredefense.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewSbomComponentsClient().NewListByFirmwarePager("FirmwareAnalysisRG", "default", "109a9886-50bf-85a8-9d75-000000000000", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.SbomComponentListResult = armiotfirmwaredefense.SbomComponentListResult{
		// 	Value: []*armiotfirmwaredefense.SbomComponentResource{
		// 		{
		// 			Name: to.Ptr("cd31ca40-6772-44f8-9180-000000000000"),
		// 			Type: to.Ptr("Microsoft.IoTFirmwareDefense/workspaces/firmwares/sbomComponents"),
		// 			ID: to.Ptr("/subscriptions/07aed47b-60ad-4d6e-a07a-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/109a9886-50bf-85a8-9d75-000000000000/sbomComponents/cd31ca40-6772-44f8-9180-000000000000"),
		// 			Properties: &armiotfirmwaredefense.SbomComponent{
		// 				ComponentID: to.Ptr("busybox:1.30.1"),
		// 				ComponentName: to.Ptr("busybox"),
		// 				FilePaths: []*string{
		// 					to.Ptr("/path/to/bin/busybox")},
		// 					License: to.Ptr("GPL-2.0-only"),
		// 					Version: to.Ptr("1.30.1"),
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("5924e71d-5f38-444e-8b08-000000000000"),
		// 				Type: to.Ptr("Microsoft.IoTFirmwareDefense/workspaces/firmwares/sbomComponents"),
		// 				ID: to.Ptr("/subscriptions/07aed47b-60ad-4d6e-a07a-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/109a9886-50bf-85a8-9d75-000000000000/sbomComponents/5924e71d-5f38-444e-8b08-000000000000"),
		// 				Properties: &armiotfirmwaredefense.SbomComponent{
		// 					ComponentID: to.Ptr("openvpn:2.4.6"),
		// 					ComponentName: to.Ptr("openvpn"),
		// 					FilePaths: []*string{
		// 						to.Ptr("/path/to/squashfs-root/bin/openvpn")},
		// 						License: to.Ptr("GPL-2.0"),
		// 						Version: to.Ptr("2.4.6"),
		// 					},
		// 			}},
		// 		}
	}
}
Output:

Example (SbomComponentsListByFirmwareMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/SbomComponents_ListByFirmware_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotfirmwaredefense.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewSbomComponentsClient().NewListByFirmwarePager("FirmwareAnalysisRG", "default", "109a9886-50bf-85a8-9d75-000000000000", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.SbomComponentListResult = armiotfirmwaredefense.SbomComponentListResult{
		// }
	}
}
Output:

type SbomComponentsClientListByFirmwareOptions added in v1.0.0

type SbomComponentsClientListByFirmwareOptions struct {
}

SbomComponentsClientListByFirmwareOptions contains the optional parameters for the SbomComponentsClient.NewListByFirmwarePager method.

type SbomComponentsClientListByFirmwareResponse added in v1.0.0

type SbomComponentsClientListByFirmwareResponse struct {
	// List of SBOM results.
	SbomComponentListResult
}

SbomComponentsClientListByFirmwareResponse contains the response from method SbomComponentsClient.NewListByFirmwarePager.

type Status

type Status string

Status - The status of firmware scan.

const (
	StatusAnalyzing  Status = "Analyzing"
	StatusError      Status = "Error"
	StatusExtracting Status = "Extracting"
	StatusPending    Status = "Pending"
	StatusReady      Status = "Ready"
)

func PossibleStatusValues

func PossibleStatusValues() []Status

PossibleStatusValues returns the possible values for the Status const type.

type StatusMessage added in v1.0.0

type StatusMessage struct {
	// The error code
	ErrorCode *int64

	// The error or status message
	Message *string
}

StatusMessage - Error and status message

func (StatusMessage) MarshalJSON added in v1.0.0

func (s StatusMessage) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type StatusMessage.

func (*StatusMessage) UnmarshalJSON added in v1.0.0

func (s *StatusMessage) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type StatusMessage.

type SummariesClient added in v1.0.0

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

SummariesClient contains the methods for the Summaries group. Don't use this type directly, use NewSummariesClient() instead.

func NewSummariesClient added in v1.0.0

func NewSummariesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SummariesClient, error)

NewSummariesClient creates a new instance of SummariesClient with the specified values.

  • subscriptionID - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*SummariesClient) Get added in v1.0.0

func (client *SummariesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, firmwareID string, summaryName SummaryName, options *SummariesClientGetOptions) (SummariesClientGetResponse, error)

Get - Get an analysis result summary of a firmware by name. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-10

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • workspaceName - The name of the firmware analysis workspace.
  • firmwareID - The id of the firmware.
  • summaryName - The Firmware analysis summary name describing the type of summary.
  • options - SummariesClientGetOptions contains the optional parameters for the SummariesClient.Get method.
Example (SummariesGetMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Summaries_Get_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotfirmwaredefense.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSummariesClient().Get(ctx, "FirmwareAnalysisRG", "default", "109a9886-50bf-85a8-9d75-000000000000", armiotfirmwaredefense.SummaryNameFirmware, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.SummaryResource = armiotfirmwaredefense.SummaryResource{
	// 	Name: to.Ptr("firmware"),
	// 	Type: to.Ptr("Microsoft.IoTFirmwareDefense/workspaces/firmwares/summaries"),
	// 	ID: to.Ptr("/subscriptions/07aed47b-60ad-4d6e-a07a-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/109a9886-50bf-85a8-9d75-000000000000/summaries/firmware"),
	// 	Properties: &armiotfirmwaredefense.FirmwareSummary{
	// 		SummaryType: to.Ptr(armiotfirmwaredefense.SummaryTypeFirmware),
	// 		AnalysisTimeSeconds: to.Ptr[int64](172),
	// 		BinaryCount: to.Ptr[int64](579),
	// 		ComponentCount: to.Ptr[int64](35),
	// 		ExtractedFileCount: to.Ptr[int64](4171),
	// 		ExtractedSize: to.Ptr[int64](302752916),
	// 		FileSize: to.Ptr[int64](55326098),
	// 		RootFileSystems: to.Ptr[int64](2),
	// 	},
	// }
}
Output:

Example (SummariesGetMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Summaries_Get_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotfirmwaredefense.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSummariesClient().Get(ctx, "FirmwareAnalysisRG", "default", "109a9886-50bf-85a8-9d75-000000000000", armiotfirmwaredefense.SummaryNameFirmware, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.SummaryResource = armiotfirmwaredefense.SummaryResource{
	// }
}
Output:

func (*SummariesClient) NewListByFirmwarePager added in v1.0.0

func (client *SummariesClient) NewListByFirmwarePager(resourceGroupName string, workspaceName string, firmwareID string, options *SummariesClientListByFirmwareOptions) *runtime.Pager[SummariesClientListByFirmwareResponse]

NewListByFirmwarePager - Lists analysis result summary names of a firmware. To fetch the full summary data, get that summary by name.

Generated from API version 2024-01-10

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • workspaceName - The name of the firmware analysis workspace.
  • firmwareID - The id of the firmware.
  • options - SummariesClientListByFirmwareOptions contains the optional parameters for the SummariesClient.NewListByFirmwarePager method.
Example (SummariesListByFirmwareMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Summaries_ListByFirmware_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotfirmwaredefense.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewSummariesClient().NewListByFirmwarePager("FirmwareAnalysisRG", "default", "109a9886-50bf-85a8-9d75-000000000000", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.SummaryListResult = armiotfirmwaredefense.SummaryListResult{
		// 	Value: []*armiotfirmwaredefense.SummaryResource{
		// 		{
		// 			Name: to.Ptr("CVE"),
		// 			Type: to.Ptr("Microsoft.IoTFirmwareDefense/workspaces/firmwares/summaries"),
		// 			ID: to.Ptr("/subscriptions/07aed47b-60ad-4d6e-a07a-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/109a9886-50bf-85a8-9d75-000000000000/summaries/CVE"),
		// 			Properties: &armiotfirmwaredefense.CveSummary{
		// 				SummaryType: to.Ptr(armiotfirmwaredefense.SummaryTypeCVE),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("BinaryHardening"),
		// 			Type: to.Ptr("Microsoft.IoTFirmwareDefense/workspaces/firmwares/summaries"),
		// 			ID: to.Ptr("/subscriptions/07aed47b-60ad-4d6e-a07a-000000000000/resourceGroups/FirmwareAnalysisRG/providers/Microsoft.IoTFirmwareDefense/workspaces/default/firmwares/109a9886-50bf-85a8-9d75-000000000000/summaries/BinaryHardening"),
		// 			Properties: &armiotfirmwaredefense.BinaryHardeningSummaryResource{
		// 				SummaryType: to.Ptr(armiotfirmwaredefense.SummaryTypeBinaryHardening),
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (SummariesListByFirmwareMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Summaries_ListByFirmware_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotfirmwaredefense.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewSummariesClient().NewListByFirmwarePager("FirmwareAnalysisRG", "default", "109a9886-50bf-85a8-9d75-000000000000", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.SummaryListResult = armiotfirmwaredefense.SummaryListResult{
		// }
	}
}
Output:

type SummariesClientGetOptions added in v1.0.0

type SummariesClientGetOptions struct {
}

SummariesClientGetOptions contains the optional parameters for the SummariesClient.Get method.

type SummariesClientGetResponse added in v1.0.0

type SummariesClientGetResponse struct {
	// The object representing a firmware analysis summary resource.
	SummaryResource
}

SummariesClientGetResponse contains the response from method SummariesClient.Get.

type SummariesClientListByFirmwareOptions added in v1.0.0

type SummariesClientListByFirmwareOptions struct {
}

SummariesClientListByFirmwareOptions contains the optional parameters for the SummariesClient.NewListByFirmwarePager method.

type SummariesClientListByFirmwareResponse added in v1.0.0

type SummariesClientListByFirmwareResponse struct {
	// List of analysis summaries.
	SummaryListResult
}

SummariesClientListByFirmwareResponse contains the response from method SummariesClient.NewListByFirmwarePager.

type SummaryListResult added in v1.0.0

type SummaryListResult struct {
	// The uri to fetch the next page of resources.
	NextLink *string

	// READ-ONLY; The list of summaries.
	Value []*SummaryResource
}

SummaryListResult - List of analysis summaries.

func (SummaryListResult) MarshalJSON added in v1.0.0

func (s SummaryListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SummaryListResult.

func (*SummaryListResult) UnmarshalJSON added in v1.0.0

func (s *SummaryListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SummaryListResult.

type SummaryName added in v1.0.0

type SummaryName string
const (
	SummaryNameBinaryHardening   SummaryName = "BinaryHardening"
	SummaryNameCVE               SummaryName = "CVE"
	SummaryNameCryptoCertificate SummaryName = "CryptoCertificate"
	SummaryNameCryptoKey         SummaryName = "CryptoKey"
	SummaryNameFirmware          SummaryName = "Firmware"
)

func PossibleSummaryNameValues added in v1.0.0

func PossibleSummaryNameValues() []SummaryName

PossibleSummaryNameValues returns the possible values for the SummaryName const type.

type SummaryResource added in v1.0.0

type SummaryResource struct {
	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Properties of an analysis summary.
	Properties SummaryResourcePropertiesClassification

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

SummaryResource - The object representing a firmware analysis summary resource.

func (SummaryResource) MarshalJSON added in v1.0.0

func (s SummaryResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SummaryResource.

func (*SummaryResource) UnmarshalJSON added in v1.0.0

func (s *SummaryResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SummaryResource.

type SummaryResourceProperties added in v1.0.0

type SummaryResourceProperties struct {
	// REQUIRED; Describes the type of summary.
	SummaryType *SummaryType
}

SummaryResourceProperties - Properties of an analysis summary.

func (*SummaryResourceProperties) GetSummaryResourceProperties added in v1.0.0

func (s *SummaryResourceProperties) GetSummaryResourceProperties() *SummaryResourceProperties

GetSummaryResourceProperties implements the SummaryResourcePropertiesClassification interface for type SummaryResourceProperties.

func (SummaryResourceProperties) MarshalJSON added in v1.0.0

func (s SummaryResourceProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SummaryResourceProperties.

func (*SummaryResourceProperties) UnmarshalJSON added in v1.0.0

func (s *SummaryResourceProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SummaryResourceProperties.

type SummaryResourcePropertiesClassification added in v1.0.0

type SummaryResourcePropertiesClassification interface {
	// GetSummaryResourceProperties returns the SummaryResourceProperties content of the underlying type.
	GetSummaryResourceProperties() *SummaryResourceProperties
}

SummaryResourcePropertiesClassification provides polymorphic access to related types. Call the interface's GetSummaryResourceProperties() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *BinaryHardeningSummaryResource, *CryptoCertificateSummaryResource, *CryptoKeySummaryResource, *CveSummary, *FirmwareSummary, - *SummaryResourceProperties

type SummaryType added in v1.0.0

type SummaryType string

SummaryType - Describes the type of summary.

const (
	SummaryTypeBinaryHardening   SummaryType = "BinaryHardening"
	SummaryTypeCVE               SummaryType = "CVE"
	SummaryTypeCryptoCertificate SummaryType = "CryptoCertificate"
	SummaryTypeCryptoKey         SummaryType = "CryptoKey"
	SummaryTypeFirmware          SummaryType = "Firmware"
)

func PossibleSummaryTypeValues added in v1.0.0

func PossibleSummaryTypeValues() []SummaryType

PossibleSummaryTypeValues returns the possible values for the SummaryType const type.

type SystemData

type SystemData struct {
	// The timestamp of resource creation (UTC).
	CreatedAt *time.Time

	// The identity that created the resource.
	CreatedBy *string

	// The type of identity that created the resource.
	CreatedByType *CreatedByType

	// The timestamp of resource last modification (UTC)
	LastModifiedAt *time.Time

	// The identity that last modified the resource.
	LastModifiedBy *string

	// The type of identity that last modified the resource.
	LastModifiedByType *CreatedByType
}

SystemData - Metadata pertaining to creation and last modification of the resource.

func (SystemData) MarshalJSON

func (s SystemData) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SystemData.

func (*SystemData) UnmarshalJSON

func (s *SystemData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.

type URLToken

type URLToken struct {
	// READ-ONLY; SAS URL for creating or accessing a blob file.
	URL *string
}

URLToken - Url data for creating or accessing a blob file.

func (URLToken) MarshalJSON

func (u URLToken) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type URLToken.

func (*URLToken) UnmarshalJSON

func (u *URLToken) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type URLToken.

type Workspace

type Workspace struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string

	// Workspace properties.
	Properties *WorkspaceProperties

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

Workspace - Firmware analysis workspace.

func (Workspace) MarshalJSON

func (w Workspace) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Workspace.

func (*Workspace) UnmarshalJSON

func (w *Workspace) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Workspace.

type WorkspaceList

type WorkspaceList struct {
	// The uri to fetch the next page of asset.
	NextLink *string

	// READ-ONLY; The list of firmware analysis workspaces.
	Value []*Workspace
}

WorkspaceList - Return a list of firmware analysis workspaces.

func (WorkspaceList) MarshalJSON

func (w WorkspaceList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkspaceList.

func (*WorkspaceList) UnmarshalJSON

func (w *WorkspaceList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceList.

type WorkspaceProperties

type WorkspaceProperties struct {
	// READ-ONLY; Provisioning state of the resource.
	ProvisioningState *ProvisioningState
}

WorkspaceProperties - Workspace properties.

func (WorkspaceProperties) MarshalJSON

func (w WorkspaceProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkspaceProperties.

func (*WorkspaceProperties) UnmarshalJSON

func (w *WorkspaceProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceProperties.

type WorkspaceUpdateDefinition

type WorkspaceUpdateDefinition struct {
	// The editable workspace properties.
	Properties *WorkspaceProperties
}

WorkspaceUpdateDefinition - Firmware analysis workspace.

func (WorkspaceUpdateDefinition) MarshalJSON

func (w WorkspaceUpdateDefinition) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkspaceUpdateDefinition.

func (*WorkspaceUpdateDefinition) UnmarshalJSON

func (w *WorkspaceUpdateDefinition) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceUpdateDefinition.

type WorkspacesClient

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

WorkspacesClient contains the methods for the Workspaces group. Don't use this type directly, use NewWorkspacesClient() instead.

func NewWorkspacesClient

func NewWorkspacesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspacesClient, error)

NewWorkspacesClient creates a new instance of WorkspacesClient with the specified values.

  • subscriptionID - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*WorkspacesClient) Create

func (client *WorkspacesClient) Create(ctx context.Context, resourceGroupName string, workspaceName string, workspace Workspace, options *WorkspacesClientCreateOptions) (WorkspacesClientCreateResponse, error)

Create - The operation to create or update a firmware analysis workspace. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-10

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • workspaceName - The name of the firmware analysis workspace.
  • workspace - Parameters when creating a firmware analysis workspace.
  • options - WorkspacesClientCreateOptions contains the optional parameters for the WorkspacesClient.Create method.
Example (WorkspacesCreateMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_Create_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotfirmwaredefense.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewWorkspacesClient().Create(ctx, "rgworkspaces", "E___-3", armiotfirmwaredefense.Workspace{
		Location: to.Ptr("jjwbseilitjgdrhbvvkwviqj"),
		Tags: map[string]*string{
			"key450": to.Ptr("rzqqumbpfsbibnpirsm"),
		},
		Properties: &armiotfirmwaredefense.WorkspaceProperties{},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Workspace = armiotfirmwaredefense.Workspace{
	// 	Name: to.Ptr("tbrqhnzpsatbrnhtj"),
	// 	Type: to.Ptr("angrpzpxmuppzqpzpljasjirao"),
	// 	ID: to.Ptr("/subscriptions/blah/resourceGroups/blah/providers/blah/workspaces/blah"),
	// 	SystemData: &armiotfirmwaredefense.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-02-19T05:35:25.545Z"); return t}()),
	// 		CreatedBy: to.Ptr("kmgstbzxtl"),
	// 		CreatedByType: to.Ptr(armiotfirmwaredefense.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-02-19T05:35:25.545Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("rfnhyhbyqzxnumjmjhwkhduztidk"),
	// 		LastModifiedByType: to.Ptr(armiotfirmwaredefense.CreatedByTypeUser),
	// 	},
	// 	Location: to.Ptr("jjwbseilitjgdrhbvvkwviqj"),
	// 	Tags: map[string]*string{
	// 		"key450": to.Ptr("rzqqumbpfsbibnpirsm"),
	// 	},
	// 	Properties: &armiotfirmwaredefense.WorkspaceProperties{
	// 		ProvisioningState: to.Ptr(armiotfirmwaredefense.ProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

Example (WorkspacesCreateMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_Create_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotfirmwaredefense.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewWorkspacesClient().Create(ctx, "rgworkspaces", "E___-3", armiotfirmwaredefense.Workspace{
		Location: to.Ptr("jjwbseilitjgdrhbvvkwviqj"),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Workspace = armiotfirmwaredefense.Workspace{
	// 	Name: to.Ptr("tbrqhnzpsatbrnhtj"),
	// 	Type: to.Ptr("angrpzpxmuppzqpzpljasjirao"),
	// 	ID: to.Ptr("/subscriptions/blah/resourceGroups/blah/providers/blah/workspaces/blah"),
	// 	Location: to.Ptr("jjwbseilitjgdrhbvvkwviqj"),
	// }
}
Output:

func (*WorkspacesClient) Delete

func (client *WorkspacesClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientDeleteOptions) (WorkspacesClientDeleteResponse, error)

Delete - The operation to delete a firmware analysis workspace. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-10

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • workspaceName - The name of the firmware analysis workspace.
  • options - WorkspacesClientDeleteOptions contains the optional parameters for the WorkspacesClient.Delete method.
Example (WorkspacesDeleteMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_Delete_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotfirmwaredefense.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewWorkspacesClient().Delete(ctx, "rgworkspaces", "E___-3", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

Example (WorkspacesDeleteMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_Delete_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotfirmwaredefense.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewWorkspacesClient().Delete(ctx, "rgworkspaces", "E___-3", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*WorkspacesClient) GenerateUploadURL

func (client *WorkspacesClient) GenerateUploadURL(ctx context.Context, resourceGroupName string, workspaceName string, generateUploadURL GenerateUploadURLRequest, options *WorkspacesClientGenerateUploadURLOptions) (WorkspacesClientGenerateUploadURLResponse, error)

GenerateUploadURL - The operation to get a url for file upload. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-10

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • workspaceName - The name of the firmware analysis workspace.
  • generateUploadURL - Parameters when requesting a URL to upload firmware.
  • options - WorkspacesClientGenerateUploadURLOptions contains the optional parameters for the WorkspacesClient.GenerateUploadURL method.
Example (WorkspacesGenerateUploadUrlMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_GenerateUploadUrl_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotfirmwaredefense.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewWorkspacesClient().GenerateUploadURL(ctx, "rgworkspaces", "E___-3", armiotfirmwaredefense.GenerateUploadURLRequest{
		FirmwareID: to.Ptr("ytsfprbywi"),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.URLToken = armiotfirmwaredefense.URLToken{
	// 	URL: to.Ptr("https://i/am/a/sas/token"),
	// }
}
Output:

Example (WorkspacesGenerateUploadUrlMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_GenerateUploadUrl_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotfirmwaredefense.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewWorkspacesClient().GenerateUploadURL(ctx, "rgworkspaces", "E___-3", armiotfirmwaredefense.GenerateUploadURLRequest{}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.URLToken = armiotfirmwaredefense.URLToken{
	// }
}
Output:

func (*WorkspacesClient) Get

func (client *WorkspacesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientGetOptions) (WorkspacesClientGetResponse, error)

Get - Get firmware analysis workspace. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-10

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • workspaceName - The name of the firmware analysis workspace.
  • options - WorkspacesClientGetOptions contains the optional parameters for the WorkspacesClient.Get method.
Example (WorkspacesGetMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_Get_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotfirmwaredefense.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewWorkspacesClient().Get(ctx, "rgworkspaces", "E_US", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Workspace = armiotfirmwaredefense.Workspace{
	// 	Name: to.Ptr("vbgktdhddtb"),
	// 	Type: to.Ptr("ux"),
	// 	ID: to.Ptr("/subscriptions/blah/resourceGroups/blah/providers/blah/workspaces/blah"),
	// 	SystemData: &armiotfirmwaredefense.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-21T14:59:45.580Z"); return t}()),
	// 		CreatedBy: to.Ptr("vnrbl"),
	// 		CreatedByType: to.Ptr(armiotfirmwaredefense.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-21T14:59:45.580Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("zmmusinjpfjqy"),
	// 		LastModifiedByType: to.Ptr(armiotfirmwaredefense.CreatedByTypeUser),
	// 	},
	// 	Location: to.Ptr("zxwrauqottoy"),
	// 	Tags: map[string]*string{
	// 		"key6364": to.Ptr("itpmlxzoingnevgitv"),
	// 	},
	// 	Properties: &armiotfirmwaredefense.WorkspaceProperties{
	// 		ProvisioningState: to.Ptr(armiotfirmwaredefense.ProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

Example (WorkspacesGetMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_Get_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotfirmwaredefense.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewWorkspacesClient().Get(ctx, "rgworkspaces", "E_US", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Workspace = armiotfirmwaredefense.Workspace{
	// 	Name: to.Ptr("tbrqhnzpsatbrnhtj"),
	// 	Type: to.Ptr("angrpzpxmuppzqpzpljasjirao"),
	// 	ID: to.Ptr("/subscriptions/blah/resourceGroups/blah/providers/blah/workspaces/blah"),
	// 	Location: to.Ptr("zxwrauqottoy"),
	// }
}
Output:

func (*WorkspacesClient) NewListByResourceGroupPager

func (client *WorkspacesClient) NewListByResourceGroupPager(resourceGroupName string, options *WorkspacesClientListByResourceGroupOptions) *runtime.Pager[WorkspacesClientListByResourceGroupResponse]

NewListByResourceGroupPager - Lists all of the firmware analysis workspaces in the specified resource group.

Generated from API version 2024-01-10

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • options - WorkspacesClientListByResourceGroupOptions contains the optional parameters for the WorkspacesClient.NewListByResourceGroupPager method.
Example (WorkspacesListByResourceGroupMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_ListByResourceGroup_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotfirmwaredefense.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewWorkspacesClient().NewListByResourceGroupPager("rgworkspaces", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.WorkspaceList = armiotfirmwaredefense.WorkspaceList{
		// 	Value: []*armiotfirmwaredefense.Workspace{
		// 		{
		// 			Name: to.Ptr("tbrqhnzpsatbrnhtj"),
		// 			Type: to.Ptr("angrpzpxmuppzqpzpljasjirao"),
		// 			ID: to.Ptr("/subscriptions/blah/resourceGroups/blah/providers/blah/workspaces/blah"),
		// 			SystemData: &armiotfirmwaredefense.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-02-19T05:35:25.545Z"); return t}()),
		// 				CreatedBy: to.Ptr("kmgstbzxtl"),
		// 				CreatedByType: to.Ptr(armiotfirmwaredefense.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-02-19T05:35:25.545Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("rfnhyhbyqzxnumjmjhwkhduztidk"),
		// 				LastModifiedByType: to.Ptr(armiotfirmwaredefense.CreatedByTypeUser),
		// 			},
		// 			Location: to.Ptr("jjwbseilitjgdrhbvvkwviqj"),
		// 			Tags: map[string]*string{
		// 				"key450": to.Ptr("rzqqumbpfsbibnpirsm"),
		// 			},
		// 			Properties: &armiotfirmwaredefense.WorkspaceProperties{
		// 				ProvisioningState: to.Ptr(armiotfirmwaredefense.ProvisioningStateSucceeded),
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (WorkspacesListByResourceGroupMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_ListByResourceGroup_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotfirmwaredefense.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewWorkspacesClient().NewListByResourceGroupPager("rgworkspaces", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.WorkspaceList = armiotfirmwaredefense.WorkspaceList{
		// }
	}
}
Output:

func (*WorkspacesClient) NewListBySubscriptionPager

NewListBySubscriptionPager - Lists all of the firmware analysis workspaces in the specified subscription.

Generated from API version 2024-01-10

  • options - WorkspacesClientListBySubscriptionOptions contains the optional parameters for the WorkspacesClient.NewListBySubscriptionPager method.
Example (WorkspacesListBySubscriptionMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_ListBySubscription_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotfirmwaredefense.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewWorkspacesClient().NewListBySubscriptionPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.WorkspaceList = armiotfirmwaredefense.WorkspaceList{
		// 	Value: []*armiotfirmwaredefense.Workspace{
		// 		{
		// 			Name: to.Ptr("tbrqhnzpsatbrnhtj"),
		// 			Type: to.Ptr("angrpzpxmuppzqpzpljasjirao"),
		// 			ID: to.Ptr("/subscriptions/blah/resourceGroups/blah/providers/blah/workspaces/blah"),
		// 			SystemData: &armiotfirmwaredefense.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-02-19T05:35:25.545Z"); return t}()),
		// 				CreatedBy: to.Ptr("kmgstbzxtl"),
		// 				CreatedByType: to.Ptr(armiotfirmwaredefense.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-02-19T05:35:25.545Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("rfnhyhbyqzxnumjmjhwkhduztidk"),
		// 				LastModifiedByType: to.Ptr(armiotfirmwaredefense.CreatedByTypeUser),
		// 			},
		// 			Location: to.Ptr("jjwbseilitjgdrhbvvkwviqj"),
		// 			Tags: map[string]*string{
		// 				"key450": to.Ptr("rzqqumbpfsbibnpirsm"),
		// 			},
		// 			Properties: &armiotfirmwaredefense.WorkspaceProperties{
		// 				ProvisioningState: to.Ptr(armiotfirmwaredefense.ProvisioningStateSucceeded),
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (WorkspacesListBySubscriptionMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_ListBySubscription_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotfirmwaredefense.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewWorkspacesClient().NewListBySubscriptionPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.WorkspaceList = armiotfirmwaredefense.WorkspaceList{
		// }
	}
}
Output:

func (*WorkspacesClient) Update

func (client *WorkspacesClient) Update(ctx context.Context, resourceGroupName string, workspaceName string, workspace WorkspaceUpdateDefinition, options *WorkspacesClientUpdateOptions) (WorkspacesClientUpdateResponse, error)

Update - The operation to update a firmware analysis workspaces. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-10

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • workspaceName - The name of the firmware analysis workspace.
  • workspace - Parameters when updating a firmware analysis workspace.
  • options - WorkspacesClientUpdateOptions contains the optional parameters for the WorkspacesClient.Update method.
Example (WorkspacesUpdateMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_Update_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotfirmwaredefense.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewWorkspacesClient().Update(ctx, "rgworkspaces", "E___-3", armiotfirmwaredefense.WorkspaceUpdateDefinition{
		Properties: &armiotfirmwaredefense.WorkspaceProperties{},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Workspace = armiotfirmwaredefense.Workspace{
	// 	Name: to.Ptr("tbrqhnzpsatbrnhtj"),
	// 	Type: to.Ptr("angrpzpxmuppzqpzpljasjirao"),
	// 	ID: to.Ptr("/subscriptions/blah/resourceGroups/blah/providers/blah/workspaces/blah"),
	// 	SystemData: &armiotfirmwaredefense.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-02-19T05:35:25.545Z"); return t}()),
	// 		CreatedBy: to.Ptr("kmgstbzxtl"),
	// 		CreatedByType: to.Ptr(armiotfirmwaredefense.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-02-19T05:35:25.545Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("rfnhyhbyqzxnumjmjhwkhduztidk"),
	// 		LastModifiedByType: to.Ptr(armiotfirmwaredefense.CreatedByTypeUser),
	// 	},
	// 	Location: to.Ptr("jjwbseilitjgdrhbvvkwviqj"),
	// 	Tags: map[string]*string{
	// 		"key450": to.Ptr("rzqqumbpfsbibnpirsm"),
	// 	},
	// 	Properties: &armiotfirmwaredefense.WorkspaceProperties{
	// 		ProvisioningState: to.Ptr(armiotfirmwaredefense.ProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

Example (WorkspacesUpdateMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/stable/2024-01-10/examples/Workspaces_Update_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotfirmwaredefense.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewWorkspacesClient().Update(ctx, "rgworkspaces", "E___-3", armiotfirmwaredefense.WorkspaceUpdateDefinition{}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Workspace = armiotfirmwaredefense.Workspace{
	// 	Location: to.Ptr("jjwbseilitjgdrhbvvkwviqj"),
	// }
}
Output:

type WorkspacesClientCreateOptions

type WorkspacesClientCreateOptions struct {
}

WorkspacesClientCreateOptions contains the optional parameters for the WorkspacesClient.Create method.

type WorkspacesClientCreateResponse

type WorkspacesClientCreateResponse struct {
	// Firmware analysis workspace.
	Workspace
}

WorkspacesClientCreateResponse contains the response from method WorkspacesClient.Create.

type WorkspacesClientDeleteOptions

type WorkspacesClientDeleteOptions struct {
}

WorkspacesClientDeleteOptions contains the optional parameters for the WorkspacesClient.Delete method.

type WorkspacesClientDeleteResponse

type WorkspacesClientDeleteResponse struct {
}

WorkspacesClientDeleteResponse contains the response from method WorkspacesClient.Delete.

type WorkspacesClientGenerateUploadURLOptions

type WorkspacesClientGenerateUploadURLOptions struct {
}

WorkspacesClientGenerateUploadURLOptions contains the optional parameters for the WorkspacesClient.GenerateUploadURL method.

type WorkspacesClientGenerateUploadURLResponse

type WorkspacesClientGenerateUploadURLResponse struct {
	// Url data for creating or accessing a blob file.
	URLToken
}

WorkspacesClientGenerateUploadURLResponse contains the response from method WorkspacesClient.GenerateUploadURL.

type WorkspacesClientGetOptions

type WorkspacesClientGetOptions struct {
}

WorkspacesClientGetOptions contains the optional parameters for the WorkspacesClient.Get method.

type WorkspacesClientGetResponse

type WorkspacesClientGetResponse struct {
	// Firmware analysis workspace.
	Workspace
}

WorkspacesClientGetResponse contains the response from method WorkspacesClient.Get.

type WorkspacesClientListByResourceGroupOptions

type WorkspacesClientListByResourceGroupOptions struct {
}

WorkspacesClientListByResourceGroupOptions contains the optional parameters for the WorkspacesClient.NewListByResourceGroupPager method.

type WorkspacesClientListByResourceGroupResponse

type WorkspacesClientListByResourceGroupResponse struct {
	// Return a list of firmware analysis workspaces.
	WorkspaceList
}

WorkspacesClientListByResourceGroupResponse contains the response from method WorkspacesClient.NewListByResourceGroupPager.

type WorkspacesClientListBySubscriptionOptions

type WorkspacesClientListBySubscriptionOptions struct {
}

WorkspacesClientListBySubscriptionOptions contains the optional parameters for the WorkspacesClient.NewListBySubscriptionPager method.

type WorkspacesClientListBySubscriptionResponse

type WorkspacesClientListBySubscriptionResponse struct {
	// Return a list of firmware analysis workspaces.
	WorkspaceList
}

WorkspacesClientListBySubscriptionResponse contains the response from method WorkspacesClient.NewListBySubscriptionPager.

type WorkspacesClientUpdateOptions

type WorkspacesClientUpdateOptions struct {
}

WorkspacesClientUpdateOptions contains the optional parameters for the WorkspacesClient.Update method.

type WorkspacesClientUpdateResponse

type WorkspacesClientUpdateResponse struct {
	// Firmware analysis workspace.
	Workspace
}

WorkspacesClientUpdateResponse contains the response from method WorkspacesClient.Update.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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