當前位置: 首頁>>代碼示例>>Golang>>正文


Golang autorest.AsPost函數代碼示例

本文整理匯總了Golang中github.com/Azure/go-autorest/autorest.AsPost函數的典型用法代碼示例。如果您正苦於以下問題:Golang AsPost函數的具體用法?Golang AsPost怎麽用?Golang AsPost使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了AsPost函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: CheckNameAvailabilityRequestPreparer

// Create a Preparer by which to prepare the CheckNameAvailability request.
func (client StorageAccountsClient) CheckNameAvailabilityRequestPreparer() autorest.Preparer {
	return autorest.CreatePreparer(
		autorest.AsJSON(),
		autorest.AsPost(),
		autorest.WithBaseURL(client.BaseUri),
		autorest.WithPath("/subscriptions/{subscriptionId}/providers/Microsoft.Storage/checkNameAvailability"))
}
開發者ID:ritazh,項目名稱:azure_storage_service_broker,代碼行數:8,代碼來源:storageaccounts.go

示例2: RegenerateKeyRequestPreparer

// Create a Preparer by which to prepare the RegenerateKey request.
func (client StorageAccountsClient) RegenerateKeyRequestPreparer() autorest.Preparer {
	return autorest.CreatePreparer(
		autorest.AsJSON(),
		autorest.AsPost(),
		autorest.WithBaseURL(client.BaseUri),
		autorest.WithPath("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/regenerateKey"))
}
開發者ID:ritazh,項目名稱:azure_storage_service_broker,代碼行數:8,代碼來源:storageaccounts.go

示例3: RunRequestPreparer

// Create a Preparer by which to prepare the Run request.
func (client JobsClient) RunRequestPreparer() autorest.Preparer {
	return autorest.CreatePreparer(
		autorest.AsJSON(),
		autorest.AsPost(),
		autorest.WithBaseURL(client.BaseUri),
		autorest.WithPath("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs/{jobName}/run"))
}
開發者ID:Nepomuceno,項目名稱:azure-sdk-for-go,代碼行數:8,代碼來源:jobs.go

示例4: RegisterRequestPreparer

// Create a Preparer by which to prepare the Register request.
func (client FeaturesClient) RegisterRequestPreparer() autorest.Preparer {
	return autorest.CreatePreparer(
		autorest.AsJSON(),
		autorest.AsPost(),
		autorest.WithBaseURL(client.BaseUri),
		autorest.WithPath("/subscriptions/{subscriptionId}/providers/Microsoft.Features/providers/{resourceProviderNamespace}/features/{featureName}/register"))
}
開發者ID:Nepomuceno,項目名稱:azure-sdk-for-go,代碼行數:8,代碼來源:features.go

示例5: RegenerateSecretKeyRequestPreparer

// Create a Preparer by which to prepare the RegenerateSecretKey request.
func (client WorkflowAccessKeysClient) RegenerateSecretKeyRequestPreparer() autorest.Preparer {
	return autorest.CreatePreparer(
		autorest.AsJSON(),
		autorest.AsPost(),
		autorest.WithBaseURL(client.BaseUri),
		autorest.WithPath("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/accessKeys/{accessKeyName}/regenerate"))
}
開發者ID:Nepomuceno,項目名稱:azure-sdk-for-go,代碼行數:8,代碼來源:workflowaccesskeys.go

示例6: StopRequestPreparer

// Create a Preparer by which to prepare the Stop request.
func (client ApplicationGatewaysClient) StopRequestPreparer() autorest.Preparer {
	return autorest.CreatePreparer(
		autorest.AsJSON(),
		autorest.AsPost(),
		autorest.WithBaseURL(client.BaseUri),
		autorest.WithPath("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/stop"))
}
開發者ID:Nepomuceno,項目名稱:azure-sdk-for-go,代碼行數:8,代碼來源:applicationgateways.go

示例7: CancelRequestPreparer

// Create a Preparer by which to prepare the Cancel request.
func (client WorkflowRunsClient) CancelRequestPreparer() autorest.Preparer {
	return autorest.CreatePreparer(
		autorest.AsJSON(),
		autorest.AsPost(),
		autorest.WithBaseURL(client.BaseUri),
		autorest.WithPath("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/cancel"))
}
開發者ID:Nepomuceno,項目名稱:azure-sdk-for-go,代碼行數:8,代碼來源:workflowruns.go

示例8: ResetRequestPreparer

// Create a Preparer by which to prepare the Reset request.
func (client VirtualNetworkGatewaysClient) ResetRequestPreparer() autorest.Preparer {
	return autorest.CreatePreparer(
		autorest.AsJSON(),
		autorest.AsPost(),
		autorest.WithBaseURL(client.BaseUri),
		autorest.WithPath("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualnetworkgateways/{virtualNetworkGatewayName}/reset"))
}
開發者ID:Nepomuceno,項目名稱:azure-sdk-for-go,代碼行數:8,代碼來源:virtualnetworkgateways.go

