Documentation ¶
Index ¶
- type AccessRights
- type ArmIdentity
- type ArmUserIdentity
- type AuthenticationType
- type Capabilities
- type Capacity
- type CertificateBodyDescription
- type CertificateDescription
- type CertificateListDescription
- type CertificateProperties
- type CertificatePropertiesWithNonce
- type CertificateVerificationDescription
- type CertificateWithNonceDescription
- type CertificatesClient
- func (client *CertificatesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, ...) (CertificatesClientCreateOrUpdateResponse, error)
- func (client *CertificatesClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, ...) (CertificatesClientDeleteResponse, error)
- func (client *CertificatesClient) GenerateVerificationCode(ctx context.Context, resourceGroupName string, resourceName string, ...) (CertificatesClientGenerateVerificationCodeResponse, error)
- func (client *CertificatesClient) Get(ctx context.Context, resourceGroupName string, resourceName string, ...) (CertificatesClientGetResponse, error)
- func (client *CertificatesClient) ListByIotHub(ctx context.Context, resourceGroupName string, resourceName string, ...) (CertificatesClientListByIotHubResponse, error)
- func (client *CertificatesClient) Verify(ctx context.Context, resourceGroupName string, resourceName string, ...) (CertificatesClientVerifyResponse, error)
- type CertificatesClientCreateOrUpdateOptions
- type CertificatesClientCreateOrUpdateResponse
- type CertificatesClientDeleteOptions
- type CertificatesClientDeleteResponse
- type CertificatesClientGenerateVerificationCodeOptions
- type CertificatesClientGenerateVerificationCodeResponse
- type CertificatesClientGetOptions
- type CertificatesClientGetResponse
- type CertificatesClientListByIotHubOptions
- type CertificatesClientListByIotHubResponse
- type CertificatesClientVerifyOptions
- type CertificatesClientVerifyResponse
- type Client
- type ClientBeginManualFailoverOptions
- type ClientFactory
- func (c *ClientFactory) NewCertificatesClient() *CertificatesClient
- func (c *ClientFactory) NewClient() *Client
- func (c *ClientFactory) NewOperationsClient() *OperationsClient
- func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient
- func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient
- func (c *ClientFactory) NewResourceClient() *ResourceClient
- func (c *ClientFactory) NewResourceProviderCommonClient() *ResourceProviderCommonClient
- type ClientManualFailoverResponse
- type CloudToDeviceProperties
- type CreatedByType
- type DefaultAction
- type Description
- type DescriptionListResult
- type EndpointHealthData
- type EndpointHealthDataListResult
- type EndpointHealthStatus
- type EnrichmentProperties
- type ErrorDetails
- type EventHubConsumerGroupBodyDescription
- type EventHubConsumerGroupInfo
- type EventHubConsumerGroupName
- type EventHubConsumerGroupsListResult
- type EventHubProperties
- type ExportDevicesRequest
- type FailoverInput
- type FallbackRouteProperties
- type FeedbackProperties
- type GroupIDInformation
- type GroupIDInformationProperties
- type IPFilterActionType
- type IPFilterRule
- type ImportDevicesRequest
- type IotHubNameUnavailabilityReason
- type IotHubReplicaRoleType
- type IotHubSKU
- type IotHubSKUTier
- type IotHubScaleType
- type JobResponse
- type JobResponseListResult
- type JobStatus
- type JobType
- type LocationDescription
- type ManagedIdentity
- type MatchedRoute
- type MessagingEndpointProperties
- type Name
- type NameAvailabilityInfo
- type NetworkRuleIPAction
- type NetworkRuleSetIPRule
- type NetworkRuleSetProperties
- type Operation
- type OperationDisplay
- type OperationInputs
- type OperationListResult
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type PrivateEndpoint
- type PrivateEndpointConnection
- type PrivateEndpointConnectionProperties
- type PrivateEndpointConnectionsClient
- func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, resourceName string, ...) (*runtime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error)
- func (client *PrivateEndpointConnectionsClient) BeginUpdate(ctx context.Context, resourceGroupName string, resourceName string, ...) (*runtime.Poller[PrivateEndpointConnectionsClientUpdateResponse], error)
- func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, ...) (PrivateEndpointConnectionsClientGetResponse, error)
- func (client *PrivateEndpointConnectionsClient) List(ctx context.Context, resourceGroupName string, resourceName string, ...) (PrivateEndpointConnectionsClientListResponse, error)
- type PrivateEndpointConnectionsClientBeginDeleteOptions
- type PrivateEndpointConnectionsClientBeginUpdateOptions
- type PrivateEndpointConnectionsClientDeleteResponse
- type PrivateEndpointConnectionsClientGetOptions
- type PrivateEndpointConnectionsClientGetResponse
- type PrivateEndpointConnectionsClientListOptions
- type PrivateEndpointConnectionsClientListResponse
- type PrivateEndpointConnectionsClientUpdateResponse
- type PrivateLinkResources
- type PrivateLinkResourcesClient
- func (client *PrivateLinkResourcesClient) Get(ctx context.Context, resourceGroupName string, resourceName string, ...) (PrivateLinkResourcesClientGetResponse, error)
- func (client *PrivateLinkResourcesClient) List(ctx context.Context, resourceGroupName string, resourceName string, ...) (PrivateLinkResourcesClientListResponse, error)
- type PrivateLinkResourcesClientGetOptions
- type PrivateLinkResourcesClientGetResponse
- type PrivateLinkResourcesClientListOptions
- type PrivateLinkResourcesClientListResponse
- type PrivateLinkServiceConnectionState
- type PrivateLinkServiceConnectionStatus
- type Properties
- type PublicNetworkAccess
- type QuotaMetricInfo
- type QuotaMetricInfoListResult
- type RegistryStatistics
- type Resource
- type ResourceClient
- func (client *ResourceClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, ...) (*runtime.Poller[ResourceClientCreateOrUpdateResponse], error)
- func (client *ResourceClient) BeginDelete(ctx context.Context, resourceGroupName string, resourceName string, ...) (*runtime.Poller[ResourceClientDeleteResponse], error)
- func (client *ResourceClient) BeginUpdate(ctx context.Context, resourceGroupName string, resourceName string, ...) (*runtime.Poller[ResourceClientUpdateResponse], error)
- func (client *ResourceClient) CheckNameAvailability(ctx context.Context, operationInputs OperationInputs, ...) (ResourceClientCheckNameAvailabilityResponse, error)
- func (client *ResourceClient) CreateEventHubConsumerGroup(ctx context.Context, resourceGroupName string, resourceName string, ...) (ResourceClientCreateEventHubConsumerGroupResponse, error)
- func (client *ResourceClient) DeleteEventHubConsumerGroup(ctx context.Context, resourceGroupName string, resourceName string, ...) (ResourceClientDeleteEventHubConsumerGroupResponse, error)
- func (client *ResourceClient) ExportDevices(ctx context.Context, resourceGroupName string, resourceName string, ...) (ResourceClientExportDevicesResponse, error)
- func (client *ResourceClient) Get(ctx context.Context, resourceGroupName string, resourceName string, ...) (ResourceClientGetResponse, error)
- func (client *ResourceClient) GetEventHubConsumerGroup(ctx context.Context, resourceGroupName string, resourceName string, ...) (ResourceClientGetEventHubConsumerGroupResponse, error)
- func (client *ResourceClient) GetJob(ctx context.Context, resourceGroupName string, resourceName string, ...) (ResourceClientGetJobResponse, error)
- func (client *ResourceClient) GetKeysForKeyName(ctx context.Context, resourceGroupName string, resourceName string, ...) (ResourceClientGetKeysForKeyNameResponse, error)
- func (client *ResourceClient) GetStats(ctx context.Context, resourceGroupName string, resourceName string, ...) (ResourceClientGetStatsResponse, error)
- func (client *ResourceClient) ImportDevices(ctx context.Context, resourceGroupName string, resourceName string, ...) (ResourceClientImportDevicesResponse, error)
- func (client *ResourceClient) NewGetEndpointHealthPager(resourceGroupName string, iotHubName string, ...) *runtime.Pager[ResourceClientGetEndpointHealthResponse]
- func (client *ResourceClient) NewGetQuotaMetricsPager(resourceGroupName string, resourceName string, ...) *runtime.Pager[ResourceClientGetQuotaMetricsResponse]
- func (client *ResourceClient) NewGetValidSKUsPager(resourceGroupName string, resourceName string, ...) *runtime.Pager[ResourceClientGetValidSKUsResponse]
- func (client *ResourceClient) NewListByResourceGroupPager(resourceGroupName string, options *ResourceClientListByResourceGroupOptions) *runtime.Pager[ResourceClientListByResourceGroupResponse]
- func (client *ResourceClient) NewListBySubscriptionPager(options *ResourceClientListBySubscriptionOptions) *runtime.Pager[ResourceClientListBySubscriptionResponse]
- func (client *ResourceClient) NewListEventHubConsumerGroupsPager(resourceGroupName string, resourceName string, eventHubEndpointName string, ...) *runtime.Pager[ResourceClientListEventHubConsumerGroupsResponse]
- func (client *ResourceClient) NewListJobsPager(resourceGroupName string, resourceName string, ...) *runtime.Pager[ResourceClientListJobsResponse]
- func (client *ResourceClient) NewListKeysPager(resourceGroupName string, resourceName string, ...) *runtime.Pager[ResourceClientListKeysResponse]
- func (client *ResourceClient) TestAllRoutes(ctx context.Context, iotHubName string, resourceGroupName string, ...) (ResourceClientTestAllRoutesResponse, error)
- func (client *ResourceClient) TestRoute(ctx context.Context, iotHubName string, resourceGroupName string, ...) (ResourceClientTestRouteResponse, error)
- type ResourceClientBeginCreateOrUpdateOptions
- type ResourceClientBeginDeleteOptions
- type ResourceClientBeginUpdateOptions
- type ResourceClientCheckNameAvailabilityOptions
- type ResourceClientCheckNameAvailabilityResponse
- type ResourceClientCreateEventHubConsumerGroupOptions
- type ResourceClientCreateEventHubConsumerGroupResponse
- type ResourceClientCreateOrUpdateResponse
- type ResourceClientDeleteEventHubConsumerGroupOptions
- type ResourceClientDeleteEventHubConsumerGroupResponse
- type ResourceClientDeleteResponse
- type ResourceClientExportDevicesOptions
- type ResourceClientExportDevicesResponse
- type ResourceClientGetEndpointHealthOptions
- type ResourceClientGetEndpointHealthResponse
- type ResourceClientGetEventHubConsumerGroupOptions
- type ResourceClientGetEventHubConsumerGroupResponse
- type ResourceClientGetJobOptions
- type ResourceClientGetJobResponse
- type ResourceClientGetKeysForKeyNameOptions
- type ResourceClientGetKeysForKeyNameResponse
- type ResourceClientGetOptions
- type ResourceClientGetQuotaMetricsOptions
- type ResourceClientGetQuotaMetricsResponse
- type ResourceClientGetResponse
- type ResourceClientGetStatsOptions
- type ResourceClientGetStatsResponse
- type ResourceClientGetValidSKUsOptions
- type ResourceClientGetValidSKUsResponse
- type ResourceClientImportDevicesOptions
- type ResourceClientImportDevicesResponse
- type ResourceClientListByResourceGroupOptions
- type ResourceClientListByResourceGroupResponse
- type ResourceClientListBySubscriptionOptions
- type ResourceClientListBySubscriptionResponse
- type ResourceClientListEventHubConsumerGroupsOptions
- type ResourceClientListEventHubConsumerGroupsResponse
- type ResourceClientListJobsOptions
- type ResourceClientListJobsResponse
- type ResourceClientListKeysOptions
- type ResourceClientListKeysResponse
- type ResourceClientTestAllRoutesOptions
- type ResourceClientTestAllRoutesResponse
- type ResourceClientTestRouteOptions
- type ResourceClientTestRouteResponse
- type ResourceClientUpdateResponse
- type ResourceIdentityType
- type ResourceProviderCommonClient
- type ResourceProviderCommonClientGetSubscriptionQuotaOptions
- type ResourceProviderCommonClientGetSubscriptionQuotaResponse
- type RouteCompilationError
- type RouteErrorPosition
- type RouteErrorRange
- type RouteErrorSeverity
- type RouteProperties
- type RoutingCosmosDBSQLAPIProperties
- type RoutingEndpoints
- type RoutingEventHubProperties
- type RoutingMessage
- type RoutingProperties
- type RoutingServiceBusQueueEndpointProperties
- type RoutingServiceBusTopicEndpointProperties
- type RoutingSource
- type RoutingStorageContainerProperties
- type RoutingStorageContainerPropertiesEncoding
- type RoutingTwin
- type RoutingTwinProperties
- type SKUDescription
- type SKUDescriptionListResult
- type SKUInfo
- type SharedAccessSignatureAuthorizationRule
- type SharedAccessSignatureAuthorizationRuleListResult
- type StorageEndpointProperties
- type SystemData
- type TagsResource
- type TestAllRoutesInput
- type TestAllRoutesResult
- type TestResultStatus
- type TestRouteInput
- type TestRouteResult
- type TestRouteResultDetails
- type UserSubscriptionQuota
- type UserSubscriptionQuotaListResult
Examples ¶
- CertificatesClient.CreateOrUpdate
- CertificatesClient.Delete
- CertificatesClient.GenerateVerificationCode
- CertificatesClient.Get
- CertificatesClient.ListByIotHub
- CertificatesClient.Verify
- Client.BeginManualFailover
- OperationsClient.NewListPager
- PrivateEndpointConnectionsClient.BeginDelete
- PrivateEndpointConnectionsClient.BeginUpdate
- PrivateEndpointConnectionsClient.Get
- PrivateEndpointConnectionsClient.List
- PrivateLinkResourcesClient.Get
- PrivateLinkResourcesClient.List
- ResourceClient.BeginCreateOrUpdate (IotHubResourceAddCosmosDbEndpoint)
- ResourceClient.BeginCreateOrUpdate (IotHubResourceCreateOrUpdate)
- ResourceClient.BeginDelete
- ResourceClient.BeginUpdate
- ResourceClient.CheckNameAvailability
- ResourceClient.CreateEventHubConsumerGroup
- ResourceClient.DeleteEventHubConsumerGroup
- ResourceClient.ExportDevices
- ResourceClient.Get
- ResourceClient.GetEventHubConsumerGroup
- ResourceClient.GetJob
- ResourceClient.GetKeysForKeyName
- ResourceClient.GetStats
- ResourceClient.ImportDevices
- ResourceClient.NewGetEndpointHealthPager
- ResourceClient.NewGetQuotaMetricsPager
- ResourceClient.NewGetValidSKUsPager
- ResourceClient.NewListByResourceGroupPager
- ResourceClient.NewListBySubscriptionPager
- ResourceClient.NewListEventHubConsumerGroupsPager
- ResourceClient.NewListJobsPager
- ResourceClient.NewListKeysPager
- ResourceClient.TestAllRoutes
- ResourceClient.TestRoute
- ResourceProviderCommonClient.GetSubscriptionQuota
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessRights ¶
type AccessRights string
AccessRights - The permissions assigned to the shared access policy.
const ( AccessRightsDeviceConnect AccessRights = "DeviceConnect" AccessRightsRegistryRead AccessRights = "RegistryRead" AccessRightsRegistryReadDeviceConnect AccessRights = "RegistryRead, DeviceConnect" AccessRightsRegistryReadRegistryWrite AccessRights = "RegistryRead, RegistryWrite" AccessRightsRegistryReadRegistryWriteDeviceConnect AccessRights = "RegistryRead, RegistryWrite, DeviceConnect" AccessRightsRegistryReadRegistryWriteServiceConnect AccessRights = "RegistryRead, RegistryWrite, ServiceConnect" AccessRightsRegistryReadRegistryWriteServiceConnectDeviceConnect AccessRights = "RegistryRead, RegistryWrite, ServiceConnect, DeviceConnect" AccessRightsRegistryReadServiceConnect AccessRights = "RegistryRead, ServiceConnect" AccessRightsRegistryReadServiceConnectDeviceConnect AccessRights = "RegistryRead, ServiceConnect, DeviceConnect" AccessRightsRegistryWrite AccessRights = "RegistryWrite" AccessRightsRegistryWriteDeviceConnect AccessRights = "RegistryWrite, DeviceConnect" AccessRightsRegistryWriteServiceConnect AccessRights = "RegistryWrite, ServiceConnect" AccessRightsRegistryWriteServiceConnectDeviceConnect AccessRights = "RegistryWrite, ServiceConnect, DeviceConnect" AccessRightsServiceConnect AccessRights = "ServiceConnect" AccessRightsServiceConnectDeviceConnect AccessRights = "ServiceConnect, DeviceConnect" )
func PossibleAccessRightsValues ¶
func PossibleAccessRightsValues() []AccessRights
PossibleAccessRightsValues returns the possible values for the AccessRights const type.
type ArmIdentity ¶
type ArmIdentity struct { // The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both an implicitly created // identity and a set of user assigned identities. The type 'None' will remove any // identities from the service. Type *ResourceIdentityType // Dictionary of UserAssignedIdentities map[string]*ArmUserIdentity // READ-ONLY; Principal Id PrincipalID *string // READ-ONLY; Tenant Id TenantID *string }
func (ArmIdentity) MarshalJSON ¶
func (a ArmIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ArmIdentity.
func (*ArmIdentity) UnmarshalJSON ¶ added in v1.1.0
func (a *ArmIdentity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ArmIdentity.
type ArmUserIdentity ¶
func (ArmUserIdentity) MarshalJSON ¶ added in v1.1.0
func (a ArmUserIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ArmUserIdentity.
func (*ArmUserIdentity) UnmarshalJSON ¶ added in v1.1.0
func (a *ArmUserIdentity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ArmUserIdentity.
type AuthenticationType ¶
type AuthenticationType string
AuthenticationType - Specifies authentication type being used for connecting to the storage account.
const ( AuthenticationTypeIdentityBased AuthenticationType = "identityBased" AuthenticationTypeKeyBased AuthenticationType = "keyBased" )
func PossibleAuthenticationTypeValues ¶
func PossibleAuthenticationTypeValues() []AuthenticationType
PossibleAuthenticationTypeValues returns the possible values for the AuthenticationType const type.
type Capabilities ¶
type Capabilities string
Capabilities - The capabilities and features enabled for the IoT hub.
const ( CapabilitiesDeviceManagement Capabilities = "DeviceManagement" CapabilitiesNone Capabilities = "None" )
func PossibleCapabilitiesValues ¶
func PossibleCapabilitiesValues() []Capabilities
PossibleCapabilitiesValues returns the possible values for the Capabilities const type.
type Capacity ¶ added in v0.3.0
type Capacity struct { // READ-ONLY; The default number of units. Default *int64 // READ-ONLY; The maximum number of units. Maximum *int64 // READ-ONLY; The minimum number of units. Minimum *int64 // READ-ONLY; The type of the scaling enabled. ScaleType *IotHubScaleType }
Capacity - IoT Hub capacity information.
func (Capacity) MarshalJSON ¶ added in v1.1.0
MarshalJSON implements the json.Marshaller interface for type Capacity.
func (*Capacity) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Capacity.
type CertificateBodyDescription ¶
type CertificateBodyDescription struct { // base-64 representation of the X509 leaf certificate .cer file or just .pem file content. Certificate *string // True indicates that the certificate will be created in verified state and proof of possession will not be required. IsVerified *bool }
CertificateBodyDescription - The JSON-serialized X509 Certificate.
func (CertificateBodyDescription) MarshalJSON ¶ added in v1.1.0
func (c CertificateBodyDescription) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CertificateBodyDescription.
func (*CertificateBodyDescription) UnmarshalJSON ¶ added in v1.1.0
func (c *CertificateBodyDescription) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CertificateBodyDescription.
type CertificateDescription ¶
type CertificateDescription struct { // The description of an X509 CA Certificate. Properties *CertificateProperties // READ-ONLY; The entity tag. Etag *string // READ-ONLY; The resource identifier. ID *string // READ-ONLY; The name of the certificate. Name *string // READ-ONLY; The resource type. Type *string }
CertificateDescription - The X509 Certificate.
func (CertificateDescription) MarshalJSON ¶ added in v1.1.0
func (c CertificateDescription) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CertificateDescription.
func (*CertificateDescription) UnmarshalJSON ¶ added in v1.1.0
func (c *CertificateDescription) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CertificateDescription.
type CertificateListDescription ¶
type CertificateListDescription struct { // The array of Certificate objects. Value []*CertificateDescription }
CertificateListDescription - The JSON-serialized array of Certificate objects.
func (CertificateListDescription) MarshalJSON ¶
func (c CertificateListDescription) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CertificateListDescription.
func (*CertificateListDescription) UnmarshalJSON ¶ added in v1.1.0
func (c *CertificateListDescription) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CertificateListDescription.
type CertificateProperties ¶
type CertificateProperties struct { // The certificate content Certificate *string // Determines whether certificate has been verified. IsVerified *bool // READ-ONLY; The certificate's create date and time. Created *time.Time // READ-ONLY; The certificate's expiration date and time. Expiry *time.Time // READ-ONLY; The certificate's subject name. Subject *string // READ-ONLY; The certificate's thumbprint. Thumbprint *string // READ-ONLY; The certificate's last update date and time. Updated *time.Time }
CertificateProperties - The description of an X509 CA 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 CertificatePropertiesWithNonce ¶
type CertificatePropertiesWithNonce struct { // READ-ONLY; The certificate content Certificate *string // READ-ONLY; The certificate's create date and time. Created *time.Time // READ-ONLY; The certificate's expiration date and time. Expiry *time.Time // READ-ONLY; Determines whether certificate has been verified. IsVerified *bool // READ-ONLY; The certificate's subject name. Subject *string // READ-ONLY; The certificate's thumbprint. Thumbprint *string // READ-ONLY; The certificate's last update date and time. Updated *time.Time // READ-ONLY; The certificate's verification code that will be used for proof of possession. VerificationCode *string }
CertificatePropertiesWithNonce - The description of an X509 CA Certificate including the challenge nonce issued for the Proof-Of-Possession flow.
func (CertificatePropertiesWithNonce) MarshalJSON ¶
func (c CertificatePropertiesWithNonce) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CertificatePropertiesWithNonce.
func (*CertificatePropertiesWithNonce) UnmarshalJSON ¶
func (c *CertificatePropertiesWithNonce) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CertificatePropertiesWithNonce.
type CertificateVerificationDescription ¶
type CertificateVerificationDescription struct { // base-64 representation of X509 certificate .cer file or just .pem file content. Certificate *string }
CertificateVerificationDescription - The JSON-serialized leaf certificate
func (CertificateVerificationDescription) MarshalJSON ¶ added in v1.1.0
func (c CertificateVerificationDescription) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CertificateVerificationDescription.
func (*CertificateVerificationDescription) UnmarshalJSON ¶ added in v1.1.0
func (c *CertificateVerificationDescription) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CertificateVerificationDescription.
type CertificateWithNonceDescription ¶
type CertificateWithNonceDescription struct { // The description of an X509 CA Certificate including the challenge nonce issued for the Proof-Of-Possession flow. Properties *CertificatePropertiesWithNonce // READ-ONLY; The entity tag. Etag *string // READ-ONLY; The resource identifier. ID *string // READ-ONLY; The name of the certificate. Name *string // READ-ONLY; The resource type. Type *string }
CertificateWithNonceDescription - The X509 Certificate.
func (CertificateWithNonceDescription) MarshalJSON ¶ added in v1.1.0
func (c CertificateWithNonceDescription) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CertificateWithNonceDescription.
func (*CertificateWithNonceDescription) UnmarshalJSON ¶ added in v1.1.0
func (c *CertificateWithNonceDescription) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CertificateWithNonceDescription.
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 subscription identifier.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*CertificatesClient) CreateOrUpdate ¶
func (client *CertificatesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, certificateName string, certificateDescription CertificateDescription, options *CertificatesClientCreateOrUpdateOptions) (CertificatesClientCreateOrUpdateResponse, error)
CreateOrUpdate - Adds new or replaces existing certificate. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-06-30
- resourceGroupName - The name of the resource group that contains the IoT hub.
- resourceName - The name of the IoT hub.
- certificateName - The name of the certificate
- certificateDescription - The certificate body.
- options - CertificatesClientCreateOrUpdateOptions contains the optional parameters for the CertificatesClient.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/32c178f2467f792a322f56174be244135d2c907f/specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_certificatescreateorupdate.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/iothub/armiothub" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armiothub.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewCertificatesClient().CreateOrUpdate(ctx, "myResourceGroup", "iothub", "cert", armiothub.CertificateDescription{ Properties: &armiothub.CertificateProperties{ Certificate: to.Ptr("############################################"), }, }, &armiothub.CertificatesClientCreateOrUpdateOptions{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.CertificateDescription = armiothub.CertificateDescription{ // Name: to.Ptr("cert"), // Type: to.Ptr("Microsoft.Devices/IotHubs/Certificates"), // Etag: to.Ptr("AAAAAAExpNs="), // ID: to.Ptr("/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/ProvisioningServives/myFirstProvisioningService/certificates/cert"), // Properties: &armiothub.CertificateProperties{ // Certificate: to.Ptr("############################################"), // Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC1123, "2017-10-12T19:23:50.000Z"); return t}()), // Expiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC1123, "2039-12-31T23:59:59.000Z"); return t}()), // IsVerified: to.Ptr(false), // Subject: to.Ptr("CN=testdevice1"), // Thumbprint: to.Ptr("97388663832D0393C9246CAB4FBA2C8677185A25"), // Updated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC1123, "2017-10-12T19:23:50.000Z"); return t}()), // }, // } }
Output:
func (*CertificatesClient) Delete ¶
func (client *CertificatesClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, certificateName string, ifMatch string, options *CertificatesClientDeleteOptions) (CertificatesClientDeleteResponse, error)
Delete - Deletes an existing X509 certificate or does nothing if it does not exist. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-06-30
- resourceGroupName - The name of the resource group that contains the IoT hub.
- resourceName - The name of the IoT hub.
- certificateName - The name of the certificate
- ifMatch - ETag of the Certificate.
- options - CertificatesClientDeleteOptions contains the optional parameters for the CertificatesClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/32c178f2467f792a322f56174be244135d2c907f/specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_certificatesdelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armiothub.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewCertificatesClient().Delete(ctx, "myResourceGroup", "myhub", "cert", "AAAAAAAADGk=", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*CertificatesClient) GenerateVerificationCode ¶
func (client *CertificatesClient) GenerateVerificationCode(ctx context.Context, resourceGroupName string, resourceName string, certificateName string, ifMatch string, options *CertificatesClientGenerateVerificationCodeOptions) (CertificatesClientGenerateVerificationCodeResponse, error)
GenerateVerificationCode - Generates verification code for proof of possession flow. The verification code will be used to generate a leaf certificate. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-06-30
- resourceGroupName - The name of the resource group that contains the IoT hub.
- resourceName - The name of the IoT hub.
- certificateName - The name of the certificate
- ifMatch - ETag of the Certificate.
- options - CertificatesClientGenerateVerificationCodeOptions contains the optional parameters for the CertificatesClient.GenerateVerificationCode method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/32c178f2467f792a322f56174be244135d2c907f/specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_generateverificationcode.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armiothub.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewCertificatesClient().GenerateVerificationCode(ctx, "myResourceGroup", "testHub", "cert", "AAAAAAAADGk=", 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.CertificateWithNonceDescription = armiothub.CertificateWithNonceDescription{ // Name: to.Ptr("cert"), // Properties: &armiothub.CertificatePropertiesWithNonce{ // Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC1123, "2017-10-12T19:23:50.000Z"); return t}()), // Expiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC1123, "2039-12-31T23:59:59.000Z"); return t}()), // IsVerified: to.Ptr(false), // Subject: to.Ptr("CN=andbucdevice1"), // Thumbprint: to.Ptr("##############################"), // Updated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC1123, "2017-10-12T19:26:56.000Z"); return t}()), // VerificationCode: to.Ptr("##################################"), // }, // } }
Output:
func (*CertificatesClient) Get ¶
func (client *CertificatesClient) Get(ctx context.Context, resourceGroupName string, resourceName string, certificateName string, options *CertificatesClientGetOptions) (CertificatesClientGetResponse, error)
Get - Returns the certificate. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-06-30
- resourceGroupName - The name of the resource group that contains the IoT hub.
- resourceName - The name of the IoT hub.
- certificateName - The name of the 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/32c178f2467f792a322f56174be244135d2c907f/specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_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/iothub/armiothub" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armiothub.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewCertificatesClient().Get(ctx, "myResourceGroup", "testhub", "cert", 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.CertificateDescription = armiothub.CertificateDescription{ // Name: to.Ptr("cert"), // Type: to.Ptr("Microsoft.Devices/IotHubs/Certificates"), // Etag: to.Ptr("AAAAAAExpNs="), // ID: to.Ptr("/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/andbuc-hub/certificates/cert"), // Properties: &armiothub.CertificateProperties{ // Certificate: to.Ptr("############################################"), // Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC1123, "2017-10-12T19:23:50.000Z"); return t}()), // Expiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC1123, "2039-12-31T23:59:59.000Z"); return t}()), // IsVerified: to.Ptr(false), // Subject: to.Ptr("CN=testdevice1"), // Thumbprint: to.Ptr("97388663832D0393C9246CAB4FBA2C8677185A25"), // Updated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC1123, "2017-10-12T19:23:50.000Z"); return t}()), // }, // } }
Output:
func (*CertificatesClient) ListByIotHub ¶
func (client *CertificatesClient) ListByIotHub(ctx context.Context, resourceGroupName string, resourceName string, options *CertificatesClientListByIotHubOptions) (CertificatesClientListByIotHubResponse, error)
ListByIotHub - Returns the list of certificates. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-06-30
- resourceGroupName - The name of the resource group that contains the IoT hub.
- resourceName - The name of the IoT hub.
- options - CertificatesClientListByIotHubOptions contains the optional parameters for the CertificatesClient.ListByIotHub method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/32c178f2467f792a322f56174be244135d2c907f/specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_listcertificates.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armiothub.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewCertificatesClient().ListByIotHub(ctx, "myResourceGroup", "testhub", 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.CertificateListDescription = armiothub.CertificateListDescription{ // Value: []*armiothub.CertificateDescription{ // { // Name: to.Ptr("cert"), // Type: to.Ptr("Microsoft.Devices/IotHubs/Certificates"), // Etag: to.Ptr("AAAAAAExpNs="), // ID: to.Ptr("/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/andbuc-hub/certificates/cert"), // Properties: &armiothub.CertificateProperties{ // Certificate: to.Ptr("############################################"), // Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC1123, "2017-10-12T19:23:50.000Z"); return t}()), // Expiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC1123, "2039-12-31T23:59:59.000Z"); return t}()), // IsVerified: to.Ptr(false), // Subject: to.Ptr("CN=testdevice1"), // Thumbprint: to.Ptr("97388663832D0393C9246CAB4FBA2C8677185A25"), // Updated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC1123, "2017-10-12T19:23:50.000Z"); return t}()), // }, // }}, // } }
Output:
func (*CertificatesClient) Verify ¶
func (client *CertificatesClient) Verify(ctx context.Context, resourceGroupName string, resourceName string, certificateName string, ifMatch string, certificateVerificationBody CertificateVerificationDescription, options *CertificatesClientVerifyOptions) (CertificatesClientVerifyResponse, error)
Verify - Verifies the certificate's private key possession by providing the leaf cert issued by the verifying pre uploaded certificate. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-06-30
- resourceGroupName - The name of the resource group that contains the IoT hub.
- resourceName - The name of the IoT hub.
- certificateName - The name of the certificate
- ifMatch - ETag of the Certificate.
- certificateVerificationBody - The name of the certificate
- options - CertificatesClientVerifyOptions contains the optional parameters for the CertificatesClient.Verify method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/32c178f2467f792a322f56174be244135d2c907f/specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_certverify.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/iothub/armiothub" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armiothub.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewCertificatesClient().Verify(ctx, "myResourceGroup", "myFirstProvisioningService", "cert", "AAAAAAAADGk=", armiothub.CertificateVerificationDescription{ Certificate: to.Ptr("#####################################"), }, 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.CertificateDescription = armiothub.CertificateDescription{ // Name: to.Ptr("cert"), // Type: to.Ptr("Microsoft.Devices/IotHubs/Certificates"), // Etag: to.Ptr("AAAAAAExpTQ="), // ID: to.Ptr("/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/ProvisioningServices/myFirstProvisioningService/certificates/cert"), // Properties: &armiothub.CertificateProperties{ // Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC1123, "2017-10-12T19:23:50.000Z"); return t}()), // Expiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC1123, "2039-12-31T23:59:59.000Z"); return t}()), // IsVerified: to.Ptr(true), // Subject: to.Ptr("CN=andbucdevice1"), // Thumbprint: to.Ptr("97388663832D0393C9246CAB4FBA2C8677185A25"), // Updated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC1123, "2017-10-12T19:26:56.000Z"); return t}()), // }, // } }
Output:
type CertificatesClientCreateOrUpdateOptions ¶ added in v0.3.0
type CertificatesClientCreateOrUpdateOptions struct { // ETag of the Certificate. Do not specify for creating a brand new certificate. Required to update an existing certificate. IfMatch *string }
CertificatesClientCreateOrUpdateOptions contains the optional parameters for the CertificatesClient.CreateOrUpdate method.
type CertificatesClientCreateOrUpdateResponse ¶ added in v0.3.0
type CertificatesClientCreateOrUpdateResponse struct { // The X509 Certificate. CertificateDescription }
CertificatesClientCreateOrUpdateResponse contains the response from method CertificatesClient.CreateOrUpdate.
type CertificatesClientDeleteOptions ¶ added in v0.3.0
type CertificatesClientDeleteOptions struct { }
CertificatesClientDeleteOptions contains the optional parameters for the CertificatesClient.Delete method.
type CertificatesClientDeleteResponse ¶ added in v0.3.0
type CertificatesClientDeleteResponse struct { }
CertificatesClientDeleteResponse contains the response from method CertificatesClient.Delete.
type CertificatesClientGenerateVerificationCodeOptions ¶ added in v0.3.0
type CertificatesClientGenerateVerificationCodeOptions struct { }
CertificatesClientGenerateVerificationCodeOptions contains the optional parameters for the CertificatesClient.GenerateVerificationCode method.
type CertificatesClientGenerateVerificationCodeResponse ¶ added in v0.3.0
type CertificatesClientGenerateVerificationCodeResponse struct { // The X509 Certificate. CertificateWithNonceDescription }
CertificatesClientGenerateVerificationCodeResponse contains the response from method CertificatesClient.GenerateVerificationCode.
type CertificatesClientGetOptions ¶ added in v0.3.0
type CertificatesClientGetOptions struct { }
CertificatesClientGetOptions contains the optional parameters for the CertificatesClient.Get method.
type CertificatesClientGetResponse ¶ added in v0.3.0
type CertificatesClientGetResponse struct { // The X509 Certificate. CertificateDescription }
CertificatesClientGetResponse contains the response from method CertificatesClient.Get.
type CertificatesClientListByIotHubOptions ¶ added in v0.3.0
type CertificatesClientListByIotHubOptions struct { }
CertificatesClientListByIotHubOptions contains the optional parameters for the CertificatesClient.ListByIotHub method.
type CertificatesClientListByIotHubResponse ¶ added in v0.3.0
type CertificatesClientListByIotHubResponse struct { // The JSON-serialized array of Certificate objects. CertificateListDescription }
CertificatesClientListByIotHubResponse contains the response from method CertificatesClient.ListByIotHub.
type CertificatesClientVerifyOptions ¶ added in v0.3.0
type CertificatesClientVerifyOptions struct { }
CertificatesClientVerifyOptions contains the optional parameters for the CertificatesClient.Verify method.
type CertificatesClientVerifyResponse ¶ added in v0.3.0
type CertificatesClientVerifyResponse struct { // The X509 Certificate. CertificateDescription }
CertificatesClientVerifyResponse contains the response from method CertificatesClient.Verify.
type Client ¶ added in v0.3.0
type Client struct {
// contains filtered or unexported fields
}
Client contains the methods for the IotHub group. Don't use this type directly, use NewClient() instead.
func NewClient ¶ added in v0.3.0
func NewClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*Client, error)
NewClient creates a new instance of Client 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 (*Client) BeginManualFailover ¶ added in v0.3.0
func (client *Client) BeginManualFailover(ctx context.Context, iotHubName string, resourceGroupName string, failoverInput FailoverInput, options *ClientBeginManualFailoverOptions) (*runtime.Poller[ClientManualFailoverResponse], error)
BeginManualFailover - Manually initiate a failover for the IoT Hub to its secondary region. To learn more, see https://aka.ms/manualfailover If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-06-30
- iotHubName - Name of the IoT hub to failover
- resourceGroupName - Name of the resource group containing the IoT hub resource
- failoverInput - Region to failover to. Must be the Azure paired region. Get the value from the secondary location in the locations property. To learn more, see https://aka.ms/manualfailover/region
- options - ClientBeginManualFailoverOptions contains the optional parameters for the Client.BeginManualFailover method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/32c178f2467f792a322f56174be244135d2c907f/specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/IotHub_ManualFailover.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/iothub/armiothub" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armiothub.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewClient().BeginManualFailover(ctx, "testHub", "myResourceGroup", armiothub.FailoverInput{ FailoverRegion: to.Ptr("testHub"), }, 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:
type ClientBeginManualFailoverOptions ¶ added in v0.3.0
type ClientBeginManualFailoverOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ClientBeginManualFailoverOptions contains the optional parameters for the Client.BeginManualFailover method.
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) NewCertificatesClient ¶ added in v1.1.0
func (c *ClientFactory) NewCertificatesClient() *CertificatesClient
NewCertificatesClient creates a new instance of CertificatesClient.
func (*ClientFactory) NewClient ¶ added in v1.1.0
func (c *ClientFactory) NewClient() *Client
NewClient creates a new instance of Client.
func (*ClientFactory) NewOperationsClient ¶ added in v1.1.0
func (c *ClientFactory) NewOperationsClient() *OperationsClient
NewOperationsClient creates a new instance of OperationsClient.
func (*ClientFactory) NewPrivateEndpointConnectionsClient ¶ added in v1.1.0
func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient
NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient.
func (*ClientFactory) NewPrivateLinkResourcesClient ¶ added in v1.1.0
func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient
NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient.
func (*ClientFactory) NewResourceClient ¶ added in v1.1.0
func (c *ClientFactory) NewResourceClient() *ResourceClient
NewResourceClient creates a new instance of ResourceClient.
func (*ClientFactory) NewResourceProviderCommonClient ¶ added in v1.1.0
func (c *ClientFactory) NewResourceProviderCommonClient() *ResourceProviderCommonClient
NewResourceProviderCommonClient creates a new instance of ResourceProviderCommonClient.
type ClientManualFailoverResponse ¶ added in v0.3.0
type ClientManualFailoverResponse struct { }
ClientManualFailoverResponse contains the response from method Client.BeginManualFailover.
type CloudToDeviceProperties ¶
type CloudToDeviceProperties struct { // The default time to live for cloud-to-device messages in the device queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. DefaultTTLAsIso8601 *string // The properties of the feedback queue for cloud-to-device messages. Feedback *FeedbackProperties // The max delivery count for cloud-to-device messages in the device queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. MaxDeliveryCount *int32 }
CloudToDeviceProperties - The IoT hub cloud-to-device messaging properties.
func (CloudToDeviceProperties) MarshalJSON ¶ added in v1.1.0
func (c CloudToDeviceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CloudToDeviceProperties.
func (*CloudToDeviceProperties) UnmarshalJSON ¶ added in v1.1.0
func (c *CloudToDeviceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CloudToDeviceProperties.
type CreatedByType ¶ added in v0.4.0
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 ¶ added in v0.4.0
func PossibleCreatedByTypeValues() []CreatedByType
PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.
type DefaultAction ¶
type DefaultAction string
DefaultAction - Default Action for Network Rule Set
const ( DefaultActionAllow DefaultAction = "Allow" DefaultActionDeny DefaultAction = "Deny" )
func PossibleDefaultActionValues ¶
func PossibleDefaultActionValues() []DefaultAction
PossibleDefaultActionValues returns the possible values for the DefaultAction const type.
type Description ¶ added in v0.3.0
type Description struct { // REQUIRED; The resource location. Location *string // REQUIRED; IotHub SKU info SKU *SKUInfo // 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 managed identities for the IotHub. Identity *ArmIdentity // IotHub properties Properties *Properties // The resource tags. Tags map[string]*string // READ-ONLY; The resource identifier. ID *string // READ-ONLY; The resource name. Name *string // READ-ONLY; The system meta data relating to this resource. SystemData *SystemData // READ-ONLY; The resource type. Type *string }
Description - The description of the IoT hub.
func (Description) MarshalJSON ¶ added in v0.3.0
func (d Description) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type Description.
func (*Description) UnmarshalJSON ¶ added in v1.1.0
func (d *Description) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type Description.
type DescriptionListResult ¶ added in v0.3.0
type DescriptionListResult struct { // The array of IotHubDescription objects. Value []*Description // READ-ONLY; The next link. NextLink *string }
DescriptionListResult - The JSON-serialized array of IotHubDescription objects with a next link.
func (DescriptionListResult) MarshalJSON ¶ added in v0.3.0
func (d DescriptionListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DescriptionListResult.
func (*DescriptionListResult) UnmarshalJSON ¶ added in v1.1.0
func (d *DescriptionListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DescriptionListResult.
type EndpointHealthData ¶
type EndpointHealthData struct { // Id of the endpoint EndpointID *string // Health statuses have following meanings. The 'healthy' status shows that the endpoint is accepting messages as expected. // The 'unhealthy' status shows that the endpoint is not accepting messages as // expected and IoT Hub is retrying to send data to this endpoint. The status of an unhealthy endpoint will be updated to // healthy when IoT Hub has established an eventually consistent state of health. // The 'dead' status shows that the endpoint is not accepting messages, after IoT Hub retried sending messages for the retrial // period. See IoT Hub metrics to identify errors and monitor issues with // endpoints. The 'unknown' status shows that the IoT Hub has not established a connection with the endpoint. No messages // have been delivered to or rejected from this endpoint HealthStatus *EndpointHealthStatus // Last error obtained when a message failed to be delivered to iot hub LastKnownError *string // Time at which the last known error occurred LastKnownErrorTime *time.Time // Last time iot hub tried to send a message to the endpoint LastSendAttemptTime *time.Time // Last time iot hub successfully sent a message to the endpoint LastSuccessfulSendAttemptTime *time.Time }
EndpointHealthData - The health data for an endpoint
func (EndpointHealthData) MarshalJSON ¶
func (e EndpointHealthData) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EndpointHealthData.
func (*EndpointHealthData) UnmarshalJSON ¶
func (e *EndpointHealthData) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type EndpointHealthData.
type EndpointHealthDataListResult ¶
type EndpointHealthDataListResult struct { // JSON-serialized array of Endpoint health data Value []*EndpointHealthData // READ-ONLY; Link to more results NextLink *string }
EndpointHealthDataListResult - The JSON-serialized array of EndpointHealthData objects with a next link.
func (EndpointHealthDataListResult) MarshalJSON ¶
func (e EndpointHealthDataListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EndpointHealthDataListResult.
func (*EndpointHealthDataListResult) UnmarshalJSON ¶ added in v1.1.0
func (e *EndpointHealthDataListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type EndpointHealthDataListResult.
type EndpointHealthStatus ¶
type EndpointHealthStatus string
EndpointHealthStatus - Health statuses have following meanings. The 'healthy' status shows that the endpoint is accepting messages as expected. The 'unhealthy' status shows that the endpoint is not accepting messages as expected and IoT Hub is retrying to send data to this endpoint. The status of an unhealthy endpoint will be updated to healthy when IoT Hub has established an eventually consistent state of health. The 'dead' status shows that the endpoint is not accepting messages, after IoT Hub retried sending messages for the retrial period. See IoT Hub metrics to identify errors and monitor issues with endpoints. The 'unknown' status shows that the IoT Hub has not established a connection with the endpoint. No messages have been delivered to or rejected from this endpoint
const ( EndpointHealthStatusDead EndpointHealthStatus = "dead" EndpointHealthStatusDegraded EndpointHealthStatus = "degraded" EndpointHealthStatusHealthy EndpointHealthStatus = "healthy" EndpointHealthStatusUnhealthy EndpointHealthStatus = "unhealthy" EndpointHealthStatusUnknown EndpointHealthStatus = "unknown" )
func PossibleEndpointHealthStatusValues ¶
func PossibleEndpointHealthStatusValues() []EndpointHealthStatus
PossibleEndpointHealthStatusValues returns the possible values for the EndpointHealthStatus const type.
type EnrichmentProperties ¶
type EnrichmentProperties struct { // REQUIRED; The list of endpoints for which the enrichment is applied to the message. EndpointNames []*string // REQUIRED; The key or name for the enrichment property. Key *string // REQUIRED; The value for the enrichment property. Value *string }
EnrichmentProperties - The properties of an enrichment that your IoT hub applies to messages delivered to endpoints.
func (EnrichmentProperties) MarshalJSON ¶
func (e EnrichmentProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EnrichmentProperties.
func (*EnrichmentProperties) UnmarshalJSON ¶ added in v1.1.0
func (e *EnrichmentProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type EnrichmentProperties.
type ErrorDetails ¶
type ErrorDetails struct { // READ-ONLY; The error code. Code *string // READ-ONLY; The error details. Details *string // READ-ONLY; The HTTP status code. HTTPStatusCode *string // READ-ONLY; The error message. Message *string }
ErrorDetails - Error details.
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 EventHubConsumerGroupBodyDescription ¶
type EventHubConsumerGroupBodyDescription struct { // REQUIRED; The EventHub consumer group name. Properties *EventHubConsumerGroupName }
EventHubConsumerGroupBodyDescription - The EventHub consumer group.
func (EventHubConsumerGroupBodyDescription) MarshalJSON ¶ added in v1.1.0
func (e EventHubConsumerGroupBodyDescription) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EventHubConsumerGroupBodyDescription.
func (*EventHubConsumerGroupBodyDescription) UnmarshalJSON ¶ added in v1.1.0
func (e *EventHubConsumerGroupBodyDescription) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type EventHubConsumerGroupBodyDescription.
type EventHubConsumerGroupInfo ¶
type EventHubConsumerGroupInfo struct { // The tags. Properties map[string]any // READ-ONLY; The etag. Etag *string // READ-ONLY; The Event Hub-compatible consumer group identifier. ID *string // READ-ONLY; The Event Hub-compatible consumer group name. Name *string // READ-ONLY; the resource type. Type *string }
EventHubConsumerGroupInfo - The properties of the EventHubConsumerGroupInfo object.
func (EventHubConsumerGroupInfo) MarshalJSON ¶
func (e EventHubConsumerGroupInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EventHubConsumerGroupInfo.
func (*EventHubConsumerGroupInfo) UnmarshalJSON ¶ added in v1.1.0
func (e *EventHubConsumerGroupInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type EventHubConsumerGroupInfo.
type EventHubConsumerGroupName ¶
type EventHubConsumerGroupName struct { // REQUIRED; EventHub consumer group name Name *string }
EventHubConsumerGroupName - The EventHub consumer group name.
func (EventHubConsumerGroupName) MarshalJSON ¶ added in v1.1.0
func (e EventHubConsumerGroupName) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EventHubConsumerGroupName.
func (*EventHubConsumerGroupName) UnmarshalJSON ¶ added in v1.1.0
func (e *EventHubConsumerGroupName) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type EventHubConsumerGroupName.
type EventHubConsumerGroupsListResult ¶
type EventHubConsumerGroupsListResult struct { // List of consumer groups objects Value []*EventHubConsumerGroupInfo // READ-ONLY; The next link. NextLink *string }
EventHubConsumerGroupsListResult - The JSON-serialized array of Event Hub-compatible consumer group names with a next link.
func (EventHubConsumerGroupsListResult) MarshalJSON ¶
func (e EventHubConsumerGroupsListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EventHubConsumerGroupsListResult.
func (*EventHubConsumerGroupsListResult) UnmarshalJSON ¶ added in v1.1.0
func (e *EventHubConsumerGroupsListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type EventHubConsumerGroupsListResult.
type EventHubProperties ¶
type EventHubProperties struct { // The number of partitions for receiving device-to-cloud messages in the Event Hub-compatible endpoint. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages. PartitionCount *int32 // The retention time for device-to-cloud messages in days. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages RetentionTimeInDays *int64 // READ-ONLY; The Event Hub-compatible endpoint. Endpoint *string // READ-ONLY; The partition ids in the Event Hub-compatible endpoint. PartitionIDs []*string // READ-ONLY; The Event Hub-compatible name. Path *string }
EventHubProperties - The properties of the provisioned Event Hub-compatible endpoint used by the IoT hub.
func (EventHubProperties) MarshalJSON ¶
func (e EventHubProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EventHubProperties.
func (*EventHubProperties) UnmarshalJSON ¶ added in v1.1.0
func (e *EventHubProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type EventHubProperties.
type ExportDevicesRequest ¶
type ExportDevicesRequest struct { // REQUIRED; The value indicating whether keys should be excluded during export. ExcludeKeys *bool // REQUIRED; The export blob container URI. ExportBlobContainerURI *string // Specifies authentication type being used for connecting to the storage account. AuthenticationType *AuthenticationType // The name of the blob that will be created in the provided output blob container. This blob will contain the exported configurations // for the Iot Hub. ConfigurationsBlobName *string // The name of the blob that will be created in the provided output blob container. This blob will contain the exported device // registry information for the IoT Hub. ExportBlobName *string // Managed identity properties of storage endpoint for export devices. Identity *ManagedIdentity // The value indicating whether configurations should be exported. IncludeConfigurations *bool }
ExportDevicesRequest - Use to provide parameters when requesting an export of all devices in the IoT hub.
func (ExportDevicesRequest) MarshalJSON ¶ added in v1.1.0
func (e ExportDevicesRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ExportDevicesRequest.
func (*ExportDevicesRequest) UnmarshalJSON ¶ added in v1.1.0
func (e *ExportDevicesRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ExportDevicesRequest.
type FailoverInput ¶
type FailoverInput struct { // REQUIRED; Region the hub will be failed over to FailoverRegion *string }
FailoverInput - Use to provide failover region when requesting manual Failover for a hub.
func (FailoverInput) MarshalJSON ¶ added in v1.1.0
func (f FailoverInput) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FailoverInput.
func (*FailoverInput) UnmarshalJSON ¶ added in v1.1.0
func (f *FailoverInput) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FailoverInput.
type FallbackRouteProperties ¶
type FallbackRouteProperties struct { // REQUIRED; The list of endpoints to which the messages that satisfy the condition are routed to. Currently only 1 endpoint // is allowed. EndpointNames []*string // REQUIRED; Used to specify whether the fallback route is enabled. IsEnabled *bool // REQUIRED; The source to which the routing rule is to be applied to. For example, DeviceMessages Source *RoutingSource // The condition which is evaluated in order to apply the fallback route. If the condition is not provided it will evaluate // to true by default. For grammar, See: // https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language Condition *string // The name of the route. The name can only include alphanumeric characters, periods, underscores, hyphens, has a maximum // length of 64 characters, and must be unique. Name *string }
FallbackRouteProperties - The properties of the fallback route. IoT Hub uses these properties when it routes messages to the fallback endpoint.
func (FallbackRouteProperties) MarshalJSON ¶
func (f FallbackRouteProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FallbackRouteProperties.
func (*FallbackRouteProperties) UnmarshalJSON ¶ added in v1.1.0
func (f *FallbackRouteProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FallbackRouteProperties.
type FeedbackProperties ¶
type FeedbackProperties struct { // The lock duration for the feedback queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. LockDurationAsIso8601 *string // The number of times the IoT hub attempts to deliver a message on the feedback queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. MaxDeliveryCount *int32 // The period of time for which a message is available to consume before it is expired by the IoT hub. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. TTLAsIso8601 *string }
FeedbackProperties - The properties of the feedback queue for cloud-to-device messages.
func (FeedbackProperties) MarshalJSON ¶ added in v1.1.0
func (f FeedbackProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FeedbackProperties.
func (*FeedbackProperties) UnmarshalJSON ¶ added in v1.1.0
func (f *FeedbackProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FeedbackProperties.
type GroupIDInformation ¶
type GroupIDInformation struct { // REQUIRED; The properties for a group information object Properties *GroupIDInformationProperties // READ-ONLY; The resource identifier. ID *string // READ-ONLY; The resource name. Name *string // READ-ONLY; The resource type. Type *string }
GroupIDInformation - The group information for creating a private endpoint on an IotHub
func (GroupIDInformation) MarshalJSON ¶ added in v1.1.0
func (g GroupIDInformation) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GroupIDInformation.
func (*GroupIDInformation) UnmarshalJSON ¶ added in v1.1.0
func (g *GroupIDInformation) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GroupIDInformation.
type GroupIDInformationProperties ¶
type GroupIDInformationProperties struct { // The group id GroupID *string // The required members for a specific group id RequiredMembers []*string // The required DNS zones for a specific group id RequiredZoneNames []*string }
GroupIDInformationProperties - The properties for a group information object
func (GroupIDInformationProperties) MarshalJSON ¶
func (g GroupIDInformationProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GroupIDInformationProperties.
func (*GroupIDInformationProperties) UnmarshalJSON ¶ added in v1.1.0
func (g *GroupIDInformationProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GroupIDInformationProperties.
type IPFilterActionType ¶
type IPFilterActionType string
IPFilterActionType - The desired action for requests captured by this rule.
const ( IPFilterActionTypeAccept IPFilterActionType = "Accept" IPFilterActionTypeReject IPFilterActionType = "Reject" )
func PossibleIPFilterActionTypeValues ¶
func PossibleIPFilterActionTypeValues() []IPFilterActionType
PossibleIPFilterActionTypeValues returns the possible values for the IPFilterActionType const type.
type IPFilterRule ¶
type IPFilterRule struct { // REQUIRED; The desired action for requests captured by this rule. Action *IPFilterActionType // REQUIRED; The name of the IP filter rule. FilterName *string // REQUIRED; A string that contains the IP address range in CIDR notation for the rule. IPMask *string }
IPFilterRule - The IP filter rules for the IoT hub.
func (IPFilterRule) MarshalJSON ¶ added in v1.1.0
func (i IPFilterRule) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type IPFilterRule.
func (*IPFilterRule) UnmarshalJSON ¶ added in v1.1.0
func (i *IPFilterRule) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type IPFilterRule.
type ImportDevicesRequest ¶
type ImportDevicesRequest struct { // REQUIRED; The input blob container URI. InputBlobContainerURI *string // REQUIRED; The output blob container URI. OutputBlobContainerURI *string // Specifies authentication type being used for connecting to the storage account. AuthenticationType *AuthenticationType // The blob name to be used when importing configurations from the provided input blob container. ConfigurationsBlobName *string // Managed identity properties of storage endpoint for import devices. Identity *ManagedIdentity // The value indicating whether configurations should be imported. IncludeConfigurations *bool // The blob name to be used when importing from the provided input blob container. InputBlobName *string // The blob name to use for storing the status of the import job. OutputBlobName *string }
ImportDevicesRequest - Use to provide parameters when requesting an import of all devices in the hub.
func (ImportDevicesRequest) MarshalJSON ¶ added in v1.1.0
func (i ImportDevicesRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImportDevicesRequest.
func (*ImportDevicesRequest) UnmarshalJSON ¶ added in v1.1.0
func (i *ImportDevicesRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImportDevicesRequest.
type IotHubNameUnavailabilityReason ¶
type IotHubNameUnavailabilityReason string
IotHubNameUnavailabilityReason - The reason for unavailability.
const ()
func PossibleIotHubNameUnavailabilityReasonValues ¶
func PossibleIotHubNameUnavailabilityReasonValues() []IotHubNameUnavailabilityReason
PossibleIotHubNameUnavailabilityReasonValues returns the possible values for the IotHubNameUnavailabilityReason const type.
type IotHubReplicaRoleType ¶
type IotHubReplicaRoleType string
IotHubReplicaRoleType - The role of the region, can be either primary or secondary. The primary region is where the IoT hub is currently provisioned. The secondary region is the Azure disaster recovery (DR) paired region and also the region where the IoT hub can failover to.
const ( IotHubReplicaRoleTypePrimary IotHubReplicaRoleType = "primary" IotHubReplicaRoleTypeSecondary IotHubReplicaRoleType = "secondary" )
func PossibleIotHubReplicaRoleTypeValues ¶
func PossibleIotHubReplicaRoleTypeValues() []IotHubReplicaRoleType
PossibleIotHubReplicaRoleTypeValues returns the possible values for the IotHubReplicaRoleType const type.
type IotHubSKU ¶
type IotHubSKU string
IotHubSKU - The name of the SKU.
func PossibleIotHubSKUValues ¶
func PossibleIotHubSKUValues() []IotHubSKU
PossibleIotHubSKUValues returns the possible values for the IotHubSKU const type.
type IotHubSKUTier ¶
type IotHubSKUTier string
IotHubSKUTier - The billing tier for the IoT hub.
const ( IotHubSKUTierBasic IotHubSKUTier = "Basic" IotHubSKUTierFree IotHubSKUTier = "Free" IotHubSKUTierStandard IotHubSKUTier = "Standard" )
func PossibleIotHubSKUTierValues ¶
func PossibleIotHubSKUTierValues() []IotHubSKUTier
PossibleIotHubSKUTierValues returns the possible values for the IotHubSKUTier const type.
type IotHubScaleType ¶
type IotHubScaleType string
IotHubScaleType - The type of the scaling enabled.
const ( IotHubScaleTypeAutomatic IotHubScaleType = "Automatic" IotHubScaleTypeManual IotHubScaleType = "Manual" IotHubScaleTypeNone IotHubScaleType = "None" )
func PossibleIotHubScaleTypeValues ¶
func PossibleIotHubScaleTypeValues() []IotHubScaleType
PossibleIotHubScaleTypeValues returns the possible values for the IotHubScaleType const type.
type JobResponse ¶
type JobResponse struct { // READ-ONLY; The time the job stopped processing. EndTimeUTC *time.Time // READ-ONLY; If status == failed, this string containing the reason for the failure. FailureReason *string // READ-ONLY; The job identifier. JobID *string // READ-ONLY; The job identifier of the parent job, if any. ParentJobID *string // READ-ONLY; The start time of the job. StartTimeUTC *time.Time // READ-ONLY; The status of the job. Status *JobStatus // READ-ONLY; The status message for the job. StatusMessage *string // READ-ONLY; The type of the job. Type *JobType }
JobResponse - The properties of the Job Response object.
func (JobResponse) MarshalJSON ¶
func (j JobResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type JobResponse.
func (*JobResponse) UnmarshalJSON ¶
func (j *JobResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type JobResponse.
type JobResponseListResult ¶
type JobResponseListResult struct { // The array of JobResponse objects. Value []*JobResponse // READ-ONLY; The next link. NextLink *string }
JobResponseListResult - The JSON-serialized array of JobResponse objects with a next link.
func (JobResponseListResult) MarshalJSON ¶
func (j JobResponseListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type JobResponseListResult.
func (*JobResponseListResult) UnmarshalJSON ¶ added in v1.1.0
func (j *JobResponseListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type JobResponseListResult.
type JobStatus ¶
type JobStatus string
JobStatus - The status of the job.
func PossibleJobStatusValues ¶
func PossibleJobStatusValues() []JobStatus
PossibleJobStatusValues returns the possible values for the JobStatus const type.
type JobType ¶
type JobType string
JobType - The type of the job.
const ( JobTypeBackup JobType = "backup" JobTypeExport JobType = "export" JobTypeFactoryResetDevice JobType = "factoryResetDevice" JobTypeFirmwareUpdate JobType = "firmwareUpdate" JobTypeImport JobType = "import" JobTypeReadDeviceProperties JobType = "readDeviceProperties" JobTypeRebootDevice JobType = "rebootDevice" JobTypeUnknown JobType = "unknown" JobTypeUpdateDeviceConfiguration JobType = "updateDeviceConfiguration" JobTypeWriteDeviceProperties JobType = "writeDeviceProperties" )
func PossibleJobTypeValues ¶
func PossibleJobTypeValues() []JobType
PossibleJobTypeValues returns the possible values for the JobType const type.
type LocationDescription ¶ added in v0.3.0
type LocationDescription struct { // The name of the Azure region Location *string // The role of the region, can be either primary or secondary. The primary region is where the IoT hub is currently provisioned. // The secondary region is the Azure disaster recovery (DR) paired region and // also the region where the IoT hub can failover to. Role *IotHubReplicaRoleType }
LocationDescription - Public representation of one of the locations where a resource is provisioned.
func (LocationDescription) MarshalJSON ¶ added in v1.1.0
func (l LocationDescription) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LocationDescription.
func (*LocationDescription) UnmarshalJSON ¶ added in v1.1.0
func (l *LocationDescription) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LocationDescription.
type ManagedIdentity ¶
type ManagedIdentity struct { // The user assigned identity. UserAssignedIdentity *string }
ManagedIdentity - The properties of the Managed identity.
func (ManagedIdentity) MarshalJSON ¶ added in v1.1.0
func (m ManagedIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedIdentity.
func (*ManagedIdentity) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedIdentity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedIdentity.
type MatchedRoute ¶
type MatchedRoute struct { // Properties of routes that matched Properties *RouteProperties }
MatchedRoute - Routes that matched
func (MatchedRoute) MarshalJSON ¶ added in v1.1.0
func (m MatchedRoute) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MatchedRoute.
func (*MatchedRoute) UnmarshalJSON ¶ added in v1.1.0
func (m *MatchedRoute) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MatchedRoute.
type MessagingEndpointProperties ¶
type MessagingEndpointProperties struct { // The lock duration. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. LockDurationAsIso8601 *string // The number of times the IoT hub attempts to deliver a message. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. MaxDeliveryCount *int32 // The period of time for which a message is available to consume before it is expired by the IoT hub. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. TTLAsIso8601 *string }
MessagingEndpointProperties - The properties of the messaging endpoints used by this IoT hub.
func (MessagingEndpointProperties) MarshalJSON ¶ added in v1.1.0
func (m MessagingEndpointProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MessagingEndpointProperties.
func (*MessagingEndpointProperties) UnmarshalJSON ¶ added in v1.1.0
func (m *MessagingEndpointProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MessagingEndpointProperties.
type Name ¶
Name of Iot Hub type
func (Name) MarshalJSON ¶ added in v1.1.0
MarshalJSON implements the json.Marshaller interface for type Name.
func (*Name) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Name.
type NameAvailabilityInfo ¶ added in v0.3.0
type NameAvailabilityInfo 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 *IotHubNameUnavailabilityReason }
NameAvailabilityInfo - The properties indicating whether a given IoT hub name is available.
func (NameAvailabilityInfo) MarshalJSON ¶ added in v1.1.0
func (n NameAvailabilityInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NameAvailabilityInfo.
func (*NameAvailabilityInfo) UnmarshalJSON ¶ added in v1.1.0
func (n *NameAvailabilityInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NameAvailabilityInfo.
type NetworkRuleIPAction ¶
type NetworkRuleIPAction string
NetworkRuleIPAction - IP Filter Action
const (
NetworkRuleIPActionAllow NetworkRuleIPAction = "Allow"
)
func PossibleNetworkRuleIPActionValues ¶
func PossibleNetworkRuleIPActionValues() []NetworkRuleIPAction
PossibleNetworkRuleIPActionValues returns the possible values for the NetworkRuleIPAction const type.
type NetworkRuleSetIPRule ¶
type NetworkRuleSetIPRule struct { // REQUIRED; Name of the IP filter rule. FilterName *string // REQUIRED; A string that contains the IP address range in CIDR notation for the rule. IPMask *string // IP Filter Action Action *NetworkRuleIPAction }
NetworkRuleSetIPRule - IP Rule to be applied as part of Network Rule Set
func (NetworkRuleSetIPRule) MarshalJSON ¶ added in v1.1.0
func (n NetworkRuleSetIPRule) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NetworkRuleSetIPRule.
func (*NetworkRuleSetIPRule) UnmarshalJSON ¶ added in v1.1.0
func (n *NetworkRuleSetIPRule) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NetworkRuleSetIPRule.
type NetworkRuleSetProperties ¶
type NetworkRuleSetProperties struct { // REQUIRED; If True, then Network Rule Set is also applied to BuiltIn EventHub EndPoint of IotHub ApplyToBuiltInEventHubEndpoint *bool // REQUIRED; List of IP Rules IPRules []*NetworkRuleSetIPRule // Default Action for Network Rule Set DefaultAction *DefaultAction }
NetworkRuleSetProperties - Network Rule Set Properties of IotHub
func (NetworkRuleSetProperties) MarshalJSON ¶
func (n NetworkRuleSetProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NetworkRuleSetProperties.
func (*NetworkRuleSetProperties) UnmarshalJSON ¶ added in v1.1.0
func (n *NetworkRuleSetProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NetworkRuleSetProperties.
type Operation ¶
type Operation struct { // The object that represents the operation. Display *OperationDisplay // READ-ONLY; Operation name: {provider}/{resource}/{read | write | action | delete} Name *string }
Operation - IoT Hub REST API operation
func (Operation) MarshalJSON ¶ added in v1.1.0
MarshalJSON implements the json.Marshaller interface for type Operation.
func (*Operation) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Operation.
type OperationDisplay ¶
type OperationDisplay struct { // READ-ONLY; Description of the operation Description *string // READ-ONLY; Name of the operation Operation *string // READ-ONLY; Service provider: Microsoft Devices Provider *string // READ-ONLY; Resource Type: IotHubs Resource *string }
OperationDisplay - The object that represents the operation.
func (OperationDisplay) MarshalJSON ¶ added in v1.1.0
func (o OperationDisplay) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationDisplay.
func (*OperationDisplay) UnmarshalJSON ¶ added in v1.1.0
func (o *OperationDisplay) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.
type OperationInputs ¶
type OperationInputs struct { // REQUIRED; The name of the IoT hub to check. Name *string }
OperationInputs - Input values.
func (OperationInputs) MarshalJSON ¶ added in v1.1.0
func (o OperationInputs) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationInputs.
func (*OperationInputs) UnmarshalJSON ¶ added in v1.1.0
func (o *OperationInputs) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationInputs.
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 IoT Hub operations supported by the Microsoft.Devices resource provider. Value []*Operation }
OperationListResult - Result of the request to list IoT Hub 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.5.0
func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]
NewListPager - Lists all of the available IoT Hub REST API operations.
Generated from API version 2023-06-30
- 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/32c178f2467f792a322f56174be244135d2c907f/specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_operations.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armiothub.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 = armiothub.OperationListResult{ // Value: []*armiothub.Operation{ // { // Name: to.Ptr("Microsoft.Devices/register/action"), // Display: &armiothub.OperationDisplay{ // Description: to.Ptr("Register the subscription for the IotHub resource provider and enables the creation of IotHub resources"), // Operation: to.Ptr("Register Resource Provider"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("IotHubs"), // }, // }, // { // Name: to.Ptr("Microsoft.Devices/IotHubs/diagnosticSettings/read"), // Display: &armiothub.OperationDisplay{ // Description: to.Ptr("Gets the diagnostic setting for the resource"), // Operation: to.Ptr("Get Diagnostic Setting"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("IotHubs"), // }, // }, // { // Name: to.Ptr("Microsoft.Devices/IotHubs/diagnosticSettings/write"), // Display: &armiothub.OperationDisplay{ // Description: to.Ptr("Creates or updates the diagnostic setting for the resource"), // Operation: to.Ptr("Set Diagnostic Setting"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("IotHubs"), // }, // }, // { // Name: to.Ptr("Microsoft.Devices/IotHubs/metricDefinitions/read"), // Display: &armiothub.OperationDisplay{ // Description: to.Ptr("Gets the available metrics for the IotHub service"), // Operation: to.Ptr("Read IotHub service metric definitions"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("IotHubs"), // }, // }, // { // Name: to.Ptr("Microsoft.Devices/IotHubs/logDefinitions/read"), // Display: &armiothub.OperationDisplay{ // Description: to.Ptr("Gets the available log definitions for the IotHub Service"), // Operation: to.Ptr("Read IotHub service log definitions"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("IotHubs"), // }, // }, // { // Name: to.Ptr("Microsoft.Devices/operations/Read"), // Display: &armiothub.OperationDisplay{ // Description: to.Ptr("Get All ResourceProvider Operations"), // Operation: to.Ptr("Get All ResourceProvider Operations"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("IotHubs"), // }, // }, // { // Name: to.Ptr("Microsoft.Devices/checkNameAvailability/Action"), // Display: &armiothub.OperationDisplay{ // Description: to.Ptr("Check If IotHub name is available"), // Operation: to.Ptr("Check If IotHub name is available"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("IotHubs"), // }, // }, // { // Name: to.Ptr("Microsoft.Devices/usages/Read"), // Display: &armiothub.OperationDisplay{ // Description: to.Ptr("Get subscription usage details for this provider."), // Operation: to.Ptr("Get Subscription Usages"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("IotHubs"), // }, // }, // { // Name: to.Ptr("Microsoft.Devices/iotHubs/Read"), // Display: &armiothub.OperationDisplay{ // Description: to.Ptr("Gets the IotHub resource(s)"), // Operation: to.Ptr("Get IotHub(s)"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("IotHubs"), // }, // }, // { // Name: to.Ptr("Microsoft.Devices/iotHubs/Write"), // Display: &armiothub.OperationDisplay{ // Description: to.Ptr("Create or update IotHub Resource"), // Operation: to.Ptr("Create or update IotHub Resource"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("IotHubs"), // }, // }, // { // Name: to.Ptr("Microsoft.Devices/iotHubs/Delete"), // Display: &armiothub.OperationDisplay{ // Description: to.Ptr("Delete IotHub Resource"), // Operation: to.Ptr("Delete IotHub Resource"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("IotHubs"), // }, // }, // { // Name: to.Ptr("Microsoft.Devices/iotHubs/iotHubStats/Read"), // Display: &armiothub.OperationDisplay{ // Description: to.Ptr("Get IotHub Statistics"), // Operation: to.Ptr("Get IotHub Statistics"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("IotHubs"), // }, // }, // { // Name: to.Ptr("Microsoft.Devices/iotHubs/skus/Read"), // Display: &armiothub.OperationDisplay{ // Description: to.Ptr("Get valid IotHub Skus"), // Operation: to.Ptr("Get valid IotHub Skus"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("IotHubs"), // }, // }, // { // Name: to.Ptr("Microsoft.Devices/iotHubs/listkeys/Action"), // Display: &armiothub.OperationDisplay{ // Description: to.Ptr("Get all IotHub Keys"), // Operation: to.Ptr("Get all IotHub Keys"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("IotHubs"), // }, // }, // { // Name: to.Ptr("Microsoft.Devices/iotHubs/iotHubKeys/listkeys/Action"), // Display: &armiothub.OperationDisplay{ // Description: to.Ptr("Get IotHub Key for the given name"), // Operation: to.Ptr("Get IotHub Key for the given name"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("IotHubs"), // }, // }, // { // Name: to.Ptr("Microsoft.Devices/iotHubs/eventHubEndpoints/consumerGroups/Write"), // Display: &armiothub.OperationDisplay{ // Description: to.Ptr("Create EventHub Consumer Group"), // Operation: to.Ptr("Create EventHub Consumer Group"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("IotHubs"), // }, // }, // { // Name: to.Ptr("Microsoft.Devices/iotHubs/eventHubEndpoints/consumerGroups/Read"), // Display: &armiothub.OperationDisplay{ // Description: to.Ptr("Get EventHub Consumer Group(s)"), // Operation: to.Ptr("Get EventHub Consumer Group(s)"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("IotHubs"), // }, // }, // { // Name: to.Ptr("Microsoft.Devices/iotHubs/eventHubEndpoints/consumerGroups/Delete"), // Display: &armiothub.OperationDisplay{ // Description: to.Ptr("Delete EventHub Consumer Group"), // Operation: to.Ptr("Delete EventHub Consumer Group"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("IotHubs"), // }, // }, // { // Name: to.Ptr("Microsoft.Devices/iotHubs/exportDevices/Action"), // Display: &armiothub.OperationDisplay{ // Description: to.Ptr("Export Devices"), // Operation: to.Ptr("Export Devices"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("IotHubs"), // }, // }, // { // Name: to.Ptr("Microsoft.Devices/iotHubs/importDevices/Action"), // Display: &armiothub.OperationDisplay{ // Description: to.Ptr("Import Devices"), // Operation: to.Ptr("Import Devices"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("IotHubs"), // }, // }, // { // Name: to.Ptr("Microsoft.Devices/iotHubs/jobs/Read"), // Display: &armiothub.OperationDisplay{ // Description: to.Ptr("Get Job(s) details submitted on given IotHub"), // Operation: to.Ptr("Get the Job(s) on IotHub"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("IotHubs"), // }, // }, // { // Name: to.Ptr("Microsoft.Devices/iotHubs/quotaMetrics/Read"), // Display: &armiothub.OperationDisplay{ // Description: to.Ptr("Get Quota Metrics"), // Operation: to.Ptr("Get Quota Metrics"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("IotHubs"), // }, // }, // { // Name: to.Ptr("Microsoft.Devices/iotHubs/routing/routes/$testall/Action"), // Display: &armiothub.OperationDisplay{ // Description: to.Ptr("Test a message against all existing Routes"), // Operation: to.Ptr("Routing Rule Test All"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("IotHubs"), // }, // }, // { // Name: to.Ptr("Microsoft.Devices/iotHubs/routing/routes/$testnew/Action"), // Display: &armiothub.OperationDisplay{ // Description: to.Ptr("Test a message against a provided test Route"), // Operation: to.Ptr("Routing Rule Test Route"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("IotHubs"), // }, // }, // { // Name: to.Ptr("Microsoft.Devices/iotHubs/routingEndpointsHealth/Read"), // Display: &armiothub.OperationDisplay{ // Description: to.Ptr("Gets the health of all routing Endpoints for an IotHub"), // Operation: to.Ptr("Get Endpoint Health"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("IotHubs"), // }, // }, // { // Name: to.Ptr("Microsoft.Devices/ProvisioningServices/diagnosticSettings/read"), // Display: &armiothub.OperationDisplay{ // Description: to.Ptr("Gets the diagnostic setting for the resource"), // Operation: to.Ptr("Get Diagnostic Setting"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("IotHubs"), // }, // }, // { // Name: to.Ptr("Microsoft.Devices/ProvisioningServices/diagnosticSettings/write"), // Display: &armiothub.OperationDisplay{ // Description: to.Ptr("Creates or updates the diagnostic setting for the resource"), // Operation: to.Ptr("Set Diagnostic Setting"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("IotHubs"), // }, // }, // { // Name: to.Ptr("Microsoft.Devices/ProvisioningServices/metricDefinitions/read"), // Display: &armiothub.OperationDisplay{ // Description: to.Ptr("Gets the available metrics for the DPS service"), // Operation: to.Ptr("Read DPS service metric definitions"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("IotHubs"), // }, // }, // { // Name: to.Ptr("Microsoft.Devices/ProvisioningServices/logDefinitions/read"), // Display: &armiothub.OperationDisplay{ // Description: to.Ptr("Gets the available log definitions for the DPS Service"), // Operation: to.Ptr("Read DPS service log definitions"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("IotHubs"), // }, // }, // { // Name: to.Ptr("Microsoft.Devices/checkProvisioningServiceNameAvailability/Action"), // Display: &armiothub.OperationDisplay{ // Description: to.Ptr("Check If Provisioning Service name is available"), // Operation: to.Ptr("Check If Provisioning Service name is available"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("ProvisioningServives"), // }, // }, // { // Name: to.Ptr("Microsoft.Devices/provisioningServices/Read"), // Display: &armiothub.OperationDisplay{ // Description: to.Ptr("Get Provisioning Service resource"), // Operation: to.Ptr("Get Provisioning Service resource"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("ProvisioningServices"), // }, // }, // { // Name: to.Ptr("Microsoft.Devices/provisioningServices/Write"), // Display: &armiothub.OperationDisplay{ // Description: to.Ptr("Create Provisioning Service resource"), // Operation: to.Ptr("Create Provisioning Service resource"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("ProvisioningServices"), // }, // }, // { // Name: to.Ptr("Microsoft.Devices/provisioningServices/Delete"), // Display: &armiothub.OperationDisplay{ // Description: to.Ptr("Delete Provisioning Service resource"), // Operation: to.Ptr("Delete Provisioning Service resource"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("ProvisioningServices"), // }, // }, // { // Name: to.Ptr("Microsoft.Devices/provisioningServices/skus/Read"), // Display: &armiothub.OperationDisplay{ // Description: to.Ptr("Delete Provisioning Service resource"), // Operation: to.Ptr("Delete Provisioning Service resource"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("ProvisioningServices"), // }, // }, // { // Name: to.Ptr("Microsoft.Devices/provisioningServices/listkeys/Action"), // Display: &armiothub.OperationDisplay{ // Description: to.Ptr("get security related metadata"), // Operation: to.Ptr("get security related metadata"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("ProvisioningServices"), // }, // }}, // } } }
Output:
type OperationsClientListOptions ¶ added in v0.3.0
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
type OperationsClientListResponse ¶ added in v0.3.0
type OperationsClientListResponse struct { // Result of the request to list IoT Hub 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 PrivateEndpoint ¶
type PrivateEndpoint struct { // READ-ONLY; The resource identifier. ID *string }
PrivateEndpoint - The private endpoint property of a private endpoint connection
func (PrivateEndpoint) MarshalJSON ¶ added in v1.1.0
func (p PrivateEndpoint) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateEndpoint.
func (*PrivateEndpoint) UnmarshalJSON ¶ added in v1.1.0
func (p *PrivateEndpoint) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpoint.
type PrivateEndpointConnection ¶
type PrivateEndpointConnection struct { // REQUIRED; The properties of a private endpoint connection Properties *PrivateEndpointConnectionProperties // READ-ONLY; The resource identifier. ID *string // READ-ONLY; The resource name. Name *string // READ-ONLY; The resource type. Type *string }
PrivateEndpointConnection - The private endpoint connection of an IotHub
func (PrivateEndpointConnection) MarshalJSON ¶ added in v1.1.0
func (p PrivateEndpointConnection) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection.
func (*PrivateEndpointConnection) UnmarshalJSON ¶ added in v1.1.0
func (p *PrivateEndpointConnection) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnection.
type PrivateEndpointConnectionProperties ¶
type PrivateEndpointConnectionProperties struct { // REQUIRED; The current state of a private endpoint connection PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState // The private endpoint property of a private endpoint connection PrivateEndpoint *PrivateEndpoint }
PrivateEndpointConnectionProperties - The properties of a private endpoint connection
func (PrivateEndpointConnectionProperties) MarshalJSON ¶ added in v1.1.0
func (p PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionProperties.
func (*PrivateEndpointConnectionProperties) UnmarshalJSON ¶ added in v1.1.0
func (p *PrivateEndpointConnectionProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionProperties.
type PrivateEndpointConnectionsClient ¶
type PrivateEndpointConnectionsClient struct {
// contains filtered or unexported fields
}
PrivateEndpointConnectionsClient contains the methods for the PrivateEndpointConnections group. Don't use this type directly, use NewPrivateEndpointConnectionsClient() instead.
func NewPrivateEndpointConnectionsClient ¶
func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointConnectionsClient, error)
NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient 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 (*PrivateEndpointConnectionsClient) BeginDelete ¶
func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, resourceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*runtime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error)
BeginDelete - Delete private endpoint connection with the specified name If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-06-30
- resourceGroupName - The name of the resource group that contains the IoT hub.
- resourceName - The name of the IoT hub.
- privateEndpointConnectionName - The name of the private endpoint connection
- options - PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/32c178f2467f792a322f56174be244135d2c907f/specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_deleteprivateendpointconnection.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armiothub.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewPrivateEndpointConnectionsClient().BeginDelete(ctx, "myResourceGroup", "testHub", "myPrivateEndpointConnection", 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.PrivateEndpointConnection = armiothub.PrivateEndpointConnection{ // Name: to.Ptr("myPrivateEndpointConnection"), // Type: to.Ptr("Microsoft.Devices/IotHubs/PrivateEndpointConnections"), // ID: to.Ptr("/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/testHub/PrivateEndpointConnections/myPrivateEndpointConnection"), // Properties: &armiothub.PrivateEndpointConnectionProperties{ // PrivateEndpoint: &armiothub.PrivateEndpoint{ // ID: to.Ptr("/subscriptions/a9eba280-4734-4d49-878f-b5549d1d0453/resourceGroups/networkResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint"), // }, // PrivateLinkServiceConnectionState: &armiothub.PrivateLinkServiceConnectionState{ // Description: to.Ptr("Deleted"), // ActionsRequired: to.Ptr("None"), // Status: to.Ptr(armiothub.PrivateLinkServiceConnectionStatusDisconnected), // }, // }, // } }
Output:
func (*PrivateEndpointConnectionsClient) BeginUpdate ¶
func (client *PrivateEndpointConnectionsClient) BeginUpdate(ctx context.Context, resourceGroupName string, resourceName string, privateEndpointConnectionName string, privateEndpointConnection PrivateEndpointConnection, options *PrivateEndpointConnectionsClientBeginUpdateOptions) (*runtime.Poller[PrivateEndpointConnectionsClientUpdateResponse], error)
BeginUpdate - Update the status of a private endpoint connection with the specified name If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-06-30
- resourceGroupName - The name of the resource group that contains the IoT hub.
- resourceName - The name of the IoT hub.
- privateEndpointConnectionName - The name of the private endpoint connection
- privateEndpointConnection - The private endpoint connection with updated properties
- options - PrivateEndpointConnectionsClientBeginUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/32c178f2467f792a322f56174be244135d2c907f/specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_updateprivateendpointconnection.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/iothub/armiothub" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armiothub.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewPrivateEndpointConnectionsClient().BeginUpdate(ctx, "myResourceGroup", "testHub", "myPrivateEndpointConnection", armiothub.PrivateEndpointConnection{ Properties: &armiothub.PrivateEndpointConnectionProperties{ PrivateLinkServiceConnectionState: &armiothub.PrivateLinkServiceConnectionState{ Description: to.Ptr("Approved by johndoe@contoso.com"), Status: to.Ptr(armiothub.PrivateLinkServiceConnectionStatusApproved), }, }, }, 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.PrivateEndpointConnection = armiothub.PrivateEndpointConnection{ // Name: to.Ptr("myPrivateEndpointConnection"), // Type: to.Ptr("Microsoft.Devices/IotHubs/PrivateEndpointConnections"), // ID: to.Ptr("/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/testHub/PrivateEndpointConnections/myPrivateEndpointConnection"), // Properties: &armiothub.PrivateEndpointConnectionProperties{ // PrivateEndpoint: &armiothub.PrivateEndpoint{ // ID: to.Ptr("/subscriptions/a9eba280-4734-4d49-878f-b5549d1d0453/resourceGroups/networkResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint"), // }, // PrivateLinkServiceConnectionState: &armiothub.PrivateLinkServiceConnectionState{ // Description: to.Ptr("Approved by johndoe@contoso.com"), // ActionsRequired: to.Ptr("None"), // Status: to.Ptr(armiothub.PrivateLinkServiceConnectionStatusApproved), // }, // }, // } }
Output:
func (*PrivateEndpointConnectionsClient) Get ¶
func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientGetOptions) (PrivateEndpointConnectionsClientGetResponse, error)
Get - Get private endpoint connection properties If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-06-30
- resourceGroupName - The name of the resource group that contains the IoT hub.
- resourceName - The name of the IoT hub.
- privateEndpointConnectionName - The name of the private endpoint connection
- options - PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/32c178f2467f792a322f56174be244135d2c907f/specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_getprivateendpointconnection.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armiothub.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewPrivateEndpointConnectionsClient().Get(ctx, "myResourceGroup", "testHub", "myPrivateEndpointConnection", 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.PrivateEndpointConnection = armiothub.PrivateEndpointConnection{ // Name: to.Ptr("myPrivateEndpointConnection"), // Type: to.Ptr("Microsoft.Devices/IotHubs/PrivateEndpointConnections"), // ID: to.Ptr("/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/testHub/PrivateEndpointConnections/myPrivateEndpointConnection"), // Properties: &armiothub.PrivateEndpointConnectionProperties{ // PrivateEndpoint: &armiothub.PrivateEndpoint{ // ID: to.Ptr("/subscriptions/a9eba280-4734-4d49-878f-b5549d1d0453/resourceGroups/networkResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint"), // }, // PrivateLinkServiceConnectionState: &armiothub.PrivateLinkServiceConnectionState{ // Description: to.Ptr("Please approve my request!"), // ActionsRequired: to.Ptr("None"), // Status: to.Ptr(armiothub.PrivateLinkServiceConnectionStatusPending), // }, // }, // } }
Output:
func (*PrivateEndpointConnectionsClient) List ¶
func (client *PrivateEndpointConnectionsClient) List(ctx context.Context, resourceGroupName string, resourceName string, options *PrivateEndpointConnectionsClientListOptions) (PrivateEndpointConnectionsClientListResponse, error)
List - List private endpoint connection properties If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-06-30
- resourceGroupName - The name of the resource group that contains the IoT hub.
- resourceName - The name of the IoT hub.
- options - PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/32c178f2467f792a322f56174be244135d2c907f/specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_listprivateendpointconnections.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armiothub.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewPrivateEndpointConnectionsClient().List(ctx, "myResourceGroup", "testHub", 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.PrivateEndpointConnectionArray = []*armiothub.PrivateEndpointConnection{ // { // Name: to.Ptr("myPrivateEndpointConnection"), // Type: to.Ptr("Microsoft.Devices/IotHubs/PrivateEndpointConnections"), // ID: to.Ptr("/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/testHub/PrivateEndpointConnections/myPrivateEndpointConnection"), // Properties: &armiothub.PrivateEndpointConnectionProperties{ // PrivateEndpoint: &armiothub.PrivateEndpoint{ // ID: to.Ptr("/subscriptions/a9eba280-4734-4d49-878f-b5549d1d0453/resourceGroups/networkResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint"), // }, // PrivateLinkServiceConnectionState: &armiothub.PrivateLinkServiceConnectionState{ // Description: to.Ptr("Please approve my request!"), // ActionsRequired: to.Ptr("None"), // Status: to.Ptr(armiothub.PrivateLinkServiceConnectionStatusPending), // }, // }, // }} }
Output:
type PrivateEndpointConnectionsClientBeginDeleteOptions ¶ added in v0.3.0
type PrivateEndpointConnectionsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete method.
type PrivateEndpointConnectionsClientBeginUpdateOptions ¶ added in v0.3.0
type PrivateEndpointConnectionsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
PrivateEndpointConnectionsClientBeginUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginUpdate method.
type PrivateEndpointConnectionsClientDeleteResponse ¶ added in v0.3.0
type PrivateEndpointConnectionsClientDeleteResponse struct { // The private endpoint connection of an IotHub PrivateEndpointConnection }
PrivateEndpointConnectionsClientDeleteResponse contains the response from method PrivateEndpointConnectionsClient.BeginDelete.
type PrivateEndpointConnectionsClientGetOptions ¶ added in v0.3.0
type PrivateEndpointConnectionsClientGetOptions struct { }
PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get method.
type PrivateEndpointConnectionsClientGetResponse ¶ added in v0.3.0
type PrivateEndpointConnectionsClientGetResponse struct { // The private endpoint connection of an IotHub PrivateEndpointConnection }
PrivateEndpointConnectionsClientGetResponse contains the response from method PrivateEndpointConnectionsClient.Get.
type PrivateEndpointConnectionsClientListOptions ¶ added in v0.3.0
type PrivateEndpointConnectionsClientListOptions struct { }
PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.List method.
type PrivateEndpointConnectionsClientListResponse ¶ added in v0.3.0
type PrivateEndpointConnectionsClientListResponse struct { // The list of private endpoint connections for an IotHub PrivateEndpointConnectionArray []*PrivateEndpointConnection }
PrivateEndpointConnectionsClientListResponse contains the response from method PrivateEndpointConnectionsClient.List.
type PrivateEndpointConnectionsClientUpdateResponse ¶ added in v0.3.0
type PrivateEndpointConnectionsClientUpdateResponse struct { // The private endpoint connection of an IotHub PrivateEndpointConnection }
PrivateEndpointConnectionsClientUpdateResponse contains the response from method PrivateEndpointConnectionsClient.BeginUpdate.
type PrivateLinkResources ¶
type PrivateLinkResources struct { // The list of available private link resources for an IotHub Value []*GroupIDInformation }
PrivateLinkResources - The available private link resources for an IotHub
func (PrivateLinkResources) MarshalJSON ¶
func (p PrivateLinkResources) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateLinkResources.
func (*PrivateLinkResources) UnmarshalJSON ¶ added in v1.1.0
func (p *PrivateLinkResources) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResources.
type PrivateLinkResourcesClient ¶
type PrivateLinkResourcesClient struct {
// contains filtered or unexported fields
}
PrivateLinkResourcesClient contains the methods for the PrivateLinkResources group. Don't use this type directly, use NewPrivateLinkResourcesClient() instead.
func NewPrivateLinkResourcesClient ¶
func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateLinkResourcesClient, error)
NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient 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 (*PrivateLinkResourcesClient) Get ¶
func (client *PrivateLinkResourcesClient) Get(ctx context.Context, resourceGroupName string, resourceName string, groupID string, options *PrivateLinkResourcesClientGetOptions) (PrivateLinkResourcesClientGetResponse, error)
Get - Get the specified private link resource for the given IotHub If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-06-30
- resourceGroupName - The name of the resource group that contains the IoT hub.
- resourceName - The name of the IoT hub.
- groupID - The name of the private link resource
- options - PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/32c178f2467f792a322f56174be244135d2c907f/specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_getprivatelinkresources.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armiothub.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewPrivateLinkResourcesClient().Get(ctx, "myResourceGroup", "testHub", "iotHub", 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.GroupIDInformation = armiothub.GroupIDInformation{ // Name: to.Ptr("iotHub"), // Type: to.Ptr("Microsoft.Devices/IotHubs/PrivateLinkResources"), // ID: to.Ptr("/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/testHub/PrivateLinkResources/iotHub"), // Properties: &armiothub.GroupIDInformationProperties{ // GroupID: to.Ptr("iotHub"), // RequiredMembers: []*string{ // to.Ptr("iotHub")}, // RequiredZoneNames: []*string{ // to.Ptr("privatelink.azure-devices.net")}, // }, // } }
Output:
func (*PrivateLinkResourcesClient) List ¶
func (client *PrivateLinkResourcesClient) List(ctx context.Context, resourceGroupName string, resourceName string, options *PrivateLinkResourcesClientListOptions) (PrivateLinkResourcesClientListResponse, error)
List - List private link resources for the given IotHub If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-06-30
- resourceGroupName - The name of the resource group that contains the IoT hub.
- resourceName - The name of the IoT hub.
- options - PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/32c178f2467f792a322f56174be244135d2c907f/specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_listprivatelinkresources.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armiothub.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewPrivateLinkResourcesClient().List(ctx, "myResourceGroup", "testHub", 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.PrivateLinkResources = armiothub.PrivateLinkResources{ // Value: []*armiothub.GroupIDInformation{ // { // Name: to.Ptr("iotHub"), // Type: to.Ptr("Microsoft.Devices/IotHubs/PrivateLinkResources"), // ID: to.Ptr("/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/testHub/PrivateLinkResources/iotHub"), // Properties: &armiothub.GroupIDInformationProperties{ // GroupID: to.Ptr("iotHub"), // RequiredMembers: []*string{ // to.Ptr("iotHub")}, // RequiredZoneNames: []*string{ // to.Ptr("privatelink.azure-devices.net")}, // }, // }}, // } }
Output:
type PrivateLinkResourcesClientGetOptions ¶ added in v0.3.0
type PrivateLinkResourcesClientGetOptions struct { }
PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method.
type PrivateLinkResourcesClientGetResponse ¶ added in v0.3.0
type PrivateLinkResourcesClientGetResponse struct { // The group information for creating a private endpoint on an IotHub GroupIDInformation }
PrivateLinkResourcesClientGetResponse contains the response from method PrivateLinkResourcesClient.Get.
type PrivateLinkResourcesClientListOptions ¶ added in v0.3.0
type PrivateLinkResourcesClientListOptions struct { }
PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.List method.
type PrivateLinkResourcesClientListResponse ¶ added in v0.3.0
type PrivateLinkResourcesClientListResponse struct { // The available private link resources for an IotHub PrivateLinkResources }
PrivateLinkResourcesClientListResponse contains the response from method PrivateLinkResourcesClient.List.
type PrivateLinkServiceConnectionState ¶
type PrivateLinkServiceConnectionState struct { // REQUIRED; The description for the current state of a private endpoint connection Description *string // REQUIRED; The status of a private endpoint connection Status *PrivateLinkServiceConnectionStatus // Actions required for a private endpoint connection ActionsRequired *string }
PrivateLinkServiceConnectionState - The current state of a private endpoint connection
func (PrivateLinkServiceConnectionState) MarshalJSON ¶ added in v1.1.0
func (p PrivateLinkServiceConnectionState) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionState.
func (*PrivateLinkServiceConnectionState) UnmarshalJSON ¶ added in v1.1.0
func (p *PrivateLinkServiceConnectionState) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceConnectionState.
type PrivateLinkServiceConnectionStatus ¶
type PrivateLinkServiceConnectionStatus string
PrivateLinkServiceConnectionStatus - The status of a private endpoint connection
const ( PrivateLinkServiceConnectionStatusApproved PrivateLinkServiceConnectionStatus = "Approved" PrivateLinkServiceConnectionStatusDisconnected PrivateLinkServiceConnectionStatus = "Disconnected" PrivateLinkServiceConnectionStatusPending PrivateLinkServiceConnectionStatus = "Pending" PrivateLinkServiceConnectionStatusRejected PrivateLinkServiceConnectionStatus = "Rejected" )
func PossiblePrivateLinkServiceConnectionStatusValues ¶
func PossiblePrivateLinkServiceConnectionStatusValues() []PrivateLinkServiceConnectionStatus
PossiblePrivateLinkServiceConnectionStatusValues returns the possible values for the PrivateLinkServiceConnectionStatus const type.
type Properties ¶ added in v0.3.0
type Properties struct { // List of allowed FQDNs(Fully Qualified Domain Name) for egress from Iot Hub. AllowedFqdnList []*string // The shared access policies you can use to secure a connection to the IoT hub. AuthorizationPolicies []*SharedAccessSignatureAuthorizationRule // The IoT hub cloud-to-device messaging properties. CloudToDevice *CloudToDeviceProperties // IoT hub comments. Comments *string // If true, all device(including Edge devices but excluding modules) scoped SAS keys cannot be used for authentication. DisableDeviceSAS *bool // If true, SAS tokens with Iot hub scoped SAS keys cannot be used for authentication. DisableLocalAuth *bool // If true, all module scoped SAS keys cannot be used for authentication. DisableModuleSAS *bool // This property when set to true, will enable data residency, thus, disabling disaster recovery. EnableDataResidency *bool // If True, file upload notifications are enabled. EnableFileUploadNotifications *bool // The Event Hub-compatible endpoint properties. The only possible keys to this dictionary is events. This key has to be present // in the dictionary while making create or update calls for the IoT hub. EventHubEndpoints map[string]*EventHubProperties // The capabilities and features enabled for the IoT hub. Features *Capabilities // The IP filter rules. IPFilterRules []*IPFilterRule // The messaging endpoint properties for the file upload notification queue. MessagingEndpoints map[string]*MessagingEndpointProperties // Specifies the minimum TLS version to support for this hub. Can be set to "1.2" to have clients that use a TLS version below // 1.2 to be rejected. MinTLSVersion *string // Network Rule Set Properties of IotHub NetworkRuleSets *NetworkRuleSetProperties // Private endpoint connections created on this IotHub PrivateEndpointConnections []*PrivateEndpointConnection // Whether requests from Public Network are allowed PublicNetworkAccess *PublicNetworkAccess // If true, egress from IotHub will be restricted to only the allowed FQDNs that are configured via allowedFqdnList. RestrictOutboundNetworkAccess *bool // The routing related properties of the IoT hub. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging Routing *RoutingProperties // The list of Azure Storage endpoints where you can upload files. Currently you can configure only one Azure Storage account // and that MUST have its key as $default. Specifying more than one storage // account causes an error to be thrown. Not specifying a value for this property when the enableFileUploadNotifications property // is set to True, causes an error to be thrown. StorageEndpoints map[string]*StorageEndpointProperties // READ-ONLY; The name of the host. HostName *string // READ-ONLY; Primary and secondary location for iot hub Locations []*LocationDescription // READ-ONLY; The provisioning state. ProvisioningState *string // READ-ONLY; The hub state. State *string }
Properties - The properties of an IoT hub.
func (Properties) MarshalJSON ¶ added in v0.3.0
func (p Properties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type Properties.
func (*Properties) UnmarshalJSON ¶ added in v1.1.0
func (p *Properties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type Properties.
type PublicNetworkAccess ¶
type PublicNetworkAccess string
PublicNetworkAccess - Whether requests from Public Network are allowed
const ( PublicNetworkAccessDisabled PublicNetworkAccess = "Disabled" PublicNetworkAccessEnabled PublicNetworkAccess = "Enabled" )
func PossiblePublicNetworkAccessValues ¶
func PossiblePublicNetworkAccessValues() []PublicNetworkAccess
PossiblePublicNetworkAccessValues returns the possible values for the PublicNetworkAccess const type.
type QuotaMetricInfo ¶ added in v0.3.0
type QuotaMetricInfo struct { // READ-ONLY; The current value for the quota metric. CurrentValue *int64 // READ-ONLY; The maximum value of the quota metric. MaxValue *int64 // READ-ONLY; The name of the quota metric. Name *string }
QuotaMetricInfo - Quota metrics properties.
func (QuotaMetricInfo) MarshalJSON ¶ added in v1.1.0
func (q QuotaMetricInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type QuotaMetricInfo.
func (*QuotaMetricInfo) UnmarshalJSON ¶ added in v1.1.0
func (q *QuotaMetricInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type QuotaMetricInfo.
type QuotaMetricInfoListResult ¶ added in v0.3.0
type QuotaMetricInfoListResult struct { // The array of quota metrics objects. Value []*QuotaMetricInfo // READ-ONLY; The next link. NextLink *string }
QuotaMetricInfoListResult - The JSON-serialized array of IotHubQuotaMetricInfo objects with a next link.
func (QuotaMetricInfoListResult) MarshalJSON ¶ added in v0.3.0
func (q QuotaMetricInfoListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type QuotaMetricInfoListResult.
func (*QuotaMetricInfoListResult) UnmarshalJSON ¶ added in v1.1.0
func (q *QuotaMetricInfoListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type QuotaMetricInfoListResult.
type RegistryStatistics ¶
type RegistryStatistics struct { // READ-ONLY; The count of disabled devices in the identity registry. DisabledDeviceCount *int64 // READ-ONLY; The count of enabled devices in the identity registry. EnabledDeviceCount *int64 // READ-ONLY; The total count of devices in the identity registry. TotalDeviceCount *int64 }
RegistryStatistics - Identity registry statistics.
func (RegistryStatistics) MarshalJSON ¶ added in v1.1.0
func (r RegistryStatistics) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RegistryStatistics.
func (*RegistryStatistics) UnmarshalJSON ¶ added in v1.1.0
func (r *RegistryStatistics) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RegistryStatistics.
type Resource ¶
type Resource struct { // REQUIRED; The resource location. Location *string // The resource tags. Tags map[string]*string // READ-ONLY; The resource identifier. ID *string // READ-ONLY; The resource name. Name *string // READ-ONLY; The resource type. Type *string }
Resource - The common properties of an Azure resource.
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 ResourceClient ¶ added in v0.3.0
type ResourceClient struct {
// contains filtered or unexported fields
}
ResourceClient contains the methods for the IotHubResource group. Don't use this type directly, use NewResourceClient() instead.
func NewResourceClient ¶ added in v0.3.0
func NewResourceClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ResourceClient, error)
NewResourceClient creates a new instance of ResourceClient 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 (*ResourceClient) BeginCreateOrUpdate ¶ added in v0.3.0
func (client *ResourceClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, iotHubDescription Description, options *ResourceClientBeginCreateOrUpdateOptions) (*runtime.Poller[ResourceClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create or update the metadata of an Iot hub. The usual pattern to modify a property is to retrieve the IoT hub metadata and security metadata, and then combine them with the modified values in a new body to update the IoT hub. If certain properties are missing in the JSON, updating IoT Hub may cause these values to fallback to default, which may lead to unexpected behavior. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-06-30
- resourceGroupName - The name of the resource group that contains the IoT hub.
- resourceName - The name of the IoT hub.
- iotHubDescription - The IoT hub metadata and security metadata.
- options - ResourceClientBeginCreateOrUpdateOptions contains the optional parameters for the ResourceClient.BeginCreateOrUpdate method.
Example (IotHubResourceAddCosmosDbEndpoint) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/32c178f2467f792a322f56174be244135d2c907f/specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_addRoutingCosmosDBEndpoint.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/iothub/armiothub" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armiothub.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewResourceClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "testHub", armiothub.Description{ Location: to.Ptr("centraluseuap"), Tags: map[string]*string{}, Etag: to.Ptr("AAAAAAFD6M4="), Properties: &armiothub.Properties{ CloudToDevice: &armiothub.CloudToDeviceProperties{ DefaultTTLAsIso8601: to.Ptr("PT1H"), Feedback: &armiothub.FeedbackProperties{ LockDurationAsIso8601: to.Ptr("PT1M"), MaxDeliveryCount: to.Ptr[int32](10), TTLAsIso8601: to.Ptr("PT1H"), }, MaxDeliveryCount: to.Ptr[int32](10), }, EnableDataResidency: to.Ptr(false), EnableFileUploadNotifications: to.Ptr(false), EventHubEndpoints: map[string]*armiothub.EventHubProperties{ "events": { PartitionCount: to.Ptr[int32](2), RetentionTimeInDays: to.Ptr[int64](1), }, }, Features: to.Ptr(armiothub.CapabilitiesNone), IPFilterRules: []*armiothub.IPFilterRule{}, MessagingEndpoints: map[string]*armiothub.MessagingEndpointProperties{ "fileNotifications": { LockDurationAsIso8601: to.Ptr("PT1M"), MaxDeliveryCount: to.Ptr[int32](10), TTLAsIso8601: to.Ptr("PT1H"), }, }, MinTLSVersion: to.Ptr("1.2"), NetworkRuleSets: &armiothub.NetworkRuleSetProperties{ ApplyToBuiltInEventHubEndpoint: to.Ptr(true), DefaultAction: to.Ptr(armiothub.DefaultActionDeny), IPRules: []*armiothub.NetworkRuleSetIPRule{ { Action: to.Ptr(armiothub.NetworkRuleIPActionAllow), FilterName: to.Ptr("rule1"), IPMask: to.Ptr("131.117.159.53"), }, { Action: to.Ptr(armiothub.NetworkRuleIPActionAllow), FilterName: to.Ptr("rule2"), IPMask: to.Ptr("157.55.59.128/25"), }}, }, Routing: &armiothub.RoutingProperties{ Endpoints: &armiothub.RoutingEndpoints{ CosmosDBSQLContainers: []*armiothub.RoutingCosmosDBSQLAPIProperties{ { Name: to.Ptr("endpointcosmos"), AuthenticationType: to.Ptr(armiothub.AuthenticationTypeKeyBased), ContainerName: to.Ptr("test"), DatabaseName: to.Ptr("systemstore"), EndpointURI: to.Ptr("https://test-systemstore-test2.documents.azure.com"), PartitionKeyName: to.Ptr("keystamped"), PartitionKeyTemplate: to.Ptr("{deviceid}-{YYYY}-{MM}"), PrimaryKey: to.Ptr("<primary-key>"), ResourceGroup: to.Ptr("rg-test"), SecondaryKey: to.Ptr("<secondary-key>"), SubscriptionID: to.Ptr("<subscription-id>"), }}, EventHubs: []*armiothub.RoutingEventHubProperties{}, ServiceBusQueues: []*armiothub.RoutingServiceBusQueueEndpointProperties{}, ServiceBusTopics: []*armiothub.RoutingServiceBusTopicEndpointProperties{}, StorageContainers: []*armiothub.RoutingStorageContainerProperties{}, }, FallbackRoute: &armiothub.FallbackRouteProperties{ Name: to.Ptr("$fallback"), Condition: to.Ptr("true"), EndpointNames: []*string{ to.Ptr("events")}, IsEnabled: to.Ptr(true), Source: to.Ptr(armiothub.RoutingSourceDeviceMessages), }, Routes: []*armiothub.RouteProperties{}, }, StorageEndpoints: map[string]*armiothub.StorageEndpointProperties{ "$default": { ConnectionString: to.Ptr(""), ContainerName: to.Ptr(""), SasTTLAsIso8601: to.Ptr("PT1H"), }, }, }, SKU: &armiothub.SKUInfo{ Name: to.Ptr(armiothub.IotHubSKUS1), Capacity: to.Ptr[int64](1), }, }, &armiothub.ResourceClientBeginCreateOrUpdateOptions{IfMatch: 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.Description = armiothub.Description{ // Name: to.Ptr("testHub"), // Type: to.Ptr("Microsoft.Devices/IotHubs"), // ID: to.Ptr("/subscriptions/ae24ff83-d2ca-4fc8-9717-05dae4bba489/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/testHub"), // Location: to.Ptr("centraluseuap"), // Tags: map[string]*string{ // }, // Etag: to.Ptr("AAAAAAFD6M4="), // Properties: &armiothub.Properties{ // CloudToDevice: &armiothub.CloudToDeviceProperties{ // DefaultTTLAsIso8601: to.Ptr("PT1H"), // Feedback: &armiothub.FeedbackProperties{ // LockDurationAsIso8601: to.Ptr("PT1M"), // MaxDeliveryCount: to.Ptr[int32](10), // TTLAsIso8601: to.Ptr("PT1H"), // }, // MaxDeliveryCount: to.Ptr[int32](10), // }, // EnableDataResidency: to.Ptr(false), // EnableFileUploadNotifications: to.Ptr(false), // EventHubEndpoints: map[string]*armiothub.EventHubProperties{ // "events": &armiothub.EventHubProperties{ // Path: to.Ptr("iot-dps-cit-hub-1"), // Endpoint: to.Ptr("sb://iothub-ns-iot-dps-ci-245306-76aca8e13b.servicebus.windows.net/"), // PartitionCount: to.Ptr[int32](2), // PartitionIDs: []*string{ // to.Ptr("0"), // to.Ptr("1")}, // RetentionTimeInDays: to.Ptr[int64](1), // }, // }, // Features: to.Ptr(armiothub.CapabilitiesNone), // HostName: to.Ptr("iot-dps-cit-hub-1.azure-devices.net"), // IPFilterRules: []*armiothub.IPFilterRule{ // { // Action: to.Ptr(armiothub.IPFilterActionTypeAccept), // FilterName: to.Ptr("rule1"), // IPMask: to.Ptr("131.117.159.53"), // }, // { // Action: to.Ptr(armiothub.IPFilterActionTypeAccept), // FilterName: to.Ptr("rule2"), // IPMask: to.Ptr("157.55.59.128/25"), // }}, // MessagingEndpoints: map[string]*armiothub.MessagingEndpointProperties{ // "fileNotifications": &armiothub.MessagingEndpointProperties{ // LockDurationAsIso8601: to.Ptr("PT1M"), // MaxDeliveryCount: to.Ptr[int32](10), // TTLAsIso8601: to.Ptr("PT1H"), // }, // }, // MinTLSVersion: to.Ptr("1.2"), // NetworkRuleSets: &armiothub.NetworkRuleSetProperties{ // ApplyToBuiltInEventHubEndpoint: to.Ptr(true), // DefaultAction: to.Ptr(armiothub.DefaultActionDeny), // IPRules: []*armiothub.NetworkRuleSetIPRule{ // { // Action: to.Ptr(armiothub.NetworkRuleIPActionAllow), // FilterName: to.Ptr("rule1"), // IPMask: to.Ptr("131.117.159.53"), // }, // { // Action: to.Ptr(armiothub.NetworkRuleIPActionAllow), // FilterName: to.Ptr("rule2"), // IPMask: to.Ptr("157.55.59.128/25"), // }}, // }, // ProvisioningState: to.Ptr("Succeeded"), // Routing: &armiothub.RoutingProperties{ // Endpoints: &armiothub.RoutingEndpoints{ // CosmosDBSQLContainers: []*armiothub.RoutingCosmosDBSQLAPIProperties{ // { // Name: to.Ptr("endpointcosmos"), // AuthenticationType: to.Ptr(armiothub.AuthenticationTypeKeyBased), // ContainerName: to.Ptr("test"), // DatabaseName: to.Ptr("systemstore"), // EndpointURI: to.Ptr("https://test-systemstore-test2.documents.azure.com"), // ID: to.Ptr("009208fa-9cb7-4b90-bfbd-f40086e766c9"), // PartitionKeyName: to.Ptr("keystamped"), // PartitionKeyTemplate: to.Ptr("{deviceid}-{YYYY}-{MM}"), // ResourceGroup: to.Ptr("rg-test"), // SubscriptionID: to.Ptr("<subscription-id>"), // }}, // EventHubs: []*armiothub.RoutingEventHubProperties{ // }, // ServiceBusQueues: []*armiothub.RoutingServiceBusQueueEndpointProperties{ // }, // ServiceBusTopics: []*armiothub.RoutingServiceBusTopicEndpointProperties{ // }, // StorageContainers: []*armiothub.RoutingStorageContainerProperties{ // }, // }, // FallbackRoute: &armiothub.FallbackRouteProperties{ // Name: to.Ptr("$fallback"), // Condition: to.Ptr("true"), // EndpointNames: []*string{ // to.Ptr("events")}, // IsEnabled: to.Ptr(true), // Source: to.Ptr(armiothub.RoutingSourceDeviceMessages), // }, // Routes: []*armiothub.RouteProperties{ // }, // }, // State: to.Ptr("Active"), // StorageEndpoints: map[string]*armiothub.StorageEndpointProperties{ // "$default": &armiothub.StorageEndpointProperties{ // ConnectionString: to.Ptr(""), // ContainerName: to.Ptr(""), // SasTTLAsIso8601: to.Ptr("PT1H"), // }, // }, // }, // SKU: &armiothub.SKUInfo{ // Name: to.Ptr(armiothub.IotHubSKUS1), // Capacity: to.Ptr[int64](1), // Tier: to.Ptr(armiothub.IotHubSKUTierStandard), // }, // SystemData: &armiothub.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-30T00:28:38.963Z"); return t}()), // }, // } }
Output:
Example (IotHubResourceCreateOrUpdate) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/32c178f2467f792a322f56174be244135d2c907f/specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_createOrUpdate.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/iothub/armiothub" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armiothub.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewResourceClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "testHub", armiothub.Description{ Location: to.Ptr("centraluseuap"), Tags: map[string]*string{}, Etag: to.Ptr("AAAAAAFD6M4="), Properties: &armiothub.Properties{ CloudToDevice: &armiothub.CloudToDeviceProperties{ DefaultTTLAsIso8601: to.Ptr("PT1H"), Feedback: &armiothub.FeedbackProperties{ LockDurationAsIso8601: to.Ptr("PT1M"), MaxDeliveryCount: to.Ptr[int32](10), TTLAsIso8601: to.Ptr("PT1H"), }, MaxDeliveryCount: to.Ptr[int32](10), }, EnableDataResidency: to.Ptr(false), EnableFileUploadNotifications: to.Ptr(false), EventHubEndpoints: map[string]*armiothub.EventHubProperties{ "events": { PartitionCount: to.Ptr[int32](2), RetentionTimeInDays: to.Ptr[int64](1), }, }, Features: to.Ptr(armiothub.CapabilitiesNone), IPFilterRules: []*armiothub.IPFilterRule{}, MessagingEndpoints: map[string]*armiothub.MessagingEndpointProperties{ "fileNotifications": { LockDurationAsIso8601: to.Ptr("PT1M"), MaxDeliveryCount: to.Ptr[int32](10), TTLAsIso8601: to.Ptr("PT1H"), }, }, MinTLSVersion: to.Ptr("1.2"), NetworkRuleSets: &armiothub.NetworkRuleSetProperties{ ApplyToBuiltInEventHubEndpoint: to.Ptr(true), DefaultAction: to.Ptr(armiothub.DefaultActionDeny), IPRules: []*armiothub.NetworkRuleSetIPRule{ { Action: to.Ptr(armiothub.NetworkRuleIPActionAllow), FilterName: to.Ptr("rule1"), IPMask: to.Ptr("131.117.159.53"), }, { Action: to.Ptr(armiothub.NetworkRuleIPActionAllow), FilterName: to.Ptr("rule2"), IPMask: to.Ptr("157.55.59.128/25"), }}, }, Routing: &armiothub.RoutingProperties{ Endpoints: &armiothub.RoutingEndpoints{ EventHubs: []*armiothub.RoutingEventHubProperties{}, ServiceBusQueues: []*armiothub.RoutingServiceBusQueueEndpointProperties{}, ServiceBusTopics: []*armiothub.RoutingServiceBusTopicEndpointProperties{}, StorageContainers: []*armiothub.RoutingStorageContainerProperties{}, }, FallbackRoute: &armiothub.FallbackRouteProperties{ Name: to.Ptr("$fallback"), Condition: to.Ptr("true"), EndpointNames: []*string{ to.Ptr("events")}, IsEnabled: to.Ptr(true), Source: to.Ptr(armiothub.RoutingSourceDeviceMessages), }, Routes: []*armiothub.RouteProperties{}, }, StorageEndpoints: map[string]*armiothub.StorageEndpointProperties{ "$default": { ConnectionString: to.Ptr(""), ContainerName: to.Ptr(""), SasTTLAsIso8601: to.Ptr("PT1H"), }, }, }, SKU: &armiothub.SKUInfo{ Name: to.Ptr(armiothub.IotHubSKUS1), Capacity: to.Ptr[int64](1), }, }, &armiothub.ResourceClientBeginCreateOrUpdateOptions{IfMatch: 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.Description = armiothub.Description{ // Name: to.Ptr("testHub"), // Type: to.Ptr("Microsoft.Devices/IotHubs"), // ID: to.Ptr("/subscriptions/ae24ff83-d2ca-4fc8-9717-05dae4bba489/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/testHub"), // Location: to.Ptr("centraluseuap"), // Tags: map[string]*string{ // }, // Etag: to.Ptr("AAAAAAFD6M4="), // Properties: &armiothub.Properties{ // CloudToDevice: &armiothub.CloudToDeviceProperties{ // DefaultTTLAsIso8601: to.Ptr("PT1H"), // Feedback: &armiothub.FeedbackProperties{ // LockDurationAsIso8601: to.Ptr("PT1M"), // MaxDeliveryCount: to.Ptr[int32](10), // TTLAsIso8601: to.Ptr("PT1H"), // }, // MaxDeliveryCount: to.Ptr[int32](10), // }, // EnableDataResidency: to.Ptr(false), // EnableFileUploadNotifications: to.Ptr(false), // EventHubEndpoints: map[string]*armiothub.EventHubProperties{ // "events": &armiothub.EventHubProperties{ // Path: to.Ptr("iot-dps-cit-hub-1"), // Endpoint: to.Ptr("sb://iothub-ns-iot-dps-ci-245306-76aca8e13b.servicebus.windows.net/"), // PartitionCount: to.Ptr[int32](2), // PartitionIDs: []*string{ // to.Ptr("0"), // to.Ptr("1")}, // RetentionTimeInDays: to.Ptr[int64](1), // }, // }, // Features: to.Ptr(armiothub.CapabilitiesNone), // HostName: to.Ptr("iot-dps-cit-hub-1.azure-devices.net"), // IPFilterRules: []*armiothub.IPFilterRule{ // { // Action: to.Ptr(armiothub.IPFilterActionTypeAccept), // FilterName: to.Ptr("rule1"), // IPMask: to.Ptr("131.117.159.53"), // }, // { // Action: to.Ptr(armiothub.IPFilterActionTypeAccept), // FilterName: to.Ptr("rule2"), // IPMask: to.Ptr("157.55.59.128/25"), // }}, // MessagingEndpoints: map[string]*armiothub.MessagingEndpointProperties{ // "fileNotifications": &armiothub.MessagingEndpointProperties{ // LockDurationAsIso8601: to.Ptr("PT1M"), // MaxDeliveryCount: to.Ptr[int32](10), // TTLAsIso8601: to.Ptr("PT1H"), // }, // }, // MinTLSVersion: to.Ptr("1.2"), // NetworkRuleSets: &armiothub.NetworkRuleSetProperties{ // ApplyToBuiltInEventHubEndpoint: to.Ptr(true), // DefaultAction: to.Ptr(armiothub.DefaultActionDeny), // IPRules: []*armiothub.NetworkRuleSetIPRule{ // { // Action: to.Ptr(armiothub.NetworkRuleIPActionAllow), // FilterName: to.Ptr("rule1"), // IPMask: to.Ptr("131.117.159.53"), // }, // { // Action: to.Ptr(armiothub.NetworkRuleIPActionAllow), // FilterName: to.Ptr("rule2"), // IPMask: to.Ptr("157.55.59.128/25"), // }}, // }, // ProvisioningState: to.Ptr("Succeeded"), // Routing: &armiothub.RoutingProperties{ // Endpoints: &armiothub.RoutingEndpoints{ // EventHubs: []*armiothub.RoutingEventHubProperties{ // }, // ServiceBusQueues: []*armiothub.RoutingServiceBusQueueEndpointProperties{ // }, // ServiceBusTopics: []*armiothub.RoutingServiceBusTopicEndpointProperties{ // }, // StorageContainers: []*armiothub.RoutingStorageContainerProperties{ // }, // }, // FallbackRoute: &armiothub.FallbackRouteProperties{ // Name: to.Ptr("$fallback"), // Condition: to.Ptr("true"), // EndpointNames: []*string{ // to.Ptr("events")}, // IsEnabled: to.Ptr(true), // Source: to.Ptr(armiothub.RoutingSourceDeviceMessages), // }, // Routes: []*armiothub.RouteProperties{ // }, // }, // State: to.Ptr("Active"), // StorageEndpoints: map[string]*armiothub.StorageEndpointProperties{ // "$default": &armiothub.StorageEndpointProperties{ // ConnectionString: to.Ptr(""), // ContainerName: to.Ptr(""), // SasTTLAsIso8601: to.Ptr("PT1H"), // }, // }, // }, // SKU: &armiothub.SKUInfo{ // Name: to.Ptr(armiothub.IotHubSKUS1), // Capacity: to.Ptr[int64](1), // Tier: to.Ptr(armiothub.IotHubSKUTierStandard), // }, // SystemData: &armiothub.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-30T00:28:38.963Z"); return t}()), // }, // } }
Output:
func (*ResourceClient) BeginDelete ¶ added in v0.3.0
func (client *ResourceClient) BeginDelete(ctx context.Context, resourceGroupName string, resourceName string, options *ResourceClientBeginDeleteOptions) (*runtime.Poller[ResourceClientDeleteResponse], error)
BeginDelete - Delete an IoT hub. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-06-30
- resourceGroupName - The name of the resource group that contains the IoT hub.
- resourceName - The name of the IoT hub.
- options - ResourceClientBeginDeleteOptions contains the optional parameters for the ResourceClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/32c178f2467f792a322f56174be244135d2c907f/specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_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/iothub/armiothub" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armiothub.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewResourceClient().BeginDelete(ctx, "myResourceGroup", "testHub", 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.Description = armiothub.Description{ // Name: to.Ptr("testHub"), // Type: to.Ptr("Microsoft.Devices/IotHubs"), // ID: to.Ptr("/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/testHub"), // Location: to.Ptr("centraluseuap"), // Tags: map[string]*string{ // }, // Etag: to.Ptr("AAAAAAFD6M4="), // Properties: &armiothub.Properties{ // CloudToDevice: &armiothub.CloudToDeviceProperties{ // DefaultTTLAsIso8601: to.Ptr("PT1H"), // Feedback: &armiothub.FeedbackProperties{ // LockDurationAsIso8601: to.Ptr("PT1M"), // MaxDeliveryCount: to.Ptr[int32](10), // TTLAsIso8601: to.Ptr("PT1H"), // }, // MaxDeliveryCount: to.Ptr[int32](10), // }, // EnableFileUploadNotifications: to.Ptr(false), // EventHubEndpoints: map[string]*armiothub.EventHubProperties{ // "events": &armiothub.EventHubProperties{ // Path: to.Ptr("iot-dps-cit-hub-1"), // Endpoint: to.Ptr("sb://iothub-ns-iot-dps-ci-245306-76aca8e13b.servicebus.windows.net/"), // PartitionCount: to.Ptr[int32](2), // PartitionIDs: []*string{ // to.Ptr("0"), // to.Ptr("1")}, // RetentionTimeInDays: to.Ptr[int64](1), // }, // }, // Features: to.Ptr(armiothub.CapabilitiesNone), // HostName: to.Ptr("iot-dps-cit-hub-1.azure-devices.net"), // IPFilterRules: []*armiothub.IPFilterRule{ // { // Action: to.Ptr(armiothub.IPFilterActionTypeAccept), // FilterName: to.Ptr("rule1"), // IPMask: to.Ptr("131.117.159.53"), // }, // { // Action: to.Ptr(armiothub.IPFilterActionTypeAccept), // FilterName: to.Ptr("rule2"), // IPMask: to.Ptr("157.55.59.128/25"), // }}, // MessagingEndpoints: map[string]*armiothub.MessagingEndpointProperties{ // "fileNotifications": &armiothub.MessagingEndpointProperties{ // LockDurationAsIso8601: to.Ptr("PT1M"), // MaxDeliveryCount: to.Ptr[int32](10), // TTLAsIso8601: to.Ptr("PT1H"), // }, // }, // NetworkRuleSets: &armiothub.NetworkRuleSetProperties{ // ApplyToBuiltInEventHubEndpoint: to.Ptr(true), // DefaultAction: to.Ptr(armiothub.DefaultActionDeny), // IPRules: []*armiothub.NetworkRuleSetIPRule{ // { // Action: to.Ptr(armiothub.NetworkRuleIPActionAllow), // FilterName: to.Ptr("rule1"), // IPMask: to.Ptr("131.117.159.53"), // }, // { // Action: to.Ptr(armiothub.NetworkRuleIPActionAllow), // FilterName: to.Ptr("rule2"), // IPMask: to.Ptr("157.55.59.128/25"), // }}, // }, // ProvisioningState: to.Ptr("Succeeded"), // Routing: &armiothub.RoutingProperties{ // Endpoints: &armiothub.RoutingEndpoints{ // EventHubs: []*armiothub.RoutingEventHubProperties{ // }, // ServiceBusQueues: []*armiothub.RoutingServiceBusQueueEndpointProperties{ // }, // ServiceBusTopics: []*armiothub.RoutingServiceBusTopicEndpointProperties{ // }, // StorageContainers: []*armiothub.RoutingStorageContainerProperties{ // }, // }, // FallbackRoute: &armiothub.FallbackRouteProperties{ // Condition: to.Ptr("true"), // EndpointNames: []*string{ // to.Ptr("events")}, // IsEnabled: to.Ptr(true), // Source: to.Ptr(armiothub.RoutingSourceDeviceMessages), // }, // Routes: []*armiothub.RouteProperties{ // }, // }, // State: to.Ptr("Active"), // StorageEndpoints: map[string]*armiothub.StorageEndpointProperties{ // "$default": &armiothub.StorageEndpointProperties{ // ConnectionString: to.Ptr(""), // ContainerName: to.Ptr(""), // SasTTLAsIso8601: to.Ptr("PT1H"), // }, // }, // }, // SKU: &armiothub.SKUInfo{ // Name: to.Ptr(armiothub.IotHubSKUS1), // Capacity: to.Ptr[int64](1), // Tier: to.Ptr(armiothub.IotHubSKUTierStandard), // }, // SystemData: &armiothub.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-30T00:28:38.963Z"); return t}()), // }, // } }
Output:
func (*ResourceClient) BeginUpdate ¶ added in v0.3.0
func (client *ResourceClient) BeginUpdate(ctx context.Context, resourceGroupName string, resourceName string, iotHubTags TagsResource, options *ResourceClientBeginUpdateOptions) (*runtime.Poller[ResourceClientUpdateResponse], error)
BeginUpdate - Update an existing IoT Hub tags. to update other fields use the CreateOrUpdate method If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-06-30
- resourceGroupName - Resource group identifier.
- resourceName - Name of iot hub to update.
- iotHubTags - Updated tag information to set into the iot hub instance.
- options - ResourceClientBeginUpdateOptions contains the optional parameters for the ResourceClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/32c178f2467f792a322f56174be244135d2c907f/specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_patch.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/iothub/armiothub" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armiothub.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewResourceClient().BeginUpdate(ctx, "myResourceGroup", "myHub", armiothub.TagsResource{ Tags: map[string]*string{ "foo": to.Ptr("bar"), }, }, 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.Description = armiothub.Description{ // Name: to.Ptr("testHub"), // Type: to.Ptr("Microsoft.Devices/IotHubs"), // ID: to.Ptr("/subscriptions/ae24ff83-d2ca-4fc8-9717-05dae4bba489/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/testHub"), // Location: to.Ptr("centraluseuap"), // Tags: map[string]*string{ // "foo": to.Ptr("bar"), // }, // Etag: to.Ptr("AAAAAAFD6M4="), // Properties: &armiothub.Properties{ // CloudToDevice: &armiothub.CloudToDeviceProperties{ // DefaultTTLAsIso8601: to.Ptr("PT1H"), // Feedback: &armiothub.FeedbackProperties{ // LockDurationAsIso8601: to.Ptr("PT1M"), // MaxDeliveryCount: to.Ptr[int32](10), // TTLAsIso8601: to.Ptr("PT1H"), // }, // MaxDeliveryCount: to.Ptr[int32](10), // }, // EnableFileUploadNotifications: to.Ptr(false), // EventHubEndpoints: map[string]*armiothub.EventHubProperties{ // "events": &armiothub.EventHubProperties{ // Path: to.Ptr("iot-dps-cit-hub-1"), // Endpoint: to.Ptr("sb://iothub-ns-iot-dps-ci-245306-76aca8e13b.servicebus.windows.net/"), // PartitionCount: to.Ptr[int32](2), // PartitionIDs: []*string{ // to.Ptr("0"), // to.Ptr("1")}, // RetentionTimeInDays: to.Ptr[int64](1), // }, // }, // Features: to.Ptr(armiothub.CapabilitiesNone), // HostName: to.Ptr("iot-dps-cit-hub-1.azure-devices.net"), // IPFilterRules: []*armiothub.IPFilterRule{ // { // Action: to.Ptr(armiothub.IPFilterActionTypeAccept), // FilterName: to.Ptr("rule1"), // IPMask: to.Ptr("131.117.159.53"), // }, // { // Action: to.Ptr(armiothub.IPFilterActionTypeAccept), // FilterName: to.Ptr("rule2"), // IPMask: to.Ptr("157.55.59.128/25"), // }}, // MessagingEndpoints: map[string]*armiothub.MessagingEndpointProperties{ // "fileNotifications": &armiothub.MessagingEndpointProperties{ // LockDurationAsIso8601: to.Ptr("PT1M"), // MaxDeliveryCount: to.Ptr[int32](10), // TTLAsIso8601: to.Ptr("PT1H"), // }, // }, // NetworkRuleSets: &armiothub.NetworkRuleSetProperties{ // ApplyToBuiltInEventHubEndpoint: to.Ptr(true), // DefaultAction: to.Ptr(armiothub.DefaultActionDeny), // IPRules: []*armiothub.NetworkRuleSetIPRule{ // { // Action: to.Ptr(armiothub.NetworkRuleIPActionAllow), // FilterName: to.Ptr("rule1"), // IPMask: to.Ptr("131.117.159.53"), // }, // { // Action: to.Ptr(armiothub.NetworkRuleIPActionAllow), // FilterName: to.Ptr("rule2"), // IPMask: to.Ptr("157.55.59.128/25"), // }}, // }, // ProvisioningState: to.Ptr("Succeeded"), // Routing: &armiothub.RoutingProperties{ // Endpoints: &armiothub.RoutingEndpoints{ // EventHubs: []*armiothub.RoutingEventHubProperties{ // }, // ServiceBusQueues: []*armiothub.RoutingServiceBusQueueEndpointProperties{ // }, // ServiceBusTopics: []*armiothub.RoutingServiceBusTopicEndpointProperties{ // }, // StorageContainers: []*armiothub.RoutingStorageContainerProperties{ // }, // }, // FallbackRoute: &armiothub.FallbackRouteProperties{ // Name: to.Ptr("$fallback"), // Condition: to.Ptr("true"), // EndpointNames: []*string{ // to.Ptr("events")}, // IsEnabled: to.Ptr(true), // Source: to.Ptr(armiothub.RoutingSourceDeviceMessages), // }, // Routes: []*armiothub.RouteProperties{ // }, // }, // State: to.Ptr("Active"), // StorageEndpoints: map[string]*armiothub.StorageEndpointProperties{ // "$default": &armiothub.StorageEndpointProperties{ // ConnectionString: to.Ptr(""), // ContainerName: to.Ptr(""), // SasTTLAsIso8601: to.Ptr("PT1H"), // }, // }, // }, // SKU: &armiothub.SKUInfo{ // Name: to.Ptr(armiothub.IotHubSKUS1), // Capacity: to.Ptr[int64](1), // Tier: to.Ptr(armiothub.IotHubSKUTierStandard), // }, // SystemData: &armiothub.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-30T00:28:38.963Z"); return t}()), // }, // } }
Output:
func (*ResourceClient) CheckNameAvailability ¶ added in v0.3.0
func (client *ResourceClient) CheckNameAvailability(ctx context.Context, operationInputs OperationInputs, options *ResourceClientCheckNameAvailabilityOptions) (ResourceClientCheckNameAvailabilityResponse, error)
CheckNameAvailability - Check if an IoT hub name is available. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-06-30
- operationInputs - Set the name parameter in the OperationInputs structure to the name of the IoT hub to check.
- options - ResourceClientCheckNameAvailabilityOptions contains the optional parameters for the ResourceClient.CheckNameAvailability method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/32c178f2467f792a322f56174be244135d2c907f/specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/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/iothub/armiothub" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armiothub.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewResourceClient().CheckNameAvailability(ctx, armiothub.OperationInputs{ Name: to.Ptr("test-request"), }, 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.NameAvailabilityInfo = armiothub.NameAvailabilityInfo{ // Message: to.Ptr(""), // NameAvailable: to.Ptr(true), // Reason: to.Ptr(armiothub.IotHubNameUnavailabilityReasonInvalid), // } }
Output:
func (*ResourceClient) CreateEventHubConsumerGroup ¶ added in v0.3.0
func (client *ResourceClient) CreateEventHubConsumerGroup(ctx context.Context, resourceGroupName string, resourceName string, eventHubEndpointName string, name string, consumerGroupBody EventHubConsumerGroupBodyDescription, options *ResourceClientCreateEventHubConsumerGroupOptions) (ResourceClientCreateEventHubConsumerGroupResponse, error)
CreateEventHubConsumerGroup - Add a consumer group to an Event Hub-compatible endpoint in an IoT hub. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-06-30
- resourceGroupName - The name of the resource group that contains the IoT hub.
- resourceName - The name of the IoT hub.
- eventHubEndpointName - The name of the Event Hub-compatible endpoint in the IoT hub.
- name - The name of the consumer group to add.
- consumerGroupBody - The consumer group to add.
- options - ResourceClientCreateEventHubConsumerGroupOptions contains the optional parameters for the ResourceClient.CreateEventHubConsumerGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/32c178f2467f792a322f56174be244135d2c907f/specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_createconsumergroup.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/iothub/armiothub" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armiothub.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewResourceClient().CreateEventHubConsumerGroup(ctx, "myResourceGroup", "testHub", "events", "test", armiothub.EventHubConsumerGroupBodyDescription{ Properties: &armiothub.EventHubConsumerGroupName{ Name: to.Ptr("test"), }, }, 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.EventHubConsumerGroupInfo = armiothub.EventHubConsumerGroupInfo{ // Name: to.Ptr("test"), // Type: to.Ptr("Microsoft.Devices/IotHubs/EventHubEndpoints/ConsumerGroups"), // Etag: to.Ptr("AAAAAAFD6M4="), // ID: to.Ptr("/subscriptions/cmd-sub-1/resourceGroups/cmd-rg-1/providers/Microsoft.Devices/IotHubs/test-hub-2/eventHubEndpoints/events/ConsumerGroups/%24Default"), // Properties: map[string]any{ // "created": "Thu, 15 Jun 2017 19:20:58 GMT", // }, // } }
Output:
func (*ResourceClient) DeleteEventHubConsumerGroup ¶ added in v0.3.0
func (client *ResourceClient) DeleteEventHubConsumerGroup(ctx context.Context, resourceGroupName string, resourceName string, eventHubEndpointName string, name string, options *ResourceClientDeleteEventHubConsumerGroupOptions) (ResourceClientDeleteEventHubConsumerGroupResponse, error)
DeleteEventHubConsumerGroup - Delete a consumer group from an Event Hub-compatible endpoint in an IoT hub. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-06-30
- resourceGroupName - The name of the resource group that contains the IoT hub.
- resourceName - The name of the IoT hub.
- eventHubEndpointName - The name of the Event Hub-compatible endpoint in the IoT hub.
- name - The name of the consumer group to delete.
- options - ResourceClientDeleteEventHubConsumerGroupOptions contains the optional parameters for the ResourceClient.DeleteEventHubConsumerGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/32c178f2467f792a322f56174be244135d2c907f/specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_deleteconsumergroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armiothub.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewResourceClient().DeleteEventHubConsumerGroup(ctx, "myResourceGroup", "testHub", "events", "test", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*ResourceClient) ExportDevices ¶ added in v0.3.0
func (client *ResourceClient) ExportDevices(ctx context.Context, resourceGroupName string, resourceName string, exportDevicesParameters ExportDevicesRequest, options *ResourceClientExportDevicesOptions) (ResourceClientExportDevicesResponse, error)
ExportDevices - Exports all the device identities in the IoT hub identity registry to an Azure Storage blob container. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-06-30
- resourceGroupName - The name of the resource group that contains the IoT hub.
- resourceName - The name of the IoT hub.
- exportDevicesParameters - The parameters that specify the export devices operation.
- options - ResourceClientExportDevicesOptions contains the optional parameters for the ResourceClient.ExportDevices method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/32c178f2467f792a322f56174be244135d2c907f/specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_exportdevices.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/iothub/armiothub" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armiothub.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewResourceClient().ExportDevices(ctx, "myResourceGroup", "testHub", armiothub.ExportDevicesRequest{ ExcludeKeys: to.Ptr(true), ExportBlobContainerURI: to.Ptr("testBlob"), }, 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.JobResponse = armiothub.JobResponse{ // Type: to.Ptr(armiothub.JobTypeUnknown), // EndTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC1123, "2017-06-15T19:20:58.000Z"); return t}()), // JobID: to.Ptr("test"), // StartTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC1123, "2017-06-15T19:20:58.000Z"); return t}()), // Status: to.Ptr(armiothub.JobStatusUnknown), // } }
Output:
func (*ResourceClient) Get ¶ added in v0.3.0
func (client *ResourceClient) Get(ctx context.Context, resourceGroupName string, resourceName string, options *ResourceClientGetOptions) (ResourceClientGetResponse, error)
Get - Get the non-security related metadata of an IoT hub. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-06-30
- resourceGroupName - The name of the resource group that contains the IoT hub.
- resourceName - The name of the IoT hub.
- options - ResourceClientGetOptions contains the optional parameters for the ResourceClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/32c178f2467f792a322f56174be244135d2c907f/specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armiothub.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewResourceClient().Get(ctx, "myResourceGroup", "testHub", 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.Description = armiothub.Description{ // Name: to.Ptr("testHub"), // Type: to.Ptr("Microsoft.Devices/IotHubs"), // ID: to.Ptr("/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/testHub"), // Location: to.Ptr("centraluseuap"), // Tags: map[string]*string{ // }, // Etag: to.Ptr("AAAAAAFD6M4="), // Properties: &armiothub.Properties{ // CloudToDevice: &armiothub.CloudToDeviceProperties{ // DefaultTTLAsIso8601: to.Ptr("PT1H"), // Feedback: &armiothub.FeedbackProperties{ // LockDurationAsIso8601: to.Ptr("PT1M"), // MaxDeliveryCount: to.Ptr[int32](10), // TTLAsIso8601: to.Ptr("PT1H"), // }, // MaxDeliveryCount: to.Ptr[int32](10), // }, // EnableFileUploadNotifications: to.Ptr(false), // EventHubEndpoints: map[string]*armiothub.EventHubProperties{ // "events": &armiothub.EventHubProperties{ // Path: to.Ptr("iot-dps-cit-hub-1"), // Endpoint: to.Ptr("sb://iothub-ns-iot-dps-ci-245306-76aca8e13b.servicebus.windows.net/"), // PartitionCount: to.Ptr[int32](2), // PartitionIDs: []*string{ // to.Ptr("0"), // to.Ptr("1")}, // RetentionTimeInDays: to.Ptr[int64](1), // }, // }, // Features: to.Ptr(armiothub.CapabilitiesNone), // HostName: to.Ptr("iot-dps-cit-hub-1.azure-devices.net"), // IPFilterRules: []*armiothub.IPFilterRule{ // { // Action: to.Ptr(armiothub.IPFilterActionTypeAccept), // FilterName: to.Ptr("rule1"), // IPMask: to.Ptr("131.117.159.53"), // }, // { // Action: to.Ptr(armiothub.IPFilterActionTypeAccept), // FilterName: to.Ptr("rule2"), // IPMask: to.Ptr("157.55.59.128/25"), // }}, // Locations: []*armiothub.LocationDescription{ // { // Location: to.Ptr("West US"), // Role: to.Ptr(armiothub.IotHubReplicaRoleTypePrimary), // }, // { // Location: to.Ptr("East US"), // Role: to.Ptr(armiothub.IotHubReplicaRoleTypeSecondary), // }}, // MessagingEndpoints: map[string]*armiothub.MessagingEndpointProperties{ // "fileNotifications": &armiothub.MessagingEndpointProperties{ // LockDurationAsIso8601: to.Ptr("PT1M"), // MaxDeliveryCount: to.Ptr[int32](10), // TTLAsIso8601: to.Ptr("PT1H"), // }, // }, // MinTLSVersion: to.Ptr("1.2"), // NetworkRuleSets: &armiothub.NetworkRuleSetProperties{ // ApplyToBuiltInEventHubEndpoint: to.Ptr(true), // DefaultAction: to.Ptr(armiothub.DefaultActionDeny), // IPRules: []*armiothub.NetworkRuleSetIPRule{ // { // Action: to.Ptr(armiothub.NetworkRuleIPActionAllow), // FilterName: to.Ptr("rule1"), // IPMask: to.Ptr("131.117.159.53"), // }, // { // Action: to.Ptr(armiothub.NetworkRuleIPActionAllow), // FilterName: to.Ptr("rule2"), // IPMask: to.Ptr("157.55.59.128/25"), // }}, // }, // ProvisioningState: to.Ptr("Succeeded"), // Routing: &armiothub.RoutingProperties{ // Endpoints: &armiothub.RoutingEndpoints{ // EventHubs: []*armiothub.RoutingEventHubProperties{ // }, // ServiceBusQueues: []*armiothub.RoutingServiceBusQueueEndpointProperties{ // }, // ServiceBusTopics: []*armiothub.RoutingServiceBusTopicEndpointProperties{ // }, // StorageContainers: []*armiothub.RoutingStorageContainerProperties{ // }, // }, // FallbackRoute: &armiothub.FallbackRouteProperties{ // Condition: to.Ptr("true"), // EndpointNames: []*string{ // to.Ptr("events")}, // IsEnabled: to.Ptr(true), // Source: to.Ptr(armiothub.RoutingSourceDeviceMessages), // }, // Routes: []*armiothub.RouteProperties{ // }, // }, // State: to.Ptr("Active"), // StorageEndpoints: map[string]*armiothub.StorageEndpointProperties{ // "$default": &armiothub.StorageEndpointProperties{ // ConnectionString: to.Ptr(""), // ContainerName: to.Ptr(""), // SasTTLAsIso8601: to.Ptr("PT1H"), // }, // }, // }, // SKU: &armiothub.SKUInfo{ // Name: to.Ptr(armiothub.IotHubSKUS1), // Capacity: to.Ptr[int64](1), // Tier: to.Ptr(armiothub.IotHubSKUTierStandard), // }, // SystemData: &armiothub.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-30T00:28:38.963Z"); return t}()), // }, // } }
Output:
func (*ResourceClient) GetEventHubConsumerGroup ¶ added in v0.3.0
func (client *ResourceClient) GetEventHubConsumerGroup(ctx context.Context, resourceGroupName string, resourceName string, eventHubEndpointName string, name string, options *ResourceClientGetEventHubConsumerGroupOptions) (ResourceClientGetEventHubConsumerGroupResponse, error)
GetEventHubConsumerGroup - Get a consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-06-30
- resourceGroupName - The name of the resource group that contains the IoT hub.
- resourceName - The name of the IoT hub.
- eventHubEndpointName - The name of the Event Hub-compatible endpoint in the IoT hub.
- name - The name of the consumer group to retrieve.
- options - ResourceClientGetEventHubConsumerGroupOptions contains the optional parameters for the ResourceClient.GetEventHubConsumerGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/32c178f2467f792a322f56174be244135d2c907f/specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_getconsumergroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armiothub.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewResourceClient().GetEventHubConsumerGroup(ctx, "myResourceGroup", "testHub", "events", "test", 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.EventHubConsumerGroupInfo = armiothub.EventHubConsumerGroupInfo{ // Name: to.Ptr("test"), // Type: to.Ptr("Microsoft.Devices/IotHubs/EventHubEndpoints/ConsumerGroups"), // Etag: to.Ptr("AAAAAAFD6M4="), // ID: to.Ptr("/subscriptions/cmd-sub-1/resourceGroups/cmd-rg-1/providers/Microsoft.Devices/IotHubs/test-hub-2/eventHubEndpoints/events/ConsumerGroups/%24Default"), // Properties: map[string]any{ // "created": "Thu, 15 Jun 2017 19:20:58 GMT", // }, // } }
Output:
func (*ResourceClient) GetJob ¶ added in v0.3.0
func (client *ResourceClient) GetJob(ctx context.Context, resourceGroupName string, resourceName string, jobID string, options *ResourceClientGetJobOptions) (ResourceClientGetJobResponse, error)
GetJob - Get the details of a job from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-06-30
- resourceGroupName - The name of the resource group that contains the IoT hub.
- resourceName - The name of the IoT hub.
- jobID - The job identifier.
- options - ResourceClientGetJobOptions contains the optional parameters for the ResourceClient.GetJob method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/32c178f2467f792a322f56174be244135d2c907f/specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_getjob.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armiothub.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewResourceClient().GetJob(ctx, "myResourceGroup", "testHub", "test", 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.JobResponse = armiothub.JobResponse{ // Type: to.Ptr(armiothub.JobTypeUnknown), // EndTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC1123, "2017-06-15T19:20:58.000Z"); return t}()), // JobID: to.Ptr("test"), // StartTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC1123, "2017-06-15T19:20:58.000Z"); return t}()), // Status: to.Ptr(armiothub.JobStatusUnknown), // } }
Output:
func (*ResourceClient) GetKeysForKeyName ¶ added in v0.3.0
func (client *ResourceClient) GetKeysForKeyName(ctx context.Context, resourceGroupName string, resourceName string, keyName string, options *ResourceClientGetKeysForKeyNameOptions) (ResourceClientGetKeysForKeyNameResponse, error)
GetKeysForKeyName - Get a shared access policy by name from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-06-30
- resourceGroupName - The name of the resource group that contains the IoT hub.
- resourceName - The name of the IoT hub.
- keyName - The name of the shared access policy.
- options - ResourceClientGetKeysForKeyNameOptions contains the optional parameters for the ResourceClient.GetKeysForKeyName method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/32c178f2467f792a322f56174be244135d2c907f/specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_getkey.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armiothub.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewResourceClient().GetKeysForKeyName(ctx, "myResourceGroup", "testHub", "iothubowner", 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.SharedAccessSignatureAuthorizationRule = armiothub.SharedAccessSignatureAuthorizationRule{ // KeyName: to.Ptr("iothubowner"), // PrimaryKey: to.Ptr("<primaryKey>"), // Rights: to.Ptr(armiothub.AccessRightsRegistryWriteServiceConnectDeviceConnect), // SecondaryKey: to.Ptr("<secondaryKey>"), // } }
Output:
func (*ResourceClient) GetStats ¶ added in v0.3.0
func (client *ResourceClient) GetStats(ctx context.Context, resourceGroupName string, resourceName string, options *ResourceClientGetStatsOptions) (ResourceClientGetStatsResponse, error)
GetStats - Get the statistics from an IoT hub. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-06-30
- resourceGroupName - The name of the resource group that contains the IoT hub.
- resourceName - The name of the IoT hub.
- options - ResourceClientGetStatsOptions contains the optional parameters for the ResourceClient.GetStats method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/32c178f2467f792a322f56174be244135d2c907f/specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_stats.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armiothub.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewResourceClient().GetStats(ctx, "myResourceGroup", "testHub", 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.RegistryStatistics = armiothub.RegistryStatistics{ // DisabledDeviceCount: to.Ptr[int64](0), // EnabledDeviceCount: to.Ptr[int64](0), // TotalDeviceCount: to.Ptr[int64](0), // } }
Output:
func (*ResourceClient) ImportDevices ¶ added in v0.3.0
func (client *ResourceClient) ImportDevices(ctx context.Context, resourceGroupName string, resourceName string, importDevicesParameters ImportDevicesRequest, options *ResourceClientImportDevicesOptions) (ResourceClientImportDevicesResponse, error)
ImportDevices - Import, update, or delete device identities in the IoT hub identity registry from a blob. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-06-30
- resourceGroupName - The name of the resource group that contains the IoT hub.
- resourceName - The name of the IoT hub.
- importDevicesParameters - The parameters that specify the import devices operation.
- options - ResourceClientImportDevicesOptions contains the optional parameters for the ResourceClient.ImportDevices method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/32c178f2467f792a322f56174be244135d2c907f/specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_importdevices.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/iothub/armiothub" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armiothub.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewResourceClient().ImportDevices(ctx, "myResourceGroup", "testHub", armiothub.ImportDevicesRequest{ InputBlobContainerURI: to.Ptr("testBlob"), OutputBlobContainerURI: to.Ptr("testBlob"), }, 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.JobResponse = armiothub.JobResponse{ // Type: to.Ptr(armiothub.JobTypeUnknown), // EndTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC1123, "2017-06-15T19:20:58.000Z"); return t}()), // JobID: to.Ptr("test"), // StartTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC1123, "2017-06-15T19:20:58.000Z"); return t}()), // Status: to.Ptr(armiothub.JobStatusUnknown), // } }
Output:
func (*ResourceClient) NewGetEndpointHealthPager ¶ added in v0.5.0
func (client *ResourceClient) NewGetEndpointHealthPager(resourceGroupName string, iotHubName string, options *ResourceClientGetEndpointHealthOptions) *runtime.Pager[ResourceClientGetEndpointHealthResponse]
NewGetEndpointHealthPager - Get the health for routing endpoints.
Generated from API version 2023-06-30
- options - ResourceClientGetEndpointHealthOptions contains the optional parameters for the ResourceClient.NewGetEndpointHealthPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/32c178f2467f792a322f56174be244135d2c907f/specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_routingendpointhealth.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armiothub.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewResourceClient().NewGetEndpointHealthPager("myResourceGroup", "testHub", 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.EndpointHealthDataListResult = armiothub.EndpointHealthDataListResult{ // Value: []*armiothub.EndpointHealthData{ // { // EndpointID: to.Ptr("id1"), // HealthStatus: to.Ptr(armiothub.EndpointHealthStatusHealthy), // LastSendAttemptTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC1123, "2022-09-13T18:04:32.000Z"); return t}()), // LastSuccessfulSendAttemptTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC1123, "2022-09-13T18:04:32.000Z"); return t}()), // }, // { // EndpointID: to.Ptr("id2"), // HealthStatus: to.Ptr(armiothub.EndpointHealthStatusUnknown), // }, // { // EndpointID: to.Ptr("id3"), // HealthStatus: to.Ptr(armiothub.EndpointHealthStatusUnhealthy), // LastKnownError: to.Ptr("NotFound"), // LastKnownErrorTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC1123, "2022-09-13T18:04:32.000Z"); return t}()), // LastSendAttemptTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC1123, "2022-09-13T18:04:32.000Z"); return t}()), // LastSuccessfulSendAttemptTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC1123, "2022-09-13T18:04:32.000Z"); return t}()), // }}, // } } }
Output:
func (*ResourceClient) NewGetQuotaMetricsPager ¶ added in v0.5.0
func (client *ResourceClient) NewGetQuotaMetricsPager(resourceGroupName string, resourceName string, options *ResourceClientGetQuotaMetricsOptions) *runtime.Pager[ResourceClientGetQuotaMetricsResponse]
NewGetQuotaMetricsPager - Get the quota metrics for an IoT hub.
Generated from API version 2023-06-30
- resourceGroupName - The name of the resource group that contains the IoT hub.
- resourceName - The name of the IoT hub.
- options - ResourceClientGetQuotaMetricsOptions contains the optional parameters for the ResourceClient.NewGetQuotaMetricsPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/32c178f2467f792a322f56174be244135d2c907f/specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_quotametrics.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armiothub.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewResourceClient().NewGetQuotaMetricsPager("myResourceGroup", "testHub", 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.QuotaMetricInfoListResult = armiothub.QuotaMetricInfoListResult{ // Value: []*armiothub.QuotaMetricInfo{ // { // Name: to.Ptr("TotalMessages"), // CurrentValue: to.Ptr[int64](0), // MaxValue: to.Ptr[int64](400000), // }, // { // Name: to.Ptr("TotalDeviceCount"), // CurrentValue: to.Ptr[int64](0), // MaxValue: to.Ptr[int64](500000), // }}, // } } }
Output:
func (*ResourceClient) NewGetValidSKUsPager ¶ added in v0.5.0
func (client *ResourceClient) NewGetValidSKUsPager(resourceGroupName string, resourceName string, options *ResourceClientGetValidSKUsOptions) *runtime.Pager[ResourceClientGetValidSKUsResponse]
NewGetValidSKUsPager - Get the list of valid SKUs for an IoT hub.
Generated from API version 2023-06-30
- resourceGroupName - The name of the resource group that contains the IoT hub.
- resourceName - The name of the IoT hub.
- options - ResourceClientGetValidSKUsOptions contains the optional parameters for the ResourceClient.NewGetValidSKUsPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/32c178f2467f792a322f56174be244135d2c907f/specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_getskus.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armiothub.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewResourceClient().NewGetValidSKUsPager("myResourceGroup", "testHub", 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.SKUDescriptionListResult = armiothub.SKUDescriptionListResult{ // Value: []*armiothub.SKUDescription{ // { // Capacity: &armiothub.Capacity{ // Default: to.Ptr[int64](1), // ScaleType: to.Ptr(armiothub.IotHubScaleTypeManual), // }, // ResourceType: to.Ptr("Microsoft.Devices/IotHubs"), // SKU: &armiothub.SKUInfo{ // Name: to.Ptr(armiothub.IotHubSKUS1), // Tier: to.Ptr(armiothub.IotHubSKUTierStandard), // }, // }, // { // Capacity: &armiothub.Capacity{ // Default: to.Ptr[int64](1), // Maximum: to.Ptr[int64](200), // Minimum: to.Ptr[int64](1), // ScaleType: to.Ptr(armiothub.IotHubScaleTypeManual), // }, // ResourceType: to.Ptr("Microsoft.Devices/IotHubs"), // SKU: &armiothub.SKUInfo{ // Name: to.Ptr(armiothub.IotHubSKUS2), // Tier: to.Ptr(armiothub.IotHubSKUTierStandard), // }, // }, // { // Capacity: &armiothub.Capacity{ // Default: to.Ptr[int64](1), // Maximum: to.Ptr[int64](10), // Minimum: to.Ptr[int64](1), // ScaleType: to.Ptr(armiothub.IotHubScaleTypeManual), // }, // ResourceType: to.Ptr("Microsoft.Devices/IotHubs"), // SKU: &armiothub.SKUInfo{ // Name: to.Ptr(armiothub.IotHubSKUS3), // Tier: to.Ptr(armiothub.IotHubSKUTierStandard), // }, // }}, // } } }
Output:
func (*ResourceClient) NewListByResourceGroupPager ¶ added in v0.5.0
func (client *ResourceClient) NewListByResourceGroupPager(resourceGroupName string, options *ResourceClientListByResourceGroupOptions) *runtime.Pager[ResourceClientListByResourceGroupResponse]
NewListByResourceGroupPager - Get all the IoT hubs in a resource group.
Generated from API version 2023-06-30
- resourceGroupName - The name of the resource group that contains the IoT hub.
- options - ResourceClientListByResourceGroupOptions contains the optional parameters for the ResourceClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/32c178f2467f792a322f56174be244135d2c907f/specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_listbyrg.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armiothub.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewResourceClient().NewListByResourceGroupPager("myResourceGroup", 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.DescriptionListResult = armiothub.DescriptionListResult{ // Value: []*armiothub.Description{ // { // Name: to.Ptr("testHub"), // Type: to.Ptr("Microsoft.Devices/IotHubs"), // ID: to.Ptr("/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/testHub"), // Location: to.Ptr("centraluseuap"), // Tags: map[string]*string{ // }, // Etag: to.Ptr("AAAAAAFD6M4="), // Properties: &armiothub.Properties{ // CloudToDevice: &armiothub.CloudToDeviceProperties{ // DefaultTTLAsIso8601: to.Ptr("PT1H"), // Feedback: &armiothub.FeedbackProperties{ // LockDurationAsIso8601: to.Ptr("PT1M"), // MaxDeliveryCount: to.Ptr[int32](10), // TTLAsIso8601: to.Ptr("PT1H"), // }, // MaxDeliveryCount: to.Ptr[int32](10), // }, // EnableFileUploadNotifications: to.Ptr(false), // EventHubEndpoints: map[string]*armiothub.EventHubProperties{ // "events": &armiothub.EventHubProperties{ // Path: to.Ptr("iot-dps-cit-hub-1"), // Endpoint: to.Ptr("sb://iothub-ns-iot-dps-ci-245306-76aca8e13b.servicebus.windows.net/"), // PartitionCount: to.Ptr[int32](2), // PartitionIDs: []*string{ // to.Ptr("0"), // to.Ptr("1")}, // RetentionTimeInDays: to.Ptr[int64](1), // }, // }, // Features: to.Ptr(armiothub.CapabilitiesNone), // HostName: to.Ptr("iot-dps-cit-hub-1.azure-devices.net"), // IPFilterRules: []*armiothub.IPFilterRule{ // { // Action: to.Ptr(armiothub.IPFilterActionTypeAccept), // FilterName: to.Ptr("rule1"), // IPMask: to.Ptr("131.117.159.53"), // }, // { // Action: to.Ptr(armiothub.IPFilterActionTypeAccept), // FilterName: to.Ptr("rule2"), // IPMask: to.Ptr("157.55.59.128/25"), // }}, // MessagingEndpoints: map[string]*armiothub.MessagingEndpointProperties{ // "fileNotifications": &armiothub.MessagingEndpointProperties{ // LockDurationAsIso8601: to.Ptr("PT1M"), // MaxDeliveryCount: to.Ptr[int32](10), // TTLAsIso8601: to.Ptr("PT1H"), // }, // }, // NetworkRuleSets: &armiothub.NetworkRuleSetProperties{ // ApplyToBuiltInEventHubEndpoint: to.Ptr(true), // DefaultAction: to.Ptr(armiothub.DefaultActionDeny), // IPRules: []*armiothub.NetworkRuleSetIPRule{ // { // Action: to.Ptr(armiothub.NetworkRuleIPActionAllow), // FilterName: to.Ptr("rule1"), // IPMask: to.Ptr("131.117.159.53"), // }, // { // Action: to.Ptr(armiothub.NetworkRuleIPActionAllow), // FilterName: to.Ptr("rule2"), // IPMask: to.Ptr("157.55.59.128/25"), // }}, // }, // ProvisioningState: to.Ptr("Succeeded"), // Routing: &armiothub.RoutingProperties{ // Endpoints: &armiothub.RoutingEndpoints{ // EventHubs: []*armiothub.RoutingEventHubProperties{ // }, // ServiceBusQueues: []*armiothub.RoutingServiceBusQueueEndpointProperties{ // }, // ServiceBusTopics: []*armiothub.RoutingServiceBusTopicEndpointProperties{ // }, // StorageContainers: []*armiothub.RoutingStorageContainerProperties{ // }, // }, // FallbackRoute: &armiothub.FallbackRouteProperties{ // Name: to.Ptr("$fallback"), // Condition: to.Ptr("true"), // EndpointNames: []*string{ // to.Ptr("events")}, // IsEnabled: to.Ptr(true), // Source: to.Ptr(armiothub.RoutingSourceDeviceMessages), // }, // Routes: []*armiothub.RouteProperties{ // }, // }, // State: to.Ptr("Active"), // StorageEndpoints: map[string]*armiothub.StorageEndpointProperties{ // "$default": &armiothub.StorageEndpointProperties{ // ConnectionString: to.Ptr(""), // ContainerName: to.Ptr(""), // SasTTLAsIso8601: to.Ptr("PT1H"), // }, // }, // }, // SKU: &armiothub.SKUInfo{ // Name: to.Ptr(armiothub.IotHubSKUS1), // Capacity: to.Ptr[int64](1), // Tier: to.Ptr(armiothub.IotHubSKUTierStandard), // }, // SystemData: &armiothub.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-30T00:28:38.963Z"); return t}()), // }, // }}, // } } }
Output:
func (*ResourceClient) NewListBySubscriptionPager ¶ added in v0.5.0
func (client *ResourceClient) NewListBySubscriptionPager(options *ResourceClientListBySubscriptionOptions) *runtime.Pager[ResourceClientListBySubscriptionResponse]
NewListBySubscriptionPager - Get all the IoT hubs in a subscription.
Generated from API version 2023-06-30
- options - ResourceClientListBySubscriptionOptions contains the optional parameters for the ResourceClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/32c178f2467f792a322f56174be244135d2c907f/specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_listbysubscription.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armiothub.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewResourceClient().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.DescriptionListResult = armiothub.DescriptionListResult{ // Value: []*armiothub.Description{ // { // Name: to.Ptr("testHub"), // Type: to.Ptr("Microsoft.Devices/IotHubs"), // ID: to.Ptr("/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/testHub"), // Location: to.Ptr("centraluseuap"), // Tags: map[string]*string{ // }, // Etag: to.Ptr("AAAAAAFD6M4="), // Properties: &armiothub.Properties{ // CloudToDevice: &armiothub.CloudToDeviceProperties{ // DefaultTTLAsIso8601: to.Ptr("PT1H"), // Feedback: &armiothub.FeedbackProperties{ // LockDurationAsIso8601: to.Ptr("PT1M"), // MaxDeliveryCount: to.Ptr[int32](10), // TTLAsIso8601: to.Ptr("PT1H"), // }, // MaxDeliveryCount: to.Ptr[int32](10), // }, // EnableFileUploadNotifications: to.Ptr(false), // EventHubEndpoints: map[string]*armiothub.EventHubProperties{ // "events": &armiothub.EventHubProperties{ // Path: to.Ptr("iot-dps-cit-hub-1"), // Endpoint: to.Ptr("sb://iothub-ns-iot-dps-ci-245306-76aca8e13b.servicebus.windows.net/"), // PartitionCount: to.Ptr[int32](2), // PartitionIDs: []*string{ // to.Ptr("0"), // to.Ptr("1")}, // RetentionTimeInDays: to.Ptr[int64](1), // }, // }, // Features: to.Ptr(armiothub.CapabilitiesNone), // HostName: to.Ptr("iot-dps-cit-hub-1.azure-devices.net"), // IPFilterRules: []*armiothub.IPFilterRule{ // { // Action: to.Ptr(armiothub.IPFilterActionTypeAccept), // FilterName: to.Ptr("rule1"), // IPMask: to.Ptr("131.117.159.53"), // }, // { // Action: to.Ptr(armiothub.IPFilterActionTypeAccept), // FilterName: to.Ptr("rule2"), // IPMask: to.Ptr("157.55.59.128/25"), // }}, // MessagingEndpoints: map[string]*armiothub.MessagingEndpointProperties{ // "fileNotifications": &armiothub.MessagingEndpointProperties{ // LockDurationAsIso8601: to.Ptr("PT1M"), // MaxDeliveryCount: to.Ptr[int32](10), // TTLAsIso8601: to.Ptr("PT1H"), // }, // }, // NetworkRuleSets: &armiothub.NetworkRuleSetProperties{ // ApplyToBuiltInEventHubEndpoint: to.Ptr(true), // DefaultAction: to.Ptr(armiothub.DefaultActionDeny), // IPRules: []*armiothub.NetworkRuleSetIPRule{ // { // Action: to.Ptr(armiothub.NetworkRuleIPActionAllow), // FilterName: to.Ptr("rule1"), // IPMask: to.Ptr("131.117.159.53"), // }, // { // Action: to.Ptr(armiothub.NetworkRuleIPActionAllow), // FilterName: to.Ptr("rule2"), // IPMask: to.Ptr("157.55.59.128/25"), // }}, // }, // ProvisioningState: to.Ptr("Succeeded"), // Routing: &armiothub.RoutingProperties{ // Endpoints: &armiothub.RoutingEndpoints{ // EventHubs: []*armiothub.RoutingEventHubProperties{ // }, // ServiceBusQueues: []*armiothub.RoutingServiceBusQueueEndpointProperties{ // }, // ServiceBusTopics: []*armiothub.RoutingServiceBusTopicEndpointProperties{ // }, // StorageContainers: []*armiothub.RoutingStorageContainerProperties{ // }, // }, // FallbackRoute: &armiothub.FallbackRouteProperties{ // Name: to.Ptr("$fallback"), // Condition: to.Ptr("true"), // EndpointNames: []*string{ // to.Ptr("events")}, // IsEnabled: to.Ptr(true), // Source: to.Ptr(armiothub.RoutingSourceDeviceMessages), // }, // Routes: []*armiothub.RouteProperties{ // }, // }, // State: to.Ptr("Active"), // StorageEndpoints: map[string]*armiothub.StorageEndpointProperties{ // "$default": &armiothub.StorageEndpointProperties{ // ConnectionString: to.Ptr(""), // ContainerName: to.Ptr(""), // SasTTLAsIso8601: to.Ptr("PT1H"), // }, // }, // }, // SKU: &armiothub.SKUInfo{ // Name: to.Ptr(armiothub.IotHubSKUS1), // Capacity: to.Ptr[int64](1), // Tier: to.Ptr(armiothub.IotHubSKUTierStandard), // }, // SystemData: &armiothub.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-30T00:28:38.963Z"); return t}()), // }, // }}, // } } }
Output:
func (*ResourceClient) NewListEventHubConsumerGroupsPager ¶ added in v0.5.0
func (client *ResourceClient) NewListEventHubConsumerGroupsPager(resourceGroupName string, resourceName string, eventHubEndpointName string, options *ResourceClientListEventHubConsumerGroupsOptions) *runtime.Pager[ResourceClientListEventHubConsumerGroupsResponse]
NewListEventHubConsumerGroupsPager - Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an IoT hub.
Generated from API version 2023-06-30
- resourceGroupName - The name of the resource group that contains the IoT hub.
- resourceName - The name of the IoT hub.
- eventHubEndpointName - The name of the Event Hub-compatible endpoint.
- options - ResourceClientListEventHubConsumerGroupsOptions contains the optional parameters for the ResourceClient.NewListEventHubConsumerGroupsPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/32c178f2467f792a322f56174be244135d2c907f/specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_listehgroups.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armiothub.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewResourceClient().NewListEventHubConsumerGroupsPager("myResourceGroup", "testHub", "events", 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.EventHubConsumerGroupsListResult = armiothub.EventHubConsumerGroupsListResult{ // Value: []*armiothub.EventHubConsumerGroupInfo{ // { // Name: to.Ptr("$Default"), // Type: to.Ptr("Microsoft.Devices/IotHubs/EventHubEndpoints/ConsumerGroups"), // Etag: to.Ptr("AAAAAAFD6M4="), // ID: to.Ptr("/subscriptions/cmd-sub-1/resourceGroups/cmd-rg-1/providers/Microsoft.Devices/IotHubs/test-hub-2/eventHubEndpoints/events/ConsumerGroups/%24Default"), // Properties: map[string]any{ // "created": "Thu, 15 Jun 2017 19:20:58 GMT", // }, // }}, // } } }
Output:
func (*ResourceClient) NewListJobsPager ¶ added in v0.5.0
func (client *ResourceClient) NewListJobsPager(resourceGroupName string, resourceName string, options *ResourceClientListJobsOptions) *runtime.Pager[ResourceClientListJobsResponse]
NewListJobsPager - Get a list of all the jobs in an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry.
Generated from API version 2023-06-30
- resourceGroupName - The name of the resource group that contains the IoT hub.
- resourceName - The name of the IoT hub.
- options - ResourceClientListJobsOptions contains the optional parameters for the ResourceClient.NewListJobsPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/32c178f2467f792a322f56174be244135d2c907f/specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_listjobs.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armiothub.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewResourceClient().NewListJobsPager("myResourceGroup", "testHub", 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.JobResponseListResult = armiothub.JobResponseListResult{ // Value: []*armiothub.JobResponse{ // { // Type: to.Ptr(armiothub.JobTypeUnknown), // EndTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC1123, "2017-06-15T19:20:58.000Z"); return t}()), // JobID: to.Ptr("test"), // StartTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC1123, "2017-06-15T19:20:58.000Z"); return t}()), // Status: to.Ptr(armiothub.JobStatusUnknown), // }}, // } } }
Output:
func (*ResourceClient) NewListKeysPager ¶ added in v0.5.0
func (client *ResourceClient) NewListKeysPager(resourceGroupName string, resourceName string, options *ResourceClientListKeysOptions) *runtime.Pager[ResourceClientListKeysResponse]
NewListKeysPager - Get the security metadata for an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security.
Generated from API version 2023-06-30
- resourceGroupName - The name of the resource group that contains the IoT hub.
- resourceName - The name of the IoT hub.
- options - ResourceClientListKeysOptions contains the optional parameters for the ResourceClient.NewListKeysPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/32c178f2467f792a322f56174be244135d2c907f/specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_listkeys.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armiothub.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewResourceClient().NewListKeysPager("myResourceGroup", "testHub", 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.SharedAccessSignatureAuthorizationRuleListResult = armiothub.SharedAccessSignatureAuthorizationRuleListResult{ // Value: []*armiothub.SharedAccessSignatureAuthorizationRule{ // { // KeyName: to.Ptr("iothubowner"), // PrimaryKey: to.Ptr("<primaryKey>"), // Rights: to.Ptr(armiothub.AccessRightsRegistryWriteServiceConnectDeviceConnect), // SecondaryKey: to.Ptr("<secondaryKey>"), // }, // { // KeyName: to.Ptr("service"), // PrimaryKey: to.Ptr("<primaryKey>"), // Rights: to.Ptr(armiothub.AccessRightsServiceConnect), // SecondaryKey: to.Ptr("<secondaryKey>"), // }, // { // KeyName: to.Ptr("device"), // PrimaryKey: to.Ptr("<primaryKey>"), // Rights: to.Ptr(armiothub.AccessRightsDeviceConnect), // SecondaryKey: to.Ptr("<secondaryKey>"), // }, // { // KeyName: to.Ptr("registryRead"), // PrimaryKey: to.Ptr("<primaryKey>"), // Rights: to.Ptr(armiothub.AccessRightsRegistryRead), // SecondaryKey: to.Ptr("<secondaryKey>"), // }, // { // KeyName: to.Ptr("registryReadWrite"), // PrimaryKey: to.Ptr("<primaryKey>"), // Rights: to.Ptr(armiothub.AccessRightsRegistryWrite), // SecondaryKey: to.Ptr("<secondaryKey>"), // }}, // } } }
Output:
func (*ResourceClient) TestAllRoutes ¶ added in v0.3.0
func (client *ResourceClient) TestAllRoutes(ctx context.Context, iotHubName string, resourceGroupName string, input TestAllRoutesInput, options *ResourceClientTestAllRoutesOptions) (ResourceClientTestAllRoutesResponse, error)
TestAllRoutes - Test all routes configured in this Iot Hub If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-06-30
- iotHubName - IotHub to be tested
- resourceGroupName - resource group which Iot Hub belongs to
- input - Input for testing all routes
- options - ResourceClientTestAllRoutesOptions contains the optional parameters for the ResourceClient.TestAllRoutes method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/32c178f2467f792a322f56174be244135d2c907f/specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_testallroutes.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/iothub/armiothub" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armiothub.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewResourceClient().TestAllRoutes(ctx, "testHub", "myResourceGroup", armiothub.TestAllRoutesInput{ Message: &armiothub.RoutingMessage{ AppProperties: map[string]*string{ "key1": to.Ptr("value1"), }, Body: to.Ptr("Body of message"), SystemProperties: map[string]*string{ "key1": to.Ptr("value1"), }, }, RoutingSource: to.Ptr(armiothub.RoutingSourceDeviceMessages), }, 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.TestAllRoutesResult = armiothub.TestAllRoutesResult{ // Routes: []*armiothub.MatchedRoute{ // { // Properties: &armiothub.RouteProperties{ // Name: to.Ptr("Routeid"), // EndpointNames: []*string{ // to.Ptr("id1")}, // IsEnabled: to.Ptr(true), // Source: to.Ptr(armiothub.RoutingSourceDeviceMessages), // }, // }}, // } }
Output:
func (*ResourceClient) TestRoute ¶ added in v0.3.0
func (client *ResourceClient) TestRoute(ctx context.Context, iotHubName string, resourceGroupName string, input TestRouteInput, options *ResourceClientTestRouteOptions) (ResourceClientTestRouteResponse, error)
TestRoute - Test the new route for this Iot Hub If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-06-30
- iotHubName - IotHub to be tested
- resourceGroupName - resource group which Iot Hub belongs to
- input - Route that needs to be tested
- options - ResourceClientTestRouteOptions contains the optional parameters for the ResourceClient.TestRoute method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/32c178f2467f792a322f56174be244135d2c907f/specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_testnewroute.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/iothub/armiothub" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armiothub.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewResourceClient().TestRoute(ctx, "testHub", "myResourceGroup", armiothub.TestRouteInput{ Message: &armiothub.RoutingMessage{ AppProperties: map[string]*string{ "key1": to.Ptr("value1"), }, Body: to.Ptr("Body of message"), SystemProperties: map[string]*string{ "key1": to.Ptr("value1"), }, }, Route: &armiothub.RouteProperties{ Name: to.Ptr("Routeid"), EndpointNames: []*string{ to.Ptr("id1")}, IsEnabled: to.Ptr(true), Source: to.Ptr(armiothub.RoutingSourceDeviceMessages), }, }, 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.TestRouteResult = armiothub.TestRouteResult{ // Result: to.Ptr(armiothub.TestResultStatusFalse), // Details: &armiothub.TestRouteResultDetails{ // CompilationErrors: []*armiothub.RouteCompilationError{ // { // Location: &armiothub.RouteErrorRange{ // End: &armiothub.RouteErrorPosition{ // Column: to.Ptr[int32](24), // Line: to.Ptr[int32](12), // }, // Start: &armiothub.RouteErrorPosition{ // Column: to.Ptr[int32](12), // Line: to.Ptr[int32](12), // }, // }, // Message: to.Ptr("string response"), // Severity: to.Ptr(armiothub.RouteErrorSeverityError), // }}, // }, // } }
Output:
type ResourceClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ResourceClientBeginCreateOrUpdateOptions struct { // ETag of the IoT Hub. Do not specify for creating a brand new IoT Hub. Required to update an existing IoT Hub. IfMatch *string // Resumes the LRO from the provided token. ResumeToken string }
ResourceClientBeginCreateOrUpdateOptions contains the optional parameters for the ResourceClient.BeginCreateOrUpdate method.
type ResourceClientBeginDeleteOptions ¶ added in v0.3.0
type ResourceClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ResourceClientBeginDeleteOptions contains the optional parameters for the ResourceClient.BeginDelete method.
type ResourceClientBeginUpdateOptions ¶ added in v0.3.0
type ResourceClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ResourceClientBeginUpdateOptions contains the optional parameters for the ResourceClient.BeginUpdate method.
type ResourceClientCheckNameAvailabilityOptions ¶ added in v0.3.0
type ResourceClientCheckNameAvailabilityOptions struct { }
ResourceClientCheckNameAvailabilityOptions contains the optional parameters for the ResourceClient.CheckNameAvailability method.
type ResourceClientCheckNameAvailabilityResponse ¶ added in v0.3.0
type ResourceClientCheckNameAvailabilityResponse struct { // The properties indicating whether a given IoT hub name is available. NameAvailabilityInfo }
ResourceClientCheckNameAvailabilityResponse contains the response from method ResourceClient.CheckNameAvailability.
type ResourceClientCreateEventHubConsumerGroupOptions ¶ added in v0.3.0
type ResourceClientCreateEventHubConsumerGroupOptions struct { }
ResourceClientCreateEventHubConsumerGroupOptions contains the optional parameters for the ResourceClient.CreateEventHubConsumerGroup method.
type ResourceClientCreateEventHubConsumerGroupResponse ¶ added in v0.3.0
type ResourceClientCreateEventHubConsumerGroupResponse struct { // The properties of the EventHubConsumerGroupInfo object. EventHubConsumerGroupInfo }
ResourceClientCreateEventHubConsumerGroupResponse contains the response from method ResourceClient.CreateEventHubConsumerGroup.
type ResourceClientCreateOrUpdateResponse ¶ added in v0.3.0
type ResourceClientCreateOrUpdateResponse struct { // The description of the IoT hub. Description }
ResourceClientCreateOrUpdateResponse contains the response from method ResourceClient.BeginCreateOrUpdate.
type ResourceClientDeleteEventHubConsumerGroupOptions ¶ added in v0.3.0
type ResourceClientDeleteEventHubConsumerGroupOptions struct { }
ResourceClientDeleteEventHubConsumerGroupOptions contains the optional parameters for the ResourceClient.DeleteEventHubConsumerGroup method.
type ResourceClientDeleteEventHubConsumerGroupResponse ¶ added in v0.3.0
type ResourceClientDeleteEventHubConsumerGroupResponse struct { }
ResourceClientDeleteEventHubConsumerGroupResponse contains the response from method ResourceClient.DeleteEventHubConsumerGroup.
type ResourceClientDeleteResponse ¶ added in v0.3.0
type ResourceClientDeleteResponse struct { // The description of the IoT hub. Description }
ResourceClientDeleteResponse contains the response from method ResourceClient.BeginDelete.
type ResourceClientExportDevicesOptions ¶ added in v0.3.0
type ResourceClientExportDevicesOptions struct { }
ResourceClientExportDevicesOptions contains the optional parameters for the ResourceClient.ExportDevices method.
type ResourceClientExportDevicesResponse ¶ added in v0.3.0
type ResourceClientExportDevicesResponse struct { // The properties of the Job Response object. JobResponse }
ResourceClientExportDevicesResponse contains the response from method ResourceClient.ExportDevices.
type ResourceClientGetEndpointHealthOptions ¶ added in v0.3.0
type ResourceClientGetEndpointHealthOptions struct { }
ResourceClientGetEndpointHealthOptions contains the optional parameters for the ResourceClient.NewGetEndpointHealthPager method.
type ResourceClientGetEndpointHealthResponse ¶ added in v0.3.0
type ResourceClientGetEndpointHealthResponse struct { // The JSON-serialized array of EndpointHealthData objects with a next link. EndpointHealthDataListResult }
ResourceClientGetEndpointHealthResponse contains the response from method ResourceClient.NewGetEndpointHealthPager.
type ResourceClientGetEventHubConsumerGroupOptions ¶ added in v0.3.0
type ResourceClientGetEventHubConsumerGroupOptions struct { }
ResourceClientGetEventHubConsumerGroupOptions contains the optional parameters for the ResourceClient.GetEventHubConsumerGroup method.
type ResourceClientGetEventHubConsumerGroupResponse ¶ added in v0.3.0
type ResourceClientGetEventHubConsumerGroupResponse struct { // The properties of the EventHubConsumerGroupInfo object. EventHubConsumerGroupInfo }
ResourceClientGetEventHubConsumerGroupResponse contains the response from method ResourceClient.GetEventHubConsumerGroup.
type ResourceClientGetJobOptions ¶ added in v0.3.0
type ResourceClientGetJobOptions struct { }
ResourceClientGetJobOptions contains the optional parameters for the ResourceClient.GetJob method.
type ResourceClientGetJobResponse ¶ added in v0.3.0
type ResourceClientGetJobResponse struct { // The properties of the Job Response object. JobResponse }
ResourceClientGetJobResponse contains the response from method ResourceClient.GetJob.
type ResourceClientGetKeysForKeyNameOptions ¶ added in v0.3.0
type ResourceClientGetKeysForKeyNameOptions struct { }
ResourceClientGetKeysForKeyNameOptions contains the optional parameters for the ResourceClient.GetKeysForKeyName method.
type ResourceClientGetKeysForKeyNameResponse ¶ added in v0.3.0
type ResourceClientGetKeysForKeyNameResponse struct { SharedAccessSignatureAuthorizationRule }
ResourceClientGetKeysForKeyNameResponse contains the response from method ResourceClient.GetKeysForKeyName.
type ResourceClientGetOptions ¶ added in v0.3.0
type ResourceClientGetOptions struct { }
ResourceClientGetOptions contains the optional parameters for the ResourceClient.Get method.
type ResourceClientGetQuotaMetricsOptions ¶ added in v0.3.0
type ResourceClientGetQuotaMetricsOptions struct { }
ResourceClientGetQuotaMetricsOptions contains the optional parameters for the ResourceClient.NewGetQuotaMetricsPager method.
type ResourceClientGetQuotaMetricsResponse ¶ added in v0.3.0
type ResourceClientGetQuotaMetricsResponse struct { // The JSON-serialized array of IotHubQuotaMetricInfo objects with a next link. QuotaMetricInfoListResult }
ResourceClientGetQuotaMetricsResponse contains the response from method ResourceClient.NewGetQuotaMetricsPager.
type ResourceClientGetResponse ¶ added in v0.3.0
type ResourceClientGetResponse struct { // The description of the IoT hub. Description }
ResourceClientGetResponse contains the response from method ResourceClient.Get.
type ResourceClientGetStatsOptions ¶ added in v0.3.0
type ResourceClientGetStatsOptions struct { }
ResourceClientGetStatsOptions contains the optional parameters for the ResourceClient.GetStats method.
type ResourceClientGetStatsResponse ¶ added in v0.3.0
type ResourceClientGetStatsResponse struct { // Identity registry statistics. RegistryStatistics }
ResourceClientGetStatsResponse contains the response from method ResourceClient.GetStats.
type ResourceClientGetValidSKUsOptions ¶ added in v0.3.0
type ResourceClientGetValidSKUsOptions struct { }
ResourceClientGetValidSKUsOptions contains the optional parameters for the ResourceClient.NewGetValidSKUsPager method.
type ResourceClientGetValidSKUsResponse ¶ added in v0.3.0
type ResourceClientGetValidSKUsResponse struct { // The JSON-serialized array of IotHubSkuDescription objects with a next link. SKUDescriptionListResult }
ResourceClientGetValidSKUsResponse contains the response from method ResourceClient.NewGetValidSKUsPager.
type ResourceClientImportDevicesOptions ¶ added in v0.3.0
type ResourceClientImportDevicesOptions struct { }
ResourceClientImportDevicesOptions contains the optional parameters for the ResourceClient.ImportDevices method.
type ResourceClientImportDevicesResponse ¶ added in v0.3.0
type ResourceClientImportDevicesResponse struct { // The properties of the Job Response object. JobResponse }
ResourceClientImportDevicesResponse contains the response from method ResourceClient.ImportDevices.
type ResourceClientListByResourceGroupOptions ¶ added in v0.3.0
type ResourceClientListByResourceGroupOptions struct { }
ResourceClientListByResourceGroupOptions contains the optional parameters for the ResourceClient.NewListByResourceGroupPager method.
type ResourceClientListByResourceGroupResponse ¶ added in v0.3.0
type ResourceClientListByResourceGroupResponse struct { // The JSON-serialized array of IotHubDescription objects with a next link. DescriptionListResult }
ResourceClientListByResourceGroupResponse contains the response from method ResourceClient.NewListByResourceGroupPager.
type ResourceClientListBySubscriptionOptions ¶ added in v0.3.0
type ResourceClientListBySubscriptionOptions struct { }
ResourceClientListBySubscriptionOptions contains the optional parameters for the ResourceClient.NewListBySubscriptionPager method.
type ResourceClientListBySubscriptionResponse ¶ added in v0.3.0
type ResourceClientListBySubscriptionResponse struct { // The JSON-serialized array of IotHubDescription objects with a next link. DescriptionListResult }
ResourceClientListBySubscriptionResponse contains the response from method ResourceClient.NewListBySubscriptionPager.
type ResourceClientListEventHubConsumerGroupsOptions ¶ added in v0.3.0
type ResourceClientListEventHubConsumerGroupsOptions struct { }
ResourceClientListEventHubConsumerGroupsOptions contains the optional parameters for the ResourceClient.NewListEventHubConsumerGroupsPager method.
type ResourceClientListEventHubConsumerGroupsResponse ¶ added in v0.3.0
type ResourceClientListEventHubConsumerGroupsResponse struct { // The JSON-serialized array of Event Hub-compatible consumer group names with a next link. EventHubConsumerGroupsListResult }
ResourceClientListEventHubConsumerGroupsResponse contains the response from method ResourceClient.NewListEventHubConsumerGroupsPager.
type ResourceClientListJobsOptions ¶ added in v0.3.0
type ResourceClientListJobsOptions struct { }
ResourceClientListJobsOptions contains the optional parameters for the ResourceClient.NewListJobsPager method.
type ResourceClientListJobsResponse ¶ added in v0.3.0
type ResourceClientListJobsResponse struct { // The JSON-serialized array of JobResponse objects with a next link. JobResponseListResult }
ResourceClientListJobsResponse contains the response from method ResourceClient.NewListJobsPager.
type ResourceClientListKeysOptions ¶ added in v0.3.0
type ResourceClientListKeysOptions struct { }
ResourceClientListKeysOptions contains the optional parameters for the ResourceClient.NewListKeysPager method.
type ResourceClientListKeysResponse ¶ added in v0.3.0
type ResourceClientListKeysResponse struct { SharedAccessSignatureAuthorizationRuleListResult }
ResourceClientListKeysResponse contains the response from method ResourceClient.NewListKeysPager.
type ResourceClientTestAllRoutesOptions ¶ added in v0.3.0
type ResourceClientTestAllRoutesOptions struct { }
ResourceClientTestAllRoutesOptions contains the optional parameters for the ResourceClient.TestAllRoutes method.
type ResourceClientTestAllRoutesResponse ¶ added in v0.3.0
type ResourceClientTestAllRoutesResponse struct { // Result of testing all routes TestAllRoutesResult }
ResourceClientTestAllRoutesResponse contains the response from method ResourceClient.TestAllRoutes.
type ResourceClientTestRouteOptions ¶ added in v0.3.0
type ResourceClientTestRouteOptions struct { }
ResourceClientTestRouteOptions contains the optional parameters for the ResourceClient.TestRoute method.
type ResourceClientTestRouteResponse ¶ added in v0.3.0
type ResourceClientTestRouteResponse struct { // Result of testing one route TestRouteResult }
ResourceClientTestRouteResponse contains the response from method ResourceClient.TestRoute.
type ResourceClientUpdateResponse ¶ added in v0.3.0
type ResourceClientUpdateResponse struct { // The description of the IoT hub. Description }
ResourceClientUpdateResponse contains the response from method ResourceClient.BeginUpdate.
type ResourceIdentityType ¶
type ResourceIdentityType string
ResourceIdentityType - The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the service.
const ( ResourceIdentityTypeNone ResourceIdentityType = "None" ResourceIdentityTypeSystemAssigned ResourceIdentityType = "SystemAssigned" ResourceIdentityTypeSystemAssignedUserAssigned ResourceIdentityType = "SystemAssigned, UserAssigned" ResourceIdentityTypeUserAssigned ResourceIdentityType = "UserAssigned" )
func PossibleResourceIdentityTypeValues ¶
func PossibleResourceIdentityTypeValues() []ResourceIdentityType
PossibleResourceIdentityTypeValues returns the possible values for the ResourceIdentityType const type.
type ResourceProviderCommonClient ¶
type ResourceProviderCommonClient struct {
// contains filtered or unexported fields
}
ResourceProviderCommonClient contains the methods for the ResourceProviderCommon group. Don't use this type directly, use NewResourceProviderCommonClient() instead.
func NewResourceProviderCommonClient ¶
func NewResourceProviderCommonClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ResourceProviderCommonClient, error)
NewResourceProviderCommonClient creates a new instance of ResourceProviderCommonClient 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 (*ResourceProviderCommonClient) GetSubscriptionQuota ¶
func (client *ResourceProviderCommonClient) GetSubscriptionQuota(ctx context.Context, options *ResourceProviderCommonClientGetSubscriptionQuotaOptions) (ResourceProviderCommonClientGetSubscriptionQuotaResponse, error)
GetSubscriptionQuota - Get the number of free and paid iot hubs in the subscription If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-06-30
- options - ResourceProviderCommonClientGetSubscriptionQuotaOptions contains the optional parameters for the ResourceProviderCommonClient.GetSubscriptionQuota method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/32c178f2467f792a322f56174be244135d2c907f/specification/iothub/resource-manager/Microsoft.Devices/stable/2023-06-30/examples/iothub_usages.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armiothub.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewResourceProviderCommonClient().GetSubscriptionQuota(ctx, 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.UserSubscriptionQuotaListResult = armiothub.UserSubscriptionQuotaListResult{ // Value: []*armiothub.UserSubscriptionQuota{ // { // Name: &armiothub.Name{ // LocalizedValue: to.Ptr("Free Hub Count"), // Value: to.Ptr("FreeHubCount"), // }, // Type: to.Ptr("/subscription/91d12660-3dec-467a-be2a-213b5544ddc0/providers/Microsoft.Devices/usages"), // CurrentValue: to.Ptr[int32](1), // ID: to.Ptr("/subscription/91d12660-3dec-467a-be2a-213b5544ddc0/providers/Microsoft.Devices/usages/freeHubCount"), // Limit: to.Ptr[int32](1), // Unit: to.Ptr("count"), // }}, // } }
Output:
type ResourceProviderCommonClientGetSubscriptionQuotaOptions ¶ added in v0.3.0
type ResourceProviderCommonClientGetSubscriptionQuotaOptions struct { }
ResourceProviderCommonClientGetSubscriptionQuotaOptions contains the optional parameters for the ResourceProviderCommonClient.GetSubscriptionQuota method.
type ResourceProviderCommonClientGetSubscriptionQuotaResponse ¶ added in v0.3.0
type ResourceProviderCommonClientGetSubscriptionQuotaResponse struct { // Json-serialized array of User subscription quota response UserSubscriptionQuotaListResult }
ResourceProviderCommonClientGetSubscriptionQuotaResponse contains the response from method ResourceProviderCommonClient.GetSubscriptionQuota.
type RouteCompilationError ¶
type RouteCompilationError struct { // Location where the route error happened Location *RouteErrorRange // Route error message Message *string // Severity of the route error Severity *RouteErrorSeverity }
RouteCompilationError - Compilation error when evaluating route
func (RouteCompilationError) MarshalJSON ¶ added in v1.1.0
func (r RouteCompilationError) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RouteCompilationError.
func (*RouteCompilationError) UnmarshalJSON ¶ added in v1.1.0
func (r *RouteCompilationError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RouteCompilationError.
type RouteErrorPosition ¶
type RouteErrorPosition struct { // Column where the route error happened Column *int32 // Line where the route error happened Line *int32 }
RouteErrorPosition - Position where the route error happened
func (RouteErrorPosition) MarshalJSON ¶ added in v1.1.0
func (r RouteErrorPosition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RouteErrorPosition.
func (*RouteErrorPosition) UnmarshalJSON ¶ added in v1.1.0
func (r *RouteErrorPosition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RouteErrorPosition.
type RouteErrorRange ¶
type RouteErrorRange struct { // End where the route error happened End *RouteErrorPosition // Start where the route error happened Start *RouteErrorPosition }
RouteErrorRange - Range of route errors
func (RouteErrorRange) MarshalJSON ¶ added in v1.1.0
func (r RouteErrorRange) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RouteErrorRange.
func (*RouteErrorRange) UnmarshalJSON ¶ added in v1.1.0
func (r *RouteErrorRange) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RouteErrorRange.
type RouteErrorSeverity ¶
type RouteErrorSeverity string
RouteErrorSeverity - Severity of the route error
const ( RouteErrorSeverityError RouteErrorSeverity = "error" RouteErrorSeverityWarning RouteErrorSeverity = "warning" )
func PossibleRouteErrorSeverityValues ¶
func PossibleRouteErrorSeverityValues() []RouteErrorSeverity
PossibleRouteErrorSeverityValues returns the possible values for the RouteErrorSeverity const type.
type RouteProperties ¶
type RouteProperties struct { // REQUIRED; The list of endpoints to which messages that satisfy the condition are routed. Currently only one endpoint is // allowed. EndpointNames []*string // REQUIRED; Used to specify whether a route is enabled. IsEnabled *bool // REQUIRED; The name of the route. The name can only include alphanumeric characters, periods, underscores, hyphens, has // a maximum length of 64 characters, and must be unique. Name *string // REQUIRED; The source that the routing rule is to be applied to, such as DeviceMessages. Source *RoutingSource // The condition that is evaluated to apply the routing rule. If no condition is provided, it evaluates to true by default. // For grammar, see: // https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language Condition *string }
RouteProperties - The properties of a routing rule that your IoT hub uses to route messages to endpoints.
func (RouteProperties) MarshalJSON ¶
func (r RouteProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RouteProperties.
func (*RouteProperties) UnmarshalJSON ¶ added in v1.1.0
func (r *RouteProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RouteProperties.
type RoutingCosmosDBSQLAPIProperties ¶ added in v1.2.0
type RoutingCosmosDBSQLAPIProperties struct { // REQUIRED; The name of the cosmos DB sql container in the cosmos DB database. ContainerName *string // REQUIRED; The name of the cosmos DB database in the cosmos DB account. DatabaseName *string // REQUIRED; The url of the cosmos DB account. It must include the protocol https:// EndpointURI *string // REQUIRED; The name that identifies this endpoint. The name can only include alphanumeric characters, periods, underscores, // hyphens and has a maximum length of 64 characters. The following names are reserved: // events, fileNotifications, $default. Endpoint names must be unique across endpoint types. Name *string // Method used to authenticate against the cosmos DB sql container endpoint AuthenticationType *AuthenticationType // Managed identity properties of routing cosmos DB container endpoint. Identity *ManagedIdentity // The name of the partition key associated with this cosmos DB sql container if one exists. This is an optional parameter. PartitionKeyName *string // The template for generating a synthetic partition key value for use with this cosmos DB sql container. The template must // include at least one of the following placeholders: {iothub}, {deviceid}, {DD}, // {MM}, and {YYYY}. Any one placeholder may be specified at most once, but order and non-placeholder components are arbitrary. // This parameter is only required if PartitionKeyName is specified. PartitionKeyTemplate *string // The primary key of the cosmos DB account. PrimaryKey *string // The name of the resource group of the cosmos DB account. ResourceGroup *string // The secondary key of the cosmos DB account. SecondaryKey *string // The subscription identifier of the cosmos DB account. SubscriptionID *string // READ-ONLY; Id of the cosmos DB sql container endpoint ID *string }
RoutingCosmosDBSQLAPIProperties - The properties related to a cosmos DB sql container endpoint.
func (RoutingCosmosDBSQLAPIProperties) MarshalJSON ¶ added in v1.2.0
func (r RoutingCosmosDBSQLAPIProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoutingCosmosDBSQLAPIProperties.
func (*RoutingCosmosDBSQLAPIProperties) UnmarshalJSON ¶ added in v1.2.0
func (r *RoutingCosmosDBSQLAPIProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RoutingCosmosDBSQLAPIProperties.
type RoutingEndpoints ¶
type RoutingEndpoints struct { // The list of Cosmos DB container endpoints that IoT hub routes messages to, based on the routing rules. CosmosDBSQLContainers []*RoutingCosmosDBSQLAPIProperties // The list of Event Hubs endpoints that IoT hub routes messages to, based on the routing rules. This list does not include // the built-in Event Hubs endpoint. EventHubs []*RoutingEventHubProperties // The list of Service Bus queue endpoints that IoT hub routes the messages to, based on the routing rules. ServiceBusQueues []*RoutingServiceBusQueueEndpointProperties // The list of Service Bus topic endpoints that the IoT hub routes the messages to, based on the routing rules. ServiceBusTopics []*RoutingServiceBusTopicEndpointProperties // The list of storage container endpoints that IoT hub routes messages to, based on the routing rules. StorageContainers []*RoutingStorageContainerProperties }
RoutingEndpoints - The properties related to the custom endpoints to which your IoT hub routes messages based on the routing rules. A maximum of 10 custom endpoints are allowed across all endpoint types for paid hubs and only 1 custom endpoint is allowed across all endpoint types for free hubs.
func (RoutingEndpoints) MarshalJSON ¶
func (r RoutingEndpoints) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoutingEndpoints.
func (*RoutingEndpoints) UnmarshalJSON ¶ added in v1.1.0
func (r *RoutingEndpoints) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RoutingEndpoints.
type RoutingEventHubProperties ¶
type RoutingEventHubProperties struct { // REQUIRED; The name that identifies this endpoint. The name can only include alphanumeric characters, periods, underscores, // hyphens and has a maximum length of 64 characters. The following names are reserved: // events, fileNotifications, $default. Endpoint names must be unique across endpoint types. Name *string // Method used to authenticate against the event hub endpoint AuthenticationType *AuthenticationType // The connection string of the event hub endpoint. ConnectionString *string // The url of the event hub endpoint. It must include the protocol sb:// EndpointURI *string // Event hub name on the event hub namespace EntityPath *string // Id of the event hub endpoint ID *string // Managed identity properties of routing event hub endpoint. Identity *ManagedIdentity // The name of the resource group of the event hub endpoint. ResourceGroup *string // The subscription identifier of the event hub endpoint. SubscriptionID *string }
RoutingEventHubProperties - The properties related to an event hub endpoint.
func (RoutingEventHubProperties) MarshalJSON ¶ added in v1.1.0
func (r RoutingEventHubProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoutingEventHubProperties.
func (*RoutingEventHubProperties) UnmarshalJSON ¶ added in v1.1.0
func (r *RoutingEventHubProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RoutingEventHubProperties.
type RoutingMessage ¶
type RoutingMessage struct { // App properties AppProperties map[string]*string // Body of routing message Body *string // System properties SystemProperties map[string]*string }
RoutingMessage - Routing message
func (RoutingMessage) MarshalJSON ¶
func (r RoutingMessage) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoutingMessage.
func (*RoutingMessage) UnmarshalJSON ¶ added in v1.1.0
func (r *RoutingMessage) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RoutingMessage.
type RoutingProperties ¶
type RoutingProperties struct { // The properties related to the custom endpoints to which your IoT hub routes messages based on the routing rules. A maximum // of 10 custom endpoints are allowed across all endpoint types for paid hubs // and only 1 custom endpoint is allowed across all endpoint types for free hubs. Endpoints *RoutingEndpoints // The list of user-provided enrichments that the IoT hub applies to messages to be delivered to built-in and custom endpoints. // See: https://aka.ms/telemetryoneventgrid Enrichments []*EnrichmentProperties // The properties of the route that is used as a fall-back route when none of the conditions specified in the 'routes' section // are met. This is an optional parameter. When this property is not present in // the template, the fallback route is disabled by default. FallbackRoute *FallbackRouteProperties // The list of user-provided routing rules that the IoT hub uses to route messages to built-in and custom endpoints. A maximum // of 100 routing rules are allowed for paid hubs and a maximum of 5 routing // rules are allowed for free hubs. Routes []*RouteProperties }
RoutingProperties - The routing related properties of the IoT hub. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging
func (RoutingProperties) MarshalJSON ¶
func (r RoutingProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoutingProperties.
func (*RoutingProperties) UnmarshalJSON ¶ added in v1.1.0
func (r *RoutingProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RoutingProperties.
type RoutingServiceBusQueueEndpointProperties ¶
type RoutingServiceBusQueueEndpointProperties struct { // REQUIRED; The name that identifies this endpoint. The name can only include alphanumeric characters, periods, underscores, // hyphens and has a maximum length of 64 characters. The following names are reserved: // events, fileNotifications, $default. Endpoint names must be unique across endpoint types. The name need not be the same // as the actual queue name. Name *string // Method used to authenticate against the service bus queue endpoint AuthenticationType *AuthenticationType // The connection string of the service bus queue endpoint. ConnectionString *string // The url of the service bus queue endpoint. It must include the protocol sb:// EndpointURI *string // Queue name on the service bus namespace EntityPath *string // Id of the service bus queue endpoint ID *string // Managed identity properties of routing service bus queue endpoint. Identity *ManagedIdentity // The name of the resource group of the service bus queue endpoint. ResourceGroup *string // The subscription identifier of the service bus queue endpoint. SubscriptionID *string }
RoutingServiceBusQueueEndpointProperties - The properties related to service bus queue endpoint types.
func (RoutingServiceBusQueueEndpointProperties) MarshalJSON ¶ added in v1.1.0
func (r RoutingServiceBusQueueEndpointProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoutingServiceBusQueueEndpointProperties.
func (*RoutingServiceBusQueueEndpointProperties) UnmarshalJSON ¶ added in v1.1.0
func (r *RoutingServiceBusQueueEndpointProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RoutingServiceBusQueueEndpointProperties.
type RoutingServiceBusTopicEndpointProperties ¶
type RoutingServiceBusTopicEndpointProperties struct { // REQUIRED; The name that identifies this endpoint. The name can only include alphanumeric characters, periods, underscores, // hyphens and has a maximum length of 64 characters. The following names are reserved: // events, fileNotifications, $default. Endpoint names must be unique across endpoint types. The name need not be the same // as the actual topic name. Name *string // Method used to authenticate against the service bus topic endpoint AuthenticationType *AuthenticationType // The connection string of the service bus topic endpoint. ConnectionString *string // The url of the service bus topic endpoint. It must include the protocol sb:// EndpointURI *string // Queue name on the service bus topic EntityPath *string // Id of the service bus topic endpoint ID *string // Managed identity properties of routing service bus topic endpoint. Identity *ManagedIdentity // The name of the resource group of the service bus topic endpoint. ResourceGroup *string // The subscription identifier of the service bus topic endpoint. SubscriptionID *string }
RoutingServiceBusTopicEndpointProperties - The properties related to service bus topic endpoint types.
func (RoutingServiceBusTopicEndpointProperties) MarshalJSON ¶ added in v1.1.0
func (r RoutingServiceBusTopicEndpointProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoutingServiceBusTopicEndpointProperties.
func (*RoutingServiceBusTopicEndpointProperties) UnmarshalJSON ¶ added in v1.1.0
func (r *RoutingServiceBusTopicEndpointProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RoutingServiceBusTopicEndpointProperties.
type RoutingSource ¶
type RoutingSource string
RoutingSource - The source that the routing rule is to be applied to, such as DeviceMessages.
const ( RoutingSourceDeviceConnectionStateEvents RoutingSource = "DeviceConnectionStateEvents" RoutingSourceDeviceJobLifecycleEvents RoutingSource = "DeviceJobLifecycleEvents" RoutingSourceDeviceLifecycleEvents RoutingSource = "DeviceLifecycleEvents" RoutingSourceDeviceMessages RoutingSource = "DeviceMessages" RoutingSourceInvalid RoutingSource = "Invalid" RoutingSourceTwinChangeEvents RoutingSource = "TwinChangeEvents" )
func PossibleRoutingSourceValues ¶
func PossibleRoutingSourceValues() []RoutingSource
PossibleRoutingSourceValues returns the possible values for the RoutingSource const type.
type RoutingStorageContainerProperties ¶
type RoutingStorageContainerProperties struct { // REQUIRED; The name of storage container in the storage account. ContainerName *string // REQUIRED; The name that identifies this endpoint. The name can only include alphanumeric characters, periods, underscores, // hyphens and has a maximum length of 64 characters. The following names are reserved: // events, fileNotifications, $default. Endpoint names must be unique across endpoint types. Name *string // Method used to authenticate against the storage endpoint AuthenticationType *AuthenticationType // Time interval at which blobs are written to storage. Value should be between 60 and 720 seconds. Default value is 300 seconds. BatchFrequencyInSeconds *int32 // The connection string of the storage account. ConnectionString *string // Encoding that is used to serialize messages to blobs. Supported values are 'avro', 'avrodeflate', and 'JSON'. Default value // is 'avro'. Encoding *RoutingStorageContainerPropertiesEncoding // The url of the storage endpoint. It must include the protocol https:// EndpointURI *string // File name format for the blob. Default format is {iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}. All parameters are mandatory // but can be reordered. FileNameFormat *string // Id of the storage container endpoint ID *string // Managed identity properties of routing storage endpoint. Identity *ManagedIdentity // Maximum number of bytes for each blob written to storage. Value should be between 10485760(10MB) and 524288000(500MB). // Default value is 314572800(300MB). MaxChunkSizeInBytes *int32 // The name of the resource group of the storage account. ResourceGroup *string // The subscription identifier of the storage account. SubscriptionID *string }
RoutingStorageContainerProperties - The properties related to a storage container endpoint.
func (RoutingStorageContainerProperties) MarshalJSON ¶ added in v1.1.0
func (r RoutingStorageContainerProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoutingStorageContainerProperties.
func (*RoutingStorageContainerProperties) UnmarshalJSON ¶ added in v1.1.0
func (r *RoutingStorageContainerProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RoutingStorageContainerProperties.
type RoutingStorageContainerPropertiesEncoding ¶
type RoutingStorageContainerPropertiesEncoding string
RoutingStorageContainerPropertiesEncoding - Encoding that is used to serialize messages to blobs. Supported values are 'avro', 'avrodeflate', and 'JSON'. Default value is 'avro'.
const ( RoutingStorageContainerPropertiesEncodingAvro RoutingStorageContainerPropertiesEncoding = "Avro" RoutingStorageContainerPropertiesEncodingAvroDeflate RoutingStorageContainerPropertiesEncoding = "AvroDeflate" RoutingStorageContainerPropertiesEncodingJSON RoutingStorageContainerPropertiesEncoding = "JSON" )
func PossibleRoutingStorageContainerPropertiesEncodingValues ¶
func PossibleRoutingStorageContainerPropertiesEncodingValues() []RoutingStorageContainerPropertiesEncoding
PossibleRoutingStorageContainerPropertiesEncodingValues returns the possible values for the RoutingStorageContainerPropertiesEncoding const type.
type RoutingTwin ¶
type RoutingTwin struct { Properties *RoutingTwinProperties // Twin Tags Tags any }
RoutingTwin - Twin reference input parameter. This is an optional parameter
func (RoutingTwin) MarshalJSON ¶ added in v1.1.0
func (r RoutingTwin) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoutingTwin.
func (*RoutingTwin) UnmarshalJSON ¶ added in v1.1.0
func (r *RoutingTwin) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RoutingTwin.
type RoutingTwinProperties ¶
type RoutingTwinProperties struct { // Twin desired properties Desired any // Twin desired properties Reported any }
func (RoutingTwinProperties) MarshalJSON ¶ added in v1.1.0
func (r RoutingTwinProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoutingTwinProperties.
func (*RoutingTwinProperties) UnmarshalJSON ¶ added in v1.1.0
func (r *RoutingTwinProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RoutingTwinProperties.
type SKUDescription ¶ added in v0.3.0
type SKUDescription struct { // REQUIRED; IotHub capacity Capacity *Capacity // REQUIRED; The type of the resource. SKU *SKUInfo // READ-ONLY; The type of the resource. ResourceType *string }
SKUDescription - SKU properties.
func (SKUDescription) MarshalJSON ¶ added in v1.1.0
func (s SKUDescription) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SKUDescription.
func (*SKUDescription) UnmarshalJSON ¶ added in v1.1.0
func (s *SKUDescription) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SKUDescription.
type SKUDescriptionListResult ¶ added in v0.3.0
type SKUDescriptionListResult struct { // The array of IotHubSkuDescription. Value []*SKUDescription // READ-ONLY; The next link. NextLink *string }
SKUDescriptionListResult - The JSON-serialized array of IotHubSkuDescription objects with a next link.
func (SKUDescriptionListResult) MarshalJSON ¶ added in v0.3.0
func (s SKUDescriptionListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SKUDescriptionListResult.
func (*SKUDescriptionListResult) UnmarshalJSON ¶ added in v1.1.0
func (s *SKUDescriptionListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SKUDescriptionListResult.
type SKUInfo ¶ added in v0.3.0
type SKUInfo struct { // REQUIRED; The name of the SKU. Name *IotHubSKU // The number of provisioned IoT Hub units. See: https://docs.microsoft.com/azure/azure-subscription-service-limits#iot-hub-limits. Capacity *int64 // READ-ONLY; The billing tier for the IoT hub. Tier *IotHubSKUTier }
SKUInfo - Information about the SKU of the IoT hub.
func (SKUInfo) MarshalJSON ¶ added in v1.1.0
MarshalJSON implements the json.Marshaller interface for type SKUInfo.
func (*SKUInfo) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type SKUInfo.
type SharedAccessSignatureAuthorizationRule ¶
type SharedAccessSignatureAuthorizationRule struct { string Rights *AccessRights PrimaryKey *string SecondaryKey *string }KeyName *
SharedAccessSignatureAuthorizationRule - The properties of an IoT hub shared access policy.
func (SharedAccessSignatureAuthorizationRule) MarshalJSON ¶ added in v1.1.0
func (s SharedAccessSignatureAuthorizationRule) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SharedAccessSignatureAuthorizationRule.
func (*SharedAccessSignatureAuthorizationRule) UnmarshalJSON ¶ added in v1.1.0
func (s *SharedAccessSignatureAuthorizationRule) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SharedAccessSignatureAuthorizationRule.
type SharedAccessSignatureAuthorizationRuleListResult ¶
type SharedAccessSignatureAuthorizationRuleListResult struct { SharedAccessSignatureAuthorizationRule NextLink *string }Value []*
SharedAccessSignatureAuthorizationRuleListResult - The list of shared access policies with a next link.
func (SharedAccessSignatureAuthorizationRuleListResult) MarshalJSON ¶
func (s SharedAccessSignatureAuthorizationRuleListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SharedAccessSignatureAuthorizationRuleListResult.
func (*SharedAccessSignatureAuthorizationRuleListResult) UnmarshalJSON ¶ added in v1.1.0
func (s *SharedAccessSignatureAuthorizationRuleListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SharedAccessSignatureAuthorizationRuleListResult.
type StorageEndpointProperties ¶
type StorageEndpointProperties struct { // REQUIRED; The connection string for the Azure Storage account to which files are uploaded. ConnectionString *string // REQUIRED; The name of the root container where you upload files. The container need not exist but should be creatable using // the connectionString specified. ContainerName *string // Specifies authentication type being used for connecting to the storage account. AuthenticationType *AuthenticationType // Managed identity properties of storage endpoint for file upload. Identity *ManagedIdentity // The period of time for which the SAS URI generated by IoT Hub for file upload is valid. See: // https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload#file-upload-notification-configuration-options. SasTTLAsIso8601 *string }
StorageEndpointProperties - The properties of the Azure Storage endpoint for file upload.
func (StorageEndpointProperties) MarshalJSON ¶ added in v1.1.0
func (s StorageEndpointProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StorageEndpointProperties.
func (*StorageEndpointProperties) UnmarshalJSON ¶ added in v1.1.0
func (s *StorageEndpointProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StorageEndpointProperties.
type SystemData ¶ added in v0.4.0
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 ¶ added in v0.4.0
func (s SystemData) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SystemData.
func (*SystemData) UnmarshalJSON ¶ added in v0.4.0
func (s *SystemData) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.
type TagsResource ¶
TagsResource - A container holding only the Tags for a resource, allowing the user to update the tags on an IoT Hub instance.
func (TagsResource) MarshalJSON ¶
func (t TagsResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TagsResource.
func (*TagsResource) UnmarshalJSON ¶ added in v1.1.0
func (t *TagsResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TagsResource.
type TestAllRoutesInput ¶
type TestAllRoutesInput struct { // Routing message Message *RoutingMessage // Routing source RoutingSource *RoutingSource // Routing Twin Reference Twin *RoutingTwin }
TestAllRoutesInput - Input for testing all routes
func (TestAllRoutesInput) MarshalJSON ¶ added in v1.1.0
func (t TestAllRoutesInput) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TestAllRoutesInput.
func (*TestAllRoutesInput) UnmarshalJSON ¶ added in v1.1.0
func (t *TestAllRoutesInput) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TestAllRoutesInput.
type TestAllRoutesResult ¶
type TestAllRoutesResult struct { // JSON-serialized array of matched routes Routes []*MatchedRoute }
TestAllRoutesResult - Result of testing all routes
func (TestAllRoutesResult) MarshalJSON ¶
func (t TestAllRoutesResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TestAllRoutesResult.
func (*TestAllRoutesResult) UnmarshalJSON ¶ added in v1.1.0
func (t *TestAllRoutesResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TestAllRoutesResult.
type TestResultStatus ¶
type TestResultStatus string
TestResultStatus - Result of testing route
const ( TestResultStatusFalse TestResultStatus = "false" TestResultStatusTrue TestResultStatus = "true" TestResultStatusUndefined TestResultStatus = "undefined" )
func PossibleTestResultStatusValues ¶
func PossibleTestResultStatusValues() []TestResultStatus
PossibleTestResultStatusValues returns the possible values for the TestResultStatus const type.
type TestRouteInput ¶
type TestRouteInput struct { // REQUIRED; Route properties Route *RouteProperties // Routing message Message *RoutingMessage // Routing Twin Reference Twin *RoutingTwin }
TestRouteInput - Input for testing route
func (TestRouteInput) MarshalJSON ¶ added in v1.1.0
func (t TestRouteInput) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TestRouteInput.
func (*TestRouteInput) UnmarshalJSON ¶ added in v1.1.0
func (t *TestRouteInput) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TestRouteInput.
type TestRouteResult ¶
type TestRouteResult struct { // Detailed result of testing route Details *TestRouteResultDetails // Result of testing route Result *TestResultStatus }
TestRouteResult - Result of testing one route
func (TestRouteResult) MarshalJSON ¶ added in v1.1.0
func (t TestRouteResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TestRouteResult.
func (*TestRouteResult) UnmarshalJSON ¶ added in v1.1.0
func (t *TestRouteResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TestRouteResult.
type TestRouteResultDetails ¶
type TestRouteResultDetails struct { // JSON-serialized list of route compilation errors CompilationErrors []*RouteCompilationError }
TestRouteResultDetails - Detailed result of testing a route
func (TestRouteResultDetails) MarshalJSON ¶
func (t TestRouteResultDetails) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TestRouteResultDetails.
func (*TestRouteResultDetails) UnmarshalJSON ¶ added in v1.1.0
func (t *TestRouteResultDetails) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TestRouteResultDetails.
type UserSubscriptionQuota ¶
type UserSubscriptionQuota struct { // Current number of IotHub type CurrentValue *int32 // IotHub type id ID *string // Numerical limit on IotHub type Limit *int32 // IotHub type Name *Name // Response type Type *string // Unit of IotHub type Unit *string }
UserSubscriptionQuota - User subscription quota response
func (UserSubscriptionQuota) MarshalJSON ¶ added in v1.1.0
func (u UserSubscriptionQuota) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UserSubscriptionQuota.
func (*UserSubscriptionQuota) UnmarshalJSON ¶ added in v1.1.0
func (u *UserSubscriptionQuota) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UserSubscriptionQuota.
type UserSubscriptionQuotaListResult ¶
type UserSubscriptionQuotaListResult struct { Value []*UserSubscriptionQuota // READ-ONLY NextLink *string }
UserSubscriptionQuotaListResult - Json-serialized array of User subscription quota response
func (UserSubscriptionQuotaListResult) MarshalJSON ¶
func (u UserSubscriptionQuotaListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UserSubscriptionQuotaListResult.
func (*UserSubscriptionQuotaListResult) UnmarshalJSON ¶ added in v1.1.0
func (u *UserSubscriptionQuotaListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UserSubscriptionQuotaListResult.
Source Files ¶
- build.go
- certificates_client.go
- client.go
- client_factory.go
- constants.go
- models.go
- models_serde.go
- operations_client.go
- options.go
- privateendpointconnections_client.go
- privatelinkresources_client.go
- resource_client.go
- resourceprovidercommon_client.go
- response_types.go
- time_rfc1123.go
- time_rfc3339.go