Documentation ¶
Index ¶
- type ActionType
- type AllowCrashDumpCollection
- type CapabilityType
- type Catalog
- type CatalogListResult
- type CatalogProperties
- type CatalogUpdate
- type CatalogsClient
- func (client *CatalogsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, catalogName string, ...) (*runtime.Poller[CatalogsClientCreateOrUpdateResponse], error)
- func (client *CatalogsClient) BeginDelete(ctx context.Context, resourceGroupName string, catalogName string, ...) (*runtime.Poller[CatalogsClientDeleteResponse], error)
- func (client *CatalogsClient) BeginUploadImage(ctx context.Context, resourceGroupName string, catalogName string, ...) (*runtime.Poller[CatalogsClientUploadImageResponse], error)
- func (client *CatalogsClient) CountDevices(ctx context.Context, resourceGroupName string, catalogName string, ...) (CatalogsClientCountDevicesResponse, error)
- func (client *CatalogsClient) Get(ctx context.Context, resourceGroupName string, catalogName string, ...) (CatalogsClientGetResponse, error)
- func (client *CatalogsClient) NewListByResourceGroupPager(resourceGroupName string, options *CatalogsClientListByResourceGroupOptions) *runtime.Pager[CatalogsClientListByResourceGroupResponse]
- func (client *CatalogsClient) NewListBySubscriptionPager(options *CatalogsClientListBySubscriptionOptions) *runtime.Pager[CatalogsClientListBySubscriptionResponse]
- func (client *CatalogsClient) NewListDeploymentsPager(resourceGroupName string, catalogName string, ...) *runtime.Pager[CatalogsClientListDeploymentsResponse]
- func (client *CatalogsClient) NewListDeviceGroupsPager(resourceGroupName string, catalogName string, ...) *runtime.Pager[CatalogsClientListDeviceGroupsResponse]
- func (client *CatalogsClient) NewListDeviceInsightsPager(resourceGroupName string, catalogName string, ...) *runtime.Pager[CatalogsClientListDeviceInsightsResponse]
- func (client *CatalogsClient) NewListDevicesPager(resourceGroupName string, catalogName string, ...) *runtime.Pager[CatalogsClientListDevicesResponse]
- func (client *CatalogsClient) Update(ctx context.Context, resourceGroupName string, catalogName string, ...) (CatalogsClientUpdateResponse, error)
- type CatalogsClientBeginCreateOrUpdateOptions
- type CatalogsClientBeginDeleteOptions
- type CatalogsClientBeginUploadImageOptions
- type CatalogsClientCountDevicesOptions
- type CatalogsClientCountDevicesResponse
- type CatalogsClientCreateOrUpdateResponse
- type CatalogsClientDeleteResponse
- type CatalogsClientGetOptions
- type CatalogsClientGetResponse
- type CatalogsClientListByResourceGroupOptions
- type CatalogsClientListByResourceGroupResponse
- type CatalogsClientListBySubscriptionOptions
- type CatalogsClientListBySubscriptionResponse
- type CatalogsClientListDeploymentsOptions
- type CatalogsClientListDeploymentsResponse
- type CatalogsClientListDeviceGroupsOptions
- type CatalogsClientListDeviceGroupsResponse
- type CatalogsClientListDeviceInsightsOptions
- type CatalogsClientListDeviceInsightsResponse
- type CatalogsClientListDevicesOptions
- type CatalogsClientListDevicesResponse
- type CatalogsClientUpdateOptions
- type CatalogsClientUpdateResponse
- type CatalogsClientUploadImageResponse
- type Certificate
- type CertificateChainResponse
- type CertificateListResult
- type CertificateProperties
- type CertificateStatus
- type CertificatesClient
- func (client *CertificatesClient) Get(ctx context.Context, resourceGroupName string, catalogName string, ...) (CertificatesClientGetResponse, error)
- func (client *CertificatesClient) NewListByCatalogPager(resourceGroupName string, catalogName string, ...) *runtime.Pager[CertificatesClientListByCatalogResponse]
- func (client *CertificatesClient) RetrieveCertChain(ctx context.Context, resourceGroupName string, catalogName string, ...) (CertificatesClientRetrieveCertChainResponse, error)
- func (client *CertificatesClient) RetrieveProofOfPossessionNonce(ctx context.Context, resourceGroupName string, catalogName string, ...) (CertificatesClientRetrieveProofOfPossessionNonceResponse, error)
- type CertificatesClientGetOptions
- type CertificatesClientGetResponse
- type CertificatesClientListByCatalogOptions
- type CertificatesClientListByCatalogResponse
- type CertificatesClientRetrieveCertChainOptions
- type CertificatesClientRetrieveCertChainResponse
- type CertificatesClientRetrieveProofOfPossessionNonceOptions
- type CertificatesClientRetrieveProofOfPossessionNonceResponse
- type ClaimDevicesRequest
- type ClientFactory
- func (c *ClientFactory) NewCatalogsClient() *CatalogsClient
- func (c *ClientFactory) NewCertificatesClient() *CertificatesClient
- func (c *ClientFactory) NewDeploymentsClient() *DeploymentsClient
- func (c *ClientFactory) NewDeviceGroupsClient() *DeviceGroupsClient
- func (c *ClientFactory) NewDevicesClient() *DevicesClient
- func (c *ClientFactory) NewImagesClient() *ImagesClient
- func (c *ClientFactory) NewOperationsClient() *OperationsClient
- func (c *ClientFactory) NewProductsClient() *ProductsClient
- type CountDevicesResponse
- type CreatedByType
- type Deployment
- type DeploymentListResult
- type DeploymentProperties
- type DeploymentsClient
- func (client *DeploymentsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, catalogName string, ...) (*runtime.Poller[DeploymentsClientCreateOrUpdateResponse], error)
- func (client *DeploymentsClient) BeginDelete(ctx context.Context, resourceGroupName string, catalogName string, ...) (*runtime.Poller[DeploymentsClientDeleteResponse], error)
- func (client *DeploymentsClient) Get(ctx context.Context, resourceGroupName string, catalogName string, ...) (DeploymentsClientGetResponse, error)
- func (client *DeploymentsClient) NewListByDeviceGroupPager(resourceGroupName string, catalogName string, productName string, ...) *runtime.Pager[DeploymentsClientListByDeviceGroupResponse]
- type DeploymentsClientBeginCreateOrUpdateOptions
- type DeploymentsClientBeginDeleteOptions
- type DeploymentsClientCreateOrUpdateResponse
- type DeploymentsClientDeleteResponse
- type DeploymentsClientGetOptions
- type DeploymentsClientGetResponse
- type DeploymentsClientListByDeviceGroupOptions
- type DeploymentsClientListByDeviceGroupResponse
- type Device
- type DeviceGroup
- type DeviceGroupListResult
- type DeviceGroupProperties
- type DeviceGroupUpdate
- type DeviceGroupUpdateProperties
- type DeviceGroupsClient
- func (client *DeviceGroupsClient) BeginClaimDevices(ctx context.Context, resourceGroupName string, catalogName string, ...) (*runtime.Poller[DeviceGroupsClientClaimDevicesResponse], error)
- func (client *DeviceGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, catalogName string, ...) (*runtime.Poller[DeviceGroupsClientCreateOrUpdateResponse], error)
- func (client *DeviceGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, catalogName string, ...) (*runtime.Poller[DeviceGroupsClientDeleteResponse], error)
- func (client *DeviceGroupsClient) BeginUpdate(ctx context.Context, resourceGroupName string, catalogName string, ...) (*runtime.Poller[DeviceGroupsClientUpdateResponse], error)
- func (client *DeviceGroupsClient) CountDevices(ctx context.Context, resourceGroupName string, catalogName string, ...) (DeviceGroupsClientCountDevicesResponse, error)
- func (client *DeviceGroupsClient) Get(ctx context.Context, resourceGroupName string, catalogName string, ...) (DeviceGroupsClientGetResponse, error)
- func (client *DeviceGroupsClient) NewListByProductPager(resourceGroupName string, catalogName string, productName string, ...) *runtime.Pager[DeviceGroupsClientListByProductResponse]
- type DeviceGroupsClientBeginClaimDevicesOptions
- type DeviceGroupsClientBeginCreateOrUpdateOptions
- type DeviceGroupsClientBeginDeleteOptions
- type DeviceGroupsClientBeginUpdateOptions
- type DeviceGroupsClientClaimDevicesResponse
- type DeviceGroupsClientCountDevicesOptions
- type DeviceGroupsClientCountDevicesResponse
- type DeviceGroupsClientCreateOrUpdateResponse
- type DeviceGroupsClientDeleteResponse
- type DeviceGroupsClientGetOptions
- type DeviceGroupsClientGetResponse
- type DeviceGroupsClientListByProductOptions
- type DeviceGroupsClientListByProductResponse
- type DeviceGroupsClientUpdateResponse
- type DeviceInsight
- type DeviceListResult
- type DeviceProperties
- type DeviceUpdate
- type DeviceUpdateProperties
- type DevicesClient
- func (client *DevicesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, catalogName string, ...) (*runtime.Poller[DevicesClientCreateOrUpdateResponse], error)
- func (client *DevicesClient) BeginDelete(ctx context.Context, resourceGroupName string, catalogName string, ...) (*runtime.Poller[DevicesClientDeleteResponse], error)
- func (client *DevicesClient) BeginGenerateCapabilityImage(ctx context.Context, resourceGroupName string, catalogName string, ...) (*runtime.Poller[DevicesClientGenerateCapabilityImageResponse], error)
- func (client *DevicesClient) BeginUpdate(ctx context.Context, resourceGroupName string, catalogName string, ...) (*runtime.Poller[DevicesClientUpdateResponse], error)
- func (client *DevicesClient) Get(ctx context.Context, resourceGroupName string, catalogName string, ...) (DevicesClientGetResponse, error)
- func (client *DevicesClient) NewListByDeviceGroupPager(resourceGroupName string, catalogName string, productName string, ...) *runtime.Pager[DevicesClientListByDeviceGroupResponse]
- type DevicesClientBeginCreateOrUpdateOptions
- type DevicesClientBeginDeleteOptions
- type DevicesClientBeginGenerateCapabilityImageOptions
- type DevicesClientBeginUpdateOptions
- type DevicesClientCreateOrUpdateResponse
- type DevicesClientDeleteResponse
- type DevicesClientGenerateCapabilityImageResponse
- type DevicesClientGetOptions
- type DevicesClientGetResponse
- type DevicesClientListByDeviceGroupOptions
- type DevicesClientListByDeviceGroupResponse
- type DevicesClientUpdateResponse
- type GenerateCapabilityImageRequest
- type Image
- type ImageListResult
- type ImageProperties
- type ImageType
- type ImagesClient
- func (client *ImagesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, catalogName string, ...) (*runtime.Poller[ImagesClientCreateOrUpdateResponse], error)
- func (client *ImagesClient) BeginDelete(ctx context.Context, resourceGroupName string, catalogName string, ...) (*runtime.Poller[ImagesClientDeleteResponse], error)
- func (client *ImagesClient) Get(ctx context.Context, resourceGroupName string, catalogName string, ...) (ImagesClientGetResponse, error)
- func (client *ImagesClient) NewListByCatalogPager(resourceGroupName string, catalogName string, ...) *runtime.Pager[ImagesClientListByCatalogResponse]
- type ImagesClientBeginCreateOrUpdateOptions
- type ImagesClientBeginDeleteOptions
- type ImagesClientCreateOrUpdateResponse
- type ImagesClientDeleteResponse
- type ImagesClientGetOptions
- type ImagesClientGetResponse
- type ImagesClientListByCatalogOptions
- type ImagesClientListByCatalogResponse
- type ListDeviceGroupsRequest
- type OSFeedType
- type Operation
- type OperationDisplay
- type OperationListResult
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type Origin
- type PagedDeviceInsight
- type Product
- type ProductListResult
- type ProductProperties
- type ProductUpdate
- type ProductUpdateProperties
- type ProductsClient
- func (client *ProductsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, catalogName string, ...) (*runtime.Poller[ProductsClientCreateOrUpdateResponse], error)
- func (client *ProductsClient) BeginDelete(ctx context.Context, resourceGroupName string, catalogName string, ...) (*runtime.Poller[ProductsClientDeleteResponse], error)
- func (client *ProductsClient) BeginUpdate(ctx context.Context, resourceGroupName string, catalogName string, ...) (*runtime.Poller[ProductsClientUpdateResponse], error)
- func (client *ProductsClient) CountDevices(ctx context.Context, resourceGroupName string, catalogName string, ...) (ProductsClientCountDevicesResponse, error)
- func (client *ProductsClient) Get(ctx context.Context, resourceGroupName string, catalogName string, ...) (ProductsClientGetResponse, error)
- func (client *ProductsClient) NewGenerateDefaultDeviceGroupsPager(resourceGroupName string, catalogName string, productName string, ...) *runtime.Pager[ProductsClientGenerateDefaultDeviceGroupsResponse]
- func (client *ProductsClient) NewListByCatalogPager(resourceGroupName string, catalogName string, ...) *runtime.Pager[ProductsClientListByCatalogResponse]
- type ProductsClientBeginCreateOrUpdateOptions
- type ProductsClientBeginDeleteOptions
- type ProductsClientBeginUpdateOptions
- type ProductsClientCountDevicesOptions
- type ProductsClientCountDevicesResponse
- type ProductsClientCreateOrUpdateResponse
- type ProductsClientDeleteResponse
- type ProductsClientGenerateDefaultDeviceGroupsOptions
- type ProductsClientGenerateDefaultDeviceGroupsResponse
- type ProductsClientGetOptions
- type ProductsClientGetResponse
- type ProductsClientListByCatalogOptions
- type ProductsClientListByCatalogResponse
- type ProductsClientUpdateResponse
- type ProofOfPossessionNonceRequest
- type ProofOfPossessionNonceResponse
- type ProvisioningState
- type RegionalDataBoundary
- type SignedCapabilityImageResponse
- type SystemData
- type UpdatePolicy
Examples ¶
- CatalogsClient.BeginCreateOrUpdate
- CatalogsClient.BeginDelete
- CatalogsClient.BeginUploadImage
- CatalogsClient.CountDevices
- CatalogsClient.Get
- CatalogsClient.NewListByResourceGroupPager
- CatalogsClient.NewListBySubscriptionPager
- CatalogsClient.NewListDeploymentsPager
- CatalogsClient.NewListDeviceGroupsPager
- CatalogsClient.NewListDeviceInsightsPager
- CatalogsClient.NewListDevicesPager
- CatalogsClient.Update
- CertificatesClient.Get
- CertificatesClient.NewListByCatalogPager
- CertificatesClient.RetrieveCertChain
- CertificatesClient.RetrieveProofOfPossessionNonce
- DeploymentsClient.BeginCreateOrUpdate
- DeploymentsClient.BeginDelete
- DeploymentsClient.Get
- DeploymentsClient.NewListByDeviceGroupPager
- DeviceGroupsClient.BeginClaimDevices
- DeviceGroupsClient.BeginCreateOrUpdate
- DeviceGroupsClient.BeginDelete
- DeviceGroupsClient.BeginUpdate
- DeviceGroupsClient.CountDevices
- DeviceGroupsClient.Get
- DeviceGroupsClient.NewListByProductPager
- DevicesClient.BeginCreateOrUpdate
- DevicesClient.BeginDelete
- DevicesClient.BeginGenerateCapabilityImage
- DevicesClient.BeginUpdate
- DevicesClient.Get
- DevicesClient.NewListByDeviceGroupPager
- ImagesClient.BeginCreateOrUpdate
- ImagesClient.BeginDelete
- ImagesClient.Get
- ImagesClient.NewListByCatalogPager
- OperationsClient.NewListPager
- ProductsClient.BeginCreateOrUpdate
- ProductsClient.BeginDelete
- ProductsClient.BeginUpdate
- ProductsClient.CountDevices
- ProductsClient.Get
- ProductsClient.NewGenerateDefaultDeviceGroupsPager
- ProductsClient.NewListByCatalogPager
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 AllowCrashDumpCollection ¶
type AllowCrashDumpCollection string
AllowCrashDumpCollection - Allow crash dumps values.
const ( // AllowCrashDumpCollectionDisabled - Crash dump collection disabled AllowCrashDumpCollectionDisabled AllowCrashDumpCollection = "Disabled" // AllowCrashDumpCollectionEnabled - Crash dump collection enabled AllowCrashDumpCollectionEnabled AllowCrashDumpCollection = "Enabled" )
func PossibleAllowCrashDumpCollectionValues ¶
func PossibleAllowCrashDumpCollectionValues() []AllowCrashDumpCollection
PossibleAllowCrashDumpCollectionValues returns the possible values for the AllowCrashDumpCollection const type.
type CapabilityType ¶
type CapabilityType string
CapabilityType - Capability image type
const ( // CapabilityTypeApplicationDevelopment - Application development capability CapabilityTypeApplicationDevelopment CapabilityType = "ApplicationDevelopment" // CapabilityTypeFieldServicing - Field servicing capability CapabilityTypeFieldServicing CapabilityType = "FieldServicing" )
func PossibleCapabilityTypeValues ¶
func PossibleCapabilityTypeValues() []CapabilityType
PossibleCapabilityTypeValues returns the possible values for the CapabilityType const type.
type Catalog ¶
type Catalog struct { // REQUIRED; The geo-location where the resource lives Location *string // The resource-specific properties for this resource. Properties *CatalogProperties // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /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 }
Catalog - An Azure Sphere catalog
func (Catalog) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Catalog.
func (*Catalog) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Catalog.
type CatalogListResult ¶
type CatalogListResult struct { // REQUIRED; The Catalog items on this page Value []*Catalog // READ-ONLY; The link to the next page of items NextLink *string }
CatalogListResult - The response of a Catalog list operation.
func (CatalogListResult) MarshalJSON ¶
func (c CatalogListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CatalogListResult.
func (*CatalogListResult) UnmarshalJSON ¶
func (c *CatalogListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CatalogListResult.
type CatalogProperties ¶
type CatalogProperties struct { // READ-ONLY; The status of the last operation. ProvisioningState *ProvisioningState // READ-ONLY; The Azure Sphere tenant ID associated with the catalog. TenantID *string }
CatalogProperties - Catalog properties
func (CatalogProperties) MarshalJSON ¶
func (c CatalogProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CatalogProperties.
func (*CatalogProperties) UnmarshalJSON ¶
func (c *CatalogProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CatalogProperties.
type CatalogUpdate ¶
CatalogUpdate - The type used for update operations of the Catalog.
func (CatalogUpdate) MarshalJSON ¶
func (c CatalogUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CatalogUpdate.
func (*CatalogUpdate) UnmarshalJSON ¶
func (c *CatalogUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CatalogUpdate.
type CatalogsClient ¶
type CatalogsClient struct {
// contains filtered or unexported fields
}
CatalogsClient contains the methods for the Catalogs group. Don't use this type directly, use NewCatalogsClient() instead.
func NewCatalogsClient ¶
func NewCatalogsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CatalogsClient, error)
NewCatalogsClient creates a new instance of CatalogsClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*CatalogsClient) BeginCreateOrUpdate ¶
func (client *CatalogsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, catalogName string, resource Catalog, options *CatalogsClientBeginCreateOrUpdateOptions) (*runtime.Poller[CatalogsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create a Catalog If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- catalogName - Name of catalog
- resource - Resource create parameters.
- options - CatalogsClientBeginCreateOrUpdateOptions contains the optional parameters for the CatalogsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/09c37754dac91874ff689ed1e60effb4268c8669/specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PutCatalog.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/sphere/armsphere" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsphere.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewCatalogsClient().BeginCreateOrUpdate(ctx, "MyResourceGroup1", "MyCatalog1", armsphere.Catalog{ Location: to.Ptr("global"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %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.Catalog = armsphere.Catalog{ // Name: to.Ptr("MyCatalog1"), // Type: to.Ptr("Microsoft.AzureSphere/catalogs"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1"), // Location: to.Ptr("global"), // } }
Output:
func (*CatalogsClient) BeginDelete ¶
func (client *CatalogsClient) BeginDelete(ctx context.Context, resourceGroupName string, catalogName string, options *CatalogsClientBeginDeleteOptions) (*runtime.Poller[CatalogsClientDeleteResponse], error)
BeginDelete - Delete a Catalog If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- catalogName - Name of catalog
- options - CatalogsClientBeginDeleteOptions contains the optional parameters for the CatalogsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/09c37754dac91874ff689ed1e60effb4268c8669/specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/DeleteCatalog.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sphere/armsphere" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsphere.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewCatalogsClient().BeginDelete(ctx, "MyResourceGroup1", "MyCatalog1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*CatalogsClient) BeginUploadImage ¶ added in v1.0.0
func (client *CatalogsClient) BeginUploadImage(ctx context.Context, resourceGroupName string, catalogName string, uploadImageRequest Image, options *CatalogsClientBeginUploadImageOptions) (*runtime.Poller[CatalogsClientUploadImageResponse], error)
BeginUploadImage - Creates an image. Use this action when the image ID is unknown. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- catalogName - Name of catalog
- uploadImageRequest - Image upload request body.
- options - CatalogsClientBeginUploadImageOptions contains the optional parameters for the CatalogsClient.BeginUploadImage method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/09c37754dac91874ff689ed1e60effb4268c8669/specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PostUploadImageCatalog.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/sphere/armsphere" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsphere.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewCatalogsClient().BeginUploadImage(ctx, "MyResourceGroup1", "MyCatalog1", armsphere.Image{ Properties: &armsphere.ImageProperties{ Image: to.Ptr("bXliYXNlNjRzdHJpbmc="), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*CatalogsClient) CountDevices ¶
func (client *CatalogsClient) CountDevices(ctx context.Context, resourceGroupName string, catalogName string, options *CatalogsClientCountDevicesOptions) (CatalogsClientCountDevicesResponse, error)
CountDevices - Counts devices in catalog. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- catalogName - Name of catalog
- options - CatalogsClientCountDevicesOptions contains the optional parameters for the CatalogsClient.CountDevices method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/09c37754dac91874ff689ed1e60effb4268c8669/specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PostCountDevicesCatalog.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sphere/armsphere" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsphere.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewCatalogsClient().CountDevices(ctx, "MyResourceGroup1", "MyCatalog1", 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.CountDevicesResponse = armsphere.CountDevicesResponse{ // Value: to.Ptr[int32](3), // } }
Output:
func (*CatalogsClient) Get ¶
func (client *CatalogsClient) Get(ctx context.Context, resourceGroupName string, catalogName string, options *CatalogsClientGetOptions) (CatalogsClientGetResponse, error)
Get - Get a Catalog If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- catalogName - Name of catalog
- options - CatalogsClientGetOptions contains the optional parameters for the CatalogsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/09c37754dac91874ff689ed1e60effb4268c8669/specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/GetCatalog.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sphere/armsphere" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsphere.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewCatalogsClient().Get(ctx, "MyResourceGroup1", "MyCatalog1", 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.Catalog = armsphere.Catalog{ // Name: to.Ptr("MyCatalog1"), // Type: to.Ptr("Microsoft.AzureSphere/catalogs"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1"), // Location: to.Ptr("global"), // } }
Output:
func (*CatalogsClient) NewListByResourceGroupPager ¶
func (client *CatalogsClient) NewListByResourceGroupPager(resourceGroupName string, options *CatalogsClientListByResourceGroupOptions) *runtime.Pager[CatalogsClientListByResourceGroupResponse]
NewListByResourceGroupPager - List Catalog resources by resource group
Generated from API version 2024-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - CatalogsClientListByResourceGroupOptions contains the optional parameters for the CatalogsClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/09c37754dac91874ff689ed1e60effb4268c8669/specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/GetCatalogsRG.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sphere/armsphere" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsphere.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewCatalogsClient().NewListByResourceGroupPager("MyResourceGroup1", 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.CatalogListResult = armsphere.CatalogListResult{ // Value: []*armsphere.Catalog{ // { // Name: to.Ptr("MyCatalog1"), // Type: to.Ptr("Microsoft.AzureSphere/catalogs"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1"), // Location: to.Ptr("global"), // }, // { // Name: to.Ptr("MyCatalog2"), // Type: to.Ptr("Microsoft.AzureSphere/catalogs"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog2"), // Location: to.Ptr("global"), // }}, // } } }
Output:
func (*CatalogsClient) NewListBySubscriptionPager ¶
func (client *CatalogsClient) NewListBySubscriptionPager(options *CatalogsClientListBySubscriptionOptions) *runtime.Pager[CatalogsClientListBySubscriptionResponse]
NewListBySubscriptionPager - List Catalog resources by subscription ID
Generated from API version 2024-04-01
- options - CatalogsClientListBySubscriptionOptions contains the optional parameters for the CatalogsClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/09c37754dac91874ff689ed1e60effb4268c8669/specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/GetCatalogsSub.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sphere/armsphere" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsphere.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewCatalogsClient().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.CatalogListResult = armsphere.CatalogListResult{ // Value: []*armsphere.Catalog{ // { // Name: to.Ptr("MyCatalog1"), // Type: to.Ptr("Microsoft.AzureSphere/catalogs"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1"), // Location: to.Ptr("global"), // }, // { // Name: to.Ptr("MyCatalog2"), // Type: to.Ptr("Microsoft.AzureSphere/catalogs"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup2/providers/Microsoft.AzureSphere/catalogs/MyCatalog2"), // Location: to.Ptr("global"), // }}, // } } }
Output:
func (*CatalogsClient) NewListDeploymentsPager ¶
func (client *CatalogsClient) NewListDeploymentsPager(resourceGroupName string, catalogName string, options *CatalogsClientListDeploymentsOptions) *runtime.Pager[CatalogsClientListDeploymentsResponse]
NewListDeploymentsPager - Lists deployments for catalog.
Generated from API version 2024-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- catalogName - Name of catalog
- options - CatalogsClientListDeploymentsOptions contains the optional parameters for the CatalogsClient.NewListDeploymentsPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/09c37754dac91874ff689ed1e60effb4268c8669/specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PostListDeploymentsByCatalog.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sphere/armsphere" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsphere.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewCatalogsClient().NewListDeploymentsPager("MyResourceGroup1", "MyCatalog1", &armsphere.CatalogsClientListDeploymentsOptions{Filter: nil, Top: nil, Skip: nil, Maxpagesize: 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.DeploymentListResult = armsphere.DeploymentListResult{ // Value: []*armsphere.Deployment{ // { // Name: to.Ptr("DeploymentName1111"), // Properties: &armsphere.DeploymentProperties{ // }, // }, // { // Name: to.Ptr("DeploymentName1121"), // Properties: &armsphere.DeploymentProperties{ // }, // }}, // } } }
Output:
func (*CatalogsClient) NewListDeviceGroupsPager ¶
func (client *CatalogsClient) NewListDeviceGroupsPager(resourceGroupName string, catalogName string, listDeviceGroupsRequest ListDeviceGroupsRequest, options *CatalogsClientListDeviceGroupsOptions) *runtime.Pager[CatalogsClientListDeviceGroupsResponse]
NewListDeviceGroupsPager - List the device groups for the catalog.
Generated from API version 2024-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- catalogName - Name of catalog
- listDeviceGroupsRequest - List device groups for catalog.
- options - CatalogsClientListDeviceGroupsOptions contains the optional parameters for the CatalogsClient.NewListDeviceGroupsPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/09c37754dac91874ff689ed1e60effb4268c8669/specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PostListDeviceGroupsCatalog.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/sphere/armsphere" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsphere.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewCatalogsClient().NewListDeviceGroupsPager("MyResourceGroup1", "MyCatalog1", armsphere.ListDeviceGroupsRequest{ DeviceGroupName: to.Ptr("MyDeviceGroup1"), }, &armsphere.CatalogsClientListDeviceGroupsOptions{Filter: nil, Top: nil, Skip: nil, Maxpagesize: 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.DeviceGroupListResult = armsphere.DeviceGroupListResult{ // Value: []*armsphere.DeviceGroup{ // { // Name: to.Ptr("MyDeviceGroup1"), // Type: to.Ptr("microsoft.azureSphere/catalogs/products/devicegroups"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1/devicegroups/MyDeviceGroup1"), // }, // { // Name: to.Ptr("MyDeviceGroup2"), // Type: to.Ptr("microsoft.azureSphere/catalogs/products/devicegroups"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct2/devicegroups/MyDeviceGroup2"), // }}, // } } }
Output:
func (*CatalogsClient) NewListDeviceInsightsPager ¶
func (client *CatalogsClient) NewListDeviceInsightsPager(resourceGroupName string, catalogName string, options *CatalogsClientListDeviceInsightsOptions) *runtime.Pager[CatalogsClientListDeviceInsightsResponse]
NewListDeviceInsightsPager - Lists device insights for catalog.
Generated from API version 2024-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- catalogName - Name of catalog
- options - CatalogsClientListDeviceInsightsOptions contains the optional parameters for the CatalogsClient.NewListDeviceInsightsPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/09c37754dac91874ff689ed1e60effb4268c8669/specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PostListDeviceInsightsCatalog.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/sphere/armsphere" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsphere.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewCatalogsClient().NewListDeviceInsightsPager("MyResourceGroup1", "MyCatalog1", &armsphere.CatalogsClientListDeviceInsightsOptions{Filter: nil, Top: to.Ptr[int32](10), Skip: nil, Maxpagesize: 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.PagedDeviceInsight = armsphere.PagedDeviceInsight{ // Value: []*armsphere.DeviceInsight{ // { // Description: to.Ptr("eventDescription1"), // DeviceID: to.Ptr("eventIdentifier1"), // EndTimestampUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-30T23:54:21.960Z"); return t}()), // EventCategory: to.Ptr("eventCategory1"), // EventClass: to.Ptr("eventClass1"), // EventCount: to.Ptr[int32](1), // EventType: to.Ptr("eventType1"), // StartTimestampUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-30T21:51:39.260Z"); return t}()), // }, // { // Description: to.Ptr("eventDescription2"), // DeviceID: to.Ptr("eventIdentifier2"), // EndTimestampUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-07T17:34:12.500Z"); return t}()), // EventCategory: to.Ptr("eventCategory2"), // EventClass: to.Ptr("eventClass2"), // EventCount: to.Ptr[int32](1), // EventType: to.Ptr("eventType2"), // StartTimestampUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-06T12:41:39.260Z"); return t}()), // }}, // } } }
Output:
func (*CatalogsClient) NewListDevicesPager ¶
func (client *CatalogsClient) NewListDevicesPager(resourceGroupName string, catalogName string, options *CatalogsClientListDevicesOptions) *runtime.Pager[CatalogsClientListDevicesResponse]
NewListDevicesPager - Lists devices for catalog.
Generated from API version 2024-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- catalogName - Name of catalog
- options - CatalogsClientListDevicesOptions contains the optional parameters for the CatalogsClient.NewListDevicesPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/09c37754dac91874ff689ed1e60effb4268c8669/specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PostListDevicesByCatalog.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sphere/armsphere" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsphere.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewCatalogsClient().NewListDevicesPager("MyResourceGroup1", "MyCatalog1", &armsphere.CatalogsClientListDevicesOptions{Filter: nil, Top: nil, Skip: nil, Maxpagesize: 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.DeviceListResult = armsphere.DeviceListResult{ // Value: []*armsphere.Device{ // { // Name: to.Ptr("00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"), // Properties: &armsphere.DeviceProperties{ // }, // }, // { // Name: to.Ptr("00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"), // Properties: &armsphere.DeviceProperties{ // }, // }}, // } } }
Output:
func (*CatalogsClient) Update ¶
func (client *CatalogsClient) Update(ctx context.Context, resourceGroupName string, catalogName string, properties CatalogUpdate, options *CatalogsClientUpdateOptions) (CatalogsClientUpdateResponse, error)
Update - Update a Catalog If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- catalogName - Name of catalog
- properties - The resource properties to be updated.
- options - CatalogsClientUpdateOptions contains the optional parameters for the CatalogsClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/09c37754dac91874ff689ed1e60effb4268c8669/specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PatchCatalog.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sphere/armsphere" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsphere.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewCatalogsClient().Update(ctx, "MyResourceGroup1", "MyCatalog1", armsphere.CatalogUpdate{}, 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.Catalog = armsphere.Catalog{ // Name: to.Ptr("MyCatalog1"), // Type: to.Ptr("Microsoft.AzureSphere/catalogs"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1"), // Location: to.Ptr("global"), // } }
Output:
type CatalogsClientBeginCreateOrUpdateOptions ¶
type CatalogsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CatalogsClientBeginCreateOrUpdateOptions contains the optional parameters for the CatalogsClient.BeginCreateOrUpdate method.
type CatalogsClientBeginDeleteOptions ¶
type CatalogsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CatalogsClientBeginDeleteOptions contains the optional parameters for the CatalogsClient.BeginDelete method.
type CatalogsClientBeginUploadImageOptions ¶ added in v1.0.0
type CatalogsClientBeginUploadImageOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CatalogsClientBeginUploadImageOptions contains the optional parameters for the CatalogsClient.BeginUploadImage method.
type CatalogsClientCountDevicesOptions ¶
type CatalogsClientCountDevicesOptions struct { }
CatalogsClientCountDevicesOptions contains the optional parameters for the CatalogsClient.CountDevices method.
type CatalogsClientCountDevicesResponse ¶
type CatalogsClientCountDevicesResponse struct { // Response to the action call for count devices in a catalog. CountDevicesResponse }
CatalogsClientCountDevicesResponse contains the response from method CatalogsClient.CountDevices.
type CatalogsClientCreateOrUpdateResponse ¶
type CatalogsClientCreateOrUpdateResponse struct { // An Azure Sphere catalog Catalog }
CatalogsClientCreateOrUpdateResponse contains the response from method CatalogsClient.BeginCreateOrUpdate.
type CatalogsClientDeleteResponse ¶
type CatalogsClientDeleteResponse struct { }
CatalogsClientDeleteResponse contains the response from method CatalogsClient.BeginDelete.
type CatalogsClientGetOptions ¶
type CatalogsClientGetOptions struct { }
CatalogsClientGetOptions contains the optional parameters for the CatalogsClient.Get method.
type CatalogsClientGetResponse ¶
type CatalogsClientGetResponse struct { // An Azure Sphere catalog Catalog }
CatalogsClientGetResponse contains the response from method CatalogsClient.Get.
type CatalogsClientListByResourceGroupOptions ¶
type CatalogsClientListByResourceGroupOptions struct { }
CatalogsClientListByResourceGroupOptions contains the optional parameters for the CatalogsClient.NewListByResourceGroupPager method.
type CatalogsClientListByResourceGroupResponse ¶
type CatalogsClientListByResourceGroupResponse struct { // The response of a Catalog list operation. CatalogListResult }
CatalogsClientListByResourceGroupResponse contains the response from method CatalogsClient.NewListByResourceGroupPager.
type CatalogsClientListBySubscriptionOptions ¶
type CatalogsClientListBySubscriptionOptions struct { }
CatalogsClientListBySubscriptionOptions contains the optional parameters for the CatalogsClient.NewListBySubscriptionPager method.
type CatalogsClientListBySubscriptionResponse ¶
type CatalogsClientListBySubscriptionResponse struct { // The response of a Catalog list operation. CatalogListResult }
CatalogsClientListBySubscriptionResponse contains the response from method CatalogsClient.NewListBySubscriptionPager.
type CatalogsClientListDeploymentsOptions ¶
type CatalogsClientListDeploymentsOptions struct { // Filter the result list using the given expression Filter *string // The maximum number of result items per page. Maxpagesize *int32 // The number of result items to skip. Skip *int32 // The number of result items to return. Top *int32 }
CatalogsClientListDeploymentsOptions contains the optional parameters for the CatalogsClient.NewListDeploymentsPager method.
type CatalogsClientListDeploymentsResponse ¶
type CatalogsClientListDeploymentsResponse struct { // The response of a Deployment list operation. DeploymentListResult }
CatalogsClientListDeploymentsResponse contains the response from method CatalogsClient.NewListDeploymentsPager.
type CatalogsClientListDeviceGroupsOptions ¶
type CatalogsClientListDeviceGroupsOptions struct { // Filter the result list using the given expression Filter *string // The maximum number of result items per page. Maxpagesize *int32 // The number of result items to skip. Skip *int32 // The number of result items to return. Top *int32 }
CatalogsClientListDeviceGroupsOptions contains the optional parameters for the CatalogsClient.NewListDeviceGroupsPager method.
type CatalogsClientListDeviceGroupsResponse ¶
type CatalogsClientListDeviceGroupsResponse struct { // The response of a DeviceGroup list operation. DeviceGroupListResult }
CatalogsClientListDeviceGroupsResponse contains the response from method CatalogsClient.NewListDeviceGroupsPager.
type CatalogsClientListDeviceInsightsOptions ¶
type CatalogsClientListDeviceInsightsOptions struct { // Filter the result list using the given expression Filter *string // The maximum number of result items per page. Maxpagesize *int32 // The number of result items to skip. Skip *int32 // The number of result items to return. Top *int32 }
CatalogsClientListDeviceInsightsOptions contains the optional parameters for the CatalogsClient.NewListDeviceInsightsPager method.
type CatalogsClientListDeviceInsightsResponse ¶
type CatalogsClientListDeviceInsightsResponse struct { // Paged collection of DeviceInsight items PagedDeviceInsight }
CatalogsClientListDeviceInsightsResponse contains the response from method CatalogsClient.NewListDeviceInsightsPager.
type CatalogsClientListDevicesOptions ¶
type CatalogsClientListDevicesOptions struct { // Filter the result list using the given expression Filter *string // The maximum number of result items per page. Maxpagesize *int32 // The number of result items to skip. Skip *int32 // The number of result items to return. Top *int32 }
CatalogsClientListDevicesOptions contains the optional parameters for the CatalogsClient.NewListDevicesPager method.
type CatalogsClientListDevicesResponse ¶
type CatalogsClientListDevicesResponse struct { // The response of a Device list operation. DeviceListResult }
CatalogsClientListDevicesResponse contains the response from method CatalogsClient.NewListDevicesPager.
type CatalogsClientUpdateOptions ¶
type CatalogsClientUpdateOptions struct { }
CatalogsClientUpdateOptions contains the optional parameters for the CatalogsClient.Update method.
type CatalogsClientUpdateResponse ¶
type CatalogsClientUpdateResponse struct { // An Azure Sphere catalog Catalog }
CatalogsClientUpdateResponse contains the response from method CatalogsClient.Update.
type CatalogsClientUploadImageResponse ¶ added in v1.0.0
type CatalogsClientUploadImageResponse struct { }
CatalogsClientUploadImageResponse contains the response from method CatalogsClient.BeginUploadImage.
type Certificate ¶
type Certificate struct { // The resource-specific properties for this resource. Properties *CertificateProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /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 }
Certificate - An certificate resource belonging to a catalog resource.
func (Certificate) MarshalJSON ¶
func (c Certificate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type Certificate.
func (*Certificate) UnmarshalJSON ¶
func (c *Certificate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type Certificate.
type CertificateChainResponse ¶
type CertificateChainResponse struct { // READ-ONLY; The certificate chain. CertificateChain *string }
CertificateChainResponse - The certificate chain response.
func (CertificateChainResponse) MarshalJSON ¶
func (c CertificateChainResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CertificateChainResponse.
func (*CertificateChainResponse) UnmarshalJSON ¶
func (c *CertificateChainResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CertificateChainResponse.
type CertificateListResult ¶
type CertificateListResult struct { // REQUIRED; The Certificate items on this page Value []*Certificate // READ-ONLY; The link to the next page of items NextLink *string }
CertificateListResult - The response of a Certificate list operation.
func (CertificateListResult) MarshalJSON ¶
func (c CertificateListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CertificateListResult.
func (*CertificateListResult) UnmarshalJSON ¶
func (c *CertificateListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CertificateListResult.
type CertificateProperties ¶
type CertificateProperties struct { // READ-ONLY; The certificate as a UTF-8 encoded base 64 string. Certificate *string // READ-ONLY; The certificate expiry date. ExpiryUTC *time.Time // READ-ONLY; The certificate not before date. NotBeforeUTC *time.Time // READ-ONLY; The status of the last operation. ProvisioningState *ProvisioningState // READ-ONLY; The certificate status. Status *CertificateStatus // READ-ONLY; The certificate subject. Subject *string // READ-ONLY; The certificate thumbprint. Thumbprint *string }
CertificateProperties - The properties of certificate
func (CertificateProperties) MarshalJSON ¶
func (c CertificateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CertificateProperties.
func (*CertificateProperties) UnmarshalJSON ¶
func (c *CertificateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CertificateProperties.
type CertificateStatus ¶
type CertificateStatus string
CertificateStatus - Certificate status values.
const ( // CertificateStatusActive - Certificate is active CertificateStatusActive CertificateStatus = "Active" // CertificateStatusExpired - Certificate has expired CertificateStatusExpired CertificateStatus = "Expired" // CertificateStatusInactive - Certificate is inactive CertificateStatusInactive CertificateStatus = "Inactive" // CertificateStatusRevoked - Certificate has been revoked CertificateStatusRevoked CertificateStatus = "Revoked" )
func PossibleCertificateStatusValues ¶
func PossibleCertificateStatusValues() []CertificateStatus
PossibleCertificateStatusValues returns the possible values for the CertificateStatus const type.
type CertificatesClient ¶
type CertificatesClient struct {
// contains filtered or unexported fields
}
CertificatesClient contains the methods for the Certificates group. Don't use this type directly, use NewCertificatesClient() instead.
func NewCertificatesClient ¶
func NewCertificatesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CertificatesClient, error)
NewCertificatesClient creates a new instance of CertificatesClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*CertificatesClient) Get ¶
func (client *CertificatesClient) Get(ctx context.Context, resourceGroupName string, catalogName string, serialNumber string, options *CertificatesClientGetOptions) (CertificatesClientGetResponse, error)
Get - Get a Certificate If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- catalogName - Name of catalog
- serialNumber - Serial number of the certificate. Use '.default' to get current active certificate.
- options - CertificatesClientGetOptions contains the optional parameters for the CertificatesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/09c37754dac91874ff689ed1e60effb4268c8669/specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/GetCertificate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sphere/armsphere" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsphere.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewCertificatesClient().Get(ctx, "MyResourceGroup1", "MyCatalog1", "default", 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.Certificate = armsphere.Certificate{ // } }
Output:
func (*CertificatesClient) NewListByCatalogPager ¶
func (client *CertificatesClient) NewListByCatalogPager(resourceGroupName string, catalogName string, options *CertificatesClientListByCatalogOptions) *runtime.Pager[CertificatesClientListByCatalogResponse]
NewListByCatalogPager - List Certificate resources by Catalog
Generated from API version 2024-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- catalogName - Name of catalog
- options - CertificatesClientListByCatalogOptions contains the optional parameters for the CertificatesClient.NewListByCatalogPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/09c37754dac91874ff689ed1e60effb4268c8669/specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/GetCertificates.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sphere/armsphere" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsphere.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewCertificatesClient().NewListByCatalogPager("MyResourceGroup1", "MyCatalog1", &armsphere.CertificatesClientListByCatalogOptions{Filter: nil, Top: nil, Skip: nil, Maxpagesize: 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.CertificateListResult = armsphere.CertificateListResult{ // Value: []*armsphere.Certificate{ // }, // } } }
Output:
func (*CertificatesClient) RetrieveCertChain ¶
func (client *CertificatesClient) RetrieveCertChain(ctx context.Context, resourceGroupName string, catalogName string, serialNumber string, options *CertificatesClientRetrieveCertChainOptions) (CertificatesClientRetrieveCertChainResponse, error)
RetrieveCertChain - Retrieves cert chain. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- catalogName - Name of catalog
- serialNumber - Serial number of the certificate. Use '.default' to get current active certificate.
- options - CertificatesClientRetrieveCertChainOptions contains the optional parameters for the CertificatesClient.RetrieveCertChain method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/09c37754dac91874ff689ed1e60effb4268c8669/specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PostRetrieveCatalogCertChain.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sphere/armsphere" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsphere.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewCertificatesClient().RetrieveCertChain(ctx, "MyResourceGroup1", "MyCatalog1", "active", 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.CertificateChainResponse = armsphere.CertificateChainResponse{ // CertificateChain: to.Ptr("ABynaryRepresentationOfTheRequestedCatalogCertificateChain"), // } }
Output:
func (*CertificatesClient) RetrieveProofOfPossessionNonce ¶
func (client *CertificatesClient) RetrieveProofOfPossessionNonce(ctx context.Context, resourceGroupName string, catalogName string, serialNumber string, proofOfPossessionNonceRequest ProofOfPossessionNonceRequest, options *CertificatesClientRetrieveProofOfPossessionNonceOptions) (CertificatesClientRetrieveProofOfPossessionNonceResponse, error)
RetrieveProofOfPossessionNonce - Gets the proof of possession nonce. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- catalogName - Name of catalog
- serialNumber - Serial number of the certificate. Use '.default' to get current active certificate.
- proofOfPossessionNonceRequest - Proof of possession nonce request body
- options - CertificatesClientRetrieveProofOfPossessionNonceOptions contains the optional parameters for the CertificatesClient.RetrieveProofOfPossessionNonce method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/09c37754dac91874ff689ed1e60effb4268c8669/specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PostRetrieveProofOfPossessionNonce.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/sphere/armsphere" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsphere.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewCertificatesClient().RetrieveProofOfPossessionNonce(ctx, "MyResourceGroup1", "MyCatalog1", "active", armsphere.ProofOfPossessionNonceRequest{ ProofOfPossessionNonce: to.Ptr("proofOfPossessionNonce"), }, 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.ProofOfPossessionNonceResponse = armsphere.ProofOfPossessionNonceResponse{ // Certificate: to.Ptr("bXliYXNlNjRzdHJpbmc="), // } }
Output:
type CertificatesClientGetOptions ¶
type CertificatesClientGetOptions struct { }
CertificatesClientGetOptions contains the optional parameters for the CertificatesClient.Get method.
type CertificatesClientGetResponse ¶
type CertificatesClientGetResponse struct { // An certificate resource belonging to a catalog resource. Certificate }
CertificatesClientGetResponse contains the response from method CertificatesClient.Get.
type CertificatesClientListByCatalogOptions ¶
type CertificatesClientListByCatalogOptions struct { // Filter the result list using the given expression Filter *string // The maximum number of result items per page. Maxpagesize *int32 // The number of result items to skip. Skip *int32 // The number of result items to return. Top *int32 }
CertificatesClientListByCatalogOptions contains the optional parameters for the CertificatesClient.NewListByCatalogPager method.
type CertificatesClientListByCatalogResponse ¶
type CertificatesClientListByCatalogResponse struct { // The response of a Certificate list operation. CertificateListResult }
CertificatesClientListByCatalogResponse contains the response from method CertificatesClient.NewListByCatalogPager.
type CertificatesClientRetrieveCertChainOptions ¶
type CertificatesClientRetrieveCertChainOptions struct { }
CertificatesClientRetrieveCertChainOptions contains the optional parameters for the CertificatesClient.RetrieveCertChain method.
type CertificatesClientRetrieveCertChainResponse ¶
type CertificatesClientRetrieveCertChainResponse struct { // The certificate chain response. CertificateChainResponse }
CertificatesClientRetrieveCertChainResponse contains the response from method CertificatesClient.RetrieveCertChain.
type CertificatesClientRetrieveProofOfPossessionNonceOptions ¶
type CertificatesClientRetrieveProofOfPossessionNonceOptions struct { }
CertificatesClientRetrieveProofOfPossessionNonceOptions contains the optional parameters for the CertificatesClient.RetrieveProofOfPossessionNonce method.
type CertificatesClientRetrieveProofOfPossessionNonceResponse ¶
type CertificatesClientRetrieveProofOfPossessionNonceResponse struct { // Result of the action to generate a proof of possession nonce ProofOfPossessionNonceResponse }
CertificatesClientRetrieveProofOfPossessionNonceResponse contains the response from method CertificatesClient.RetrieveProofOfPossessionNonce.
type ClaimDevicesRequest ¶
type ClaimDevicesRequest struct { // REQUIRED; Device identifiers of the devices to be claimed. DeviceIdentifiers []*string }
ClaimDevicesRequest - Request to the action call to bulk claim devices.
func (ClaimDevicesRequest) MarshalJSON ¶
func (c ClaimDevicesRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClaimDevicesRequest.
func (*ClaimDevicesRequest) UnmarshalJSON ¶
func (c *ClaimDevicesRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClaimDevicesRequest.
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.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ClientFactory) NewCatalogsClient ¶
func (c *ClientFactory) NewCatalogsClient() *CatalogsClient
NewCatalogsClient creates a new instance of CatalogsClient.
func (*ClientFactory) NewCertificatesClient ¶
func (c *ClientFactory) NewCertificatesClient() *CertificatesClient
NewCertificatesClient creates a new instance of CertificatesClient.
func (*ClientFactory) NewDeploymentsClient ¶
func (c *ClientFactory) NewDeploymentsClient() *DeploymentsClient
NewDeploymentsClient creates a new instance of DeploymentsClient.
func (*ClientFactory) NewDeviceGroupsClient ¶
func (c *ClientFactory) NewDeviceGroupsClient() *DeviceGroupsClient
NewDeviceGroupsClient creates a new instance of DeviceGroupsClient.
func (*ClientFactory) NewDevicesClient ¶
func (c *ClientFactory) NewDevicesClient() *DevicesClient
NewDevicesClient creates a new instance of DevicesClient.
func (*ClientFactory) NewImagesClient ¶
func (c *ClientFactory) NewImagesClient() *ImagesClient
NewImagesClient creates a new instance of ImagesClient.
func (*ClientFactory) NewOperationsClient ¶
func (c *ClientFactory) NewOperationsClient() *OperationsClient
NewOperationsClient creates a new instance of OperationsClient.
func (*ClientFactory) NewProductsClient ¶
func (c *ClientFactory) NewProductsClient() *ProductsClient
NewProductsClient creates a new instance of ProductsClient.
type CountDevicesResponse ¶ added in v1.0.0
type CountDevicesResponse struct { // REQUIRED; Number of children resources in parent resource. Value *int32 }
CountDevicesResponse - Response to the action call for count devices in a catalog.
func (CountDevicesResponse) MarshalJSON ¶ added in v1.0.0
func (c CountDevicesResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CountDevicesResponse.
func (*CountDevicesResponse) UnmarshalJSON ¶ added in v1.0.0
func (c *CountDevicesResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CountDevicesResponse.
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 Deployment ¶
type Deployment struct { // The resource-specific properties for this resource. Properties *DeploymentProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /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 }
Deployment - An deployment resource belonging to a device group resource.
func (Deployment) MarshalJSON ¶
func (d Deployment) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type Deployment.
func (*Deployment) UnmarshalJSON ¶
func (d *Deployment) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type Deployment.
type DeploymentListResult ¶
type DeploymentListResult struct { // REQUIRED; The Deployment items on this page Value []*Deployment // READ-ONLY; The link to the next page of items NextLink *string }
DeploymentListResult - The response of a Deployment list operation.
func (DeploymentListResult) MarshalJSON ¶
func (d DeploymentListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DeploymentListResult.
func (*DeploymentListResult) UnmarshalJSON ¶
func (d *DeploymentListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentListResult.
type DeploymentProperties ¶
type DeploymentProperties struct { // Images deployed DeployedImages []*Image // Deployment ID DeploymentID *string // READ-ONLY; Deployment date UTC DeploymentDateUTC *time.Time // READ-ONLY; The status of the last operation. ProvisioningState *ProvisioningState }
DeploymentProperties - The properties of deployment
func (DeploymentProperties) MarshalJSON ¶
func (d DeploymentProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DeploymentProperties.
func (*DeploymentProperties) UnmarshalJSON ¶
func (d *DeploymentProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentProperties.
type DeploymentsClient ¶
type DeploymentsClient struct {
// contains filtered or unexported fields
}
DeploymentsClient contains the methods for the Deployments group. Don't use this type directly, use NewDeploymentsClient() instead.
func NewDeploymentsClient ¶
func NewDeploymentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DeploymentsClient, error)
NewDeploymentsClient creates a new instance of DeploymentsClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*DeploymentsClient) BeginCreateOrUpdate ¶
func (client *DeploymentsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, catalogName string, productName string, deviceGroupName string, deploymentName string, resource Deployment, options *DeploymentsClientBeginCreateOrUpdateOptions) (*runtime.Poller[DeploymentsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- catalogName - Name of catalog
- productName - Name of product.
- deviceGroupName - Name of device group.
- deploymentName - Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group.
- resource - Resource create parameters.
- options - DeploymentsClientBeginCreateOrUpdateOptions contains the optional parameters for the DeploymentsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/09c37754dac91874ff689ed1e60effb4268c8669/specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PutDeployment.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sphere/armsphere" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsphere.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDeploymentsClient().BeginCreateOrUpdate(ctx, "MyResourceGroup1", "MyCatalog1", "MyProduct1", "myDeviceGroup1", "MyDeployment1", armsphere.Deployment{}, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %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.Deployment = armsphere.Deployment{ // Name: to.Ptr("MyDeployment1"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1/deviceGroups/MyDeviceGroup1/deployments/MyDeployment1"), // Properties: &armsphere.DeploymentProperties{ // DeployedImages: []*armsphere.Image{ // { // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/images/MyImage1"), // Properties: &armsphere.ImageProperties{ // Image: to.Ptr("MyImage"), // ImageID: to.Ptr("00000000-0000-0000-0000-000000000000"), // ImageType: to.Ptr(armsphere.ImageTypeInvalidImageType), // ProvisioningState: to.Ptr(armsphere.ProvisioningStateSucceeded), // RegionalDataBoundary: to.Ptr(armsphere.RegionalDataBoundaryNone), // URI: to.Ptr("imageUri"), // }, // }}, // ProvisioningState: to.Ptr(armsphere.ProvisioningStateSucceeded), // }, // } }
Output:
func (*DeploymentsClient) BeginDelete ¶
func (client *DeploymentsClient) BeginDelete(ctx context.Context, resourceGroupName string, catalogName string, productName string, deviceGroupName string, deploymentName string, options *DeploymentsClientBeginDeleteOptions) (*runtime.Poller[DeploymentsClientDeleteResponse], error)
BeginDelete - Delete a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- catalogName - Name of catalog
- productName - Name of product.
- deviceGroupName - Name of device group.
- deploymentName - Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group.
- options - DeploymentsClientBeginDeleteOptions contains the optional parameters for the DeploymentsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/09c37754dac91874ff689ed1e60effb4268c8669/specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/DeleteDeployment.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sphere/armsphere" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsphere.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDeploymentsClient().BeginDelete(ctx, "MyResourceGroup1", "MyCatalog1", "MyProductName1", "DeviceGroupName1", "MyDeploymentName1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*DeploymentsClient) Get ¶
func (client *DeploymentsClient) Get(ctx context.Context, resourceGroupName string, catalogName string, productName string, deviceGroupName string, deploymentName string, options *DeploymentsClientGetOptions) (DeploymentsClientGetResponse, error)
Get - Get a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- catalogName - Name of catalog
- productName - Name of product.
- deviceGroupName - Name of device group.
- deploymentName - Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group.
- options - DeploymentsClientGetOptions contains the optional parameters for the DeploymentsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/09c37754dac91874ff689ed1e60effb4268c8669/specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/GetDeployment.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sphere/armsphere" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsphere.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDeploymentsClient().Get(ctx, "MyResourceGroup1", "MyCatalog1", "MyProduct1", "myDeviceGroup1", "MyDeployment1", 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.Deployment = armsphere.Deployment{ // Name: to.Ptr("MyDeployment1"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1/deviceGroups/MyDeviceGroup1/deployments/MyDeployment1"), // Properties: &armsphere.DeploymentProperties{ // DeployedImages: []*armsphere.Image{ // { // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/images/MyImage1"), // Properties: &armsphere.ImageProperties{ // Description: to.Ptr("description"), // ComponentID: to.Ptr("componentId"), // Image: to.Ptr("dGVzdGltYWdl"), // ImageType: to.Ptr(armsphere.ImageType("ImageType")), // ProvisioningState: to.Ptr(armsphere.ProvisioningStateSucceeded), // RegionalDataBoundary: to.Ptr(armsphere.RegionalDataBoundaryNone), // URI: to.Ptr("imageUri"), // }, // }}, // }, // } }
Output:
func (*DeploymentsClient) NewListByDeviceGroupPager ¶
func (client *DeploymentsClient) NewListByDeviceGroupPager(resourceGroupName string, catalogName string, productName string, deviceGroupName string, options *DeploymentsClientListByDeviceGroupOptions) *runtime.Pager[DeploymentsClientListByDeviceGroupResponse]
NewListByDeviceGroupPager - List Deployment resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.
Generated from API version 2024-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- catalogName - Name of catalog
- productName - Name of product.
- deviceGroupName - Name of device group.
- options - DeploymentsClientListByDeviceGroupOptions contains the optional parameters for the DeploymentsClient.NewListByDeviceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/09c37754dac91874ff689ed1e60effb4268c8669/specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/GetDeployments.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sphere/armsphere" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsphere.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewDeploymentsClient().NewListByDeviceGroupPager("MyResourceGroup1", "MyCatalog1", "MyProduct1", "myDeviceGroup1", &armsphere.DeploymentsClientListByDeviceGroupOptions{Filter: nil, Top: nil, Skip: nil, Maxpagesize: 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.DeploymentListResult = armsphere.DeploymentListResult{ // Value: []*armsphere.Deployment{ // { // Name: to.Ptr("MyDeployment1"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1/deviceGroups/MyDeviceGroup1/deployments/MyDeployment1"), // Properties: &armsphere.DeploymentProperties{ // DeployedImages: []*armsphere.Image{ // { // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/images/MyImage1"), // Properties: &armsphere.ImageProperties{ // Description: to.Ptr("description"), // ComponentID: to.Ptr("componentId"), // Image: to.Ptr("dGVzdGltYWdl"), // ImageType: to.Ptr(armsphere.ImageType("ImageType")), // ProvisioningState: to.Ptr(armsphere.ProvisioningStateSucceeded), // RegionalDataBoundary: to.Ptr(armsphere.RegionalDataBoundaryNone), // URI: to.Ptr("imageUri"), // }, // }}, // DeploymentDateUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-30T21:51:39.269Z"); return t}()), // }, // }}, // } } }
Output:
type DeploymentsClientBeginCreateOrUpdateOptions ¶
type DeploymentsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DeploymentsClientBeginCreateOrUpdateOptions contains the optional parameters for the DeploymentsClient.BeginCreateOrUpdate method.
type DeploymentsClientBeginDeleteOptions ¶
type DeploymentsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DeploymentsClientBeginDeleteOptions contains the optional parameters for the DeploymentsClient.BeginDelete method.
type DeploymentsClientCreateOrUpdateResponse ¶
type DeploymentsClientCreateOrUpdateResponse struct { // An deployment resource belonging to a device group resource. Deployment }
DeploymentsClientCreateOrUpdateResponse contains the response from method DeploymentsClient.BeginCreateOrUpdate.
type DeploymentsClientDeleteResponse ¶
type DeploymentsClientDeleteResponse struct { }
DeploymentsClientDeleteResponse contains the response from method DeploymentsClient.BeginDelete.
type DeploymentsClientGetOptions ¶
type DeploymentsClientGetOptions struct { }
DeploymentsClientGetOptions contains the optional parameters for the DeploymentsClient.Get method.
type DeploymentsClientGetResponse ¶
type DeploymentsClientGetResponse struct { // An deployment resource belonging to a device group resource. Deployment }
DeploymentsClientGetResponse contains the response from method DeploymentsClient.Get.
type DeploymentsClientListByDeviceGroupOptions ¶
type DeploymentsClientListByDeviceGroupOptions struct { // Filter the result list using the given expression Filter *string // The maximum number of result items per page. Maxpagesize *int32 // The number of result items to skip. Skip *int32 // The number of result items to return. Top *int32 }
DeploymentsClientListByDeviceGroupOptions contains the optional parameters for the DeploymentsClient.NewListByDeviceGroupPager method.
type DeploymentsClientListByDeviceGroupResponse ¶
type DeploymentsClientListByDeviceGroupResponse struct { // The response of a Deployment list operation. DeploymentListResult }
DeploymentsClientListByDeviceGroupResponse contains the response from method DeploymentsClient.NewListByDeviceGroupPager.
type Device ¶
type Device struct { // The resource-specific properties for this resource. Properties *DeviceProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /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 }
Device - An device resource belonging to a device group resource.
func (Device) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Device.
func (*Device) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Device.
type DeviceGroup ¶
type DeviceGroup struct { // The resource-specific properties for this resource. Properties *DeviceGroupProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /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 }
DeviceGroup - An device group resource belonging to a product resource.
func (DeviceGroup) MarshalJSON ¶
func (d DeviceGroup) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DeviceGroup.
func (*DeviceGroup) UnmarshalJSON ¶
func (d *DeviceGroup) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DeviceGroup.
type DeviceGroupListResult ¶
type DeviceGroupListResult struct { // REQUIRED; The DeviceGroup items on this page Value []*DeviceGroup // READ-ONLY; The link to the next page of items NextLink *string }
DeviceGroupListResult - The response of a DeviceGroup list operation.
func (DeviceGroupListResult) MarshalJSON ¶
func (d DeviceGroupListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DeviceGroupListResult.
func (*DeviceGroupListResult) UnmarshalJSON ¶
func (d *DeviceGroupListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DeviceGroupListResult.
type DeviceGroupProperties ¶
type DeviceGroupProperties struct { // Flag to define if the user allows for crash dump collection. AllowCrashDumpsCollection *AllowCrashDumpCollection // Description of the device group. Description *string // Operating system feed type of the device group. OSFeedType *OSFeedType // Regional data boundary for the device group. RegionalDataBoundary *RegionalDataBoundary // Update policy of the device group. UpdatePolicy *UpdatePolicy // READ-ONLY; Deployment status for the device group. HasDeployment *bool // READ-ONLY; The status of the last operation. ProvisioningState *ProvisioningState }
DeviceGroupProperties - The properties of deviceGroup
func (DeviceGroupProperties) MarshalJSON ¶
func (d DeviceGroupProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DeviceGroupProperties.
func (*DeviceGroupProperties) UnmarshalJSON ¶
func (d *DeviceGroupProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DeviceGroupProperties.
type DeviceGroupUpdate ¶
type DeviceGroupUpdate struct { // The updatable properties of the DeviceGroup. Properties *DeviceGroupUpdateProperties }
DeviceGroupUpdate - The type used for update operations of the DeviceGroup.
func (DeviceGroupUpdate) MarshalJSON ¶
func (d DeviceGroupUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DeviceGroupUpdate.
func (*DeviceGroupUpdate) UnmarshalJSON ¶
func (d *DeviceGroupUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DeviceGroupUpdate.
type DeviceGroupUpdateProperties ¶
type DeviceGroupUpdateProperties struct { // Flag to define if the user allows for crash dump collection. AllowCrashDumpsCollection *AllowCrashDumpCollection // Description of the device group. Description *string // Operating system feed type of the device group. OSFeedType *OSFeedType // Regional data boundary for the device group. RegionalDataBoundary *RegionalDataBoundary // Update policy of the device group. UpdatePolicy *UpdatePolicy }
DeviceGroupUpdateProperties - The updatable properties of the DeviceGroup.
func (DeviceGroupUpdateProperties) MarshalJSON ¶
func (d DeviceGroupUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DeviceGroupUpdateProperties.
func (*DeviceGroupUpdateProperties) UnmarshalJSON ¶
func (d *DeviceGroupUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DeviceGroupUpdateProperties.
type DeviceGroupsClient ¶
type DeviceGroupsClient struct {
// contains filtered or unexported fields
}
DeviceGroupsClient contains the methods for the DeviceGroups group. Don't use this type directly, use NewDeviceGroupsClient() instead.
func NewDeviceGroupsClient ¶
func NewDeviceGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DeviceGroupsClient, error)
NewDeviceGroupsClient creates a new instance of DeviceGroupsClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*DeviceGroupsClient) BeginClaimDevices ¶
func (client *DeviceGroupsClient) BeginClaimDevices(ctx context.Context, resourceGroupName string, catalogName string, productName string, deviceGroupName string, claimDevicesRequest ClaimDevicesRequest, options *DeviceGroupsClientBeginClaimDevicesOptions) (*runtime.Poller[DeviceGroupsClientClaimDevicesResponse], error)
BeginClaimDevices - Bulk claims the devices. Use '.unassigned' or '.default' for the device group and product names when bulk claiming devices to a catalog only. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- catalogName - Name of catalog
- productName - Name of product.
- deviceGroupName - Name of device group.
- claimDevicesRequest - Bulk claim devices request body.
- options - DeviceGroupsClientBeginClaimDevicesOptions contains the optional parameters for the DeviceGroupsClient.BeginClaimDevices method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/09c37754dac91874ff689ed1e60effb4268c8669/specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PostClaimDevices.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/sphere/armsphere" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsphere.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDeviceGroupsClient().BeginClaimDevices(ctx, "MyResourceGroup1", "MyCatalog1", "MyProduct1", "MyDeviceGroup1", armsphere.ClaimDevicesRequest{ DeviceIdentifiers: []*string{ to.Ptr("00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000")}, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*DeviceGroupsClient) BeginCreateOrUpdate ¶
func (client *DeviceGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, catalogName string, productName string, deviceGroupName string, resource DeviceGroup, options *DeviceGroupsClientBeginCreateOrUpdateOptions) (*runtime.Poller[DeviceGroupsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- catalogName - Name of catalog
- productName - Name of product.
- deviceGroupName - Name of device group.
- resource - Resource create parameters.
- options - DeviceGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the DeviceGroupsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/09c37754dac91874ff689ed1e60effb4268c8669/specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PutDeviceGroup.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/sphere/armsphere" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsphere.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDeviceGroupsClient().BeginCreateOrUpdate(ctx, "MyResourceGroup1", "MyCatalog1", "MyProduct1", "MyDeviceGroup1", armsphere.DeviceGroup{ Properties: &armsphere.DeviceGroupProperties{ Description: to.Ptr("Description for MyDeviceGroup1"), OSFeedType: to.Ptr(armsphere.OSFeedTypeRetail), UpdatePolicy: to.Ptr(armsphere.UpdatePolicyUpdateAll), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %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.DeviceGroup = armsphere.DeviceGroup{ // Type: to.Ptr("microsoft.AzureSphere/catalogs/products/devicegroups"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1/devicegroups/MyDeviceGroup1"), // Properties: &armsphere.DeviceGroupProperties{ // Description: to.Ptr("Description of MyDeviceGroup1"), // OSFeedType: to.Ptr(armsphere.OSFeedTypeRetail), // UpdatePolicy: to.Ptr(armsphere.UpdatePolicyUpdateAll), // }, // } }
Output:
func (*DeviceGroupsClient) BeginDelete ¶
func (client *DeviceGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, catalogName string, productName string, deviceGroupName string, options *DeviceGroupsClientBeginDeleteOptions) (*runtime.Poller[DeviceGroupsClientDeleteResponse], error)
BeginDelete - Delete a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- catalogName - Name of catalog
- productName - Name of product.
- deviceGroupName - Name of device group.
- options - DeviceGroupsClientBeginDeleteOptions contains the optional parameters for the DeviceGroupsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/09c37754dac91874ff689ed1e60effb4268c8669/specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/DeleteDeviceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sphere/armsphere" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsphere.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDeviceGroupsClient().BeginDelete(ctx, "MyResourceGroup1", "MyCatalog1", "MyProduct1", "MyDeviceGroup1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*DeviceGroupsClient) BeginUpdate ¶
func (client *DeviceGroupsClient) BeginUpdate(ctx context.Context, resourceGroupName string, catalogName string, productName string, deviceGroupName string, properties DeviceGroupUpdate, options *DeviceGroupsClientBeginUpdateOptions) (*runtime.Poller[DeviceGroupsClientUpdateResponse], error)
BeginUpdate - Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- catalogName - Name of catalog
- productName - Name of product.
- deviceGroupName - Name of device group.
- properties - The resource properties to be updated.
- options - DeviceGroupsClientBeginUpdateOptions contains the optional parameters for the DeviceGroupsClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/09c37754dac91874ff689ed1e60effb4268c8669/specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PatchDeviceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sphere/armsphere" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsphere.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDeviceGroupsClient().BeginUpdate(ctx, "MyResourceGroup1", "MyCatalog1", "MyProduct1", "MyDeviceGroup1", armsphere.DeviceGroupUpdate{}, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %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.DeviceGroup = armsphere.DeviceGroup{ // Type: to.Ptr("microsoft.azureSphere/catalogs/products/devicegroups"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1/devicegroups/MyDeviceGroup1"), // Properties: &armsphere.DeviceGroupProperties{ // Description: to.Ptr("The description of MyDeviceGroup1"), // OSFeedType: to.Ptr(armsphere.OSFeedTypeRetail), // UpdatePolicy: to.Ptr(armsphere.UpdatePolicyUpdateAll), // }, // } }
Output:
func (*DeviceGroupsClient) CountDevices ¶
func (client *DeviceGroupsClient) CountDevices(ctx context.Context, resourceGroupName string, catalogName string, productName string, deviceGroupName string, options *DeviceGroupsClientCountDevicesOptions) (DeviceGroupsClientCountDevicesResponse, error)
CountDevices - Counts devices in device group. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- catalogName - Name of catalog
- productName - Name of product.
- deviceGroupName - Name of device group.
- options - DeviceGroupsClientCountDevicesOptions contains the optional parameters for the DeviceGroupsClient.CountDevices method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/09c37754dac91874ff689ed1e60effb4268c8669/specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PostCountDevicesDeviceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sphere/armsphere" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsphere.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDeviceGroupsClient().CountDevices(ctx, "MyResourceGroup1", "MyCatalog1", "MyProduct1", "MyDeviceGroup1", 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.CountDevicesResponse = armsphere.CountDevicesResponse{ // Value: to.Ptr[int32](3), // } }
Output:
func (*DeviceGroupsClient) Get ¶
func (client *DeviceGroupsClient) Get(ctx context.Context, resourceGroupName string, catalogName string, productName string, deviceGroupName string, options *DeviceGroupsClientGetOptions) (DeviceGroupsClientGetResponse, error)
Get - Get a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- catalogName - Name of catalog
- productName - Name of product.
- deviceGroupName - Name of device group.
- options - DeviceGroupsClientGetOptions contains the optional parameters for the DeviceGroupsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/09c37754dac91874ff689ed1e60effb4268c8669/specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/GetDeviceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sphere/armsphere" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsphere.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDeviceGroupsClient().Get(ctx, "MyResourceGroup1", "MyCatalog1", "MyProduct1", "MyDeviceGroup1", 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.DeviceGroup = armsphere.DeviceGroup{ // Type: to.Ptr("microsoft.azureSphere/catalogs/products/devicegroups"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1/devicegroups/MyDeviceGroup1"), // Properties: &armsphere.DeviceGroupProperties{ // Description: to.Ptr("The description of MyDeviceGroup1"), // OSFeedType: to.Ptr(armsphere.OSFeedTypeRetail), // UpdatePolicy: to.Ptr(armsphere.UpdatePolicyUpdateAll), // }, // } }
Output:
func (*DeviceGroupsClient) NewListByProductPager ¶
func (client *DeviceGroupsClient) NewListByProductPager(resourceGroupName string, catalogName string, productName string, options *DeviceGroupsClientListByProductOptions) *runtime.Pager[DeviceGroupsClientListByProductResponse]
NewListByProductPager - List DeviceGroup resources by Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.
Generated from API version 2024-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- catalogName - Name of catalog
- productName - Name of product.
- options - DeviceGroupsClientListByProductOptions contains the optional parameters for the DeviceGroupsClient.NewListByProductPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/09c37754dac91874ff689ed1e60effb4268c8669/specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/GetDeviceGroups.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sphere/armsphere" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsphere.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewDeviceGroupsClient().NewListByProductPager("MyResourceGroup1", "MyCatalog1", "MyProduct1", &armsphere.DeviceGroupsClientListByProductOptions{Filter: nil, Top: nil, Skip: nil, Maxpagesize: 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.DeviceGroupListResult = armsphere.DeviceGroupListResult{ // Value: []*armsphere.DeviceGroup{ // { // Name: to.Ptr("MyDeviceGroup1"), // Type: to.Ptr("microsoft.azureSphere/catalogs/products/devicegroups"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1/devicegroups/MyDeviceGroup1"), // }, // { // Name: to.Ptr("MyDeviceGroup2"), // Type: to.Ptr("microsoft.azureSphere/catalogs/products/devicegroups"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/Products/MyProduct2/devicegroups/MyDeviceGroup2"), // }}, // } } }
Output:
type DeviceGroupsClientBeginClaimDevicesOptions ¶
type DeviceGroupsClientBeginClaimDevicesOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DeviceGroupsClientBeginClaimDevicesOptions contains the optional parameters for the DeviceGroupsClient.BeginClaimDevices method.
type DeviceGroupsClientBeginCreateOrUpdateOptions ¶
type DeviceGroupsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DeviceGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the DeviceGroupsClient.BeginCreateOrUpdate method.
type DeviceGroupsClientBeginDeleteOptions ¶
type DeviceGroupsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DeviceGroupsClientBeginDeleteOptions contains the optional parameters for the DeviceGroupsClient.BeginDelete method.
type DeviceGroupsClientBeginUpdateOptions ¶
type DeviceGroupsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DeviceGroupsClientBeginUpdateOptions contains the optional parameters for the DeviceGroupsClient.BeginUpdate method.
type DeviceGroupsClientClaimDevicesResponse ¶
type DeviceGroupsClientClaimDevicesResponse struct { }
DeviceGroupsClientClaimDevicesResponse contains the response from method DeviceGroupsClient.BeginClaimDevices.
type DeviceGroupsClientCountDevicesOptions ¶
type DeviceGroupsClientCountDevicesOptions struct { }
DeviceGroupsClientCountDevicesOptions contains the optional parameters for the DeviceGroupsClient.CountDevices method.
type DeviceGroupsClientCountDevicesResponse ¶
type DeviceGroupsClientCountDevicesResponse struct { // Response to the action call for count devices in a catalog. CountDevicesResponse }
DeviceGroupsClientCountDevicesResponse contains the response from method DeviceGroupsClient.CountDevices.
type DeviceGroupsClientCreateOrUpdateResponse ¶
type DeviceGroupsClientCreateOrUpdateResponse struct { // An device group resource belonging to a product resource. DeviceGroup }
DeviceGroupsClientCreateOrUpdateResponse contains the response from method DeviceGroupsClient.BeginCreateOrUpdate.
type DeviceGroupsClientDeleteResponse ¶
type DeviceGroupsClientDeleteResponse struct { }
DeviceGroupsClientDeleteResponse contains the response from method DeviceGroupsClient.BeginDelete.
type DeviceGroupsClientGetOptions ¶
type DeviceGroupsClientGetOptions struct { }
DeviceGroupsClientGetOptions contains the optional parameters for the DeviceGroupsClient.Get method.
type DeviceGroupsClientGetResponse ¶
type DeviceGroupsClientGetResponse struct { // An device group resource belonging to a product resource. DeviceGroup }
DeviceGroupsClientGetResponse contains the response from method DeviceGroupsClient.Get.
type DeviceGroupsClientListByProductOptions ¶
type DeviceGroupsClientListByProductOptions struct { // Filter the result list using the given expression Filter *string // The maximum number of result items per page. Maxpagesize *int32 // The number of result items to skip. Skip *int32 // The number of result items to return. Top *int32 }
DeviceGroupsClientListByProductOptions contains the optional parameters for the DeviceGroupsClient.NewListByProductPager method.
type DeviceGroupsClientListByProductResponse ¶
type DeviceGroupsClientListByProductResponse struct { // The response of a DeviceGroup list operation. DeviceGroupListResult }
DeviceGroupsClientListByProductResponse contains the response from method DeviceGroupsClient.NewListByProductPager.
type DeviceGroupsClientUpdateResponse ¶
type DeviceGroupsClientUpdateResponse struct { // An device group resource belonging to a product resource. DeviceGroup }
DeviceGroupsClientUpdateResponse contains the response from method DeviceGroupsClient.BeginUpdate.
type DeviceInsight ¶
type DeviceInsight struct { // REQUIRED; Event description Description *string // REQUIRED; Device ID DeviceID *string // REQUIRED; Event end timestamp EndTimestampUTC *time.Time // REQUIRED; Event category EventCategory *string // REQUIRED; Event class EventClass *string // REQUIRED; Event count EventCount *int32 // REQUIRED; Event type EventType *string // REQUIRED; Event start timestamp StartTimestampUTC *time.Time }
DeviceInsight - Device insight report.
func (DeviceInsight) MarshalJSON ¶
func (d DeviceInsight) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DeviceInsight.
func (*DeviceInsight) UnmarshalJSON ¶
func (d *DeviceInsight) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DeviceInsight.
type DeviceListResult ¶
type DeviceListResult struct { // REQUIRED; The Device items on this page Value []*Device // READ-ONLY; The link to the next page of items NextLink *string }
DeviceListResult - The response of a Device list operation.
func (DeviceListResult) MarshalJSON ¶
func (d DeviceListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DeviceListResult.
func (*DeviceListResult) UnmarshalJSON ¶
func (d *DeviceListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DeviceListResult.
type DeviceProperties ¶
type DeviceProperties struct { // Device ID DeviceID *string // READ-ONLY; SKU of the chip ChipSKU *string // READ-ONLY; OS version available for installation when update requested LastAvailableOsVersion *string // READ-ONLY; OS version running on device when update requested LastInstalledOsVersion *string // READ-ONLY; Time when update requested and new OS version available LastOsUpdateUTC *time.Time // READ-ONLY; Time when update was last requested LastUpdateRequestUTC *time.Time // READ-ONLY; The status of the last operation. ProvisioningState *ProvisioningState }
DeviceProperties - The properties of device
func (DeviceProperties) MarshalJSON ¶
func (d DeviceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DeviceProperties.
func (*DeviceProperties) UnmarshalJSON ¶
func (d *DeviceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DeviceProperties.
type DeviceUpdate ¶
type DeviceUpdate struct { // The updatable properties of the Device. Properties *DeviceUpdateProperties }
DeviceUpdate - The type used for update operations of the Device.
func (DeviceUpdate) MarshalJSON ¶
func (d DeviceUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DeviceUpdate.
func (*DeviceUpdate) UnmarshalJSON ¶
func (d *DeviceUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DeviceUpdate.
type DeviceUpdateProperties ¶
type DeviceUpdateProperties struct { // Device group id DeviceGroupID *string }
DeviceUpdateProperties - The updatable properties of the Device.
func (DeviceUpdateProperties) MarshalJSON ¶
func (d DeviceUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DeviceUpdateProperties.
func (*DeviceUpdateProperties) UnmarshalJSON ¶
func (d *DeviceUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DeviceUpdateProperties.
type DevicesClient ¶
type DevicesClient struct {
// contains filtered or unexported fields
}
DevicesClient contains the methods for the Devices group. Don't use this type directly, use NewDevicesClient() instead.
func NewDevicesClient ¶
func NewDevicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DevicesClient, error)
NewDevicesClient creates a new instance of DevicesClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*DevicesClient) BeginCreateOrUpdate ¶
func (client *DevicesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, catalogName string, productName string, deviceGroupName string, deviceName string, resource Device, options *DevicesClientBeginCreateOrUpdateOptions) (*runtime.Poller[DevicesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create a Device. Use '.unassigned' or '.default' for the device group and product names to claim a device to the catalog only. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- catalogName - Name of catalog
- productName - Name of product.
- deviceGroupName - Name of device group.
- deviceName - Device name
- resource - Resource create parameters.
- options - DevicesClientBeginCreateOrUpdateOptions contains the optional parameters for the DevicesClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/09c37754dac91874ff689ed1e60effb4268c8669/specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PutDevice.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sphere/armsphere" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsphere.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDevicesClient().BeginCreateOrUpdate(ctx, "MyResourceGroup1", "MyCatalog1", "MyProduct1", "myDeviceGroup1", "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", armsphere.Device{}, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %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.Device = armsphere.Device{ // Name: to.Ptr("00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/myProduct1/deviceGroups/myDeviceGroup1/devices/00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"), // Properties: &armsphere.DeviceProperties{ // ChipSKU: to.Ptr("MyChipSku1"), // }, // } }
Output:
func (*DevicesClient) BeginDelete ¶
func (client *DevicesClient) BeginDelete(ctx context.Context, resourceGroupName string, catalogName string, productName string, deviceGroupName string, deviceName string, options *DevicesClientBeginDeleteOptions) (*runtime.Poller[DevicesClientDeleteResponse], error)
BeginDelete - Delete a Device If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- catalogName - Name of catalog
- productName - Name of product.
- deviceGroupName - Name of device group.
- deviceName - Device name
- options - DevicesClientBeginDeleteOptions contains the optional parameters for the DevicesClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/09c37754dac91874ff689ed1e60effb4268c8669/specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/DeleteDevice.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sphere/armsphere" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsphere.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDevicesClient().BeginDelete(ctx, "MyResourceGroup1", "MyCatalog1", "MyProductName1", "DeviceGroupName1", "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*DevicesClient) BeginGenerateCapabilityImage ¶
func (client *DevicesClient) BeginGenerateCapabilityImage(ctx context.Context, resourceGroupName string, catalogName string, productName string, deviceGroupName string, deviceName string, generateDeviceCapabilityRequest GenerateCapabilityImageRequest, options *DevicesClientBeginGenerateCapabilityImageOptions) (*runtime.Poller[DevicesClientGenerateCapabilityImageResponse], error)
BeginGenerateCapabilityImage - Generates the capability image for the device. Use '.unassigned' or '.default' for the device group and product names to generate the image for a device that does not belong to a specific device group and product. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- catalogName - Name of catalog
- productName - Name of product.
- deviceGroupName - Name of device group.
- deviceName - Device name
- generateDeviceCapabilityRequest - Generate capability image request body.
- options - DevicesClientBeginGenerateCapabilityImageOptions contains the optional parameters for the DevicesClient.BeginGenerateCapabilityImage method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/09c37754dac91874ff689ed1e60effb4268c8669/specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PostGenerateDeviceCapabilityImage.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/sphere/armsphere" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsphere.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDevicesClient().BeginGenerateCapabilityImage(ctx, "MyResourceGroup1", "MyCatalog1", "MyProduct1", "myDeviceGroup1", "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", armsphere.GenerateCapabilityImageRequest{ Capabilities: []*armsphere.CapabilityType{ to.Ptr(armsphere.CapabilityTypeApplicationDevelopment)}, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %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.SignedCapabilityImageResponse = armsphere.SignedCapabilityImageResponse{ // Image: to.Ptr("TheDeviceCapabilityImage"), // } }
Output:
func (*DevicesClient) BeginUpdate ¶
func (client *DevicesClient) BeginUpdate(ctx context.Context, resourceGroupName string, catalogName string, productName string, deviceGroupName string, deviceName string, properties DeviceUpdate, options *DevicesClientBeginUpdateOptions) (*runtime.Poller[DevicesClientUpdateResponse], error)
BeginUpdate - Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the catalog level. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- catalogName - Name of catalog
- productName - Name of product.
- deviceGroupName - Name of device group.
- deviceName - Device name
- properties - The resource properties to be updated.
- options - DevicesClientBeginUpdateOptions contains the optional parameters for the DevicesClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/09c37754dac91874ff689ed1e60effb4268c8669/specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PatchDevice.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sphere/armsphere" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsphere.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDevicesClient().BeginUpdate(ctx, "MyResourceGroup1", "MyCatalog1", "MyProduct1", "MyDeviceGroup1", "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", armsphere.DeviceUpdate{}, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %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.Device = armsphere.Device{ // Type: to.Ptr("Microsoft.AzureSphere/catalogs/products/devicegroups"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1/devicegroups/MyDeviceGroup1/device/00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"), // Properties: &armsphere.DeviceProperties{ // ChipSKU: to.Ptr("MyChipSku1"), // LastAvailableOsVersion: to.Ptr("AvailableOsVersion1"), // LastInstalledOsVersion: to.Ptr("InstalledOsVersion1"), // LastOsUpdateUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-30T23:54:21.960Z"); return t}()), // LastUpdateRequestUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-01T23:54:21.960Z"); return t}()), // }, // } }
Output:
func (*DevicesClient) Get ¶
func (client *DevicesClient) Get(ctx context.Context, resourceGroupName string, catalogName string, productName string, deviceGroupName string, deviceName string, options *DevicesClientGetOptions) (DevicesClientGetResponse, error)
Get - Get a Device. Use '.unassigned' or '.default' for the device group and product names when a device does not belong to a device group and product. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- catalogName - Name of catalog
- productName - Name of product.
- deviceGroupName - Name of device group.
- deviceName - Device name
- options - DevicesClientGetOptions contains the optional parameters for the DevicesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/09c37754dac91874ff689ed1e60effb4268c8669/specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/GetDevice.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sphere/armsphere" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsphere.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDevicesClient().Get(ctx, "MyResourceGroup1", "MyCatalog1", "MyProduct1", "myDeviceGroup1", "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", 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.Device = armsphere.Device{ // Name: to.Ptr("00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/myProduct1/deviceGroups/myDeviceGroup1/devices/00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"), // Properties: &armsphere.DeviceProperties{ // ChipSKU: to.Ptr("MyChipSku1"), // LastAvailableOsVersion: to.Ptr("AvailableOsVersion1"), // LastInstalledOsVersion: to.Ptr("InstalledOsVersion1"), // LastOsUpdateUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-30T23:54:21.960Z"); return t}()), // LastUpdateRequestUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-01T23:54:21.960Z"); return t}()), // }, // } }
Output:
func (*DevicesClient) NewListByDeviceGroupPager ¶
func (client *DevicesClient) NewListByDeviceGroupPager(resourceGroupName string, catalogName string, productName string, deviceGroupName string, options *DevicesClientListByDeviceGroupOptions) *runtime.Pager[DevicesClientListByDeviceGroupResponse]
NewListByDeviceGroupPager - List Device resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.
Generated from API version 2024-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- catalogName - Name of catalog
- productName - Name of product.
- deviceGroupName - Name of device group.
- options - DevicesClientListByDeviceGroupOptions contains the optional parameters for the DevicesClient.NewListByDeviceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/09c37754dac91874ff689ed1e60effb4268c8669/specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/GetDevices.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sphere/armsphere" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsphere.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewDevicesClient().NewListByDeviceGroupPager("MyResourceGroup1", "MyCatalog1", "MyProduct1", "myDeviceGroup1", 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.DeviceListResult = armsphere.DeviceListResult{ // Value: []*armsphere.Device{ // { // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/myProduct1/deviceGroups/myDeviceGroup1/devices/00000000-0000-0000-0000-000000000001"), // Properties: &armsphere.DeviceProperties{ // }, // }, // { // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/myProduct1/deviceGroups/myDeviceGroup1/devices/00000000-0000-0000-0000-000000000002"), // Properties: &armsphere.DeviceProperties{ // }, // }}, // } } }
Output:
type DevicesClientBeginCreateOrUpdateOptions ¶
type DevicesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DevicesClientBeginCreateOrUpdateOptions contains the optional parameters for the DevicesClient.BeginCreateOrUpdate method.
type DevicesClientBeginDeleteOptions ¶
type DevicesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DevicesClientBeginDeleteOptions contains the optional parameters for the DevicesClient.BeginDelete method.
type DevicesClientBeginGenerateCapabilityImageOptions ¶
type DevicesClientBeginGenerateCapabilityImageOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DevicesClientBeginGenerateCapabilityImageOptions contains the optional parameters for the DevicesClient.BeginGenerateCapabilityImage method.
type DevicesClientBeginUpdateOptions ¶
type DevicesClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DevicesClientBeginUpdateOptions contains the optional parameters for the DevicesClient.BeginUpdate method.
type DevicesClientCreateOrUpdateResponse ¶
type DevicesClientCreateOrUpdateResponse struct { // An device resource belonging to a device group resource. Device }
DevicesClientCreateOrUpdateResponse contains the response from method DevicesClient.BeginCreateOrUpdate.
type DevicesClientDeleteResponse ¶
type DevicesClientDeleteResponse struct { }
DevicesClientDeleteResponse contains the response from method DevicesClient.BeginDelete.
type DevicesClientGenerateCapabilityImageResponse ¶
type DevicesClientGenerateCapabilityImageResponse struct { // Signed device capability image response SignedCapabilityImageResponse }
DevicesClientGenerateCapabilityImageResponse contains the response from method DevicesClient.BeginGenerateCapabilityImage.
type DevicesClientGetOptions ¶
type DevicesClientGetOptions struct { }
DevicesClientGetOptions contains the optional parameters for the DevicesClient.Get method.
type DevicesClientGetResponse ¶
type DevicesClientGetResponse struct { // An device resource belonging to a device group resource. Device }
DevicesClientGetResponse contains the response from method DevicesClient.Get.
type DevicesClientListByDeviceGroupOptions ¶
type DevicesClientListByDeviceGroupOptions struct { }
DevicesClientListByDeviceGroupOptions contains the optional parameters for the DevicesClient.NewListByDeviceGroupPager method.
type DevicesClientListByDeviceGroupResponse ¶
type DevicesClientListByDeviceGroupResponse struct { // The response of a Device list operation. DeviceListResult }
DevicesClientListByDeviceGroupResponse contains the response from method DevicesClient.NewListByDeviceGroupPager.
type DevicesClientUpdateResponse ¶
type DevicesClientUpdateResponse struct { // An device resource belonging to a device group resource. Device }
DevicesClientUpdateResponse contains the response from method DevicesClient.BeginUpdate.
type GenerateCapabilityImageRequest ¶
type GenerateCapabilityImageRequest struct { // REQUIRED; List of capabilities to create Capabilities []*CapabilityType }
GenerateCapabilityImageRequest - Request of the action to create a signed device capability image
func (GenerateCapabilityImageRequest) MarshalJSON ¶
func (g GenerateCapabilityImageRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GenerateCapabilityImageRequest.
func (*GenerateCapabilityImageRequest) UnmarshalJSON ¶
func (g *GenerateCapabilityImageRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GenerateCapabilityImageRequest.
type Image ¶
type Image struct { // The resource-specific properties for this resource. Properties *ImageProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /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 }
Image - An image resource belonging to a catalog resource.
func (Image) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Image.
func (*Image) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Image.
type ImageListResult ¶
type ImageListResult struct { // REQUIRED; The Image items on this page Value []*Image // READ-ONLY; The link to the next page of items NextLink *string }
ImageListResult - The response of a Image list operation.
func (ImageListResult) MarshalJSON ¶
func (i ImageListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImageListResult.
func (*ImageListResult) UnmarshalJSON ¶
func (i *ImageListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImageListResult.
type ImageProperties ¶
type ImageProperties struct { // Image as a UTF-8 encoded base 64 string on image create. This field contains the image URI on image reads. Image *string // Image ID ImageID *string // Regional data boundary for an image RegionalDataBoundary *RegionalDataBoundary // READ-ONLY; The image component id. ComponentID *string // READ-ONLY; The image description. Description *string // READ-ONLY; Image name ImageName *string // READ-ONLY; The image type. ImageType *ImageType // READ-ONLY; The status of the last operation. ProvisioningState *ProvisioningState // READ-ONLY; Location the image URI *string }
ImageProperties - The properties of image
func (ImageProperties) MarshalJSON ¶
func (i ImageProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImageProperties.
func (*ImageProperties) UnmarshalJSON ¶
func (i *ImageProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImageProperties.
type ImageType ¶
type ImageType string
ImageType - Image type values.
const ( // ImageTypeApplications - Applications image type ImageTypeApplications ImageType = "Applications" // ImageTypeBaseSystemUpdateManifest - Base system update manifest image type ImageTypeBaseSystemUpdateManifest ImageType = "BaseSystemUpdateManifest" // ImageTypeBootManifest - Boot manifest image type ImageTypeBootManifest ImageType = "BootManifest" // ImageTypeCustomerBoardConfig - Customer board config image type ImageTypeCustomerBoardConfig ImageType = "CustomerBoardConfig" // ImageTypeCustomerUpdateManifest - Customer update manifest image type ImageTypeCustomerUpdateManifest ImageType = "CustomerUpdateManifest" // ImageTypeFirmwareUpdateManifest - Firmware update manifest image type ImageTypeFirmwareUpdateManifest ImageType = "FirmwareUpdateManifest" // ImageTypeFwConfig - FW config image type ImageTypeFwConfig ImageType = "FwConfig" // ImageTypeInvalidImageType - Invalid image. ImageTypeInvalidImageType ImageType = "InvalidImageType" // ImageTypeManifestSet - manifest set image type ImageTypeManifestSet ImageType = "ManifestSet" // ImageTypeNormalWorldDtb - Normal world dtb image type ImageTypeNormalWorldDtb ImageType = "NormalWorldDtb" // ImageTypeNormalWorldKernel - Normal world kernel image type ImageTypeNormalWorldKernel ImageType = "NormalWorldKernel" // ImageTypeNormalWorldLoader - Normal world loader image type ImageTypeNormalWorldLoader ImageType = "NormalWorldLoader" // ImageTypeNwfs - Nwfs image type ImageTypeNwfs ImageType = "Nwfs" // ImageTypeOneBl - One Bl image type ImageTypeOneBl ImageType = "OneBl" // ImageTypeOther - Other image type ImageTypeOther ImageType = "Other" // ImageTypePlutonRuntime - Pluton image type ImageTypePlutonRuntime ImageType = "PlutonRuntime" // ImageTypePolicy - Policy image type ImageTypePolicy ImageType = "Policy" // ImageTypeRecoveryManifest - Recovery manifest image type ImageTypeRecoveryManifest ImageType = "RecoveryManifest" // ImageTypeRootFs - Root FS image type ImageTypeRootFs ImageType = "RootFs" // ImageTypeSecurityMonitor - Security monitor image type ImageTypeSecurityMonitor ImageType = "SecurityMonitor" // ImageTypeServices - Services image type ImageTypeServices ImageType = "Services" // ImageTypeTrustedKeystore - Trusted key store image type ImageTypeTrustedKeystore ImageType = "TrustedKeystore" // ImageTypeUpdateCertStore - Update certificate store image type ImageTypeUpdateCertStore ImageType = "UpdateCertStore" // ImageTypeWifiFirmware - Wifi firmware image type ImageTypeWifiFirmware ImageType = "WifiFirmware" )
func PossibleImageTypeValues ¶
func PossibleImageTypeValues() []ImageType
PossibleImageTypeValues returns the possible values for the ImageType const type.
type ImagesClient ¶
type ImagesClient struct {
// contains filtered or unexported fields
}
ImagesClient contains the methods for the Images group. Don't use this type directly, use NewImagesClient() instead.
func NewImagesClient ¶
func NewImagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ImagesClient, error)
NewImagesClient creates a new instance of ImagesClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ImagesClient) BeginCreateOrUpdate ¶
func (client *ImagesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, catalogName string, imageName string, resource Image, options *ImagesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ImagesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create a Image If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- catalogName - Name of catalog
- imageName - Image name. Use an image GUID for GA versions of the API.
- resource - Resource create parameters.
- options - ImagesClientBeginCreateOrUpdateOptions contains the optional parameters for the ImagesClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/09c37754dac91874ff689ed1e60effb4268c8669/specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PutImage.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/sphere/armsphere" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsphere.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewImagesClient().BeginCreateOrUpdate(ctx, "MyResourceGroup1", "MyCatalog1", "00000000-0000-0000-0000-000000000000", armsphere.Image{ Properties: &armsphere.ImageProperties{ Image: to.Ptr("bXliYXNlNjRzdHJpbmc="), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %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.Image = armsphere.Image{ // Name: to.Ptr("MyProduct1"), // Type: to.Ptr("Microsoft.AzureSphere/catalogs/images"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/images/default"), // } }
Output:
func (*ImagesClient) BeginDelete ¶
func (client *ImagesClient) BeginDelete(ctx context.Context, resourceGroupName string, catalogName string, imageName string, options *ImagesClientBeginDeleteOptions) (*runtime.Poller[ImagesClientDeleteResponse], error)
BeginDelete - Delete a Image If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- catalogName - Name of catalog
- imageName - Image name. Use an image GUID for GA versions of the API.
- options - ImagesClientBeginDeleteOptions contains the optional parameters for the ImagesClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/09c37754dac91874ff689ed1e60effb4268c8669/specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/DeleteImage.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sphere/armsphere" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsphere.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewImagesClient().BeginDelete(ctx, "MyResourceGroup1", "MyCatalog1", "00000000-0000-0000-0000-000000000000", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*ImagesClient) Get ¶
func (client *ImagesClient) Get(ctx context.Context, resourceGroupName string, catalogName string, imageName string, options *ImagesClientGetOptions) (ImagesClientGetResponse, error)
Get - Get a Image If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- catalogName - Name of catalog
- imageName - Image name. Use an image GUID for GA versions of the API.
- options - ImagesClientGetOptions contains the optional parameters for the ImagesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/09c37754dac91874ff689ed1e60effb4268c8669/specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/GetImage.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sphere/armsphere" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsphere.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewImagesClient().Get(ctx, "MyResourceGroup1", "MyCatalog1", "00000000-0000-0000-0000-000000000000", 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.Image = armsphere.Image{ // } }
Output:
func (*ImagesClient) NewListByCatalogPager ¶
func (client *ImagesClient) NewListByCatalogPager(resourceGroupName string, catalogName string, options *ImagesClientListByCatalogOptions) *runtime.Pager[ImagesClientListByCatalogResponse]
NewListByCatalogPager - List Image resources by Catalog
Generated from API version 2024-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- catalogName - Name of catalog
- options - ImagesClientListByCatalogOptions contains the optional parameters for the ImagesClient.NewListByCatalogPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/09c37754dac91874ff689ed1e60effb4268c8669/specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/GetImages.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sphere/armsphere" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsphere.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewImagesClient().NewListByCatalogPager("MyResourceGroup1", "MyCatalog1", &armsphere.ImagesClientListByCatalogOptions{Filter: nil, Top: nil, Skip: nil, Maxpagesize: 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.ImageListResult = armsphere.ImageListResult{ // Value: []*armsphere.Image{ // { // Name: to.Ptr("MyImage1"), // ID: to.Ptr("00000000-0000-0000-0000-000000000001"), // }, // { // Name: to.Ptr("MyImage2"), // ID: to.Ptr("00000000-0000-0000-0000-000000000002"), // }}, // } } }
Output:
type ImagesClientBeginCreateOrUpdateOptions ¶
type ImagesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ImagesClientBeginCreateOrUpdateOptions contains the optional parameters for the ImagesClient.BeginCreateOrUpdate method.
type ImagesClientBeginDeleteOptions ¶
type ImagesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ImagesClientBeginDeleteOptions contains the optional parameters for the ImagesClient.BeginDelete method.
type ImagesClientCreateOrUpdateResponse ¶
type ImagesClientCreateOrUpdateResponse struct { // An image resource belonging to a catalog resource. Image }
ImagesClientCreateOrUpdateResponse contains the response from method ImagesClient.BeginCreateOrUpdate.
type ImagesClientDeleteResponse ¶
type ImagesClientDeleteResponse struct { }
ImagesClientDeleteResponse contains the response from method ImagesClient.BeginDelete.
type ImagesClientGetOptions ¶
type ImagesClientGetOptions struct { }
ImagesClientGetOptions contains the optional parameters for the ImagesClient.Get method.
type ImagesClientGetResponse ¶
type ImagesClientGetResponse struct { // An image resource belonging to a catalog resource. Image }
ImagesClientGetResponse contains the response from method ImagesClient.Get.
type ImagesClientListByCatalogOptions ¶
type ImagesClientListByCatalogOptions struct { // Filter the result list using the given expression Filter *string // The maximum number of result items per page. Maxpagesize *int32 // The number of result items to skip. Skip *int32 // The number of result items to return. Top *int32 }
ImagesClientListByCatalogOptions contains the optional parameters for the ImagesClient.NewListByCatalogPager method.
type ImagesClientListByCatalogResponse ¶
type ImagesClientListByCatalogResponse struct { // The response of a Image list operation. ImageListResult }
ImagesClientListByCatalogResponse contains the response from method ImagesClient.NewListByCatalogPager.
type ListDeviceGroupsRequest ¶
type ListDeviceGroupsRequest struct { // Device Group name. DeviceGroupName *string }
ListDeviceGroupsRequest - Request of the action to list device groups for a catalog.
func (ListDeviceGroupsRequest) MarshalJSON ¶
func (l ListDeviceGroupsRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ListDeviceGroupsRequest.
func (*ListDeviceGroupsRequest) UnmarshalJSON ¶
func (l *ListDeviceGroupsRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ListDeviceGroupsRequest.
type OSFeedType ¶
type OSFeedType string
OSFeedType - OS feed type values.
const ( // OSFeedTypeRetail - Retail OS feed type. OSFeedTypeRetail OSFeedType = "Retail" // OSFeedTypeRetailEval - Retail evaluation OS feed type. OSFeedTypeRetailEval OSFeedType = "RetailEval" )
func PossibleOSFeedTypeValues ¶
func PossibleOSFeedTypeValues() []OSFeedType
PossibleOSFeedTypeValues returns the possible values for the OSFeedType const type.
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 ¶
MarshalJSON implements the json.Marshaller interface for type Operation.
func (*Operation) UnmarshalJSON ¶
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 ¶
func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]
NewListPager - List the operations for the provider
Generated from API version 2024-04-01
- options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/09c37754dac91874ff689ed1e60effb4268c8669/specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/GetOperations.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sphere/armsphere" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsphere.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 = armsphere.OperationListResult{ // Value: []*armsphere.Operation{ // { // Name: to.Ptr("Microsoft.AzureSphere/catalogs/Read"), // Display: &armsphere.OperationDisplay{ // Description: to.Ptr("Read Azure Sphere catalogs"), // Operation: to.Ptr("Gets/List catalog"), // Provider: to.Ptr("Microsoft.AzureSphere"), // Resource: to.Ptr("catalog"), // }, // }, // { // Name: to.Ptr("Microsoft.AzureSphere/catalogs/Write"), // Display: &armsphere.OperationDisplay{ // Description: to.Ptr("Writes Azure Sphere catalogs"), // Operation: to.Ptr("Create/Update catalog"), // Provider: to.Ptr("Microsoft.AzureSphere"), // Resource: to.Ptr("catalog"), // }, // }}, // } } }
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"
func PossibleOriginValues ¶
func PossibleOriginValues() []Origin
PossibleOriginValues returns the possible values for the Origin const type.
type PagedDeviceInsight ¶
type PagedDeviceInsight struct { // REQUIRED; The DeviceInsight items on this page Value []*DeviceInsight // READ-ONLY; The link to the next page of items NextLink *string }
PagedDeviceInsight - Paged collection of DeviceInsight items
func (PagedDeviceInsight) MarshalJSON ¶
func (p PagedDeviceInsight) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PagedDeviceInsight.
func (*PagedDeviceInsight) UnmarshalJSON ¶
func (p *PagedDeviceInsight) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PagedDeviceInsight.
type Product ¶
type Product struct { // The resource-specific properties for this resource. Properties *ProductProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /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 }
Product - An product resource belonging to a catalog resource.
func (Product) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Product.
func (*Product) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Product.
type ProductListResult ¶
type ProductListResult struct { // REQUIRED; The Product items on this page Value []*Product // READ-ONLY; The link to the next page of items NextLink *string }
ProductListResult - The response of a Product list operation.
func (ProductListResult) MarshalJSON ¶
func (p ProductListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProductListResult.
func (*ProductListResult) UnmarshalJSON ¶
func (p *ProductListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ProductListResult.
type ProductProperties ¶
type ProductProperties struct { // Description of the product Description *string // READ-ONLY; The status of the last operation. ProvisioningState *ProvisioningState }
ProductProperties - The properties of product
func (ProductProperties) MarshalJSON ¶
func (p ProductProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProductProperties.
func (*ProductProperties) UnmarshalJSON ¶
func (p *ProductProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ProductProperties.
type ProductUpdate ¶
type ProductUpdate struct { // The updatable properties of the Product. Properties *ProductUpdateProperties }
ProductUpdate - The type used for update operations of the Product.
func (ProductUpdate) MarshalJSON ¶
func (p ProductUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProductUpdate.
func (*ProductUpdate) UnmarshalJSON ¶
func (p *ProductUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ProductUpdate.
type ProductUpdateProperties ¶
type ProductUpdateProperties struct { // Description of the product Description *string }
ProductUpdateProperties - The updatable properties of the Product.
func (ProductUpdateProperties) MarshalJSON ¶
func (p ProductUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProductUpdateProperties.
func (*ProductUpdateProperties) UnmarshalJSON ¶
func (p *ProductUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ProductUpdateProperties.
type ProductsClient ¶
type ProductsClient struct {
// contains filtered or unexported fields
}
ProductsClient contains the methods for the Products group. Don't use this type directly, use NewProductsClient() instead.
func NewProductsClient ¶
func NewProductsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProductsClient, error)
NewProductsClient creates a new instance of ProductsClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ProductsClient) BeginCreateOrUpdate ¶
func (client *ProductsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, catalogName string, productName string, resource Product, options *ProductsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ProductsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- catalogName - Name of catalog
- productName - Name of product.
- resource - Resource create parameters.
- options - ProductsClientBeginCreateOrUpdateOptions contains the optional parameters for the ProductsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/09c37754dac91874ff689ed1e60effb4268c8669/specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PutProduct.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sphere/armsphere" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsphere.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewProductsClient().BeginCreateOrUpdate(ctx, "MyResourceGroup1", "MyCatalog1", "MyProduct1", armsphere.Product{}, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %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.Product = armsphere.Product{ // Name: to.Ptr("MyProduct1"), // Type: to.Ptr("Microsoft.AzureSphere/catalogs/products"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1"), // } }
Output:
func (*ProductsClient) BeginDelete ¶
func (client *ProductsClient) BeginDelete(ctx context.Context, resourceGroupName string, catalogName string, productName string, options *ProductsClientBeginDeleteOptions) (*runtime.Poller[ProductsClientDeleteResponse], error)
BeginDelete - Delete a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name' If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- catalogName - Name of catalog
- productName - Name of product.
- options - ProductsClientBeginDeleteOptions contains the optional parameters for the ProductsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/09c37754dac91874ff689ed1e60effb4268c8669/specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/DeleteProduct.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sphere/armsphere" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsphere.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewProductsClient().BeginDelete(ctx, "MyResourceGroup1", "MyCatalog1", "MyProductName1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*ProductsClient) BeginUpdate ¶
func (client *ProductsClient) BeginUpdate(ctx context.Context, resourceGroupName string, catalogName string, productName string, properties ProductUpdate, options *ProductsClientBeginUpdateOptions) (*runtime.Poller[ProductsClientUpdateResponse], error)
BeginUpdate - Update a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- catalogName - Name of catalog
- productName - Name of product.
- properties - The resource properties to be updated.
- options - ProductsClientBeginUpdateOptions contains the optional parameters for the ProductsClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/09c37754dac91874ff689ed1e60effb4268c8669/specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PatchProduct.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sphere/armsphere" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsphere.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewProductsClient().BeginUpdate(ctx, "MyResourceGroup1", "MyCatalog1", "MyProduct1", armsphere.ProductUpdate{}, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %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.Product = armsphere.Product{ // Type: to.Ptr("microsoft.azureSphere/catalogs/products"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1"), // Properties: &armsphere.ProductProperties{ // Description: to.Ptr("Product description."), // }, // } }
Output:
func (*ProductsClient) CountDevices ¶
func (client *ProductsClient) CountDevices(ctx context.Context, resourceGroupName string, catalogName string, productName string, options *ProductsClientCountDevicesOptions) (ProductsClientCountDevicesResponse, error)
CountDevices - Counts devices in product. '.default' and '.unassigned' are system defined values and cannot be used for product name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- catalogName - Name of catalog
- productName - Name of product.
- options - ProductsClientCountDevicesOptions contains the optional parameters for the ProductsClient.CountDevices method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/09c37754dac91874ff689ed1e60effb4268c8669/specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PostCountDevicesProduct.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sphere/armsphere" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsphere.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewProductsClient().CountDevices(ctx, "MyResourceGroup1", "MyCatalog1", "MyProduct1", 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.CountDevicesResponse = armsphere.CountDevicesResponse{ // Value: to.Ptr[int32](3), // } }
Output:
func (*ProductsClient) Get ¶
func (client *ProductsClient) Get(ctx context.Context, resourceGroupName string, catalogName string, productName string, options *ProductsClientGetOptions) (ProductsClientGetResponse, error)
Get - Get a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- catalogName - Name of catalog
- productName - Name of product.
- options - ProductsClientGetOptions contains the optional parameters for the ProductsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/09c37754dac91874ff689ed1e60effb4268c8669/specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/GetProduct.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sphere/armsphere" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsphere.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewProductsClient().Get(ctx, "MyResourceGroup1", "MyCatalog1", "MyProduct1", 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.Product = armsphere.Product{ // Type: to.Ptr("microsoft.azureSphere/catalogs/products"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1"), // Properties: &armsphere.ProductProperties{ // Description: to.Ptr("product description."), // }, // } }
Output:
func (*ProductsClient) NewGenerateDefaultDeviceGroupsPager ¶
func (client *ProductsClient) NewGenerateDefaultDeviceGroupsPager(resourceGroupName string, catalogName string, productName string, options *ProductsClientGenerateDefaultDeviceGroupsOptions) *runtime.Pager[ProductsClientGenerateDefaultDeviceGroupsResponse]
NewGenerateDefaultDeviceGroupsPager - Generates default device groups for the product. '.default' and '.unassigned' are system defined values and cannot be used for product name.
Generated from API version 2024-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- catalogName - Name of catalog
- productName - Name of product.
- options - ProductsClientGenerateDefaultDeviceGroupsOptions contains the optional parameters for the ProductsClient.NewGenerateDefaultDeviceGroupsPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/09c37754dac91874ff689ed1e60effb4268c8669/specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PostGenerateDefaultDeviceGroups.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sphere/armsphere" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsphere.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewProductsClient().NewGenerateDefaultDeviceGroupsPager("MyResourceGroup1", "MyCatalog1", "MyProduct1", 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.DeviceGroupListResult = armsphere.DeviceGroupListResult{ // Value: []*armsphere.DeviceGroup{ // { // Name: to.Ptr("MyDeviceGroup1"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1/devicegroups/MyDeviceGroup1"), // Properties: &armsphere.DeviceGroupProperties{ // Description: to.Ptr("Device group description 1"), // AllowCrashDumpsCollection: to.Ptr(armsphere.AllowCrashDumpCollectionEnabled), // OSFeedType: to.Ptr(armsphere.OSFeedTypeRetail), // UpdatePolicy: to.Ptr(armsphere.UpdatePolicyUpdateAll), // }, // }, // { // Name: to.Ptr("MyDeviceGroup2"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1/devicegroups/MyDeviceGroup2"), // Properties: &armsphere.DeviceGroupProperties{ // Description: to.Ptr("Device group description 2"), // AllowCrashDumpsCollection: to.Ptr(armsphere.AllowCrashDumpCollectionEnabled), // OSFeedType: to.Ptr(armsphere.OSFeedTypeRetail), // UpdatePolicy: to.Ptr(armsphere.UpdatePolicyUpdateAll), // }, // }}, // } } }
Output:
func (*ProductsClient) NewListByCatalogPager ¶
func (client *ProductsClient) NewListByCatalogPager(resourceGroupName string, catalogName string, options *ProductsClientListByCatalogOptions) *runtime.Pager[ProductsClientListByCatalogResponse]
NewListByCatalogPager - List Product resources by Catalog
Generated from API version 2024-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- catalogName - Name of catalog
- options - ProductsClientListByCatalogOptions contains the optional parameters for the ProductsClient.NewListByCatalogPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/09c37754dac91874ff689ed1e60effb4268c8669/specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/GetProducts.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sphere/armsphere" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsphere.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewProductsClient().NewListByCatalogPager("MyResourceGroup1", "MyCatalog1", 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.ProductListResult = armsphere.ProductListResult{ // Value: []*armsphere.Product{ // { // Name: to.Ptr("MyProduct1"), // Type: to.Ptr("Microsoft.AzureSphere/catalogs/products"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1"), // }, // { // Name: to.Ptr("MyProduct2"), // Type: to.Ptr("Microsoft.AzureSphere/catalogs/products"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct2"), // }}, // } } }
Output:
type ProductsClientBeginCreateOrUpdateOptions ¶
type ProductsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ProductsClientBeginCreateOrUpdateOptions contains the optional parameters for the ProductsClient.BeginCreateOrUpdate method.
type ProductsClientBeginDeleteOptions ¶
type ProductsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ProductsClientBeginDeleteOptions contains the optional parameters for the ProductsClient.BeginDelete method.
type ProductsClientBeginUpdateOptions ¶
type ProductsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ProductsClientBeginUpdateOptions contains the optional parameters for the ProductsClient.BeginUpdate method.
type ProductsClientCountDevicesOptions ¶
type ProductsClientCountDevicesOptions struct { }
ProductsClientCountDevicesOptions contains the optional parameters for the ProductsClient.CountDevices method.
type ProductsClientCountDevicesResponse ¶
type ProductsClientCountDevicesResponse struct { // Response to the action call for count devices in a catalog. CountDevicesResponse }
ProductsClientCountDevicesResponse contains the response from method ProductsClient.CountDevices.
type ProductsClientCreateOrUpdateResponse ¶
type ProductsClientCreateOrUpdateResponse struct { // An product resource belonging to a catalog resource. Product }
ProductsClientCreateOrUpdateResponse contains the response from method ProductsClient.BeginCreateOrUpdate.
type ProductsClientDeleteResponse ¶
type ProductsClientDeleteResponse struct { }
ProductsClientDeleteResponse contains the response from method ProductsClient.BeginDelete.
type ProductsClientGenerateDefaultDeviceGroupsOptions ¶
type ProductsClientGenerateDefaultDeviceGroupsOptions struct { }
ProductsClientGenerateDefaultDeviceGroupsOptions contains the optional parameters for the ProductsClient.NewGenerateDefaultDeviceGroupsPager method.
type ProductsClientGenerateDefaultDeviceGroupsResponse ¶
type ProductsClientGenerateDefaultDeviceGroupsResponse struct { // The response of a DeviceGroup list operation. DeviceGroupListResult }
ProductsClientGenerateDefaultDeviceGroupsResponse contains the response from method ProductsClient.NewGenerateDefaultDeviceGroupsPager.
type ProductsClientGetOptions ¶
type ProductsClientGetOptions struct { }
ProductsClientGetOptions contains the optional parameters for the ProductsClient.Get method.
type ProductsClientGetResponse ¶
type ProductsClientGetResponse struct { // An product resource belonging to a catalog resource. Product }
ProductsClientGetResponse contains the response from method ProductsClient.Get.
type ProductsClientListByCatalogOptions ¶
type ProductsClientListByCatalogOptions struct { }
ProductsClientListByCatalogOptions contains the optional parameters for the ProductsClient.NewListByCatalogPager method.
type ProductsClientListByCatalogResponse ¶
type ProductsClientListByCatalogResponse struct { // The response of a Product list operation. ProductListResult }
ProductsClientListByCatalogResponse contains the response from method ProductsClient.NewListByCatalogPager.
type ProductsClientUpdateResponse ¶
type ProductsClientUpdateResponse struct { // An product resource belonging to a catalog resource. Product }
ProductsClientUpdateResponse contains the response from method ProductsClient.BeginUpdate.
type ProofOfPossessionNonceRequest ¶
type ProofOfPossessionNonceRequest struct { // REQUIRED; The proof of possession nonce ProofOfPossessionNonce *string }
ProofOfPossessionNonceRequest - Request for the proof of possession nonce
func (ProofOfPossessionNonceRequest) MarshalJSON ¶
func (p ProofOfPossessionNonceRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProofOfPossessionNonceRequest.
func (*ProofOfPossessionNonceRequest) UnmarshalJSON ¶
func (p *ProofOfPossessionNonceRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ProofOfPossessionNonceRequest.
type ProofOfPossessionNonceResponse ¶
type ProofOfPossessionNonceResponse struct { // READ-ONLY; The certificate as a UTF-8 encoded base 64 string. Certificate *string // READ-ONLY; The certificate expiry date. ExpiryUTC *time.Time // READ-ONLY; The certificate not before date. NotBeforeUTC *time.Time // READ-ONLY; The status of the last operation. ProvisioningState *ProvisioningState // READ-ONLY; The certificate status. Status *CertificateStatus // READ-ONLY; The certificate subject. Subject *string // READ-ONLY; The certificate thumbprint. Thumbprint *string }
ProofOfPossessionNonceResponse - Result of the action to generate a proof of possession nonce
func (ProofOfPossessionNonceResponse) MarshalJSON ¶
func (p ProofOfPossessionNonceResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProofOfPossessionNonceResponse.
func (*ProofOfPossessionNonceResponse) UnmarshalJSON ¶
func (p *ProofOfPossessionNonceResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ProofOfPossessionNonceResponse.
type ProvisioningState ¶
type ProvisioningState string
ProvisioningState - Provisioning state of resource.
const ( // ProvisioningStateAccepted - The resource create request has been accepted ProvisioningStateAccepted ProvisioningState = "Accepted" // ProvisioningStateCanceled - Resource creation was canceled. ProvisioningStateCanceled ProvisioningState = "Canceled" // ProvisioningStateDeleting - The resource is being deleted ProvisioningStateDeleting ProvisioningState = "Deleting" // ProvisioningStateFailed - Resource creation failed. ProvisioningStateFailed ProvisioningState = "Failed" // ProvisioningStateProvisioning - The resource is being provisioned ProvisioningStateProvisioning ProvisioningState = "Provisioning" // ProvisioningStateSucceeded - Resource has been created. ProvisioningStateSucceeded ProvisioningState = "Succeeded" // ProvisioningStateUpdating - The resource is being updated ProvisioningStateUpdating ProvisioningState = "Updating" )
func PossibleProvisioningStateValues ¶
func PossibleProvisioningStateValues() []ProvisioningState
PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.
type RegionalDataBoundary ¶
type RegionalDataBoundary string
RegionalDataBoundary - Regional data boundary values.
const ( // RegionalDataBoundaryEU - EU data boundary RegionalDataBoundaryEU RegionalDataBoundary = "EU" // RegionalDataBoundaryNone - No data boundary RegionalDataBoundaryNone RegionalDataBoundary = "None" )
func PossibleRegionalDataBoundaryValues ¶
func PossibleRegionalDataBoundaryValues() []RegionalDataBoundary
PossibleRegionalDataBoundaryValues returns the possible values for the RegionalDataBoundary const type.
type SignedCapabilityImageResponse ¶
type SignedCapabilityImageResponse struct { // READ-ONLY; The signed device capability image as a UTF-8 encoded base 64 string. Image *string }
SignedCapabilityImageResponse - Signed device capability image response
func (SignedCapabilityImageResponse) MarshalJSON ¶
func (s SignedCapabilityImageResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SignedCapabilityImageResponse.
func (*SignedCapabilityImageResponse) UnmarshalJSON ¶
func (s *SignedCapabilityImageResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SignedCapabilityImageResponse.
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 UpdatePolicy ¶
type UpdatePolicy string
UpdatePolicy - Update policy values.
const ( // UpdatePolicyNo3RdPartyAppUpdates - No update for 3rd party app policy. UpdatePolicyNo3RdPartyAppUpdates UpdatePolicy = "No3rdPartyAppUpdates" // UpdatePolicyUpdateAll - Update all policy. UpdatePolicyUpdateAll UpdatePolicy = "UpdateAll" )
func PossibleUpdatePolicyValues ¶
func PossibleUpdatePolicyValues() []UpdatePolicy
PossibleUpdatePolicyValues returns the possible values for the UpdatePolicy const type.