示例9: ListRequestPreparer

// Create a Preparer by which to prepare the List request.
func (client AdminKeysClient) ListRequestPreparer() autorest.Preparer {
	return autorest.CreatePreparer(
		autorest.AsJSON(),
		autorest.AsPost(),
		autorest.WithBaseURL(client.BaseUri),
		autorest.WithPath("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{serviceName}/listAdminKeys"))
}
開發者ID:Nepomuceno,項目名稱:azure-sdk-for-go,代碼行數:8,代碼來源:adminkeys.go

示例10: InitiateDeviceAuth

// InitiateDeviceAuth initiates a device auth flow. It returns a DeviceCode
// that can be used with CheckForUserCompletion or WaitForUserCompletion.
func InitiateDeviceAuth(client *autorest.Client, oauthConfig OAuthConfig, clientID, resource string) (*DeviceCode, error) {
	req, _ := autorest.Prepare(
		&http.Request{},
		autorest.AsPost(),
		autorest.AsFormURLEncoded(),
		autorest.WithBaseURL(oauthConfig.DeviceCodeEndpoint.String()),
		autorest.WithFormData(url.Values{
			"client_id": []string{clientID},
			"resource":  []string{resource},
		}),
	)

	resp, err := client.Send(req)
	if err != nil {
		return nil, fmt.Errorf("%s %s: %s", logPrefix, errCodeSendingFails, err)
	}

	var code DeviceCode
	err = autorest.Respond(
		resp,
		autorest.WithErrorUnlessStatusCode(http.StatusOK),
		autorest.ByUnmarshallingJSON(&code),
		autorest.ByClosing())
	if err != nil {
		return nil, fmt.Errorf("%s %s: %s", logPrefix, errCodeHandlingFails, err)
	}

	code.ClientID = clientID
	code.Resource = resource
	code.OAuthConfig = oauthConfig

	return &code, nil
}
開發者ID:lvjp,項目名稱:packer,代碼行數:35,代碼來源:devicetoken.go

示例11: UnregisterRequestPreparer

// Create a Preparer by which to prepare the Unregister request.
func (client ProvidersClient) UnregisterRequestPreparer() autorest.Preparer {
	return autorest.CreatePreparer(
		autorest.AsJSON(),
		autorest.AsPost(),
		autorest.WithBaseURL(client.BaseUri),
		autorest.WithPath("/subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}/unregister"))
}
開發者ID:ritazh,項目名稱:azure_storage_service_broker,代碼行數:8,代碼來源:providers.go

示例12: StartRequestPreparer

// Create a Preparer by which to prepare the Start request.
func (client VirtualMachinesClient) StartRequestPreparer() autorest.Preparer {
	return autorest.CreatePreparer(
		autorest.AsJSON(),
		autorest.AsPost(),
		autorest.WithBaseURL(client.BaseUri),
		autorest.WithPath("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/start"))
}
開發者ID:Nepomuceno,項目名稱:azure-sdk-for-go,代碼行數:8,代碼來源:virtualmachines.go

示例13: MoveResourcesRequestPreparer

// Create a Preparer by which to prepare the MoveResources request.
func (client ResourcesClient) MoveResourcesRequestPreparer() autorest.Preparer {
	return autorest.CreatePreparer(
		autorest.AsJSON(),
		autorest.AsPost(),
		autorest.WithBaseURL(client.BaseUri),
		autorest.WithPath("/subscriptions/{subscriptionId}/resourceGroups/{sourceResourceGroupName}/moveResources"))
}
開發者ID:ritazh,項目名稱:azure_storage_service_broker,代碼行數:8,代碼來源:resources.go

示例14: ValidateRequestPreparer

// Create a Preparer by which to prepare the Validate request.
func (client DeploymentsClient) ValidateRequestPreparer() autorest.Preparer {
	return autorest.CreatePreparer(
		autorest.AsJSON(),
		autorest.AsPost(),
		autorest.WithBaseURL(client.BaseUri),
		autorest.WithPath("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.resources/deployments/{deploymentName}/validate"))
}
開發者ID:ritazh,項目名稱:azure_storage_service_broker,代碼行數:8,代碼來源:deployments.go

示例15: CancelRequestPreparer

// Create a Preparer by which to prepare the Cancel request.
func (client DeploymentsClient) CancelRequestPreparer() autorest.Preparer {
	return autorest.CreatePreparer(
		autorest.AsJSON(),
		autorest.AsPost(),
		autorest.WithBaseURL(client.BaseUri),
		autorest.WithPath("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/deployments/{deploymentName}/cancel"))
}
開發者ID:ritazh,項目名稱:azure_storage_service_broker,代碼行數:8,代碼來源:deployments.go


注:本文中的github.com/Azure/go-autorest/autorest.AsPost函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。