Documentation ¶
Index ¶
- type AaddsResourceDetails
- type Application
- type ApplicationGetEndpoint
- type ApplicationGetHTTPSEndpoint
- type ApplicationListResult
- type ApplicationProperties
- type ApplicationsClient
- func (client *ApplicationsClient) BeginCreate(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[ApplicationsClientCreateResponse], error)
- func (client *ApplicationsClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[ApplicationsClientDeleteResponse], error)
- func (client *ApplicationsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, ...) (ApplicationsClientGetResponse, error)
- func (client *ApplicationsClient) GetAzureAsyncOperationStatus(ctx context.Context, resourceGroupName string, clusterName string, ...) (ApplicationsClientGetAzureAsyncOperationStatusResponse, error)
- func (client *ApplicationsClient) NewListByClusterPager(resourceGroupName string, clusterName string, ...) *runtime.Pager[ApplicationsClientListByClusterResponse]
- type ApplicationsClientBeginCreateOptions
- type ApplicationsClientBeginDeleteOptions
- type ApplicationsClientCreateResponse
- type ApplicationsClientDeleteResponse
- type ApplicationsClientGetAzureAsyncOperationStatusOptions
- type ApplicationsClientGetAzureAsyncOperationStatusResponse
- type ApplicationsClientGetOptions
- type ApplicationsClientGetResponse
- type ApplicationsClientListByClusterOptions
- type ApplicationsClientListByClusterResponse
- type AsyncOperationResult
- type AsyncOperationState
- type Autoscale
- type AutoscaleCapacity
- type AutoscaleConfigurationUpdateParameter
- type AutoscaleRecurrence
- type AutoscaleSchedule
- type AutoscaleTimeAndCapacity
- type AzureMonitorRequest
- type AzureMonitorResponse
- type AzureMonitorSelectedConfigurations
- type AzureMonitorTableConfiguration
- type BillingMeters
- type BillingResources
- type BillingResponseListResult
- type CapabilitiesResult
- type ClientFactory
- func (c *ClientFactory) NewApplicationsClient() *ApplicationsClient
- func (c *ClientFactory) NewClustersClient() *ClustersClient
- func (c *ClientFactory) NewConfigurationsClient() *ConfigurationsClient
- func (c *ClientFactory) NewExtensionsClient() *ExtensionsClient
- func (c *ClientFactory) NewLocationsClient() *LocationsClient
- func (c *ClientFactory) NewOperationsClient() *OperationsClient
- func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient
- func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient
- func (c *ClientFactory) NewScriptActionsClient() *ScriptActionsClient
- func (c *ClientFactory) NewScriptExecutionHistoryClient() *ScriptExecutionHistoryClient
- func (c *ClientFactory) NewVirtualMachinesClient() *VirtualMachinesClient
- type ClientGroupInfo
- type Cluster
- type ClusterConfigurations
- type ClusterCreateParametersExtended
- type ClusterCreateProperties
- type ClusterCreateRequestValidationParameters
- type ClusterCreateValidationResult
- type ClusterDefinition
- type ClusterDiskEncryptionParameters
- type ClusterGetProperties
- type ClusterIdentity
- type ClusterListPersistedScriptActionsResult
- type ClusterListResult
- type ClusterMonitoringRequest
- type ClusterMonitoringResponse
- type ClusterPatchParameters
- type ClusterResizeParameters
- type ClustersClient
- func (client *ClustersClient) BeginCreate(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[ClustersClientCreateResponse], error)
- func (client *ClustersClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[ClustersClientDeleteResponse], error)
- func (client *ClustersClient) BeginExecuteScriptActions(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[ClustersClientExecuteScriptActionsResponse], error)
- func (client *ClustersClient) BeginResize(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[ClustersClientResizeResponse], error)
- func (client *ClustersClient) BeginRotateDiskEncryptionKey(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[ClustersClientRotateDiskEncryptionKeyResponse], error)
- func (client *ClustersClient) BeginUpdateAutoScaleConfiguration(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[ClustersClientUpdateAutoScaleConfigurationResponse], error)
- func (client *ClustersClient) BeginUpdateGatewaySettings(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[ClustersClientUpdateGatewaySettingsResponse], error)
- func (client *ClustersClient) BeginUpdateIdentityCertificate(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[ClustersClientUpdateIdentityCertificateResponse], error)
- func (client *ClustersClient) Get(ctx context.Context, resourceGroupName string, clusterName string, ...) (ClustersClientGetResponse, error)
- func (client *ClustersClient) GetAzureAsyncOperationStatus(ctx context.Context, resourceGroupName string, clusterName string, ...) (ClustersClientGetAzureAsyncOperationStatusResponse, error)
- func (client *ClustersClient) GetGatewaySettings(ctx context.Context, resourceGroupName string, clusterName string, ...) (ClustersClientGetGatewaySettingsResponse, error)
- func (client *ClustersClient) NewListByResourceGroupPager(resourceGroupName string, options *ClustersClientListByResourceGroupOptions) *runtime.Pager[ClustersClientListByResourceGroupResponse]
- func (client *ClustersClient) NewListPager(options *ClustersClientListOptions) *runtime.Pager[ClustersClientListResponse]
- func (client *ClustersClient) Update(ctx context.Context, resourceGroupName string, clusterName string, ...) (ClustersClientUpdateResponse, error)
- type ClustersClientBeginCreateOptions
- type ClustersClientBeginDeleteOptions
- type ClustersClientBeginExecuteScriptActionsOptions
- type ClustersClientBeginResizeOptions
- type ClustersClientBeginRotateDiskEncryptionKeyOptions
- type ClustersClientBeginUpdateAutoScaleConfigurationOptions
- type ClustersClientBeginUpdateGatewaySettingsOptions
- type ClustersClientBeginUpdateIdentityCertificateOptions
- type ClustersClientCreateResponse
- type ClustersClientDeleteResponse
- type ClustersClientExecuteScriptActionsResponse
- type ClustersClientGetAzureAsyncOperationStatusOptions
- type ClustersClientGetAzureAsyncOperationStatusResponse
- type ClustersClientGetGatewaySettingsOptions
- type ClustersClientGetGatewaySettingsResponse
- type ClustersClientGetOptions
- type ClustersClientGetResponse
- type ClustersClientListByResourceGroupOptions
- type ClustersClientListByResourceGroupResponse
- type ClustersClientListOptions
- type ClustersClientListResponse
- type ClustersClientResizeResponse
- type ClustersClientRotateDiskEncryptionKeyResponse
- type ClustersClientUpdateAutoScaleConfigurationResponse
- type ClustersClientUpdateGatewaySettingsResponse
- type ClustersClientUpdateIdentityCertificateResponse
- type ClustersClientUpdateOptions
- type ClustersClientUpdateResponse
- type ComputeIsolationProperties
- type ComputeProfile
- type ConfigurationsClient
- func (client *ConfigurationsClient) BeginUpdate(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[ConfigurationsClientUpdateResponse], error)
- func (client *ConfigurationsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, ...) (ConfigurationsClientGetResponse, error)
- func (client *ConfigurationsClient) List(ctx context.Context, resourceGroupName string, clusterName string, ...) (ConfigurationsClientListResponse, error)
- type ConfigurationsClientBeginUpdateOptions
- type ConfigurationsClientGetOptions
- type ConfigurationsClientGetResponse
- type ConfigurationsClientListOptions
- type ConfigurationsClientListResponse
- type ConfigurationsClientUpdateResponse
- type ConnectivityEndpoint
- type CreatedByType
- type DataDisksGroups
- type DaysOfWeek
- type Dimension
- type DirectoryType
- type DiskBillingMeters
- type DiskEncryptionProperties
- type EncryptionInTransitProperties
- type ErrorResponse
- type Errors
- type ExcludedServicesConfig
- type ExecuteScriptActionParameters
- type Extension
- type ExtensionsClient
- func (client *ExtensionsClient) BeginCreate(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[ExtensionsClientCreateResponse], error)
- func (client *ExtensionsClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[ExtensionsClientDeleteResponse], error)
- func (client *ExtensionsClient) BeginDisableAzureMonitor(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[ExtensionsClientDisableAzureMonitorResponse], error)
- func (client *ExtensionsClient) BeginDisableMonitoring(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[ExtensionsClientDisableMonitoringResponse], error)
- func (client *ExtensionsClient) BeginEnableAzureMonitor(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[ExtensionsClientEnableAzureMonitorResponse], error)
- func (client *ExtensionsClient) BeginEnableMonitoring(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[ExtensionsClientEnableMonitoringResponse], error)
- func (client *ExtensionsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, ...) (ExtensionsClientGetResponse, error)
- func (client *ExtensionsClient) GetAzureAsyncOperationStatus(ctx context.Context, resourceGroupName string, clusterName string, ...) (ExtensionsClientGetAzureAsyncOperationStatusResponse, error)
- func (client *ExtensionsClient) GetAzureMonitorStatus(ctx context.Context, resourceGroupName string, clusterName string, ...) (ExtensionsClientGetAzureMonitorStatusResponse, error)
- func (client *ExtensionsClient) GetMonitoringStatus(ctx context.Context, resourceGroupName string, clusterName string, ...) (ExtensionsClientGetMonitoringStatusResponse, error)
- type ExtensionsClientBeginCreateOptions
- type ExtensionsClientBeginDeleteOptions
- type ExtensionsClientBeginDisableAzureMonitorOptions
- type ExtensionsClientBeginDisableMonitoringOptions
- type ExtensionsClientBeginEnableAzureMonitorOptions
- type ExtensionsClientBeginEnableMonitoringOptions
- type ExtensionsClientCreateResponse
- type ExtensionsClientDeleteResponse
- type ExtensionsClientDisableAzureMonitorResponse
- type ExtensionsClientDisableMonitoringResponse
- type ExtensionsClientEnableAzureMonitorResponse
- type ExtensionsClientEnableMonitoringResponse
- type ExtensionsClientGetAzureAsyncOperationStatusOptions
- type ExtensionsClientGetAzureAsyncOperationStatusResponse
- type ExtensionsClientGetAzureMonitorStatusOptions
- type ExtensionsClientGetAzureMonitorStatusResponse
- type ExtensionsClientGetMonitoringStatusOptions
- type ExtensionsClientGetMonitoringStatusResponse
- type ExtensionsClientGetOptions
- type ExtensionsClientGetResponse
- type FilterMode
- type GatewaySettings
- type HDInsightClusterProvisioningState
- type HardwareProfile
- type HostInfo
- type IPConfiguration
- type IPConfigurationProperties
- type JSONWebKeyEncryptionAlgorithm
- type KafkaRestProperties
- type LinuxOperatingSystemProfile
- type LocalizedName
- type LocationsClient
- func (client *LocationsClient) CheckNameAvailability(ctx context.Context, location string, ...) (LocationsClientCheckNameAvailabilityResponse, error)
- func (client *LocationsClient) GetAzureAsyncOperationStatus(ctx context.Context, location string, operationID string, ...) (LocationsClientGetAzureAsyncOperationStatusResponse, error)
- func (client *LocationsClient) GetCapabilities(ctx context.Context, location string, ...) (LocationsClientGetCapabilitiesResponse, error)
- func (client *LocationsClient) ListBillingSpecs(ctx context.Context, location string, ...) (LocationsClientListBillingSpecsResponse, error)
- func (client *LocationsClient) ListUsages(ctx context.Context, location string, ...) (LocationsClientListUsagesResponse, error)
- func (client *LocationsClient) ValidateClusterCreateRequest(ctx context.Context, location string, ...) (LocationsClientValidateClusterCreateRequestResponse, error)
- type LocationsClientCheckNameAvailabilityOptions
- type LocationsClientCheckNameAvailabilityResponse
- type LocationsClientGetAzureAsyncOperationStatusOptions
- type LocationsClientGetAzureAsyncOperationStatusResponse
- type LocationsClientGetCapabilitiesOptions
- type LocationsClientGetCapabilitiesResponse
- type LocationsClientListBillingSpecsOptions
- type LocationsClientListBillingSpecsResponse
- type LocationsClientListUsagesOptions
- type LocationsClientListUsagesResponse
- type LocationsClientValidateClusterCreateRequestOptions
- type LocationsClientValidateClusterCreateRequestResponse
- type MetricSpecifications
- type NameAvailabilityCheckRequestParameters
- type NameAvailabilityCheckResult
- type NetworkProperties
- type OSType
- type Operation
- type OperationDisplay
- type OperationListResult
- type OperationProperties
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type OsProfile
- type PrivateEndpoint
- type PrivateEndpointConnection
- type PrivateEndpointConnectionListResult
- type PrivateEndpointConnectionProperties
- type PrivateEndpointConnectionProvisioningState
- type PrivateEndpointConnectionsClient
- func (client *PrivateEndpointConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[PrivateEndpointConnectionsClientCreateOrUpdateResponse], error)
- func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error)
- func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, ...) (PrivateEndpointConnectionsClientGetResponse, error)
- func (client *PrivateEndpointConnectionsClient) NewListByClusterPager(resourceGroupName string, clusterName string, ...) *runtime.Pager[PrivateEndpointConnectionsClientListByClusterResponse]
- type PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions
- type PrivateEndpointConnectionsClientBeginDeleteOptions
- type PrivateEndpointConnectionsClientCreateOrUpdateResponse
- type PrivateEndpointConnectionsClientDeleteResponse
- type PrivateEndpointConnectionsClientGetOptions
- type PrivateEndpointConnectionsClientGetResponse
- type PrivateEndpointConnectionsClientListByClusterOptions
- type PrivateEndpointConnectionsClientListByClusterResponse
- type PrivateIPAllocationMethod
- type PrivateLink
- type PrivateLinkConfiguration
- type PrivateLinkConfigurationProperties
- type PrivateLinkConfigurationProvisioningState
- type PrivateLinkResource
- type PrivateLinkResourceListResult
- type PrivateLinkResourceProperties
- type PrivateLinkResourcesClient
- func (client *PrivateLinkResourcesClient) Get(ctx context.Context, resourceGroupName string, clusterName string, ...) (PrivateLinkResourcesClientGetResponse, error)
- func (client *PrivateLinkResourcesClient) ListByCluster(ctx context.Context, resourceGroupName string, clusterName string, ...) (PrivateLinkResourcesClientListByClusterResponse, error)
- type PrivateLinkResourcesClientGetOptions
- type PrivateLinkResourcesClientGetResponse
- type PrivateLinkResourcesClientListByClusterOptions
- type PrivateLinkResourcesClientListByClusterResponse
- type PrivateLinkServiceConnectionState
- type PrivateLinkServiceConnectionStatus
- type ProxyResource
- type QuotaCapability
- type QuotaInfo
- type RegionalQuotaCapability
- type RegionsCapability
- type Resource
- type ResourceID
- type ResourceIdentityType
- type ResourceProviderConnection
- type Role
- type RoleName
- type RuntimeScriptAction
- type RuntimeScriptActionDetail
- type SSHProfile
- type SSHPublicKey
- type ScriptAction
- type ScriptActionExecutionHistoryList
- type ScriptActionExecutionSummary
- type ScriptActionPersistedGetResponseSpec
- type ScriptActionsClient
- func (client *ScriptActionsClient) Delete(ctx context.Context, resourceGroupName string, clusterName string, ...) (ScriptActionsClientDeleteResponse, error)
- func (client *ScriptActionsClient) GetExecutionAsyncOperationStatus(ctx context.Context, resourceGroupName string, clusterName string, ...) (ScriptActionsClientGetExecutionAsyncOperationStatusResponse, error)
- func (client *ScriptActionsClient) GetExecutionDetail(ctx context.Context, resourceGroupName string, clusterName string, ...) (ScriptActionsClientGetExecutionDetailResponse, error)
- func (client *ScriptActionsClient) NewListByClusterPager(resourceGroupName string, clusterName string, ...) *runtime.Pager[ScriptActionsClientListByClusterResponse]
- type ScriptActionsClientDeleteOptions
- type ScriptActionsClientDeleteResponse
- type ScriptActionsClientGetExecutionAsyncOperationStatusOptions
- type ScriptActionsClientGetExecutionAsyncOperationStatusResponse
- type ScriptActionsClientGetExecutionDetailOptions
- type ScriptActionsClientGetExecutionDetailResponse
- type ScriptActionsClientListByClusterOptions
- type ScriptActionsClientListByClusterResponse
- type ScriptActionsList
- type ScriptExecutionHistoryClient
- func (client *ScriptExecutionHistoryClient) NewListByClusterPager(resourceGroupName string, clusterName string, ...) *runtime.Pager[ScriptExecutionHistoryClientListByClusterResponse]
- func (client *ScriptExecutionHistoryClient) Promote(ctx context.Context, resourceGroupName string, clusterName string, ...) (ScriptExecutionHistoryClientPromoteResponse, error)
- type ScriptExecutionHistoryClientListByClusterOptions
- type ScriptExecutionHistoryClientListByClusterResponse
- type ScriptExecutionHistoryClientPromoteOptions
- type ScriptExecutionHistoryClientPromoteResponse
- type SecurityProfile
- type ServiceSpecification
- type StorageAccount
- type StorageProfile
- type SystemData
- type Tier
- type TrackedResource
- type UpdateClusterIdentityCertificateParameters
- type UpdateGatewaySettingsParameters
- type Usage
- type UsagesListResult
- type UserAssignedIdentity
- type VMSizeCompatibilityFilterV2
- type VMSizeProperty
- type ValidationErrorInfo
- type VersionSpec
- type VersionsCapability
- type VirtualMachinesClient
- func (client *VirtualMachinesClient) BeginRestartHosts(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[VirtualMachinesClientRestartHostsResponse], error)
- func (client *VirtualMachinesClient) GetAsyncOperationStatus(ctx context.Context, resourceGroupName string, clusterName string, ...) (VirtualMachinesClientGetAsyncOperationStatusResponse, error)
- func (client *VirtualMachinesClient) ListHosts(ctx context.Context, resourceGroupName string, clusterName string, ...) (VirtualMachinesClientListHostsResponse, error)
- type VirtualMachinesClientBeginRestartHostsOptions
- type VirtualMachinesClientGetAsyncOperationStatusOptions
- type VirtualMachinesClientGetAsyncOperationStatusResponse
- type VirtualMachinesClientListHostsOptions
- type VirtualMachinesClientListHostsResponse
- type VirtualMachinesClientRestartHostsResponse
- type VirtualNetworkProfile
Examples ¶
- ApplicationsClient.BeginCreate
- ApplicationsClient.BeginDelete
- ApplicationsClient.Get (GetApplicationOnHdInsightClusterCreationInProgress)
- ApplicationsClient.Get (GetApplicationOnHdInsightClusterSuccessfullyCreated)
- ApplicationsClient.GetAzureAsyncOperationStatus
- ApplicationsClient.NewListByClusterPager
- ClustersClient.BeginCreate (CreateClusterWithAvailabilityZones)
- ClustersClient.BeginCreate (CreateClusterWithComputeIsolationProperties)
- ClustersClient.BeginCreate (CreateClusterWithEncryptionAtHost)
- ClustersClient.BeginCreate (CreateClusterWithEncryptionInTransit)
- ClustersClient.BeginCreate (CreateClusterWithNetworkProperties)
- ClustersClient.BeginCreate (CreateClusterWithTls12)
- ClustersClient.BeginCreate (CreateHadoopClusterWithAzureDataLakeStorageGen2)
- ClustersClient.BeginCreate (CreateHadoopOnLinuxClusterWithSshPassword)
- ClustersClient.BeginCreate (CreateHadoopOnLinuxClusterWithSshPublicKey)
- ClustersClient.BeginCreate (CreateHdInsightClusterWithAutoscaleConfiguration)
- ClustersClient.BeginCreate (CreateKafkaClusterWithKafkaRestProxy)
- ClustersClient.BeginCreate (CreateSecureHadoopCluster)
- ClustersClient.BeginCreate (CreateSparkOnLinuxClusterWithSshPassword)
- ClustersClient.BeginDelete
- ClustersClient.BeginExecuteScriptActions
- ClustersClient.BeginResize
- ClustersClient.BeginRotateDiskEncryptionKey
- ClustersClient.BeginUpdateAutoScaleConfiguration (DisableAutoscaleForTheHdInsightCluster)
- ClustersClient.BeginUpdateAutoScaleConfiguration (EnableOrUpdateAutoscaleWithTheLoadBasedConfigurationForHdInsightCluster)
- ClustersClient.BeginUpdateAutoScaleConfiguration (EnableOrUpdateAutoscaleWithTheScheduleBasedConfigurationForHdInsightCluster)
- ClustersClient.BeginUpdateGatewaySettings
- ClustersClient.BeginUpdateIdentityCertificate
- ClustersClient.Get (GetHadoopOnLinuxCluster)
- ClustersClient.Get (GetSparkOnLinuxCluster)
- ClustersClient.GetAzureAsyncOperationStatus
- ClustersClient.GetGatewaySettings
- ClustersClient.NewListByResourceGroupPager
- ClustersClient.NewListPager
- ClustersClient.Update
- ConfigurationsClient.BeginUpdate (DisableHttpConnectivity)
- ConfigurationsClient.BeginUpdate (EnableHttpConnectivity)
- ConfigurationsClient.Get
- ConfigurationsClient.List
- ExtensionsClient.BeginCreate
- ExtensionsClient.BeginDelete
- ExtensionsClient.BeginDisableAzureMonitor
- ExtensionsClient.BeginDisableMonitoring
- ExtensionsClient.BeginEnableAzureMonitor
- ExtensionsClient.BeginEnableMonitoring
- ExtensionsClient.Get
- ExtensionsClient.GetAzureAsyncOperationStatus
- ExtensionsClient.GetAzureMonitorStatus
- ExtensionsClient.GetMonitoringStatus
- LocationsClient.CheckNameAvailability
- LocationsClient.GetAzureAsyncOperationStatus
- LocationsClient.GetCapabilities
- LocationsClient.ListBillingSpecs
- LocationsClient.ListUsages
- LocationsClient.ValidateClusterCreateRequest
- PrivateEndpointConnectionsClient.BeginCreateOrUpdate
- PrivateEndpointConnectionsClient.BeginDelete
- PrivateEndpointConnectionsClient.Get
- PrivateEndpointConnectionsClient.NewListByClusterPager
- PrivateLinkResourcesClient.Get
- PrivateLinkResourcesClient.ListByCluster
- ScriptActionsClient.Delete
- ScriptActionsClient.GetExecutionAsyncOperationStatus
- ScriptActionsClient.GetExecutionDetail
- ScriptActionsClient.NewListByClusterPager
- ScriptExecutionHistoryClient.NewListByClusterPager
- ScriptExecutionHistoryClient.Promote
- VirtualMachinesClient.BeginRestartHosts
- VirtualMachinesClient.GetAsyncOperationStatus
- VirtualMachinesClient.ListHosts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AaddsResourceDetails ¶
type AaddsResourceDetails struct { // The Azure active directory domain service name. DomainName *string // This indicates whether initial sync complete or not. InitialSyncComplete *bool // This indicates whether enable ldaps or not. LdapsEnabled *bool // The base 64 format string of public ldap certificate. LdapsPublicCertificateInBase64 *string // The resource id of azure active directory domain service. ResourceID *string // The subnet resource id. SubnetID *string // The tenant id of azure active directory domain service . TenantID *string }
AaddsResourceDetails - The Azure active directory domain service resource details.
func (AaddsResourceDetails) MarshalJSON ¶ added in v1.1.0
func (a AaddsResourceDetails) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AaddsResourceDetails.
func (*AaddsResourceDetails) UnmarshalJSON ¶ added in v1.1.0
func (a *AaddsResourceDetails) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AaddsResourceDetails.
type Application ¶
type Application struct { // The ETag for the application Etag *string // The properties of the application. Properties *ApplicationProperties // The tags for the application. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Metadata pertaining to creation and last modification of the resource. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
Application - The HDInsight cluster application
func (Application) MarshalJSON ¶
func (a Application) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type Application.
func (*Application) UnmarshalJSON ¶ added in v1.1.0
func (a *Application) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type Application.
type ApplicationGetEndpoint ¶
type ApplicationGetEndpoint struct { // The destination port to connect to. DestinationPort *int32 // The location of the endpoint. Location *string // The private ip address of the endpoint. PrivateIPAddress *string // The public port to connect to. PublicPort *int32 }
ApplicationGetEndpoint - Gets the application SSH endpoint
func (ApplicationGetEndpoint) MarshalJSON ¶ added in v1.1.0
func (a ApplicationGetEndpoint) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ApplicationGetEndpoint.
func (*ApplicationGetEndpoint) UnmarshalJSON ¶ added in v1.1.0
func (a *ApplicationGetEndpoint) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGetEndpoint.
type ApplicationGetHTTPSEndpoint ¶
type ApplicationGetHTTPSEndpoint struct { // The list of access modes for the application. AccessModes []*string // The destination port to connect to. DestinationPort *int32 // The value indicates whether to disable GatewayAuth. DisableGatewayAuth *bool // The private ip address of the endpoint. PrivateIPAddress *string // The subdomain suffix of the application. SubDomainSuffix *string // READ-ONLY; The location of the endpoint. Location *string // READ-ONLY; The public port to connect to. PublicPort *int32 }
ApplicationGetHTTPSEndpoint - Gets the application HTTP endpoints.
func (ApplicationGetHTTPSEndpoint) MarshalJSON ¶
func (a ApplicationGetHTTPSEndpoint) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ApplicationGetHTTPSEndpoint.
func (*ApplicationGetHTTPSEndpoint) UnmarshalJSON ¶ added in v1.1.0
func (a *ApplicationGetHTTPSEndpoint) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGetHTTPSEndpoint.
type ApplicationListResult ¶
type ApplicationListResult struct { // The list of HDInsight applications installed on HDInsight cluster. Value []*Application // READ-ONLY; The URL to get the next set of operation list results if there are any. NextLink *string }
ApplicationListResult - Result of the request to list cluster Applications. It contains a list of operations and a URL link to get the next set of results.
func (ApplicationListResult) MarshalJSON ¶
func (a ApplicationListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ApplicationListResult.
func (*ApplicationListResult) UnmarshalJSON ¶ added in v1.1.0
func (a *ApplicationListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationListResult.
type ApplicationProperties ¶
type ApplicationProperties struct { // The application type. ApplicationType *string // The list of roles in the cluster. ComputeProfile *ComputeProfile // The list of errors. Errors []*Errors // The list of application HTTPS endpoints. HTTPSEndpoints []*ApplicationGetHTTPSEndpoint // The list of install script actions. InstallScriptActions []*RuntimeScriptAction // The private link configurations. PrivateLinkConfigurations []*PrivateLinkConfiguration // The list of application SSH endpoints. SSHEndpoints []*ApplicationGetEndpoint // The list of uninstall script actions. UninstallScriptActions []*RuntimeScriptAction // READ-ONLY; The application state. ApplicationState *string // READ-ONLY; The application create date time. CreatedDate *string // READ-ONLY; The marketplace identifier. MarketplaceIdentifier *string // READ-ONLY; The provisioning state of the application. ProvisioningState *string }
ApplicationProperties - The HDInsight cluster application GET response.
func (ApplicationProperties) MarshalJSON ¶
func (a ApplicationProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ApplicationProperties.
func (*ApplicationProperties) UnmarshalJSON ¶ added in v1.1.0
func (a *ApplicationProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationProperties.
type ApplicationsClient ¶
type ApplicationsClient struct {
// contains filtered or unexported fields
}
ApplicationsClient contains the methods for the Applications group. Don't use this type directly, use NewApplicationsClient() instead.
func NewApplicationsClient ¶
func NewApplicationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationsClient, error)
NewApplicationsClient creates a new instance of ApplicationsClient with the specified values.
- subscriptionID - The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ApplicationsClient) BeginCreate ¶
func (client *ApplicationsClient) BeginCreate(ctx context.Context, resourceGroupName string, clusterName string, applicationName string, parameters Application, options *ApplicationsClientBeginCreateOptions) (*runtime.Poller[ApplicationsClientCreateResponse], error)
BeginCreate - Creates applications for the HDInsight cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster.
- applicationName - The constant value for the application name.
- parameters - The application create request.
- options - ApplicationsClientBeginCreateOptions contains the optional parameters for the ApplicationsClient.BeginCreate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateApplication.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/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewApplicationsClient().BeginCreate(ctx, "rg1", "cluster1", "hue", armhdinsight.Application{ Properties: &armhdinsight.ApplicationProperties{ ApplicationType: to.Ptr("CustomApplication"), ComputeProfile: &armhdinsight.ComputeProfile{ Roles: []*armhdinsight.Role{ { Name: to.Ptr("edgenode"), HardwareProfile: &armhdinsight.HardwareProfile{ VMSize: to.Ptr("Standard_D12_v2"), }, TargetInstanceCount: to.Ptr[int32](1), }}, }, Errors: []*armhdinsight.Errors{}, HTTPSEndpoints: []*armhdinsight.ApplicationGetHTTPSEndpoint{ { AccessModes: []*string{ to.Ptr("WebPage")}, DestinationPort: to.Ptr[int32](20000), SubDomainSuffix: to.Ptr("dss"), }}, InstallScriptActions: []*armhdinsight.RuntimeScriptAction{ { Name: to.Ptr("app-install-app1"), Parameters: to.Ptr("-version latest -port 20000"), Roles: []*string{ to.Ptr("edgenode")}, URI: to.Ptr("https://.../install.sh"), }}, UninstallScriptActions: []*armhdinsight.RuntimeScriptAction{}, }, }, 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.Application = armhdinsight.Application{ // Name: to.Ptr("hue"), // Type: to.Ptr("Microsoft.HDInsight/clusters/applications"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1/applications/hue"), // Etag: to.Ptr("etag"), // Properties: &armhdinsight.ApplicationProperties{ // ApplicationState: to.Ptr("ApplicationConfiguration"), // ApplicationType: to.Ptr("CustomApplication"), // ComputeProfile: &armhdinsight.ComputeProfile{ // Roles: []*armhdinsight.Role{ // { // Name: to.Ptr("edgenode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("Standard_D12_v2"), // }, // TargetInstanceCount: to.Ptr[int32](1), // }}, // }, // CreatedDate: to.Ptr("2017-02-28"), // Errors: []*armhdinsight.Errors{ // }, // HTTPSEndpoints: []*armhdinsight.ApplicationGetHTTPSEndpoint{ // { // AccessModes: []*string{ // to.Ptr("WebPage")}, // DestinationPort: to.Ptr[int32](20000), // }}, // InstallScriptActions: []*armhdinsight.RuntimeScriptAction{ // { // Name: to.Ptr("app-install-app1"), // Roles: []*string{ // to.Ptr("edgenode")}, // URI: to.Ptr("https://.../install.sh"), // }}, // ProvisioningState: to.Ptr("Succeeded"), // SSHEndpoints: []*armhdinsight.ApplicationGetEndpoint{ // }, // UninstallScriptActions: []*armhdinsight.RuntimeScriptAction{ // }, // }, // Tags: map[string]*string{ // }, // } }
Output:
func (*ApplicationsClient) BeginDelete ¶
func (client *ApplicationsClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, applicationName string, options *ApplicationsClientBeginDeleteOptions) (*runtime.Poller[ApplicationsClientDeleteResponse], error)
BeginDelete - Deletes the specified application on the HDInsight cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster.
- applicationName - The constant value for the application name.
- options - ApplicationsClientBeginDeleteOptions contains the optional parameters for the ApplicationsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/DeleteApplication.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewApplicationsClient().BeginDelete(ctx, "rg1", "cluster1", "hue", 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 (*ApplicationsClient) Get ¶
func (client *ApplicationsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, applicationName string, options *ApplicationsClientGetOptions) (ApplicationsClientGetResponse, error)
Get - Gets properties of the specified application. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster.
- applicationName - The constant value for the application name.
- options - ApplicationsClientGetOptions contains the optional parameters for the ApplicationsClient.Get method.
Example (GetApplicationOnHdInsightClusterCreationInProgress) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetApplicationInProgress.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewApplicationsClient().Get(ctx, "rg1", "cluster1", "app", 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.Application = armhdinsight.Application{ // Name: to.Ptr("app"), // Type: to.Ptr("Microsoft.HDInsight/clusters/applications"), // ID: to.Ptr("/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1/applications/app"), // Etag: to.Ptr("2C128F8E-BB26-4637-99E4-18EBC39FD51F"), // Properties: &armhdinsight.ApplicationProperties{ // ApplicationState: to.Ptr("AzureVMConfiguration"), // ApplicationType: to.Ptr("CustomApplication"), // ComputeProfile: &armhdinsight.ComputeProfile{ // Roles: []*armhdinsight.Role{ // { // Name: to.Ptr("edgenode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("Standard_D3"), // }, // TargetInstanceCount: to.Ptr[int32](1), // }}, // }, // CreatedDate: to.Ptr("2017-03-28T02:01:25.107"), // HTTPSEndpoints: []*armhdinsight.ApplicationGetHTTPSEndpoint{ // { // AccessModes: []*string{ // to.Ptr("WebPage")}, // DestinationPort: to.Ptr[int32](18630), // Location: to.Ptr("location"), // PublicPort: to.Ptr[int32](443), // }}, // InstallScriptActions: []*armhdinsight.RuntimeScriptAction{ // { // Name: to.Ptr("app-Install"), // Roles: []*string{ // to.Ptr("edgenode")}, // URI: to.Ptr("https://app.com/azure/app_install.sh"), // }}, // MarketplaceIdentifier: to.Ptr("id"), // ProvisioningState: to.Ptr("Succeeded"), // SSHEndpoints: []*armhdinsight.ApplicationGetEndpoint{ // }, // UninstallScriptActions: []*armhdinsight.RuntimeScriptAction{ // }, // }, // Tags: map[string]*string{ // "key1": to.Ptr("val1"), // }, // } }
Output:
Example (GetApplicationOnHdInsightClusterSuccessfullyCreated) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetApplicationCreated.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewApplicationsClient().Get(ctx, "rg1", "cluster1", "app", 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.Application = armhdinsight.Application{ // Name: to.Ptr("app"), // Type: to.Ptr("Microsoft.HDInsight/clusters/applications"), // ID: to.Ptr("/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1/applications/app"), // Etag: to.Ptr("CF938302-6B4D-44A0-A6D2-C0D67E847AEC"), // Properties: &armhdinsight.ApplicationProperties{ // ApplicationState: to.Ptr("Running"), // ApplicationType: to.Ptr("CustomApplication"), // ComputeProfile: &armhdinsight.ComputeProfile{ // Roles: []*armhdinsight.Role{ // { // Name: to.Ptr("edgenode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("Standard_D12_v2"), // }, // TargetInstanceCount: to.Ptr[int32](1), // }}, // }, // CreatedDate: to.Ptr("2017-03-22T21:34:39.293"), // HTTPSEndpoints: []*armhdinsight.ApplicationGetHTTPSEndpoint{ // { // AccessModes: []*string{ // to.Ptr("WebPage")}, // DestinationPort: to.Ptr[int32](20000), // Location: to.Ptr("https://cluster1.apps.azurehdinsight.net:443"), // PublicPort: to.Ptr[int32](443), // }}, // InstallScriptActions: []*armhdinsight.RuntimeScriptAction{ // { // Name: to.Ptr("app-install"), // Roles: []*string{ // to.Ptr("edgenode")}, // URI: to.Ptr("http://app.com/public/hdi-app/20170301/app-install.sh"), // }}, // MarketplaceIdentifier: to.Ptr("appMarketId"), // ProvisioningState: to.Ptr("Succeeded"), // SSHEndpoints: []*armhdinsight.ApplicationGetEndpoint{ // { // DestinationPort: to.Ptr[int32](22), // Location: to.Ptr("cluster1-ssh.azurehdinsight.net:22"), // PublicPort: to.Ptr[int32](22), // }}, // UninstallScriptActions: []*armhdinsight.RuntimeScriptAction{ // }, // }, // Tags: map[string]*string{ // "key1": to.Ptr("val1"), // }, // } }
Output:
func (*ApplicationsClient) GetAzureAsyncOperationStatus ¶
func (client *ApplicationsClient) GetAzureAsyncOperationStatus(ctx context.Context, resourceGroupName string, clusterName string, applicationName string, operationID string, options *ApplicationsClientGetAzureAsyncOperationStatusOptions) (ApplicationsClientGetAzureAsyncOperationStatusResponse, error)
GetAzureAsyncOperationStatus - Gets the async operation status. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster.
- applicationName - The constant value for the application name.
- operationID - The long running operation id.
- options - ApplicationsClientGetAzureAsyncOperationStatusOptions contains the optional parameters for the ApplicationsClient.GetAzureAsyncOperationStatus method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetApplicationCreationAsyncOperationStatus.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewApplicationsClient().GetAzureAsyncOperationStatus(ctx, "rg1", "cluster1", "app", "CF938302-6B4D-44A0-A6D2-C0D67E847AEC", 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 = armhdinsight.AsyncOperationResult{ // Status: to.Ptr(armhdinsight.AsyncOperationStateInProgress), // } }
Output:
func (*ApplicationsClient) NewListByClusterPager ¶ added in v0.4.0
func (client *ApplicationsClient) NewListByClusterPager(resourceGroupName string, clusterName string, options *ApplicationsClientListByClusterOptions) *runtime.Pager[ApplicationsClientListByClusterResponse]
NewListByClusterPager - Lists all of the applications for the HDInsight cluster.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster.
- options - ApplicationsClientListByClusterOptions contains the optional parameters for the ApplicationsClient.NewListByClusterPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetAllApplications.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewApplicationsClient().NewListByClusterPager("rg1", "cluster1", 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.ApplicationListResult = armhdinsight.ApplicationListResult{ // Value: []*armhdinsight.Application{ // { // Name: to.Ptr("app"), // Type: to.Ptr("Microsoft.HDInsight/clusters/applications"), // ID: to.Ptr("/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1/applications/app"), // Etag: to.Ptr("CF938302-6B4D-44A0-A6D2-C0D67E847AEC"), // Properties: &armhdinsight.ApplicationProperties{ // ApplicationState: to.Ptr("Running"), // ApplicationType: to.Ptr("CustomApplication"), // ComputeProfile: &armhdinsight.ComputeProfile{ // Roles: []*armhdinsight.Role{ // { // Name: to.Ptr("edgenode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("Standard_D12_v2"), // }, // TargetInstanceCount: to.Ptr[int32](1), // }}, // }, // CreatedDate: to.Ptr("2017-03-22T21:34:39.293"), // HTTPSEndpoints: []*armhdinsight.ApplicationGetHTTPSEndpoint{ // { // AccessModes: []*string{ // to.Ptr("WebPage")}, // DestinationPort: to.Ptr[int32](20000), // Location: to.Ptr("https://cluster1-app.apps.azurehdinsight.net:443"), // PublicPort: to.Ptr[int32](443), // }}, // InstallScriptActions: []*armhdinsight.RuntimeScriptAction{ // { // Name: to.Ptr("app-install-app"), // Roles: []*string{ // to.Ptr("edgenode")}, // URI: to.Ptr("http://testurl.com/public/hdi-app/20170301/hdinsight-app-install.sh"), // }}, // MarketplaceIdentifier: to.Ptr("app-on-hdiapp-on-hdi.1.0.3"), // ProvisioningState: to.Ptr("Succeeded"), // SSHEndpoints: []*armhdinsight.ApplicationGetEndpoint{ // { // DestinationPort: to.Ptr[int32](22), // Location: to.Ptr("app.cluster1-ssh.azurehdinsight.net:22"), // PublicPort: to.Ptr[int32](22), // }}, // UninstallScriptActions: []*armhdinsight.RuntimeScriptAction{ // }, // }, // Tags: map[string]*string{ // "key1": to.Ptr("val1"), // }, // }, // { // Name: to.Ptr("app2"), // Type: to.Ptr("Microsoft.HDInsight/clusters/applications"), // ID: to.Ptr("/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1/applications/app2"), // Etag: to.Ptr("2C128F8E-BB26-4637-99E4-18EBC39FD51F"), // Properties: &armhdinsight.ApplicationProperties{ // ApplicationState: to.Ptr("AzureVMConfiguration"), // ApplicationType: to.Ptr("CustomApplication"), // ComputeProfile: &armhdinsight.ComputeProfile{ // Roles: []*armhdinsight.Role{ // { // Name: to.Ptr("edgenode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("Standard_D3"), // }, // TargetInstanceCount: to.Ptr[int32](1), // }}, // }, // CreatedDate: to.Ptr("2017-03-28T02:01:25.107"), // HTTPSEndpoints: []*armhdinsight.ApplicationGetHTTPSEndpoint{ // { // AccessModes: []*string{ // to.Ptr("WebPage")}, // DestinationPort: to.Ptr[int32](18630), // Location: to.Ptr("location"), // PublicPort: to.Ptr[int32](443), // }}, // InstallScriptActions: []*armhdinsight.RuntimeScriptAction{ // { // Name: to.Ptr("app2-Install"), // Roles: []*string{ // to.Ptr("edgenode")}, // URI: to.Ptr("https://app2url.com/azure/2.4.0.0/app2_install.sh"), // }}, // MarketplaceIdentifier: to.Ptr("app2-hdinsightsmall.1.0.8"), // ProvisioningState: to.Ptr("Succeeded"), // SSHEndpoints: []*armhdinsight.ApplicationGetEndpoint{ // }, // UninstallScriptActions: []*armhdinsight.RuntimeScriptAction{ // }, // }, // Tags: map[string]*string{ // "key1": to.Ptr("val1"), // }, // }}, // } } }
Output:
type ApplicationsClientBeginCreateOptions ¶ added in v0.2.0
type ApplicationsClientBeginCreateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ApplicationsClientBeginCreateOptions contains the optional parameters for the ApplicationsClient.BeginCreate method.
type ApplicationsClientBeginDeleteOptions ¶ added in v0.2.0
type ApplicationsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ApplicationsClientBeginDeleteOptions contains the optional parameters for the ApplicationsClient.BeginDelete method.
type ApplicationsClientCreateResponse ¶ added in v0.2.0
type ApplicationsClientCreateResponse struct { // The HDInsight cluster application Application }
ApplicationsClientCreateResponse contains the response from method ApplicationsClient.BeginCreate.
type ApplicationsClientDeleteResponse ¶ added in v0.2.0
type ApplicationsClientDeleteResponse struct { }
ApplicationsClientDeleteResponse contains the response from method ApplicationsClient.BeginDelete.
type ApplicationsClientGetAzureAsyncOperationStatusOptions ¶ added in v0.2.0
type ApplicationsClientGetAzureAsyncOperationStatusOptions struct { }
ApplicationsClientGetAzureAsyncOperationStatusOptions contains the optional parameters for the ApplicationsClient.GetAzureAsyncOperationStatus method.
type ApplicationsClientGetAzureAsyncOperationStatusResponse ¶ added in v0.2.0
type ApplicationsClientGetAzureAsyncOperationStatusResponse struct { // The azure async operation response. AsyncOperationResult }
ApplicationsClientGetAzureAsyncOperationStatusResponse contains the response from method ApplicationsClient.GetAzureAsyncOperationStatus.
type ApplicationsClientGetOptions ¶ added in v0.2.0
type ApplicationsClientGetOptions struct { }
ApplicationsClientGetOptions contains the optional parameters for the ApplicationsClient.Get method.
type ApplicationsClientGetResponse ¶ added in v0.2.0
type ApplicationsClientGetResponse struct { // The HDInsight cluster application Application }
ApplicationsClientGetResponse contains the response from method ApplicationsClient.Get.
type ApplicationsClientListByClusterOptions ¶ added in v0.2.0
type ApplicationsClientListByClusterOptions struct { }
ApplicationsClientListByClusterOptions contains the optional parameters for the ApplicationsClient.NewListByClusterPager method.
type ApplicationsClientListByClusterResponse ¶ added in v0.2.0
type ApplicationsClientListByClusterResponse struct { // Result of the request to list cluster Applications. It contains a list of operations and a URL link to get the next set // of results. ApplicationListResult }
ApplicationsClientListByClusterResponse contains the response from method ApplicationsClient.NewListByClusterPager.
type AsyncOperationResult ¶
type AsyncOperationResult struct { // The operation error information. Error *Errors // The async operation state. Status *AsyncOperationState }
AsyncOperationResult - The azure async operation response.
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 AsyncOperationState ¶
type AsyncOperationState string
AsyncOperationState - The async operation state.
const ( AsyncOperationStateFailed AsyncOperationState = "Failed" AsyncOperationStateInProgress AsyncOperationState = "InProgress" AsyncOperationStateSucceeded AsyncOperationState = "Succeeded" )
func PossibleAsyncOperationStateValues ¶
func PossibleAsyncOperationStateValues() []AsyncOperationState
PossibleAsyncOperationStateValues returns the possible values for the AsyncOperationState const type.
type Autoscale ¶
type Autoscale struct { // Parameters for load-based autoscale Capacity *AutoscaleCapacity // Parameters for schedule-based autoscale Recurrence *AutoscaleRecurrence }
Autoscale - The autoscale request parameters
func (Autoscale) MarshalJSON ¶ added in v1.1.0
MarshalJSON implements the json.Marshaller interface for type Autoscale.
func (*Autoscale) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Autoscale.
type AutoscaleCapacity ¶
type AutoscaleCapacity struct { // The maximum instance count of the cluster MaxInstanceCount *int32 // The minimum instance count of the cluster MinInstanceCount *int32 }
AutoscaleCapacity - The load-based autoscale request parameters
func (AutoscaleCapacity) MarshalJSON ¶ added in v1.1.0
func (a AutoscaleCapacity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AutoscaleCapacity.
func (*AutoscaleCapacity) UnmarshalJSON ¶ added in v1.1.0
func (a *AutoscaleCapacity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AutoscaleCapacity.
type AutoscaleConfigurationUpdateParameter ¶
type AutoscaleConfigurationUpdateParameter struct { // The autoscale configuration. Autoscale *Autoscale }
AutoscaleConfigurationUpdateParameter - The autoscale configuration update parameter.
func (AutoscaleConfigurationUpdateParameter) MarshalJSON ¶ added in v1.1.0
func (a AutoscaleConfigurationUpdateParameter) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AutoscaleConfigurationUpdateParameter.
func (*AutoscaleConfigurationUpdateParameter) UnmarshalJSON ¶ added in v1.1.0
func (a *AutoscaleConfigurationUpdateParameter) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AutoscaleConfigurationUpdateParameter.
type AutoscaleRecurrence ¶
type AutoscaleRecurrence struct { // Array of schedule-based autoscale rules Schedule []*AutoscaleSchedule // The time zone for the autoscale schedule times TimeZone *string }
AutoscaleRecurrence - Schedule-based autoscale request parameters
func (AutoscaleRecurrence) MarshalJSON ¶
func (a AutoscaleRecurrence) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AutoscaleRecurrence.
func (*AutoscaleRecurrence) UnmarshalJSON ¶ added in v1.1.0
func (a *AutoscaleRecurrence) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AutoscaleRecurrence.
type AutoscaleSchedule ¶
type AutoscaleSchedule struct { // Days of the week for a schedule-based autoscale rule Days []*DaysOfWeek // Time and capacity for a schedule-based autoscale rule TimeAndCapacity *AutoscaleTimeAndCapacity }
AutoscaleSchedule - Parameters for a schedule-based autoscale rule, consisting of an array of days + a time and capacity
func (AutoscaleSchedule) MarshalJSON ¶
func (a AutoscaleSchedule) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AutoscaleSchedule.
func (*AutoscaleSchedule) UnmarshalJSON ¶ added in v1.1.0
func (a *AutoscaleSchedule) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AutoscaleSchedule.
type AutoscaleTimeAndCapacity ¶
type AutoscaleTimeAndCapacity struct { // The maximum instance count of the cluster MaxInstanceCount *int32 // The minimum instance count of the cluster MinInstanceCount *int32 // 24-hour time in the form xx:xx Time *string }
AutoscaleTimeAndCapacity - Time and capacity request parameters
func (AutoscaleTimeAndCapacity) MarshalJSON ¶ added in v1.1.0
func (a AutoscaleTimeAndCapacity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AutoscaleTimeAndCapacity.
func (*AutoscaleTimeAndCapacity) UnmarshalJSON ¶ added in v1.1.0
func (a *AutoscaleTimeAndCapacity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AutoscaleTimeAndCapacity.
type AzureMonitorRequest ¶
type AzureMonitorRequest struct { // The Log Analytics workspace key. PrimaryKey *string // The selected configurations. SelectedConfigurations *AzureMonitorSelectedConfigurations // The Log Analytics workspace ID. WorkspaceID *string }
AzureMonitorRequest - The azure monitor parameters.
func (AzureMonitorRequest) MarshalJSON ¶ added in v1.1.0
func (a AzureMonitorRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AzureMonitorRequest.
func (*AzureMonitorRequest) UnmarshalJSON ¶ added in v1.1.0
func (a *AzureMonitorRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AzureMonitorRequest.
type AzureMonitorResponse ¶
type AzureMonitorResponse struct { // The status of the monitor on the HDInsight cluster. ClusterMonitoringEnabled *bool // The selected configurations. SelectedConfigurations *AzureMonitorSelectedConfigurations // The workspace ID of the monitor on the HDInsight cluster. WorkspaceID *string }
AzureMonitorResponse - The azure monitor status response.
func (AzureMonitorResponse) MarshalJSON ¶ added in v1.1.0
func (a AzureMonitorResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AzureMonitorResponse.
func (*AzureMonitorResponse) UnmarshalJSON ¶ added in v1.1.0
func (a *AzureMonitorResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AzureMonitorResponse.
type AzureMonitorSelectedConfigurations ¶
type AzureMonitorSelectedConfigurations struct { // The configuration version. ConfigurationVersion *string // The global configurations of selected configurations. GlobalConfigurations map[string]*string // The table list. TableList []*AzureMonitorTableConfiguration }
AzureMonitorSelectedConfigurations - The selected configurations for azure monitor.
func (AzureMonitorSelectedConfigurations) MarshalJSON ¶
func (a AzureMonitorSelectedConfigurations) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AzureMonitorSelectedConfigurations.
func (*AzureMonitorSelectedConfigurations) UnmarshalJSON ¶ added in v1.1.0
func (a *AzureMonitorSelectedConfigurations) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AzureMonitorSelectedConfigurations.
type AzureMonitorTableConfiguration ¶
type AzureMonitorTableConfiguration struct { // The name. Name *string }
AzureMonitorTableConfiguration - The table configuration for the Log Analytics integration.
func (AzureMonitorTableConfiguration) MarshalJSON ¶ added in v1.1.0
func (a AzureMonitorTableConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AzureMonitorTableConfiguration.
func (*AzureMonitorTableConfiguration) UnmarshalJSON ¶ added in v1.1.0
func (a *AzureMonitorTableConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AzureMonitorTableConfiguration.
type BillingMeters ¶
type BillingMeters struct { // The HDInsight meter guid. Meter *string // The virtual machine sizes. MeterParameter *string // The unit of meter, VMHours or CoreHours. Unit *string }
BillingMeters - The billing meters.
func (BillingMeters) MarshalJSON ¶ added in v1.1.0
func (b BillingMeters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BillingMeters.
func (*BillingMeters) UnmarshalJSON ¶ added in v1.1.0
func (b *BillingMeters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BillingMeters.
type BillingResources ¶
type BillingResources struct { // The billing meter information. BillingMeters []*BillingMeters // The managed disk billing information. DiskBillingMeters []*DiskBillingMeters // The region or location. Region *string }
BillingResources - The billing resources.
func (BillingResources) MarshalJSON ¶
func (b BillingResources) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BillingResources.
func (*BillingResources) UnmarshalJSON ¶ added in v1.1.0
func (b *BillingResources) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BillingResources.
type BillingResponseListResult ¶
type BillingResponseListResult struct { // The billing and managed disk billing resources for a region. BillingResources []*BillingResources // The virtual machine filtering mode. Effectively this can enabling or disabling the virtual machine sizes in a particular // set. VMSizeFilters []*VMSizeCompatibilityFilterV2 // The virtual machine sizes to include or exclude. VMSizes []*string // The vm sizes which enable encryption at host. VMSizesWithEncryptionAtHost []*string // READ-ONLY; The vm size properties. VMSizeProperties []*VMSizeProperty }
BillingResponseListResult - The response for the operation to get regional billingSpecs for a subscription.
func (BillingResponseListResult) MarshalJSON ¶
func (b BillingResponseListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BillingResponseListResult.
func (*BillingResponseListResult) UnmarshalJSON ¶ added in v1.1.0
func (b *BillingResponseListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BillingResponseListResult.
type CapabilitiesResult ¶
type CapabilitiesResult struct { // The capability features. Features []*string // The virtual machine size compatibility features. Regions map[string]*RegionsCapability // The version capability. Versions map[string]*VersionsCapability // READ-ONLY; The quota capability. Quota *QuotaCapability }
CapabilitiesResult - The Get Capabilities operation response.
func (CapabilitiesResult) MarshalJSON ¶
func (c CapabilitiesResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CapabilitiesResult.
func (*CapabilitiesResult) UnmarshalJSON ¶ added in v1.1.0
func (c *CapabilitiesResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CapabilitiesResult.
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 credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ClientFactory) NewApplicationsClient ¶ added in v1.1.0
func (c *ClientFactory) NewApplicationsClient() *ApplicationsClient
NewApplicationsClient creates a new instance of ApplicationsClient.
func (*ClientFactory) NewClustersClient ¶ added in v1.1.0
func (c *ClientFactory) NewClustersClient() *ClustersClient
NewClustersClient creates a new instance of ClustersClient.
func (*ClientFactory) NewConfigurationsClient ¶ added in v1.1.0
func (c *ClientFactory) NewConfigurationsClient() *ConfigurationsClient
NewConfigurationsClient creates a new instance of ConfigurationsClient.
func (*ClientFactory) NewExtensionsClient ¶ added in v1.1.0
func (c *ClientFactory) NewExtensionsClient() *ExtensionsClient
NewExtensionsClient creates a new instance of ExtensionsClient.
func (*ClientFactory) NewLocationsClient ¶ added in v1.1.0
func (c *ClientFactory) NewLocationsClient() *LocationsClient
NewLocationsClient creates a new instance of LocationsClient.
func (*ClientFactory) NewOperationsClient ¶ added in v1.1.0
func (c *ClientFactory) NewOperationsClient() *OperationsClient
NewOperationsClient creates a new instance of OperationsClient.
func (*ClientFactory) NewPrivateEndpointConnectionsClient ¶ added in v1.1.0
func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient
NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient.
func (*ClientFactory) NewPrivateLinkResourcesClient ¶ added in v1.1.0
func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient
NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient.
func (*ClientFactory) NewScriptActionsClient ¶ added in v1.1.0
func (c *ClientFactory) NewScriptActionsClient() *ScriptActionsClient
NewScriptActionsClient creates a new instance of ScriptActionsClient.
func (*ClientFactory) NewScriptExecutionHistoryClient ¶ added in v1.1.0
func (c *ClientFactory) NewScriptExecutionHistoryClient() *ScriptExecutionHistoryClient
NewScriptExecutionHistoryClient creates a new instance of ScriptExecutionHistoryClient.
func (*ClientFactory) NewVirtualMachinesClient ¶ added in v1.1.0
func (c *ClientFactory) NewVirtualMachinesClient() *VirtualMachinesClient
NewVirtualMachinesClient creates a new instance of VirtualMachinesClient.
type ClientGroupInfo ¶
type ClientGroupInfo struct { // The AAD security group id. GroupID *string // The AAD security group name. GroupName *string }
ClientGroupInfo - The information of AAD security group.
func (ClientGroupInfo) MarshalJSON ¶ added in v1.1.0
func (c ClientGroupInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClientGroupInfo.
func (*ClientGroupInfo) UnmarshalJSON ¶ added in v1.1.0
func (c *ClientGroupInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClientGroupInfo.
type Cluster ¶
type Cluster struct { // REQUIRED; The geo-location where the resource lives Location *string // The ETag for the resource Etag *string // The identity of the cluster, if configured. Identity *ClusterIdentity // The properties of the cluster. Properties *ClusterGetProperties // Resource tags. Tags map[string]*string // The availability zones. Zones []*string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Metadata pertaining to creation and last modification of the resource. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
Cluster - The HDInsight cluster.
func (Cluster) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Cluster.
func (*Cluster) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Cluster.
type ClusterConfigurations ¶
type ClusterConfigurations struct { // The configuration object for the specified configuration for the specified cluster. Configurations map[string]map[string]*string }
ClusterConfigurations - The configuration object for the specified cluster.
func (ClusterConfigurations) MarshalJSON ¶
func (c ClusterConfigurations) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterConfigurations.
func (*ClusterConfigurations) UnmarshalJSON ¶ added in v1.1.0
func (c *ClusterConfigurations) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterConfigurations.
type ClusterCreateParametersExtended ¶
type ClusterCreateParametersExtended struct { // The identity of the cluster, if configured. Identity *ClusterIdentity // The location of the cluster. Location *string // The cluster create parameters. Properties *ClusterCreateProperties // The resource tags. Tags map[string]*string // The availability zones. Zones []*string }
ClusterCreateParametersExtended - The CreateCluster request parameters.
func (ClusterCreateParametersExtended) MarshalJSON ¶
func (c ClusterCreateParametersExtended) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterCreateParametersExtended.
func (*ClusterCreateParametersExtended) UnmarshalJSON ¶ added in v1.1.0
func (c *ClusterCreateParametersExtended) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterCreateParametersExtended.
type ClusterCreateProperties ¶
type ClusterCreateProperties struct { // The cluster definition. ClusterDefinition *ClusterDefinition // The version of the cluster. ClusterVersion *string // The compute isolation properties. ComputeIsolationProperties *ComputeIsolationProperties // The compute profile. ComputeProfile *ComputeProfile // The disk encryption properties. DiskEncryptionProperties *DiskEncryptionProperties // The encryption-in-transit properties. EncryptionInTransitProperties *EncryptionInTransitProperties // The cluster kafka rest proxy configuration. KafkaRestProperties *KafkaRestProperties // The minimal supported tls version. MinSupportedTLSVersion *string // The network properties. NetworkProperties *NetworkProperties // The type of operating system. OSType *OSType // The private link configurations. PrivateLinkConfigurations []*PrivateLinkConfiguration // The security profile. SecurityProfile *SecurityProfile // The storage profile. StorageProfile *StorageProfile // The cluster tier. Tier *Tier }
ClusterCreateProperties - The cluster create parameters.
func (ClusterCreateProperties) MarshalJSON ¶
func (c ClusterCreateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterCreateProperties.
func (*ClusterCreateProperties) UnmarshalJSON ¶ added in v1.1.0
func (c *ClusterCreateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterCreateProperties.
type ClusterCreateRequestValidationParameters ¶
type ClusterCreateRequestValidationParameters struct { // This indicates whether fetch Aadds resource or not. FetchAaddsResource *bool // The identity of the cluster, if configured. Identity *ClusterIdentity // The location of the cluster. Location *string // The cluster name. Name *string // The cluster create parameters. Properties *ClusterCreateProperties // The resource tags. Tags map[string]*string // The tenant id. TenantID *string // The resource type. Type *string // The availability zones. Zones []*string }
ClusterCreateRequestValidationParameters - The cluster create request specification.
func (ClusterCreateRequestValidationParameters) MarshalJSON ¶
func (c ClusterCreateRequestValidationParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterCreateRequestValidationParameters.
func (*ClusterCreateRequestValidationParameters) UnmarshalJSON ¶ added in v1.1.0
func (c *ClusterCreateRequestValidationParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterCreateRequestValidationParameters.
type ClusterCreateValidationResult ¶
type ClusterCreateValidationResult struct { // The Azure active directory domain service resource details. AaddsResourcesDetails []*AaddsResourceDetails // The estimated creation duration. EstimatedCreationDuration *string // The validation errors. ValidationErrors []*ValidationErrorInfo // The validation warnings. ValidationWarnings []*ValidationErrorInfo }
ClusterCreateValidationResult - The response of cluster create request validation.
func (ClusterCreateValidationResult) MarshalJSON ¶
func (c ClusterCreateValidationResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterCreateValidationResult.
func (*ClusterCreateValidationResult) UnmarshalJSON ¶ added in v1.1.0
func (c *ClusterCreateValidationResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterCreateValidationResult.
type ClusterDefinition ¶
type ClusterDefinition struct { // The link to the blueprint. Blueprint *string // The versions of different services in the cluster. ComponentVersion map[string]*string // The cluster configurations. Configurations any // The type of cluster. Kind *string }
ClusterDefinition - The cluster definition.
func (ClusterDefinition) MarshalJSON ¶
func (c ClusterDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterDefinition.
func (*ClusterDefinition) UnmarshalJSON ¶ added in v1.1.0
func (c *ClusterDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterDefinition.
type ClusterDiskEncryptionParameters ¶
type ClusterDiskEncryptionParameters struct { // Key name that is used for enabling disk encryption. KeyName *string // Specific key version that is used for enabling disk encryption. KeyVersion *string // Base key vault URI where the customers key is located eg. https://myvault.vault.azure.net VaultURI *string }
ClusterDiskEncryptionParameters - The Disk Encryption Cluster request parameters.
func (ClusterDiskEncryptionParameters) MarshalJSON ¶ added in v1.1.0
func (c ClusterDiskEncryptionParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterDiskEncryptionParameters.
func (*ClusterDiskEncryptionParameters) UnmarshalJSON ¶ added in v1.1.0
func (c *ClusterDiskEncryptionParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterDiskEncryptionParameters.
type ClusterGetProperties ¶
type ClusterGetProperties struct { // REQUIRED; The cluster definition. ClusterDefinition *ClusterDefinition // The hdp version of the cluster. ClusterHdpVersion *string // The cluster id. ClusterID *string // The state of the cluster. ClusterState *string // The version of the cluster. ClusterVersion *string // The compute isolation properties. ComputeIsolationProperties *ComputeIsolationProperties // The compute profile. ComputeProfile *ComputeProfile // The list of connectivity endpoints. ConnectivityEndpoints []*ConnectivityEndpoint // The date on which the cluster was created. CreatedDate *string // The disk encryption properties. DiskEncryptionProperties *DiskEncryptionProperties // The encryption-in-transit properties. EncryptionInTransitProperties *EncryptionInTransitProperties // The list of errors. Errors []*Errors // The excluded services config. ExcludedServicesConfig *ExcludedServicesConfig // The cluster kafka rest proxy configuration. KafkaRestProperties *KafkaRestProperties // The minimal supported tls version. MinSupportedTLSVersion *string // The network properties. NetworkProperties *NetworkProperties // The type of operating system. OSType *OSType // The private link configurations. PrivateLinkConfigurations []*PrivateLinkConfiguration // The provisioning state, which only appears in the response. ProvisioningState *HDInsightClusterProvisioningState // The quota information. QuotaInfo *QuotaInfo // The security profile. SecurityProfile *SecurityProfile // The storage profile. StorageProfile *StorageProfile // The cluster tier. Tier *Tier // READ-ONLY; The list of private endpoint connections. PrivateEndpointConnections []*PrivateEndpointConnection }
ClusterGetProperties - The properties of cluster.
func (ClusterGetProperties) MarshalJSON ¶
func (c ClusterGetProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterGetProperties.
func (*ClusterGetProperties) UnmarshalJSON ¶ added in v1.1.0
func (c *ClusterGetProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterGetProperties.
type ClusterIdentity ¶
type ClusterIdentity struct { // The type of identity used for the cluster. The type 'SystemAssigned, UserAssigned' includes both an implicitly created // identity and a set of user assigned identities. Type *ResourceIdentityType // The list of user identities associated with the cluster. The user identity dictionary key references will be ARM resource // ids in the form: // '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. UserAssignedIdentities map[string]*UserAssignedIdentity // READ-ONLY; The principal id of cluster identity. This property will only be provided for a system assigned identity. PrincipalID *string // READ-ONLY; The tenant id associated with the cluster. This property will only be provided for a system assigned identity. TenantID *string }
ClusterIdentity - Identity for the cluster.
func (ClusterIdentity) MarshalJSON ¶
func (c ClusterIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterIdentity.
func (*ClusterIdentity) UnmarshalJSON ¶ added in v1.1.0
func (c *ClusterIdentity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterIdentity.
type ClusterListPersistedScriptActionsResult ¶
type ClusterListPersistedScriptActionsResult struct { // The list of Persisted Script Actions. Value []*RuntimeScriptAction // READ-ONLY; The link (url) to the next page of results. NextLink *string }
ClusterListPersistedScriptActionsResult - The ListPersistedScriptActions operation response.
func (ClusterListPersistedScriptActionsResult) MarshalJSON ¶
func (c ClusterListPersistedScriptActionsResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterListPersistedScriptActionsResult.
func (*ClusterListPersistedScriptActionsResult) UnmarshalJSON ¶ added in v1.1.0
func (c *ClusterListPersistedScriptActionsResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterListPersistedScriptActionsResult.
type ClusterListResult ¶
type ClusterListResult struct { // The list of Clusters. Value []*Cluster // READ-ONLY; The link (url) to the next page of results. NextLink *string }
ClusterListResult - The List Cluster operation response.
func (ClusterListResult) MarshalJSON ¶
func (c ClusterListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterListResult.
func (*ClusterListResult) UnmarshalJSON ¶ added in v1.1.0
func (c *ClusterListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterListResult.
type ClusterMonitoringRequest ¶
type ClusterMonitoringRequest struct { // The cluster monitor workspace key. PrimaryKey *string // The cluster monitor workspace ID. WorkspaceID *string }
ClusterMonitoringRequest - The cluster monitor parameters.
func (ClusterMonitoringRequest) MarshalJSON ¶ added in v1.1.0
func (c ClusterMonitoringRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterMonitoringRequest.
func (*ClusterMonitoringRequest) UnmarshalJSON ¶ added in v1.1.0
func (c *ClusterMonitoringRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterMonitoringRequest.
type ClusterMonitoringResponse ¶
type ClusterMonitoringResponse struct { // The status of the monitor on the HDInsight cluster. ClusterMonitoringEnabled *bool // The workspace ID of the monitor on the HDInsight cluster. WorkspaceID *string }
ClusterMonitoringResponse - The cluster monitoring status response.
func (ClusterMonitoringResponse) MarshalJSON ¶ added in v1.1.0
func (c ClusterMonitoringResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterMonitoringResponse.
func (*ClusterMonitoringResponse) UnmarshalJSON ¶ added in v1.1.0
func (c *ClusterMonitoringResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterMonitoringResponse.
type ClusterPatchParameters ¶
ClusterPatchParameters - The PatchCluster request parameters
func (ClusterPatchParameters) MarshalJSON ¶
func (c ClusterPatchParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterPatchParameters.
func (*ClusterPatchParameters) UnmarshalJSON ¶ added in v1.1.0
func (c *ClusterPatchParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterPatchParameters.
type ClusterResizeParameters ¶
type ClusterResizeParameters struct { // The target instance count for the operation. TargetInstanceCount *int32 }
ClusterResizeParameters - The Resize Cluster request parameters.
func (ClusterResizeParameters) MarshalJSON ¶ added in v1.1.0
func (c ClusterResizeParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterResizeParameters.
func (*ClusterResizeParameters) UnmarshalJSON ¶ added in v1.1.0
func (c *ClusterResizeParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterResizeParameters.
type ClustersClient ¶
type ClustersClient struct {
// contains filtered or unexported fields
}
ClustersClient contains the methods for the Clusters group. Don't use this type directly, use NewClustersClient() instead.
func NewClustersClient ¶
func NewClustersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClustersClient, error)
NewClustersClient creates a new instance of ClustersClient with the specified values.
- subscriptionID - The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ClustersClient) BeginCreate ¶
func (client *ClustersClient) BeginCreate(ctx context.Context, resourceGroupName string, clusterName string, parameters ClusterCreateParametersExtended, options *ClustersClientBeginCreateOptions) (*runtime.Poller[ClustersClientCreateResponse], error)
BeginCreate - Creates a new HDInsight cluster with the specified parameters. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster.
- parameters - The cluster create request.
- options - ClustersClientBeginCreateOptions contains the optional parameters for the ClustersClient.BeginCreate method.
Example (CreateClusterWithAvailabilityZones) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateHDInsightClusterWithAvailabilityZones.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/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewClustersClient().BeginCreate(ctx, "rg1", "cluster1", armhdinsight.ClusterCreateParametersExtended{ Properties: &armhdinsight.ClusterCreateProperties{ ClusterDefinition: &armhdinsight.ClusterDefinition{ Configurations: map[string]any{ "ambari-conf": map[string]any{ "database-name": "{ambari database name}", "database-server": "{sql server name}.database.windows.net", "database-user-name": "**********", "database-user-password": "**********", }, "gateway": map[string]any{ "restAuthCredential.isEnabled": true, "restAuthCredential.password": "**********", "restAuthCredential.username": "admin", }, "hive-env": map[string]any{ "hive_database": "Existing MSSQL Server database with SQL authentication", "hive_database_name": "{hive metastore name}", "hive_database_type": "mssql", "hive_existing_mssql_server_database": "{hive metastore name}", "hive_existing_mssql_server_host": "{sql server name}.database.windows.net", "hive_hostname": "{sql server name}.database.windows.net", }, "hive-site": map[string]any{ "javax.jdo.option.ConnectionDriverName": "com.microsoft.sqlserver.jdbc.SQLServerDriver", "javax.jdo.option.ConnectionPassword": "**********!", "javax.jdo.option.ConnectionURL": "jdbc:sqlserver://{sql server name}.database.windows.net;database={hive metastore name};encrypt=true;trustServerCertificate=true;create=false;loginTimeout=300;sendStringParametersAsUnicode=true;prepareSQL=0", "javax.jdo.option.ConnectionUserName": "**********", }, "oozie-env": map[string]any{ "oozie_database": "Existing MSSQL Server database with SQL authentication", "oozie_database_name": "{oozie metastore name}", "oozie_database_type": "mssql", "oozie_existing_mssql_server_database": "{oozie metastore name}", "oozie_existing_mssql_server_host": "{sql server name}.database.windows.net", "oozie_hostname": "{sql server name}.database.windows.net", }, "oozie-site": map[string]any{ "oozie.db.schema.name": "oozie", "oozie.service.JPAService.jdbc.driver": "com.microsoft.sqlserver.jdbc.SQLServerDriver", "oozie.service.JPAService.jdbc.password": "**********", "oozie.service.JPAService.jdbc.url": "jdbc:sqlserver://{sql server name}.database.windows.net;database={oozie metastore name};encrypt=true;trustServerCertificate=true;create=false;loginTimeout=300;sendStringParametersAsUnicode=true;prepareSQL=0", "oozie.service.JPAService.jdbc.username": "**********", }, }, Kind: to.Ptr("hadoop"), }, ClusterVersion: to.Ptr("3.6"), ComputeProfile: &armhdinsight.ComputeProfile{ Roles: []*armhdinsight.Role{ { Name: to.Ptr("headnode"), HardwareProfile: &armhdinsight.HardwareProfile{ VMSize: to.Ptr("standard_d3"), }, OSProfile: &armhdinsight.OsProfile{ LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ Password: to.Ptr("**********"), SSHProfile: &armhdinsight.SSHProfile{ PublicKeys: []*armhdinsight.SSHPublicKey{ { CertificateData: to.Ptr("**********"), }}, }, Username: to.Ptr("sshuser"), }, }, TargetInstanceCount: to.Ptr[int32](2), VirtualNetworkProfile: &armhdinsight.VirtualNetworkProfile{ ID: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname"), Subnet: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname/subnets/vnetsubnet"), }, }, { Name: to.Ptr("workernode"), HardwareProfile: &armhdinsight.HardwareProfile{ VMSize: to.Ptr("standard_d3"), }, OSProfile: &armhdinsight.OsProfile{ LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ Password: to.Ptr("**********"), SSHProfile: &armhdinsight.SSHProfile{ PublicKeys: []*armhdinsight.SSHPublicKey{ { CertificateData: to.Ptr("**********"), }}, }, Username: to.Ptr("sshuser"), }, }, TargetInstanceCount: to.Ptr[int32](2), VirtualNetworkProfile: &armhdinsight.VirtualNetworkProfile{ ID: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname"), Subnet: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname/subnets/vnetsubnet"), }, }}, }, OSType: to.Ptr(armhdinsight.OSTypeLinux), StorageProfile: &armhdinsight.StorageProfile{ Storageaccounts: []*armhdinsight.StorageAccount{ { Name: to.Ptr("mystorage"), Container: to.Ptr("containername"), IsDefault: to.Ptr(true), Key: to.Ptr("storage account key"), }}, }, }, Zones: []*string{ to.Ptr("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.Cluster = armhdinsight.Cluster{ // Name: to.Ptr("cluster1"), // Type: to.Ptr("Microsoft.HDInsight/clusters"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1"), // Location: to.Ptr("South Central US"), // Etag: to.Ptr("fdf2a6e8-ce83-42cc-8c2d-0ceb11a370ff"), // Properties: &armhdinsight.ClusterGetProperties{ // ClusterDefinition: &armhdinsight.ClusterDefinition{ // Blueprint: to.Ptr("https://blueprints.azurehdinsight.net/hadoop-3.6.1000.67.2005040905.json"), // Kind: to.Ptr("hadoop"), // }, // ClusterID: to.Ptr("8186508b6234470e9d16c9e8e13bd821"), // ClusterState: to.Ptr("Running"), // ClusterVersion: to.Ptr("3.6.1000.67"), // ComputeProfile: &armhdinsight.ComputeProfile{ // Roles: []*armhdinsight.Role{ // { // Name: to.Ptr("headnode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("standard_d3"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("sshuser"), // }, // }, // TargetInstanceCount: to.Ptr[int32](2), // VirtualNetworkProfile: &armhdinsight.VirtualNetworkProfile{ // ID: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname"), // Subnet: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname/subnets/vnetsubnet"), // }, // }, // { // Name: to.Ptr("workernode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("standard_d3"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("sshuser"), // }, // }, // TargetInstanceCount: to.Ptr[int32](2), // VirtualNetworkProfile: &armhdinsight.VirtualNetworkProfile{ // ID: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname"), // Subnet: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname/subnets/vnetsubnet"), // }, // }}, // }, // CreatedDate: to.Ptr("2020-06-09T12:25:43.48"), // OSType: to.Ptr(armhdinsight.OSTypeLinux), // ProvisioningState: to.Ptr(armhdinsight.HDInsightClusterProvisioningStateSucceeded), // QuotaInfo: &armhdinsight.QuotaInfo{ // CoresUsed: to.Ptr[int32](16), // }, // Tier: to.Ptr(armhdinsight.TierStandard), // }, // Zones: []*string{ // to.Ptr("1")}, // } }
Output:
Example (CreateClusterWithComputeIsolationProperties) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateHDInsightClusterWithComputeIsolationProperties.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/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewClustersClient().BeginCreate(ctx, "rg1", "cluster1", armhdinsight.ClusterCreateParametersExtended{ Properties: &armhdinsight.ClusterCreateProperties{ ClusterDefinition: &armhdinsight.ClusterDefinition{ Configurations: map[string]any{ "gateway": map[string]any{ "restAuthCredential.isEnabled": true, "restAuthCredential.password": "**********", "restAuthCredential.username": "admin", }, }, Kind: to.Ptr("hadoop"), }, ClusterVersion: to.Ptr("3.6"), ComputeIsolationProperties: &armhdinsight.ComputeIsolationProperties{ EnableComputeIsolation: to.Ptr(true), }, ComputeProfile: &armhdinsight.ComputeProfile{ Roles: []*armhdinsight.Role{ { Name: to.Ptr("headnode"), HardwareProfile: &armhdinsight.HardwareProfile{ VMSize: to.Ptr("standard_d3"), }, OSProfile: &armhdinsight.OsProfile{ LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ Password: to.Ptr("**********"), SSHProfile: &armhdinsight.SSHProfile{ PublicKeys: []*armhdinsight.SSHPublicKey{ { CertificateData: to.Ptr("**********"), }}, }, Username: to.Ptr("sshuser"), }, }, TargetInstanceCount: to.Ptr[int32](2), }, { Name: to.Ptr("workernode"), HardwareProfile: &armhdinsight.HardwareProfile{ VMSize: to.Ptr("standard_d3"), }, OSProfile: &armhdinsight.OsProfile{ LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ Password: to.Ptr("**********"), SSHProfile: &armhdinsight.SSHProfile{ PublicKeys: []*armhdinsight.SSHPublicKey{ { CertificateData: to.Ptr("**********"), }}, }, Username: to.Ptr("sshuser"), }, }, TargetInstanceCount: to.Ptr[int32](2), }}, }, OSType: to.Ptr(armhdinsight.OSTypeLinux), StorageProfile: &armhdinsight.StorageProfile{ Storageaccounts: []*armhdinsight.StorageAccount{ { Name: to.Ptr("mystorage"), Container: to.Ptr("containername"), IsDefault: to.Ptr(true), Key: to.Ptr("storage account key"), }}, }, }, }, 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.Cluster = armhdinsight.Cluster{ // Name: to.Ptr("cluster1"), // Type: to.Ptr("Microsoft.HDInsight/clusters"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1"), // Location: to.Ptr("South Central US"), // Etag: to.Ptr("fdf2a6e8-ce83-42cc-8c2d-0ceb11a370ff"), // Properties: &armhdinsight.ClusterGetProperties{ // ClusterDefinition: &armhdinsight.ClusterDefinition{ // Blueprint: to.Ptr("https://blueprints.azurehdinsight.net/hadoop-3.6.1000.67.2005040905.json"), // Kind: to.Ptr("hadoop"), // }, // ClusterID: to.Ptr("8186508b6234470e9d16c9e8e13bd821"), // ClusterState: to.Ptr("Running"), // ClusterVersion: to.Ptr("3.6.1000.67"), // ComputeIsolationProperties: &armhdinsight.ComputeIsolationProperties{ // EnableComputeIsolation: to.Ptr(true), // }, // ComputeProfile: &armhdinsight.ComputeProfile{ // Roles: []*armhdinsight.Role{ // { // Name: to.Ptr("headnode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("standard_d3"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("sshuser"), // }, // }, // TargetInstanceCount: to.Ptr[int32](2), // VirtualNetworkProfile: &armhdinsight.VirtualNetworkProfile{ // ID: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname"), // Subnet: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname/subnets/vnetsubnet"), // }, // }, // { // Name: to.Ptr("workernode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("standard_d3"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("sshuser"), // }, // }, // TargetInstanceCount: to.Ptr[int32](2), // }}, // }, // CreatedDate: to.Ptr("2020-06-09T12:25:43.48"), // OSType: to.Ptr(armhdinsight.OSTypeLinux), // ProvisioningState: to.Ptr(armhdinsight.HDInsightClusterProvisioningStateSucceeded), // QuotaInfo: &armhdinsight.QuotaInfo{ // CoresUsed: to.Ptr[int32](16), // }, // Tier: to.Ptr(armhdinsight.TierStandard), // }, // } }
Output:
Example (CreateClusterWithEncryptionAtHost) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateHDInsightClusterWithEncryptionAtHost.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/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewClustersClient().BeginCreate(ctx, "rg1", "cluster1", armhdinsight.ClusterCreateParametersExtended{ Properties: &armhdinsight.ClusterCreateProperties{ ClusterDefinition: &armhdinsight.ClusterDefinition{ Configurations: map[string]any{ "gateway": map[string]any{ "restAuthCredential.isEnabled": true, "restAuthCredential.password": "**********", "restAuthCredential.username": "admin", }, }, Kind: to.Ptr("Hadoop"), }, ClusterVersion: to.Ptr("3.6"), ComputeProfile: &armhdinsight.ComputeProfile{ Roles: []*armhdinsight.Role{ { Name: to.Ptr("headnode"), HardwareProfile: &armhdinsight.HardwareProfile{ VMSize: to.Ptr("Standard_DS14_v2"), }, OSProfile: &armhdinsight.OsProfile{ LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ Password: to.Ptr("**********"), Username: to.Ptr("sshuser"), }, }, TargetInstanceCount: to.Ptr[int32](2), }, { Name: to.Ptr("workernode"), HardwareProfile: &armhdinsight.HardwareProfile{ VMSize: to.Ptr("Standard_DS14_v2"), }, OSProfile: &armhdinsight.OsProfile{ LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ Password: to.Ptr("**********"), Username: to.Ptr("sshuser"), }, }, TargetInstanceCount: to.Ptr[int32](3), }, { Name: to.Ptr("zookeepernode"), HardwareProfile: &armhdinsight.HardwareProfile{ VMSize: to.Ptr("Standard_DS14_v2"), }, OSProfile: &armhdinsight.OsProfile{ LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ Password: to.Ptr("**********"), Username: to.Ptr("sshuser"), }, }, TargetInstanceCount: to.Ptr[int32](3), }}, }, DiskEncryptionProperties: &armhdinsight.DiskEncryptionProperties{ EncryptionAtHost: to.Ptr(true), }, OSType: to.Ptr(armhdinsight.OSTypeLinux), StorageProfile: &armhdinsight.StorageProfile{ Storageaccounts: []*armhdinsight.StorageAccount{ { Name: to.Ptr("mystorage.blob.core.windows.net"), Container: to.Ptr("default8525"), IsDefault: to.Ptr(true), Key: to.Ptr("storagekey"), }}, }, Tier: to.Ptr(armhdinsight.TierStandard), }, }, 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.Cluster = armhdinsight.Cluster{ // Name: to.Ptr("cluster1"), // Type: to.Ptr("Microsoft.HDInsight/clusters"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1"), // Location: to.Ptr("South Central US"), // Etag: to.Ptr("3b76ce3d-892c-4036-9d8b-8ade18ba7a4b"), // Properties: &armhdinsight.ClusterGetProperties{ // ClusterDefinition: &armhdinsight.ClusterDefinition{ // Blueprint: to.Ptr("https://blueprints.azurehdinsight.net/hadoop-3.6.1000.67.2001080246.json"), // ComponentVersion: map[string]*string{ // "Hadoop": to.Ptr("2.7"), // }, // Kind: to.Ptr("Hadoop"), // }, // ClusterState: to.Ptr("Running"), // ClusterVersion: to.Ptr("3.6.1000.67"), // ComputeProfile: &armhdinsight.ComputeProfile{ // Roles: []*armhdinsight.Role{ // { // Name: to.Ptr("headnode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("standard_ds14_v2"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("sshuser"), // }, // }, // TargetInstanceCount: to.Ptr[int32](2), // }, // { // Name: to.Ptr("workernode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("standard_ds14_v2"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("sshuser"), // }, // }, // TargetInstanceCount: to.Ptr[int32](3), // }, // { // Name: to.Ptr("zookeepernode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("standard_ds14_v2"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("sshuser"), // }, // }, // TargetInstanceCount: to.Ptr[int32](3), // }}, // }, // ConnectivityEndpoints: []*armhdinsight.ConnectivityEndpoint{ // { // Name: to.Ptr("SSH"), // Location: to.Ptr("cluster1-ssh.azurehdinsight.net"), // Port: to.Ptr[int32](22), // Protocol: to.Ptr("TCP"), // }, // { // Name: to.Ptr("HTTPS"), // Location: to.Ptr("cluster1.azurehdinsight.net"), // Port: to.Ptr[int32](443), // Protocol: to.Ptr("TCP"), // }}, // CreatedDate: to.Ptr("2020-01-10T08:36:39.153"), // DiskEncryptionProperties: &armhdinsight.DiskEncryptionProperties{ // EncryptionAtHost: to.Ptr(true), // }, // OSType: to.Ptr(armhdinsight.OSTypeLinux), // ProvisioningState: to.Ptr(armhdinsight.HDInsightClusterProvisioningStateSucceeded), // QuotaInfo: &armhdinsight.QuotaInfo{ // CoresUsed: to.Ptr[int32](20), // }, // Tier: to.Ptr(armhdinsight.TierStandard), // }, // } }
Output:
Example (CreateClusterWithEncryptionInTransit) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateHDInsightClusterWithEncryptionInTransit.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/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewClustersClient().BeginCreate(ctx, "rg1", "cluster1", armhdinsight.ClusterCreateParametersExtended{ Properties: &armhdinsight.ClusterCreateProperties{ ClusterDefinition: &armhdinsight.ClusterDefinition{ Configurations: map[string]any{ "gateway": map[string]any{ "restAuthCredential.isEnabled": true, "restAuthCredential.password": "**********", "restAuthCredential.username": "admin", }, }, Kind: to.Ptr("Hadoop"), }, ClusterVersion: to.Ptr("3.6"), ComputeProfile: &armhdinsight.ComputeProfile{ Roles: []*armhdinsight.Role{ { Name: to.Ptr("headnode"), HardwareProfile: &armhdinsight.HardwareProfile{ VMSize: to.Ptr("Large"), }, OSProfile: &armhdinsight.OsProfile{ LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ Password: to.Ptr("**********"), Username: to.Ptr("sshuser"), }, }, TargetInstanceCount: to.Ptr[int32](2), }, { Name: to.Ptr("workernode"), HardwareProfile: &armhdinsight.HardwareProfile{ VMSize: to.Ptr("Large"), }, OSProfile: &armhdinsight.OsProfile{ LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ Password: to.Ptr("**********"), Username: to.Ptr("sshuser"), }, }, TargetInstanceCount: to.Ptr[int32](3), }, { Name: to.Ptr("zookeepernode"), HardwareProfile: &armhdinsight.HardwareProfile{ VMSize: to.Ptr("Small"), }, OSProfile: &armhdinsight.OsProfile{ LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ Password: to.Ptr("**********"), Username: to.Ptr("sshuser"), }, }, TargetInstanceCount: to.Ptr[int32](3), }}, }, EncryptionInTransitProperties: &armhdinsight.EncryptionInTransitProperties{ IsEncryptionInTransitEnabled: to.Ptr(true), }, OSType: to.Ptr(armhdinsight.OSTypeLinux), StorageProfile: &armhdinsight.StorageProfile{ Storageaccounts: []*armhdinsight.StorageAccount{ { Name: to.Ptr("mystorage.blob.core.windows.net"), Container: to.Ptr("default8525"), IsDefault: to.Ptr(true), Key: to.Ptr("storagekey"), }}, }, Tier: to.Ptr(armhdinsight.TierStandard), }, }, 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.Cluster = armhdinsight.Cluster{ // Name: to.Ptr("cluster1"), // Type: to.Ptr("Microsoft.HDInsight/clusters"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1"), // Location: to.Ptr("South Central US"), // Etag: to.Ptr("3b76ce3d-892c-4036-9d8b-8ade18ba7a4b"), // Properties: &armhdinsight.ClusterGetProperties{ // ClusterDefinition: &armhdinsight.ClusterDefinition{ // Blueprint: to.Ptr("https://blueprints.azurehdinsight.net/hadoop-3.6.1000.67.2001080246.json"), // ComponentVersion: map[string]*string{ // "Hadoop": to.Ptr("2.7"), // }, // Kind: to.Ptr("Hadoop"), // }, // ClusterState: to.Ptr("Running"), // ClusterVersion: to.Ptr("3.6.1000.67"), // ComputeProfile: &armhdinsight.ComputeProfile{ // Roles: []*armhdinsight.Role{ // { // Name: to.Ptr("headnode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("standard_a4_v2"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("sshuser"), // }, // }, // TargetInstanceCount: to.Ptr[int32](2), // }, // { // Name: to.Ptr("workernode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("standard_a4_v2"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("sshuser"), // }, // }, // TargetInstanceCount: to.Ptr[int32](3), // }, // { // Name: to.Ptr("zookeepernode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("standard_a2_v2"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("sshuser"), // }, // }, // TargetInstanceCount: to.Ptr[int32](3), // }}, // }, // ConnectivityEndpoints: []*armhdinsight.ConnectivityEndpoint{ // { // Name: to.Ptr("SSH"), // Location: to.Ptr("cluster1-ssh.azurehdinsight.net"), // Port: to.Ptr[int32](22), // Protocol: to.Ptr("TCP"), // }, // { // Name: to.Ptr("HTTPS"), // Location: to.Ptr("cluster1.azurehdinsight.net"), // Port: to.Ptr[int32](443), // Protocol: to.Ptr("TCP"), // }}, // CreatedDate: to.Ptr("2020-01-10T08:36:39.153"), // EncryptionInTransitProperties: &armhdinsight.EncryptionInTransitProperties{ // IsEncryptionInTransitEnabled: to.Ptr(true), // }, // OSType: to.Ptr(armhdinsight.OSTypeLinux), // ProvisioningState: to.Ptr(armhdinsight.HDInsightClusterProvisioningStateSucceeded), // QuotaInfo: &armhdinsight.QuotaInfo{ // CoresUsed: to.Ptr[int32](20), // }, // Tier: to.Ptr(armhdinsight.TierStandard), // }, // } }
Output:
Example (CreateClusterWithNetworkProperties) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateHDInsightClusterWithCustomNetworkProperties.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/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewClustersClient().BeginCreate(ctx, "rg1", "cluster1", armhdinsight.ClusterCreateParametersExtended{ Properties: &armhdinsight.ClusterCreateProperties{ ClusterDefinition: &armhdinsight.ClusterDefinition{ Configurations: map[string]any{ "gateway": map[string]any{ "restAuthCredential.isEnabled": true, "restAuthCredential.password": "**********", "restAuthCredential.username": "admin", }, }, Kind: to.Ptr("hadoop"), }, ClusterVersion: to.Ptr("3.6"), ComputeProfile: &armhdinsight.ComputeProfile{ Roles: []*armhdinsight.Role{ { Name: to.Ptr("headnode"), HardwareProfile: &armhdinsight.HardwareProfile{ VMSize: to.Ptr("standard_d3"), }, OSProfile: &armhdinsight.OsProfile{ LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ Password: to.Ptr("**********"), SSHProfile: &armhdinsight.SSHProfile{ PublicKeys: []*armhdinsight.SSHPublicKey{ { CertificateData: to.Ptr("**********"), }}, }, Username: to.Ptr("sshuser"), }, }, TargetInstanceCount: to.Ptr[int32](2), VirtualNetworkProfile: &armhdinsight.VirtualNetworkProfile{ ID: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname"), Subnet: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname/subnets/vnetsubnet"), }, }, { Name: to.Ptr("workernode"), HardwareProfile: &armhdinsight.HardwareProfile{ VMSize: to.Ptr("standard_d3"), }, OSProfile: &armhdinsight.OsProfile{ LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ Password: to.Ptr("**********"), SSHProfile: &armhdinsight.SSHProfile{ PublicKeys: []*armhdinsight.SSHPublicKey{ { CertificateData: to.Ptr("**********"), }}, }, Username: to.Ptr("sshuser"), }, }, TargetInstanceCount: to.Ptr[int32](2), VirtualNetworkProfile: &armhdinsight.VirtualNetworkProfile{ ID: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname"), Subnet: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname/subnets/vnetsubnet"), }, }}, }, NetworkProperties: &armhdinsight.NetworkProperties{ PrivateLink: to.Ptr(armhdinsight.PrivateLinkEnabled), ResourceProviderConnection: to.Ptr(armhdinsight.ResourceProviderConnectionOutbound), }, OSType: to.Ptr(armhdinsight.OSTypeLinux), StorageProfile: &armhdinsight.StorageProfile{ Storageaccounts: []*armhdinsight.StorageAccount{ { Name: to.Ptr("mystorage"), Container: to.Ptr("containername"), IsDefault: to.Ptr(true), Key: to.Ptr("storage account key"), }}, }, }, }, 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.Cluster = armhdinsight.Cluster{ // Name: to.Ptr("cluster1"), // Type: to.Ptr("Microsoft.HDInsight/clusters"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1"), // Location: to.Ptr("South Central US"), // Etag: to.Ptr("fdf2a6e8-ce83-42cc-8c2d-0ceb11a370ff"), // Properties: &armhdinsight.ClusterGetProperties{ // ClusterDefinition: &armhdinsight.ClusterDefinition{ // Blueprint: to.Ptr("https://blueprints.azurehdinsight.net/hadoop-3.6.1000.67.2005040905.json"), // Kind: to.Ptr("hadoop"), // }, // ClusterID: to.Ptr("8186508b6234470e9d16c9e8e13bd821"), // ClusterState: to.Ptr("Running"), // ClusterVersion: to.Ptr("3.6.1000.67"), // ComputeProfile: &armhdinsight.ComputeProfile{ // Roles: []*armhdinsight.Role{ // { // Name: to.Ptr("headnode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("standard_d3"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("sshuser"), // }, // }, // TargetInstanceCount: to.Ptr[int32](2), // VirtualNetworkProfile: &armhdinsight.VirtualNetworkProfile{ // ID: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname"), // Subnet: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname/subnets/vnetsubnet"), // }, // }, // { // Name: to.Ptr("workernode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("standard_d3"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("sshuser"), // }, // }, // TargetInstanceCount: to.Ptr[int32](2), // VirtualNetworkProfile: &armhdinsight.VirtualNetworkProfile{ // ID: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname"), // Subnet: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname/subnets/vnetsubnet"), // }, // }}, // }, // CreatedDate: to.Ptr("2020-06-09T12:25:43.48"), // NetworkProperties: &armhdinsight.NetworkProperties{ // PrivateLink: to.Ptr(armhdinsight.PrivateLinkEnabled), // ResourceProviderConnection: to.Ptr(armhdinsight.ResourceProviderConnectionOutbound), // }, // OSType: to.Ptr(armhdinsight.OSTypeLinux), // ProvisioningState: to.Ptr(armhdinsight.HDInsightClusterProvisioningStateSucceeded), // QuotaInfo: &armhdinsight.QuotaInfo{ // CoresUsed: to.Ptr[int32](16), // }, // Tier: to.Ptr(armhdinsight.TierStandard), // }, // } }
Output:
Example (CreateClusterWithTls12) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateHDInsightClusterWithTLS12.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/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewClustersClient().BeginCreate(ctx, "rg1", "cluster1", armhdinsight.ClusterCreateParametersExtended{ Properties: &armhdinsight.ClusterCreateProperties{ ClusterDefinition: &armhdinsight.ClusterDefinition{ Configurations: map[string]any{ "gateway": map[string]any{ "restAuthCredential.isEnabled": true, "restAuthCredential.password": "**********", "restAuthCredential.username": "admin", }, }, Kind: to.Ptr("Hadoop"), }, ClusterVersion: to.Ptr("3.6"), ComputeProfile: &armhdinsight.ComputeProfile{ Roles: []*armhdinsight.Role{ { Name: to.Ptr("headnode"), HardwareProfile: &armhdinsight.HardwareProfile{ VMSize: to.Ptr("Large"), }, OSProfile: &armhdinsight.OsProfile{ LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ Password: to.Ptr("**********"), Username: to.Ptr("sshuser"), }, }, TargetInstanceCount: to.Ptr[int32](2), }, { Name: to.Ptr("workernode"), HardwareProfile: &armhdinsight.HardwareProfile{ VMSize: to.Ptr("Large"), }, OSProfile: &armhdinsight.OsProfile{ LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ Password: to.Ptr("**********"), Username: to.Ptr("sshuser"), }, }, TargetInstanceCount: to.Ptr[int32](3), }, { Name: to.Ptr("zookeepernode"), HardwareProfile: &armhdinsight.HardwareProfile{ VMSize: to.Ptr("Small"), }, OSProfile: &armhdinsight.OsProfile{ LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ Password: to.Ptr("**********"), Username: to.Ptr("sshuser"), }, }, TargetInstanceCount: to.Ptr[int32](3), }}, }, MinSupportedTLSVersion: to.Ptr("1.2"), OSType: to.Ptr(armhdinsight.OSTypeLinux), StorageProfile: &armhdinsight.StorageProfile{ Storageaccounts: []*armhdinsight.StorageAccount{ { Name: to.Ptr("mystorage.blob.core.windows.net"), Container: to.Ptr("default8525"), IsDefault: to.Ptr(true), Key: to.Ptr("storagekey"), }}, }, Tier: to.Ptr(armhdinsight.TierStandard), }, }, 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.Cluster = armhdinsight.Cluster{ // Name: to.Ptr("cluster1"), // Type: to.Ptr("Microsoft.HDInsight/clusters"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1"), // Location: to.Ptr("South Central US"), // Etag: to.Ptr("3b76ce3d-892c-4036-9d8b-8ade18ba7a4b"), // Properties: &armhdinsight.ClusterGetProperties{ // ClusterDefinition: &armhdinsight.ClusterDefinition{ // Blueprint: to.Ptr("https://blueprints.azurehdinsight.net/hadoop-3.6.1000.67.2001080246.json"), // ComponentVersion: map[string]*string{ // "Hadoop": to.Ptr("2.7"), // }, // Kind: to.Ptr("Hadoop"), // }, // ClusterState: to.Ptr("Running"), // ClusterVersion: to.Ptr("3.6.1000.67"), // ComputeProfile: &armhdinsight.ComputeProfile{ // Roles: []*armhdinsight.Role{ // { // Name: to.Ptr("headnode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("standard_a4_v2"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("sshuser"), // }, // }, // TargetInstanceCount: to.Ptr[int32](2), // }, // { // Name: to.Ptr("workernode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("standard_a4_v2"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("sshuser"), // }, // }, // TargetInstanceCount: to.Ptr[int32](3), // }, // { // Name: to.Ptr("zookeepernode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("standard_a2_v2"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("sshuser"), // }, // }, // TargetInstanceCount: to.Ptr[int32](3), // }}, // }, // ConnectivityEndpoints: []*armhdinsight.ConnectivityEndpoint{ // { // Name: to.Ptr("SSH"), // Location: to.Ptr("cluster1-ssh.azurehdinsight.net"), // Port: to.Ptr[int32](22), // Protocol: to.Ptr("TCP"), // }, // { // Name: to.Ptr("HTTPS"), // Location: to.Ptr("cluster1.azurehdinsight.net"), // Port: to.Ptr[int32](443), // Protocol: to.Ptr("TCP"), // }}, // CreatedDate: to.Ptr("2020-01-10T08:36:39.153"), // MinSupportedTLSVersion: to.Ptr("1.2"), // OSType: to.Ptr(armhdinsight.OSTypeLinux), // ProvisioningState: to.Ptr(armhdinsight.HDInsightClusterProvisioningStateSucceeded), // QuotaInfo: &armhdinsight.QuotaInfo{ // CoresUsed: to.Ptr[int32](20), // }, // Tier: to.Ptr(armhdinsight.TierStandard), // }, // } }
Output:
Example (CreateHadoopClusterWithAzureDataLakeStorageGen2) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateLinuxHadoopAdlsGen2.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/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewClustersClient().BeginCreate(ctx, "rg1", "cluster1", armhdinsight.ClusterCreateParametersExtended{ Properties: &armhdinsight.ClusterCreateProperties{ ClusterDefinition: &armhdinsight.ClusterDefinition{ Configurations: map[string]any{ "gateway": map[string]any{ "restAuthCredential.isEnabled": "true", "restAuthCredential.password": "**********", "restAuthCredential.username": "admin", }, }, Kind: to.Ptr("Hadoop"), }, ClusterVersion: to.Ptr("3.6"), ComputeProfile: &armhdinsight.ComputeProfile{ Roles: []*armhdinsight.Role{ { Name: to.Ptr("headnode"), HardwareProfile: &armhdinsight.HardwareProfile{ VMSize: to.Ptr("Standard_D3_V2"), }, MinInstanceCount: to.Ptr[int32](1), OSProfile: &armhdinsight.OsProfile{ LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ Password: to.Ptr("**********"), Username: to.Ptr("sshuser"), }, }, TargetInstanceCount: to.Ptr[int32](2), }, { Name: to.Ptr("workernode"), HardwareProfile: &armhdinsight.HardwareProfile{ VMSize: to.Ptr("Standard_D3_V2"), }, MinInstanceCount: to.Ptr[int32](1), OSProfile: &armhdinsight.OsProfile{ LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ Password: to.Ptr("**********"), Username: to.Ptr("sshuser"), }, }, TargetInstanceCount: to.Ptr[int32](4), }, { Name: to.Ptr("zookeepernode"), HardwareProfile: &armhdinsight.HardwareProfile{ VMSize: to.Ptr("Small"), }, MinInstanceCount: to.Ptr[int32](1), OSProfile: &armhdinsight.OsProfile{ LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ Password: to.Ptr("**********"), Username: to.Ptr("sshuser"), }, }, TargetInstanceCount: to.Ptr[int32](3), }}, }, OSType: to.Ptr(armhdinsight.OSTypeLinux), StorageProfile: &armhdinsight.StorageProfile{ Storageaccounts: []*armhdinsight.StorageAccount{ { Name: to.Ptr("mystorage.dfs.core.windows.net"), FileSystem: to.Ptr("default"), IsDefault: to.Ptr(true), Key: to.Ptr("storagekey"), }}, }, Tier: to.Ptr(armhdinsight.TierStandard), }, Tags: map[string]*string{ "key1": to.Ptr("val1"), }, }, 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.Cluster = armhdinsight.Cluster{ // Name: to.Ptr("cluster1"), // Type: to.Ptr("Microsoft.HDInsight/clusters"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1"), // Location: to.Ptr("East US"), // Etag: to.Ptr("fdf2a6e8-ce83-42cc-8c2d-0ceb11a370ff"), // Properties: &armhdinsight.ClusterGetProperties{ // ClusterDefinition: &armhdinsight.ClusterDefinition{ // Blueprint: to.Ptr("https://blueprints.azurehdinsight.net/hadoop-4.0.1000.1.1910270459.json"), // ComponentVersion: map[string]*string{ // "Hadoop": to.Ptr("3.1"), // }, // Kind: to.Ptr("HADOOP"), // }, // ClusterState: to.Ptr("Running"), // ClusterVersion: to.Ptr("4.0.1000.1"), // ComputeProfile: &armhdinsight.ComputeProfile{ // Roles: []*armhdinsight.Role{ // { // Name: to.Ptr("headnode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("standard_d12_v2"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("sshuser"), // }, // }, // TargetInstanceCount: to.Ptr[int32](2), // }, // { // Name: to.Ptr("workernode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("standard_d4_v2"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("sshuser"), // }, // }, // TargetInstanceCount: to.Ptr[int32](4), // }, // { // Name: to.Ptr("zookeepernode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("standard_a2_v2"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("sshuser"), // }, // }, // TargetInstanceCount: to.Ptr[int32](3), // }}, // }, // ConnectivityEndpoints: []*armhdinsight.ConnectivityEndpoint{ // { // Name: to.Ptr("SSH"), // Location: to.Ptr("cluster1-ssh.azurehdinsight.net"), // Port: to.Ptr[int32](22), // Protocol: to.Ptr("TCP"), // }, // { // Name: to.Ptr("HTTPS"), // Location: to.Ptr("cluster1.azurehdinsight.net"), // Port: to.Ptr[int32](443), // Protocol: to.Ptr("TCP"), // }}, // CreatedDate: to.Ptr("2019-11-18T12:25:43.48"), // OSType: to.Ptr(armhdinsight.OSTypeLinux), // ProvisioningState: to.Ptr(armhdinsight.HDInsightClusterProvisioningStateSucceeded), // QuotaInfo: &armhdinsight.QuotaInfo{ // CoresUsed: to.Ptr[int32](40), // }, // Tier: to.Ptr(armhdinsight.TierStandard), // }, // } }
Output:
Example (CreateHadoopOnLinuxClusterWithSshPassword) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateLinuxHadoopSshPassword.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/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewClustersClient().BeginCreate(ctx, "rg1", "cluster1", armhdinsight.ClusterCreateParametersExtended{ Properties: &armhdinsight.ClusterCreateProperties{ ClusterDefinition: &armhdinsight.ClusterDefinition{ Configurations: map[string]any{ "gateway": map[string]any{ "restAuthCredential.isEnabled": "true", "restAuthCredential.password": "**********", "restAuthCredential.username": "admin", }, }, Kind: to.Ptr("Hadoop"), }, ClusterVersion: to.Ptr("3.5"), ComputeProfile: &armhdinsight.ComputeProfile{ Roles: []*armhdinsight.Role{ { Name: to.Ptr("headnode"), HardwareProfile: &armhdinsight.HardwareProfile{ VMSize: to.Ptr("Standard_D3_V2"), }, MinInstanceCount: to.Ptr[int32](1), OSProfile: &armhdinsight.OsProfile{ LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ Password: to.Ptr("**********"), Username: to.Ptr("sshuser"), }, }, TargetInstanceCount: to.Ptr[int32](2), }, { Name: to.Ptr("workernode"), HardwareProfile: &armhdinsight.HardwareProfile{ VMSize: to.Ptr("Standard_D3_V2"), }, MinInstanceCount: to.Ptr[int32](1), OSProfile: &armhdinsight.OsProfile{ LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ Password: to.Ptr("**********"), Username: to.Ptr("sshuser"), }, }, TargetInstanceCount: to.Ptr[int32](4), }, { Name: to.Ptr("zookeepernode"), HardwareProfile: &armhdinsight.HardwareProfile{ VMSize: to.Ptr("Small"), }, MinInstanceCount: to.Ptr[int32](1), OSProfile: &armhdinsight.OsProfile{ LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ Password: to.Ptr("**********"), Username: to.Ptr("sshuser"), }, }, TargetInstanceCount: to.Ptr[int32](3), }}, }, OSType: to.Ptr(armhdinsight.OSTypeLinux), StorageProfile: &armhdinsight.StorageProfile{ Storageaccounts: []*armhdinsight.StorageAccount{ { Name: to.Ptr("mystorage.blob.core.windows.net"), Container: to.Ptr("containername"), IsDefault: to.Ptr(true), Key: to.Ptr("storagekey"), }}, }, Tier: to.Ptr(armhdinsight.TierStandard), }, Tags: map[string]*string{ "key1": to.Ptr("val1"), }, }, 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.Cluster = armhdinsight.Cluster{ // Name: to.Ptr("cluster1"), // Type: to.Ptr("Microsoft.HDInsight/clusters"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1"), // Location: to.Ptr("East US"), // Etag: to.Ptr("fdf2a6e8-ce83-42cc-8c2d-0ceb11a370ff"), // Properties: &armhdinsight.ClusterGetProperties{ // ClusterDefinition: &armhdinsight.ClusterDefinition{ // Blueprint: to.Ptr("https://blueprints.azurehdinsight.net/hadoop-4.0.1000.1.1910270459.json"), // ComponentVersion: map[string]*string{ // "Hadoop": to.Ptr("3.1"), // }, // Kind: to.Ptr("HADOOP"), // }, // ClusterState: to.Ptr("Running"), // ClusterVersion: to.Ptr("4.0.1000.1"), // ComputeProfile: &armhdinsight.ComputeProfile{ // Roles: []*armhdinsight.Role{ // { // Name: to.Ptr("headnode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("standard_d12_v2"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("sshuser"), // }, // }, // TargetInstanceCount: to.Ptr[int32](2), // }, // { // Name: to.Ptr("workernode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("standard_d4_v2"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("sshuser"), // }, // }, // TargetInstanceCount: to.Ptr[int32](4), // }, // { // Name: to.Ptr("zookeepernode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("standard_a2_v2"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("sshuser"), // }, // }, // TargetInstanceCount: to.Ptr[int32](3), // }}, // }, // ConnectivityEndpoints: []*armhdinsight.ConnectivityEndpoint{ // { // Name: to.Ptr("SSH"), // Location: to.Ptr("cluster1-ssh.azurehdinsight.net"), // Port: to.Ptr[int32](22), // Protocol: to.Ptr("TCP"), // }, // { // Name: to.Ptr("HTTPS"), // Location: to.Ptr("cluster1.azurehdinsight.net"), // Port: to.Ptr[int32](443), // Protocol: to.Ptr("TCP"), // }}, // CreatedDate: to.Ptr("2019-11-18T12:25:43.48"), // OSType: to.Ptr(armhdinsight.OSTypeLinux), // ProvisioningState: to.Ptr(armhdinsight.HDInsightClusterProvisioningStateSucceeded), // QuotaInfo: &armhdinsight.QuotaInfo{ // CoresUsed: to.Ptr[int32](40), // }, // Tier: to.Ptr(armhdinsight.TierStandard), // }, // } }
Output:
Example (CreateHadoopOnLinuxClusterWithSshPublicKey) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateLinuxHadoopSshPublicKey.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/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewClustersClient().BeginCreate(ctx, "rg1", "cluster1", armhdinsight.ClusterCreateParametersExtended{ Properties: &armhdinsight.ClusterCreateProperties{ ClusterDefinition: &armhdinsight.ClusterDefinition{ Configurations: map[string]any{ "gateway": map[string]any{ "restAuthCredential.isEnabled": true, "restAuthCredential.password": "**********", "restAuthCredential.username": "admin", }, }, Kind: to.Ptr("Hadoop"), }, ClusterVersion: to.Ptr("3.5"), ComputeProfile: &armhdinsight.ComputeProfile{ Roles: []*armhdinsight.Role{ { Name: to.Ptr("headnode"), HardwareProfile: &armhdinsight.HardwareProfile{ VMSize: to.Ptr("Standard_D3_V2"), }, MinInstanceCount: to.Ptr[int32](1), OSProfile: &armhdinsight.OsProfile{ LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ SSHProfile: &armhdinsight.SSHProfile{ PublicKeys: []*armhdinsight.SSHPublicKey{ { CertificateData: to.Ptr("**********"), }}, }, Username: to.Ptr("sshuser"), }, }, TargetInstanceCount: to.Ptr[int32](2), }, { Name: to.Ptr("workernode"), HardwareProfile: &armhdinsight.HardwareProfile{ VMSize: to.Ptr("Standard_D3_V2"), }, MinInstanceCount: to.Ptr[int32](1), OSProfile: &armhdinsight.OsProfile{ LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ Password: to.Ptr("**********"), Username: to.Ptr("sshuser"), }, }, TargetInstanceCount: to.Ptr[int32](4), }, { Name: to.Ptr("zookeepernode"), HardwareProfile: &armhdinsight.HardwareProfile{ VMSize: to.Ptr("Small"), }, MinInstanceCount: to.Ptr[int32](1), OSProfile: &armhdinsight.OsProfile{ LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ Password: to.Ptr("**********"), Username: to.Ptr("sshuser"), }, }, TargetInstanceCount: to.Ptr[int32](3), }}, }, OSType: to.Ptr(armhdinsight.OSTypeLinux), StorageProfile: &armhdinsight.StorageProfile{ Storageaccounts: []*armhdinsight.StorageAccount{ { Name: to.Ptr("mystorage.blob.core.windows.net"), Container: to.Ptr("containername"), IsDefault: to.Ptr(true), Key: to.Ptr("storagekey"), }}, }, Tier: to.Ptr(armhdinsight.TierStandard), }, Tags: map[string]*string{ "key1": to.Ptr("val1"), }, }, 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.Cluster = armhdinsight.Cluster{ // Name: to.Ptr("cluster1"), // Type: to.Ptr("Microsoft.HDInsight/clusters"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1"), // Location: to.Ptr("East US"), // Etag: to.Ptr("fdf2a6e8-ce83-42cc-8c2d-0ceb11a370ff"), // Properties: &armhdinsight.ClusterGetProperties{ // ClusterDefinition: &armhdinsight.ClusterDefinition{ // Blueprint: to.Ptr("https://blueprints.azurehdinsight.net/hadoop-4.0.1000.1.1910270459.json"), // ComponentVersion: map[string]*string{ // "Hadoop": to.Ptr("3.1"), // }, // Kind: to.Ptr("HADOOP"), // }, // ClusterState: to.Ptr("Running"), // ClusterVersion: to.Ptr("4.0.1000.1"), // ComputeProfile: &armhdinsight.ComputeProfile{ // Roles: []*armhdinsight.Role{ // { // Name: to.Ptr("headnode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("standard_d12_v2"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("sshuser"), // }, // }, // TargetInstanceCount: to.Ptr[int32](2), // }, // { // Name: to.Ptr("workernode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("standard_d4_v2"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("sshuser"), // }, // }, // TargetInstanceCount: to.Ptr[int32](4), // }, // { // Name: to.Ptr("zookeepernode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("standard_a2_v2"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("sshuser"), // }, // }, // TargetInstanceCount: to.Ptr[int32](3), // }}, // }, // ConnectivityEndpoints: []*armhdinsight.ConnectivityEndpoint{ // { // Name: to.Ptr("SSH"), // Location: to.Ptr("cluster1-ssh.azurehdinsight.net"), // Port: to.Ptr[int32](22), // Protocol: to.Ptr("TCP"), // }, // { // Name: to.Ptr("HTTPS"), // Location: to.Ptr("cluster1.azurehdinsight.net"), // Port: to.Ptr[int32](443), // Protocol: to.Ptr("TCP"), // }}, // CreatedDate: to.Ptr("2019-11-18T12:25:43.48"), // OSType: to.Ptr(armhdinsight.OSTypeLinux), // ProvisioningState: to.Ptr(armhdinsight.HDInsightClusterProvisioningStateSucceeded), // QuotaInfo: &armhdinsight.QuotaInfo{ // CoresUsed: to.Ptr[int32](40), // }, // Tier: to.Ptr(armhdinsight.TierStandard), // }, // } }
Output:
Example (CreateHdInsightClusterWithAutoscaleConfiguration) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateHDInsightClusterWithAutoscaleConfig.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/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewClustersClient().BeginCreate(ctx, "rg1", "cluster1", armhdinsight.ClusterCreateParametersExtended{ Properties: &armhdinsight.ClusterCreateProperties{ ClusterDefinition: &armhdinsight.ClusterDefinition{ ComponentVersion: map[string]*string{ "Hadoop": to.Ptr("2.7"), }, Configurations: map[string]any{ "gateway": map[string]any{ "restAuthCredential.isEnabled": true, "restAuthCredential.password": "**********", "restAuthCredential.username": "admin", }, }, Kind: to.Ptr("hadoop"), }, ClusterVersion: to.Ptr("3.6"), ComputeProfile: &armhdinsight.ComputeProfile{ Roles: []*armhdinsight.Role{ { Name: to.Ptr("workernode"), AutoscaleConfiguration: &armhdinsight.Autoscale{ Recurrence: &armhdinsight.AutoscaleRecurrence{ Schedule: []*armhdinsight.AutoscaleSchedule{ { Days: []*armhdinsight.DaysOfWeek{ to.Ptr(armhdinsight.DaysOfWeekMonday), to.Ptr(armhdinsight.DaysOfWeekTuesday), to.Ptr(armhdinsight.DaysOfWeekWednesday), to.Ptr(armhdinsight.DaysOfWeekThursday), to.Ptr(armhdinsight.DaysOfWeekFriday)}, TimeAndCapacity: &armhdinsight.AutoscaleTimeAndCapacity{ MaxInstanceCount: to.Ptr[int32](3), MinInstanceCount: to.Ptr[int32](3), Time: to.Ptr("09:00"), }, }, { Days: []*armhdinsight.DaysOfWeek{ to.Ptr(armhdinsight.DaysOfWeekMonday), to.Ptr(armhdinsight.DaysOfWeekTuesday), to.Ptr(armhdinsight.DaysOfWeekWednesday), to.Ptr(armhdinsight.DaysOfWeekThursday), to.Ptr(armhdinsight.DaysOfWeekFriday)}, TimeAndCapacity: &armhdinsight.AutoscaleTimeAndCapacity{ MaxInstanceCount: to.Ptr[int32](6), MinInstanceCount: to.Ptr[int32](6), Time: to.Ptr("18:00"), }, }, { Days: []*armhdinsight.DaysOfWeek{ to.Ptr(armhdinsight.DaysOfWeekSaturday), to.Ptr(armhdinsight.DaysOfWeekSunday)}, TimeAndCapacity: &armhdinsight.AutoscaleTimeAndCapacity{ MaxInstanceCount: to.Ptr[int32](2), MinInstanceCount: to.Ptr[int32](2), Time: to.Ptr("09:00"), }, }, { Days: []*armhdinsight.DaysOfWeek{ to.Ptr(armhdinsight.DaysOfWeekSaturday), to.Ptr(armhdinsight.DaysOfWeekSunday)}, TimeAndCapacity: &armhdinsight.AutoscaleTimeAndCapacity{ MaxInstanceCount: to.Ptr[int32](4), MinInstanceCount: to.Ptr[int32](4), Time: to.Ptr("18:00"), }, }}, TimeZone: to.Ptr("China Standard Time"), }, }, HardwareProfile: &armhdinsight.HardwareProfile{ VMSize: to.Ptr("Standard_D4_V2"), }, OSProfile: &armhdinsight.OsProfile{ LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ Password: to.Ptr("**********"), Username: to.Ptr("sshuser"), }, }, ScriptActions: []*armhdinsight.ScriptAction{}, TargetInstanceCount: to.Ptr[int32](4), }}, }, OSType: to.Ptr(armhdinsight.OSTypeLinux), StorageProfile: &armhdinsight.StorageProfile{ Storageaccounts: []*armhdinsight.StorageAccount{ { Name: to.Ptr("mystorage.blob.core.windows.net"), Container: to.Ptr("hdinsight-autoscale-tes-2019-06-18t05-49-16-591z"), IsDefault: to.Ptr(true), Key: to.Ptr("storagekey"), }}, }, Tier: to.Ptr(armhdinsight.TierStandard), }, }, 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.Cluster = armhdinsight.Cluster{ // Name: to.Ptr("cluster1"), // Type: to.Ptr("Microsoft.HDInsight/clusters"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1"), // Location: to.Ptr("East US"), // Etag: to.Ptr("fdf2a6e8-ce83-42cc-8c2d-0ceb11a370ff"), // Properties: &armhdinsight.ClusterGetProperties{ // ClusterDefinition: &armhdinsight.ClusterDefinition{ // Blueprint: to.Ptr("https://blueprints.azurehdinsight.net/hadoop-4.0.1000.1.1910270459.json"), // ComponentVersion: map[string]*string{ // "Hadoop": to.Ptr("3.1"), // }, // Kind: to.Ptr("HADOOP"), // }, // ClusterState: to.Ptr("Running"), // ClusterVersion: to.Ptr("4.0.1000.1"), // ComputeProfile: &armhdinsight.ComputeProfile{ // Roles: []*armhdinsight.Role{ // { // Name: to.Ptr("headnode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("standard_d12_v2"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("sshuser"), // }, // }, // TargetInstanceCount: to.Ptr[int32](2), // }, // { // Name: to.Ptr("workernode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("standard_d4_v2"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("sshuser"), // }, // }, // TargetInstanceCount: to.Ptr[int32](4), // }, // { // Name: to.Ptr("zookeepernode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("standard_a2_v2"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("sshuser"), // }, // }, // TargetInstanceCount: to.Ptr[int32](3), // }}, // }, // ConnectivityEndpoints: []*armhdinsight.ConnectivityEndpoint{ // { // Name: to.Ptr("SSH"), // Location: to.Ptr("cluster1-ssh.azurehdinsight.net"), // Port: to.Ptr[int32](22), // Protocol: to.Ptr("TCP"), // }, // { // Name: to.Ptr("HTTPS"), // Location: to.Ptr("cluster1.azurehdinsight.net"), // Port: to.Ptr[int32](443), // Protocol: to.Ptr("TCP"), // }}, // CreatedDate: to.Ptr("2019-11-18T12:25:43.48"), // OSType: to.Ptr(armhdinsight.OSTypeLinux), // ProvisioningState: to.Ptr(armhdinsight.HDInsightClusterProvisioningStateSucceeded), // QuotaInfo: &armhdinsight.QuotaInfo{ // CoresUsed: to.Ptr[int32](40), // }, // Tier: to.Ptr(armhdinsight.TierStandard), // }, // } }
Output:
Example (CreateKafkaClusterWithKafkaRestProxy) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateKafkaClusterWithKafkaRestProxy.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/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewClustersClient().BeginCreate(ctx, "rg1", "cluster1", armhdinsight.ClusterCreateParametersExtended{ Properties: &armhdinsight.ClusterCreateProperties{ ClusterDefinition: &armhdinsight.ClusterDefinition{ ComponentVersion: map[string]*string{ "Kafka": to.Ptr("2.1"), }, Configurations: map[string]any{ "gateway": map[string]any{ "restAuthCredential.isEnabled": true, "restAuthCredential.password": "**********", "restAuthCredential.username": "admin", }, }, Kind: to.Ptr("kafka"), }, ClusterVersion: to.Ptr("4.0"), ComputeProfile: &armhdinsight.ComputeProfile{ Roles: []*armhdinsight.Role{ { Name: to.Ptr("headnode"), HardwareProfile: &armhdinsight.HardwareProfile{ VMSize: to.Ptr("Large"), }, OSProfile: &armhdinsight.OsProfile{ LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ Password: to.Ptr("**********"), Username: to.Ptr("sshuser"), }, }, TargetInstanceCount: to.Ptr[int32](2), }, { Name: to.Ptr("workernode"), DataDisksGroups: []*armhdinsight.DataDisksGroups{ { DisksPerNode: to.Ptr[int32](8), }}, HardwareProfile: &armhdinsight.HardwareProfile{ VMSize: to.Ptr("Large"), }, OSProfile: &armhdinsight.OsProfile{ LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ Password: to.Ptr("**********"), Username: to.Ptr("sshuser"), }, }, TargetInstanceCount: to.Ptr[int32](3), }, { Name: to.Ptr("zookeepernode"), HardwareProfile: &armhdinsight.HardwareProfile{ VMSize: to.Ptr("Small"), }, OSProfile: &armhdinsight.OsProfile{ LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ Password: to.Ptr("**********"), Username: to.Ptr("sshuser"), }, }, TargetInstanceCount: to.Ptr[int32](3), }, { Name: to.Ptr("kafkamanagementnode"), HardwareProfile: &armhdinsight.HardwareProfile{ VMSize: to.Ptr("Standard_D4_v2"), }, OSProfile: &armhdinsight.OsProfile{ LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ Password: to.Ptr("**********"), Username: to.Ptr("kafkauser"), }, }, TargetInstanceCount: to.Ptr[int32](2), }}, }, KafkaRestProperties: &armhdinsight.KafkaRestProperties{ ClientGroupInfo: &armhdinsight.ClientGroupInfo{ GroupID: to.Ptr("00000000-0000-0000-0000-111111111111"), GroupName: to.Ptr("Kafka security group name"), }, }, OSType: to.Ptr(armhdinsight.OSTypeLinux), StorageProfile: &armhdinsight.StorageProfile{ Storageaccounts: []*armhdinsight.StorageAccount{ { Name: to.Ptr("mystorage.blob.core.windows.net"), Container: to.Ptr("containername"), IsDefault: to.Ptr(true), Key: to.Ptr("storagekey"), }}, }, Tier: to.Ptr(armhdinsight.TierStandard), }, }, 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.Cluster = armhdinsight.Cluster{ // Name: to.Ptr("cluster1"), // Type: to.Ptr("Microsoft.HDInsight/clusters"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1"), // Location: to.Ptr("South Central US"), // Etag: to.Ptr("e1266b83-9bda-4797-a906-1bf82c8eb09a"), // Properties: &armhdinsight.ClusterGetProperties{ // ClusterDefinition: &armhdinsight.ClusterDefinition{ // Blueprint: to.Ptr("https://blueprints.azurehdinsight.net/kafka-4.0.1000.1.1911212244.json"), // ComponentVersion: map[string]*string{ // "Kafka": to.Ptr("2.1"), // }, // Kind: to.Ptr("KAFKA"), // }, // ClusterState: to.Ptr("Running"), // ClusterVersion: to.Ptr("4.0.1000.1"), // ComputeProfile: &armhdinsight.ComputeProfile{ // Roles: []*armhdinsight.Role{ // { // Name: to.Ptr("headnode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("standard_d3_v2"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("sshuser"), // }, // }, // TargetInstanceCount: to.Ptr[int32](2), // }, // { // Name: to.Ptr("workernode"), // DataDisksGroups: []*armhdinsight.DataDisksGroups{ // { // DiskSizeGB: to.Ptr[int32](1023), // DisksPerNode: to.Ptr[int32](2), // StorageAccountType: to.Ptr("Standard_LRS"), // }}, // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("standard_d3_v2"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("sshuser"), // }, // }, // TargetInstanceCount: to.Ptr[int32](4), // }, // { // Name: to.Ptr("kafkamanagementnode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("standard_d4_v2"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("sshuser"), // }, // }, // TargetInstanceCount: to.Ptr[int32](2), // }, // { // Name: to.Ptr("zookeepernode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("standard_a4_v2"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("sshuser"), // }, // }, // TargetInstanceCount: to.Ptr[int32](3), // }}, // }, // ConnectivityEndpoints: []*armhdinsight.ConnectivityEndpoint{ // { // Name: to.Ptr("SSH"), // Location: to.Ptr("cluster1-ssh.azurehdinsight.net"), // Port: to.Ptr[int32](22), // Protocol: to.Ptr("TCP"), // }, // { // Name: to.Ptr("HTTPS"), // Location: to.Ptr("cluster1.azurehdinsight.net"), // Port: to.Ptr[int32](443), // Protocol: to.Ptr("TCP"), // }, // { // Name: to.Ptr("KafkaRestProxyPublicEndpoint"), // Location: to.Ptr("cluster1-kafkarest.azurehdinsight.net"), // Port: to.Ptr[int32](443), // Protocol: to.Ptr("TCP"), // }}, // CreatedDate: to.Ptr("2019-11-25T03:43:23.663"), // KafkaRestProperties: &armhdinsight.KafkaRestProperties{ // ClientGroupInfo: &armhdinsight.ClientGroupInfo{ // GroupID: to.Ptr("00000000-0000-0000-0000-000000000000"), // GroupName: to.Ptr("security group name"), // }, // }, // OSType: to.Ptr(armhdinsight.OSTypeLinux), // ProvisioningState: to.Ptr(armhdinsight.HDInsightClusterProvisioningStateSucceeded), // QuotaInfo: &armhdinsight.QuotaInfo{ // CoresUsed: to.Ptr[int32](52), // }, // Tier: to.Ptr(armhdinsight.TierStandard), // }, // } }
Output:
Example (CreateSecureHadoopCluster) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateLinuxHadoopSecureHadoop.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/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewClustersClient().BeginCreate(ctx, "rg1", "cluster1", armhdinsight.ClusterCreateParametersExtended{ Properties: &armhdinsight.ClusterCreateProperties{ ClusterDefinition: &armhdinsight.ClusterDefinition{ Configurations: map[string]any{ "gateway": map[string]any{ "restAuthCredential.isEnabled": true, "restAuthCredential.password": "**********", "restAuthCredential.username": "admin", }, }, Kind: to.Ptr("Hadoop"), }, ClusterVersion: to.Ptr("3.5"), ComputeProfile: &armhdinsight.ComputeProfile{ Roles: []*armhdinsight.Role{ { Name: to.Ptr("headnode"), HardwareProfile: &armhdinsight.HardwareProfile{ VMSize: to.Ptr("Standard_D3_V2"), }, MinInstanceCount: to.Ptr[int32](1), OSProfile: &armhdinsight.OsProfile{ LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ Password: to.Ptr("**********"), SSHProfile: &armhdinsight.SSHProfile{ PublicKeys: []*armhdinsight.SSHPublicKey{ { CertificateData: to.Ptr("**********"), }}, }, Username: to.Ptr("sshuser"), }, }, ScriptActions: []*armhdinsight.ScriptAction{}, TargetInstanceCount: to.Ptr[int32](2), VirtualNetworkProfile: &armhdinsight.VirtualNetworkProfile{ ID: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname"), Subnet: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname/subnets/vnetsubnet"), }, }, { Name: to.Ptr("workernode"), HardwareProfile: &armhdinsight.HardwareProfile{ VMSize: to.Ptr("Standard_D3_V2"), }, MinInstanceCount: to.Ptr[int32](1), OSProfile: &armhdinsight.OsProfile{ LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ Password: to.Ptr("**********"), SSHProfile: &armhdinsight.SSHProfile{ PublicKeys: []*armhdinsight.SSHPublicKey{ { CertificateData: to.Ptr("**********"), }}, }, Username: to.Ptr("sshuser"), }, }, ScriptActions: []*armhdinsight.ScriptAction{}, TargetInstanceCount: to.Ptr[int32](4), VirtualNetworkProfile: &armhdinsight.VirtualNetworkProfile{ ID: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname"), Subnet: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname/subnets/vnetsubnet"), }, }, { Name: to.Ptr("zookeepernode"), HardwareProfile: &armhdinsight.HardwareProfile{ VMSize: to.Ptr("Small"), }, MinInstanceCount: to.Ptr[int32](1), OSProfile: &armhdinsight.OsProfile{ LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ Password: to.Ptr("**********"), SSHProfile: &armhdinsight.SSHProfile{ PublicKeys: []*armhdinsight.SSHPublicKey{ { CertificateData: to.Ptr("**********"), }}, }, Username: to.Ptr("sshuser"), }, }, ScriptActions: []*armhdinsight.ScriptAction{}, TargetInstanceCount: to.Ptr[int32](3), VirtualNetworkProfile: &armhdinsight.VirtualNetworkProfile{ ID: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname"), Subnet: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname/subnets/vnetsubnet"), }, }}, }, OSType: to.Ptr(armhdinsight.OSTypeLinux), SecurityProfile: &armhdinsight.SecurityProfile{ ClusterUsersGroupDNs: []*string{ to.Ptr("hdiusers")}, DirectoryType: to.Ptr(armhdinsight.DirectoryTypeActiveDirectory), Domain: to.Ptr("DomainName"), DomainUserPassword: to.Ptr("**********"), DomainUsername: to.Ptr("DomainUsername"), LdapsUrls: []*string{ to.Ptr("ldaps://10.10.0.4:636")}, OrganizationalUnitDN: to.Ptr("OU=Hadoop,DC=hdinsight,DC=test"), }, StorageProfile: &armhdinsight.StorageProfile{ Storageaccounts: []*armhdinsight.StorageAccount{ { Name: to.Ptr("mystorage.blob.core.windows.net"), Container: to.Ptr("containername"), IsDefault: to.Ptr(true), Key: to.Ptr("storage account key"), }}, }, Tier: to.Ptr(armhdinsight.TierPremium), }, Tags: map[string]*string{ "key1": to.Ptr("val1"), }, }, 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.Cluster = armhdinsight.Cluster{ // Name: to.Ptr("cluster1"), // Type: to.Ptr("Microsoft.HDInsight/clusters"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1"), // Location: to.Ptr("East US"), // Etag: to.Ptr("fdf2a6e8-ce83-42cc-8c2d-0ceb11a370ff"), // Properties: &armhdinsight.ClusterGetProperties{ // ClusterDefinition: &armhdinsight.ClusterDefinition{ // Blueprint: to.Ptr("https://blueprints.azurehdinsight.net/hadoop-4.0.1000.1.1910270459.json"), // ComponentVersion: map[string]*string{ // "Hadoop": to.Ptr("3.1"), // }, // Kind: to.Ptr("HADOOP"), // }, // ClusterState: to.Ptr("Running"), // ClusterVersion: to.Ptr("4.0.1000.1"), // ComputeProfile: &armhdinsight.ComputeProfile{ // Roles: []*armhdinsight.Role{ // { // Name: to.Ptr("headnode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("standard_d12_v2"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("sshuser"), // }, // }, // TargetInstanceCount: to.Ptr[int32](2), // }, // { // Name: to.Ptr("workernode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("standard_d4_v2"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("sshuser"), // }, // }, // TargetInstanceCount: to.Ptr[int32](4), // }, // { // Name: to.Ptr("zookeepernode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("standard_a2_v2"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("sshuser"), // }, // }, // TargetInstanceCount: to.Ptr[int32](3), // }}, // }, // ConnectivityEndpoints: []*armhdinsight.ConnectivityEndpoint{ // { // Name: to.Ptr("SSH"), // Location: to.Ptr("cluster1-ssh.azurehdinsight.net"), // Port: to.Ptr[int32](22), // Protocol: to.Ptr("TCP"), // }, // { // Name: to.Ptr("HTTPS"), // Location: to.Ptr("cluster1.azurehdinsight.net"), // Port: to.Ptr[int32](443), // Protocol: to.Ptr("TCP"), // }}, // CreatedDate: to.Ptr("2019-11-18T12:25:43.48"), // OSType: to.Ptr(armhdinsight.OSTypeLinux), // ProvisioningState: to.Ptr(armhdinsight.HDInsightClusterProvisioningStateSucceeded), // QuotaInfo: &armhdinsight.QuotaInfo{ // CoresUsed: to.Ptr[int32](40), // }, // Tier: to.Ptr(armhdinsight.TierStandard), // }, // } }
Output:
Example (CreateSparkOnLinuxClusterWithSshPassword) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateLinuxSparkSshPassword.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/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewClustersClient().BeginCreate(ctx, "rg1", "cluster1", armhdinsight.ClusterCreateParametersExtended{ Properties: &armhdinsight.ClusterCreateProperties{ ClusterDefinition: &armhdinsight.ClusterDefinition{ ComponentVersion: map[string]*string{ "Spark": to.Ptr("2.0"), }, Configurations: map[string]any{ "gateway": map[string]any{ "restAuthCredential.isEnabled": true, "restAuthCredential.password": "**********", "restAuthCredential.username": "admin", }, }, Kind: to.Ptr("Spark"), }, ClusterVersion: to.Ptr("3.5"), ComputeProfile: &armhdinsight.ComputeProfile{ Roles: []*armhdinsight.Role{ { Name: to.Ptr("headnode"), HardwareProfile: &armhdinsight.HardwareProfile{ VMSize: to.Ptr("Standard_D12_V2"), }, MinInstanceCount: to.Ptr[int32](1), OSProfile: &armhdinsight.OsProfile{ LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ Password: to.Ptr("**********"), Username: to.Ptr("sshuser"), }, }, TargetInstanceCount: to.Ptr[int32](2), }, { Name: to.Ptr("workernode"), HardwareProfile: &armhdinsight.HardwareProfile{ VMSize: to.Ptr("Standard_D4_V2"), }, MinInstanceCount: to.Ptr[int32](1), OSProfile: &armhdinsight.OsProfile{ LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ Password: to.Ptr("**********"), Username: to.Ptr("sshuser"), }, }, TargetInstanceCount: to.Ptr[int32](4), }}, }, OSType: to.Ptr(armhdinsight.OSTypeLinux), StorageProfile: &armhdinsight.StorageProfile{ Storageaccounts: []*armhdinsight.StorageAccount{ { Name: to.Ptr("mystorage.blob.core.windows.net"), Container: to.Ptr("containername"), IsDefault: to.Ptr(true), Key: to.Ptr("storageapikey*"), }}, }, Tier: to.Ptr(armhdinsight.TierStandard), }, Tags: map[string]*string{ "key1": to.Ptr("val1"), }, }, 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.Cluster = armhdinsight.Cluster{ // Name: to.Ptr("cluster1"), // Type: to.Ptr("Microsoft.HDInsight/clusters"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1"), // Location: to.Ptr("East US"), // Etag: to.Ptr("fdf2a6e8-ce83-42cc-8c2d-0ceb11a370ff"), // Properties: &armhdinsight.ClusterGetProperties{ // ClusterDefinition: &armhdinsight.ClusterDefinition{ // Blueprint: to.Ptr("https://blueprints.azurehdinsight.net/hadoop-4.0.1000.1.1910270459.json"), // ComponentVersion: map[string]*string{ // "Hadoop": to.Ptr("3.1"), // }, // Kind: to.Ptr("SPARK"), // }, // ClusterState: to.Ptr("Running"), // ClusterVersion: to.Ptr("4.0.1000.1"), // ComputeProfile: &armhdinsight.ComputeProfile{ // Roles: []*armhdinsight.Role{ // { // Name: to.Ptr("headnode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("standard_d12_v2"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("sshuser"), // }, // }, // TargetInstanceCount: to.Ptr[int32](2), // }, // { // Name: to.Ptr("workernode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("standard_d4_v2"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("sshuser"), // }, // }, // TargetInstanceCount: to.Ptr[int32](4), // }, // { // Name: to.Ptr("zookeepernode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("standard_a2_v2"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("sshuser"), // }, // }, // TargetInstanceCount: to.Ptr[int32](3), // }}, // }, // ConnectivityEndpoints: []*armhdinsight.ConnectivityEndpoint{ // { // Name: to.Ptr("SSH"), // Location: to.Ptr("cluster1-ssh.azurehdinsight.net"), // Port: to.Ptr[int32](22), // Protocol: to.Ptr("TCP"), // }, // { // Name: to.Ptr("HTTPS"), // Location: to.Ptr("cluster1.azurehdinsight.net"), // Port: to.Ptr[int32](443), // Protocol: to.Ptr("TCP"), // }}, // CreatedDate: to.Ptr("2019-11-18T12:25:43.48"), // OSType: to.Ptr(armhdinsight.OSTypeLinux), // ProvisioningState: to.Ptr(armhdinsight.HDInsightClusterProvisioningStateSucceeded), // QuotaInfo: &armhdinsight.QuotaInfo{ // CoresUsed: to.Ptr[int32](40), // }, // Tier: to.Ptr(armhdinsight.TierStandard), // }, // } }
Output:
func (*ClustersClient) BeginDelete ¶
func (client *ClustersClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginDeleteOptions) (*runtime.Poller[ClustersClientDeleteResponse], error)
BeginDelete - Deletes the specified HDInsight cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster.
- options - ClustersClientBeginDeleteOptions contains the optional parameters for the ClustersClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/DeleteLinuxHadoopCluster.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewClustersClient().BeginDelete(ctx, "rg1", "cluster1", 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 (*ClustersClient) BeginExecuteScriptActions ¶
func (client *ClustersClient) BeginExecuteScriptActions(ctx context.Context, resourceGroupName string, clusterName string, parameters ExecuteScriptActionParameters, options *ClustersClientBeginExecuteScriptActionsOptions) (*runtime.Poller[ClustersClientExecuteScriptActionsResponse], error)
BeginExecuteScriptActions - Executes script actions on the specified HDInsight cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster.
- parameters - The parameters for executing script actions.
- options - ClustersClientBeginExecuteScriptActionsOptions contains the optional parameters for the ClustersClient.BeginExecuteScriptActions method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/PostExecuteScriptAction.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/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewClustersClient().BeginExecuteScriptActions(ctx, "rg1", "cluster1", armhdinsight.ExecuteScriptActionParameters{ PersistOnSuccess: to.Ptr(false), ScriptActions: []*armhdinsight.RuntimeScriptAction{ { Name: to.Ptr("Test"), Parameters: to.Ptr(""), Roles: []*string{ to.Ptr("headnode"), to.Ptr("workernode")}, URI: to.Ptr("http://testurl.com/install.ssh"), }}, }, 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 (*ClustersClient) BeginResize ¶
func (client *ClustersClient) BeginResize(ctx context.Context, resourceGroupName string, clusterName string, roleName RoleName, parameters ClusterResizeParameters, options *ClustersClientBeginResizeOptions) (*runtime.Poller[ClustersClientResizeResponse], error)
BeginResize - Resizes the specified HDInsight cluster to the specified size. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster.
- roleName - The constant value for the roleName
- parameters - The parameters for the resize operation.
- options - ClustersClientBeginResizeOptions contains the optional parameters for the ClustersClient.BeginResize method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/ResizeLinuxHadoopCluster.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/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewClustersClient().BeginResize(ctx, "rg1", "cluster1", armhdinsight.RoleNameWorkernode, armhdinsight.ClusterResizeParameters{ TargetInstanceCount: to.Ptr[int32](10), }, 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 (*ClustersClient) BeginRotateDiskEncryptionKey ¶
func (client *ClustersClient) BeginRotateDiskEncryptionKey(ctx context.Context, resourceGroupName string, clusterName string, parameters ClusterDiskEncryptionParameters, options *ClustersClientBeginRotateDiskEncryptionKeyOptions) (*runtime.Poller[ClustersClientRotateDiskEncryptionKeyResponse], error)
BeginRotateDiskEncryptionKey - Rotate disk encryption key of the specified HDInsight cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster.
- parameters - The parameters for the disk encryption operation.
- options - ClustersClientBeginRotateDiskEncryptionKeyOptions contains the optional parameters for the ClustersClient.BeginRotateDiskEncryptionKey method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/RotateLinuxHadoopClusterDiskEncryptionKey.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/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewClustersClient().BeginRotateDiskEncryptionKey(ctx, "rg1", "cluster1", armhdinsight.ClusterDiskEncryptionParameters{ KeyName: to.Ptr("newkeyname"), KeyVersion: to.Ptr("newkeyversion"), VaultURI: to.Ptr("https://newkeyvault.vault.azure.net/"), }, 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 (*ClustersClient) BeginUpdateAutoScaleConfiguration ¶
func (client *ClustersClient) BeginUpdateAutoScaleConfiguration(ctx context.Context, resourceGroupName string, clusterName string, roleName RoleName, parameters AutoscaleConfigurationUpdateParameter, options *ClustersClientBeginUpdateAutoScaleConfigurationOptions) (*runtime.Poller[ClustersClientUpdateAutoScaleConfigurationResponse], error)
BeginUpdateAutoScaleConfiguration - Updates the Autoscale Configuration for HDInsight cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster.
- roleName - The constant value for the roleName
- parameters - The parameters for the update autoscale configuration operation.
- options - ClustersClientBeginUpdateAutoScaleConfigurationOptions contains the optional parameters for the ClustersClient.BeginUpdateAutoScaleConfiguration method.
Example (DisableAutoscaleForTheHdInsightCluster) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/DisableClusterAutoScale.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewClustersClient().BeginUpdateAutoScaleConfiguration(ctx, "rg1", "cluster1", armhdinsight.RoleNameWorkernode, armhdinsight.AutoscaleConfigurationUpdateParameter{}, 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:
Example (EnableOrUpdateAutoscaleWithTheLoadBasedConfigurationForHdInsightCluster) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/EnableOrUpdateAutoScaleWithLoadBasedConfiguration.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/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewClustersClient().BeginUpdateAutoScaleConfiguration(ctx, "rg1", "cluster1", armhdinsight.RoleNameWorkernode, armhdinsight.AutoscaleConfigurationUpdateParameter{ Autoscale: &armhdinsight.Autoscale{ Capacity: &armhdinsight.AutoscaleCapacity{ MaxInstanceCount: to.Ptr[int32](5), MinInstanceCount: to.Ptr[int32](3), }, }, }, 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:
Example (EnableOrUpdateAutoscaleWithTheScheduleBasedConfigurationForHdInsightCluster) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/EnableOrUpdateAutoScaleWithScheduleBasedConfiguration.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/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewClustersClient().BeginUpdateAutoScaleConfiguration(ctx, "rg1", "cluster1", armhdinsight.RoleNameWorkernode, armhdinsight.AutoscaleConfigurationUpdateParameter{ Autoscale: &armhdinsight.Autoscale{ Recurrence: &armhdinsight.AutoscaleRecurrence{ Schedule: []*armhdinsight.AutoscaleSchedule{ { Days: []*armhdinsight.DaysOfWeek{ to.Ptr(armhdinsight.DaysOfWeekThursday)}, TimeAndCapacity: &armhdinsight.AutoscaleTimeAndCapacity{ MaxInstanceCount: to.Ptr[int32](4), MinInstanceCount: to.Ptr[int32](4), Time: to.Ptr("16:00"), }, }}, TimeZone: to.Ptr("China Standard Time"), }, }, }, 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 (*ClustersClient) BeginUpdateGatewaySettings ¶
func (client *ClustersClient) BeginUpdateGatewaySettings(ctx context.Context, resourceGroupName string, clusterName string, parameters UpdateGatewaySettingsParameters, options *ClustersClientBeginUpdateGatewaySettingsOptions) (*runtime.Poller[ClustersClientUpdateGatewaySettingsResponse], error)
BeginUpdateGatewaySettings - Configures the gateway settings on the specified cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster.
- parameters - The cluster configurations.
- options - ClustersClientBeginUpdateGatewaySettingsOptions contains the optional parameters for the ClustersClient.BeginUpdateGatewaySettings method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/HDI_Clusters_UpdateGatewaySettings_Enable.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/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewClustersClient().BeginUpdateGatewaySettings(ctx, "rg1", "cluster1", armhdinsight.UpdateGatewaySettingsParameters{ IsCredentialEnabled: to.Ptr(true), Password: to.Ptr("**********"), UserName: to.Ptr("hadoop"), }, 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 (*ClustersClient) BeginUpdateIdentityCertificate ¶
func (client *ClustersClient) BeginUpdateIdentityCertificate(ctx context.Context, resourceGroupName string, clusterName string, parameters UpdateClusterIdentityCertificateParameters, options *ClustersClientBeginUpdateIdentityCertificateOptions) (*runtime.Poller[ClustersClientUpdateIdentityCertificateResponse], error)
BeginUpdateIdentityCertificate - Updates the cluster identity certificate. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster.
- parameters - The cluster configurations.
- options - ClustersClientBeginUpdateIdentityCertificateOptions contains the optional parameters for the ClustersClient.BeginUpdateIdentityCertificate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/HDI_Clusters_UpdateClusterIdentityCertificate.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/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewClustersClient().BeginUpdateIdentityCertificate(ctx, "rg1", "cluster1", armhdinsight.UpdateClusterIdentityCertificateParameters{ ApplicationID: to.Ptr("applicationId"), Certificate: to.Ptr("base64encodedcertificate"), CertificatePassword: to.Ptr("**********"), }, 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 (*ClustersClient) Get ¶
func (client *ClustersClient) Get(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientGetOptions) (ClustersClientGetResponse, error)
Get - Gets the specified cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster.
- options - ClustersClientGetOptions contains the optional parameters for the ClustersClient.Get method.
Example (GetHadoopOnLinuxCluster) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetLinuxHadoopCluster.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewClustersClient().Get(ctx, "rg1", "cluster1", 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.Cluster = armhdinsight.Cluster{ // Name: to.Ptr("cluster1"), // Type: to.Ptr("Microsoft.HDInsight/clusters"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // "key1": to.Ptr("val1"), // }, // Etag: to.Ptr("f0212a39-b827-45e0-9ffa-4f5232e58851"), // Properties: &armhdinsight.ClusterGetProperties{ // ClusterDefinition: &armhdinsight.ClusterDefinition{ // Blueprint: to.Ptr("https://blueprints.azurehdinsight.net/hadoop-3.5.1000.0.9243893.json"), // Kind: to.Ptr("hadoop"), // }, // ClusterState: to.Ptr("Running"), // ClusterVersion: to.Ptr("3.5.1000.0"), // ComputeProfile: &armhdinsight.ComputeProfile{ // Roles: []*armhdinsight.Role{ // { // Name: to.Ptr("headnode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("Standard_D3_V2"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("sshuser"), // }, // }, // TargetInstanceCount: to.Ptr[int32](2), // }, // { // Name: to.Ptr("workernode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("Standard_D3_V2"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("sshuser"), // }, // }, // TargetInstanceCount: to.Ptr[int32](4), // }, // { // Name: to.Ptr("zookeepernode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("Medium"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("sshuser"), // }, // }, // TargetInstanceCount: to.Ptr[int32](3), // }}, // }, // ConnectivityEndpoints: []*armhdinsight.ConnectivityEndpoint{ // { // Name: to.Ptr("SSH"), // Location: to.Ptr("cluster1-ssh.azurehdinsight.net"), // Port: to.Ptr[int32](22), // Protocol: to.Ptr("TCP"), // }, // { // Name: to.Ptr("HTTPS"), // Location: to.Ptr("cluster1.azurehdinsight.net"), // Port: to.Ptr[int32](443), // Protocol: to.Ptr("TCP"), // }}, // CreatedDate: to.Ptr("2017-01-11T18:58:26.187"), // OSType: to.Ptr(armhdinsight.OSTypeLinux), // ProvisioningState: to.Ptr(armhdinsight.HDInsightClusterProvisioningStateSucceeded), // QuotaInfo: &armhdinsight.QuotaInfo{ // CoresUsed: to.Ptr[int32](24), // }, // Tier: to.Ptr(armhdinsight.TierStandard), // }, // } }
Output:
Example (GetSparkOnLinuxCluster) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetLinuxSparkCluster.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewClustersClient().Get(ctx, "rg1", "cluster1", 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.Cluster = armhdinsight.Cluster{ // Name: to.Ptr("cluster1"), // Type: to.Ptr("Microsoft.HDInsight/clusters"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // "key1": to.Ptr("val1"), // }, // Etag: to.Ptr("4cd8b5a9-ca9c-4239-9e5b-3916032e994c"), // Properties: &armhdinsight.ClusterGetProperties{ // ClusterDefinition: &armhdinsight.ClusterDefinition{ // Blueprint: to.Ptr("https://blueprints.azurehdinsight.net/spark-3.5.1000.0.9625065.json"), // ComponentVersion: map[string]*string{ // "Spark": to.Ptr("2.0"), // }, // Kind: to.Ptr("SPARK"), // }, // ClusterState: to.Ptr("Running"), // ClusterVersion: to.Ptr("3.5.1000.0"), // ComputeProfile: &armhdinsight.ComputeProfile{ // Roles: []*armhdinsight.Role{ // { // Name: to.Ptr("headnode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("Standard_D12_V2"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("sshuser"), // }, // }, // TargetInstanceCount: to.Ptr[int32](2), // }, // { // Name: to.Ptr("workernode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("Standard_D4_V2"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("sshuser"), // }, // }, // TargetInstanceCount: to.Ptr[int32](4), // }, // { // Name: to.Ptr("zookeepernode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("Medium"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("sshuser"), // }, // }, // TargetInstanceCount: to.Ptr[int32](3), // }}, // }, // ConnectivityEndpoints: []*armhdinsight.ConnectivityEndpoint{ // { // Name: to.Ptr("SSH"), // Location: to.Ptr("cluster1-ssh.azurehdinsight.net"), // Port: to.Ptr[int32](22), // Protocol: to.Ptr("TCP"), // }, // { // Name: to.Ptr("HTTPS"), // Location: to.Ptr("cluster1.azurehdinsight.net"), // Port: to.Ptr[int32](443), // Protocol: to.Ptr("TCP"), // }}, // CreatedDate: to.Ptr("2017-03-03T08:35:07.323"), // OSType: to.Ptr(armhdinsight.OSTypeLinux), // ProvisioningState: to.Ptr(armhdinsight.HDInsightClusterProvisioningStateSucceeded), // QuotaInfo: &armhdinsight.QuotaInfo{ // CoresUsed: to.Ptr[int32](40), // }, // Tier: to.Ptr(armhdinsight.TierStandard), // }, // } }
Output:
func (*ClustersClient) GetAzureAsyncOperationStatus ¶
func (client *ClustersClient) GetAzureAsyncOperationStatus(ctx context.Context, resourceGroupName string, clusterName string, operationID string, options *ClustersClientGetAzureAsyncOperationStatusOptions) (ClustersClientGetAzureAsyncOperationStatusResponse, error)
GetAzureAsyncOperationStatus - The the async operation status. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster.
- operationID - The long running operation id.
- options - ClustersClientGetAzureAsyncOperationStatusOptions contains the optional parameters for the ClustersClient.GetAzureAsyncOperationStatus method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetClusterCreatingAsyncOperationStatus.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewClustersClient().GetAzureAsyncOperationStatus(ctx, "rg1", "cluster1", "CF938302-6B4D-44A0-A6D2-C0D67E847AEC", 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 = armhdinsight.AsyncOperationResult{ // Status: to.Ptr(armhdinsight.AsyncOperationStateInProgress), // } }
Output:
func (*ClustersClient) GetGatewaySettings ¶
func (client *ClustersClient) GetGatewaySettings(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientGetGatewaySettingsOptions) (ClustersClientGetGatewaySettingsResponse, error)
GetGatewaySettings - Gets the gateway settings for the specified cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster.
- options - ClustersClientGetGatewaySettingsOptions contains the optional parameters for the ClustersClient.GetGatewaySettings method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/HDI_Clusters_GetGatewaySettings.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewClustersClient().GetGatewaySettings(ctx, "rg1", "cluster1", 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.GatewaySettings = armhdinsight.GatewaySettings{ // IsCredentialEnabled: to.Ptr("true"), // Password: to.Ptr("**********"), // UserName: to.Ptr("hadoop"), // } }
Output:
func (*ClustersClient) NewListByResourceGroupPager ¶ added in v0.4.0
func (client *ClustersClient) NewListByResourceGroupPager(resourceGroupName string, options *ClustersClientListByResourceGroupOptions) *runtime.Pager[ClustersClientListByResourceGroupResponse]
NewListByResourceGroupPager - Lists the HDInsight clusters in a resource group.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- options - ClustersClientListByResourceGroupOptions contains the optional parameters for the ClustersClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetLinuxHadoopAllClustersInResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewClustersClient().NewListByResourceGroupPager("rg1", 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.ClusterListResult = armhdinsight.ClusterListResult{ // Value: []*armhdinsight.Cluster{ // { // Name: to.Ptr("cluster1"), // Type: to.Ptr("Microsoft.HDInsight/clusters"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // "key1": to.Ptr("val1"), // }, // Etag: to.Ptr("f0212a39-b827-45e0-9ffa-4f5232e58851"), // Properties: &armhdinsight.ClusterGetProperties{ // ClusterDefinition: &armhdinsight.ClusterDefinition{ // Blueprint: to.Ptr("https://blueprints.azurehdinsight.net/hadoop-3.5.1000.0.9243893.json"), // Kind: to.Ptr("hadoop"), // }, // ClusterState: to.Ptr("Running"), // ClusterVersion: to.Ptr("3.5.1000.0"), // ComputeProfile: &armhdinsight.ComputeProfile{ // Roles: []*armhdinsight.Role{ // { // Name: to.Ptr("headnode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("Standard_D3_V2"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("pulkitssh"), // }, // }, // TargetInstanceCount: to.Ptr[int32](2), // }, // { // Name: to.Ptr("workernode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("Standard_D3_V2"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("pulkitssh"), // }, // }, // TargetInstanceCount: to.Ptr[int32](4), // }, // { // Name: to.Ptr("zookeepernode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("Medium"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("pulkitssh"), // }, // }, // TargetInstanceCount: to.Ptr[int32](3), // }}, // }, // ConnectivityEndpoints: []*armhdinsight.ConnectivityEndpoint{ // { // Name: to.Ptr("SSH"), // Location: to.Ptr("cluster1-ssh.azurehdinsight.net"), // Port: to.Ptr[int32](22), // Protocol: to.Ptr("TCP"), // }, // { // Name: to.Ptr("HTTPS"), // Location: to.Ptr("cluster1.azurehdinsight.net"), // Port: to.Ptr[int32](443), // Protocol: to.Ptr("TCP"), // }}, // CreatedDate: to.Ptr("2017-01-11T18:58:26.187"), // OSType: to.Ptr(armhdinsight.OSTypeLinux), // ProvisioningState: to.Ptr(armhdinsight.HDInsightClusterProvisioningStateSucceeded), // QuotaInfo: &armhdinsight.QuotaInfo{ // CoresUsed: to.Ptr[int32](24), // }, // Tier: to.Ptr(armhdinsight.TierStandard), // }, // }, // { // Name: to.Ptr("cluster2"), // Type: to.Ptr("Microsoft.HDInsight/clusters"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster2"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // "key1": to.Ptr("val1"), // }, // Etag: to.Ptr("f0212a39-b827-45e0-9ffa-4f5232e58851"), // Properties: &armhdinsight.ClusterGetProperties{ // ClusterDefinition: &armhdinsight.ClusterDefinition{ // Blueprint: to.Ptr("https://blueprints.azurehdinsight.net/hadoop-3.5.1000.0.9243893.json"), // Kind: to.Ptr("hadoop"), // }, // ClusterState: to.Ptr("Running"), // ClusterVersion: to.Ptr("3.5.1000.0"), // ComputeProfile: &armhdinsight.ComputeProfile{ // Roles: []*armhdinsight.Role{ // { // Name: to.Ptr("headnode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("Standard_D3_V2"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("pulkitssh"), // }, // }, // TargetInstanceCount: to.Ptr[int32](2), // }, // { // Name: to.Ptr("workernode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("Standard_D3_V2"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("pulkitssh"), // }, // }, // TargetInstanceCount: to.Ptr[int32](4), // }, // { // Name: to.Ptr("zookeepernode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("Medium"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("pulkitssh"), // }, // }, // TargetInstanceCount: to.Ptr[int32](3), // }}, // }, // ConnectivityEndpoints: []*armhdinsight.ConnectivityEndpoint{ // { // Name: to.Ptr("SSH"), // Location: to.Ptr("cluster2-ssh.azurehdinsight.net"), // Port: to.Ptr[int32](22), // Protocol: to.Ptr("TCP"), // }, // { // Name: to.Ptr("HTTPS"), // Location: to.Ptr("cluster2.azurehdinsight.net"), // Port: to.Ptr[int32](443), // Protocol: to.Ptr("TCP"), // }}, // CreatedDate: to.Ptr("2017-01-11T18:58:26.187"), // OSType: to.Ptr(armhdinsight.OSTypeLinux), // ProvisioningState: to.Ptr(armhdinsight.HDInsightClusterProvisioningStateSucceeded), // QuotaInfo: &armhdinsight.QuotaInfo{ // CoresUsed: to.Ptr[int32](24), // }, // Tier: to.Ptr(armhdinsight.TierStandard), // }, // }}, // } } }
Output:
func (*ClustersClient) NewListPager ¶ added in v0.4.0
func (client *ClustersClient) NewListPager(options *ClustersClientListOptions) *runtime.Pager[ClustersClientListResponse]
NewListPager - Lists all the HDInsight clusters under the subscription.
Generated from API version 2021-06-01
- options - ClustersClientListOptions contains the optional parameters for the ClustersClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetLinuxHadoopAllClusters.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewClustersClient().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.ClusterListResult = armhdinsight.ClusterListResult{ // Value: []*armhdinsight.Cluster{ // { // Name: to.Ptr("cluster1"), // Type: to.Ptr("Microsoft.HDInsight/clusters"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // "key1": to.Ptr("val1"), // }, // Etag: to.Ptr("f0212a39-b827-45e0-9ffa-4f5232e58851"), // Properties: &armhdinsight.ClusterGetProperties{ // ClusterDefinition: &armhdinsight.ClusterDefinition{ // Blueprint: to.Ptr("https://blueprints.azurehdinsight.net/hadoop-3.5.1000.0.9243893.json"), // Kind: to.Ptr("hadoop"), // }, // ClusterState: to.Ptr("Running"), // ClusterVersion: to.Ptr("3.5.1000.0"), // ComputeProfile: &armhdinsight.ComputeProfile{ // Roles: []*armhdinsight.Role{ // { // Name: to.Ptr("headnode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("Standard_D3_V2"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("pulkitssh"), // }, // }, // TargetInstanceCount: to.Ptr[int32](2), // }, // { // Name: to.Ptr("workernode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("Standard_D3_V2"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("pulkitssh"), // }, // }, // TargetInstanceCount: to.Ptr[int32](4), // }, // { // Name: to.Ptr("zookeepernode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("Medium"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("pulkitssh"), // }, // }, // TargetInstanceCount: to.Ptr[int32](3), // }}, // }, // ConnectivityEndpoints: []*armhdinsight.ConnectivityEndpoint{ // { // Name: to.Ptr("SSH"), // Location: to.Ptr("cluster1-ssh.azurehdinsight.net"), // Port: to.Ptr[int32](22), // Protocol: to.Ptr("TCP"), // }, // { // Name: to.Ptr("HTTPS"), // Location: to.Ptr("cluster1.azurehdinsight.net"), // Port: to.Ptr[int32](443), // Protocol: to.Ptr("TCP"), // }}, // CreatedDate: to.Ptr("2017-01-11T18:58:26.187"), // OSType: to.Ptr(armhdinsight.OSTypeLinux), // ProvisioningState: to.Ptr(armhdinsight.HDInsightClusterProvisioningStateSucceeded), // QuotaInfo: &armhdinsight.QuotaInfo{ // CoresUsed: to.Ptr[int32](24), // }, // Tier: to.Ptr(armhdinsight.TierStandard), // }, // }, // { // Name: to.Ptr("cluster2"), // Type: to.Ptr("Microsoft.HDInsight/clusters"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster2"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // "key1": to.Ptr("val1"), // }, // Etag: to.Ptr("f0212a39-b827-45e0-9ffa-4f5232e58851"), // Properties: &armhdinsight.ClusterGetProperties{ // ClusterDefinition: &armhdinsight.ClusterDefinition{ // Blueprint: to.Ptr("https://blueprints.azurehdinsight.net/hadoop-3.5.1000.0.9243893.json"), // Kind: to.Ptr("hadoop"), // }, // ClusterState: to.Ptr("Running"), // ClusterVersion: to.Ptr("3.5.1000.0"), // ComputeProfile: &armhdinsight.ComputeProfile{ // Roles: []*armhdinsight.Role{ // { // Name: to.Ptr("headnode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("Standard_D3_V2"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("pulkitssh"), // }, // }, // TargetInstanceCount: to.Ptr[int32](2), // }, // { // Name: to.Ptr("workernode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("Standard_D3_V2"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("pulkitssh"), // }, // }, // TargetInstanceCount: to.Ptr[int32](4), // }, // { // Name: to.Ptr("zookeepernode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("Medium"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("pulkitssh"), // }, // }, // TargetInstanceCount: to.Ptr[int32](3), // }}, // }, // ConnectivityEndpoints: []*armhdinsight.ConnectivityEndpoint{ // { // Name: to.Ptr("SSH"), // Location: to.Ptr("cluster2-ssh.azurehdinsight.net"), // Port: to.Ptr[int32](22), // Protocol: to.Ptr("TCP"), // }, // { // Name: to.Ptr("HTTPS"), // Location: to.Ptr("cluster2.azurehdinsight.net"), // Port: to.Ptr[int32](443), // Protocol: to.Ptr("TCP"), // }}, // CreatedDate: to.Ptr("2017-01-11T18:58:26.187"), // OSType: to.Ptr(armhdinsight.OSTypeLinux), // ProvisioningState: to.Ptr(armhdinsight.HDInsightClusterProvisioningStateSucceeded), // QuotaInfo: &armhdinsight.QuotaInfo{ // CoresUsed: to.Ptr[int32](24), // }, // Tier: to.Ptr(armhdinsight.TierStandard), // }, // }}, // } } }
Output:
func (*ClustersClient) Update ¶
func (client *ClustersClient) Update(ctx context.Context, resourceGroupName string, clusterName string, parameters ClusterPatchParameters, options *ClustersClientUpdateOptions) (ClustersClientUpdateResponse, error)
Update - Patch HDInsight cluster with the specified parameters. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster.
- parameters - The cluster patch request.
- options - ClustersClientUpdateOptions contains the optional parameters for the ClustersClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/PatchLinuxHadoopCluster.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/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewClustersClient().Update(ctx, "rg1", "cluster1", armhdinsight.ClusterPatchParameters{ Tags: map[string]*string{ "key1": to.Ptr("val1"), "key2": to.Ptr("val2"), }, }, 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.Cluster = armhdinsight.Cluster{ // Name: to.Ptr("cluster1"), // Type: to.Ptr("Microsoft.HDInsight/clusters"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // "key1": to.Ptr("val1"), // "key2": to.Ptr("val2"), // }, // Etag: to.Ptr("f0212a39-b827-45e0-9ffa-4f5232e58851"), // Properties: &armhdinsight.ClusterGetProperties{ // ClusterDefinition: &armhdinsight.ClusterDefinition{ // Blueprint: to.Ptr("https://blueprints.azurehdinsight.net/hadoop-3.5.1000.0.9243893.json"), // Kind: to.Ptr("hadoop"), // }, // ClusterState: to.Ptr("Running"), // ClusterVersion: to.Ptr("3.5.1000.0"), // ComputeProfile: &armhdinsight.ComputeProfile{ // Roles: []*armhdinsight.Role{ // { // Name: to.Ptr("headnode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("Standard_D3_V2"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("sshuser"), // }, // }, // TargetInstanceCount: to.Ptr[int32](2), // }, // { // Name: to.Ptr("workernode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("Standard_D3_V2"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("sshuser"), // }, // }, // TargetInstanceCount: to.Ptr[int32](4), // }, // { // Name: to.Ptr("zookeepernode"), // HardwareProfile: &armhdinsight.HardwareProfile{ // VMSize: to.Ptr("Medium"), // }, // OSProfile: &armhdinsight.OsProfile{ // LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ // Username: to.Ptr("sshuser"), // }, // }, // TargetInstanceCount: to.Ptr[int32](3), // }}, // }, // ConnectivityEndpoints: []*armhdinsight.ConnectivityEndpoint{ // { // Name: to.Ptr("SSH"), // Location: to.Ptr("cluster1-ssh.azurehdinsight.net"), // Port: to.Ptr[int32](22), // Protocol: to.Ptr("TCP"), // }, // { // Name: to.Ptr("HTTPS"), // Location: to.Ptr("cluster1.azurehdinsight.net"), // Port: to.Ptr[int32](443), // Protocol: to.Ptr("TCP"), // }}, // CreatedDate: to.Ptr("2017-01-11T18:58:26.187"), // OSType: to.Ptr(armhdinsight.OSTypeLinux), // ProvisioningState: to.Ptr(armhdinsight.HDInsightClusterProvisioningStateSucceeded), // QuotaInfo: &armhdinsight.QuotaInfo{ // CoresUsed: to.Ptr[int32](24), // }, // Tier: to.Ptr(armhdinsight.TierStandard), // }, // } }
Output:
type ClustersClientBeginCreateOptions ¶ added in v0.2.0
type ClustersClientBeginCreateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ClustersClientBeginCreateOptions contains the optional parameters for the ClustersClient.BeginCreate method.
type ClustersClientBeginDeleteOptions ¶ added in v0.2.0
type ClustersClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ClustersClientBeginDeleteOptions contains the optional parameters for the ClustersClient.BeginDelete method.
type ClustersClientBeginExecuteScriptActionsOptions ¶ added in v0.2.0
type ClustersClientBeginExecuteScriptActionsOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ClustersClientBeginExecuteScriptActionsOptions contains the optional parameters for the ClustersClient.BeginExecuteScriptActions method.
type ClustersClientBeginResizeOptions ¶ added in v0.2.0
type ClustersClientBeginResizeOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ClustersClientBeginResizeOptions contains the optional parameters for the ClustersClient.BeginResize method.
type ClustersClientBeginRotateDiskEncryptionKeyOptions ¶ added in v0.2.0
type ClustersClientBeginRotateDiskEncryptionKeyOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ClustersClientBeginRotateDiskEncryptionKeyOptions contains the optional parameters for the ClustersClient.BeginRotateDiskEncryptionKey method.
type ClustersClientBeginUpdateAutoScaleConfigurationOptions ¶ added in v0.2.0
type ClustersClientBeginUpdateAutoScaleConfigurationOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ClustersClientBeginUpdateAutoScaleConfigurationOptions contains the optional parameters for the ClustersClient.BeginUpdateAutoScaleConfiguration method.
type ClustersClientBeginUpdateGatewaySettingsOptions ¶ added in v0.2.0
type ClustersClientBeginUpdateGatewaySettingsOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ClustersClientBeginUpdateGatewaySettingsOptions contains the optional parameters for the ClustersClient.BeginUpdateGatewaySettings method.
type ClustersClientBeginUpdateIdentityCertificateOptions ¶ added in v0.2.0
type ClustersClientBeginUpdateIdentityCertificateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ClustersClientBeginUpdateIdentityCertificateOptions contains the optional parameters for the ClustersClient.BeginUpdateIdentityCertificate method.
type ClustersClientCreateResponse ¶ added in v0.2.0
type ClustersClientCreateResponse struct { // The HDInsight cluster. Cluster }
ClustersClientCreateResponse contains the response from method ClustersClient.BeginCreate.
type ClustersClientDeleteResponse ¶ added in v0.2.0
type ClustersClientDeleteResponse struct { }
ClustersClientDeleteResponse contains the response from method ClustersClient.BeginDelete.
type ClustersClientExecuteScriptActionsResponse ¶ added in v0.2.0
type ClustersClientExecuteScriptActionsResponse struct { }
ClustersClientExecuteScriptActionsResponse contains the response from method ClustersClient.BeginExecuteScriptActions.
type ClustersClientGetAzureAsyncOperationStatusOptions ¶ added in v0.2.0
type ClustersClientGetAzureAsyncOperationStatusOptions struct { }
ClustersClientGetAzureAsyncOperationStatusOptions contains the optional parameters for the ClustersClient.GetAzureAsyncOperationStatus method.
type ClustersClientGetAzureAsyncOperationStatusResponse ¶ added in v0.2.0
type ClustersClientGetAzureAsyncOperationStatusResponse struct { // The azure async operation response. AsyncOperationResult }
ClustersClientGetAzureAsyncOperationStatusResponse contains the response from method ClustersClient.GetAzureAsyncOperationStatus.
type ClustersClientGetGatewaySettingsOptions ¶ added in v0.2.0
type ClustersClientGetGatewaySettingsOptions struct { }
ClustersClientGetGatewaySettingsOptions contains the optional parameters for the ClustersClient.GetGatewaySettings method.
type ClustersClientGetGatewaySettingsResponse ¶ added in v0.2.0
type ClustersClientGetGatewaySettingsResponse struct { // Gateway settings. GatewaySettings }
ClustersClientGetGatewaySettingsResponse contains the response from method ClustersClient.GetGatewaySettings.
type ClustersClientGetOptions ¶ added in v0.2.0
type ClustersClientGetOptions struct { }
ClustersClientGetOptions contains the optional parameters for the ClustersClient.Get method.
type ClustersClientGetResponse ¶ added in v0.2.0
type ClustersClientGetResponse struct { // The HDInsight cluster. Cluster }
ClustersClientGetResponse contains the response from method ClustersClient.Get.
type ClustersClientListByResourceGroupOptions ¶ added in v0.2.0
type ClustersClientListByResourceGroupOptions struct { }
ClustersClientListByResourceGroupOptions contains the optional parameters for the ClustersClient.NewListByResourceGroupPager method.
type ClustersClientListByResourceGroupResponse ¶ added in v0.2.0
type ClustersClientListByResourceGroupResponse struct { // The List Cluster operation response. ClusterListResult }
ClustersClientListByResourceGroupResponse contains the response from method ClustersClient.NewListByResourceGroupPager.
type ClustersClientListOptions ¶ added in v0.2.0
type ClustersClientListOptions struct { }
ClustersClientListOptions contains the optional parameters for the ClustersClient.NewListPager method.
type ClustersClientListResponse ¶ added in v0.2.0
type ClustersClientListResponse struct { // The List Cluster operation response. ClusterListResult }
ClustersClientListResponse contains the response from method ClustersClient.NewListPager.
type ClustersClientResizeResponse ¶ added in v0.2.0
type ClustersClientResizeResponse struct { }
ClustersClientResizeResponse contains the response from method ClustersClient.BeginResize.
type ClustersClientRotateDiskEncryptionKeyResponse ¶ added in v0.2.0
type ClustersClientRotateDiskEncryptionKeyResponse struct { }
ClustersClientRotateDiskEncryptionKeyResponse contains the response from method ClustersClient.BeginRotateDiskEncryptionKey.
type ClustersClientUpdateAutoScaleConfigurationResponse ¶ added in v0.2.0
type ClustersClientUpdateAutoScaleConfigurationResponse struct { }
ClustersClientUpdateAutoScaleConfigurationResponse contains the response from method ClustersClient.BeginUpdateAutoScaleConfiguration.
type ClustersClientUpdateGatewaySettingsResponse ¶ added in v0.2.0
type ClustersClientUpdateGatewaySettingsResponse struct { }
ClustersClientUpdateGatewaySettingsResponse contains the response from method ClustersClient.BeginUpdateGatewaySettings.
type ClustersClientUpdateIdentityCertificateResponse ¶ added in v0.2.0
type ClustersClientUpdateIdentityCertificateResponse struct { }
ClustersClientUpdateIdentityCertificateResponse contains the response from method ClustersClient.BeginUpdateIdentityCertificate.
type ClustersClientUpdateOptions ¶ added in v0.2.0
type ClustersClientUpdateOptions struct { }
ClustersClientUpdateOptions contains the optional parameters for the ClustersClient.Update method.
type ClustersClientUpdateResponse ¶ added in v0.2.0
type ClustersClientUpdateResponse struct { // The HDInsight cluster. Cluster }
ClustersClientUpdateResponse contains the response from method ClustersClient.Update.
type ComputeIsolationProperties ¶
type ComputeIsolationProperties struct { // The flag indicates whether enable compute isolation or not. EnableComputeIsolation *bool // The host sku. HostSKU *string }
ComputeIsolationProperties - The compute isolation properties.
func (ComputeIsolationProperties) MarshalJSON ¶ added in v1.1.0
func (c ComputeIsolationProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ComputeIsolationProperties.
func (*ComputeIsolationProperties) UnmarshalJSON ¶ added in v1.1.0
func (c *ComputeIsolationProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ComputeIsolationProperties.
type ComputeProfile ¶
type ComputeProfile struct { // The list of roles in the cluster. Roles []*Role }
ComputeProfile - Describes the compute profile.
func (ComputeProfile) MarshalJSON ¶
func (c ComputeProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ComputeProfile.
func (*ComputeProfile) UnmarshalJSON ¶ added in v1.1.0
func (c *ComputeProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ComputeProfile.
type ConfigurationsClient ¶
type ConfigurationsClient struct {
// contains filtered or unexported fields
}
ConfigurationsClient contains the methods for the Configurations group. Don't use this type directly, use NewConfigurationsClient() instead.
func NewConfigurationsClient ¶
func NewConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConfigurationsClient, error)
NewConfigurationsClient creates a new instance of ConfigurationsClient with the specified values.
- subscriptionID - The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ConfigurationsClient) BeginUpdate ¶
func (client *ConfigurationsClient) BeginUpdate(ctx context.Context, resourceGroupName string, clusterName string, configurationName string, parameters map[string]*string, options *ConfigurationsClientBeginUpdateOptions) (*runtime.Poller[ConfigurationsClientUpdateResponse], error)
BeginUpdate - Configures the HTTP settings on the specified cluster. This API is deprecated, please use UpdateGatewaySettings in cluster endpoint instead. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster.
- configurationName - The name of the cluster configuration.
- parameters - The cluster configurations.
- options - ConfigurationsClientBeginUpdateOptions contains the optional parameters for the ConfigurationsClient.BeginUpdate method.
Example (DisableHttpConnectivity) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/ChangeHttpConnectivityDisable.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/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewConfigurationsClient().BeginUpdate(ctx, "rg1", "cluster1", "gateway", map[string]*string{ "restAuthCredential.isEnabled": to.Ptr("false"), }, 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:
Example (EnableHttpConnectivity) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/ChangeHttpConnectivityEnable.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/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewConfigurationsClient().BeginUpdate(ctx, "rg1", "cluster1", "gateway", map[string]*string{ "restAuthCredential.isEnabled": to.Ptr("true"), "restAuthCredential.password": to.Ptr("**********"), "restAuthCredential.username": to.Ptr("hadoop"), }, 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 (*ConfigurationsClient) Get ¶
func (client *ConfigurationsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, configurationName string, options *ConfigurationsClientGetOptions) (ConfigurationsClientGetResponse, error)
Get - The configuration object for the specified cluster. This API is not recommended and might be removed in the future. Please consider using List configurations API instead. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster.
- configurationName - The name of the cluster configuration.
- options - ConfigurationsClientGetOptions contains the optional parameters for the ConfigurationsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/HDI_Configurations_Get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewConfigurationsClient().Get(ctx, "rg1", "cluster1", "core-site", 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.Value = map[string]*string{ // "fs.azure.account.key.test.blob.core.windows.net": to.Ptr("accountKey"), // "fs.defaultFS": to.Ptr("wasb://test.blob.core.windows.net"), // } }
Output:
func (*ConfigurationsClient) List ¶
func (client *ConfigurationsClient) List(ctx context.Context, resourceGroupName string, clusterName string, options *ConfigurationsClientListOptions) (ConfigurationsClientListResponse, error)
List - Gets all configuration information for an HDI cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster.
- options - ConfigurationsClientListOptions contains the optional parameters for the ConfigurationsClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/HDI_Configurations_List.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewConfigurationsClient().List(ctx, "rg1", "cluster1", 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.ClusterConfigurations = armhdinsight.ClusterConfigurations{ // Configurations: map[string]map[string]*string{ // "core-site": map[string]*string{ // "fs.azure.account.key.test.blob.core.windows.net": to.Ptr("accountKey"), // "fs.defaultFS": to.Ptr("wasb://test.blob.core.windows.net"), // }, // "gateway": map[string]*string{ // "restAuthCredential.isEnabled": to.Ptr("true"), // "restAuthCredential.password": to.Ptr("**********"), // "restAuthCredential.username": to.Ptr("admin"), // }, // }, // } }
Output:
type ConfigurationsClientBeginUpdateOptions ¶ added in v0.2.0
type ConfigurationsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ConfigurationsClientBeginUpdateOptions contains the optional parameters for the ConfigurationsClient.BeginUpdate method.
type ConfigurationsClientGetOptions ¶ added in v0.2.0
type ConfigurationsClientGetOptions struct { }
ConfigurationsClientGetOptions contains the optional parameters for the ConfigurationsClient.Get method.
type ConfigurationsClientGetResponse ¶ added in v0.2.0
type ConfigurationsClientGetResponse struct { // The configuration object for the specified configuration for the specified cluster. Value map[string]*string }
ConfigurationsClientGetResponse contains the response from method ConfigurationsClient.Get.
type ConfigurationsClientListOptions ¶ added in v0.2.0
type ConfigurationsClientListOptions struct { }
ConfigurationsClientListOptions contains the optional parameters for the ConfigurationsClient.List method.
type ConfigurationsClientListResponse ¶ added in v0.2.0
type ConfigurationsClientListResponse struct { // The configuration object for the specified cluster. ClusterConfigurations }
ConfigurationsClientListResponse contains the response from method ConfigurationsClient.List.
type ConfigurationsClientUpdateResponse ¶ added in v0.2.0
type ConfigurationsClientUpdateResponse struct { }
ConfigurationsClientUpdateResponse contains the response from method ConfigurationsClient.BeginUpdate.
type ConnectivityEndpoint ¶
type ConnectivityEndpoint struct { // The location of the endpoint. Location *string // The name of the endpoint. Name *string // The port to connect to. Port *int32 // The private ip address of the endpoint. PrivateIPAddress *string // The protocol of the endpoint. Protocol *string }
ConnectivityEndpoint - The connectivity properties
func (ConnectivityEndpoint) MarshalJSON ¶ added in v1.1.0
func (c ConnectivityEndpoint) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ConnectivityEndpoint.
func (*ConnectivityEndpoint) UnmarshalJSON ¶ added in v1.1.0
func (c *ConnectivityEndpoint) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ConnectivityEndpoint.
type CreatedByType ¶
type CreatedByType string
CreatedByType - The type of identity that created the resource.
const ( CreatedByTypeApplication CreatedByType = "Application" CreatedByTypeKey CreatedByType = "Key" CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" CreatedByTypeUser CreatedByType = "User" )
func PossibleCreatedByTypeValues ¶
func PossibleCreatedByTypeValues() []CreatedByType
PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.
type DataDisksGroups ¶
type DataDisksGroups struct { // The number of disks per node. DisksPerNode *int32 // READ-ONLY; ReadOnly. The DiskSize in GB. Do not set this value. DiskSizeGB *int32 // READ-ONLY; ReadOnly. The storage account type. Do not set this value. StorageAccountType *string }
DataDisksGroups - The data disks groups for the role.
func (DataDisksGroups) MarshalJSON ¶ added in v1.1.0
func (d DataDisksGroups) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DataDisksGroups.
func (*DataDisksGroups) UnmarshalJSON ¶ added in v1.1.0
func (d *DataDisksGroups) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DataDisksGroups.
type DaysOfWeek ¶
type DaysOfWeek string
const ( DaysOfWeekFriday DaysOfWeek = "Friday" DaysOfWeekMonday DaysOfWeek = "Monday" DaysOfWeekSaturday DaysOfWeek = "Saturday" DaysOfWeekSunday DaysOfWeek = "Sunday" DaysOfWeekThursday DaysOfWeek = "Thursday" DaysOfWeekTuesday DaysOfWeek = "Tuesday" DaysOfWeekWednesday DaysOfWeek = "Wednesday" )
func PossibleDaysOfWeekValues ¶
func PossibleDaysOfWeekValues() []DaysOfWeek
PossibleDaysOfWeekValues returns the possible values for the DaysOfWeek const type.
type Dimension ¶
type Dimension struct { // The display name of the dimension. DisplayName *string // The display name of the dimension. InternalName *string // The name of the dimension. Name *string // The flag indicates whether the metric will be exported for shoebox or not. ToBeExportedForShoebox *bool }
Dimension - The definition of Dimension.
func (Dimension) MarshalJSON ¶ added in v1.1.0
MarshalJSON implements the json.Marshaller interface for type Dimension.
func (*Dimension) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Dimension.
type DirectoryType ¶
type DirectoryType string
DirectoryType - The directory type.
const (
DirectoryTypeActiveDirectory DirectoryType = "ActiveDirectory"
)
func PossibleDirectoryTypeValues ¶
func PossibleDirectoryTypeValues() []DirectoryType
PossibleDirectoryTypeValues returns the possible values for the DirectoryType const type.
type DiskBillingMeters ¶
type DiskBillingMeters struct { // The managed disk meter guid. DiskRpMeter *string // The managed disk billing sku, P30 or S30. SKU *string // The managed disk billing tier, Standard or Premium. Tier *Tier }
DiskBillingMeters - The disk billing meters.
func (DiskBillingMeters) MarshalJSON ¶ added in v1.1.0
func (d DiskBillingMeters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DiskBillingMeters.
func (*DiskBillingMeters) UnmarshalJSON ¶ added in v1.1.0
func (d *DiskBillingMeters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DiskBillingMeters.
type DiskEncryptionProperties ¶
type DiskEncryptionProperties struct { // Algorithm identifier for encryption, default RSA-OAEP. EncryptionAlgorithm *JSONWebKeyEncryptionAlgorithm // Indicates whether or not resource disk encryption is enabled. EncryptionAtHost *bool // Key name that is used for enabling disk encryption. KeyName *string // Specific key version that is used for enabling disk encryption. KeyVersion *string // Resource ID of Managed Identity that is used to access the key vault. MsiResourceID *string // Base key vault URI where the customers key is located eg. https://myvault.vault.azure.net VaultURI *string }
DiskEncryptionProperties - The disk encryption properties
func (DiskEncryptionProperties) MarshalJSON ¶ added in v1.1.0
func (d DiskEncryptionProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DiskEncryptionProperties.
func (*DiskEncryptionProperties) UnmarshalJSON ¶ added in v1.1.0
func (d *DiskEncryptionProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DiskEncryptionProperties.
type EncryptionInTransitProperties ¶
type EncryptionInTransitProperties struct { // Indicates whether or not inter cluster node communication is encrypted in transit. IsEncryptionInTransitEnabled *bool }
EncryptionInTransitProperties - The encryption-in-transit properties.
func (EncryptionInTransitProperties) MarshalJSON ¶ added in v1.1.0
func (e EncryptionInTransitProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EncryptionInTransitProperties.
func (*EncryptionInTransitProperties) UnmarshalJSON ¶ added in v1.1.0
func (e *EncryptionInTransitProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionInTransitProperties.
type ErrorResponse ¶
type ErrorResponse struct { // Error code Code *string // Error message indicating why the operation failed. Message *string }
ErrorResponse - Describes the format of Error response.
func (ErrorResponse) MarshalJSON ¶ added in v1.1.0
func (e ErrorResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorResponse.
func (*ErrorResponse) UnmarshalJSON ¶ added in v1.1.0
func (e *ErrorResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse.
type Errors ¶
Errors - The error message associated with the cluster creation.
func (Errors) MarshalJSON ¶ added in v1.1.0
MarshalJSON implements the json.Marshaller interface for type Errors.
func (*Errors) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Errors.
type ExcludedServicesConfig ¶
type ExcludedServicesConfig struct { // The config id of excluded services. ExcludedServicesConfigID *string // The list of excluded services. ExcludedServicesList *string }
ExcludedServicesConfig - The configuration that services will be excluded when creating cluster.
func (ExcludedServicesConfig) MarshalJSON ¶ added in v1.1.0
func (e ExcludedServicesConfig) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ExcludedServicesConfig.
func (*ExcludedServicesConfig) UnmarshalJSON ¶ added in v1.1.0
func (e *ExcludedServicesConfig) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ExcludedServicesConfig.
type ExecuteScriptActionParameters ¶
type ExecuteScriptActionParameters struct { // REQUIRED; Gets or sets if the scripts needs to be persisted. PersistOnSuccess *bool // The list of run time script actions. ScriptActions []*RuntimeScriptAction }
ExecuteScriptActionParameters - The parameters for the script actions to execute on a running cluster.
func (ExecuteScriptActionParameters) MarshalJSON ¶
func (e ExecuteScriptActionParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ExecuteScriptActionParameters.
func (*ExecuteScriptActionParameters) UnmarshalJSON ¶ added in v1.1.0
func (e *ExecuteScriptActionParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ExecuteScriptActionParameters.
type Extension ¶
type Extension struct { // The certificate for the cluster monitoring extensions. PrimaryKey *string // The workspace ID for the cluster monitoring extension. WorkspaceID *string }
Extension - Cluster monitoring extensions.
func (Extension) MarshalJSON ¶ added in v1.1.0
MarshalJSON implements the json.Marshaller interface for type Extension.
func (*Extension) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Extension.
type ExtensionsClient ¶
type ExtensionsClient struct {
// contains filtered or unexported fields
}
ExtensionsClient contains the methods for the Extensions group. Don't use this type directly, use NewExtensionsClient() instead.
func NewExtensionsClient ¶
func NewExtensionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExtensionsClient, error)
NewExtensionsClient creates a new instance of ExtensionsClient with the specified values.
- subscriptionID - The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ExtensionsClient) BeginCreate ¶
func (client *ExtensionsClient) BeginCreate(ctx context.Context, resourceGroupName string, clusterName string, extensionName string, parameters Extension, options *ExtensionsClientBeginCreateOptions) (*runtime.Poller[ExtensionsClientCreateResponse], error)
BeginCreate - Creates an HDInsight cluster extension. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster.
- extensionName - The name of the cluster extension.
- parameters - The cluster extensions create request.
- options - ExtensionsClientBeginCreateOptions contains the optional parameters for the ExtensionsClient.BeginCreate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateExtension.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/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewExtensionsClient().BeginCreate(ctx, "rg1", "cluster1", "clustermonitoring", armhdinsight.Extension{ PrimaryKey: to.Ptr("**********"), WorkspaceID: to.Ptr("a2090ead-8c9f-4fba-b70e-533e3e003163"), }, 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 (*ExtensionsClient) BeginDelete ¶
func (client *ExtensionsClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, extensionName string, options *ExtensionsClientBeginDeleteOptions) (*runtime.Poller[ExtensionsClientDeleteResponse], error)
BeginDelete - Deletes the specified extension for HDInsight cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster.
- extensionName - The name of the cluster extension.
- options - ExtensionsClientBeginDeleteOptions contains the optional parameters for the ExtensionsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/DeleteExtension.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewExtensionsClient().BeginDelete(ctx, "rg1", "cluster1", "clustermonitoring", 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 (*ExtensionsClient) BeginDisableAzureMonitor ¶
func (client *ExtensionsClient) BeginDisableAzureMonitor(ctx context.Context, resourceGroupName string, clusterName string, options *ExtensionsClientBeginDisableAzureMonitorOptions) (*runtime.Poller[ExtensionsClientDisableAzureMonitorResponse], error)
BeginDisableAzureMonitor - Disables the Azure Monitor on the HDInsight cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster.
- options - ExtensionsClientBeginDisableAzureMonitorOptions contains the optional parameters for the ExtensionsClient.BeginDisableAzureMonitor method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/DisableLinuxClusterAzureMonitor.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewExtensionsClient().BeginDisableAzureMonitor(ctx, "rg1", "cluster1", 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 (*ExtensionsClient) BeginDisableMonitoring ¶
func (client *ExtensionsClient) BeginDisableMonitoring(ctx context.Context, resourceGroupName string, clusterName string, options *ExtensionsClientBeginDisableMonitoringOptions) (*runtime.Poller[ExtensionsClientDisableMonitoringResponse], error)
BeginDisableMonitoring - Disables the Operations Management Suite (OMS) on the HDInsight cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster.
- options - ExtensionsClientBeginDisableMonitoringOptions contains the optional parameters for the ExtensionsClient.BeginDisableMonitoring method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/DisableLinuxClusterMonitoring.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewExtensionsClient().BeginDisableMonitoring(ctx, "rg1", "cluster1", 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 (*ExtensionsClient) BeginEnableAzureMonitor ¶
func (client *ExtensionsClient) BeginEnableAzureMonitor(ctx context.Context, resourceGroupName string, clusterName string, parameters AzureMonitorRequest, options *ExtensionsClientBeginEnableAzureMonitorOptions) (*runtime.Poller[ExtensionsClientEnableAzureMonitorResponse], error)
BeginEnableAzureMonitor - Enables the Azure Monitor on the HDInsight cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster.
- parameters - The Log Analytics workspace parameters.
- options - ExtensionsClientBeginEnableAzureMonitorOptions contains the optional parameters for the ExtensionsClient.BeginEnableAzureMonitor method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/EnableLinuxClusterAzureMonitor.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/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewExtensionsClient().BeginEnableAzureMonitor(ctx, "rg1", "cluster1", armhdinsight.AzureMonitorRequest{ PrimaryKey: to.Ptr("**********"), WorkspaceID: to.Ptr("a2090ead-8c9f-4fba-b70e-533e3e003163"), }, 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 (*ExtensionsClient) BeginEnableMonitoring ¶
func (client *ExtensionsClient) BeginEnableMonitoring(ctx context.Context, resourceGroupName string, clusterName string, parameters ClusterMonitoringRequest, options *ExtensionsClientBeginEnableMonitoringOptions) (*runtime.Poller[ExtensionsClientEnableMonitoringResponse], error)
BeginEnableMonitoring - Enables the Operations Management Suite (OMS) on the HDInsight cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster.
- parameters - The Operations Management Suite (OMS) workspace parameters.
- options - ExtensionsClientBeginEnableMonitoringOptions contains the optional parameters for the ExtensionsClient.BeginEnableMonitoring method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/EnableLinuxClusterMonitoring.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/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewExtensionsClient().BeginEnableMonitoring(ctx, "rg1", "cluster1", armhdinsight.ClusterMonitoringRequest{ PrimaryKey: to.Ptr("**********"), WorkspaceID: to.Ptr("a2090ead-8c9f-4fba-b70e-533e3e003163"), }, 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 (*ExtensionsClient) Get ¶
func (client *ExtensionsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, extensionName string, options *ExtensionsClientGetOptions) (ExtensionsClientGetResponse, error)
Get - Gets the extension properties for the specified HDInsight cluster extension. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster.
- extensionName - The name of the cluster extension.
- options - ExtensionsClientGetOptions contains the optional parameters for the ExtensionsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetExtension.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewExtensionsClient().Get(ctx, "rg1", "cluster1", "clustermonitoring", 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.ClusterMonitoringResponse = armhdinsight.ClusterMonitoringResponse{ // ClusterMonitoringEnabled: to.Ptr(true), // WorkspaceID: to.Ptr("id"), // } }
Output:
func (*ExtensionsClient) GetAzureAsyncOperationStatus ¶
func (client *ExtensionsClient) GetAzureAsyncOperationStatus(ctx context.Context, resourceGroupName string, clusterName string, extensionName string, operationID string, options *ExtensionsClientGetAzureAsyncOperationStatusOptions) (ExtensionsClientGetAzureAsyncOperationStatusResponse, error)
GetAzureAsyncOperationStatus - Gets the async operation status. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster.
- extensionName - The name of the cluster extension.
- operationID - The long running operation id.
- options - ExtensionsClientGetAzureAsyncOperationStatusOptions contains the optional parameters for the ExtensionsClient.GetAzureAsyncOperationStatus method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetExtensionCreationAsyncOperationStatus.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewExtensionsClient().GetAzureAsyncOperationStatus(ctx, "rg1", "cluster1", "azuremonitor", "CF938302-6B4D-44A0-A6D2-C0D67E847AEC", 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 = armhdinsight.AsyncOperationResult{ // Status: to.Ptr(armhdinsight.AsyncOperationStateInProgress), // } }
Output:
func (*ExtensionsClient) GetAzureMonitorStatus ¶
func (client *ExtensionsClient) GetAzureMonitorStatus(ctx context.Context, resourceGroupName string, clusterName string, options *ExtensionsClientGetAzureMonitorStatusOptions) (ExtensionsClientGetAzureMonitorStatusResponse, error)
GetAzureMonitorStatus - Gets the status of Azure Monitor on the HDInsight cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster.
- options - ExtensionsClientGetAzureMonitorStatusOptions contains the optional parameters for the ExtensionsClient.GetAzureMonitorStatus method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetLinuxClusterAzureMonitorStatus.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewExtensionsClient().GetAzureMonitorStatus(ctx, "rg1", "cluster1", 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.AzureMonitorResponse = armhdinsight.AzureMonitorResponse{ // ClusterMonitoringEnabled: to.Ptr(true), // WorkspaceID: to.Ptr("id"), // } }
Output:
func (*ExtensionsClient) GetMonitoringStatus ¶
func (client *ExtensionsClient) GetMonitoringStatus(ctx context.Context, resourceGroupName string, clusterName string, options *ExtensionsClientGetMonitoringStatusOptions) (ExtensionsClientGetMonitoringStatusResponse, error)
GetMonitoringStatus - Gets the status of Operations Management Suite (OMS) on the HDInsight cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster.
- options - ExtensionsClientGetMonitoringStatusOptions contains the optional parameters for the ExtensionsClient.GetMonitoringStatus method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetLinuxClusterMonitoringStatus.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewExtensionsClient().GetMonitoringStatus(ctx, "rg1", "cluster1", 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.ClusterMonitoringResponse = armhdinsight.ClusterMonitoringResponse{ // ClusterMonitoringEnabled: to.Ptr(true), // WorkspaceID: to.Ptr("id"), // } }
Output:
type ExtensionsClientBeginCreateOptions ¶ added in v0.2.0
type ExtensionsClientBeginCreateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ExtensionsClientBeginCreateOptions contains the optional parameters for the ExtensionsClient.BeginCreate method.
type ExtensionsClientBeginDeleteOptions ¶ added in v0.2.0
type ExtensionsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ExtensionsClientBeginDeleteOptions contains the optional parameters for the ExtensionsClient.BeginDelete method.
type ExtensionsClientBeginDisableAzureMonitorOptions ¶ added in v0.2.0
type ExtensionsClientBeginDisableAzureMonitorOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ExtensionsClientBeginDisableAzureMonitorOptions contains the optional parameters for the ExtensionsClient.BeginDisableAzureMonitor method.
type ExtensionsClientBeginDisableMonitoringOptions ¶ added in v0.2.0
type ExtensionsClientBeginDisableMonitoringOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ExtensionsClientBeginDisableMonitoringOptions contains the optional parameters for the ExtensionsClient.BeginDisableMonitoring method.
type ExtensionsClientBeginEnableAzureMonitorOptions ¶ added in v0.2.0
type ExtensionsClientBeginEnableAzureMonitorOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ExtensionsClientBeginEnableAzureMonitorOptions contains the optional parameters for the ExtensionsClient.BeginEnableAzureMonitor method.
type ExtensionsClientBeginEnableMonitoringOptions ¶ added in v0.2.0
type ExtensionsClientBeginEnableMonitoringOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ExtensionsClientBeginEnableMonitoringOptions contains the optional parameters for the ExtensionsClient.BeginEnableMonitoring method.
type ExtensionsClientCreateResponse ¶ added in v0.2.0
type ExtensionsClientCreateResponse struct { }
ExtensionsClientCreateResponse contains the response from method ExtensionsClient.BeginCreate.
type ExtensionsClientDeleteResponse ¶ added in v0.2.0
type ExtensionsClientDeleteResponse struct { }
ExtensionsClientDeleteResponse contains the response from method ExtensionsClient.BeginDelete.
type ExtensionsClientDisableAzureMonitorResponse ¶ added in v0.2.0
type ExtensionsClientDisableAzureMonitorResponse struct { }
ExtensionsClientDisableAzureMonitorResponse contains the response from method ExtensionsClient.BeginDisableAzureMonitor.
type ExtensionsClientDisableMonitoringResponse ¶ added in v0.2.0
type ExtensionsClientDisableMonitoringResponse struct { }
ExtensionsClientDisableMonitoringResponse contains the response from method ExtensionsClient.BeginDisableMonitoring.
type ExtensionsClientEnableAzureMonitorResponse ¶ added in v0.2.0
type ExtensionsClientEnableAzureMonitorResponse struct { }
ExtensionsClientEnableAzureMonitorResponse contains the response from method ExtensionsClient.BeginEnableAzureMonitor.
type ExtensionsClientEnableMonitoringResponse ¶ added in v0.2.0
type ExtensionsClientEnableMonitoringResponse struct { }
ExtensionsClientEnableMonitoringResponse contains the response from method ExtensionsClient.BeginEnableMonitoring.
type ExtensionsClientGetAzureAsyncOperationStatusOptions ¶ added in v0.2.0
type ExtensionsClientGetAzureAsyncOperationStatusOptions struct { }
ExtensionsClientGetAzureAsyncOperationStatusOptions contains the optional parameters for the ExtensionsClient.GetAzureAsyncOperationStatus method.
type ExtensionsClientGetAzureAsyncOperationStatusResponse ¶ added in v0.2.0
type ExtensionsClientGetAzureAsyncOperationStatusResponse struct { // The azure async operation response. AsyncOperationResult }
ExtensionsClientGetAzureAsyncOperationStatusResponse contains the response from method ExtensionsClient.GetAzureAsyncOperationStatus.
type ExtensionsClientGetAzureMonitorStatusOptions ¶ added in v0.2.0
type ExtensionsClientGetAzureMonitorStatusOptions struct { }
ExtensionsClientGetAzureMonitorStatusOptions contains the optional parameters for the ExtensionsClient.GetAzureMonitorStatus method.
type ExtensionsClientGetAzureMonitorStatusResponse ¶ added in v0.2.0
type ExtensionsClientGetAzureMonitorStatusResponse struct { // The azure monitor status response. AzureMonitorResponse }
ExtensionsClientGetAzureMonitorStatusResponse contains the response from method ExtensionsClient.GetAzureMonitorStatus.
type ExtensionsClientGetMonitoringStatusOptions ¶ added in v0.2.0
type ExtensionsClientGetMonitoringStatusOptions struct { }
ExtensionsClientGetMonitoringStatusOptions contains the optional parameters for the ExtensionsClient.GetMonitoringStatus method.
type ExtensionsClientGetMonitoringStatusResponse ¶ added in v0.2.0
type ExtensionsClientGetMonitoringStatusResponse struct { // The cluster monitoring status response. ClusterMonitoringResponse }
ExtensionsClientGetMonitoringStatusResponse contains the response from method ExtensionsClient.GetMonitoringStatus.
type ExtensionsClientGetOptions ¶ added in v0.2.0
type ExtensionsClientGetOptions struct { }
ExtensionsClientGetOptions contains the optional parameters for the ExtensionsClient.Get method.
type ExtensionsClientGetResponse ¶ added in v0.2.0
type ExtensionsClientGetResponse struct { // The cluster monitoring status response. ClusterMonitoringResponse }
ExtensionsClientGetResponse contains the response from method ExtensionsClient.Get.
type FilterMode ¶
type FilterMode string
FilterMode - The filtering mode. Effectively this can enabling or disabling the VM sizes in a particular set.
const ( FilterModeDefault FilterMode = "Default" FilterModeExclude FilterMode = "Exclude" FilterModeInclude FilterMode = "Include" FilterModeRecommend FilterMode = "Recommend" )
func PossibleFilterModeValues ¶
func PossibleFilterModeValues() []FilterMode
PossibleFilterModeValues returns the possible values for the FilterMode const type.
type GatewaySettings ¶
type GatewaySettings struct { // READ-ONLY; Indicates whether or not the gateway settings based authorization is enabled. IsCredentialEnabled *string // READ-ONLY; The gateway settings user password. Password *string // READ-ONLY; The gateway settings user name. UserName *string }
GatewaySettings - Gateway settings.
func (GatewaySettings) MarshalJSON ¶ added in v1.1.0
func (g GatewaySettings) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GatewaySettings.
func (*GatewaySettings) UnmarshalJSON ¶ added in v1.1.0
func (g *GatewaySettings) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GatewaySettings.
type HDInsightClusterProvisioningState ¶
type HDInsightClusterProvisioningState string
HDInsightClusterProvisioningState - The provisioning state, which only appears in the response.
const ( HDInsightClusterProvisioningStateCanceled HDInsightClusterProvisioningState = "Canceled" HDInsightClusterProvisioningStateDeleting HDInsightClusterProvisioningState = "Deleting" HDInsightClusterProvisioningStateFailed HDInsightClusterProvisioningState = "Failed" HDInsightClusterProvisioningStateInProgress HDInsightClusterProvisioningState = "InProgress" HDInsightClusterProvisioningStateSucceeded HDInsightClusterProvisioningState = "Succeeded" )
func PossibleHDInsightClusterProvisioningStateValues ¶
func PossibleHDInsightClusterProvisioningStateValues() []HDInsightClusterProvisioningState
PossibleHDInsightClusterProvisioningStateValues returns the possible values for the HDInsightClusterProvisioningState const type.
type HardwareProfile ¶
type HardwareProfile struct { // The size of the VM VMSize *string }
HardwareProfile - The hardware profile.
func (HardwareProfile) MarshalJSON ¶ added in v1.1.0
func (h HardwareProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type HardwareProfile.
func (*HardwareProfile) UnmarshalJSON ¶ added in v1.1.0
func (h *HardwareProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type HardwareProfile.
type HostInfo ¶
type HostInfo struct { // The effective disk encryption key URL used by the host EffectiveDiskEncryptionKeyURL *string // The Fully Qualified Domain Name of host Fqdn *string // The host name Name *string }
HostInfo - The cluster host information.
func (HostInfo) MarshalJSON ¶ added in v1.1.0
MarshalJSON implements the json.Marshaller interface for type HostInfo.
func (*HostInfo) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type HostInfo.
type IPConfiguration ¶
type IPConfiguration struct { // REQUIRED; The name of private link IP configuration. Name *string // The private link ip configuration properties. Properties *IPConfigurationProperties // READ-ONLY; The private link IP configuration id. ID *string // READ-ONLY; The type of the private link IP configuration. Type *string }
IPConfiguration - The ip configurations for the private link service.
func (IPConfiguration) MarshalJSON ¶ added in v1.1.0
func (i IPConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type IPConfiguration.
func (*IPConfiguration) UnmarshalJSON ¶ added in v1.1.0
func (i *IPConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type IPConfiguration.
type IPConfigurationProperties ¶
type IPConfigurationProperties struct { // Indicates whether this IP configuration is primary for the corresponding NIC. Primary *bool // The IP address. PrivateIPAddress *string // The method that private IP address is allocated. PrivateIPAllocationMethod *PrivateIPAllocationMethod // The subnet resource id. Subnet *ResourceID // READ-ONLY; The private link configuration provisioning state, which only appears in the response. ProvisioningState *PrivateLinkConfigurationProvisioningState }
IPConfigurationProperties - The private link ip configuration properties.
func (IPConfigurationProperties) MarshalJSON ¶ added in v1.1.0
func (i IPConfigurationProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type IPConfigurationProperties.
func (*IPConfigurationProperties) UnmarshalJSON ¶ added in v1.1.0
func (i *IPConfigurationProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type IPConfigurationProperties.
type JSONWebKeyEncryptionAlgorithm ¶
type JSONWebKeyEncryptionAlgorithm string
JSONWebKeyEncryptionAlgorithm - Algorithm identifier for encryption, default RSA-OAEP.
const ( JSONWebKeyEncryptionAlgorithmRSA15 JSONWebKeyEncryptionAlgorithm = "RSA1_5" JSONWebKeyEncryptionAlgorithmRSAOAEP JSONWebKeyEncryptionAlgorithm = "RSA-OAEP" JSONWebKeyEncryptionAlgorithmRSAOAEP256 JSONWebKeyEncryptionAlgorithm = "RSA-OAEP-256" )
func PossibleJSONWebKeyEncryptionAlgorithmValues ¶
func PossibleJSONWebKeyEncryptionAlgorithmValues() []JSONWebKeyEncryptionAlgorithm
PossibleJSONWebKeyEncryptionAlgorithmValues returns the possible values for the JSONWebKeyEncryptionAlgorithm const type.
type KafkaRestProperties ¶
type KafkaRestProperties struct { // The information of AAD security group. ClientGroupInfo *ClientGroupInfo // The configurations that need to be overriden. ConfigurationOverride map[string]*string }
KafkaRestProperties - The kafka rest proxy configuration which contains AAD security group information.
func (KafkaRestProperties) MarshalJSON ¶
func (k KafkaRestProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type KafkaRestProperties.
func (*KafkaRestProperties) UnmarshalJSON ¶ added in v1.1.0
func (k *KafkaRestProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type KafkaRestProperties.
type LinuxOperatingSystemProfile ¶
type LinuxOperatingSystemProfile struct { // The password. Password *string // The SSH profile. SSHProfile *SSHProfile // The username. Username *string }
LinuxOperatingSystemProfile - The ssh username, password, and ssh public key.
func (LinuxOperatingSystemProfile) MarshalJSON ¶ added in v1.1.0
func (l LinuxOperatingSystemProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LinuxOperatingSystemProfile.
func (*LinuxOperatingSystemProfile) UnmarshalJSON ¶ added in v1.1.0
func (l *LinuxOperatingSystemProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LinuxOperatingSystemProfile.
type LocalizedName ¶
type LocalizedName struct { // The localized name of the used resource. LocalizedValue *string // The name of the used resource. Value *string }
LocalizedName - The details about the localizable name of a type of usage.
func (LocalizedName) MarshalJSON ¶ added in v1.1.0
func (l LocalizedName) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LocalizedName.
func (*LocalizedName) UnmarshalJSON ¶ added in v1.1.0
func (l *LocalizedName) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LocalizedName.
type LocationsClient ¶
type LocationsClient struct {
// contains filtered or unexported fields
}
LocationsClient contains the methods for the Locations group. Don't use this type directly, use NewLocationsClient() instead.
func NewLocationsClient ¶
func NewLocationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LocationsClient, error)
NewLocationsClient creates a new instance of LocationsClient with the specified values.
- subscriptionID - The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*LocationsClient) CheckNameAvailability ¶
func (client *LocationsClient) CheckNameAvailability(ctx context.Context, location string, parameters NameAvailabilityCheckRequestParameters, options *LocationsClientCheckNameAvailabilityOptions) (LocationsClientCheckNameAvailabilityResponse, error)
CheckNameAvailability - Check the cluster name is available or not. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- location - The Azure location (region) for which to make the request.
- options - LocationsClientCheckNameAvailabilityOptions contains the optional parameters for the LocationsClient.CheckNameAvailability method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/HDI_Locations_CheckClusterNameAvailability.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/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewLocationsClient().CheckNameAvailability(ctx, "westus", armhdinsight.NameAvailabilityCheckRequestParameters{ Name: to.Ptr("test123"), Type: to.Ptr("clusters"), }, 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.NameAvailabilityCheckResult = armhdinsight.NameAvailabilityCheckResult{ // Message: to.Ptr("Cluster name 'test123' is unavailable"), // NameAvailable: to.Ptr(false), // Reason: to.Ptr("AlreadyExists"), // } }
Output:
func (*LocationsClient) GetAzureAsyncOperationStatus ¶
func (client *LocationsClient) GetAzureAsyncOperationStatus(ctx context.Context, location string, operationID string, options *LocationsClientGetAzureAsyncOperationStatusOptions) (LocationsClientGetAzureAsyncOperationStatusResponse, error)
GetAzureAsyncOperationStatus - Get the async operation status. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- location - The Azure location (region) for which to make the request.
- operationID - The long running operation id.
- options - LocationsClientGetAzureAsyncOperationStatusOptions contains the optional parameters for the LocationsClient.GetAzureAsyncOperationStatus method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/HDI_Locations_GetAsyncOperationStatus.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewLocationsClient().GetAzureAsyncOperationStatus(ctx, "East US 2", "8a0348f4-8a85-4ec2-abe0-03b26104a9a0-0", 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 = armhdinsight.AsyncOperationResult{ // Status: to.Ptr(armhdinsight.AsyncOperationStateSucceeded), // } }
Output:
func (*LocationsClient) GetCapabilities ¶
func (client *LocationsClient) GetCapabilities(ctx context.Context, location string, options *LocationsClientGetCapabilitiesOptions) (LocationsClientGetCapabilitiesResponse, error)
GetCapabilities - Gets the capabilities for the specified location. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- location - The Azure location (region) for which to make the request.
- options - LocationsClientGetCapabilitiesOptions contains the optional parameters for the LocationsClient.GetCapabilities method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetHDInsightCapabilities.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewLocationsClient().GetCapabilities(ctx, "West US", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.CapabilitiesResult = armhdinsight.CapabilitiesResult{ // Features: []*string{ // to.Ptr("ALLOW_GATEWAY_AUTH_BYPASS"), // to.Ptr("AUX_IAAS_FUNCTIONALITIES"), // to.Ptr("BLOCK_APPS_FOR_SECURE_CLUSTER"), // to.Ptr("CLUSTER_RESIZE"), // to.Ptr("CLUSTERS_CONTRACT_1"), // to.Ptr("CLUSTERS_CONTRACT_1_SDK"), // to.Ptr("CLUSTERS_CONTRACT_2_SDK"), // to.Ptr("CLUSTERS_CONTRACT_VERSION_3_SDK"), // to.Ptr("COLLECTANONYMIZEDLOGS"), // to.Ptr("CONTAINER_LOG_COLLECTOR"), // to.Ptr("CONTAINER_RESOURCE_V3"), // to.Ptr("CUSTOM_ACTIONS_V2"), // to.Ptr("DATALAKE"), // to.Ptr("DATALAKE_3_2"), // to.Ptr("DATALAKE_3_4"), // to.Ptr("DATALAKE_3_5"), // to.Ptr("DATALAKE_DEFAULTFS_3_5"), // to.Ptr("DEFAULT_CONTAINER_IDENTIFIER_AND_STORAGEFQDN_ALREADY_USED"), // to.Ptr("DOCUMENT_VALIDATION_IN_API"), // to.Ptr("ENABLEDATALAKE"), // to.Ptr("ENABLEGENEVAANALYTICS"), // to.Ptr("HADOOP_VIRTUAL_NETWORK_ENABLED"), // to.Ptr("HS2_ZK_ROUTER_INTERACTIVEHIVE"), // to.Ptr("IAAS_ALLOW_CUSTOM_DNS"), // to.Ptr("IAAS_AMBARI_APP_TIMELINE_SERVER_HA_SERVICE"), // to.Ptr("IAAS_AMBARI_DEPENDENCY_BASED_DEPLOYMENT"), // to.Ptr("IAAS_AMBARI_HA_SERVICES"), // to.Ptr("IAAS_AMBARI_HISTORYSERVER_HA_SERVICE"), // to.Ptr("IAAS_AMBARI_LOWER_LATENCY"), // to.Ptr("IAAS_AMBARI_SKIP_COMPONENTS_INSTALL"), // to.Ptr("IAAS_ARM_PROVISIONING"), // to.Ptr("IAAS_CLOSE_HEAD_HTTPS_END_POINT_AFTER_CLUSTER_CREATE"), // to.Ptr("IAAS_CLUSTER_APPLICATION_ALLOW_MULTIPLE_ROLE_INSTANCES"), // to.Ptr("IAAS_CLUSTER_APPLICATION_REMOVE"), // to.Ptr("IAAS_CLUSTER_CONTAINER_PREUPLOAD_SUBMIT_WAIT"), // to.Ptr("IAAS_CLUSTER_RSERVER"), // to.Ptr("IAAS_DB_CREATION_IN_PARALLEL_TO_VM"), // to.Ptr("IAAS_DELETE_LEAKED_RESOURCES"), // to.Ptr("IAAS_DEPLOYMENTS"), // to.Ptr("IAAS_DO_NOT_CREATE_WASB_TABLES_IN_CUSTOMER_STORAGE"), // to.Ptr("IAAS_ENABLE_CLUSTER_CONFIG_OVERRIDES"), // to.Ptr("IAAS_ENABLE_OFFLINE_CLEANUP"), // to.Ptr("IAAS_ENABLE_OFFLINE_CLEANUP_FOR_DELETING_VMS"), // to.Ptr("IAAS_INCLUDE_STORAGE_IN_SUBSCRIPTION_SELECTION"), // to.Ptr("IAAS_PARALLEL_DB_CREATE"), // to.Ptr("IAAS_PREPROVISION_METASTORES_SCHEMAS"), // to.Ptr("IAAS_SCRIPTACTIONS_DELETE_VMS_CRUD_FAILURES"), // to.Ptr("IAAS_SCRIPTACTIONS_RUNNING"), // to.Ptr("IAAS_SHORT_VM_NAME"), // to.Ptr("IAAS_SUBMIT_AMBARI_REQUEST_ONCE_LINUX_VM_ARE_AVAILABLE"), // to.Ptr("IAAS_TEZ_ATS_V15"), // to.Ptr("IAAS_USE_UNATTENDED_UPGRADES_FOR_PATCHING"), // to.Ptr("IAAS_VALIDATE_CUSTOM_VNET"), // to.Ptr("IAAS_VALIDATE_NSG"), // to.Ptr("IAAS_WAIT_FOR_CLOSING_HEAD_HTTPS_END_POINT_AFTER_CLUSTER_CREATE"), // to.Ptr("IAAS_YARN_HDINSIGHT_SQL_TIMELINE_STORE"), // to.Ptr("IAAS_YARN_HDINSIGHT_TIMELINE_STORE"), // to.Ptr("INTERACTIVEHIVE"), // to.Ptr("MDSCENTRALLOGGING"), // to.Ptr("NODE_SETUP_POLLER_ENABLED"), // to.Ptr("OVERPROVISION_HOSTGROUP_edgenode"), // to.Ptr("OVERPROVISION_HOSTGROUP_Gateway"), // to.Ptr("OVERPROVISION_HOSTGROUP_Workernode"), // to.Ptr("OVERPROVISION_HOSTGROUP_zookeepernode"), // to.Ptr("PERF_OPTIMIZED_RESOURCE_LOCATION_FETCH"), // to.Ptr("PORTALAPPINSTALL"), // to.Ptr("POWERSHELL_SCRIPT_ACTION"), // to.Ptr("POWERSHELL_SCRIPT_ACTION_SDK"), // to.Ptr("PREMIUM_TIER_PREVIEW"), // to.Ptr("PROVISIONING_AGENT"), // to.Ptr("RMHA"), // to.Ptr("RSERVER_CLUSTERTYPE_3_5_ENABLED"), // to.Ptr("RSERVER_CLUSTERTYPE_ENABLED"), // to.Ptr("SHOW_HUMBOLDT_GA"), // to.Ptr("SHOW_IBIZA_CREATE"), // to.Ptr("SPARK_2_1"), // to.Ptr("SPARK_EXPERIMENTAL"), // to.Ptr("STORM_PREVIEW"), // to.Ptr("UI_CREATE_WIZARD_V2"), // to.Ptr("VIRTUAL_NETWORK_ENABLED"), // to.Ptr("VMSIZES_AUX")}, // Quota: &armhdinsight.QuotaCapability{ // CoresUsed: to.Ptr[int64](0), // MaxCoresAllowed: to.Ptr[int64](3000), // RegionalQuotas: []*armhdinsight.RegionalQuotaCapability{ // { // CoresAvailable: to.Ptr[int64](1000), // CoresUsed: to.Ptr[int64](0), // RegionName: to.Ptr("Australia East"), // }, // { // CoresAvailable: to.Ptr[int64](1000), // CoresUsed: to.Ptr[int64](0), // RegionName: to.Ptr("Australia Southeast"), // }, // { // CoresAvailable: to.Ptr[int64](1000), // CoresUsed: to.Ptr[int64](0), // RegionName: to.Ptr("Brazil South"), // }, // { // CoresAvailable: to.Ptr[int64](1000), // CoresUsed: to.Ptr[int64](0), // RegionName: to.Ptr("Canada Central"), // }, // { // CoresAvailable: to.Ptr[int64](1000), // CoresUsed: to.Ptr[int64](0), // RegionName: to.Ptr("Canada East"), // }, // { // CoresAvailable: to.Ptr[int64](1000), // CoresUsed: to.Ptr[int64](0), // RegionName: to.Ptr("Central India"), // }, // { // CoresAvailable: to.Ptr[int64](1000), // CoresUsed: to.Ptr[int64](24), // RegionName: to.Ptr("Central US"), // }, // { // CoresAvailable: to.Ptr[int64](1000), // CoresUsed: to.Ptr[int64](0), // RegionName: to.Ptr("Central US EUAP"), // }, // { // CoresAvailable: to.Ptr[int64](1000), // CoresUsed: to.Ptr[int64](24), // RegionName: to.Ptr("East Asia"), // }, // { // CoresAvailable: to.Ptr[int64](1000), // CoresUsed: to.Ptr[int64](24), // RegionName: to.Ptr("East US"), // }, // { // CoresAvailable: to.Ptr[int64](1000), // CoresUsed: to.Ptr[int64](0), // RegionName: to.Ptr("East US 2"), // }, // { // CoresAvailable: to.Ptr[int64](1000), // CoresUsed: to.Ptr[int64](0), // RegionName: to.Ptr("Japan East"), // }, // { // CoresAvailable: to.Ptr[int64](1000), // CoresUsed: to.Ptr[int64](0), // RegionName: to.Ptr("Japan West"), // }, // { // CoresAvailable: to.Ptr[int64](1000), // CoresUsed: to.Ptr[int64](0), // RegionName: to.Ptr("North Central US"), // }, // { // CoresAvailable: to.Ptr[int64](1000), // CoresUsed: to.Ptr[int64](0), // RegionName: to.Ptr("North Europe"), // }, // { // CoresAvailable: to.Ptr[int64](1000), // CoresUsed: to.Ptr[int64](0), // RegionName: to.Ptr("South Central US"), // }, // { // CoresAvailable: to.Ptr[int64](1000), // CoresUsed: to.Ptr[int64](0), // RegionName: to.Ptr("Southeast Asia"), // }, // { // CoresAvailable: to.Ptr[int64](1000), // CoresUsed: to.Ptr[int64](0), // RegionName: to.Ptr("West Central US"), // }, // { // CoresAvailable: to.Ptr[int64](1000), // CoresUsed: to.Ptr[int64](0), // RegionName: to.Ptr("West Europe"), // }, // { // CoresAvailable: to.Ptr[int64](1000), // CoresUsed: to.Ptr[int64](132), // RegionName: to.Ptr("West US"), // }, // { // CoresAvailable: to.Ptr[int64](1000), // CoresUsed: to.Ptr[int64](0), // RegionName: to.Ptr("West US 2"), // }}, // }, // Regions: map[string]*armhdinsight.RegionsCapability{ // "iaas": &armhdinsight.RegionsCapability{ // Available: []*string{ // to.Ptr("AUSTRALIA EAST"), // to.Ptr("AUSTRALIA SOUTHEAST"), // to.Ptr("BRAZIL SOUTH"), // to.Ptr("CANADA CENTRAL"), // to.Ptr("CANADA EAST"), // to.Ptr("CENTRAL INDIA"), // to.Ptr("CENTRAL US"), // to.Ptr("CENTRAL US EUAP"), // to.Ptr("EAST ASIA"), // to.Ptr("EAST US"), // to.Ptr("EAST US 2"), // to.Ptr("JAPAN EAST"), // to.Ptr("JAPAN WEST"), // to.Ptr("NORTH CENTRAL US"), // to.Ptr("NORTH EUROPE"), // to.Ptr("SOUTH CENTRAL US"), // to.Ptr("SOUTHEAST ASIA"), // to.Ptr("WEST CENTRAL US"), // to.Ptr("WEST EUROPE"), // to.Ptr("WEST US"), // to.Ptr("WEST US 2")}, // }, // "paas": &armhdinsight.RegionsCapability{ // Available: []*string{ // to.Ptr("AUSTRALIA EAST"), // to.Ptr("AUSTRALIA SOUTHEAST"), // to.Ptr("BRAZIL SOUTH"), // to.Ptr("CENTRAL INDIA"), // to.Ptr("CENTRAL US"), // to.Ptr("EAST ASIA"), // to.Ptr("EAST US"), // to.Ptr("EAST US 2"), // to.Ptr("JAPAN EAST"), // to.Ptr("JAPAN WEST"), // to.Ptr("NORTH CENTRAL US"), // to.Ptr("NORTH EUROPE"), // to.Ptr("SOUTH CENTRAL US"), // to.Ptr("SOUTHEAST ASIA"), // to.Ptr("WEST EUROPE"), // to.Ptr("WEST US"), // to.Ptr("WEST US 2")}, // }, // }, // Versions: map[string]*armhdinsight.VersionsCapability{ // "iaas": &armhdinsight.VersionsCapability{ // Available: []*armhdinsight.VersionSpec{ // { // ComponentVersions: map[string]*string{ // "HBase": to.Ptr("0.98.4"), // "HDP": to.Ptr("2.2"), // "Hadoop": to.Ptr("2.6.0"), // "Storm": to.Ptr("0.9.3"), // }, // DisplayName: to.Ptr("Version 3.2.1000.0.8840373"), // FriendlyName: to.Ptr("3.2"), // IsDefault: to.Ptr(false), // }, // { // ComponentVersions: map[string]*string{ // "HBase": to.Ptr("1.1.2"), // "HDP": to.Ptr("2.3"), // "Hadoop": to.Ptr("2.7.0"), // "Spark": to.Ptr("1.5.2"), // "Storm": to.Ptr("0.10.0"), // }, // DisplayName: to.Ptr("Version 3.3.1000.0.9776961"), // FriendlyName: to.Ptr("3.3"), // IsDefault: to.Ptr(false), // }, // { // ComponentVersions: map[string]*string{ // "HBase": to.Ptr("1.1.2"), // "HDP": to.Ptr("2.4"), // "Hadoop": to.Ptr("2.7.1"), // "RServer": to.Ptr("8.0"), // "Spark": to.Ptr("1.6.2"), // "Storm": to.Ptr("0.10.0"), // }, // DisplayName: to.Ptr("Version 3.4.1000.0.9719475"), // FriendlyName: to.Ptr("3.4"), // IsDefault: to.Ptr(false), // }, // { // ComponentVersions: map[string]*string{ // "HBase": to.Ptr("1.1.2"), // "HDP": to.Ptr("2.5"), // "Hadoop": to.Ptr("2.7.3"), // "InteractiveHive": to.Ptr("2.1.0"), // "RServer": to.Ptr("9.0"), // "Spark": to.Ptr("1.6.3,2.0.2"), // "Storm": to.Ptr("1.0.1"), // }, // DisplayName: to.Ptr("Version 3.5.1000.0.9732704"), // FriendlyName: to.Ptr("3.5"), // IsDefault: to.Ptr(true), // }, // { // ComponentVersions: map[string]*string{ // "HDP": to.Ptr("2.6"), // "Spark": to.Ptr("2.1.0"), // }, // DisplayName: to.Ptr("Version 3.6.1000.0.9503998"), // FriendlyName: to.Ptr("3.6"), // IsDefault: to.Ptr(false), // }, // { // DisplayName: to.Ptr("Version 99.152.1000.0.6943836"), // FriendlyName: to.Ptr("99.152"), // IsDefault: to.Ptr(false), // }}, // }, // "paas": &armhdinsight.VersionsCapability{ // Available: []*armhdinsight.VersionSpec{ // { // DisplayName: to.Ptr("HdInsight version 1.6.1.0.335536"), // FriendlyName: to.Ptr("1.6"), // IsDefault: to.Ptr(false), // }, // { // ComponentVersions: map[string]*string{ // "HDP": to.Ptr("1.3"), // "Hadoop": to.Ptr("1.2.0"), // }, // DisplayName: to.Ptr("Version 2.1.9.406.1221105"), // FriendlyName: to.Ptr("2.1"), // IsDefault: to.Ptr(false), // }, // { // ComponentVersions: map[string]*string{ // "HDP": to.Ptr("2.0"), // "Hadoop": to.Ptr("2.2.0"), // }, // DisplayName: to.Ptr("Version 3.0.6.989.2441725"), // FriendlyName: to.Ptr("3.0"), // IsDefault: to.Ptr(false), // }, // { // ComponentVersions: map[string]*string{ // "HBase": to.Ptr("0.98"), // "HDP": to.Ptr("2.1.7"), // "Hadoop": to.Ptr("2.4.0"), // }, // DisplayName: to.Ptr("Version 3.1.4.989.2441725"), // FriendlyName: to.Ptr("3.1"), // IsDefault: to.Ptr(false), // }, // { // ComponentVersions: map[string]*string{ // "HBase": to.Ptr("0.98.4"), // "HDP": to.Ptr("2.2"), // "Hadoop": to.Ptr("2.6.0"), // "Storm": to.Ptr("0.9.3"), // }, // DisplayName: to.Ptr("Version 3.2.7.989.2441725"), // FriendlyName: to.Ptr("3.2"), // IsDefault: to.Ptr(false), // }, // { // ComponentVersions: map[string]*string{ // "HBase": to.Ptr("1.1.2"), // "HDP": to.Ptr("2.3"), // "Hadoop": to.Ptr("2.7.0"), // "Storm": to.Ptr("0.10.0"), // }, // DisplayName: to.Ptr("Version 3.3.0.989.2441725"), // FriendlyName: to.Ptr("3.3"), // IsDefault: to.Ptr(true), // }}, // }, // }, // } }
Output:
func (*LocationsClient) ListBillingSpecs ¶
func (client *LocationsClient) ListBillingSpecs(ctx context.Context, location string, options *LocationsClientListBillingSpecsOptions) (LocationsClientListBillingSpecsResponse, error)
ListBillingSpecs - Lists the billingSpecs for the specified subscription and location. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- location - The Azure location (region) for which to make the request.
- options - LocationsClientListBillingSpecsOptions contains the optional parameters for the LocationsClient.ListBillingSpecs method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/HDI_Locations_ListBillingSpecs.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewLocationsClient().ListBillingSpecs(ctx, "East US 2", 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.BillingResponseListResult = armhdinsight.BillingResponseListResult{ // BillingResources: []*armhdinsight.BillingResources{ // { // BillingMeters: []*armhdinsight.BillingMeters{ // }, // DiskBillingMeters: []*armhdinsight.DiskBillingMeters{ // }, // Region: to.Ptr("East US 2"), // }, // { // BillingMeters: []*armhdinsight.BillingMeters{ // { // Meter: to.Ptr("11111111-1111-1111-1111-111111111111"), // MeterParameter: to.Ptr("default"), // Unit: to.Ptr("CoreHours"), // }, // { // Meter: to.Ptr("11111111-1111-1111-1111-111111111111"), // MeterParameter: to.Ptr("Kafka"), // Unit: to.Ptr("CoreHours"), // }}, // DiskBillingMeters: []*armhdinsight.DiskBillingMeters{ // { // DiskRpMeter: to.Ptr("11111111-1111-1111-1111-111111111111"), // SKU: to.Ptr("All"), // Tier: to.Ptr(armhdinsight.TierStandard), // }, // { // DiskRpMeter: to.Ptr("11111111-1111-1111-1111-111111111111"), // SKU: to.Ptr("All"), // Tier: to.Ptr(armhdinsight.TierStandard), // }}, // Region: to.Ptr("default"), // }}, // VMSizeFilters: []*armhdinsight.VMSizeCompatibilityFilterV2{ // { // FilterMode: to.Ptr(armhdinsight.FilterModeExclude), // }}, // VMSizes: []*string{ // to.Ptr("A5"), // to.Ptr("A6"), // to.Ptr("A7")}, // } }
Output:
func (*LocationsClient) ListUsages ¶
func (client *LocationsClient) ListUsages(ctx context.Context, location string, options *LocationsClientListUsagesOptions) (LocationsClientListUsagesResponse, error)
ListUsages - Lists the usages for the specified location. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- location - The Azure location (region) for which to make the request.
- options - LocationsClientListUsagesOptions contains the optional parameters for the LocationsClient.ListUsages method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetHDInsightUsages.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewLocationsClient().ListUsages(ctx, "West US", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.UsagesListResult = armhdinsight.UsagesListResult{ // Value: []*armhdinsight.Usage{ // { // Name: &armhdinsight.LocalizedName{ // LocalizedValue: to.Ptr("Cores"), // Value: to.Ptr("cores"), // }, // CurrentValue: to.Ptr[int64](0), // Limit: to.Ptr[int64](5000), // Unit: to.Ptr("Count"), // }}, // } }
Output:
func (*LocationsClient) ValidateClusterCreateRequest ¶
func (client *LocationsClient) ValidateClusterCreateRequest(ctx context.Context, location string, parameters ClusterCreateRequestValidationParameters, options *LocationsClientValidateClusterCreateRequestOptions) (LocationsClientValidateClusterCreateRequestResponse, error)
ValidateClusterCreateRequest - Validate the cluster create request spec is valid or not. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- location - The Azure location (region) for which to make the request.
- options - LocationsClientValidateClusterCreateRequestOptions contains the optional parameters for the LocationsClient.ValidateClusterCreateRequest method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/HDI_Locations_ValidateClusterCreateRequest.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/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewLocationsClient().ValidateClusterCreateRequest(ctx, "southcentralus", armhdinsight.ClusterCreateRequestValidationParameters{ Location: to.Ptr("southcentralus"), Properties: &armhdinsight.ClusterCreateProperties{ ClusterDefinition: &armhdinsight.ClusterDefinition{ ComponentVersion: map[string]*string{ "Spark": to.Ptr("2.4"), }, Configurations: map[string]any{ "gateway": map[string]any{ "restAuthCredential.isEnabled": true, "restAuthCredential.password": "**********", "restAuthCredential.username": "admin", }, }, Kind: to.Ptr("spark"), }, ClusterVersion: to.Ptr("4.0"), ComputeProfile: &armhdinsight.ComputeProfile{ Roles: []*armhdinsight.Role{ { Name: to.Ptr("headnode"), HardwareProfile: &armhdinsight.HardwareProfile{ VMSize: to.Ptr("Standard_E8_V3"), }, MinInstanceCount: to.Ptr[int32](1), OSProfile: &armhdinsight.OsProfile{ LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ Password: to.Ptr("********"), Username: to.Ptr("sshuser"), }, }, ScriptActions: []*armhdinsight.ScriptAction{}, TargetInstanceCount: to.Ptr[int32](2), }, { Name: to.Ptr("workernode"), HardwareProfile: &armhdinsight.HardwareProfile{ VMSize: to.Ptr("Standard_E8_V3"), }, OSProfile: &armhdinsight.OsProfile{ LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ Password: to.Ptr("********"), Username: to.Ptr("sshuser"), }, }, ScriptActions: []*armhdinsight.ScriptAction{}, TargetInstanceCount: to.Ptr[int32](4), }, { Name: to.Ptr("zookeepernode"), HardwareProfile: &armhdinsight.HardwareProfile{ VMSize: to.Ptr("Standard_D13_V2"), }, MinInstanceCount: to.Ptr[int32](1), OSProfile: &armhdinsight.OsProfile{ LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{ Password: to.Ptr("**********"), Username: to.Ptr("sshuser"), }, }, ScriptActions: []*armhdinsight.ScriptAction{}, TargetInstanceCount: to.Ptr[int32](3), }}, }, MinSupportedTLSVersion: to.Ptr("1.2"), OSType: to.Ptr(armhdinsight.OSTypeLinux), StorageProfile: &armhdinsight.StorageProfile{ Storageaccounts: []*armhdinsight.StorageAccount{ { Name: to.Ptr("storagename.blob.core.windows.net"), Container: to.Ptr("contianername"), IsDefault: to.Ptr(true), Key: to.Ptr("*******"), ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/storagename"), }}, }, Tier: to.Ptr(armhdinsight.TierStandard), }, Tags: map[string]*string{}, Name: to.Ptr("testclustername"), Type: to.Ptr("Microsoft.HDInsight/clusters"), FetchAaddsResource: to.Ptr(false), TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ClusterCreateValidationResult = armhdinsight.ClusterCreateValidationResult{ // EstimatedCreationDuration: to.Ptr("00:20:00"), // ValidationErrors: []*armhdinsight.ValidationErrorInfo{ // }, // } }
Output:
type LocationsClientCheckNameAvailabilityOptions ¶ added in v0.2.0
type LocationsClientCheckNameAvailabilityOptions struct { }
LocationsClientCheckNameAvailabilityOptions contains the optional parameters for the LocationsClient.CheckNameAvailability method.
type LocationsClientCheckNameAvailabilityResponse ¶ added in v0.2.0
type LocationsClientCheckNameAvailabilityResponse struct { // The response spec of checking name availability. NameAvailabilityCheckResult }
LocationsClientCheckNameAvailabilityResponse contains the response from method LocationsClient.CheckNameAvailability.
type LocationsClientGetAzureAsyncOperationStatusOptions ¶ added in v0.2.0
type LocationsClientGetAzureAsyncOperationStatusOptions struct { }
LocationsClientGetAzureAsyncOperationStatusOptions contains the optional parameters for the LocationsClient.GetAzureAsyncOperationStatus method.
type LocationsClientGetAzureAsyncOperationStatusResponse ¶ added in v0.2.0
type LocationsClientGetAzureAsyncOperationStatusResponse struct { // The azure async operation response. AsyncOperationResult }
LocationsClientGetAzureAsyncOperationStatusResponse contains the response from method LocationsClient.GetAzureAsyncOperationStatus.
type LocationsClientGetCapabilitiesOptions ¶ added in v0.2.0
type LocationsClientGetCapabilitiesOptions struct { }
LocationsClientGetCapabilitiesOptions contains the optional parameters for the LocationsClient.GetCapabilities method.
type LocationsClientGetCapabilitiesResponse ¶ added in v0.2.0
type LocationsClientGetCapabilitiesResponse struct { // The Get Capabilities operation response. CapabilitiesResult }
LocationsClientGetCapabilitiesResponse contains the response from method LocationsClient.GetCapabilities.
type LocationsClientListBillingSpecsOptions ¶ added in v0.2.0
type LocationsClientListBillingSpecsOptions struct { }
LocationsClientListBillingSpecsOptions contains the optional parameters for the LocationsClient.ListBillingSpecs method.
type LocationsClientListBillingSpecsResponse ¶ added in v0.2.0
type LocationsClientListBillingSpecsResponse struct { // The response for the operation to get regional billingSpecs for a subscription. BillingResponseListResult }
LocationsClientListBillingSpecsResponse contains the response from method LocationsClient.ListBillingSpecs.
type LocationsClientListUsagesOptions ¶ added in v0.2.0
type LocationsClientListUsagesOptions struct { }
LocationsClientListUsagesOptions contains the optional parameters for the LocationsClient.ListUsages method.
type LocationsClientListUsagesResponse ¶ added in v0.2.0
type LocationsClientListUsagesResponse struct { // The response for the operation to get regional usages for a subscription. UsagesListResult }
LocationsClientListUsagesResponse contains the response from method LocationsClient.ListUsages.
type LocationsClientValidateClusterCreateRequestOptions ¶ added in v0.2.0
type LocationsClientValidateClusterCreateRequestOptions struct { }
LocationsClientValidateClusterCreateRequestOptions contains the optional parameters for the LocationsClient.ValidateClusterCreateRequest method.
type LocationsClientValidateClusterCreateRequestResponse ¶ added in v0.2.0
type LocationsClientValidateClusterCreateRequestResponse struct { // The response of cluster create request validation. ClusterCreateValidationResult }
LocationsClientValidateClusterCreateRequestResponse contains the response from method LocationsClient.ValidateClusterCreateRequest.
type MetricSpecifications ¶
type MetricSpecifications struct { // The aggregation type of the metric specification. AggregationType *string // The category of the metric. Category *string // The override name of delegate metric. DelegateMetricNameOverride *string // The dimensions of the metric specification. Dimensions []*Dimension // The display description of the metric specification. DisplayDescription *string // The display name of the metric specification. DisplayName *string // The flag indicates whether enable regional mdm account or not. EnableRegionalMdmAccount *bool // The flag indicates whether filling gap with zero. FillGapWithZero *bool // The flag indicates whether the metric is internal or not. IsInternal *bool // The metric filter pattern. MetricFilterPattern *string // The name of the metric specification. Name *string // The override name of resource id dimension name. ResourceIDDimensionNameOverride *string // The source mdm account. SourceMdmAccount *string // The source mdm namespace. SourceMdmNamespace *string // The supported aggregation types of the metric specification. SupportedAggregationTypes []*string // The supported time grain types of the metric specification. SupportedTimeGrainTypes []*string // The unit of the metric specification. Unit *string }
MetricSpecifications - The details of metric specifications.
func (MetricSpecifications) MarshalJSON ¶
func (m MetricSpecifications) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MetricSpecifications.
func (*MetricSpecifications) UnmarshalJSON ¶ added in v1.1.0
func (m *MetricSpecifications) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MetricSpecifications.
type NameAvailabilityCheckRequestParameters ¶
type NameAvailabilityCheckRequestParameters struct { // The resource name. Name *string // The resource type Type *string }
NameAvailabilityCheckRequestParameters - The request spec of checking name availability.
func (NameAvailabilityCheckRequestParameters) MarshalJSON ¶ added in v1.1.0
func (n NameAvailabilityCheckRequestParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NameAvailabilityCheckRequestParameters.
func (*NameAvailabilityCheckRequestParameters) UnmarshalJSON ¶ added in v1.1.0
func (n *NameAvailabilityCheckRequestParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NameAvailabilityCheckRequestParameters.
type NameAvailabilityCheckResult ¶
type NameAvailabilityCheckResult struct { // This indicates whether the name is available. NameAvailable *bool // READ-ONLY; The related message. Message *string // READ-ONLY; The reason of the result. Reason *string }
NameAvailabilityCheckResult - The response spec of checking name availability.
func (NameAvailabilityCheckResult) MarshalJSON ¶ added in v1.1.0
func (n NameAvailabilityCheckResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NameAvailabilityCheckResult.
func (*NameAvailabilityCheckResult) UnmarshalJSON ¶ added in v1.1.0
func (n *NameAvailabilityCheckResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NameAvailabilityCheckResult.
type NetworkProperties ¶
type NetworkProperties struct { // Indicates whether or not private link is enabled. PrivateLink *PrivateLink // The direction for the resource provider connection. ResourceProviderConnection *ResourceProviderConnection }
NetworkProperties - The network properties.
func (NetworkProperties) MarshalJSON ¶ added in v1.1.0
func (n NetworkProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NetworkProperties.
func (*NetworkProperties) UnmarshalJSON ¶ added in v1.1.0
func (n *NetworkProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NetworkProperties.
type OSType ¶
type OSType string
OSType - The type of operating system.
func PossibleOSTypeValues ¶
func PossibleOSTypeValues() []OSType
PossibleOSTypeValues returns the possible values for the OSType const type.
type Operation ¶
type Operation struct { // The display of operation. Display *OperationDisplay // The operation name: {provider}/{resource}/{operation} Name *string // The operation properties. Properties *OperationProperties }
Operation - The HDInsight 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 { // Localized friendly description for the operation Description *string // The operation type: read, write, delete, etc. Operation *string // The service provider: Microsoft.HDInsight Provider *string // The resource on which the operation is performed: Cluster, Applications, etc. 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 OperationListResult ¶
type OperationListResult struct { // The URL to get the next set of operation list results if there are any. NextLink *string // The list of HDInsight operations supported by the HDInsight resource provider. Value []*Operation }
OperationListResult - Result of the request to list HDInsight 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 OperationProperties ¶
type OperationProperties struct { // The specification of the service. ServiceSpecification *ServiceSpecification }
OperationProperties - The details of operation.
func (OperationProperties) MarshalJSON ¶ added in v1.1.0
func (o OperationProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationProperties.
func (*OperationProperties) UnmarshalJSON ¶ added in v1.1.0
func (o *OperationProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationProperties.
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 HDInsight REST API operations.
Generated from API version 2021-06-01
- options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
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 HDInsight 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 OsProfile ¶
type OsProfile struct { // The Linux OS profile. LinuxOperatingSystemProfile *LinuxOperatingSystemProfile }
OsProfile - The Linux operation systems profile.
func (OsProfile) MarshalJSON ¶ added in v1.1.0
MarshalJSON implements the json.Marshaller interface for type OsProfile.
func (*OsProfile) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type OsProfile.
type PrivateEndpoint ¶
type PrivateEndpoint struct { // The private endpoint id. ID *string }
PrivateEndpoint - The private endpoint.
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 private endpoint connection properties. Properties *PrivateEndpointConnectionProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Metadata pertaining to creation and last modification of the resource. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
PrivateEndpointConnection - The private endpoint connection.
func (PrivateEndpointConnection) MarshalJSON ¶
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 PrivateEndpointConnectionListResult ¶
type PrivateEndpointConnectionListResult struct { // The list of private endpoint connections. Value []*PrivateEndpointConnection // READ-ONLY; The link (url) to the next page of results. NextLink *string }
PrivateEndpointConnectionListResult - The list private endpoint connections response.
func (PrivateEndpointConnectionListResult) MarshalJSON ¶
func (p PrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionListResult.
func (*PrivateEndpointConnectionListResult) UnmarshalJSON ¶ added in v1.1.0
func (p *PrivateEndpointConnectionListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionListResult.
type PrivateEndpointConnectionProperties ¶
type PrivateEndpointConnectionProperties struct { // REQUIRED; The private link service connection state. PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState // READ-ONLY; The link identifier. LinkIdentifier *string // READ-ONLY; The private endpoint of the private endpoint connection PrivateEndpoint *PrivateEndpoint // READ-ONLY; The provisioning state, which only appears in the response. ProvisioningState *PrivateEndpointConnectionProvisioningState }
PrivateEndpointConnectionProperties - The private endpoint connection properties.
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 PrivateEndpointConnectionProvisioningState ¶
type PrivateEndpointConnectionProvisioningState string
PrivateEndpointConnectionProvisioningState - The provisioning state, which only appears in the response.
const ( PrivateEndpointConnectionProvisioningStateCanceled PrivateEndpointConnectionProvisioningState = "Canceled" PrivateEndpointConnectionProvisioningStateDeleting PrivateEndpointConnectionProvisioningState = "Deleting" PrivateEndpointConnectionProvisioningStateFailed PrivateEndpointConnectionProvisioningState = "Failed" PrivateEndpointConnectionProvisioningStateInProgress PrivateEndpointConnectionProvisioningState = "InProgress" PrivateEndpointConnectionProvisioningStateSucceeded PrivateEndpointConnectionProvisioningState = "Succeeded" PrivateEndpointConnectionProvisioningStateUpdating PrivateEndpointConnectionProvisioningState = "Updating" )
func PossiblePrivateEndpointConnectionProvisioningStateValues ¶
func PossiblePrivateEndpointConnectionProvisioningStateValues() []PrivateEndpointConnectionProvisioningState
PossiblePrivateEndpointConnectionProvisioningStateValues returns the possible values for the PrivateEndpointConnectionProvisioningState const type.
type PrivateEndpointConnectionsClient ¶
type PrivateEndpointConnectionsClient struct {
// contains filtered or unexported fields
}
PrivateEndpointConnectionsClient contains the methods for the PrivateEndpointConnections group. Don't use this type directly, use NewPrivateEndpointConnectionsClient() instead.
func NewPrivateEndpointConnectionsClient ¶
func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointConnectionsClient, error)
NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient with the specified values.
- subscriptionID - The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*PrivateEndpointConnectionsClient) BeginCreateOrUpdate ¶
func (client *PrivateEndpointConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, privateEndpointConnectionName string, parameters PrivateEndpointConnection, options *PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[PrivateEndpointConnectionsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Approve or reject a private endpoint connection manually. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster.
- privateEndpointConnectionName - The name of the private endpoint connection.
- parameters - The private endpoint connection create or update request.
- options - PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/ApprovePrivateEndpointConnection.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/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewPrivateEndpointConnectionsClient().BeginCreateOrUpdate(ctx, "rg1", "cluster1", "testprivateep.b3bf5fed-9b12-4560-b7d0-2abe1bba07e2", armhdinsight.PrivateEndpointConnection{ Properties: &armhdinsight.PrivateEndpointConnectionProperties{ PrivateLinkServiceConnectionState: &armhdinsight.PrivateLinkServiceConnectionState{ Description: to.Ptr("update it from pending to approved."), ActionsRequired: to.Ptr("None"), Status: to.Ptr(armhdinsight.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 = armhdinsight.PrivateEndpointConnection{ // Name: to.Ptr("testprivateep.b3bf5fed-9b12-4560-b7d0-2abe1bba07e2"), // Type: to.Ptr("Microsoft.HDInsight/clusters/privateEndpointConnections"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1/privateEndpointConnections/testprivateep.b3bf5fed-9b12-4560-b7d0-2abe1bba07e2"), // Properties: &armhdinsight.PrivateEndpointConnectionProperties{ // LinkIdentifier: to.Ptr("620815036"), // PrivateEndpoint: &armhdinsight.PrivateEndpoint{ // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/privateEndpoints/testprivateep"), // }, // PrivateLinkServiceConnectionState: &armhdinsight.PrivateLinkServiceConnectionState{ // Description: to.Ptr("update it from pending to approved."), // ActionsRequired: to.Ptr("None"), // Status: to.Ptr(armhdinsight.PrivateLinkServiceConnectionStatusApproved), // }, // ProvisioningState: to.Ptr(armhdinsight.PrivateEndpointConnectionProvisioningStateSucceeded), // }, // } }
Output:
func (*PrivateEndpointConnectionsClient) BeginDelete ¶
func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*runtime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error)
BeginDelete - Deletes the specific private endpoint connection. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster.
- privateEndpointConnectionName - The name of the private endpoint connection.
- options - PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/DeletePrivateEndpointConnection.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewPrivateEndpointConnectionsClient().BeginDelete(ctx, "rg1", "cluster1", "testprivateep.b3bf5fed-9b12-4560-b7d0-2abe1bba07e2", 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 (*PrivateEndpointConnectionsClient) Get ¶
func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientGetOptions) (PrivateEndpointConnectionsClientGetResponse, error)
Get - Gets the specific private endpoint connection. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster.
- privateEndpointConnectionName - The name of the private endpoint connection.
- options - PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetPrivateEndpointConnection.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewPrivateEndpointConnectionsClient().Get(ctx, "rg1", "cluster1", "testprivateep.b3bf5fed-9b12-4560-b7d0-2abe1bba07e2", 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 = armhdinsight.PrivateEndpointConnection{ // Name: to.Ptr("testprivateep.b3bf5fed-9b12-4560-b7d0-2abe1bba07e2"), // Type: to.Ptr("Microsoft.HDInsight/clusters/privateEndpointConnections"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1/privateEndpointConnections/testprivateep.b3bf5fed-9b12-4560-b7d0-2abe1bba07e2"), // Properties: &armhdinsight.PrivateEndpointConnectionProperties{ // LinkIdentifier: to.Ptr("620815036"), // PrivateEndpoint: &armhdinsight.PrivateEndpoint{ // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/privateEndpoints/testprivateep"), // }, // PrivateLinkServiceConnectionState: &armhdinsight.PrivateLinkServiceConnectionState{ // Description: to.Ptr(""), // ActionsRequired: to.Ptr("None"), // Status: to.Ptr(armhdinsight.PrivateLinkServiceConnectionStatusApproved), // }, // ProvisioningState: to.Ptr(armhdinsight.PrivateEndpointConnectionProvisioningStateSucceeded), // }, // } }
Output:
func (*PrivateEndpointConnectionsClient) NewListByClusterPager ¶ added in v0.4.0
func (client *PrivateEndpointConnectionsClient) NewListByClusterPager(resourceGroupName string, clusterName string, options *PrivateEndpointConnectionsClientListByClusterOptions) *runtime.Pager[PrivateEndpointConnectionsClientListByClusterResponse]
NewListByClusterPager - Lists the private endpoint connections for a HDInsight cluster.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster.
- options - PrivateEndpointConnectionsClientListByClusterOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListByClusterPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetAllPrivateEndpointConnectionsInCluster.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewPrivateEndpointConnectionsClient().NewListByClusterPager("rg1", "cluster1", 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.PrivateEndpointConnectionListResult = armhdinsight.PrivateEndpointConnectionListResult{ // Value: []*armhdinsight.PrivateEndpointConnection{ // { // Name: to.Ptr("testprivateep.b3bf5fed-9b12-4560-b7d0-2abe1bba07e2"), // Type: to.Ptr("Microsoft.HDInsight/clusters/privateEndpointConnections"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1/privateEndpointConnections/testprivateep.b3bf5fed-9b12-4560-b7d0-2abe1bba07e2"), // Properties: &armhdinsight.PrivateEndpointConnectionProperties{ // LinkIdentifier: to.Ptr("620815036"), // PrivateEndpoint: &armhdinsight.PrivateEndpoint{ // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/privateEndpoints/testprivateep"), // }, // PrivateLinkServiceConnectionState: &armhdinsight.PrivateLinkServiceConnectionState{ // Description: to.Ptr(""), // ActionsRequired: to.Ptr("None"), // Status: to.Ptr(armhdinsight.PrivateLinkServiceConnectionStatusApproved), // }, // ProvisioningState: to.Ptr(armhdinsight.PrivateEndpointConnectionProvisioningStateSucceeded), // }, // }}, // } } }
Output:
type PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions ¶ added in v0.2.0
type PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginCreateOrUpdate method.
type PrivateEndpointConnectionsClientBeginDeleteOptions ¶ added in v0.2.0
type PrivateEndpointConnectionsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete method.
type PrivateEndpointConnectionsClientCreateOrUpdateResponse ¶ added in v0.2.0
type PrivateEndpointConnectionsClientCreateOrUpdateResponse struct { // The private endpoint connection. PrivateEndpointConnection }
PrivateEndpointConnectionsClientCreateOrUpdateResponse contains the response from method PrivateEndpointConnectionsClient.BeginCreateOrUpdate.
type PrivateEndpointConnectionsClientDeleteResponse ¶ added in v0.2.0
type PrivateEndpointConnectionsClientDeleteResponse struct { }
PrivateEndpointConnectionsClientDeleteResponse contains the response from method PrivateEndpointConnectionsClient.BeginDelete.
type PrivateEndpointConnectionsClientGetOptions ¶ added in v0.2.0
type PrivateEndpointConnectionsClientGetOptions struct { }
PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get method.
type PrivateEndpointConnectionsClientGetResponse ¶ added in v0.2.0
type PrivateEndpointConnectionsClientGetResponse struct { // The private endpoint connection. PrivateEndpointConnection }
PrivateEndpointConnectionsClientGetResponse contains the response from method PrivateEndpointConnectionsClient.Get.
type PrivateEndpointConnectionsClientListByClusterOptions ¶ added in v0.2.0
type PrivateEndpointConnectionsClientListByClusterOptions struct { }
PrivateEndpointConnectionsClientListByClusterOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListByClusterPager method.
type PrivateEndpointConnectionsClientListByClusterResponse ¶ added in v0.2.0
type PrivateEndpointConnectionsClientListByClusterResponse struct { // The list private endpoint connections response. PrivateEndpointConnectionListResult }
PrivateEndpointConnectionsClientListByClusterResponse contains the response from method PrivateEndpointConnectionsClient.NewListByClusterPager.
type PrivateIPAllocationMethod ¶
type PrivateIPAllocationMethod string
PrivateIPAllocationMethod - The method that private IP address is allocated.
const ( PrivateIPAllocationMethodDynamic PrivateIPAllocationMethod = "dynamic" PrivateIPAllocationMethodStatic PrivateIPAllocationMethod = "static" )
func PossiblePrivateIPAllocationMethodValues ¶
func PossiblePrivateIPAllocationMethodValues() []PrivateIPAllocationMethod
PossiblePrivateIPAllocationMethodValues returns the possible values for the PrivateIPAllocationMethod const type.
type PrivateLink ¶
type PrivateLink string
PrivateLink - Indicates whether or not private link is enabled.
const ( PrivateLinkDisabled PrivateLink = "Disabled" PrivateLinkEnabled PrivateLink = "Enabled" )
func PossiblePrivateLinkValues ¶
func PossiblePrivateLinkValues() []PrivateLink
PossiblePrivateLinkValues returns the possible values for the PrivateLink const type.
type PrivateLinkConfiguration ¶
type PrivateLinkConfiguration struct { // REQUIRED; The name of private link configuration. Name *string // REQUIRED; The private link configuration properties. Properties *PrivateLinkConfigurationProperties // READ-ONLY; The private link configuration id. ID *string // READ-ONLY; The type of the private link configuration. Type *string }
PrivateLinkConfiguration - The private link configuration.
func (PrivateLinkConfiguration) MarshalJSON ¶ added in v1.1.0
func (p PrivateLinkConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateLinkConfiguration.
func (*PrivateLinkConfiguration) UnmarshalJSON ¶ added in v1.1.0
func (p *PrivateLinkConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkConfiguration.
type PrivateLinkConfigurationProperties ¶
type PrivateLinkConfigurationProperties struct { // REQUIRED; The HDInsight private linkable sub-resource name to apply the private link configuration to. For example, 'headnode', // 'gateway', 'edgenode'. GroupID *string // REQUIRED; The IP configurations for the private link service. IPConfigurations []*IPConfiguration // READ-ONLY; The private link configuration provisioning state, which only appears in the response. ProvisioningState *PrivateLinkConfigurationProvisioningState }
PrivateLinkConfigurationProperties - The private link configuration properties.
func (PrivateLinkConfigurationProperties) MarshalJSON ¶
func (p PrivateLinkConfigurationProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateLinkConfigurationProperties.
func (*PrivateLinkConfigurationProperties) UnmarshalJSON ¶ added in v1.1.0
func (p *PrivateLinkConfigurationProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkConfigurationProperties.
type PrivateLinkConfigurationProvisioningState ¶
type PrivateLinkConfigurationProvisioningState string
PrivateLinkConfigurationProvisioningState - The private link configuration provisioning state, which only appears in the response.
const ( PrivateLinkConfigurationProvisioningStateCanceled PrivateLinkConfigurationProvisioningState = "Canceled" PrivateLinkConfigurationProvisioningStateDeleting PrivateLinkConfigurationProvisioningState = "Deleting" PrivateLinkConfigurationProvisioningStateFailed PrivateLinkConfigurationProvisioningState = "Failed" PrivateLinkConfigurationProvisioningStateInProgress PrivateLinkConfigurationProvisioningState = "InProgress" PrivateLinkConfigurationProvisioningStateSucceeded PrivateLinkConfigurationProvisioningState = "Succeeded" )
func PossiblePrivateLinkConfigurationProvisioningStateValues ¶
func PossiblePrivateLinkConfigurationProvisioningStateValues() []PrivateLinkConfigurationProvisioningState
PossiblePrivateLinkConfigurationProvisioningStateValues returns the possible values for the PrivateLinkConfigurationProvisioningState const type.
type PrivateLinkResource ¶
type PrivateLinkResource struct { // Resource properties. Properties *PrivateLinkResourceProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Metadata pertaining to creation and last modification of the resource. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
PrivateLinkResource - A private link resource
func (PrivateLinkResource) MarshalJSON ¶
func (p PrivateLinkResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateLinkResource.
func (*PrivateLinkResource) UnmarshalJSON ¶ added in v1.1.0
func (p *PrivateLinkResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResource.
type PrivateLinkResourceListResult ¶
type PrivateLinkResourceListResult struct { // Array of private link resources Value []*PrivateLinkResource }
PrivateLinkResourceListResult - A list of private link resources
func (PrivateLinkResourceListResult) MarshalJSON ¶
func (p PrivateLinkResourceListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceListResult.
func (*PrivateLinkResourceListResult) UnmarshalJSON ¶ added in v1.1.0
func (p *PrivateLinkResourceListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceListResult.
type PrivateLinkResourceProperties ¶
type PrivateLinkResourceProperties struct { // The private link resource Private link DNS zone name. RequiredZoneNames []*string // READ-ONLY; The private link resource group id. GroupID *string // READ-ONLY; The private link resource required member names. RequiredMembers []*string }
PrivateLinkResourceProperties - Properties of a private link resource.
func (PrivateLinkResourceProperties) MarshalJSON ¶
func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties.
func (*PrivateLinkResourceProperties) UnmarshalJSON ¶ added in v1.1.0
func (p *PrivateLinkResourceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceProperties.
type PrivateLinkResourcesClient ¶
type PrivateLinkResourcesClient struct {
// contains filtered or unexported fields
}
PrivateLinkResourcesClient contains the methods for the PrivateLinkResources group. Don't use this type directly, use NewPrivateLinkResourcesClient() instead.
func NewPrivateLinkResourcesClient ¶
func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateLinkResourcesClient, error)
NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient with the specified values.
- subscriptionID - The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*PrivateLinkResourcesClient) Get ¶
func (client *PrivateLinkResourcesClient) Get(ctx context.Context, resourceGroupName string, clusterName string, privateLinkResourceName string, options *PrivateLinkResourcesClientGetOptions) (PrivateLinkResourcesClientGetResponse, error)
Get - Gets the specific private link resource. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster.
- privateLinkResourceName - The name of the private link resource.
- options - PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetPrivateLinkResource.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewPrivateLinkResourcesClient().Get(ctx, "rg1", "cluster1", "gateway", 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.PrivateLinkResource = armhdinsight.PrivateLinkResource{ // Name: to.Ptr("gateway"), // Type: to.Ptr("Microsoft.HDInsight/clusters/privateLinkResources"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1/privateLinkResources/gateway"), // Properties: &armhdinsight.PrivateLinkResourceProperties{ // GroupID: to.Ptr("gateway"), // RequiredMembers: []*string{ // to.Ptr("gateway")}, // RequiredZoneNames: []*string{ // to.Ptr("privatelink.azurehdinsight.net")}, // }, // } }
Output:
func (*PrivateLinkResourcesClient) ListByCluster ¶
func (client *PrivateLinkResourcesClient) ListByCluster(ctx context.Context, resourceGroupName string, clusterName string, options *PrivateLinkResourcesClientListByClusterOptions) (PrivateLinkResourcesClientListByClusterResponse, error)
ListByCluster - Lists the private link resources in a HDInsight cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster.
- options - PrivateLinkResourcesClientListByClusterOptions contains the optional parameters for the PrivateLinkResourcesClient.ListByCluster method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetAllPrivateLinkResourcesInCluster.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewPrivateLinkResourcesClient().ListByCluster(ctx, "rg1", "cluster1", 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.PrivateLinkResourceListResult = armhdinsight.PrivateLinkResourceListResult{ // Value: []*armhdinsight.PrivateLinkResource{ // { // Name: to.Ptr("gateway"), // Type: to.Ptr("Microsoft.HDInsight/clusters/privateLinkResources"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1/privateLinkResources/gateway"), // Properties: &armhdinsight.PrivateLinkResourceProperties{ // GroupID: to.Ptr("gateway"), // RequiredMembers: []*string{ // to.Ptr("gateway")}, // RequiredZoneNames: []*string{ // to.Ptr("privatelink.azurehdinsight.net")}, // }, // }, // { // Name: to.Ptr("headnode"), // Type: to.Ptr("Microsoft.HDInsight/clusters/privateLinkResources"), // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1/privateLinkResources/headnode"), // Properties: &armhdinsight.PrivateLinkResourceProperties{ // GroupID: to.Ptr("headnode"), // RequiredMembers: []*string{ // to.Ptr("headnode")}, // RequiredZoneNames: []*string{ // to.Ptr("privatelink.azurehdinsight.net")}, // }, // }}, // } }
Output:
type PrivateLinkResourcesClientGetOptions ¶ added in v0.2.0
type PrivateLinkResourcesClientGetOptions struct { }
PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method.
type PrivateLinkResourcesClientGetResponse ¶ added in v0.2.0
type PrivateLinkResourcesClientGetResponse struct { // A private link resource PrivateLinkResource }
PrivateLinkResourcesClientGetResponse contains the response from method PrivateLinkResourcesClient.Get.
type PrivateLinkResourcesClientListByClusterOptions ¶ added in v0.2.0
type PrivateLinkResourcesClientListByClusterOptions struct { }
PrivateLinkResourcesClientListByClusterOptions contains the optional parameters for the PrivateLinkResourcesClient.ListByCluster method.
type PrivateLinkResourcesClientListByClusterResponse ¶ added in v0.2.0
type PrivateLinkResourcesClientListByClusterResponse struct { // A list of private link resources PrivateLinkResourceListResult }
PrivateLinkResourcesClientListByClusterResponse contains the response from method PrivateLinkResourcesClient.ListByCluster.
type PrivateLinkServiceConnectionState ¶
type PrivateLinkServiceConnectionState struct { // REQUIRED; The concrete private link service connection. Status *PrivateLinkServiceConnectionStatus // Whether there is further actions. ActionsRequired *string // The optional description of the status. Description *string }
PrivateLinkServiceConnectionState - The private link service connection state.
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 concrete private link service connection.
const ( PrivateLinkServiceConnectionStatusApproved PrivateLinkServiceConnectionStatus = "Approved" PrivateLinkServiceConnectionStatusPending PrivateLinkServiceConnectionStatus = "Pending" PrivateLinkServiceConnectionStatusRejected PrivateLinkServiceConnectionStatus = "Rejected" PrivateLinkServiceConnectionStatusRemoved PrivateLinkServiceConnectionStatus = "Removed" )
func PossiblePrivateLinkServiceConnectionStatusValues ¶
func PossiblePrivateLinkServiceConnectionStatusValues() []PrivateLinkServiceConnectionStatus
PossiblePrivateLinkServiceConnectionStatusValues returns the possible values for the PrivateLinkServiceConnectionStatus const type.
type ProxyResource ¶
type ProxyResource struct { // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
ProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location
func (ProxyResource) MarshalJSON ¶ added in v1.1.0
func (p ProxyResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProxyResource.
func (*ProxyResource) UnmarshalJSON ¶ added in v1.1.0
func (p *ProxyResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource.
type QuotaCapability ¶
type QuotaCapability struct { // The number of cores used in the subscription. CoresUsed *int64 // The number of cores that the subscription allowed. MaxCoresAllowed *int64 // The list of region quota capabilities. RegionalQuotas []*RegionalQuotaCapability }
QuotaCapability - The regional quota capability.
func (QuotaCapability) MarshalJSON ¶
func (q QuotaCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type QuotaCapability.
func (*QuotaCapability) UnmarshalJSON ¶ added in v1.1.0
func (q *QuotaCapability) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type QuotaCapability.
type QuotaInfo ¶
type QuotaInfo struct { // The cores used by the cluster. CoresUsed *int32 }
QuotaInfo - The quota properties for the cluster.
func (QuotaInfo) MarshalJSON ¶ added in v1.1.0
MarshalJSON implements the json.Marshaller interface for type QuotaInfo.
func (*QuotaInfo) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type QuotaInfo.
type RegionalQuotaCapability ¶
type RegionalQuotaCapability struct { // The number of cores available in the region. CoresAvailable *int64 // The number of cores used in the region. CoresUsed *int64 // The region name. RegionName *string }
RegionalQuotaCapability - The regional quota capacity.
func (RegionalQuotaCapability) MarshalJSON ¶ added in v1.1.0
func (r RegionalQuotaCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RegionalQuotaCapability.
func (*RegionalQuotaCapability) UnmarshalJSON ¶ added in v1.1.0
func (r *RegionalQuotaCapability) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RegionalQuotaCapability.
type RegionsCapability ¶
type RegionsCapability struct { // The list of region capabilities. Available []*string }
RegionsCapability - The regions capability.
func (RegionsCapability) MarshalJSON ¶
func (r RegionsCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RegionsCapability.
func (*RegionsCapability) UnmarshalJSON ¶ added in v1.1.0
func (r *RegionsCapability) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RegionsCapability.
type Resource ¶
type Resource struct { // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
Resource - Common fields that are returned in the response for all Azure Resource Manager resources
func (Resource) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Resource.
func (*Resource) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Resource.
type ResourceID ¶
type ResourceID struct { // The azure resource id. ID *string }
ResourceID - The azure resource id.
func (ResourceID) MarshalJSON ¶ added in v1.1.0
func (r ResourceID) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceID.
func (*ResourceID) UnmarshalJSON ¶ added in v1.1.0
func (r *ResourceID) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceID.
type ResourceIdentityType ¶
type ResourceIdentityType string
ResourceIdentityType - The type of identity used for the cluster. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities.
const ( ResourceIdentityTypeNone ResourceIdentityType = "None" ResourceIdentityTypeSystemAssigned ResourceIdentityType = "SystemAssigned" ResourceIdentityTypeSystemAssignedUserAssigned ResourceIdentityType = "SystemAssigned, UserAssigned" ResourceIdentityTypeUserAssigned ResourceIdentityType = "UserAssigned" )
func PossibleResourceIdentityTypeValues ¶
func PossibleResourceIdentityTypeValues() []ResourceIdentityType
PossibleResourceIdentityTypeValues returns the possible values for the ResourceIdentityType const type.
type ResourceProviderConnection ¶
type ResourceProviderConnection string
ResourceProviderConnection - The direction for the resource provider connection.
const ( ResourceProviderConnectionInbound ResourceProviderConnection = "Inbound" ResourceProviderConnectionOutbound ResourceProviderConnection = "Outbound" )
func PossibleResourceProviderConnectionValues ¶
func PossibleResourceProviderConnectionValues() []ResourceProviderConnection
PossibleResourceProviderConnectionValues returns the possible values for the ResourceProviderConnection const type.
type Role ¶
type Role struct { // The autoscale configurations. AutoscaleConfiguration *Autoscale // The data disks groups for the role. DataDisksGroups []*DataDisksGroups // Indicates whether encrypt the data disks. EncryptDataDisks *bool // The hardware profile. HardwareProfile *HardwareProfile // The minimum instance count of the cluster. MinInstanceCount *int32 // The name of the role. Name *string // The operating system profile. OSProfile *OsProfile // The list of script actions on the role. ScriptActions []*ScriptAction // The instance count of the cluster. TargetInstanceCount *int32 // The name of the virtual machine group. VMGroupName *string // The virtual network profile. VirtualNetworkProfile *VirtualNetworkProfile }
Role - Describes a role on the cluster.
func (Role) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Role.
func (*Role) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Role.
type RoleName ¶
type RoleName string
const (
RoleNameWorkernode RoleName = "workernode"
)
func PossibleRoleNameValues ¶
func PossibleRoleNameValues() []RoleName
PossibleRoleNameValues returns the possible values for the RoleName const type.
type RuntimeScriptAction ¶
type RuntimeScriptAction struct { // REQUIRED; The name of the script action. Name *string // REQUIRED; The list of roles where script will be executed. Roles []*string // REQUIRED; The URI to the script. URI *string // The parameters for the script Parameters *string // READ-ONLY; The application name of the script action, if any. ApplicationName *string }
RuntimeScriptAction - Describes a script action on a running cluster.
func (RuntimeScriptAction) MarshalJSON ¶
func (r RuntimeScriptAction) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RuntimeScriptAction.
func (*RuntimeScriptAction) UnmarshalJSON ¶ added in v1.1.0
func (r *RuntimeScriptAction) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RuntimeScriptAction.
type RuntimeScriptActionDetail ¶
type RuntimeScriptActionDetail struct { // REQUIRED; The name of the script action. Name *string // REQUIRED; The list of roles where script will be executed. Roles []*string // REQUIRED; The URI to the script. URI *string // The parameters for the script Parameters *string // READ-ONLY; The application name of the script action, if any. ApplicationName *string // READ-ONLY; The script action execution debug information. DebugInformation *string // READ-ONLY; The end time of script action execution. EndTime *string // READ-ONLY; The summary of script action execution result. ExecutionSummary []*ScriptActionExecutionSummary // READ-ONLY; The reason why the script action was executed. Operation *string // READ-ONLY; The execution id of the script action. ScriptExecutionID *int64 // READ-ONLY; The start time of script action execution. StartTime *string // READ-ONLY; The current execution status of the script action. Status *string }
RuntimeScriptActionDetail - The execution details of a script action.
func (RuntimeScriptActionDetail) MarshalJSON ¶
func (r RuntimeScriptActionDetail) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RuntimeScriptActionDetail.
func (*RuntimeScriptActionDetail) UnmarshalJSON ¶ added in v1.1.0
func (r *RuntimeScriptActionDetail) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RuntimeScriptActionDetail.
type SSHProfile ¶
type SSHProfile struct { // The list of SSH public keys. PublicKeys []*SSHPublicKey }
SSHProfile - The list of SSH public keys.
func (SSHProfile) MarshalJSON ¶
func (s SSHProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SSHProfile.
func (*SSHProfile) UnmarshalJSON ¶ added in v1.1.0
func (s *SSHProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SSHProfile.
type SSHPublicKey ¶
type SSHPublicKey struct { // The certificate for SSH. CertificateData *string }
SSHPublicKey - The SSH public key for the cluster nodes.
func (SSHPublicKey) MarshalJSON ¶ added in v1.1.0
func (s SSHPublicKey) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SSHPublicKey.
func (*SSHPublicKey) UnmarshalJSON ¶ added in v1.1.0
func (s *SSHPublicKey) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SSHPublicKey.
type ScriptAction ¶
type ScriptAction struct { // REQUIRED; The name of the script action. Name *string // REQUIRED; The parameters for the script provided. Parameters *string // REQUIRED; The URI to the script. URI *string }
ScriptAction - Describes a script action on role on the cluster.
func (ScriptAction) MarshalJSON ¶ added in v1.1.0
func (s ScriptAction) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ScriptAction.
func (*ScriptAction) UnmarshalJSON ¶ added in v1.1.0
func (s *ScriptAction) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ScriptAction.
type ScriptActionExecutionHistoryList ¶
type ScriptActionExecutionHistoryList struct { // READ-ONLY; The link (url) to the next page of results. NextLink *string // READ-ONLY; The list of persisted script action details for the cluster. Value []*RuntimeScriptActionDetail }
ScriptActionExecutionHistoryList - The list script execution history response.
func (ScriptActionExecutionHistoryList) MarshalJSON ¶
func (s ScriptActionExecutionHistoryList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ScriptActionExecutionHistoryList.
func (*ScriptActionExecutionHistoryList) UnmarshalJSON ¶ added in v1.1.0
func (s *ScriptActionExecutionHistoryList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ScriptActionExecutionHistoryList.
type ScriptActionExecutionSummary ¶
type ScriptActionExecutionSummary struct { // READ-ONLY; The instance count for a given script action execution status. InstanceCount *int32 // READ-ONLY; The status of script action execution. Status *string }
ScriptActionExecutionSummary - The execution summary of a script action.
func (ScriptActionExecutionSummary) MarshalJSON ¶ added in v1.1.0
func (s ScriptActionExecutionSummary) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ScriptActionExecutionSummary.
func (*ScriptActionExecutionSummary) UnmarshalJSON ¶ added in v1.1.0
func (s *ScriptActionExecutionSummary) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ScriptActionExecutionSummary.
type ScriptActionPersistedGetResponseSpec ¶
type ScriptActionPersistedGetResponseSpec struct { // The application name for the script action. ApplicationName *string // The name of script action. Name *string // The parameters for the script provided. Parameters *string // The list of roles where script will be executed. Roles []*string // The URI to the script. URI *string }
ScriptActionPersistedGetResponseSpec - The persisted script action for cluster.
func (ScriptActionPersistedGetResponseSpec) MarshalJSON ¶
func (s ScriptActionPersistedGetResponseSpec) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ScriptActionPersistedGetResponseSpec.
func (*ScriptActionPersistedGetResponseSpec) UnmarshalJSON ¶ added in v1.1.0
func (s *ScriptActionPersistedGetResponseSpec) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ScriptActionPersistedGetResponseSpec.
type ScriptActionsClient ¶
type ScriptActionsClient struct {
// contains filtered or unexported fields
}
ScriptActionsClient contains the methods for the ScriptActions group. Don't use this type directly, use NewScriptActionsClient() instead.
func NewScriptActionsClient ¶
func NewScriptActionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ScriptActionsClient, error)
NewScriptActionsClient creates a new instance of ScriptActionsClient with the specified values.
- subscriptionID - The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ScriptActionsClient) Delete ¶
func (client *ScriptActionsClient) Delete(ctx context.Context, resourceGroupName string, clusterName string, scriptName string, options *ScriptActionsClientDeleteOptions) (ScriptActionsClientDeleteResponse, error)
Delete - Deletes a specified persisted script action of the cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster.
- scriptName - The name of the script.
- options - ScriptActionsClientDeleteOptions contains the optional parameters for the ScriptActionsClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/DeleteScriptAction.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewScriptActionsClient().Delete(ctx, "rg1", "cluster1", "scriptName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*ScriptActionsClient) GetExecutionAsyncOperationStatus ¶
func (client *ScriptActionsClient) GetExecutionAsyncOperationStatus(ctx context.Context, resourceGroupName string, clusterName string, operationID string, options *ScriptActionsClientGetExecutionAsyncOperationStatusOptions) (ScriptActionsClientGetExecutionAsyncOperationStatusResponse, error)
GetExecutionAsyncOperationStatus - Gets the async operation status of execution operation. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster.
- operationID - The long running operation id.
- options - ScriptActionsClientGetExecutionAsyncOperationStatusOptions contains the optional parameters for the ScriptActionsClient.GetExecutionAsyncOperationStatus method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetScriptExecutionAsyncOperationStatus.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewScriptActionsClient().GetExecutionAsyncOperationStatus(ctx, "rg1", "cluster1", "CF938302-6B4D-44A0-A6D2-C0D67E847AEC", 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 = armhdinsight.AsyncOperationResult{ // Status: to.Ptr(armhdinsight.AsyncOperationStateInProgress), // } }
Output:
func (*ScriptActionsClient) GetExecutionDetail ¶
func (client *ScriptActionsClient) GetExecutionDetail(ctx context.Context, resourceGroupName string, clusterName string, scriptExecutionID string, options *ScriptActionsClientGetExecutionDetailOptions) (ScriptActionsClientGetExecutionDetailResponse, error)
GetExecutionDetail - Gets the script execution detail for the given script execution ID. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster.
- scriptExecutionID - The script execution Id
- options - ScriptActionsClientGetExecutionDetailOptions contains the optional parameters for the ScriptActionsClient.GetExecutionDetail method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetScriptActionById.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewScriptActionsClient().GetExecutionDetail(ctx, "rg1", "cluster1", "391145124054712", 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.RuntimeScriptActionDetail = armhdinsight.RuntimeScriptActionDetail{ // Name: to.Ptr("Test"), // ApplicationName: to.Ptr("app1"), // Roles: []*string{ // to.Ptr("headnode"), // to.Ptr("workernode")}, // URI: to.Ptr("http://testurl.com/install.ssh"), // DebugInformation: to.Ptr(""), // EndTime: to.Ptr("2017-03-22T21:34:39.293"), // ExecutionSummary: []*armhdinsight.ScriptActionExecutionSummary{ // }, // Operation: to.Ptr("PostClusterCreateScriptActionRequest"), // ScriptExecutionID: to.Ptr[int64](391145124054712), // StartTime: to.Ptr("2017-03-22T21:34:39.293"), // Status: to.Ptr("ValidationFailed"), // } }
Output:
func (*ScriptActionsClient) NewListByClusterPager ¶ added in v0.4.0
func (client *ScriptActionsClient) NewListByClusterPager(resourceGroupName string, clusterName string, options *ScriptActionsClientListByClusterOptions) *runtime.Pager[ScriptActionsClientListByClusterResponse]
NewListByClusterPager - Lists all the persisted script actions for the specified cluster.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster.
- options - ScriptActionsClientListByClusterOptions contains the optional parameters for the ScriptActionsClient.NewListByClusterPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetLinuxHadoopScriptAction.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewScriptActionsClient().NewListByClusterPager("rg1", "cluster1", 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.ScriptActionsList = armhdinsight.ScriptActionsList{ // Value: []*armhdinsight.RuntimeScriptActionDetail{ // { // Name: to.Ptr("app-Install"), // ApplicationName: to.Ptr("app"), // Roles: []*string{ // to.Ptr("edgenode")}, // URI: to.Ptr("https://app.com/azure/app_install.sh"), // }}, // } } }
Output:
type ScriptActionsClientDeleteOptions ¶ added in v0.2.0
type ScriptActionsClientDeleteOptions struct { }
ScriptActionsClientDeleteOptions contains the optional parameters for the ScriptActionsClient.Delete method.
type ScriptActionsClientDeleteResponse ¶ added in v0.2.0
type ScriptActionsClientDeleteResponse struct { }
ScriptActionsClientDeleteResponse contains the response from method ScriptActionsClient.Delete.
type ScriptActionsClientGetExecutionAsyncOperationStatusOptions ¶ added in v0.2.0
type ScriptActionsClientGetExecutionAsyncOperationStatusOptions struct { }
ScriptActionsClientGetExecutionAsyncOperationStatusOptions contains the optional parameters for the ScriptActionsClient.GetExecutionAsyncOperationStatus method.
type ScriptActionsClientGetExecutionAsyncOperationStatusResponse ¶ added in v0.2.0
type ScriptActionsClientGetExecutionAsyncOperationStatusResponse struct { // The azure async operation response. AsyncOperationResult }
ScriptActionsClientGetExecutionAsyncOperationStatusResponse contains the response from method ScriptActionsClient.GetExecutionAsyncOperationStatus.
type ScriptActionsClientGetExecutionDetailOptions ¶ added in v0.2.0
type ScriptActionsClientGetExecutionDetailOptions struct { }
ScriptActionsClientGetExecutionDetailOptions contains the optional parameters for the ScriptActionsClient.GetExecutionDetail method.
type ScriptActionsClientGetExecutionDetailResponse ¶ added in v0.2.0
type ScriptActionsClientGetExecutionDetailResponse struct { // The execution details of a script action. RuntimeScriptActionDetail }
ScriptActionsClientGetExecutionDetailResponse contains the response from method ScriptActionsClient.GetExecutionDetail.
type ScriptActionsClientListByClusterOptions ¶ added in v0.2.0
type ScriptActionsClientListByClusterOptions struct { }
ScriptActionsClientListByClusterOptions contains the optional parameters for the ScriptActionsClient.NewListByClusterPager method.
type ScriptActionsClientListByClusterResponse ¶ added in v0.2.0
type ScriptActionsClientListByClusterResponse struct { // The persisted script action for the cluster. ScriptActionsList }
ScriptActionsClientListByClusterResponse contains the response from method ScriptActionsClient.NewListByClusterPager.
type ScriptActionsList ¶
type ScriptActionsList struct { // The list of persisted script action details for the cluster. Value []*RuntimeScriptActionDetail // READ-ONLY; The link (url) to the next page of results. NextLink *string }
ScriptActionsList - The persisted script action for the cluster.
func (ScriptActionsList) MarshalJSON ¶
func (s ScriptActionsList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ScriptActionsList.
func (*ScriptActionsList) UnmarshalJSON ¶ added in v1.1.0
func (s *ScriptActionsList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ScriptActionsList.
type ScriptExecutionHistoryClient ¶
type ScriptExecutionHistoryClient struct {
// contains filtered or unexported fields
}
ScriptExecutionHistoryClient contains the methods for the ScriptExecutionHistory group. Don't use this type directly, use NewScriptExecutionHistoryClient() instead.
func NewScriptExecutionHistoryClient ¶
func NewScriptExecutionHistoryClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ScriptExecutionHistoryClient, error)
NewScriptExecutionHistoryClient creates a new instance of ScriptExecutionHistoryClient with the specified values.
- subscriptionID - The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ScriptExecutionHistoryClient) NewListByClusterPager ¶ added in v0.4.0
func (client *ScriptExecutionHistoryClient) NewListByClusterPager(resourceGroupName string, clusterName string, options *ScriptExecutionHistoryClientListByClusterOptions) *runtime.Pager[ScriptExecutionHistoryClientListByClusterResponse]
NewListByClusterPager - Lists all scripts' execution history for the specified cluster.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster.
- options - ScriptExecutionHistoryClientListByClusterOptions contains the optional parameters for the ScriptExecutionHistoryClient.NewListByClusterPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetScriptExecutionHistory.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewScriptExecutionHistoryClient().NewListByClusterPager("rg1", "cluster1", 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.ScriptActionExecutionHistoryList = armhdinsight.ScriptActionExecutionHistoryList{ // Value: []*armhdinsight.RuntimeScriptActionDetail{ // { // Name: to.Ptr("Test"), // ApplicationName: to.Ptr("app1"), // Roles: []*string{ // to.Ptr("headnode"), // to.Ptr("workernode")}, // URI: to.Ptr("http://testurl.com/install.ssh"), // EndTime: to.Ptr("2017-03-22T21:34:39.293"), // ExecutionSummary: []*armhdinsight.ScriptActionExecutionSummary{ // }, // Operation: to.Ptr("PostClusterCreateScriptActionRequest"), // ScriptExecutionID: to.Ptr[int64](391145124054712), // StartTime: to.Ptr("2017-03-22T21:34:39.293"), // Status: to.Ptr("ValidationFailed"), // }, // { // Name: to.Ptr("Test"), // ApplicationName: to.Ptr("app2"), // Roles: []*string{ // to.Ptr("headnode"), // to.Ptr("workernode")}, // URI: to.Ptr("http://testurl.com/install-script.ssh"), // EndTime: to.Ptr("2017-03-22T21:34:39.293"), // ExecutionSummary: []*armhdinsight.ScriptActionExecutionSummary{ // }, // Operation: to.Ptr("PostClusterCreateScriptActionRequest"), // ScriptExecutionID: to.Ptr[int64](391144597342127), // StartTime: to.Ptr("2017-03-22T21:34:39.293"), // Status: to.Ptr("ValidationFailed"), // }}, // } } }
Output:
func (*ScriptExecutionHistoryClient) Promote ¶
func (client *ScriptExecutionHistoryClient) Promote(ctx context.Context, resourceGroupName string, clusterName string, scriptExecutionID string, options *ScriptExecutionHistoryClientPromoteOptions) (ScriptExecutionHistoryClientPromoteResponse, error)
Promote - Promotes the specified ad-hoc script execution to a persisted script. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster.
- scriptExecutionID - The script execution Id
- options - ScriptExecutionHistoryClientPromoteOptions contains the optional parameters for the ScriptExecutionHistoryClient.Promote method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/PromoteLinuxHadoopScriptAction.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewScriptExecutionHistoryClient().Promote(ctx, "rg1", "cluster1", "391145124054712", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
type ScriptExecutionHistoryClientListByClusterOptions ¶ added in v0.2.0
type ScriptExecutionHistoryClientListByClusterOptions struct { }
ScriptExecutionHistoryClientListByClusterOptions contains the optional parameters for the ScriptExecutionHistoryClient.NewListByClusterPager method.
type ScriptExecutionHistoryClientListByClusterResponse ¶ added in v0.2.0
type ScriptExecutionHistoryClientListByClusterResponse struct { // The list script execution history response. ScriptActionExecutionHistoryList }
ScriptExecutionHistoryClientListByClusterResponse contains the response from method ScriptExecutionHistoryClient.NewListByClusterPager.
type ScriptExecutionHistoryClientPromoteOptions ¶ added in v0.2.0
type ScriptExecutionHistoryClientPromoteOptions struct { }
ScriptExecutionHistoryClientPromoteOptions contains the optional parameters for the ScriptExecutionHistoryClient.Promote method.
type ScriptExecutionHistoryClientPromoteResponse ¶ added in v0.2.0
type ScriptExecutionHistoryClientPromoteResponse struct { }
ScriptExecutionHistoryClientPromoteResponse contains the response from method ScriptExecutionHistoryClient.Promote.
type SecurityProfile ¶
type SecurityProfile struct { // The resource ID of the user's Azure Active Directory Domain Service. AaddsResourceID *string // Optional. The Distinguished Names for cluster user groups ClusterUsersGroupDNs []*string // The directory type. DirectoryType *DirectoryType // The organization's active directory domain. Domain *string // The domain admin password. DomainUserPassword *string // The domain user account that will have admin privileges on the cluster. DomainUsername *string // The LDAPS protocol URLs to communicate with the Active Directory. LdapsUrls []*string // User assigned identity that has permissions to read and create cluster-related artifacts in the user's AADDS. MsiResourceID *string // The organizational unit within the Active Directory to place the cluster and service accounts. OrganizationalUnitDN *string }
SecurityProfile - The security profile which contains Ssh public key for the HDInsight cluster.
func (SecurityProfile) MarshalJSON ¶
func (s SecurityProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SecurityProfile.
func (*SecurityProfile) UnmarshalJSON ¶ added in v1.1.0
func (s *SecurityProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SecurityProfile.
type ServiceSpecification ¶
type ServiceSpecification struct { // The metric specifications. MetricSpecifications []*MetricSpecifications }
ServiceSpecification - The specification of the service.
func (ServiceSpecification) MarshalJSON ¶
func (s ServiceSpecification) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServiceSpecification.
func (*ServiceSpecification) UnmarshalJSON ¶ added in v1.1.0
func (s *ServiceSpecification) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServiceSpecification.
type StorageAccount ¶
type StorageAccount struct { // The container in the storage account, only to be specified for WASB storage accounts. Container *string // The filesystem, only to be specified for Azure Data Lake Storage Gen 2. FileSystem *string Fileshare *string // Whether or not the storage account is the default storage account. IsDefault *bool // The storage account access key. Key *string // The managed identity (MSI) that is allowed to access the storage account, only to be specified for Azure Data Lake Storage // Gen 2. MsiResourceID *string // The name of the storage account. Name *string // The resource ID of storage account, only to be specified for Azure Data Lake Storage Gen 2. ResourceID *string // The shared access signature key. Saskey *string }
StorageAccount - The storage Account.
func (StorageAccount) MarshalJSON ¶ added in v1.1.0
func (s StorageAccount) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StorageAccount.
func (*StorageAccount) UnmarshalJSON ¶ added in v1.1.0
func (s *StorageAccount) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StorageAccount.
type StorageProfile ¶
type StorageProfile struct { // The list of storage accounts in the cluster. Storageaccounts []*StorageAccount }
StorageProfile - The storage profile.
func (StorageProfile) MarshalJSON ¶
func (s StorageProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StorageProfile.
func (*StorageProfile) UnmarshalJSON ¶ added in v1.1.0
func (s *StorageProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StorageProfile.
type SystemData ¶
type SystemData struct { // The timestamp of resource creation (UTC). CreatedAt *time.Time // The identity that created the resource. CreatedBy *string // The type of identity that created the resource. CreatedByType *CreatedByType // The timestamp of resource last modification (UTC) LastModifiedAt *time.Time // The identity that last modified the resource. LastModifiedBy *string // The type of identity that last modified the resource. LastModifiedByType *CreatedByType }
SystemData - Metadata pertaining to creation and last modification of the resource.
func (SystemData) MarshalJSON ¶
func (s SystemData) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SystemData.
func (*SystemData) UnmarshalJSON ¶
func (s *SystemData) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.
type Tier ¶
type Tier string
Tier - The cluster tier.
func PossibleTierValues ¶
func PossibleTierValues() []Tier
PossibleTierValues returns the possible values for the Tier const type.
type TrackedResource ¶
type TrackedResource struct { // REQUIRED; The geo-location where the resource lives Location *string // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
TrackedResource - The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'
func (TrackedResource) MarshalJSON ¶
func (t TrackedResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TrackedResource.
func (*TrackedResource) UnmarshalJSON ¶ added in v1.1.0
func (t *TrackedResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TrackedResource.
type UpdateClusterIdentityCertificateParameters ¶
type UpdateClusterIdentityCertificateParameters struct { // The application id. ApplicationID *string // The certificate in base64 encoded format. Certificate *string // The password of the certificate. CertificatePassword *string }
UpdateClusterIdentityCertificateParameters - The update cluster identity certificate request parameters.
func (UpdateClusterIdentityCertificateParameters) MarshalJSON ¶ added in v1.1.0
func (u UpdateClusterIdentityCertificateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UpdateClusterIdentityCertificateParameters.
func (*UpdateClusterIdentityCertificateParameters) UnmarshalJSON ¶ added in v1.1.0
func (u *UpdateClusterIdentityCertificateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UpdateClusterIdentityCertificateParameters.
type UpdateGatewaySettingsParameters ¶
type UpdateGatewaySettingsParameters struct { // Indicates whether or not the gateway settings based authorization is enabled. IsCredentialEnabled *bool // The gateway settings user password. Password *string // The gateway settings user name. UserName *string }
UpdateGatewaySettingsParameters - The update gateway settings request parameters.
func (UpdateGatewaySettingsParameters) MarshalJSON ¶ added in v1.1.0
func (u UpdateGatewaySettingsParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UpdateGatewaySettingsParameters.
func (*UpdateGatewaySettingsParameters) UnmarshalJSON ¶ added in v1.1.0
func (u *UpdateGatewaySettingsParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UpdateGatewaySettingsParameters.
type Usage ¶
type Usage struct { // The current usage. CurrentValue *int64 // The maximum allowed usage. Limit *int64 // The type of measurement for usage. Unit *string // READ-ONLY; The details about the localizable name of the used resource. Name *LocalizedName }
Usage - The details about the usage of a particular limited resource.
func (Usage) MarshalJSON ¶ added in v1.1.0
MarshalJSON implements the json.Marshaller interface for type Usage.
func (*Usage) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Usage.
type UsagesListResult ¶
type UsagesListResult struct { // The list of usages. Value []*Usage }
UsagesListResult - The response for the operation to get regional usages for a subscription.
func (UsagesListResult) MarshalJSON ¶
func (u UsagesListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UsagesListResult.
func (*UsagesListResult) UnmarshalJSON ¶ added in v1.1.0
func (u *UsagesListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UsagesListResult.
type UserAssignedIdentity ¶
type UserAssignedIdentity struct { // The tenant id of user assigned identity. TenantID *string // READ-ONLY; The client id of user assigned identity. ClientID *string // READ-ONLY; The principal id of user assigned identity. PrincipalID *string }
UserAssignedIdentity - The User Assigned Identity
func (UserAssignedIdentity) MarshalJSON ¶ added in v1.1.0
func (u UserAssignedIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentity.
func (*UserAssignedIdentity) UnmarshalJSON ¶ added in v1.1.0
func (u *UserAssignedIdentity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentity.
type VMSizeCompatibilityFilterV2 ¶
type VMSizeCompatibilityFilterV2 struct { // The list of cluster flavors under the effect of the filter. ClusterFlavors []*string // The list of cluster versions affected in Major.Minor format. ClusterVersions []*string // Whether support compute isolation. 'true' means only for ComputeIsolationEnabled, 'false' means only for regular cluster. ComputeIsolationSupported *string // Whether apply for ESP cluster. 'true' means only for ESP, 'false' means only for non-ESP, null or empty string or others // mean for both. EspApplied *string // The filtering mode. Effectively this can enabling or disabling the VM sizes in a particular set. FilterMode *FilterMode // The list of node types affected by the filter. NodeTypes []*string // The OSType affected, Windows or Linux. OSType []*OSType // The list of regions under the effect of the filter. Regions []*string // The list of virtual machine sizes to include or exclude. VMSizes []*string }
VMSizeCompatibilityFilterV2 - This class represent a single filter object that defines a multidimensional set. The dimensions of this set are Regions, ClusterFlavors, NodeTypes and ClusterVersions. The constraint should be defined based on the following: FilterMode (Exclude vs Include), VMSizes (the vm sizes in affect of exclusion/inclusion) and the ordering of the Filters. Later filters override previous settings if conflicted.
func (VMSizeCompatibilityFilterV2) MarshalJSON ¶
func (v VMSizeCompatibilityFilterV2) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VMSizeCompatibilityFilterV2.
func (*VMSizeCompatibilityFilterV2) UnmarshalJSON ¶ added in v1.1.0
func (v *VMSizeCompatibilityFilterV2) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VMSizeCompatibilityFilterV2.
type VMSizeProperty ¶
type VMSizeProperty struct { // The number of cores that the vm size has. Cores *int32 // The data disk storage tier of the vm size. DataDiskStorageTier *string // The label of the vm size. Label *string // The max data disk count of the vm size. MaxDataDiskCount *int64 // The memory whose unit is MB of the vm size. MemoryInMb *int64 // The vm size name. Name *string // This indicates this vm size is supported by virtual machines or not SupportedByVirtualMachines *bool // The indicates this vm size is supported by web worker roles or not SupportedByWebWorkerRoles *bool // The virtual machine resource disk size whose unit is MB of the vm size. VirtualMachineResourceDiskSizeInMb *int64 // The web worker resource disk size whose unit is MB of the vm size. WebWorkerResourceDiskSizeInMb *int64 }
VMSizeProperty - The vm size property
func (VMSizeProperty) MarshalJSON ¶ added in v1.1.0
func (v VMSizeProperty) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VMSizeProperty.
func (*VMSizeProperty) UnmarshalJSON ¶ added in v1.1.0
func (v *VMSizeProperty) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VMSizeProperty.
type ValidationErrorInfo ¶
type ValidationErrorInfo struct { // The error code. Code *string // The error resource. ErrorResource *string // The error message. Message *string // The message arguments MessageArguments []*string }
ValidationErrorInfo - The validation error information.
func (ValidationErrorInfo) MarshalJSON ¶
func (v ValidationErrorInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ValidationErrorInfo.
func (*ValidationErrorInfo) UnmarshalJSON ¶ added in v1.1.0
func (v *ValidationErrorInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ValidationErrorInfo.
type VersionSpec ¶
type VersionSpec struct { // The component version property. ComponentVersions map[string]*string // The display name DisplayName *string // The friendly name FriendlyName *string // Whether or not the version is the default version. IsDefault *bool }
VersionSpec - The version properties.
func (VersionSpec) MarshalJSON ¶
func (v VersionSpec) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VersionSpec.
func (*VersionSpec) UnmarshalJSON ¶ added in v1.1.0
func (v *VersionSpec) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VersionSpec.
type VersionsCapability ¶
type VersionsCapability struct { // The list of version capabilities. Available []*VersionSpec }
VersionsCapability - The version capability.
func (VersionsCapability) MarshalJSON ¶
func (v VersionsCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VersionsCapability.
func (*VersionsCapability) UnmarshalJSON ¶ added in v1.1.0
func (v *VersionsCapability) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VersionsCapability.
type VirtualMachinesClient ¶
type VirtualMachinesClient struct {
// contains filtered or unexported fields
}
VirtualMachinesClient contains the methods for the VirtualMachines group. Don't use this type directly, use NewVirtualMachinesClient() instead.
func NewVirtualMachinesClient ¶
func NewVirtualMachinesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachinesClient, error)
NewVirtualMachinesClient creates a new instance of VirtualMachinesClient with the specified values.
- subscriptionID - The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*VirtualMachinesClient) BeginRestartHosts ¶
func (client *VirtualMachinesClient) BeginRestartHosts(ctx context.Context, resourceGroupName string, clusterName string, hosts []*string, options *VirtualMachinesClientBeginRestartHostsOptions) (*runtime.Poller[VirtualMachinesClientRestartHostsResponse], error)
BeginRestartHosts - Restarts the specified HDInsight cluster hosts. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster.
- hosts - The list of hosts to restart
- options - VirtualMachinesClientBeginRestartHostsOptions contains the optional parameters for the VirtualMachinesClient.BeginRestartHosts method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/RestartVirtualMachinesOperation.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/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewVirtualMachinesClient().BeginRestartHosts(ctx, "rg1", "cluster1", []*string{ to.Ptr("gateway1"), to.Ptr("gateway3")}, 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 (*VirtualMachinesClient) GetAsyncOperationStatus ¶
func (client *VirtualMachinesClient) GetAsyncOperationStatus(ctx context.Context, resourceGroupName string, clusterName string, operationID string, options *VirtualMachinesClientGetAsyncOperationStatusOptions) (VirtualMachinesClientGetAsyncOperationStatusResponse, error)
GetAsyncOperationStatus - Gets the async operation status. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster.
- operationID - The long running operation id.
- options - VirtualMachinesClientGetAsyncOperationStatusOptions contains the optional parameters for the VirtualMachinesClient.GetAsyncOperationStatus method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetRestartHostsAsyncOperationStatus.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewVirtualMachinesClient().GetAsyncOperationStatus(ctx, "rg1", "cluster1", "CF938302-6B4D-44A0-A6D2-C0D67E847AEC", 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 = armhdinsight.AsyncOperationResult{ // Status: to.Ptr(armhdinsight.AsyncOperationStateInProgress), // } }
Output:
func (*VirtualMachinesClient) ListHosts ¶
func (client *VirtualMachinesClient) ListHosts(ctx context.Context, resourceGroupName string, clusterName string, options *VirtualMachinesClientListHostsOptions) (VirtualMachinesClientListHostsResponse, error)
ListHosts - Lists the HDInsight clusters hosts If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-06-01
- resourceGroupName - The name of the resource group.
- clusterName - The name of the cluster.
- options - VirtualMachinesClientListHostsOptions contains the optional parameters for the VirtualMachinesClient.ListHosts method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetClusterVirtualMachines.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armhdinsight.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewVirtualMachinesClient().ListHosts(ctx, "rg1", "cluster1", 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.HostInfoArray = []*armhdinsight.HostInfo{ // { // Name: to.Ptr("gateway1"), // }, // { // Name: to.Ptr("gateway3"), // }, // { // Name: to.Ptr("headnode0"), // }, // { // Name: to.Ptr("headnode3"), // }, // { // Name: to.Ptr("workernode0"), // }, // { // Name: to.Ptr("workernode1"), // }, // { // Name: to.Ptr("zookeepernode0"), // }, // { // Name: to.Ptr("zookeepernode2"), // }, // { // Name: to.Ptr("zookeepernode3"), // }} }
Output:
type VirtualMachinesClientBeginRestartHostsOptions ¶ added in v0.2.0
type VirtualMachinesClientBeginRestartHostsOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualMachinesClientBeginRestartHostsOptions contains the optional parameters for the VirtualMachinesClient.BeginRestartHosts method.
type VirtualMachinesClientGetAsyncOperationStatusOptions ¶ added in v0.2.0
type VirtualMachinesClientGetAsyncOperationStatusOptions struct { }
VirtualMachinesClientGetAsyncOperationStatusOptions contains the optional parameters for the VirtualMachinesClient.GetAsyncOperationStatus method.
type VirtualMachinesClientGetAsyncOperationStatusResponse ¶ added in v0.2.0
type VirtualMachinesClientGetAsyncOperationStatusResponse struct { // The azure async operation response. AsyncOperationResult }
VirtualMachinesClientGetAsyncOperationStatusResponse contains the response from method VirtualMachinesClient.GetAsyncOperationStatus.
type VirtualMachinesClientListHostsOptions ¶ added in v0.2.0
type VirtualMachinesClientListHostsOptions struct { }
VirtualMachinesClientListHostsOptions contains the optional parameters for the VirtualMachinesClient.ListHosts method.
type VirtualMachinesClientListHostsResponse ¶ added in v0.2.0
type VirtualMachinesClientListHostsResponse struct { // Result of the request to list cluster hosts HostInfoArray []*HostInfo }
VirtualMachinesClientListHostsResponse contains the response from method VirtualMachinesClient.ListHosts.
type VirtualMachinesClientRestartHostsResponse ¶ added in v0.2.0
type VirtualMachinesClientRestartHostsResponse struct { }
VirtualMachinesClientRestartHostsResponse contains the response from method VirtualMachinesClient.BeginRestartHosts.
type VirtualNetworkProfile ¶
type VirtualNetworkProfile struct { // The ID of the virtual network. ID *string // The name of the subnet. Subnet *string }
VirtualNetworkProfile - The virtual network properties.
func (VirtualNetworkProfile) MarshalJSON ¶ added in v1.1.0
func (v VirtualNetworkProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualNetworkProfile.
func (*VirtualNetworkProfile) UnmarshalJSON ¶ added in v1.1.0
func (v *VirtualNetworkProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkProfile.
Source Files ¶
- applications_client.go
- build.go
- client_factory.go
- clusters_client.go
- configurations_client.go
- constants.go
- extensions_client.go
- locations_client.go
- models.go
- models_serde.go
- operations_client.go
- options.go
- privateendpointconnections_client.go
- privatelinkresources_client.go
- response_types.go
- scriptactions_client.go
- scriptexecutionhistory_client.go
- time_rfc3339.go
- virtualmachines_client.go