Managed Service for Microsoft Active Directory API v1 - Package cloud.google.com/go/managedidentities/apiv1 (v0.82.0)

Package managedidentities is an auto-generated package for the Managed Service for Microsoft Active Directory API.

The Managed Service for Microsoft Active Directory API is used for managing a highly available, hardened service running Microsoft Active Directory (AD).

Use of Context

The ctx passed to NewClient is used for authentication requests and for creating the underlying connection, but is not used for subsequent calls. Individual methods on the client use the ctx given to them.

To close the open connection, use the Close() method.

For information about setting deadlines, reusing contexts, and more please visit pkg.go.dev/cloud.google.com/go.

Functions

func DefaultAuthScopes

func DefaultAuthScopes() []string

DefaultAuthScopes reports the default set of authentication scopes to use with this package.

AttachTrustOperation

type AttachTrustOperation struct {
	// contains filtered or unexported fields
}

AttachTrustOperation manages a long-running operation from AttachTrust.

func (*AttachTrustOperation) Done

func (op *AttachTrustOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*AttachTrustOperation) Metadata

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*AttachTrustOperation) Name

func (op *AttachTrustOperation) Name() string

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*AttachTrustOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*AttachTrustOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

CallOptions

type CallOptions struct {
	CreateMicrosoftAdDomain []gax.CallOption
	ResetAdminPassword      []gax.CallOption
	ListDomains             []gax.CallOption
	GetDomain               []gax.CallOption
	UpdateDomain            []gax.CallOption
	DeleteDomain            []gax.CallOption
	AttachTrust             []gax.CallOption
	ReconfigureTrust        []gax.CallOption
	DetachTrust             []gax.CallOption
	ValidateTrust           []gax.CallOption
}

CallOptions contains the retry settings for each method of Client.

Client

type Client struct {

	// LROClient is used internally to handle longrunning operations.
	// It is exposed so that its CallOptions can be modified if required.
	// Users should not Close this client.
	LROClient *lroauto.OperationsClient

	// The call options for this service.
	CallOptions *CallOptions
	// contains filtered or unexported fields
}

Client is a client for interacting with Managed Service for Microsoft Active Directory API.

Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

func NewClient

func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error)

NewClient creates a new managed identities service client.

API Overview

The managedidentites.googleapis.com service implements the Google Cloud Managed Identites API for identity services (e.g. Microsoft Active Directory).

The Managed Identities service provides methods to manage (create/read/update/delete) domains, reset managed identities admin password, add/remove domain controllers in GCP regions and add/remove VPC peering.

Data Model

The Managed Identities service exposes the following resources:

Locations as global, named as follows: projects/{project_id}/locations/global.

Domains, named as follows: /projects/{project_id}/locations/global/domain/{domain_name}.

The {domain_name} refers to fully qualified domain name in the customer project e.g. mydomain.myorganization.com (at http://mydomain.myorganization.com), with the following restrictions:

Must contain only lowercase letters, numbers, periods and hyphens.

Must start with a letter.

Must contain between 2-64 characters.

Must end with a number or a letter.

Must not start with period.

First segement length (mydomain form example above) shouldn’t exceed 15 chars.

The last segment cannot be fully numeric.

Must be unique within the customer project.

Example

package main

import (
	"context"

	managedidentities "cloud.google.com/go/managedidentities/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := managedidentities.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use client.
	_ = c
}

func (*Client) AttachTrust

AttachTrust adds an AD trust to a domain.

Example

package main

import (
	"context"

	managedidentities "cloud.google.com/go/managedidentities/apiv1"

	managedidentitiespb "google.golang.org/genproto/googleapis/cloud/managedidentities/v1"
)

func main() {
	// import managedidentitiespb "google.golang.org/genproto/googleapis/cloud/managedidentities/v1"

	ctx := context.Background()
	c, err := managedidentities.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &managedidentitiespb.AttachTrustRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.AttachTrust(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*Client) AttachTrustOperation

func (c *Client) AttachTrustOperation(name string) *AttachTrustOperation

AttachTrustOperation returns a new AttachTrustOperation from a given name. The name must be that of a previously created AttachTrustOperation, possibly from a different process.

func (*Client) Close

func (c *Client) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*Client) Connection

func (c *Client) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*Client) CreateMicrosoftAdDomain

CreateMicrosoftAdDomain creates a Microsoft AD domain.

Example

package main

import (
	"context"

	managedidentities "cloud.google.com/go/managedidentities/apiv1"

	managedidentitiespb "google.golang.org/genproto/googleapis/cloud/managedidentities/v1"
)

