Skip to content

Commit

Permalink
Update links to docs (Azure#22023)
Browse files Browse the repository at this point in the history
Removed language-specific references.
  • Loading branch information
jhendrixMSFT authored Nov 21, 2023
1 parent 189c10a commit c0bce11
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 32 deletions.
36 changes: 18 additions & 18 deletions sdk/data/aztables/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func main() {
```

##### Creating the client from a SAS token
To use a [shared access signature (SAS) token][azure_sas_token], provide the token as a string. If your account URL includes the SAS token, omit the credential parameter. You can generate a SAS token from the Azure Portal under [Shared access signature](https://docs.microsoft.com/rest/api/storageservices/create-service-sas) or use the `ServiceClient.GetAccountSASToken` or `Client.GetTableSASToken()` methods.
To use a [shared access signature (SAS) token][azure_sas_token], provide the token as a string. If your account URL includes the SAS token, omit the credential parameter. You can generate a SAS token from the Azure Portal under [Shared access signature](https://learn.microsoft.com/rest/api/storageservices/create-service-sas) or use the `ServiceClient.GetAccountSASToken` or `Client.GetTableSASToken()` methods.

```golang
import (
Expand Down Expand Up @@ -582,7 +582,7 @@ or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any
additional questions or comments.

### Additional documentation
For more extensive documentation on Azure Tables, see the [Azure Tables documentation][Tables_product_doc] on docs.microsoft.com.
For more extensive documentation on Azure Tables, see the [Azure Tables documentation][Tables_product_doc] on learn.microsoft.com.

## Known Issues
A list of currently known issues relating to Cosmos DB table endpoints can be found [here](https://aka.ms/tablesknownissues).
Expand All @@ -597,36 +597,36 @@ This project has adopted the [Microsoft Open Source Code of Conduct][msft_oss_co
<!-- LINKS -->
[source_code]:https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/data/aztables
[Tables_ref_docs]:https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/data/aztables
[Tables_product_doc]:https://docs.microsoft.com/azure/cosmos-db/table-introduction
[Tables_product_doc]:https://learn.microsoft.com/azure/cosmos-db/table-introduction

[azure_subscription]:https://azure.microsoft.com/free/
[azure_storage_account]:https://docs.microsoft.com/azure/storage/common/storage-account-create?tabs=azure-portal
[azure_cosmos_account]:https://docs.microsoft.com/azure/cosmos-db/create-cosmosdb-resources-portal
[azure_storage_account]:https://learn.microsoft.com/azure/storage/common/storage-account-create?tabs=azure-portal
[azure_cosmos_account]:https://learn.microsoft.com/azure/cosmos-db/create-cosmosdb-resources-portal
[pip_link]:https://pypi.org/project/pip/

[azure_create_cosmos]:https://docs.microsoft.com/azure/cosmos-db/create-cosmosdb-resources-portal
[azure_cli_create_cosmos]:https://docs.microsoft.com/azure/cosmos-db/scripts/cli/table/create
[azure_portal_create_cosmos]:https://docs.microsoft.com/azure/cosmos-db/create-cosmosdb-resources-portal
[azure_portal_create_account]:https://docs.microsoft.com/azure/storage/common/storage-account-create?tabs=azure-portal
[azure_powershell_create_account]:https://docs.microsoft.com/azure/storage/common/storage-account-create?tabs=azure-powershell
[azure_cli_create_account]: https://docs.microsoft.com/azure/storage/common/storage-account-create?tabs=azure-cli
[azure_create_cosmos]:https://learn.microsoft.com/azure/cosmos-db/create-cosmosdb-resources-portal
[azure_cli_create_cosmos]:https://learn.microsoft.com/azure/cosmos-db/scripts/cli/table/create
[azure_portal_create_cosmos]:https://learn.microsoft.com/azure/cosmos-db/create-cosmosdb-resources-portal
[azure_portal_create_account]:https://learn.microsoft.com/azure/storage/common/storage-account-create?tabs=azure-portal
[azure_powershell_create_account]:https://learn.microsoft.com/azure/storage/common/storage-account-create?tabs=azure-powershell
[azure_cli_create_account]: https://learn.microsoft.com/azure/storage/common/storage-account-create?tabs=azure-cli

[azure_cli_account_url]:https://docs.microsoft.com/cli/azure/storage/account?view=azure-cli-latest#az-storage-account-show
[azure_powershell_account_url]:https://docs.microsoft.com/powershell/module/az.storage/get-azstorageaccount?view=azps-4.6.1
[azure_portal_account_url]:https://docs.microsoft.com/azure/storage/common/storage-account-overview#storage-account-endpoints
[azure_cli_account_url]:https://learn.microsoft.com/cli/azure/storage/account?view=azure-cli-latest#az-storage-account-show
[azure_powershell_account_url]:https://learn.microsoft.com/powershell/module/az.storage/get-azstorageaccount?view=azps-4.6.1
[azure_portal_account_url]:https://learn.microsoft.com/azure/storage/common/storage-account-overview#storage-account-endpoints

[azure_sas_token]:https://docs.microsoft.com/azure/storage/common/storage-sas-overview
[azure_shared_key]:https://docs.microsoft.com/rest/api/storageservices/authorize-with-shared-key
[azure_sas_token]:https://learn.microsoft.com/azure/storage/common/storage-sas-overview
[azure_shared_key]:https://learn.microsoft.com/rest/api/storageservices/authorize-with-shared-key

[azure_core_ref_docs]:https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore
[azure_core_readme]: https://github.com/Azure/azure-sdk-for-go/blob/main/sdk/azcore/README.md

[tables_error_codes]: https://docs.microsoft.com/rest/api/storageservices/table-service-error-codes
[tables_error_codes]: https://learn.microsoft.com/rest/api/storageservices/table-service-error-codes

[msft_oss_coc]:https://opensource.microsoft.com/codeofconduct/
[msft_oss_coc_faq]:https://opensource.microsoft.com/codeofconduct/faq/
[contact_msft_oss]:mailto:opencode@microsoft.com

[tables_rest]: https://docs.microsoft.com/rest/api/storageservices/table-service-rest-api
[tables_rest]: https://learn.microsoft.com/rest/api/storageservices/table-service-rest-api

![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-go/sdk/data/aztables/README.png)
2 changes: 1 addition & 1 deletion sdk/data/aztables/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ func newListEntitiesPage(resp generated.TableClientQueryEntitiesResponse) (ListE
//
// NewListEntitiesPager returns a Pager, which allows iteration through each page of results. Use nil for listOptions if you want to use the default options.
// For more information about writing query strings, check out:
// - API Documentation: https://docs.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities
// - API Documentation: https://learn.microsoft.com/rest/api/storageservices/querying-tables-and-entities
// - README samples: https://github.com/Azure/azure-sdk-for-go/blob/main/sdk/data/aztables/README.md#writing-filters
func (t *Client) NewListEntitiesPager(listOptions *ListEntitiesOptions) *runtime.Pager[ListEntitiesResponse] {
if listOptions == nil {
Expand Down
2 changes: 1 addition & 1 deletion sdk/data/aztables/entity.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"time"
)

// https://docs.microsoft.com/en-us/rest/api/storageservices/payload-format-for-table-service-operations
// https://learn.microsoft.com/rest/api/storageservices/payload-format-for-table-service-operations

// Entity is the bare minimum properties for a valid Entity. These should be embedded in a custom struct.
type Entity struct {
Expand Down
2 changes: 1 addition & 1 deletion sdk/data/aztables/error_codes.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package aztables

// TableErrorCode is the error code returned by the service on failed operations. For more
// information about Table service error codes: https://docs.microsoft.com/en-us/rest/api/storageservices/table-service-error-codes
// information about Table service error codes: https://learn.microsoft.com/rest/api/storageservices/table-service-error-codes
type TableErrorCode string

const (
Expand Down
2 changes: 1 addition & 1 deletion sdk/data/aztables/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ func ExampleClient_NewListEntitiesPager() {
}

// For more information about writing query strings, check out:
// - API Documentation: https://docs.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities
// - API Documentation: https://learn.microsoft.com/rest/api/storageservices/querying-tables-and-entities
// - README samples: https://github.com/Azure/azure-sdk-for-go/blob/main/sdk/data/aztables/README.md#writing-filters
filter := fmt.Sprintf("PartitionKey eq '%s' or PartitionKey eq '%s'", "pk001", "pk002")
pager := client.NewListEntitiesPager(&aztables.ListEntitiesOptions{Filter: &filter})
Expand Down
4 changes: 2 additions & 2 deletions sdk/data/aztables/sas_account.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
var SASVersion = "2019-02-02"

// AccountSASSignatureValues is used to generate a Shared Access Signature (SAS) for an Azure Storage account.
// For more information, see https://docs.microsoft.com/rest/api/storageservices/constructing-an-account-sas
// For more information, see https://learn.microsoft.com/rest/api/storageservices/constructing-an-account-sas
type AccountSASSignatureValues struct {
Version string `param:"sv"` // If not specified, this defaults to SASVersion
Protocol SASProtocol `param:"spr"` // See the SASProtocol* constants
Expand All @@ -29,7 +29,7 @@ type AccountSASSignatureValues struct {

// Sign uses an account's SharedKeyCredential to sign this signature values to produce the proper SAS query parameters.
func (v AccountSASSignatureValues) Sign(sharedKeyCredential *SharedKeyCredential) (SASQueryParameters, error) {
// https://docs.microsoft.com/en-us/rest/api/storageservices/Constructing-an-Account-SAS
// https://learn.microsoft.com/rest/api/storageservices/Constructing-an-Account-SAS
if v.ExpiryTime.IsZero() || v.Permissions == "" || v.ResourceTypes == "" || v.Services == "" {
return SASQueryParameters{}, errors.New("account SAS is missing at least one of these: ExpiryTime, Permissions, Service, or ResourceType")
}
Expand Down
2 changes: 1 addition & 1 deletion sdk/data/aztables/sas_query_params.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func formatSASTime(t *time.Time, format string) string {
return t.Format(sasTimeFormat) // By default, "yyyy-MM-ddTHH:mm:ssZ" is used
}

// https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
// https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas

// SASQueryParameters represents the components that make up an Azure Storage SAS' query parameters.
// You parse a map of query parameters into its fields by calling Sign(). You add the components
Expand Down
4 changes: 2 additions & 2 deletions sdk/data/aztables/sas_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
)

// SASSignatureValues is used to generate a Shared Access Signature (SAS) for an Azure Table instance.
// For more information, see https://docs.microsoft.com/rest/api/storageservices/constructing-a-service-sas
// For more information, see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas
type SASSignatureValues struct {
Version string // If not specified, this defaults to SASVersion
Protocol SASProtocol // See the SASProtocol* constants
Expand Down Expand Up @@ -80,7 +80,7 @@ func (v SASSignatureValues) Sign(credential *SharedKeyCredential) (string, error

canonicalName := "/" + "table" + "/" + credential.AccountName() + "/" + lowerCaseTableName

// String to sign: http://msdn.microsoft.com/en-us/library/azure/dn140255.aspx
// String to sign: https://learn.microsoft.com/rest/api/storageservices/create-service-sas
stringToSign := strings.Join([]string{
v.Permissions,
startTime,
Expand Down
2 changes: 1 addition & 1 deletion sdk/data/aztables/service_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ func fromGeneratedTableResponseProperties(g *generated.TableResponseProperties)
//
// NewListTablesPager returns a Pager, which allows iteration through each page of results. Specify nil for listOptions if you want to use the default options.
// For more information about writing query strings, check out:
// - API Documentation: https://docs.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities
// - API Documentation: https://learn.microsoft.com/rest/api/storageservices/querying-tables-and-entities
// - README samples: https://github.com/Azure/azure-sdk-for-go/blob/main/sdk/data/aztables/README.md#writing-filters
func (t *ServiceClient) NewListTablesPager(listOptions *ListTablesOptions) *runtime.Pager[ListTablesResponse] {
if listOptions == nil {
Expand Down
6 changes: 3 additions & 3 deletions sdk/data/aztables/shared_policy_shared_key_credential.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func (c *SharedKeyCredential) computeHMACSHA256(message string) (string, error)
}

func (c *SharedKeyCredential) buildStringToSign(req *http.Request) (string, error) {
// https://docs.microsoft.com/en-us/rest/api/storageservices/authentication-for-the-azure-storage-services
// https://learn.microsoft.com/rest/api/storageservices/authentication-for-the-azure-storage-services
headers := req.Header

canonicalizedResource, err := c.buildCanonicalizedResource(req.URL)
Expand All @@ -77,14 +77,14 @@ func (c *SharedKeyCredential) buildStringToSign(req *http.Request) (string, erro
}

func (c *SharedKeyCredential) buildCanonicalizedResource(u *url.URL) (string, error) {
// https://docs.microsoft.com/en-us/rest/api/storageservices/authentication-for-the-azure-storage-services
// https://learn.microsoft.com/rest/api/storageservices/authentication-for-the-azure-storage-services
cr := bytes.NewBufferString("/")
cr.WriteString(c.accountName)

if len(u.Path) > 0 {
// Any portion of the CanonicalizedResource string that is derived from
// the resource's URI should be encoded exactly as it is in the URI.
// -- https://msdn.microsoft.com/en-gb/library/azure/dd179428.aspx
// -- https://learn.microsoft.com/rest/api/storageservices/authorize-requests-to-azure-storage
cr.WriteString(u.EscapedPath())
} else {
// a slash is required to indicate the root path
Expand Down
2 changes: 1 addition & 1 deletion sdk/data/aztables/transactional_batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ type SubmitTransactionOptions struct {
// All transactionActions must be for entities with the same PartitionKey. There can only be one transaction action
// for a RowKey, a duplicated row key will return an error. A storage account will return a 202 Accepted response
// when a transaction fails, the multipart data will have 4XX responses for the batch request that failed. For
// more information about error responses see https://docs.microsoft.com/en-us/rest/api/storageservices/performing-entity-group-transactions#sample-error-response
// more information about error responses see https://learn.microsoft.com/rest/api/storageservices/performing-entity-group-transactions#sample-error-response
func (t *Client) SubmitTransaction(ctx context.Context, transactionActions []TransactionAction, tableSubmitTransactionOptions *SubmitTransactionOptions) (TransactionResponse, error) {
var err error
ctx, endSpan := runtime.StartSpan(ctx, "Client.SubmitTransaction", t.client.Tracer(), nil)
Expand Down

0 comments on commit c0bce11

Please sign in to comment.