Documentation ¶
Index ¶
- type AccessRightsDescription
- type AllocationPolicy
- type AsyncOperationResult
- type CertificateListDescription
- type CertificateProperties
- type CertificatePurpose
- type CertificateResponse
- type ClientFactory
- type CreatedByType
- type DpsCertificateClient
- func (client *DpsCertificateClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, provisioningServiceName string, ...) (DpsCertificateClientCreateOrUpdateResponse, error)
- func (client *DpsCertificateClient) Delete(ctx context.Context, resourceGroupName string, ifMatch string, ...) (DpsCertificateClientDeleteResponse, error)
- func (client *DpsCertificateClient) GenerateVerificationCode(ctx context.Context, certificateName string, ifMatch string, ...) (DpsCertificateClientGenerateVerificationCodeResponse, error)
- func (client *DpsCertificateClient) Get(ctx context.Context, certificateName string, resourceGroupName string, ...) (DpsCertificateClientGetResponse, error)
- func (client *DpsCertificateClient) List(ctx context.Context, resourceGroupName string, provisioningServiceName string, ...) (DpsCertificateClientListResponse, error)
- func (client *DpsCertificateClient) VerifyCertificate(ctx context.Context, certificateName string, ifMatch string, ...) (DpsCertificateClientVerifyCertificateResponse, error)
- type DpsCertificateClientCreateOrUpdateOptions
- type DpsCertificateClientCreateOrUpdateResponse
- type DpsCertificateClientDeleteOptions
- type DpsCertificateClientDeleteResponse
- type DpsCertificateClientGenerateVerificationCodeOptions
- type DpsCertificateClientGenerateVerificationCodeResponse
- type DpsCertificateClientGetOptions
- type DpsCertificateClientGetResponse
- type DpsCertificateClientListOptions
- type DpsCertificateClientListResponse
- type DpsCertificateClientVerifyCertificateOptions
- type DpsCertificateClientVerifyCertificateResponse
- type ErrorMessage
- type GroupIDInformation
- type GroupIDInformationProperties
- type IPFilterActionType
- type IPFilterRule
- type IPFilterTargetType
- type IotDpsPropertiesDescription
- type IotDpsResourceClient
- func (client *IotDpsResourceClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, provisioningServiceName string, ...) (*runtime.Poller[IotDpsResourceClientCreateOrUpdateResponse], error)
- func (client *IotDpsResourceClient) BeginCreateOrUpdatePrivateEndpointConnection(ctx context.Context, resourceGroupName string, resourceName string, ...) (...)
- func (client *IotDpsResourceClient) BeginDelete(ctx context.Context, provisioningServiceName string, resourceGroupName string, ...) (*runtime.Poller[IotDpsResourceClientDeleteResponse], error)
- func (client *IotDpsResourceClient) BeginDeletePrivateEndpointConnection(ctx context.Context, resourceGroupName string, resourceName string, ...) (*runtime.Poller[IotDpsResourceClientDeletePrivateEndpointConnectionResponse], ...)
- func (client *IotDpsResourceClient) BeginUpdate(ctx context.Context, resourceGroupName string, provisioningServiceName string, ...) (*runtime.Poller[IotDpsResourceClientUpdateResponse], error)
- func (client *IotDpsResourceClient) CheckProvisioningServiceNameAvailability(ctx context.Context, arguments OperationInputs, ...) (IotDpsResourceClientCheckProvisioningServiceNameAvailabilityResponse, error)
- func (client *IotDpsResourceClient) Get(ctx context.Context, provisioningServiceName string, resourceGroupName string, ...) (IotDpsResourceClientGetResponse, error)
- func (client *IotDpsResourceClient) GetOperationResult(ctx context.Context, operationID string, resourceGroupName string, ...) (IotDpsResourceClientGetOperationResultResponse, error)
- func (client *IotDpsResourceClient) GetPrivateEndpointConnection(ctx context.Context, resourceGroupName string, resourceName string, ...) (IotDpsResourceClientGetPrivateEndpointConnectionResponse, error)
- func (client *IotDpsResourceClient) GetPrivateLinkResources(ctx context.Context, resourceGroupName string, resourceName string, ...) (IotDpsResourceClientGetPrivateLinkResourcesResponse, error)
- func (client *IotDpsResourceClient) ListKeysForKeyName(ctx context.Context, provisioningServiceName string, keyName string, ...) (IotDpsResourceClientListKeysForKeyNameResponse, error)
- func (client *IotDpsResourceClient) ListPrivateEndpointConnections(ctx context.Context, resourceGroupName string, resourceName string, ...) (IotDpsResourceClientListPrivateEndpointConnectionsResponse, error)
- func (client *IotDpsResourceClient) ListPrivateLinkResources(ctx context.Context, resourceGroupName string, resourceName string, ...) (IotDpsResourceClientListPrivateLinkResourcesResponse, error)
- func (client *IotDpsResourceClient) NewListByResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[IotDpsResourceClientListByResourceGroupResponse]
- func (client *IotDpsResourceClient) NewListBySubscriptionPager(options *IotDpsResourceClientListBySubscriptionOptions) *runtime.Pager[IotDpsResourceClientListBySubscriptionResponse]
- func (client *IotDpsResourceClient) NewListKeysPager(provisioningServiceName string, resourceGroupName string, ...) *runtime.Pager[IotDpsResourceClientListKeysResponse]
- func (client *IotDpsResourceClient) NewListValidSKUsPager(provisioningServiceName string, resourceGroupName string, ...) *runtime.Pager[IotDpsResourceClientListValidSKUsResponse]
- type IotDpsResourceClientBeginCreateOrUpdateOptions
- type IotDpsResourceClientBeginCreateOrUpdatePrivateEndpointConnectionOptions
- type IotDpsResourceClientBeginDeleteOptions
- type IotDpsResourceClientBeginDeletePrivateEndpointConnectionOptions
- type IotDpsResourceClientBeginUpdateOptions
- type IotDpsResourceClientCheckProvisioningServiceNameAvailabilityOptions
- type IotDpsResourceClientCheckProvisioningServiceNameAvailabilityResponse
- type IotDpsResourceClientCreateOrUpdatePrivateEndpointConnectionResponse
- type IotDpsResourceClientCreateOrUpdateResponse
- type IotDpsResourceClientDeletePrivateEndpointConnectionResponse
- type IotDpsResourceClientDeleteResponse
- type IotDpsResourceClientGetOperationResultOptions
- type IotDpsResourceClientGetOperationResultResponse
- type IotDpsResourceClientGetOptions
- type IotDpsResourceClientGetPrivateEndpointConnectionOptions
- type IotDpsResourceClientGetPrivateEndpointConnectionResponse
- type IotDpsResourceClientGetPrivateLinkResourcesOptions
- type IotDpsResourceClientGetPrivateLinkResourcesResponse
- type IotDpsResourceClientGetResponse
- type IotDpsResourceClientListByResourceGroupOptions
- type IotDpsResourceClientListByResourceGroupResponse
- type IotDpsResourceClientListBySubscriptionOptions
- type IotDpsResourceClientListBySubscriptionResponse
- type IotDpsResourceClientListKeysForKeyNameOptions
- type IotDpsResourceClientListKeysForKeyNameResponse
- type IotDpsResourceClientListKeysOptions
- type IotDpsResourceClientListKeysResponse
- type IotDpsResourceClientListPrivateEndpointConnectionsOptions
- type IotDpsResourceClientListPrivateEndpointConnectionsResponse
- type IotDpsResourceClientListPrivateLinkResourcesOptions
- type IotDpsResourceClientListPrivateLinkResourcesResponse
- type IotDpsResourceClientListValidSKUsOptions
- type IotDpsResourceClientListValidSKUsResponse
- type IotDpsResourceClientUpdateResponse
- type IotDpsSKU
- type IotDpsSKUDefinition
- type IotDpsSKUDefinitionListResult
- type IotDpsSKUInfo
- type IotHubDefinitionDescription
- type NameAvailabilityInfo
- type NameUnavailabilityReason
- type Operation
- type OperationDisplay
- type OperationInputs
- type OperationListResult
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type PrivateEndpoint
- type PrivateEndpointConnection
- type PrivateEndpointConnectionProperties
- type PrivateLinkResources
- type PrivateLinkServiceConnectionState
- type PrivateLinkServiceConnectionStatus
- type ProvisioningServiceDescription
- type ProvisioningServiceDescriptionListResult
- type PublicNetworkAccess
- type SharedAccessSignatureAuthorizationRuleAccessRightsDescription
- type SharedAccessSignatureAuthorizationRuleListResult
- type State
- type SystemData
- type TagsResource
- type VerificationCodeRequest
- type VerificationCodeResponse
- type VerificationCodeResponseProperties
Examples ¶
- DpsCertificateClient.CreateOrUpdate
- DpsCertificateClient.Delete
- DpsCertificateClient.GenerateVerificationCode
- DpsCertificateClient.Get
- DpsCertificateClient.List
- DpsCertificateClient.VerifyCertificate
- IotDpsResourceClient.BeginCreateOrUpdate
- IotDpsResourceClient.BeginCreateOrUpdatePrivateEndpointConnection
- IotDpsResourceClient.BeginDelete
- IotDpsResourceClient.BeginDeletePrivateEndpointConnection
- IotDpsResourceClient.BeginUpdate
- IotDpsResourceClient.CheckProvisioningServiceNameAvailability
- IotDpsResourceClient.Get
- IotDpsResourceClient.GetOperationResult
- IotDpsResourceClient.GetPrivateEndpointConnection
- IotDpsResourceClient.GetPrivateLinkResources
- IotDpsResourceClient.ListKeysForKeyName
- IotDpsResourceClient.ListPrivateEndpointConnections
- IotDpsResourceClient.ListPrivateLinkResources
- IotDpsResourceClient.NewListByResourceGroupPager
- IotDpsResourceClient.NewListBySubscriptionPager
- IotDpsResourceClient.NewListKeysPager
- IotDpsResourceClient.NewListValidSKUsPager
- OperationsClient.NewListPager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessRightsDescription ¶
type AccessRightsDescription string
AccessRightsDescription - Rights that this key has.
const ( AccessRightsDescriptionDeviceConnect AccessRightsDescription = "DeviceConnect" AccessRightsDescriptionEnrollmentRead AccessRightsDescription = "EnrollmentRead" AccessRightsDescriptionEnrollmentWrite AccessRightsDescription = "EnrollmentWrite" AccessRightsDescriptionRegistrationStatusRead AccessRightsDescription = "RegistrationStatusRead" AccessRightsDescriptionRegistrationStatusWrite AccessRightsDescription = "RegistrationStatusWrite" AccessRightsDescriptionServiceConfig AccessRightsDescription = "ServiceConfig" )
func PossibleAccessRightsDescriptionValues ¶
func PossibleAccessRightsDescriptionValues() []AccessRightsDescription
PossibleAccessRightsDescriptionValues returns the possible values for the AccessRightsDescription const type.
type AllocationPolicy ¶
type AllocationPolicy string
AllocationPolicy - Allocation policy to be used by this provisioning service.
const ( AllocationPolicyGeoLatency AllocationPolicy = "GeoLatency" AllocationPolicyHashed AllocationPolicy = "Hashed" AllocationPolicyStatic AllocationPolicy = "Static" )
func PossibleAllocationPolicyValues ¶
func PossibleAllocationPolicyValues() []AllocationPolicy
PossibleAllocationPolicyValues returns the possible values for the AllocationPolicy const type.
type AsyncOperationResult ¶
type AsyncOperationResult struct { // Error message containing code, description and details Error *ErrorMessage // current status of a long running operation. Status *string }
AsyncOperationResult - Result of a long running operation.
func (AsyncOperationResult) MarshalJSON ¶ added in v1.1.0
func (a AsyncOperationResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AsyncOperationResult.
func (*AsyncOperationResult) UnmarshalJSON ¶ added in v1.1.0
func (a *AsyncOperationResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AsyncOperationResult.
type CertificateListDescription ¶
type CertificateListDescription struct { // The array of Certificate objects. Value []*CertificateResponse }
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 { // base-64 representation of X509 certificate .cer file or just .pem file content. Certificate []byte // Determines whether certificate has been verified. IsVerified *bool // READ-ONLY; The certificate's creation 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 CertificatePurpose ¶
type CertificatePurpose string
const ( CertificatePurposeClientAuthentication CertificatePurpose = "clientAuthentication" CertificatePurposeServerAuthentication CertificatePurpose = "serverAuthentication" )
func PossibleCertificatePurposeValues ¶
func PossibleCertificatePurposeValues() []CertificatePurpose
PossibleCertificatePurposeValues returns the possible values for the CertificatePurpose const type.
type CertificateResponse ¶
type CertificateResponse struct { // properties of a 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; Metadata pertaining to creation and last modification of the resource. SystemData *SystemData // READ-ONLY; The resource type. Type *string }
CertificateResponse - The X509 Certificate.
func (CertificateResponse) MarshalJSON ¶ added in v1.1.0
func (c CertificateResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CertificateResponse.
func (*CertificateResponse) UnmarshalJSON ¶ added in v1.1.0
func (c *CertificateResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CertificateResponse.
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) NewDpsCertificateClient ¶ added in v1.1.0
func (c *ClientFactory) NewDpsCertificateClient() *DpsCertificateClient
NewDpsCertificateClient creates a new instance of DpsCertificateClient.
func (*ClientFactory) NewIotDpsResourceClient ¶ added in v1.1.0
func (c *ClientFactory) NewIotDpsResourceClient() *IotDpsResourceClient
NewIotDpsResourceClient creates a new instance of IotDpsResourceClient.
func (*ClientFactory) NewOperationsClient ¶ added in v1.1.0
func (c *ClientFactory) NewOperationsClient() *OperationsClient
NewOperationsClient creates a new instance of OperationsClient.
type CreatedByType ¶ added in v0.3.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.3.0
func PossibleCreatedByTypeValues() []CreatedByType
PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.
type DpsCertificateClient ¶
type DpsCertificateClient struct {
// contains filtered or unexported fields
}
DpsCertificateClient contains the methods for the DpsCertificate group. Don't use this type directly, use NewDpsCertificateClient() instead.
func NewDpsCertificateClient ¶
func NewDpsCertificateClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DpsCertificateClient, error)
NewDpsCertificateClient creates a new instance of DpsCertificateClient 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 (*DpsCertificateClient) CreateOrUpdate ¶
func (client *DpsCertificateClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, provisioningServiceName string, certificateName string, certificateDescription CertificateResponse, options *DpsCertificateClientCreateOrUpdateOptions) (DpsCertificateClientCreateOrUpdateResponse, error)
CreateOrUpdate - Add new certificate or update an existing certificate. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-02-05
- resourceGroupName - Resource group identifier.
- provisioningServiceName - The name of the provisioning service.
- certificateName - The name of the certificate create or update.
- certificateDescription - The certificate body.
- options - DpsCertificateClientCreateOrUpdateOptions contains the optional parameters for the DpsCertificateClient.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2022-02-05/examples/DPSCertificateCreateOrUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/deviceprovisioningservices/armdeviceprovisioningservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdeviceprovisioningservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDpsCertificateClient().CreateOrUpdate(ctx, "myResourceGroup", "myFirstProvisioningService", "cert", armdeviceprovisioningservices.CertificateResponse{ Properties: &armdeviceprovisioningservices.CertificateProperties{ Certificate: []byte("############################################"), }, }, &armdeviceprovisioningservices.DpsCertificateClientCreateOrUpdateOptions{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.CertificateResponse = armdeviceprovisioningservices.CertificateResponse{ // Name: to.Ptr("cert"), // Type: to.Ptr("Microsoft.Devices/ProvisioningServices/Certificates"), // Etag: to.Ptr("AAAAAAExpNs="), // ID: to.Ptr("/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/ProvisioningServives/myFirstProvisioningService/certificates/cert"), // Properties: &armdeviceprovisioningservices.CertificateProperties{ // Certificate: []byte("############################################"), // 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 (*DpsCertificateClient) Delete ¶
func (client *DpsCertificateClient) Delete(ctx context.Context, resourceGroupName string, ifMatch string, provisioningServiceName string, certificateName string, options *DpsCertificateClientDeleteOptions) (DpsCertificateClientDeleteResponse, error)
Delete - Deletes the specified certificate associated with the Provisioning Service If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-02-05
- resourceGroupName - Resource group identifier.
- ifMatch - ETag of the certificate
- provisioningServiceName - The name of the provisioning service.
- certificateName - This is a mandatory field, and is the logical name of the certificate that the provisioning service will access by.
- options - DpsCertificateClientDeleteOptions contains the optional parameters for the DpsCertificateClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2022-02-05/examples/DPSDeleteCertificate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/deviceprovisioningservices/armdeviceprovisioningservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdeviceprovisioningservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewDpsCertificateClient().Delete(ctx, "myResourceGroup", "AAAAAAAADGk=", "myFirstProvisioningService", "cert", &armdeviceprovisioningservices.DpsCertificateClientDeleteOptions{CertificateName1: nil, CertificateIsVerified: nil, CertificatePurpose: nil, CertificateCreated: nil, CertificateLastUpdated: nil, CertificateHasPrivateKey: nil, CertificateNonce: nil, }) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*DpsCertificateClient) GenerateVerificationCode ¶
func (client *DpsCertificateClient) GenerateVerificationCode(ctx context.Context, certificateName string, ifMatch string, resourceGroupName string, provisioningServiceName string, options *DpsCertificateClientGenerateVerificationCodeOptions) (DpsCertificateClientGenerateVerificationCodeResponse, error)
GenerateVerificationCode - Generate verification code for Proof of Possession. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-02-05
- certificateName - The mandatory logical name of the certificate, that the provisioning service uses to access.
- ifMatch - ETag of the certificate. This is required to update an existing certificate, and ignored while creating a brand new certificate.
- resourceGroupName - name of resource group.
- provisioningServiceName - Name of provisioning service.
- options - DpsCertificateClientGenerateVerificationCodeOptions contains the optional parameters for the DpsCertificateClient.GenerateVerificationCode method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2022-02-05/examples/DPSGenerateVerificationCode.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/deviceprovisioningservices/armdeviceprovisioningservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdeviceprovisioningservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDpsCertificateClient().GenerateVerificationCode(ctx, "cert", "AAAAAAAADGk=", "myResourceGroup", "myFirstProvisioningService", &armdeviceprovisioningservices.DpsCertificateClientGenerateVerificationCodeOptions{CertificateName1: nil, CertificateIsVerified: nil, CertificatePurpose: nil, CertificateCreated: nil, CertificateLastUpdated: nil, CertificateHasPrivateKey: nil, CertificateNonce: 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.VerificationCodeResponse = armdeviceprovisioningservices.VerificationCodeResponse{ // Name: to.Ptr("cert"), // Properties: &armdeviceprovisioningservices.VerificationCodeResponseProperties{ // Certificate: []byte("###########################"), // Created: to.Ptr("Thu, 12 Oct 2017 19:23:50 GMT"), // Expiry: to.Ptr("Sat, 31 Dec 2039 23:59:59 GMT"), // IsVerified: to.Ptr(false), // Subject: to.Ptr("CN=andbucdevice1"), // Thumbprint: to.Ptr("##############################"), // Updated: to.Ptr("Thu, 12 Oct 2017 19:26:56 GMT"), // VerificationCode: to.Ptr("##################################"), // }, // } }
Output:
func (*DpsCertificateClient) Get ¶
func (client *DpsCertificateClient) Get(ctx context.Context, certificateName string, resourceGroupName string, provisioningServiceName string, options *DpsCertificateClientGetOptions) (DpsCertificateClientGetResponse, error)
Get - Get the certificate from the provisioning service. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-02-05
- certificateName - Name of the certificate to retrieve.
- resourceGroupName - Resource group identifier.
- provisioningServiceName - Name of the provisioning service the certificate is associated with.
- options - DpsCertificateClientGetOptions contains the optional parameters for the DpsCertificateClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2022-02-05/examples/DPSGetCertificate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/deviceprovisioningservices/armdeviceprovisioningservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdeviceprovisioningservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDpsCertificateClient().Get(ctx, "cert", "myResourceGroup", "myFirstProvisioningService", &armdeviceprovisioningservices.DpsCertificateClientGetOptions{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.CertificateResponse = armdeviceprovisioningservices.CertificateResponse{ // Name: to.Ptr("cert"), // Type: to.Ptr("Microsoft.Devices/ProvisioningServices/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: &armdeviceprovisioningservices.CertificateProperties{ // Certificate: []byte("######################################"), // 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 (*DpsCertificateClient) List ¶
func (client *DpsCertificateClient) List(ctx context.Context, resourceGroupName string, provisioningServiceName string, options *DpsCertificateClientListOptions) (DpsCertificateClientListResponse, error)
List - Get all the certificates tied to the provisioning service. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-02-05
- resourceGroupName - Name of resource group.
- provisioningServiceName - Name of provisioning service to retrieve certificates for.
- options - DpsCertificateClientListOptions contains the optional parameters for the DpsCertificateClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2022-02-05/examples/DPSGetCertificates.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/deviceprovisioningservices/armdeviceprovisioningservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdeviceprovisioningservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDpsCertificateClient().List(ctx, "myResourceGroup", "myFirstProvisioningService", 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 = armdeviceprovisioningservices.CertificateListDescription{ // Value: []*armdeviceprovisioningservices.CertificateResponse{ // { // Name: to.Ptr("cert"), // Type: to.Ptr("Microsoft.Devices/ProvisioningServices/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: &armdeviceprovisioningservices.CertificateProperties{ // Certificate: []byte("############################################"), // 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 (*DpsCertificateClient) VerifyCertificate ¶
func (client *DpsCertificateClient) VerifyCertificate(ctx context.Context, certificateName string, ifMatch string, resourceGroupName string, provisioningServiceName string, request VerificationCodeRequest, options *DpsCertificateClientVerifyCertificateOptions) (DpsCertificateClientVerifyCertificateResponse, error)
VerifyCertificate - 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 2022-02-05
- certificateName - The mandatory logical name of the certificate, that the provisioning service uses to access.
- ifMatch - ETag of the certificate.
- resourceGroupName - Resource group name.
- provisioningServiceName - Provisioning service name.
- request - The name of the certificate
- options - DpsCertificateClientVerifyCertificateOptions contains the optional parameters for the DpsCertificateClient.VerifyCertificate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2022-02-05/examples/DPSVerifyCertificate.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/deviceprovisioningservices/armdeviceprovisioningservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdeviceprovisioningservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDpsCertificateClient().VerifyCertificate(ctx, "cert", "AAAAAAAADGk=", "myResourceGroup", "myFirstProvisioningService", armdeviceprovisioningservices.VerificationCodeRequest{ Certificate: to.Ptr("#####################################"), }, &armdeviceprovisioningservices.DpsCertificateClientVerifyCertificateOptions{CertificateName1: nil, CertificateIsVerified: nil, CertificatePurpose: nil, CertificateCreated: nil, CertificateLastUpdated: nil, CertificateHasPrivateKey: nil, CertificateNonce: 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.CertificateResponse = armdeviceprovisioningservices.CertificateResponse{ // Name: to.Ptr("cert"), // Type: to.Ptr("Microsoft.Devices/ProvisioningServices/Certificates"), // Etag: to.Ptr("AAAAAAExpTQ="), // ID: to.Ptr("/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/ProvisioningServices/myFirstProvisioningService/certificates/cert"), // Properties: &armdeviceprovisioningservices.CertificateProperties{ // Certificate: []byte("#####################################"), // 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 DpsCertificateClientCreateOrUpdateOptions ¶ added in v0.2.0
type DpsCertificateClientCreateOrUpdateOptions struct { // ETag of the certificate. This is required to update an existing certificate, and ignored while creating a brand new certificate. IfMatch *string }
DpsCertificateClientCreateOrUpdateOptions contains the optional parameters for the DpsCertificateClient.CreateOrUpdate method.
type DpsCertificateClientCreateOrUpdateResponse ¶ added in v0.2.0
type DpsCertificateClientCreateOrUpdateResponse struct { // The X509 Certificate. CertificateResponse }
DpsCertificateClientCreateOrUpdateResponse contains the response from method DpsCertificateClient.CreateOrUpdate.
type DpsCertificateClientDeleteOptions ¶ added in v0.2.0
type DpsCertificateClientDeleteOptions struct { // Time the certificate is created. CertificateCreated *time.Time // Indicates if the certificate contains a private key. CertificateHasPrivateKey *bool // Indicates if certificate has been verified by owner of the private key. CertificateIsVerified *bool // Time the certificate is last updated. CertificateLastUpdated *time.Time // This is optional, and it is the Common Name of the certificate. CertificateName1 *string // Random number generated to indicate Proof of Possession. CertificateNonce *string // A description that mentions the purpose of the certificate. CertificatePurpose *CertificatePurpose // Raw data within the certificate. CertificateRawBytes []byte }
DpsCertificateClientDeleteOptions contains the optional parameters for the DpsCertificateClient.Delete method.
type DpsCertificateClientDeleteResponse ¶ added in v0.2.0
type DpsCertificateClientDeleteResponse struct { }
DpsCertificateClientDeleteResponse contains the response from method DpsCertificateClient.Delete.
type DpsCertificateClientGenerateVerificationCodeOptions ¶ added in v0.2.0
type DpsCertificateClientGenerateVerificationCodeOptions struct { // Certificate creation time. CertificateCreated *time.Time // Indicates if the certificate contains private key. CertificateHasPrivateKey *bool // Indicates if the certificate has been verified by owner of the private key. CertificateIsVerified *bool // Certificate last updated time. CertificateLastUpdated *time.Time // Common Name for the certificate. CertificateName1 *string // Random number generated to indicate Proof of Possession. CertificateNonce *string // Description mentioning the purpose of the certificate. CertificatePurpose *CertificatePurpose // Raw data of certificate. CertificateRawBytes []byte }
DpsCertificateClientGenerateVerificationCodeOptions contains the optional parameters for the DpsCertificateClient.GenerateVerificationCode method.
type DpsCertificateClientGenerateVerificationCodeResponse ¶ added in v0.2.0
type DpsCertificateClientGenerateVerificationCodeResponse struct { // Description of the response of the verification code. VerificationCodeResponse }
DpsCertificateClientGenerateVerificationCodeResponse contains the response from method DpsCertificateClient.GenerateVerificationCode.
type DpsCertificateClientGetOptions ¶ added in v0.2.0
type DpsCertificateClientGetOptions struct { // ETag of the certificate. IfMatch *string }
DpsCertificateClientGetOptions contains the optional parameters for the DpsCertificateClient.Get method.
type DpsCertificateClientGetResponse ¶ added in v0.2.0
type DpsCertificateClientGetResponse struct { // The X509 Certificate. CertificateResponse }
DpsCertificateClientGetResponse contains the response from method DpsCertificateClient.Get.
type DpsCertificateClientListOptions ¶ added in v0.2.0
type DpsCertificateClientListOptions struct { }
DpsCertificateClientListOptions contains the optional parameters for the DpsCertificateClient.List method.
type DpsCertificateClientListResponse ¶ added in v0.2.0
type DpsCertificateClientListResponse struct { // The JSON-serialized array of Certificate objects. CertificateListDescription }
DpsCertificateClientListResponse contains the response from method DpsCertificateClient.List.
type DpsCertificateClientVerifyCertificateOptions ¶ added in v0.2.0
type DpsCertificateClientVerifyCertificateOptions struct { // Certificate creation time. CertificateCreated *time.Time // Indicates if the certificate contains private key. CertificateHasPrivateKey *bool // Indicates if the certificate has been verified by owner of the private key. CertificateIsVerified *bool // Certificate last updated time. CertificateLastUpdated *time.Time // Common Name for the certificate. CertificateName1 *string // Random number generated to indicate Proof of Possession. CertificateNonce *string // Describe the purpose of the certificate. CertificatePurpose *CertificatePurpose // Raw data of certificate. CertificateRawBytes []byte }
DpsCertificateClientVerifyCertificateOptions contains the optional parameters for the DpsCertificateClient.VerifyCertificate method.
type DpsCertificateClientVerifyCertificateResponse ¶ added in v0.2.0
type DpsCertificateClientVerifyCertificateResponse struct { // The X509 Certificate. CertificateResponse }
DpsCertificateClientVerifyCertificateResponse contains the response from method DpsCertificateClient.VerifyCertificate.
type ErrorMessage ¶ added in v1.0.0
type ErrorMessage struct { // standard error code Code *string // detailed summary of error Details *string // standard error description Message *string }
ErrorMessage - Error response containing message and code.
func (ErrorMessage) MarshalJSON ¶ added in v1.1.0
func (e ErrorMessage) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorMessage.
func (*ErrorMessage) UnmarshalJSON ¶ added in v1.1.0
func (e *ErrorMessage) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorMessage.
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 a provisioning service
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 // Target for requests captured by this rule. Target *IPFilterTargetType }
IPFilterRule - The IP filter rules for a provisioning Service.
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 IPFilterTargetType ¶
type IPFilterTargetType string
IPFilterTargetType - Target for requests captured by this rule.
const ( IPFilterTargetTypeAll IPFilterTargetType = "all" IPFilterTargetTypeDeviceAPI IPFilterTargetType = "deviceApi" IPFilterTargetTypeServiceAPI IPFilterTargetType = "serviceApi" )
func PossibleIPFilterTargetTypeValues ¶
func PossibleIPFilterTargetTypeValues() []IPFilterTargetType
PossibleIPFilterTargetTypeValues returns the possible values for the IPFilterTargetType const type.
type IotDpsPropertiesDescription ¶
type IotDpsPropertiesDescription struct { // Allocation policy to be used by this provisioning service. AllocationPolicy *AllocationPolicy // List of authorization keys for a provisioning service. AuthorizationPolicies []*SharedAccessSignatureAuthorizationRuleAccessRightsDescription // Optional. Indicates if the DPS instance has Data Residency enabled, removing the cross geo-pair disaster recovery. EnableDataResidency *bool // The IP filter rules. IPFilterRules []*IPFilterRule // List of IoT hubs associated with this provisioning service. IotHubs []*IotHubDefinitionDescription // Private endpoint connections created on this IotHub PrivateEndpointConnections []*PrivateEndpointConnection // The ARM provisioning state of the provisioning service. ProvisioningState *string // Whether requests from Public Network are allowed PublicNetworkAccess *PublicNetworkAccess // Current state of the provisioning service. State *State // READ-ONLY; Device endpoint for this provisioning service. DeviceProvisioningHostName *string // READ-ONLY; Unique identifier of this provisioning service. IDScope *string // READ-ONLY; Service endpoint for provisioning service. ServiceOperationsHostName *string }
IotDpsPropertiesDescription - the service specific properties of a provisioning service, including keys, linked iot hubs, current state, and system generated properties such as hostname and idScope
func (IotDpsPropertiesDescription) MarshalJSON ¶
func (i IotDpsPropertiesDescription) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type IotDpsPropertiesDescription.
func (*IotDpsPropertiesDescription) UnmarshalJSON ¶ added in v1.1.0
func (i *IotDpsPropertiesDescription) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type IotDpsPropertiesDescription.
type IotDpsResourceClient ¶
type IotDpsResourceClient struct {
// contains filtered or unexported fields
}
IotDpsResourceClient contains the methods for the IotDpsResource group. Don't use this type directly, use NewIotDpsResourceClient() instead.
func NewIotDpsResourceClient ¶
func NewIotDpsResourceClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IotDpsResourceClient, error)
NewIotDpsResourceClient creates a new instance of IotDpsResourceClient 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 (*IotDpsResourceClient) BeginCreateOrUpdate ¶
func (client *IotDpsResourceClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, provisioningServiceName string, iotDpsDescription ProvisioningServiceDescription, options *IotDpsResourceClientBeginCreateOrUpdateOptions) (*runtime.Poller[IotDpsResourceClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create or update the metadata of the provisioning service. The usual pattern to modify a property is to retrieve the provisioning service metadata and security metadata, and then combine them with the modified values in a new body to update the provisioning service. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-02-05
- resourceGroupName - Resource group identifier.
- provisioningServiceName - Name of provisioning service to create or update.
- iotDpsDescription - Description of the provisioning service to create or update.
- options - IotDpsResourceClientBeginCreateOrUpdateOptions contains the optional parameters for the IotDpsResourceClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2022-02-05/examples/DPSCreate.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/deviceprovisioningservices/armdeviceprovisioningservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdeviceprovisioningservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewIotDpsResourceClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myFirstProvisioningService", armdeviceprovisioningservices.ProvisioningServiceDescription{ Location: to.Ptr("East US"), Tags: map[string]*string{}, Properties: &armdeviceprovisioningservices.IotDpsPropertiesDescription{ EnableDataResidency: to.Ptr(false), }, SKU: &armdeviceprovisioningservices.IotDpsSKUInfo{ Name: to.Ptr(armdeviceprovisioningservices.IotDpsSKUS1), Capacity: to.Ptr[int64](1), }, }, 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.ProvisioningServiceDescription = armdeviceprovisioningservices.ProvisioningServiceDescription{ // Name: to.Ptr("myFirstProvisioningService"), // Type: to.Ptr("Microsoft.Devices/ProvisioningServices"), // ID: to.Ptr("/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups//providers/Microsoft.Devices/ProvisioningServices/myFirstProvisioningService"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Etag: to.Ptr("AAAAAAAADGk="), // Properties: &armdeviceprovisioningservices.IotDpsPropertiesDescription{ // AllocationPolicy: to.Ptr(armdeviceprovisioningservices.AllocationPolicyHashed), // AuthorizationPolicies: []*armdeviceprovisioningservices.SharedAccessSignatureAuthorizationRuleAccessRightsDescription{ // }, // DeviceProvisioningHostName: to.Ptr("global.azure-devices-provisioning.net"), // EnableDataResidency: to.Ptr(false), // IDScope: to.Ptr("0ne00000012"), // ServiceOperationsHostName: to.Ptr("myFirstProvisioningService.azure-devices-provisioning.net"), // State: to.Ptr(armdeviceprovisioningservices.StateActive), // }, // SKU: &armdeviceprovisioningservices.IotDpsSKUInfo{ // Name: to.Ptr(armdeviceprovisioningservices.IotDpsSKUS1), // Capacity: to.Ptr[int64](1), // Tier: to.Ptr("Standard"), // }, // } }
Output:
func (*IotDpsResourceClient) BeginCreateOrUpdatePrivateEndpointConnection ¶
func (client *IotDpsResourceClient) BeginCreateOrUpdatePrivateEndpointConnection(ctx context.Context, resourceGroupName string, resourceName string, privateEndpointConnectionName string, privateEndpointConnection PrivateEndpointConnection, options *IotDpsResourceClientBeginCreateOrUpdatePrivateEndpointConnectionOptions) (*runtime.Poller[IotDpsResourceClientCreateOrUpdatePrivateEndpointConnectionResponse], error)
BeginCreateOrUpdatePrivateEndpointConnection - Create or 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 2022-02-05
- resourceGroupName - The name of the resource group that contains the provisioning service.
- resourceName - The name of the provisioning service.
- privateEndpointConnectionName - The name of the private endpoint connection
- privateEndpointConnection - The private endpoint connection with updated properties
- options - IotDpsResourceClientBeginCreateOrUpdatePrivateEndpointConnectionOptions contains the optional parameters for the IotDpsResourceClient.BeginCreateOrUpdatePrivateEndpointConnection method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2022-02-05/examples/DPSCreateOrUpdatePrivateEndpointConnection.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/deviceprovisioningservices/armdeviceprovisioningservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdeviceprovisioningservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewIotDpsResourceClient().BeginCreateOrUpdatePrivateEndpointConnection(ctx, "myResourceGroup", "myFirstProvisioningService", "myPrivateEndpointConnection", armdeviceprovisioningservices.PrivateEndpointConnection{ Properties: &armdeviceprovisioningservices.PrivateEndpointConnectionProperties{ PrivateLinkServiceConnectionState: &armdeviceprovisioningservices.PrivateLinkServiceConnectionState{ Description: to.Ptr("Approved by johndoe@contoso.com"), Status: to.Ptr(armdeviceprovisioningservices.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 = armdeviceprovisioningservices.PrivateEndpointConnection{ // Name: to.Ptr("myPrivateEndpointConnection"), // Type: to.Ptr("Microsoft.Devices/ProvisioningServices/PrivateEndpointConnections"), // ID: to.Ptr("/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/ProvisioningServices/myFirstProvisioningService/PrivateEndpointConnections/myPrivateEndpointConnection"), // Properties: &armdeviceprovisioningservices.PrivateEndpointConnectionProperties{ // PrivateEndpoint: &armdeviceprovisioningservices.PrivateEndpoint{ // ID: to.Ptr("/subscriptions/a9eba280-4734-4d49-878f-b5549d1d0453/resourceGroups/networkResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint"), // }, // PrivateLinkServiceConnectionState: &armdeviceprovisioningservices.PrivateLinkServiceConnectionState{ // Description: to.Ptr("Approved by johndoe@contoso.com"), // ActionsRequired: to.Ptr("None"), // Status: to.Ptr(armdeviceprovisioningservices.PrivateLinkServiceConnectionStatusApproved), // }, // }, // } }
Output:
func (*IotDpsResourceClient) BeginDelete ¶
func (client *IotDpsResourceClient) BeginDelete(ctx context.Context, provisioningServiceName string, resourceGroupName string, options *IotDpsResourceClientBeginDeleteOptions) (*runtime.Poller[IotDpsResourceClientDeleteResponse], error)
BeginDelete - Deletes the Provisioning Service. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-02-05
- provisioningServiceName - Name of provisioning service to delete.
- resourceGroupName - Resource group identifier.
- options - IotDpsResourceClientBeginDeleteOptions contains the optional parameters for the IotDpsResourceClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2022-02-05/examples/DPSDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/deviceprovisioningservices/armdeviceprovisioningservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdeviceprovisioningservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewIotDpsResourceClient().BeginDelete(ctx, "myFirstProvisioningService", "myResourceGroup", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*IotDpsResourceClient) BeginDeletePrivateEndpointConnection ¶
func (client *IotDpsResourceClient) BeginDeletePrivateEndpointConnection(ctx context.Context, resourceGroupName string, resourceName string, privateEndpointConnectionName string, options *IotDpsResourceClientBeginDeletePrivateEndpointConnectionOptions) (*runtime.Poller[IotDpsResourceClientDeletePrivateEndpointConnectionResponse], error)
BeginDeletePrivateEndpointConnection - Delete private endpoint connection with the specified name If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-02-05
- resourceGroupName - The name of the resource group that contains the provisioning service.
- resourceName - The name of the provisioning service.
- privateEndpointConnectionName - The name of the private endpoint connection
- options - IotDpsResourceClientBeginDeletePrivateEndpointConnectionOptions contains the optional parameters for the IotDpsResourceClient.BeginDeletePrivateEndpointConnection method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2022-02-05/examples/DPSDeletePrivateEndpointConnection.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/deviceprovisioningservices/armdeviceprovisioningservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdeviceprovisioningservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewIotDpsResourceClient().BeginDeletePrivateEndpointConnection(ctx, "myResourceGroup", "myFirstProvisioningService", "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 = armdeviceprovisioningservices.PrivateEndpointConnection{ // Name: to.Ptr("myPrivateEndpointConnection"), // Type: to.Ptr("Microsoft.Devices/ProvisioningServices/PrivateEndpointConnections"), // ID: to.Ptr("/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/ProvisioningServices/myFirstProvisioningService/PrivateEndpointConnections/myPrivateEndpointConnection"), // Properties: &armdeviceprovisioningservices.PrivateEndpointConnectionProperties{ // PrivateEndpoint: &armdeviceprovisioningservices.PrivateEndpoint{ // ID: to.Ptr("/subscriptions/a9eba280-4734-4d49-878f-b5549d1d0453/resourceGroups/networkResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint"), // }, // PrivateLinkServiceConnectionState: &armdeviceprovisioningservices.PrivateLinkServiceConnectionState{ // Description: to.Ptr("Deleted"), // ActionsRequired: to.Ptr("None"), // Status: to.Ptr(armdeviceprovisioningservices.PrivateLinkServiceConnectionStatusDisconnected), // }, // }, // } }
Output:
func (*IotDpsResourceClient) BeginUpdate ¶
func (client *IotDpsResourceClient) BeginUpdate(ctx context.Context, resourceGroupName string, provisioningServiceName string, provisioningServiceTags TagsResource, options *IotDpsResourceClientBeginUpdateOptions) (*runtime.Poller[IotDpsResourceClientUpdateResponse], error)
BeginUpdate - Update an existing provisioning service's tags. to update other fields use the CreateOrUpdate method If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-02-05
- resourceGroupName - Resource group identifier.
- provisioningServiceName - Name of provisioning service to create or update.
- provisioningServiceTags - Updated tag information to set into the provisioning service instance.
- options - IotDpsResourceClientBeginUpdateOptions contains the optional parameters for the IotDpsResourceClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2022-02-05/examples/DPSPatch.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/deviceprovisioningservices/armdeviceprovisioningservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdeviceprovisioningservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewIotDpsResourceClient().BeginUpdate(ctx, "myResourceGroup", "myFirstProvisioningService", armdeviceprovisioningservices.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.ProvisioningServiceDescription = armdeviceprovisioningservices.ProvisioningServiceDescription{ // Name: to.Ptr("myFirstProvisioningService"), // Type: to.Ptr("Microsoft.Devices/ProvisioningServices"), // ID: to.Ptr("/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/ProvisioningServices/myFirstProvisioningService"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // "foo": to.Ptr("bar"), // }, // Etag: to.Ptr("AAAAAAAADGk="), // Properties: &armdeviceprovisioningservices.IotDpsPropertiesDescription{ // AllocationPolicy: to.Ptr(armdeviceprovisioningservices.AllocationPolicyHashed), // DeviceProvisioningHostName: to.Ptr("global.azure-devices-provisioning.net"), // IDScope: to.Ptr("0ne00000012"), // ServiceOperationsHostName: to.Ptr("myFirstProvisioningService.azure-devices-provisioning.net"), // State: to.Ptr(armdeviceprovisioningservices.StateActive), // }, // SKU: &armdeviceprovisioningservices.IotDpsSKUInfo{ // Name: to.Ptr(armdeviceprovisioningservices.IotDpsSKUS1), // Capacity: to.Ptr[int64](1), // Tier: to.Ptr("Standard"), // }, // } }
Output:
func (*IotDpsResourceClient) CheckProvisioningServiceNameAvailability ¶
func (client *IotDpsResourceClient) CheckProvisioningServiceNameAvailability(ctx context.Context, arguments OperationInputs, options *IotDpsResourceClientCheckProvisioningServiceNameAvailabilityOptions) (IotDpsResourceClientCheckProvisioningServiceNameAvailabilityResponse, error)
CheckProvisioningServiceNameAvailability - Check if a provisioning service name is available. This will validate if the name is syntactically valid and if the name is usable If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-02-05
- arguments - Set the name parameter in the OperationInputs structure to the name of the provisioning service to check.
- options - IotDpsResourceClientCheckProvisioningServiceNameAvailabilityOptions contains the optional parameters for the IotDpsResourceClient.CheckProvisioningServiceNameAvailability method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2022-02-05/examples/DPSCheckNameAvailability.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/deviceprovisioningservices/armdeviceprovisioningservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdeviceprovisioningservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewIotDpsResourceClient().CheckProvisioningServiceNameAvailability(ctx, armdeviceprovisioningservices.OperationInputs{ Name: to.Ptr("test213123"), }, 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 = armdeviceprovisioningservices.NameAvailabilityInfo{ // Message: to.Ptr("name is valid"), // NameAvailable: to.Ptr(true), // Reason: to.Ptr(armdeviceprovisioningservices.NameUnavailabilityReasonInvalid), // } }
Output:
func (*IotDpsResourceClient) Get ¶
func (client *IotDpsResourceClient) Get(ctx context.Context, provisioningServiceName string, resourceGroupName string, options *IotDpsResourceClientGetOptions) (IotDpsResourceClientGetResponse, error)
Get - Get the metadata of the provisioning service without SAS keys. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-02-05
- provisioningServiceName - Name of the provisioning service to retrieve.
- resourceGroupName - Resource group name.
- options - IotDpsResourceClientGetOptions contains the optional parameters for the IotDpsResourceClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2022-02-05/examples/DPSGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/deviceprovisioningservices/armdeviceprovisioningservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdeviceprovisioningservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewIotDpsResourceClient().Get(ctx, "myFirstProvisioningService", "myResourceGroup", 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.ProvisioningServiceDescription = armdeviceprovisioningservices.ProvisioningServiceDescription{ // Name: to.Ptr("myFirstProvisioningService"), // Type: to.Ptr("Microsoft.Devices/ProvisioningServices"), // ID: to.Ptr("/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/ProvisioningServices/myFirstProvisioningService"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Etag: to.Ptr("AAAAAAAADGk="), // Properties: &armdeviceprovisioningservices.IotDpsPropertiesDescription{ // AllocationPolicy: to.Ptr(armdeviceprovisioningservices.AllocationPolicyHashed), // AuthorizationPolicies: []*armdeviceprovisioningservices.SharedAccessSignatureAuthorizationRuleAccessRightsDescription{ // }, // DeviceProvisioningHostName: to.Ptr("global.azure-devices-provisioning.net"), // IDScope: to.Ptr("0ne00000012"), // ServiceOperationsHostName: to.Ptr("myFirstProvisioningService.azure-devices-provisioning.net"), // State: to.Ptr(armdeviceprovisioningservices.StateActive), // }, // SKU: &armdeviceprovisioningservices.IotDpsSKUInfo{ // Name: to.Ptr(armdeviceprovisioningservices.IotDpsSKUS1), // Capacity: to.Ptr[int64](1), // Tier: to.Ptr("Standard"), // }, // } }
Output:
func (*IotDpsResourceClient) GetOperationResult ¶
func (client *IotDpsResourceClient) GetOperationResult(ctx context.Context, operationID string, resourceGroupName string, provisioningServiceName string, asyncinfo string, options *IotDpsResourceClientGetOperationResultOptions) (IotDpsResourceClientGetOperationResultResponse, error)
GetOperationResult - Gets the status of a long running operation, such as create, update or delete a provisioning service. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-02-05
- operationID - Operation id corresponding to long running operation. Use this to poll for the status.
- resourceGroupName - Resource group identifier.
- provisioningServiceName - Name of provisioning service that the operation is running on.
- asyncinfo - Async header used to poll on the status of the operation, obtained while creating the long running operation.
- options - IotDpsResourceClientGetOperationResultOptions contains the optional parameters for the IotDpsResourceClient.GetOperationResult method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2022-02-05/examples/DPSGetOperationResult.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/deviceprovisioningservices/armdeviceprovisioningservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdeviceprovisioningservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewIotDpsResourceClient().GetOperationResult(ctx, "MTY5OTNmZDctODI5Yy00N2E2LTkxNDQtMDU1NGIyYzY1ZjRl", "myResourceGroup", "myFirstProvisioningService", "1508265712453", 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.AsyncOperationResult = armdeviceprovisioningservices.AsyncOperationResult{ // Status: to.Ptr("Succeeded"), // } }
Output:
func (*IotDpsResourceClient) GetPrivateEndpointConnection ¶
func (client *IotDpsResourceClient) GetPrivateEndpointConnection(ctx context.Context, resourceGroupName string, resourceName string, privateEndpointConnectionName string, options *IotDpsResourceClientGetPrivateEndpointConnectionOptions) (IotDpsResourceClientGetPrivateEndpointConnectionResponse, error)
GetPrivateEndpointConnection - Get private endpoint connection properties If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-02-05
- resourceGroupName - The name of the resource group that contains the provisioning service.
- resourceName - The name of the provisioning service.
- privateEndpointConnectionName - The name of the private endpoint connection
- options - IotDpsResourceClientGetPrivateEndpointConnectionOptions contains the optional parameters for the IotDpsResourceClient.GetPrivateEndpointConnection method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2022-02-05/examples/DPSGetPrivateEndpointConnection.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/deviceprovisioningservices/armdeviceprovisioningservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdeviceprovisioningservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewIotDpsResourceClient().GetPrivateEndpointConnection(ctx, "myResourceGroup", "myFirstProvisioningService", "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 = armdeviceprovisioningservices.PrivateEndpointConnection{ // Name: to.Ptr("myPrivateEndpointConnection"), // Type: to.Ptr("Microsoft.Devices/ProvisioningServices/PrivateEndpointConnections"), // ID: to.Ptr("/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/ProvisioningServices/myFirstProvisioningService/PrivateEndpointConnections/myPrivateEndpointConnection"), // Properties: &armdeviceprovisioningservices.PrivateEndpointConnectionProperties{ // PrivateEndpoint: &armdeviceprovisioningservices.PrivateEndpoint{ // ID: to.Ptr("/subscriptions/a9eba280-4734-4d49-878f-b5549d1d0453/resourceGroups/networkResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint"), // }, // PrivateLinkServiceConnectionState: &armdeviceprovisioningservices.PrivateLinkServiceConnectionState{ // Description: to.Ptr("Please approve my request!"), // ActionsRequired: to.Ptr("None"), // Status: to.Ptr(armdeviceprovisioningservices.PrivateLinkServiceConnectionStatusPending), // }, // }, // } }
Output:
func (*IotDpsResourceClient) GetPrivateLinkResources ¶
func (client *IotDpsResourceClient) GetPrivateLinkResources(ctx context.Context, resourceGroupName string, resourceName string, groupID string, options *IotDpsResourceClientGetPrivateLinkResourcesOptions) (IotDpsResourceClientGetPrivateLinkResourcesResponse, error)
GetPrivateLinkResources - Get the specified private link resource for the given provisioning service If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-02-05
- resourceGroupName - The name of the resource group that contains the provisioning service.
- resourceName - The name of the provisioning service.
- groupID - The name of the private link resource
- options - IotDpsResourceClientGetPrivateLinkResourcesOptions contains the optional parameters for the IotDpsResourceClient.GetPrivateLinkResources method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2022-02-05/examples/DPSGetPrivateLinkResources.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/deviceprovisioningservices/armdeviceprovisioningservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdeviceprovisioningservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewIotDpsResourceClient().GetPrivateLinkResources(ctx, "myResourceGroup", "myFirstProvisioningService", "iotDps", 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 = armdeviceprovisioningservices.GroupIDInformation{ // Name: to.Ptr("iotDps"), // Type: to.Ptr("Microsoft.Devices/ProvisioningServices/PrivateLinkResources"), // ID: to.Ptr("/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/ProvisioningServices/myFirstProvisioningService/PrivateLinkResources/iotDps"), // Properties: &armdeviceprovisioningservices.GroupIDInformationProperties{ // GroupID: to.Ptr("iotDps"), // RequiredMembers: []*string{ // to.Ptr("iotDps")}, // RequiredZoneNames: []*string{ // to.Ptr("privatelink.azure-devices-provisioning.net")}, // }, // } }
Output:
func (*IotDpsResourceClient) ListKeysForKeyName ¶
func (client *IotDpsResourceClient) ListKeysForKeyName(ctx context.Context, provisioningServiceName string, keyName string, resourceGroupName string, options *IotDpsResourceClientListKeysForKeyNameOptions) (IotDpsResourceClientListKeysForKeyNameResponse, error)
ListKeysForKeyName - List primary and secondary keys for a specific key name If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-02-05
- provisioningServiceName - Name of the provisioning service.
- keyName - Logical key name to get key-values for.
- resourceGroupName - The name of the resource group that contains the provisioning service.
- options - IotDpsResourceClientListKeysForKeyNameOptions contains the optional parameters for the IotDpsResourceClient.ListKeysForKeyName method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2022-02-05/examples/DPSGetKey.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/deviceprovisioningservices/armdeviceprovisioningservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdeviceprovisioningservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewIotDpsResourceClient().ListKeysForKeyName(ctx, "myFirstProvisioningService", "testKey", "myResourceGroup", 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.SharedAccessSignatureAuthorizationRuleAccessRightsDescription = armdeviceprovisioningservices.SharedAccessSignatureAuthorizationRuleAccessRightsDescription{ // KeyName: to.Ptr("testKey"), // PrimaryKey: to.Ptr("##################################"), // Rights: to.Ptr(armdeviceprovisioningservices.AccessRightsDescriptionRegistrationStatusWrite), // SecondaryKey: to.Ptr("################################"), // } }
Output:
func (*IotDpsResourceClient) ListPrivateEndpointConnections ¶
func (client *IotDpsResourceClient) ListPrivateEndpointConnections(ctx context.Context, resourceGroupName string, resourceName string, options *IotDpsResourceClientListPrivateEndpointConnectionsOptions) (IotDpsResourceClientListPrivateEndpointConnectionsResponse, error)
ListPrivateEndpointConnections - List private endpoint connection properties If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-02-05
- resourceGroupName - The name of the resource group that contains the provisioning service.
- resourceName - The name of the provisioning service.
- options - IotDpsResourceClientListPrivateEndpointConnectionsOptions contains the optional parameters for the IotDpsResourceClient.ListPrivateEndpointConnections method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2022-02-05/examples/DPSListPrivateEndpointConnections.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/deviceprovisioningservices/armdeviceprovisioningservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdeviceprovisioningservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewIotDpsResourceClient().ListPrivateEndpointConnections(ctx, "myResourceGroup", "myFirstProvisioningService", 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 = []*armdeviceprovisioningservices.PrivateEndpointConnection{ // { // Name: to.Ptr("myPrivateEndpointConnection"), // Type: to.Ptr("Microsoft.Devices/ProvisioningServices/PrivateEndpointConnections"), // ID: to.Ptr("/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/ProvisioningServices/myFirstProvisioningService/PrivateEndpointConnections/myPrivateEndpointConnection"), // Properties: &armdeviceprovisioningservices.PrivateEndpointConnectionProperties{ // PrivateEndpoint: &armdeviceprovisioningservices.PrivateEndpoint{ // ID: to.Ptr("/subscriptions/a9eba280-4734-4d49-878f-b5549d1d0453/resourceGroups/networkResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint"), // }, // PrivateLinkServiceConnectionState: &armdeviceprovisioningservices.PrivateLinkServiceConnectionState{ // Description: to.Ptr("Please approve my request!"), // ActionsRequired: to.Ptr("None"), // Status: to.Ptr(armdeviceprovisioningservices.PrivateLinkServiceConnectionStatusPending), // }, // }, // }} }
Output:
func (*IotDpsResourceClient) ListPrivateLinkResources ¶
func (client *IotDpsResourceClient) ListPrivateLinkResources(ctx context.Context, resourceGroupName string, resourceName string, options *IotDpsResourceClientListPrivateLinkResourcesOptions) (IotDpsResourceClientListPrivateLinkResourcesResponse, error)
ListPrivateLinkResources - List private link resources for the given provisioning service If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-02-05
- resourceGroupName - The name of the resource group that contains the provisioning service.
- resourceName - The name of the provisioning service.
- options - IotDpsResourceClientListPrivateLinkResourcesOptions contains the optional parameters for the IotDpsResourceClient.ListPrivateLinkResources method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2022-02-05/examples/DPSListPrivateLinkResources.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/deviceprovisioningservices/armdeviceprovisioningservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdeviceprovisioningservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewIotDpsResourceClient().ListPrivateLinkResources(ctx, "myResourceGroup", "myFirstProvisioningService", 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 = armdeviceprovisioningservices.PrivateLinkResources{ // Value: []*armdeviceprovisioningservices.GroupIDInformation{ // { // Name: to.Ptr("iotDps"), // Type: to.Ptr("Microsoft.Devices/ProvisioningServices/PrivateLinkResources"), // ID: to.Ptr("/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/ProvisioningServices/myFirstProvisioningService/PrivateLinkResources/iotDps"), // Properties: &armdeviceprovisioningservices.GroupIDInformationProperties{ // GroupID: to.Ptr("iotDps"), // RequiredMembers: []*string{ // to.Ptr("iotDps")}, // RequiredZoneNames: []*string{ // to.Ptr("privatelink.azure-devices-provisioning.net")}, // }, // }}, // } }
Output:
func (*IotDpsResourceClient) NewListByResourceGroupPager ¶ added in v0.4.0
func (client *IotDpsResourceClient) NewListByResourceGroupPager(resourceGroupName string, options *IotDpsResourceClientListByResourceGroupOptions) *runtime.Pager[IotDpsResourceClientListByResourceGroupResponse]
NewListByResourceGroupPager - Get a list of all provisioning services in the given resource group.
Generated from API version 2022-02-05
- resourceGroupName - Resource group identifier.
- options - IotDpsResourceClientListByResourceGroupOptions contains the optional parameters for the IotDpsResourceClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2022-02-05/examples/DPSListByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/deviceprovisioningservices/armdeviceprovisioningservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdeviceprovisioningservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewIotDpsResourceClient().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.ProvisioningServiceDescriptionListResult = armdeviceprovisioningservices.ProvisioningServiceDescriptionListResult{ // Value: []*armdeviceprovisioningservices.ProvisioningServiceDescription{ // { // Name: to.Ptr("myFirstProvisioningService"), // Type: to.Ptr("Microsoft.Devices/ProvisioningServices"), // ID: to.Ptr("/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/ProvisioningServices/myFirstProvisioningService"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Etag: to.Ptr("AAAAAAAADGk="), // Properties: &armdeviceprovisioningservices.IotDpsPropertiesDescription{ // AllocationPolicy: to.Ptr(armdeviceprovisioningservices.AllocationPolicyHashed), // DeviceProvisioningHostName: to.Ptr("global.azure-devices-provisioning.net"), // IDScope: to.Ptr("0ne00000012"), // ServiceOperationsHostName: to.Ptr("myFirstProvisioningService.azure-devices-provisioning.net"), // State: to.Ptr(armdeviceprovisioningservices.StateActive), // }, // SKU: &armdeviceprovisioningservices.IotDpsSKUInfo{ // Name: to.Ptr(armdeviceprovisioningservices.IotDpsSKUS1), // Capacity: to.Ptr[int64](1), // Tier: to.Ptr("Standard"), // }, // }, // { // Name: to.Ptr("mySecondProvisioningService"), // Type: to.Ptr("Microsoft.Devices/ProvisioningServices"), // ID: to.Ptr("/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/ProvisioningServices/mySecondProvisioningService"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Etag: to.Ptr("AAAAAAAADGk="), // Properties: &armdeviceprovisioningservices.IotDpsPropertiesDescription{ // AllocationPolicy: to.Ptr(armdeviceprovisioningservices.AllocationPolicyHashed), // DeviceProvisioningHostName: to.Ptr("global.azure-devices-provisioning.net"), // IDScope: to.Ptr("0ne00000012"), // ServiceOperationsHostName: to.Ptr("mySecondProvisioningService.azure-devices-provisioning.net"), // State: to.Ptr(armdeviceprovisioningservices.StateActive), // }, // SKU: &armdeviceprovisioningservices.IotDpsSKUInfo{ // Name: to.Ptr(armdeviceprovisioningservices.IotDpsSKUS1), // Capacity: to.Ptr[int64](1), // Tier: to.Ptr("Standard"), // }, // }}, // } } }
Output:
func (*IotDpsResourceClient) NewListBySubscriptionPager ¶ added in v0.4.0
func (client *IotDpsResourceClient) NewListBySubscriptionPager(options *IotDpsResourceClientListBySubscriptionOptions) *runtime.Pager[IotDpsResourceClientListBySubscriptionResponse]
NewListBySubscriptionPager - List all the provisioning services for a given subscription id.
Generated from API version 2022-02-05
- options - IotDpsResourceClientListBySubscriptionOptions contains the optional parameters for the IotDpsResourceClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2022-02-05/examples/DPSListBySubscription.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/deviceprovisioningservices/armdeviceprovisioningservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdeviceprovisioningservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewIotDpsResourceClient().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.ProvisioningServiceDescriptionListResult = armdeviceprovisioningservices.ProvisioningServiceDescriptionListResult{ // Value: []*armdeviceprovisioningservices.ProvisioningServiceDescription{ // { // Name: to.Ptr("myFirstProvisioningService"), // Type: to.Ptr("Microsoft.Devices/ProvisioningServices"), // ID: to.Ptr("/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/ProvisioningServices/myFirstProvisioningService"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Etag: to.Ptr("AAAAAAAADGk="), // Properties: &armdeviceprovisioningservices.IotDpsPropertiesDescription{ // AllocationPolicy: to.Ptr(armdeviceprovisioningservices.AllocationPolicyHashed), // DeviceProvisioningHostName: to.Ptr("global.azure-devices-provisioning.net"), // IDScope: to.Ptr("0ne00000012"), // ServiceOperationsHostName: to.Ptr("myFirstProvisioningService.azure-devices-provisioning.net"), // State: to.Ptr(armdeviceprovisioningservices.StateActive), // }, // SKU: &armdeviceprovisioningservices.IotDpsSKUInfo{ // Name: to.Ptr(armdeviceprovisioningservices.IotDpsSKUS1), // Capacity: to.Ptr[int64](1), // Tier: to.Ptr("Standard"), // }, // }, // { // Name: to.Ptr("mySecondProvisioningService"), // Type: to.Ptr("Microsoft.Devices/ProvisioningServices"), // ID: to.Ptr("/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/ProvisioningServices/mySecondProvisioningService"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Etag: to.Ptr("AAAAAAAADGk="), // Properties: &armdeviceprovisioningservices.IotDpsPropertiesDescription{ // AllocationPolicy: to.Ptr(armdeviceprovisioningservices.AllocationPolicyHashed), // DeviceProvisioningHostName: to.Ptr("global.azure-devices-provisioning.net"), // IDScope: to.Ptr("0ne00000012"), // ServiceOperationsHostName: to.Ptr("myFirstProvisioningService.azure-devices-provisioning.net"), // State: to.Ptr(armdeviceprovisioningservices.StateActive), // }, // SKU: &armdeviceprovisioningservices.IotDpsSKUInfo{ // Name: to.Ptr(armdeviceprovisioningservices.IotDpsSKUS1), // Capacity: to.Ptr[int64](1), // Tier: to.Ptr("Standard"), // }, // }}, // } } }
Output:
func (*IotDpsResourceClient) NewListKeysPager ¶ added in v0.4.0
func (client *IotDpsResourceClient) NewListKeysPager(provisioningServiceName string, resourceGroupName string, options *IotDpsResourceClientListKeysOptions) *runtime.Pager[IotDpsResourceClientListKeysResponse]
NewListKeysPager - List the primary and secondary keys for a provisioning service.
Generated from API version 2022-02-05
- provisioningServiceName - The provisioning service name to get the shared access keys for.
- resourceGroupName - resource group name
- options - IotDpsResourceClientListKeysOptions contains the optional parameters for the IotDpsResourceClient.NewListKeysPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2022-02-05/examples/DPSListKeys.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/deviceprovisioningservices/armdeviceprovisioningservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdeviceprovisioningservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewIotDpsResourceClient().NewListKeysPager("myFirstProvisioningService", "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.SharedAccessSignatureAuthorizationRuleListResult = armdeviceprovisioningservices.SharedAccessSignatureAuthorizationRuleListResult{ // Value: []*armdeviceprovisioningservices.SharedAccessSignatureAuthorizationRuleAccessRightsDescription{ // { // KeyName: to.Ptr("key1"), // PrimaryKey: to.Ptr("#####################################"), // Rights: to.Ptr(armdeviceprovisioningservices.AccessRightsDescriptionServiceConfig), // SecondaryKey: to.Ptr("###################################"), // }, // { // KeyName: to.Ptr("key2"), // PrimaryKey: to.Ptr("#######################################"), // Rights: to.Ptr(armdeviceprovisioningservices.AccessRightsDescriptionServiceConfig), // SecondaryKey: to.Ptr("####################################="), // }}, // } } }
Output:
func (*IotDpsResourceClient) NewListValidSKUsPager ¶ added in v0.4.0
func (client *IotDpsResourceClient) NewListValidSKUsPager(provisioningServiceName string, resourceGroupName string, options *IotDpsResourceClientListValidSKUsOptions) *runtime.Pager[IotDpsResourceClientListValidSKUsResponse]
NewListValidSKUsPager - Gets the list of valid SKUs and tiers for a provisioning service.
Generated from API version 2022-02-05
- provisioningServiceName - Name of provisioning service.
- resourceGroupName - Name of resource group.
- options - IotDpsResourceClientListValidSKUsOptions contains the optional parameters for the IotDpsResourceClient.NewListValidSKUsPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2022-02-05/examples/DPSGetValidSku.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/deviceprovisioningservices/armdeviceprovisioningservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdeviceprovisioningservices.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewIotDpsResourceClient().NewListValidSKUsPager("myFirstProvisioningService", "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.IotDpsSKUDefinitionListResult = armdeviceprovisioningservices.IotDpsSKUDefinitionListResult{ // Value: []*armdeviceprovisioningservices.IotDpsSKUDefinition{ // { // Name: to.Ptr(armdeviceprovisioningservices.IotDpsSKUS1), // }}, // } } }
Output:
type IotDpsResourceClientBeginCreateOrUpdateOptions ¶ added in v0.2.0
type IotDpsResourceClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
IotDpsResourceClientBeginCreateOrUpdateOptions contains the optional parameters for the IotDpsResourceClient.BeginCreateOrUpdate method.
type IotDpsResourceClientBeginCreateOrUpdatePrivateEndpointConnectionOptions ¶ added in v0.2.0
type IotDpsResourceClientBeginCreateOrUpdatePrivateEndpointConnectionOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
IotDpsResourceClientBeginCreateOrUpdatePrivateEndpointConnectionOptions contains the optional parameters for the IotDpsResourceClient.BeginCreateOrUpdatePrivateEndpointConnection method.
type IotDpsResourceClientBeginDeleteOptions ¶ added in v0.2.0
type IotDpsResourceClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
IotDpsResourceClientBeginDeleteOptions contains the optional parameters for the IotDpsResourceClient.BeginDelete method.
type IotDpsResourceClientBeginDeletePrivateEndpointConnectionOptions ¶ added in v0.2.0
type IotDpsResourceClientBeginDeletePrivateEndpointConnectionOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
IotDpsResourceClientBeginDeletePrivateEndpointConnectionOptions contains the optional parameters for the IotDpsResourceClient.BeginDeletePrivateEndpointConnection method.
type IotDpsResourceClientBeginUpdateOptions ¶ added in v0.2.0
type IotDpsResourceClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
IotDpsResourceClientBeginUpdateOptions contains the optional parameters for the IotDpsResourceClient.BeginUpdate method.
type IotDpsResourceClientCheckProvisioningServiceNameAvailabilityOptions ¶ added in v0.2.0
type IotDpsResourceClientCheckProvisioningServiceNameAvailabilityOptions struct { }
IotDpsResourceClientCheckProvisioningServiceNameAvailabilityOptions contains the optional parameters for the IotDpsResourceClient.CheckProvisioningServiceNameAvailability method.
type IotDpsResourceClientCheckProvisioningServiceNameAvailabilityResponse ¶ added in v0.2.0
type IotDpsResourceClientCheckProvisioningServiceNameAvailabilityResponse struct { // Description of name availability. NameAvailabilityInfo }
IotDpsResourceClientCheckProvisioningServiceNameAvailabilityResponse contains the response from method IotDpsResourceClient.CheckProvisioningServiceNameAvailability.
type IotDpsResourceClientCreateOrUpdatePrivateEndpointConnectionResponse ¶ added in v0.2.0
type IotDpsResourceClientCreateOrUpdatePrivateEndpointConnectionResponse struct { // The private endpoint connection of a provisioning service PrivateEndpointConnection }
IotDpsResourceClientCreateOrUpdatePrivateEndpointConnectionResponse contains the response from method IotDpsResourceClient.BeginCreateOrUpdatePrivateEndpointConnection.
type IotDpsResourceClientCreateOrUpdateResponse ¶ added in v0.2.0
type IotDpsResourceClientCreateOrUpdateResponse struct { // The description of the provisioning service. ProvisioningServiceDescription }
IotDpsResourceClientCreateOrUpdateResponse contains the response from method IotDpsResourceClient.BeginCreateOrUpdate.
type IotDpsResourceClientDeletePrivateEndpointConnectionResponse ¶ added in v0.2.0
type IotDpsResourceClientDeletePrivateEndpointConnectionResponse struct { // The private endpoint connection of a provisioning service PrivateEndpointConnection }
IotDpsResourceClientDeletePrivateEndpointConnectionResponse contains the response from method IotDpsResourceClient.BeginDeletePrivateEndpointConnection.
type IotDpsResourceClientDeleteResponse ¶ added in v0.2.0
type IotDpsResourceClientDeleteResponse struct { }
IotDpsResourceClientDeleteResponse contains the response from method IotDpsResourceClient.BeginDelete.
type IotDpsResourceClientGetOperationResultOptions ¶ added in v0.2.0
type IotDpsResourceClientGetOperationResultOptions struct { }
IotDpsResourceClientGetOperationResultOptions contains the optional parameters for the IotDpsResourceClient.GetOperationResult method.
type IotDpsResourceClientGetOperationResultResponse ¶ added in v0.2.0
type IotDpsResourceClientGetOperationResultResponse struct { // Result of a long running operation. AsyncOperationResult }
IotDpsResourceClientGetOperationResultResponse contains the response from method IotDpsResourceClient.GetOperationResult.
type IotDpsResourceClientGetOptions ¶ added in v0.2.0
type IotDpsResourceClientGetOptions struct { }
IotDpsResourceClientGetOptions contains the optional parameters for the IotDpsResourceClient.Get method.
type IotDpsResourceClientGetPrivateEndpointConnectionOptions ¶ added in v0.2.0
type IotDpsResourceClientGetPrivateEndpointConnectionOptions struct { }
IotDpsResourceClientGetPrivateEndpointConnectionOptions contains the optional parameters for the IotDpsResourceClient.GetPrivateEndpointConnection method.
type IotDpsResourceClientGetPrivateEndpointConnectionResponse ¶ added in v0.2.0
type IotDpsResourceClientGetPrivateEndpointConnectionResponse struct { // The private endpoint connection of a provisioning service PrivateEndpointConnection }
IotDpsResourceClientGetPrivateEndpointConnectionResponse contains the response from method IotDpsResourceClient.GetPrivateEndpointConnection.
type IotDpsResourceClientGetPrivateLinkResourcesOptions ¶ added in v0.2.0
type IotDpsResourceClientGetPrivateLinkResourcesOptions struct { }
IotDpsResourceClientGetPrivateLinkResourcesOptions contains the optional parameters for the IotDpsResourceClient.GetPrivateLinkResources method.
type IotDpsResourceClientGetPrivateLinkResourcesResponse ¶ added in v0.2.0
type IotDpsResourceClientGetPrivateLinkResourcesResponse struct { // The group information for creating a private endpoint on a provisioning service GroupIDInformation }
IotDpsResourceClientGetPrivateLinkResourcesResponse contains the response from method IotDpsResourceClient.GetPrivateLinkResources.
type IotDpsResourceClientGetResponse ¶ added in v0.2.0
type IotDpsResourceClientGetResponse struct { // The description of the provisioning service. ProvisioningServiceDescription }
IotDpsResourceClientGetResponse contains the response from method IotDpsResourceClient.Get.
type IotDpsResourceClientListByResourceGroupOptions ¶ added in v0.2.0
type IotDpsResourceClientListByResourceGroupOptions struct { }
IotDpsResourceClientListByResourceGroupOptions contains the optional parameters for the IotDpsResourceClient.NewListByResourceGroupPager method.
type IotDpsResourceClientListByResourceGroupResponse ¶ added in v0.2.0
type IotDpsResourceClientListByResourceGroupResponse struct { // List of provisioning service descriptions. ProvisioningServiceDescriptionListResult }
IotDpsResourceClientListByResourceGroupResponse contains the response from method IotDpsResourceClient.NewListByResourceGroupPager.
type IotDpsResourceClientListBySubscriptionOptions ¶ added in v0.2.0
type IotDpsResourceClientListBySubscriptionOptions struct { }
IotDpsResourceClientListBySubscriptionOptions contains the optional parameters for the IotDpsResourceClient.NewListBySubscriptionPager method.
type IotDpsResourceClientListBySubscriptionResponse ¶ added in v0.2.0
type IotDpsResourceClientListBySubscriptionResponse struct { // List of provisioning service descriptions. ProvisioningServiceDescriptionListResult }
IotDpsResourceClientListBySubscriptionResponse contains the response from method IotDpsResourceClient.NewListBySubscriptionPager.
type IotDpsResourceClientListKeysForKeyNameOptions ¶ added in v0.2.0
type IotDpsResourceClientListKeysForKeyNameOptions struct { }
IotDpsResourceClientListKeysForKeyNameOptions contains the optional parameters for the IotDpsResourceClient.ListKeysForKeyName method.
type IotDpsResourceClientListKeysForKeyNameResponse ¶ added in v0.2.0
type IotDpsResourceClientListKeysForKeyNameResponse struct { SharedAccessSignatureAuthorizationRuleAccessRightsDescription }
IotDpsResourceClientListKeysForKeyNameResponse contains the response from method IotDpsResourceClient.ListKeysForKeyName.
type IotDpsResourceClientListKeysOptions ¶ added in v0.2.0
type IotDpsResourceClientListKeysOptions struct { }
IotDpsResourceClientListKeysOptions contains the optional parameters for the IotDpsResourceClient.NewListKeysPager method.
type IotDpsResourceClientListKeysResponse ¶ added in v0.2.0
type IotDpsResourceClientListKeysResponse struct { SharedAccessSignatureAuthorizationRuleListResult }
IotDpsResourceClientListKeysResponse contains the response from method IotDpsResourceClient.NewListKeysPager.
type IotDpsResourceClientListPrivateEndpointConnectionsOptions ¶ added in v0.2.0
type IotDpsResourceClientListPrivateEndpointConnectionsOptions struct { }
IotDpsResourceClientListPrivateEndpointConnectionsOptions contains the optional parameters for the IotDpsResourceClient.ListPrivateEndpointConnections method.
type IotDpsResourceClientListPrivateEndpointConnectionsResponse ¶ added in v0.2.0
type IotDpsResourceClientListPrivateEndpointConnectionsResponse struct { // The list of private endpoint connections for a provisioning service PrivateEndpointConnectionArray []*PrivateEndpointConnection }
IotDpsResourceClientListPrivateEndpointConnectionsResponse contains the response from method IotDpsResourceClient.ListPrivateEndpointConnections.
type IotDpsResourceClientListPrivateLinkResourcesOptions ¶ added in v0.2.0
type IotDpsResourceClientListPrivateLinkResourcesOptions struct { }
IotDpsResourceClientListPrivateLinkResourcesOptions contains the optional parameters for the IotDpsResourceClient.ListPrivateLinkResources method.
type IotDpsResourceClientListPrivateLinkResourcesResponse ¶ added in v0.2.0
type IotDpsResourceClientListPrivateLinkResourcesResponse struct { // The available private link resources for a provisioning service PrivateLinkResources }
IotDpsResourceClientListPrivateLinkResourcesResponse contains the response from method IotDpsResourceClient.ListPrivateLinkResources.
type IotDpsResourceClientListValidSKUsOptions ¶ added in v0.2.0
type IotDpsResourceClientListValidSKUsOptions struct { }
IotDpsResourceClientListValidSKUsOptions contains the optional parameters for the IotDpsResourceClient.NewListValidSKUsPager method.
type IotDpsResourceClientListValidSKUsResponse ¶ added in v0.2.0
type IotDpsResourceClientListValidSKUsResponse struct { // List of available SKUs. IotDpsSKUDefinitionListResult }
IotDpsResourceClientListValidSKUsResponse contains the response from method IotDpsResourceClient.NewListValidSKUsPager.
type IotDpsResourceClientUpdateResponse ¶ added in v0.2.0
type IotDpsResourceClientUpdateResponse struct { // The description of the provisioning service. ProvisioningServiceDescription }
IotDpsResourceClientUpdateResponse contains the response from method IotDpsResourceClient.BeginUpdate.
type IotDpsSKU ¶
type IotDpsSKU string
IotDpsSKU - Sku name.
const (
IotDpsSKUS1 IotDpsSKU = "S1"
)
func PossibleIotDpsSKUValues ¶
func PossibleIotDpsSKUValues() []IotDpsSKU
PossibleIotDpsSKUValues returns the possible values for the IotDpsSKU const type.
type IotDpsSKUDefinition ¶
type IotDpsSKUDefinition struct { // Sku name. Name *IotDpsSKU }
IotDpsSKUDefinition - Available SKUs of tier and units.
func (IotDpsSKUDefinition) MarshalJSON ¶ added in v1.1.0
func (i IotDpsSKUDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type IotDpsSKUDefinition.
func (*IotDpsSKUDefinition) UnmarshalJSON ¶ added in v1.1.0
func (i *IotDpsSKUDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type IotDpsSKUDefinition.
type IotDpsSKUDefinitionListResult ¶
type IotDpsSKUDefinitionListResult struct { // The list of SKUs Value []*IotDpsSKUDefinition // READ-ONLY; The next link. NextLink *string }
IotDpsSKUDefinitionListResult - List of available SKUs.
func (IotDpsSKUDefinitionListResult) MarshalJSON ¶
func (i IotDpsSKUDefinitionListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type IotDpsSKUDefinitionListResult.
func (*IotDpsSKUDefinitionListResult) UnmarshalJSON ¶ added in v1.1.0
func (i *IotDpsSKUDefinitionListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type IotDpsSKUDefinitionListResult.
type IotDpsSKUInfo ¶
type IotDpsSKUInfo struct { // The number of units to provision Capacity *int64 // Sku name. Name *IotDpsSKU // READ-ONLY; Pricing tier name of the provisioning service. Tier *string }
IotDpsSKUInfo - List of possible provisioning service SKUs.
func (IotDpsSKUInfo) MarshalJSON ¶ added in v1.1.0
func (i IotDpsSKUInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type IotDpsSKUInfo.
func (*IotDpsSKUInfo) UnmarshalJSON ¶ added in v1.1.0
func (i *IotDpsSKUInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type IotDpsSKUInfo.
type IotHubDefinitionDescription ¶
type IotHubDefinitionDescription struct { // REQUIRED; Connection string of the IoT hub. ConnectionString *string // REQUIRED; ARM region of the IoT hub. Location *string // weight to apply for a given iot h. AllocationWeight *int32 // flag for applying allocationPolicy or not for a given iot hub. ApplyAllocationPolicy *bool // READ-ONLY; Host name of the IoT hub. Name *string }
IotHubDefinitionDescription - Description of the IoT hub.
func (IotHubDefinitionDescription) MarshalJSON ¶ added in v1.1.0
func (i IotHubDefinitionDescription) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type IotHubDefinitionDescription.
func (*IotHubDefinitionDescription) UnmarshalJSON ¶ added in v1.1.0
func (i *IotHubDefinitionDescription) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type IotHubDefinitionDescription.
type NameAvailabilityInfo ¶
type NameAvailabilityInfo struct { // message containing a detailed reason name is unavailable Message *string // specifies if a name is available or not NameAvailable *bool // specifies the reason a name is unavailable Reason *NameUnavailabilityReason }
NameAvailabilityInfo - Description of name availability.
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 NameUnavailabilityReason ¶
type NameUnavailabilityReason string
NameUnavailabilityReason - specifies the reason a name is unavailable
const ()
func PossibleNameUnavailabilityReasonValues ¶
func PossibleNameUnavailabilityReasonValues() []NameUnavailabilityReason
PossibleNameUnavailabilityReasonValues returns the possible values for the NameUnavailabilityReason const type.
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 - Provisioning Service 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; Name of the operation. Operation *string // READ-ONLY; Service provider: Microsoft Devices. Provider *string // READ-ONLY; Resource Type: ProvisioningServices. 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 Provisioning Service to check. Name *string }
OperationInputs - Input values for operation results call.
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; Provisioning service operations supported by the Microsoft.Devices resource provider. Value []*Operation }
OperationListResult - Result of the request to list provisioning service operations. It contains a list of operations and a URL link to get the next set of results.
func (OperationListResult) MarshalJSON ¶
func (o OperationListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationListResult.
func (*OperationListResult) UnmarshalJSON ¶ added in v1.1.0
func (o *OperationListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.
type OperationsClient ¶
type OperationsClient struct {
// contains filtered or unexported fields
}
OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.
func NewOperationsClient ¶
func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)
NewOperationsClient creates a new instance of OperationsClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*OperationsClient) NewListPager ¶ added in v0.4.0
func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]
NewListPager - Lists all of the available Microsoft.Devices REST API operations.
Generated from API version 2022-02-05
- options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/deviceprovisioningservices/resource-manager/Microsoft.Devices/stable/2022-02-05/examples/DPSOperations.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/deviceprovisioningservices/armdeviceprovisioningservices" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdeviceprovisioningservices.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 = armdeviceprovisioningservices.OperationListResult{ // Value: []*armdeviceprovisioningservices.Operation{ // { // Name: to.Ptr("Microsoft.Devices/register/action"), // Display: &armdeviceprovisioningservices.OperationDisplay{ // Operation: to.Ptr("Register Resource Provider"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("IotHubs"), // }, // }, // { // Name: to.Ptr("Microsoft.Devices/IotHubs/diagnosticSettings/read"), // Display: &armdeviceprovisioningservices.OperationDisplay{ // Operation: to.Ptr("Get Diagnostic Setting"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("IotHubs"), // }, // }, // { // Name: to.Ptr("Microsoft.Devices/IotHubs/diagnosticSettings/write"), // Display: &armdeviceprovisioningservices.OperationDisplay{ // Operation: to.Ptr("Set Diagnostic Setting"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("IotHubs"), // }, // }, // { // Name: to.Ptr("Microsoft.Devices/IotHubs/metricDefinitions/read"), // Display: &armdeviceprovisioningservices.OperationDisplay{ // 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: &armdeviceprovisioningservices.OperationDisplay{ // 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: &armdeviceprovisioningservices.OperationDisplay{ // Operation: to.Ptr("Get All ResourceProvider Operations"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("IotHubs"), // }, // }, // { // Name: to.Ptr("Microsoft.Devices/checkNameAvailability/Action"), // Display: &armdeviceprovisioningservices.OperationDisplay{ // 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: &armdeviceprovisioningservices.OperationDisplay{ // Operation: to.Ptr("Get Subscription Usages"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("IotHubs"), // }, // }, // { // Name: to.Ptr("Microsoft.Devices/iotHubs/Read"), // Display: &armdeviceprovisioningservices.OperationDisplay{ // Operation: to.Ptr("Get IotHub(s)"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("IotHubs"), // }, // }, // { // Name: to.Ptr("Microsoft.Devices/iotHubs/Write"), // Display: &armdeviceprovisioningservices.OperationDisplay{ // 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: &armdeviceprovisioningservices.OperationDisplay{ // Operation: to.Ptr("Delete IotHub Resource"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("IotHubs"), // }, // }, // { // Name: to.Ptr("Microsoft.Devices/iotHubs/iotHubStats/Read"), // Display: &armdeviceprovisioningservices.OperationDisplay{ // Operation: to.Ptr("Get IotHub Statistics"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("IotHubs"), // }, // }, // { // Name: to.Ptr("Microsoft.Devices/iotHubs/skus/Read"), // Display: &armdeviceprovisioningservices.OperationDisplay{ // 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: &armdeviceprovisioningservices.OperationDisplay{ // 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: &armdeviceprovisioningservices.OperationDisplay{ // 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: &armdeviceprovisioningservices.OperationDisplay{ // 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: &armdeviceprovisioningservices.OperationDisplay{ // 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: &armdeviceprovisioningservices.OperationDisplay{ // 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: &armdeviceprovisioningservices.OperationDisplay{ // Operation: to.Ptr("Export Devices"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("IotHubs"), // }, // }, // { // Name: to.Ptr("Microsoft.Devices/iotHubs/importDevices/Action"), // Display: &armdeviceprovisioningservices.OperationDisplay{ // Operation: to.Ptr("Import Devices"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("IotHubs"), // }, // }, // { // Name: to.Ptr("Microsoft.Devices/iotHubs/jobs/Read"), // Display: &armdeviceprovisioningservices.OperationDisplay{ // 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: &armdeviceprovisioningservices.OperationDisplay{ // 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: &armdeviceprovisioningservices.OperationDisplay{ // 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: &armdeviceprovisioningservices.OperationDisplay{ // 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: &armdeviceprovisioningservices.OperationDisplay{ // Operation: to.Ptr("Get Endpoint Health"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("IotHubs"), // }, // }, // { // Name: to.Ptr("Microsoft.Devices/ProvisioningServices/diagnosticSettings/read"), // Display: &armdeviceprovisioningservices.OperationDisplay{ // Operation: to.Ptr("Get Diagnostic Setting"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("IotHubs"), // }, // }, // { // Name: to.Ptr("Microsoft.Devices/ProvisioningServices/diagnosticSettings/write"), // Display: &armdeviceprovisioningservices.OperationDisplay{ // Operation: to.Ptr("Set Diagnostic Setting"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("IotHubs"), // }, // }, // { // Name: to.Ptr("Microsoft.Devices/ProvisioningServices/metricDefinitions/read"), // Display: &armdeviceprovisioningservices.OperationDisplay{ // 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: &armdeviceprovisioningservices.OperationDisplay{ // 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: &armdeviceprovisioningservices.OperationDisplay{ // 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: &armdeviceprovisioningservices.OperationDisplay{ // Operation: to.Ptr("Get Provisioning Service resource"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("ProvisioningServices"), // }, // }, // { // Name: to.Ptr("Microsoft.Devices/provisioningServices/Write"), // Display: &armdeviceprovisioningservices.OperationDisplay{ // Operation: to.Ptr("Create Provisioning Service resource"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("ProvisioningServices"), // }, // }, // { // Name: to.Ptr("Microsoft.Devices/provisioningServices/Delete"), // Display: &armdeviceprovisioningservices.OperationDisplay{ // 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: &armdeviceprovisioningservices.OperationDisplay{ // 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: &armdeviceprovisioningservices.OperationDisplay{ // Operation: to.Ptr("get security related metadata"), // Provider: to.Ptr("Microsoft Devices"), // Resource: to.Ptr("ProvisioningServices"), // }, // }}, // } } }
Output:
type OperationsClientListOptions ¶ added in v0.2.0
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
type OperationsClientListResponse ¶ added in v0.2.0
type OperationsClientListResponse struct { // Result of the request to list provisioning service operations. It contains a list of operations and a URL link to get the // next set of results. OperationListResult }
OperationsClientListResponse contains the response from method OperationsClient.NewListPager.
type 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; Metadata pertaining to creation and last modification of the resource. SystemData *SystemData // READ-ONLY; The resource type. Type *string }
PrivateEndpointConnection - The private endpoint connection of a provisioning service
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 PrivateLinkResources ¶
type PrivateLinkResources struct { // The list of available private link resources for a provisioning service Value []*GroupIDInformation }
PrivateLinkResources - The available private link resources for a provisioning service
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 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 ProvisioningServiceDescription ¶
type ProvisioningServiceDescription struct { // REQUIRED; The resource location. Location *string // REQUIRED; Service specific properties for a provisioning service Properties *IotDpsPropertiesDescription // REQUIRED; Sku info for a provisioning Service. SKU *IotDpsSKUInfo // 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 resource tags. Tags map[string]*string // READ-ONLY; The resource identifier. ID *string // READ-ONLY; The resource name. Name *string // READ-ONLY; Metadata pertaining to creation and last modification of the resource. SystemData *SystemData // READ-ONLY; The resource type. Type *string }
ProvisioningServiceDescription - The description of the provisioning service.
func (ProvisioningServiceDescription) MarshalJSON ¶
func (p ProvisioningServiceDescription) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProvisioningServiceDescription.
func (*ProvisioningServiceDescription) UnmarshalJSON ¶ added in v1.1.0
func (p *ProvisioningServiceDescription) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ProvisioningServiceDescription.
type ProvisioningServiceDescriptionListResult ¶
type ProvisioningServiceDescriptionListResult struct { // List of provisioning service descriptions. Value []*ProvisioningServiceDescription // READ-ONLY; the next link NextLink *string }
ProvisioningServiceDescriptionListResult - List of provisioning service descriptions.
func (ProvisioningServiceDescriptionListResult) MarshalJSON ¶
func (p ProvisioningServiceDescriptionListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProvisioningServiceDescriptionListResult.
func (*ProvisioningServiceDescriptionListResult) UnmarshalJSON ¶ added in v1.1.0
func (p *ProvisioningServiceDescriptionListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ProvisioningServiceDescriptionListResult.
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 SharedAccessSignatureAuthorizationRuleAccessRightsDescription ¶
type SharedAccessSignatureAuthorizationRuleAccessRightsDescription struct { string Rights *AccessRightsDescription PrimaryKey *string SecondaryKey *string }KeyName *
SharedAccessSignatureAuthorizationRuleAccessRightsDescription - Description of the shared access key.
func (SharedAccessSignatureAuthorizationRuleAccessRightsDescription) MarshalJSON ¶ added in v1.1.0
func (s SharedAccessSignatureAuthorizationRuleAccessRightsDescription) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SharedAccessSignatureAuthorizationRuleAccessRightsDescription.
func (*SharedAccessSignatureAuthorizationRuleAccessRightsDescription) UnmarshalJSON ¶ added in v1.1.0
func (s *SharedAccessSignatureAuthorizationRuleAccessRightsDescription) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SharedAccessSignatureAuthorizationRuleAccessRightsDescription.
type SharedAccessSignatureAuthorizationRuleListResult ¶
type SharedAccessSignatureAuthorizationRuleListResult struct { SharedAccessSignatureAuthorizationRuleAccessRightsDescription NextLink *string }Value []*
SharedAccessSignatureAuthorizationRuleListResult - List of shared access keys.
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 State ¶
type State string
State - Current state of the provisioning service.
const ( StateActivating State = "Activating" StateActivationFailed State = "ActivationFailed" StateActive State = "Active" StateDeleted State = "Deleted" StateDeleting State = "Deleting" StateDeletionFailed State = "DeletionFailed" StateFailingOver State = "FailingOver" StateFailoverFailed State = "FailoverFailed" StateResuming State = "Resuming" StateSuspended State = "Suspended" StateSuspending State = "Suspending" StateTransitioning State = "Transitioning" )
func PossibleStateValues ¶
func PossibleStateValues() []State
PossibleStateValues returns the possible values for the State const type.
type SystemData ¶ added in v0.3.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.3.0
func (s SystemData) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SystemData.
func (*SystemData) UnmarshalJSON ¶ added in v0.3.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 a Provisioning Service 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 VerificationCodeRequest ¶
type VerificationCodeRequest struct { // base-64 representation of X509 certificate .cer file or just .pem file content. Certificate *string }
VerificationCodeRequest - The JSON-serialized leaf certificate
func (VerificationCodeRequest) MarshalJSON ¶ added in v1.1.0
func (v VerificationCodeRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VerificationCodeRequest.
func (*VerificationCodeRequest) UnmarshalJSON ¶ added in v1.1.0
func (v *VerificationCodeRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VerificationCodeRequest.
type VerificationCodeResponse ¶
type VerificationCodeResponse struct { Properties *VerificationCodeResponseProperties // READ-ONLY; Request etag. Etag *string // READ-ONLY; The resource identifier. ID *string // READ-ONLY; Name of certificate. Name *string // READ-ONLY; The resource type. Type *string }
VerificationCodeResponse - Description of the response of the verification code.
func (VerificationCodeResponse) MarshalJSON ¶ added in v1.1.0
func (v VerificationCodeResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VerificationCodeResponse.
func (*VerificationCodeResponse) UnmarshalJSON ¶ added in v1.1.0
func (v *VerificationCodeResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VerificationCodeResponse.
type VerificationCodeResponseProperties ¶
type VerificationCodeResponseProperties struct { // base-64 representation of X509 certificate .cer file or just .pem file content. Certificate []byte // Certificate created time. Created *string // Code expiry. Expiry *string // Indicate if the certificate is verified by owner of private key. IsVerified *bool // Certificate subject. Subject *string // Certificate thumbprint. Thumbprint *string // Certificate updated time. Updated *string // Verification code. VerificationCode *string }
func (VerificationCodeResponseProperties) MarshalJSON ¶
func (v VerificationCodeResponseProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VerificationCodeResponseProperties.
func (*VerificationCodeResponseProperties) UnmarshalJSON ¶
func (v *VerificationCodeResponseProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VerificationCodeResponseProperties.