Documentation ¶
Index ¶
- type ClientFactory
- type DeviceService
- type DeviceServiceCheckNameAvailabilityParameters
- type DeviceServiceDescriptionListResult
- type DeviceServiceNameAvailabilityInfo
- type DeviceServiceProperties
- type ErrorDetails
- type ErrorDetailsError
- type OperationDisplayInfo
- type OperationEntity
- type OperationListResult
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type ProxyResource
- type Resource
- type ServiceNameUnavailabilityReason
- type ServicesClient
- func (client *ServicesClient) CheckDeviceServiceNameAvailability(ctx context.Context, ...) (ServicesClientCheckDeviceServiceNameAvailabilityResponse, error)
- func (client *ServicesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, deviceName string, ...) (ServicesClientCreateOrUpdateResponse, error)
- func (client *ServicesClient) Delete(ctx context.Context, resourceGroupName string, deviceName string, ...) (ServicesClientDeleteResponse, error)
- func (client *ServicesClient) Get(ctx context.Context, resourceGroupName string, deviceName string, ...) (ServicesClientGetResponse, error)
- func (client *ServicesClient) NewListByResourceGroupPager(resourceGroupName string, options *ServicesClientListByResourceGroupOptions) *runtime.Pager[ServicesClientListByResourceGroupResponse]
- func (client *ServicesClient) NewListPager(options *ServicesClientListOptions) *runtime.Pager[ServicesClientListResponse]
- func (client *ServicesClient) Update(ctx context.Context, resourceGroupName string, deviceName string, ...) (ServicesClientUpdateResponse, error)
- type ServicesClientCheckDeviceServiceNameAvailabilityOptions
- type ServicesClientCheckDeviceServiceNameAvailabilityResponse
- type ServicesClientCreateOrUpdateOptions
- type ServicesClientCreateOrUpdateResponse
- type ServicesClientDeleteOptions
- type ServicesClientDeleteResponse
- type ServicesClientGetOptions
- type ServicesClientGetResponse
- type ServicesClientListByResourceGroupOptions
- type ServicesClientListByResourceGroupResponse
- type ServicesClientListOptions
- type ServicesClientListResponse
- type ServicesClientUpdateOptions
- type ServicesClientUpdateResponse
- type TrackedResource
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientFactory ¶ added in v1.1.0
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 ¶ added in v1.1.0
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 subscription identifier.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ClientFactory) NewOperationsClient ¶ added in v1.1.0
func (c *ClientFactory) NewOperationsClient() *OperationsClient
NewOperationsClient creates a new instance of OperationsClient.
func (*ClientFactory) NewServicesClient ¶ added in v1.1.0
func (c *ClientFactory) NewServicesClient() *ServicesClient
NewServicesClient creates a new instance of ServicesClient.
type DeviceService ¶
type DeviceService struct { // The Etag field is not required. If it is provided in the response body, it must also be provided as a header per the normal // ETag convention. Etag *string // The Azure Region where the resource lives Location *string // The properties of a Windows IoT Device Service. Properties *DeviceServiceProperties // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource Id for the resource ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. Type *string }
DeviceService - The description of the Windows IoT Device Service.
func (DeviceService) MarshalJSON ¶
func (d DeviceService) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DeviceService.
func (*DeviceService) UnmarshalJSON ¶ added in v1.1.0
func (d *DeviceService) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DeviceService.
type DeviceServiceCheckNameAvailabilityParameters ¶
type DeviceServiceCheckNameAvailabilityParameters struct { // REQUIRED; The name of the Windows IoT Device Service to check. Name *string }
DeviceServiceCheckNameAvailabilityParameters - Input values.
func (DeviceServiceCheckNameAvailabilityParameters) MarshalJSON ¶ added in v1.1.0
func (d DeviceServiceCheckNameAvailabilityParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DeviceServiceCheckNameAvailabilityParameters.
func (*DeviceServiceCheckNameAvailabilityParameters) UnmarshalJSON ¶ added in v1.1.0
func (d *DeviceServiceCheckNameAvailabilityParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DeviceServiceCheckNameAvailabilityParameters.
type DeviceServiceDescriptionListResult ¶
type DeviceServiceDescriptionListResult struct { // The array of DeviceService objects. Value []*DeviceService // READ-ONLY; The next link. NextLink *string }
DeviceServiceDescriptionListResult - The JSON-serialized array of DeviceService objects with a next link.
func (DeviceServiceDescriptionListResult) MarshalJSON ¶
func (d DeviceServiceDescriptionListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DeviceServiceDescriptionListResult.
func (*DeviceServiceDescriptionListResult) UnmarshalJSON ¶ added in v1.1.0
func (d *DeviceServiceDescriptionListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DeviceServiceDescriptionListResult.
type DeviceServiceNameAvailabilityInfo ¶
type DeviceServiceNameAvailabilityInfo struct { // The detailed reason message. Message *string // READ-ONLY; The value which indicates whether the provided name is available. NameAvailable *bool // READ-ONLY; The reason for unavailability. Reason *ServiceNameUnavailabilityReason }
DeviceServiceNameAvailabilityInfo - The properties indicating whether a given Windows IoT Device Service name is available.
func (DeviceServiceNameAvailabilityInfo) MarshalJSON ¶ added in v1.1.0
func (d DeviceServiceNameAvailabilityInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DeviceServiceNameAvailabilityInfo.
func (*DeviceServiceNameAvailabilityInfo) UnmarshalJSON ¶ added in v1.1.0
func (d *DeviceServiceNameAvailabilityInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DeviceServiceNameAvailabilityInfo.
type DeviceServiceProperties ¶
type DeviceServiceProperties struct { // Windows IoT Device Service OEM AAD domain AdminDomainName *string // Windows IoT Device Service ODM AAD domain BillingDomainName *string // Windows IoT Device Service notes. Notes *string // Windows IoT Device Service device allocation, Quantity *int64 // READ-ONLY; Windows IoT Device Service start date, StartDate *time.Time }
DeviceServiceProperties - The properties of a Windows IoT Device Service.
func (DeviceServiceProperties) MarshalJSON ¶
func (d DeviceServiceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DeviceServiceProperties.
func (*DeviceServiceProperties) UnmarshalJSON ¶
func (d *DeviceServiceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DeviceServiceProperties.
type ErrorDetails ¶
type ErrorDetails struct { // The error object. Error *ErrorDetailsError }
ErrorDetails - The details of the error.
func (ErrorDetails) MarshalJSON ¶ added in v1.1.0
func (e ErrorDetails) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorDetails.
func (*ErrorDetails) UnmarshalJSON ¶ added in v1.1.0
func (e *ErrorDetails) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetails.
type ErrorDetailsError ¶
type ErrorDetailsError struct { // One of a server-defined set of error codes. Code *string // A human-readable representation of the error's details. Details *string // A human-readable representation of the error. Message *string // The target of the particular error. Target *string }
ErrorDetailsError - The error object.
func (ErrorDetailsError) MarshalJSON ¶ added in v1.1.0
func (e ErrorDetailsError) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorDetailsError.
func (*ErrorDetailsError) UnmarshalJSON ¶ added in v1.1.0
func (e *ErrorDetailsError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetailsError.
type OperationDisplayInfo ¶
type OperationDisplayInfo struct { // The description of the operation. Description *string // The action that users can perform, based on their permission level. Operation *string // Service provider: Azure Data Catalog Service. Provider *string // Resource on which the operation is performed. Resource *string }
OperationDisplayInfo - The operation supported by Azure Data Catalog Service.
func (OperationDisplayInfo) MarshalJSON ¶ added in v1.1.0
func (o OperationDisplayInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationDisplayInfo.
func (*OperationDisplayInfo) UnmarshalJSON ¶ added in v1.1.0
func (o *OperationDisplayInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplayInfo.
type OperationEntity ¶
type OperationEntity struct { // The operation supported by Azure Data Catalog Service. Display *OperationDisplayInfo // Indicates whether the operation is a data action IsDataAction *bool // Operation name: {provider}/{resource}/{operation}. Name *string // Indicates the executor of the operation. Origin *string }
OperationEntity - The operation supported by Azure Data Catalog Service.
func (OperationEntity) MarshalJSON ¶ added in v1.1.0
func (o OperationEntity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationEntity.
func (*OperationEntity) UnmarshalJSON ¶ added in v1.1.0
func (o *OperationEntity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationEntity.
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 Windows IoT Device Service operations supported by the Microsoft.WindowsIoT resource provider. Value []*OperationEntity }
OperationListResult - Result of the request to list Windows IoT Device Service operations. It contains a list of operations and a 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 ¶ added in v1.1.0
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 ¶ added in v0.4.0
func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]
NewListPager - Lists all of the available Windows IoT Services REST API operations.
Generated from API version 2019-06-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/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/windowsiot/resource-manager/Microsoft.WindowsIoT/stable/2019-06-01/examples/OperationsList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/windowsiot/armwindowsiot" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armwindowsiot.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 = armwindowsiot.OperationListResult{ // Value: []*armwindowsiot.OperationEntity{ // { // Name: to.Ptr("Microsoft.WindowsIoT/Services/write"), // Display: &armwindowsiot.OperationDisplayInfo{ // Description: to.Ptr("Creates a Windows IoT Subscription with the specified parameters or update the properties or tags or adds custom domain for the specified Windows IoT Subscription."), // Operation: to.Ptr("Create/Update Windows IoT Subscription"), // Provider: to.Ptr("Windows IoT"), // Resource: to.Ptr("Windows IoT Services"), // }, // Origin: to.Ptr("user,system"), // }, // { // Name: to.Ptr("Microsoft.WindowsIoT/Services/delete"), // Display: &armwindowsiot.OperationDisplayInfo{ // Description: to.Ptr("Deletes an existing Windows IoT Subscription."), // Operation: to.Ptr("Delete Windows IoT Subscription"), // Provider: to.Ptr("Windows IoT"), // Resource: to.Ptr("Windows IoT Services"), // }, // Origin: to.Ptr("user,system"), // }, // { // Name: to.Ptr("Microsoft.WindowsIoT/checkNameAvailability/read"), // Display: &armwindowsiot.OperationDisplayInfo{ // Description: to.Ptr("Checks that account name is valid and is not in use."), // Operation: to.Ptr("Check Name Availability"), // Provider: to.Ptr("Windows IoT"), // Resource: to.Ptr("Name Availability"), // }, // Origin: to.Ptr("user,system"), // }, // { // Name: to.Ptr("Microsoft.WindowsIoT/Services/read"), // Display: &armwindowsiot.OperationDisplayInfo{ // Description: to.Ptr("Returns the list of Windows IoT Services or gets the properties for the specified Windows IoT Subscription."), // Operation: to.Ptr("List/Get Windows IoT Subscription(s)"), // Provider: to.Ptr("Windows IoT"), // Resource: to.Ptr("Windows IoT Services"), // }, // Origin: to.Ptr("user,system"), // }, // { // Name: to.Ptr("Microsoft.WindowsIoT/operations/read"), // Display: &armwindowsiot.OperationDisplayInfo{ // Description: to.Ptr("Polls the status of an asynchronous operation."), // Operation: to.Ptr("Poll Asynchronous Operation"), // Provider: to.Ptr("Windows IoT"), // Resource: to.Ptr("Operations"), // }, // Origin: to.Ptr("user,system"), // }}, // } } }
Output:
type OperationsClientListOptions ¶ added in v0.2.0
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
type OperationsClientListResponse ¶ added in v0.2.0
type OperationsClientListResponse struct { // Result of the request to list Windows IoT Device Service operations. It contains a list of operations and a URL link to // get the next set of results. OperationListResult }
OperationsClientListResponse contains the response from method OperationsClient.NewListPager.
type ProxyResource ¶
type ProxyResource struct { // READ-ONLY; Fully qualified resource Id for the resource ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. Type *string }
ProxyResource - The resource model definition for a ARM proxy resource. It will have everything other than required location and tags
func (ProxyResource) MarshalJSON ¶ added in v1.1.0
func (p ProxyResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProxyResource.
func (*ProxyResource) UnmarshalJSON ¶ added in v1.1.0
func (p *ProxyResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource.
type Resource ¶
type Resource struct { // READ-ONLY; Fully qualified resource Id for the resource ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. Type *string }
Resource - The core properties of ARM resources
func (Resource) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Resource.
func (*Resource) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Resource.
type ServiceNameUnavailabilityReason ¶
type ServiceNameUnavailabilityReason string
ServiceNameUnavailabilityReason - The reason for unavailability.
const ()
func PossibleServiceNameUnavailabilityReasonValues ¶
func PossibleServiceNameUnavailabilityReasonValues() []ServiceNameUnavailabilityReason
PossibleServiceNameUnavailabilityReasonValues returns the possible values for the ServiceNameUnavailabilityReason const type.
type ServicesClient ¶
type ServicesClient struct {
// contains filtered or unexported fields
}
ServicesClient contains the methods for the Services group. Don't use this type directly, use NewServicesClient() instead.
func NewServicesClient ¶
func NewServicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServicesClient, error)
NewServicesClient creates a new instance of ServicesClient with the specified values.
- subscriptionID - The subscription identifier.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ServicesClient) CheckDeviceServiceNameAvailability ¶
func (client *ServicesClient) CheckDeviceServiceNameAvailability(ctx context.Context, deviceServiceCheckNameAvailabilityParameters DeviceServiceCheckNameAvailabilityParameters, options *ServicesClientCheckDeviceServiceNameAvailabilityOptions) (ServicesClientCheckDeviceServiceNameAvailabilityResponse, error)
CheckDeviceServiceNameAvailability - Check if a Windows IoT Device Service name is available. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2019-06-01
- deviceServiceCheckNameAvailabilityParameters - Set the name parameter in the DeviceServiceCheckNameAvailabilityParameters structure to the name of the Windows IoT Device Service to check.
- options - ServicesClientCheckDeviceServiceNameAvailabilityOptions contains the optional parameters for the ServicesClient.CheckDeviceServiceNameAvailability method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/windowsiot/resource-manager/Microsoft.WindowsIoT/stable/2019-06-01/examples/Service_CheckNameAvailability.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/windowsiot/armwindowsiot" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armwindowsiot.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewServicesClient().CheckDeviceServiceNameAvailability(ctx, armwindowsiot.DeviceServiceCheckNameAvailabilityParameters{ Name: to.Ptr("service3363"), }, 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.DeviceServiceNameAvailabilityInfo = armwindowsiot.DeviceServiceNameAvailabilityInfo{ // NameAvailable: to.Ptr(true), // } }
Output:
func (*ServicesClient) CreateOrUpdate ¶
func (client *ServicesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, deviceName string, deviceService DeviceService, options *ServicesClientCreateOrUpdateOptions) (ServicesClientCreateOrUpdateResponse, error)
CreateOrUpdate - Create or update the metadata of a Windows IoT Device Service. The usual pattern to modify a property is to retrieve the Windows IoT Device Service metadata and security metadata, and then combine them with the modified values in a new body to update the Windows IoT Device Service. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2019-06-01
- resourceGroupName - The name of the resource group that contains the Windows IoT Device Service.
- deviceName - The name of the Windows IoT Device Service.
- deviceService - The Windows IoT Device Service metadata and security metadata.
- options - ServicesClientCreateOrUpdateOptions contains the optional parameters for the ServicesClient.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/windowsiot/resource-manager/Microsoft.WindowsIoT/stable/2019-06-01/examples/Service_Create.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/windowsiot/armwindowsiot" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armwindowsiot.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewServicesClient().CreateOrUpdate(ctx, "res9101", "service4445", armwindowsiot.DeviceService{ Location: to.Ptr("East US"), Properties: &armwindowsiot.DeviceServiceProperties{ AdminDomainName: to.Ptr("d.e.f"), BillingDomainName: to.Ptr("a.b.c"), Notes: to.Ptr("blah"), Quantity: to.Ptr[int64](1000000), }, }, &armwindowsiot.ServicesClientCreateOrUpdateOptions{IfMatch: 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.DeviceService = armwindowsiot.DeviceService{ // Type: to.Ptr("Microsoft.WindowsIoT/Services"), // Location: to.Ptr("East US"), // Properties: &armwindowsiot.DeviceServiceProperties{ // AdminDomainName: to.Ptr("d.e.f"), // BillingDomainName: to.Ptr("a.b.c"), // Notes: to.Ptr("blah"), // Quantity: to.Ptr[int64](1000000), // StartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "NaN-NaN-NaNTNaN:NaN:NaN.NaNZ"); return t}()), // }, // } }
Output:
func (*ServicesClient) Delete ¶
func (client *ServicesClient) Delete(ctx context.Context, resourceGroupName string, deviceName string, options *ServicesClientDeleteOptions) (ServicesClientDeleteResponse, error)
Delete - Delete a Windows IoT Device Service. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2019-06-01
- resourceGroupName - The name of the resource group that contains the Windows IoT Device Service.
- deviceName - The name of the Windows IoT Device Service.
- options - ServicesClientDeleteOptions contains the optional parameters for the ServicesClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/windowsiot/resource-manager/Microsoft.WindowsIoT/stable/2019-06-01/examples/Service_Delete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/windowsiot/armwindowsiot" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armwindowsiot.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewServicesClient().Delete(ctx, "res4228", "service2434", 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.DeviceService = armwindowsiot.DeviceService{ // Type: to.Ptr("Microsoft.WindowsIoT/Services"), // Properties: &armwindowsiot.DeviceServiceProperties{ // AdminDomainName: to.Ptr("d.e.f"), // BillingDomainName: to.Ptr("a.b.c"), // Notes: to.Ptr("blah"), // Quantity: to.Ptr[int64](1000000), // StartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "NaN-NaN-NaNTNaN:NaN:NaN.NaNZ"); return t}()), // }, // } }
Output:
func (*ServicesClient) Get ¶
func (client *ServicesClient) Get(ctx context.Context, resourceGroupName string, deviceName string, options *ServicesClientGetOptions) (ServicesClientGetResponse, error)
Get - Get the non-security related metadata of a Windows IoT Device Service. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2019-06-01
- resourceGroupName - The name of the resource group that contains the Windows IoT Device Service.
- deviceName - The name of the Windows IoT Device Service.
- options - ServicesClientGetOptions contains the optional parameters for the ServicesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/windowsiot/resource-manager/Microsoft.WindowsIoT/stable/2019-06-01/examples/Service_GetProperties.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/windowsiot/armwindowsiot" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armwindowsiot.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewServicesClient().Get(ctx, "res9407", "service8596", 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.DeviceService = armwindowsiot.DeviceService{ // Name: to.Ptr("service8596"), // Type: to.Ptr("Microsoft.WindowsIoT/Services"), // ID: to.Ptr("/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/res9407/providers/Microsoft.WindowsIoT/Services/service8596"), // Location: to.Ptr("westus"), // Properties: &armwindowsiot.DeviceServiceProperties{ // AdminDomainName: to.Ptr("d.e.f"), // BillingDomainName: to.Ptr("a.b.c"), // Notes: to.Ptr("blah"), // Quantity: to.Ptr[int64](1000000), // StartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "NaN-NaN-NaNTNaN:NaN:NaN.NaNZ"); return t}()), // }, // } }
Output:
func (*ServicesClient) NewListByResourceGroupPager ¶ added in v0.4.0
func (client *ServicesClient) NewListByResourceGroupPager(resourceGroupName string, options *ServicesClientListByResourceGroupOptions) *runtime.Pager[ServicesClientListByResourceGroupResponse]
NewListByResourceGroupPager - Get all the IoT hubs in a resource group.
Generated from API version 2019-06-01
- resourceGroupName - The name of the resource group that contains the Windows IoT Device Service.
- options - ServicesClientListByResourceGroupOptions contains the optional parameters for the ServicesClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/windowsiot/resource-manager/Microsoft.WindowsIoT/stable/2019-06-01/examples/Service_ListByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/windowsiot/armwindowsiot" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armwindowsiot.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewServicesClient().NewListByResourceGroupPager("res6117", 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.DeviceServiceDescriptionListResult = armwindowsiot.DeviceServiceDescriptionListResult{ // Value: []*armwindowsiot.DeviceService{ // { // Name: to.Ptr("service4036"), // Type: to.Ptr("Microsoft.WindowsIoT/Services"), // ID: to.Ptr("/subscriptions/27de630f-e1ee-42de-8849-90def4986454/resourceGroups/res6117/providers/Microsoft.WindowsIoT/Services/service4036"), // Properties: &armwindowsiot.DeviceServiceProperties{ // AdminDomainName: to.Ptr("d.e.f"), // BillingDomainName: to.Ptr("a.b.c"), // Notes: to.Ptr("blah"), // Quantity: to.Ptr[int64](1000000), // StartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "NaN-NaN-NaNTNaN:NaN:NaN.NaNZ"); return t}()), // }, // }, // { // Name: to.Ptr("service4452"), // Type: to.Ptr("Microsoft.WindowsIoT/Services"), // ID: to.Ptr("/subscriptions/27de630f-e1ee-42de-8849-90def4986454/resourceGroups/res6117/providers/Microsoft.WindowsIoT/Services/service4452"), // Properties: &armwindowsiot.DeviceServiceProperties{ // AdminDomainName: to.Ptr("d.e.f"), // BillingDomainName: to.Ptr("a.b.c"), // Notes: to.Ptr("blah"), // Quantity: to.Ptr[int64](1000000), // StartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "NaN-NaN-NaNTNaN:NaN:NaN.NaNZ"); return t}()), // }, // }}, // } } }
Output:
func (*ServicesClient) NewListPager ¶ added in v0.4.0
func (client *ServicesClient) NewListPager(options *ServicesClientListOptions) *runtime.Pager[ServicesClientListResponse]
NewListPager - Get all the IoT hubs in a subscription.
Generated from API version 2019-06-01
- options - ServicesClientListOptions contains the optional parameters for the ServicesClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/windowsiot/resource-manager/Microsoft.WindowsIoT/stable/2019-06-01/examples/Service_List.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/windowsiot/armwindowsiot" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armwindowsiot.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewServicesClient().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.DeviceServiceDescriptionListResult = armwindowsiot.DeviceServiceDescriptionListResult{ // Value: []*armwindowsiot.DeviceService{ // { // Name: to.Ptr("service1125"), // Type: to.Ptr("Microsoft.WindowsIoT/Services"), // ID: to.Ptr("/subscriptions/27de630f-e1ee-42de-8849-90def4986454/resourceGroups/res2627/providers/Microsoft.WindowsIoT/Services/service1125"), // Properties: &armwindowsiot.DeviceServiceProperties{ // AdminDomainName: to.Ptr("d.e.f"), // BillingDomainName: to.Ptr("a.b.c"), // Notes: to.Ptr("blah"), // Quantity: to.Ptr[int64](1000000), // StartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "NaN-NaN-NaNTNaN:NaN:NaN.NaNZ"); return t}()), // }, // }, // { // Name: to.Ptr("service3699"), // Type: to.Ptr("Microsoft.WindowsIoT/Services"), // ID: to.Ptr("/subscriptions/27de630f-e1ee-42de-8849-90def4986454/resourceGroups/testcmk3/providers/Microsoft.WindowsIoT/Services/service3699"), // Properties: &armwindowsiot.DeviceServiceProperties{ // AdminDomainName: to.Ptr("d.e.f"), // BillingDomainName: to.Ptr("a.b.c"), // Notes: to.Ptr("blah"), // Quantity: to.Ptr[int64](1000000), // StartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "NaN-NaN-NaNTNaN:NaN:NaN.NaNZ"); return t}()), // }, // }, // { // Name: to.Ptr("service6637"), // Type: to.Ptr("Microsoft.WindowsIoT/Services"), // ID: to.Ptr("/subscriptions/27de630f-e1ee-42de-8849-90def4986454/resourceGroups/testcmk3/providers/Microsoft.WindowsIoT/Services/service6637"), // Properties: &armwindowsiot.DeviceServiceProperties{ // AdminDomainName: to.Ptr("d.e.f"), // BillingDomainName: to.Ptr("a.b.c"), // Notes: to.Ptr("blah"), // Quantity: to.Ptr[int64](1000000), // StartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "NaN-NaN-NaNTNaN:NaN:NaN.NaNZ"); return t}()), // }, // }, // { // Name: to.Ptr("service834"), // Type: to.Ptr("Microsoft.WindowsIoT/Services"), // ID: to.Ptr("/subscriptions/27de630f-e1ee-42de-8849-90def4986454/resourceGroups/res8186/providers/Microsoft.WindowsIoT/Services/service834"), // Properties: &armwindowsiot.DeviceServiceProperties{ // AdminDomainName: to.Ptr("d.e.f"), // BillingDomainName: to.Ptr("a.b.c"), // Notes: to.Ptr("blah"), // Quantity: to.Ptr[int64](1000000), // StartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "NaN-NaN-NaNTNaN:NaN:NaN.NaNZ"); return t}()), // }, // }, // { // Name: to.Ptr("service9174"), // Type: to.Ptr("Microsoft.WindowsIoT/Services"), // ID: to.Ptr("/subscriptions/27de630f-e1ee-42de-8849-90def4986454/resourceGroups/testcmk3/providers/Microsoft.WindowsIoT/Services/service9174"), // Properties: &armwindowsiot.DeviceServiceProperties{ // AdminDomainName: to.Ptr("d.e.f"), // BillingDomainName: to.Ptr("a.b.c"), // Notes: to.Ptr("blah"), // Quantity: to.Ptr[int64](1000000), // StartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "NaN-NaN-NaNTNaN:NaN:NaN.NaNZ"); return t}()), // }, // }}, // } } }
Output:
func (*ServicesClient) Update ¶
func (client *ServicesClient) Update(ctx context.Context, resourceGroupName string, deviceName string, deviceService DeviceService, options *ServicesClientUpdateOptions) (ServicesClientUpdateResponse, error)
Update - Updates the metadata of a Windows IoT Device Service. The usual pattern to modify a property is to retrieve the Windows IoT Device Service metadata and security metadata, and then combine them with the modified values in a new body to update the Windows IoT Device Service. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2019-06-01
- resourceGroupName - The name of the resource group that contains the Windows IoT Device Service.
- deviceName - The name of the Windows IoT Device Service.
- deviceService - The Windows IoT Device Service metadata and security metadata.
- options - ServicesClientUpdateOptions contains the optional parameters for the ServicesClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/windowsiot/resource-manager/Microsoft.WindowsIoT/stable/2019-06-01/examples/Service_Update.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/windowsiot/armwindowsiot" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armwindowsiot.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewServicesClient().Update(ctx, "res9407", "service8596", armwindowsiot.DeviceService{ Location: to.Ptr("East US"), Properties: &armwindowsiot.DeviceServiceProperties{ AdminDomainName: to.Ptr("d.e.f"), BillingDomainName: to.Ptr("a.b.c"), Notes: to.Ptr("blah"), Quantity: to.Ptr[int64](1000000), }, }, &armwindowsiot.ServicesClientUpdateOptions{IfMatch: 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.DeviceService = armwindowsiot.DeviceService{ // Type: to.Ptr("Microsoft.WindowsIoT/Services"), // Location: to.Ptr("East US"), // Properties: &armwindowsiot.DeviceServiceProperties{ // AdminDomainName: to.Ptr("d.e.f"), // BillingDomainName: to.Ptr("a.b.c"), // Notes: to.Ptr("blah"), // Quantity: to.Ptr[int64](1000000), // StartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "NaN-NaN-NaNTNaN:NaN:NaN.NaNZ"); return t}()), // }, // } }
Output:
type ServicesClientCheckDeviceServiceNameAvailabilityOptions ¶ added in v0.2.0
type ServicesClientCheckDeviceServiceNameAvailabilityOptions struct { }
ServicesClientCheckDeviceServiceNameAvailabilityOptions contains the optional parameters for the ServicesClient.CheckDeviceServiceNameAvailability method.
type ServicesClientCheckDeviceServiceNameAvailabilityResponse ¶ added in v0.2.0
type ServicesClientCheckDeviceServiceNameAvailabilityResponse struct { // The properties indicating whether a given Windows IoT Device Service name is available. DeviceServiceNameAvailabilityInfo }
ServicesClientCheckDeviceServiceNameAvailabilityResponse contains the response from method ServicesClient.CheckDeviceServiceNameAvailability.
type ServicesClientCreateOrUpdateOptions ¶ added in v0.2.0
type ServicesClientCreateOrUpdateOptions struct { // ETag of the Windows IoT Device Service. Do not specify for creating a new Windows IoT Device Service. Required to update // an existing Windows IoT Device Service. IfMatch *string }
ServicesClientCreateOrUpdateOptions contains the optional parameters for the ServicesClient.CreateOrUpdate method.
type ServicesClientCreateOrUpdateResponse ¶ added in v0.2.0
type ServicesClientCreateOrUpdateResponse struct { // The description of the Windows IoT Device Service. DeviceService }
ServicesClientCreateOrUpdateResponse contains the response from method ServicesClient.CreateOrUpdate.
type ServicesClientDeleteOptions ¶ added in v0.2.0
type ServicesClientDeleteOptions struct { }
ServicesClientDeleteOptions contains the optional parameters for the ServicesClient.Delete method.
type ServicesClientDeleteResponse ¶ added in v0.2.0
type ServicesClientDeleteResponse struct { // The description of the Windows IoT Device Service. DeviceService }
ServicesClientDeleteResponse contains the response from method ServicesClient.Delete.
type ServicesClientGetOptions ¶ added in v0.2.0
type ServicesClientGetOptions struct { }
ServicesClientGetOptions contains the optional parameters for the ServicesClient.Get method.
type ServicesClientGetResponse ¶ added in v0.2.0
type ServicesClientGetResponse struct { // The description of the Windows IoT Device Service. DeviceService }
ServicesClientGetResponse contains the response from method ServicesClient.Get.
type ServicesClientListByResourceGroupOptions ¶ added in v0.2.0
type ServicesClientListByResourceGroupOptions struct { }
ServicesClientListByResourceGroupOptions contains the optional parameters for the ServicesClient.NewListByResourceGroupPager method.
type ServicesClientListByResourceGroupResponse ¶ added in v0.2.0
type ServicesClientListByResourceGroupResponse struct { // The JSON-serialized array of DeviceService objects with a next link. DeviceServiceDescriptionListResult }
ServicesClientListByResourceGroupResponse contains the response from method ServicesClient.NewListByResourceGroupPager.
type ServicesClientListOptions ¶ added in v0.2.0
type ServicesClientListOptions struct { }
ServicesClientListOptions contains the optional parameters for the ServicesClient.NewListPager method.
type ServicesClientListResponse ¶ added in v0.2.0
type ServicesClientListResponse struct { // The JSON-serialized array of DeviceService objects with a next link. DeviceServiceDescriptionListResult }
ServicesClientListResponse contains the response from method ServicesClient.NewListPager.
type ServicesClientUpdateOptions ¶ added in v0.2.0
type ServicesClientUpdateOptions struct { // ETag of the Windows IoT Device Service. Do not specify for creating a brand new Windows IoT Device Service. Required to // update an existing Windows IoT Device Service. IfMatch *string }
ServicesClientUpdateOptions contains the optional parameters for the ServicesClient.Update method.
type ServicesClientUpdateResponse ¶ added in v0.2.0
type ServicesClientUpdateResponse struct { // The description of the Windows IoT Device Service. DeviceService }
ServicesClientUpdateResponse contains the response from method ServicesClient.Update.
type TrackedResource ¶
type TrackedResource struct { // The Azure Region where the resource lives Location *string // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource Id for the resource ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. Type *string }
TrackedResource - The resource model definition for a ARM tracked top level resource
func (TrackedResource) MarshalJSON ¶
func (t TrackedResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TrackedResource.
func (*TrackedResource) UnmarshalJSON ¶ added in v1.1.0
func (t *TrackedResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TrackedResource.