func main() {
	// import managedidentitiespb "google.golang.org/genproto/googleapis/cloud/managedidentities/v1"

	ctx := context.Background()
	c, err := managedidentities.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &managedidentitiespb.CreateMicrosoftAdDomainRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.CreateMicrosoftAdDomain(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*Client) CreateMicrosoftAdDomainOperation

func (c *Client) CreateMicrosoftAdDomainOperation(name string) *CreateMicrosoftAdDomainOperation

CreateMicrosoftAdDomainOperation returns a new CreateMicrosoftAdDomainOperation from a given name. The name must be that of a previously created CreateMicrosoftAdDomainOperation, possibly from a different process.

func (*Client) DeleteDomain

DeleteDomain deletes a domain.

Example

package main

import (
	"context"

	managedidentities "cloud.google.com/go/managedidentities/apiv1"

	managedidentitiespb "google.golang.org/genproto/googleapis/cloud/managedidentities/v1"
)

func main() {
	// import managedidentitiespb "google.golang.org/genproto/googleapis/cloud/managedidentities/v1"

	ctx := context.Background()
	c, err := managedidentities.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &managedidentitiespb.DeleteDomainRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.DeleteDomain(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	err = op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*Client) DeleteDomainOperation

func (c *Client) DeleteDomainOperation(name string) *DeleteDomainOperation

DeleteDomainOperation returns a new DeleteDomainOperation from a given name. The name must be that of a previously created DeleteDomainOperation, possibly from a different process.

func (*Client) DetachTrust

DetachTrust removes an AD trust.

Example

package main

import (
	"context"

	managedidentities "cloud.google.com/go/managedidentities/apiv1"

	managedidentitiespb "google.golang.org/genproto/googleapis/cloud/managedidentities/v1"
)

func main() {
	// import managedidentitiespb "google.golang.org/genproto/googleapis/cloud/managedidentities/v1"

	ctx := context.Background()
	c, err := managedidentities.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &managedidentitiespb.DetachTrustRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.DetachTrust(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*Client) DetachTrustOperation

func (c *Client) DetachTrustOperation(name string) *DetachTrustOperation

DetachTrustOperation returns a new DetachTrustOperation from a given name. The name must be that of a previously created DetachTrustOperation, possibly from a different process.

func (*Client) GetDomain

GetDomain gets information about a domain.

Example

package main

import (
	"context"

	managedidentities "cloud.google.com/go/managedidentities/apiv1"

	managedidentitiespb "google.golang.org/genproto/googleapis/cloud/managedidentities/v1"
)

func main() {
	// import managedidentitiespb "google.golang.org/genproto/googleapis/cloud/managedidentities/v1"

	ctx := context.Background()
	c, err := managedidentities.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &managedidentitiespb.GetDomainRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.GetDomain(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*Client) ListDomains

ListDomains lists domains in a project.

Example

package main

import (
	"context"

	managedidentities "cloud.google.com/go/managedidentities/apiv1"
	"google.golang.org/api/iterator"

	managedidentitiespb "google.golang.org/genproto/googleapis/cloud/managedidentities/v1"
)

func main() {
	// import managedidentitiespb "google.golang.org/genproto/googleapis/cloud/managedidentities/v1"
	// import "google.golang.org/api/iterator"

	ctx := context.Background()
	c, err := managedidentities.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &managedidentitiespb.ListDomainsRequest{
		// TODO: Fill request struct fields.
	}
	it := c.ListDomains(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*Client) ReconfigureTrust

ReconfigureTrust updates the DNS conditional forwarder.

Example

package main

import (
	"context"

	managedidentities "cloud.google.com/go/managedidentities/apiv1"

	managedidentitiespb "google.golang.org/genproto/googleapis/cloud/managedidentities/v1"
)

func main() {
	// import managedidentitiespb "google.golang.org/genproto/googleapis/cloud/managedidentities/v1"

	ctx := context.Background()
	c, err := managedidentities.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &managedidentitiespb.ReconfigureTrustRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.ReconfigureTrust(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*Client) ReconfigureTrustOperation

func (c *Client) ReconfigureTrustOperation(name string) *ReconfigureTrustOperation

ReconfigureTrustOperation returns a new ReconfigureTrustOperation from a given name. The name must be that of a previously created ReconfigureTrustOperation, possibly from a different process.

func (*Client) ResetAdminPassword

ResetAdminPassword resets a domain’s administrator password.

Example

package main

import (
	"context"

	managedidentities "cloud.google.com/go/managedidentities/apiv1"

	managedidentitiespb "google.golang.org/genproto/googleapis/cloud/managedidentities/v1"
)

func main() {
	// import managedidentitiespb "google.golang.org/genproto/googleapis/cloud/managedidentities/v1"

	ctx := context.Background()
	c, err := managedidentities.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &managedidentitiespb.ResetAdminPasswordRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.ResetAdminPassword(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*Client) UpdateDomain

UpdateDomain updates the metadata and configuration of a domain.

Example

package main

import (
	"context"

	managedidentities "cloud.google.com/go/managedidentities/apiv1"

	managedidentitiespb "google.golang.org/genproto/googleapis/cloud/managedidentities/v1"
)

func main() {
	// import managedidentitiespb "google.golang.org/genproto/googleapis/cloud/managedidentities/v1"

	ctx := context.Background()
	c, err := managedidentities.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &managedidentitiespb.UpdateDomainRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.UpdateDomain(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*Client) UpdateDomainOperation

func (c *Client) UpdateDomainOperation(name string) *UpdateDomainOperation

UpdateDomainOperation returns a new UpdateDomainOperation from a given name. The name must be that of a previously created UpdateDomainOperation, possibly from a different process.

func (*Client) ValidateTrust

ValidateTrust validates a trust state, that the target domain is reachable, and that the target domain is able to accept incoming trust requests.

Example

package main

import (
	"context"

	managedidentities "cloud.google.com/go/managedidentities/apiv1"

	managedidentitiespb "google.golang.org/genproto/googleapis/cloud/managedidentities/v1"
)

func main() {
	// import managedidentitiespb "google.golang.org/genproto/googleapis/cloud/managedidentities/v1"

	ctx := context.Background()
	c, err := managedidentities.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &managedidentitiespb.ValidateTrustRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.ValidateTrust(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*Client) ValidateTrustOperation

func (c *Client) ValidateTrustOperation(name string) *ValidateTrustOperation

ValidateTrustOperation returns a new ValidateTrustOperation from a given name. The name must be that of a previously created ValidateTrustOperation, possibly from a different process.

CreateMicrosoftAdDomainOperation

type CreateMicrosoftAdDomainOperation struct {
	// contains filtered or unexported fields
}

CreateMicrosoftAdDomainOperation manages a long-running operation from CreateMicrosoftAdDomain.

func (*CreateMicrosoftAdDomainOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateMicrosoftAdDomainOperation) Metadata

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*CreateMicrosoftAdDomainOperation) Name

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*CreateMicrosoftAdDomainOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*CreateMicrosoftAdDomainOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteDomainOperation

type DeleteDomainOperation struct {
	// contains filtered or unexported fields
}

DeleteDomainOperation manages a long-running operation from DeleteDomain.

func (*DeleteDomainOperation) Done

func (op *DeleteDomainOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*DeleteDomainOperation) Metadata

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteDomainOperation) Name

func (op *DeleteDomainOperation) Name() string

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteDomainOperation) Poll

func (op *DeleteDomainOperation) Poll(ctx context.Context, opts ...gax.CallOption) error

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteDomainOperation) Wait

func (op *DeleteDomainOperation) Wait(ctx context.Context, opts ...gax.CallOption) error

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DetachTrustOperation

type DetachTrustOperation struct {
	// contains filtered or unexported fields
}

DetachTrustOperation manages a long-running operation from DetachTrust.

func (*DetachTrustOperation) Done

func (op *DetachTrustOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*DetachTrustOperation) Metadata

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*DetachTrustOperation) Name

func (op *DetachTrustOperation) Name() string

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*DetachTrustOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DetachTrustOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DomainIterator

type DomainIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*managedidentitiespb.Domain, nextPageToken string, err error)
	// contains filtered or unexported fields
}

DomainIterator manages a stream of *managedidentitiespb.Domain.

func (*DomainIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*DomainIterator) PageInfo

func (it *DomainIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

ReconfigureTrustOperation

type ReconfigureTrustOperation struct {
	// contains filtered or unexported fields
}

ReconfigureTrustOperation manages a long-running operation from ReconfigureTrust.

func (*ReconfigureTrustOperation) Done

func (op *ReconfigureTrustOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*ReconfigureTrustOperation) Metadata

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*ReconfigureTrustOperation) Name

func (op *ReconfigureTrustOperation) Name() string

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*ReconfigureTrustOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*ReconfigureTrustOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

UpdateDomainOperation

type UpdateDomainOperation struct {
	// contains filtered or unexported fields
}

UpdateDomainOperation manages a long-running operation from UpdateDomain.

func (*UpdateDomainOperation) Done

func (op *UpdateDomainOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*UpdateDomainOperation) Metadata

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*UpdateDomainOperation) Name

func (op *UpdateDomainOperation) Name() string

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*UpdateDomainOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*UpdateDomainOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

ValidateTrustOperation

type ValidateTrustOperation struct {
	// contains filtered or unexported fields
}

ValidateTrustOperation manages a long-running operation from ValidateTrust.

func (*ValidateTrustOperation) Done

func (op *ValidateTrustOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*ValidateTrustOperation) Metadata

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*ValidateTrustOperation) Name

func (op *ValidateTrustOperation) Name() string

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*ValidateTrustOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*ValidateTrustOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.