Struct: endpoints.Region

import "../ibm-cos-sdk-go/aws/endpoints"

Overview

A Region provides information about a region, and ability to resolve an endpoint from the context of a region, given a service.

Implemented Interfaces

s3crypto.Cipher, s3manager.ReadSeekerWriteTo, s3manager.WriterReadFrom

Method Summary collapse

Method Details

func (r Region) ID() string { return r.id }

ID returns the region's identifier.



378
379
380
381
382
383
384
385
386
387
388
// File 'aws/endpoints/endpoints.go', line 378

func (r Region) ID() string { return r.id } // Description returns the region's description. The region description // is free text, it can be empty, and it may change between SDK releases. func (r Region) Description() string { return r.desc } // ResolveEndpoint resolves an endpoint from the context of the region given // a service. See Partition.EndpointFor for usage and errors that can be returned. func (r Region) ResolveEndpoint(service string, opts ...func(*Options)) (ResolvedEndpoint, error) { return r.p.EndpointFor(service, r.id, opts...) }

func (r Region) Services() map[string]Service

Services returns a list of all services that are known to be in this region.



391
392
393
394
395
396
397
398
399
400
401
402
403
// File 'aws/endpoints/endpoints.go', line 391

func (r Region) Services() map[string]Service { ss := map[string]Service{} for id, s := range r.p.Services { if _, ok := s.Endpoints[endpointKey{Region: r.id}]; ok { ss[id] = Service{ id: id, p: r.p, } } } return ss }