当前位置: 首页>>代码示例>>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;未经允许,请勿转载。