Class: Aws::CodeCatalyst::Client

Inherits:
Seahorse::Client::Base show all
Includes:
Aws::ClientStubs
Defined in:
gems/aws-sdk-codecatalyst/lib/aws-sdk-codecatalyst/client.rb

Overview

An API client for CodeCatalyst. To construct a client, you need to configure a :region and :credentials.

client = Aws::CodeCatalyst::Client.new(
  region: region_name,
  credentials: credentials,
  # ...
)

For details on configuring region and credentials see the developer guide.

See #initialize for a full list of supported configuration options.

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from Aws::ClientStubs

#api_requests, #stub_data, #stub_responses

Methods inherited from Seahorse::Client::Base

add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(options) ⇒ Client

Returns a new instance of Client.

Parameters:

  • options (Hash)

Options Hash (options):

  • :credentials (required, Aws::CredentialProvider)

    Your AWS credentials. This can be an instance of any one of the following classes:

    • Aws::Credentials - Used for configuring static, non-refreshing credentials.

    • Aws::SharedCredentials - Used for loading static credentials from a shared file, such as ~/.aws/config.

    • Aws::AssumeRoleCredentials - Used when you need to assume a role.

    • Aws::AssumeRoleWebIdentityCredentials - Used when you need to assume a role after providing credentials via the web.

    • Aws::SSOCredentials - Used for loading credentials from AWS SSO using an access token generated from aws login.

    • Aws::ProcessCredentials - Used for loading credentials from a process that outputs to stdout.

    • Aws::InstanceProfileCredentials - Used for loading credentials from an EC2 IMDS on an EC2 instance.

    • Aws::ECSCredentials - Used for loading credentials from instances running in ECS.

    • Aws::CognitoIdentityCredentials - Used for loading credentials from the Cognito Identity service.

    When :credentials are not configured directly, the following locations will be searched for credentials:

    • Aws.config[:credentials]
    • The :access_key_id, :secret_access_key, and :session_token options.
    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
    • ~/.aws/credentials
    • ~/.aws/config
    • EC2/ECS IMDS instance profile - When used by default, the timeouts are very aggressive. Construct and pass an instance of Aws::InstanceProfileCredentails or Aws::ECSCredentials to enable retries and extended timeouts. Instance profile credential fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED'] to true.
  • :region (required, String)

    The AWS region to connect to. The configured :region is used to determine the service :endpoint. When not passed, a default :region is searched for in the following locations:

    • Aws.config[:region]
    • ENV['AWS_REGION']
    • ENV['AMAZON_REGION']
    • ENV['AWS_DEFAULT_REGION']
    • ~/.aws/credentials
    • ~/.aws/config
  • :access_key_id (String)
  • :active_endpoint_cache (Boolean) — default: false

    When set to true, a thread polling for endpoints will be running in the background every 60 secs (default). Defaults to false.

  • :adaptive_retry_wait_to_fill (Boolean) — default: true

    Used only in adaptive retry mode. When true, the request will sleep until there is sufficent client side capacity to retry the request. When false, the request will raise a RetryCapacityNotAvailableError and will not retry instead of sleeping.

  • :client_side_monitoring (Boolean) — default: false

    When true, client-side metrics will be collected for all API requests from this client.

  • :client_side_monitoring_client_id (String) — default: ""

    Allows you to provide an identifier for this client which will be attached to all generated client side metrics. Defaults to an empty string.

  • :client_side_monitoring_host (String) — default: "127.0.0.1"

    Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_port (Integer) — default: 31000

    Required for publishing client metrics. The port that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher) — default: Aws::ClientSideMonitoring::Publisher

    Allows you to provide a custom client-side monitoring publisher class. By default, will use the Client Side Monitoring Agent Publisher.

  • :convert_params (Boolean) — default: true

    When true, an attempt is made to coerce request parameters into the required types.

  • :correct_clock_skew (Boolean) — default: true

    Used only in standard and adaptive retry modes. Specifies whether to apply a clock skew correction and retry requests with skewed client clocks.

  • :defaults_mode (String) — default: "legacy"

    See DefaultsModeConfiguration for a list of the accepted modes and the configuration defaults that are included.

  • :disable_host_prefix_injection (Boolean) — default: false

    Set to true to disable SDK automatically adding host prefix to default service endpoint when available.

  • :endpoint (String)

    The client endpoint is normally constructed from the :region option. You should only configure an :endpoint when connecting to test or custom endpoints. This should be a valid HTTP(S) URI.

  • :endpoint_cache_max_entries (Integer) — default: 1000

    Used for the maximum size limit of the LRU cache storing endpoints data for endpoint discovery enabled operations. Defaults to 1000.

  • :endpoint_cache_max_threads (Integer) — default: 10

    Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.

  • :endpoint_cache_poll_interval (Integer) — default: 60

    When :endpoint_discovery and :active_endpoint_cache is enabled, Use this option to config the time interval in seconds for making requests fetching endpoints information. Defaults to 60 sec.

  • :endpoint_discovery (Boolean) — default: false

    When set to true, endpoint discovery will be enabled for operations when available.

  • :log_formatter (Aws::Log::Formatter) — default: Aws::Log::Formatter.default

    The log formatter.

  • :log_level (Symbol) — default: :info

    The log level to send messages to the :logger at.

  • :logger (Logger)

    The Logger instance to send log messages to. If this option is not set, logging will be disabled.

  • :max_attempts (Integer) — default: 3

    An integer representing the maximum number attempts that will be made for a single request, including the initial attempt. For example, setting this value to 5 will result in a request being retried up to 4 times. Used in standard and adaptive retry modes.

  • :profile (String) — default: "default"

    Used when loading credentials from the shared credentials file at HOME/.aws/credentials. When not specified, 'default' is used.

  • :retry_backoff (Proc)

    A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay. This option is only used in the legacy retry mode.

  • :retry_base_delay (Float) — default: 0.3

    The base delay in seconds used by the default backoff function. This option is only used in the legacy retry mode.

  • :retry_jitter (Symbol) — default: :none

    A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number. This option is only used in the legacy retry mode.

    @see https://www.awsarchitectureblog.com/2015/03/backoff.html

  • :retry_limit (Integer) — default: 3

    The maximum number of times to retry failed requests. Only ~ 500 level server errors and certain ~ 400 level client errors are retried. Generally, these are throttling errors, data checksum errors, networking errors, timeout errors, auth errors, endpoint discovery, and errors from expired credentials. This option is only used in the legacy retry mode.

  • :retry_max_delay (Integer) — default: 0

    The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function. This option is only used in the legacy retry mode.

  • :retry_mode (String) — default: "legacy"

    Specifies which retry algorithm to use. Values are:

    • legacy - The pre-existing retry behavior. This is default value if no retry mode is provided.

    • standard - A standardized set of retry rules across the AWS SDKs. This includes support for retry quotas, which limit the number of unsuccessful retries a client can make.

    • adaptive - An experimental retry mode that includes all the functionality of standard mode along with automatic client side throttling. This is a provisional mode that may change behavior in the future.

  • :secret_access_key (String)
  • :session_token (String)
  • :stub_responses (Boolean) — default: false

    Causes the client to return stubbed responses. By default fake responses are generated and returned. You can specify the response data to return or errors to raise by calling Aws::ClientStubs#stub_responses. See Aws::ClientStubs for more information.

    Please note When response stubbing is enabled, no HTTP requests are made, and retries are disabled.

  • :token_provider (Aws::TokenProvider)

    A Bearer Token Provider. This can be an instance of any one of the following classes:

    • Aws::StaticTokenProvider - Used for configuring static, non-refreshing tokens.

    • Aws::SSOTokenProvider - Used for loading tokens from AWS SSO using an access token generated from aws login.

    When :token_provider is not configured directly, the Aws::TokenProviderChain will be used to search for tokens configured for your profile in shared configuration files.

  • :use_dualstack_endpoint (Boolean)

    When set to true, dualstack enabled endpoints (with .aws TLD) will be used if available.

  • :use_fips_endpoint (Boolean)

    When set to true, fips compatible endpoints will be used if available. When a fips region is used, the region is normalized and this config is set to true.

  • :validate_params (Boolean) — default: true

    When true, request parameters are validated before sending the request.

  • :endpoint_provider (Aws::CodeCatalyst::EndpointProvider)

    The endpoint provider used to resolve endpoints. Any object that responds to #resolve_endpoint(parameters) where parameters is a Struct similar to Aws::CodeCatalyst::EndpointParameters

  • :http_proxy (URI::HTTP, String)

    A proxy to send requests through. Formatted like 'http://proxy.com:123'.

  • :http_open_timeout (Float) — default: 15

    The number of seconds to wait when opening a HTTP session before raising a Timeout::Error.

  • :http_read_timeout (Float) — default: 60

    The default number of seconds to wait for response data. This value can safely be set per-request on the session.

  • :http_idle_timeout (Float) — default: 5

    The number of seconds a connection is allowed to sit idle before it is considered stale. Stale connections are closed and removed from the pool before making a request.

  • :http_continue_timeout (Float) — default: 1

    The number of seconds to wait for a 100-continue response before sending the request body. This option has no effect unless the request has "Expect" header set to "100-continue". Defaults to nil which disables this behaviour. This value can safely be set per request on the session.

  • :ssl_timeout (Float) — default: nil

    Sets the SSL timeout in seconds.

  • :http_wire_trace (Boolean) — default: false

    When true, HTTP debug output will be sent to the :logger.

  • :ssl_verify_peer (Boolean) — default: true

    When true, SSL peer certificates are verified when establishing a connection.

  • :ssl_ca_bundle (String)

    Full path to the SSL certificate authority bundle file that should be used when verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.

  • :ssl_ca_directory (String)

    Full path of the directory that contains the unbundled SSL certificate authority files for verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.



365
366
367
# File 'gems/aws-sdk-codecatalyst/lib/aws-sdk-codecatalyst/client.rb', line 365

def initialize(*args)
  super
end

Instance Method Details

#create_access_token(params = {}) ⇒ Types::CreateAccessTokenResponse

Creates a personal access token (PAT) for the current user. A personal access token (PAT) is similar to a password. It is associated with your user identity for use across all spaces and projects in Amazon CodeCatalyst. You use PATs to access CodeCatalyst from resources that include integrated development environments (IDEs) and Git-based source repositories. PATs represent you in Amazon CodeCatalyst and you can manage them in your user settings.For more information, see Managing personal access tokens in Amazon CodeCatalyst.

Examples:

Request syntax with placeholder values


resp = client.create_access_token({
  name: "AccessTokenName", # required
  expires_time: Time.now,
})

Response structure


resp.secret #=> String
resp.name #=> String
resp.expires_time #=> Time
resp.access_token_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :name (required, String)

    The friendly name of the personal access token.

  • :expires_time (Time, DateTime, Date, Integer, String)

    The date and time the personal access token expires, in coordinated universal time (UTC) timestamp format as specified in RFC 3339.

Returns:

See Also:



420
421
422
423
# File 'gems/aws-sdk-codecatalyst/lib/aws-sdk-codecatalyst/client.rb', line 420

def create_access_token(params = {}, options = {})
  req = build_request(:create_access_token, params)
  req.send_request(options)
end

#create_dev_environment(params = {}) ⇒ Types::CreateDevEnvironmentResponse

Creates a Dev Environment in Amazon CodeCatalyst, a cloud-based development environment that you can use to quickly work on the code stored in the source repositories of your project.

When created in the Amazon CodeCatalyst console, by default a Dev Environment is configured to have a 2 core processor, 4GB of RAM, and 16GB of persistent storage. None of these defaults apply to a Dev Environment created programmatically.

Examples:

Request syntax with placeholder values


resp = client.create_dev_environment({
  space_name: "NameString", # required
  project_name: "NameString", # required
  repositories: [
    {
      repository_name: "SourceRepositoryNameString", # required
      branch_name: "SourceRepositoryBranchString",
    },
  ],
  client_token: "ClientToken",
  alias: "CreateDevEnvironmentRequestAliasString",
  ides: [
    {
      runtime: "IdeConfigurationRuntimeString",
      name: "IdeConfigurationNameString",
    },
  ],
  instance_type: "dev.standard1.small", # required, accepts dev.standard1.small, dev.standard1.medium, dev.standard1.large, dev.standard1.xlarge
  inactivity_timeout_minutes: 1,
  persistent_storage: { # required
    size_in_gi_b: 1, # required
  },
})

Response structure


resp.space_name #=> String
resp.project_name #=> String
resp.id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :space_name (required, String)

    The name of the space.

  • :project_name (required, String)

    The name of the project in the space.

  • :repositories (Array<Types::RepositoryInput>)

    The source repository that contains the branch to clone into the Dev Environment.

  • :client_token (String)

    A user-specified idempotency token. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, the subsequent retries return the result from the original successful request and have no additional effect.

  • :alias (String)

    The user-defined alias for a Dev Environment.

  • :ides (Array<Types::IdeConfiguration>)

    Information about the integrated development environment (IDE) configured for a Dev Environment.

    An IDE is required to create a Dev Environment. For Dev Environment creation, this field contains configuration information and must be provided.

  • :instance_type (required, String)

    The Amazon EC2 instace type to use for the Dev Environment.

  • :inactivity_timeout_minutes (Integer)

    The amount of time the Dev Environment will run without any activity detected before stopping, in minutes. Only whole integers are allowed. Dev Environments consume compute minutes when running.

  • :persistent_storage (required, Types::PersistentStorageConfiguration)

    Information about the amount of storage allocated to the Dev Environment.

    By default, a Dev Environment is configured to have 16GB of persistent storage when created from the Amazon CodeCatalyst console, but there is no default when programmatically creating a Dev Environment. Valid values for persistent storage are based on memory sizes in 16GB increments. Valid values are 16, 32, and 64.

Returns:

See Also:



528
529
530
531
# File 'gems/aws-sdk-codecatalyst/lib/aws-sdk-codecatalyst/client.rb', line 528

def create_dev_environment(params = {}, options = {})
  req = build_request(:create_dev_environment, params)
  req.send_request(options)
end

#create_project(params = {}) ⇒ Types::CreateProjectResponse

Creates a project in a specified space.

Examples:

Request syntax with placeholder values


resp = client.create_project({
  space_name: "NameString", # required
  display_name: "ProjectDisplayName", # required
  description: "ProjectDescription",
})

Response structure


resp.space_name #=> String
resp.name #=> String
resp.display_name #=> String
resp.description #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :space_name (required, String)

    The name of the space.

  • :display_name (required, String)

    The friendly name of the project that will be displayed to users.

  • :description (String)

    The description of the project. This description will be displayed to all users of the project. We recommend providing a brief description of the project and its intended purpose.

Returns:

See Also:



572
573
574
575
# File 'gems/aws-sdk-codecatalyst/lib/aws-sdk-codecatalyst/client.rb', line 572

def create_project(params = {}, options = {})
  req = build_request(:create_project, params)
  req.send_request(options)
end

#create_source_repository_branch(params = {}) ⇒ Types::CreateSourceRepositoryBranchResponse

Creates a branch in a specified source repository in Amazon CodeCatalyst.

This API only creates a branch in a source repository hosted in Amazon CodeCatalyst. You cannot use this API to create a branch in a linked repository.

Examples:

Request syntax with placeholder values


resp = client.create_source_repository_branch({
  space_name: "NameString", # required
  project_name: "NameString", # required
  source_repository_name: "SourceRepositoryNameString", # required
  name: "SourceRepositoryBranchString", # required
  head_commit_id: "String",
})

Response structure


resp.ref #=> String
resp.name #=> String
resp.last_updated_time #=> Time
resp.head_commit_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :space_name (required, String)

    The name of the space.

  • :project_name (required, String)

    The name of the project in the space.

  • :source_repository_name (required, String)

    The name of the repository where you want to create a branch.

  • :name (required, String)

    The name for the branch you're creating.

  • :head_commit_id (String)

    The commit ID in an existing branch from which you want to create the new branch.

Returns:

See Also:



630
631
632
633
# File 'gems/aws-sdk-codecatalyst/lib/aws-sdk-codecatalyst/client.rb', line 630

def create_source_repository_branch(params = {}, options = {})
  req = build_request(:create_source_repository_branch, params)
  req.send_request(options)
end

#delete_access_token(params = {}) ⇒ Struct

Deletes a specified personal access token (PAT). A personal access token can only be deleted by the user who created it.

Examples:

Request syntax with placeholder values


resp = client.delete_access_token({
  id: "AccessTokenId", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :id (required, String)

    The ID of the personal access token to delete. You can find the IDs of all PATs associated with your Amazon Web Services Builder ID in a space by calling ListAccessTokens.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



655
656
657
658
# File 'gems/aws-sdk-codecatalyst/lib/aws-sdk-codecatalyst/client.rb', line 655

def delete_access_token(params = {}, options = {})
  req = build_request(:delete_access_token, params)
  req.send_request(options)
end

#delete_dev_environment(params = {}) ⇒ Types::DeleteDevEnvironmentResponse

Deletes a Dev Environment.

Examples:

Request syntax with placeholder values


resp = client.delete_dev_environment({
  space_name: "NameString", # required
  project_name: "NameString", # required
  id: "Uuid", # required
})

Response structure


resp.space_name #=> String
resp.project_name #=> String
resp.id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :space_name (required, String)

    The name of the space.

  • :project_name (required, String)

    The name of the project in the space.

  • :id (required, String)

    The system-generated unique ID of the Dev Environment you want to delete. To retrieve a list of Dev Environment IDs, use ListDevEnvironments.

Returns:

See Also:



697
698
699
700
# File 'gems/aws-sdk-codecatalyst/lib/aws-sdk-codecatalyst/client.rb', line 697

def delete_dev_environment(params = {}, options = {})
  req = build_request(:delete_dev_environment, params)
  req.send_request(options)
end

#get_dev_environment(params = {}) ⇒ Types::GetDevEnvironmentResponse

Returns information about a Dev Environment for a source repository in a project. Dev Environments are specific to the user who creates them.

Examples:

Request syntax with placeholder values


resp = client.get_dev_environment({
  space_name: "NameString", # required
  project_name: "NameString", # required
  id: "Uuid", # required
})

Response structure


resp.space_name #=> String
resp.project_name #=> String
resp.id #=> String
resp.last_updated_time #=> Time
resp.creator_id #=> String
resp.status #=> String, one of "PENDING", "RUNNING", "STARTING", "STOPPING", "STOPPED", "FAILED", "DELETING", "DELETED"
resp.status_reason #=> String
resp.repositories #=> Array
resp.repositories[0].repository_name #=> String
resp.repositories[0].branch_name #=> String
resp.alias #=> String
resp.ides #=> Array
resp.ides[0].runtime #=> String
resp.ides[0].name #=> String
resp.instance_type #=> String, one of "dev.standard1.small", "dev.standard1.medium", "dev.standard1.large", "dev.standard1.xlarge"
resp.inactivity_timeout_minutes #=> Integer
resp.persistent_storage.size_in_gi_b #=> Integer

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :space_name (required, String)

    The name of the space.

  • :project_name (required, String)

    The name of the project in the space.

  • :id (required, String)

    The system-generated unique ID of the Dev Environment for which you want to view information. To retrieve a list of Dev Environment IDs, use ListDevEnvironments.

Returns:

See Also:



764
765
766
767
# File 'gems/aws-sdk-codecatalyst/lib/aws-sdk-codecatalyst/client.rb', line 764

def get_dev_environment(params = {}, options = {})
  req = build_request(:get_dev_environment, params)
  req.send_request(options)
end

#get_project(params = {}) ⇒ Types::GetProjectResponse

Returns information about a project.

Examples:

Request syntax with placeholder values


resp = client.get_project({
  space_name: "NameString", # required
  name: "NameString", # required
})

Response structure


resp.space_name #=> String
resp.name #=> String
resp.display_name #=> String
resp.description #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :space_name (required, String)

    The name of the space.

  • :name (required, String)

    The name of the project in the space.

Returns:

See Also:



802
803
804
805
# File 'gems/aws-sdk-codecatalyst/lib/aws-sdk-codecatalyst/client.rb', line 802

def get_project(params = {}, options = {})
  req = build_request(:get_project, params)
  req.send_request(options)
end

#get_source_repository_clone_urls(params = {}) ⇒ Types::GetSourceRepositoryCloneUrlsResponse

Returns information about the URLs that can be used with a Git client to clone a source repository.

Examples:

Request syntax with placeholder values


resp = client.get_source_repository_clone_urls({
  space_name: "NameString", # required
  project_name: "NameString", # required
  source_repository_name: "SourceRepositoryNameString", # required
})

Response structure


resp.https #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :space_name (required, String)

    The name of the space.

  • :project_name (required, String)

    The name of the project in the space.

  • :source_repository_name (required, String)

    The name of the source repository.

Returns:

See Also:



839
840
841
842
# File 'gems/aws-sdk-codecatalyst/lib/aws-sdk-codecatalyst/client.rb', line 839

def get_source_repository_clone_urls(params = {}, options = {})
  req = build_request(:get_source_repository_clone_urls, params)
  req.send_request(options)
end

#get_space(params = {}) ⇒ Types::GetSpaceResponse

Returns information about an space.

Examples:

Request syntax with placeholder values


resp = client.get_space({
  name: "NameString", # required
})

Response structure


resp.name #=> String
resp.region_name #=> String
resp.display_name #=> String
resp.description #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :name (required, String)

    The name of the space.

Returns:

See Also:



873
874
875
876
# File 'gems/aws-sdk-codecatalyst/lib/aws-sdk-codecatalyst/client.rb', line 873

def get_space(params = {}, options = {})
  req = build_request(:get_space, params)
  req.send_request(options)
end

#get_subscription(params = {}) ⇒ Types::GetSubscriptionResponse

Returns information about the Amazon Web Services account used for billing purposes and the billing plan for the space.

Examples:

Request syntax with placeholder values


resp = client.get_subscription({
  space_name: "NameString", # required
})

Response structure


resp.subscription_type #=> String
resp. #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :space_name (required, String)

    The name of the space.

Returns:

See Also:



904
905
906
907
# File 'gems/aws-sdk-codecatalyst/lib/aws-sdk-codecatalyst/client.rb', line 904

def get_subscription(params = {}, options = {})
  req = build_request(:get_subscription, params)
  req.send_request(options)
end

#get_user_details(params = {}) ⇒ Types::GetUserDetailsResponse

Returns information about a user.

Examples:

Request syntax with placeholder values


resp = client.get_user_details({
  id: "GetUserDetailsRequestIdString",
  user_name: "GetUserDetailsRequestUserNameString",
})

Response structure


resp.user_id #=> String
resp.user_name #=> String
resp.display_name #=> String
resp.primary_email.email #=> String
resp.primary_email.verified #=> Boolean
resp.version #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :id (String)

    The system-generated unique ID of the user.

  • :user_name (String)

    The name of the user as displayed in Amazon CodeCatalyst.

Returns:

See Also:



945
946
947
948
# File 'gems/aws-sdk-codecatalyst/lib/aws-sdk-codecatalyst/client.rb', line 945

def get_user_details(params = {}, options = {})
  req = build_request(:get_user_details, params)
  req.send_request(options)
end

#list_access_tokens(params = {}) ⇒ Types::ListAccessTokensResponse

Lists all personal access tokens (PATs) associated with the user who calls the API. You can only list PATs associated with your Amazon Web Services Builder ID.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_access_tokens({
  max_results: 1,
  next_token: "ListAccessTokensRequestNextTokenString",
})

Response structure


resp.items #=> Array
resp.items[0].id #=> String
resp.items[0].name #=> String
resp.items[0].expires_time #=> Time
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :max_results (Integer)

    The maximum number of results to show in a single call to this API. If the number of results is larger than the number you specified, the response will include a NextToken element, which you can use to obtain additional results.

  • :next_token (String)

    A token returned from a call to this API to indicate the next batch of results to return, if any.

Returns:

See Also:



990
991
992
993
# File 'gems/aws-sdk-codecatalyst/lib/aws-sdk-codecatalyst/client.rb', line 990

def list_access_tokens(params = {}, options = {})
  req = build_request(:list_access_tokens, params)
  req.send_request(options)
end

#list_dev_environment_sessions(params = {}) ⇒ Types::ListDevEnvironmentSessionsResponse

Retrieves a list of active sessions for a Dev Environment in a project.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_dev_environment_sessions({
  space_name: "NameString", # required
  project_name: "NameString", # required
  dev_environment_id: "Uuid", # required
  next_token: "ListDevEnvironmentSessionsRequestNextTokenString",
  max_results: 1,
})

Response structure


resp.items #=> Array
resp.items[0].space_name #=> String
resp.items[0].project_name #=> String
resp.items[0].dev_environment_id #=> String
resp.items[0].started_time #=> Time
resp.items[0].id #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :space_name (required, String)

    The name of the space.

  • :project_name (required, String)

    The name of the project in the space.

  • :dev_environment_id (required, String)

    The system-generated unique ID of the Dev Environment.

  • :next_token (String)

    A token returned from a call to this API to indicate the next batch of results to return, if any.

  • :max_results (Integer)

    The maximum number of results to show in a single call to this API. If the number of results is larger than the number you specified, the response will include a NextToken element, which you can use to obtain additional results.

Returns:

See Also:



1048
1049
1050
1051
# File 'gems/aws-sdk-codecatalyst/lib/aws-sdk-codecatalyst/client.rb', line 1048

def list_dev_environment_sessions(params = {}, options = {})
  req = build_request(:list_dev_environment_sessions, params)
  req.send_request(options)
end

#list_dev_environments(params = {}) ⇒ Types::ListDevEnvironmentsResponse

Retrieves a list of Dev Environments in a project.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_dev_environments({
  space_name: "NameString", # required
  project_name: "NameString", # required
  filters: [
    {
      key: "String", # required
      values: ["String"], # required
      comparison_operator: "String",
    },
  ],
  next_token: "ListDevEnvironmentsRequestNextTokenString",
  max_results: 1,
})

Response structure


resp.items #=> Array
resp.items[0].space_name #=> String
resp.items[0].project_name #=> String
resp.items[0].id #=> String
resp.items[0].last_updated_time #=> Time
resp.items[0].creator_id #=> String
resp.items[0].status #=> String, one of "PENDING", "RUNNING", "STARTING", "STOPPING", "STOPPED", "FAILED", "DELETING", "DELETED"
resp.items[0].status_reason #=> String
resp.items[0].repositories #=> Array
resp.items[0].repositories[0].repository_name #=> String
resp.items[0].repositories[0].branch_name #=> String
resp.items[0].alias #=> String
resp.items[0].ides #=> Array
resp.items[0].ides[0].runtime #=> String
resp.items[0].ides[0].name #=> String
resp.items[0].instance_type #=> String, one of "dev.standard1.small", "dev.standard1.medium", "dev.standard1.large", "dev.standard1.xlarge"
resp.items[0].inactivity_timeout_minutes #=> Integer
resp.items[0].persistent_storage.size_in_gi_b #=> Integer
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :space_name (required, String)

    The name of the space.

  • :project_name (required, String)

    The name of the project in the space.

  • :filters (Array<Types::Filter>)

    Information about filters to apply to narrow the results returned in the list.

  • :next_token (String)

    A token returned from a call to this API to indicate the next batch of results to return, if any.

  • :max_results (Integer)

    The maximum number of results to show in a single call to this API. If the number of results is larger than the number you specified, the response will include a NextToken element, which you can use to obtain additional results.

Returns:

See Also:



1124
1125
1126
1127
# File 'gems/aws-sdk-codecatalyst/lib/aws-sdk-codecatalyst/client.rb', line 1124

def list_dev_environments(params = {}, options = {})
  req = build_request(:list_dev_environments, params)
  req.send_request(options)
end

#list_event_logs(params = {}) ⇒ Types::ListEventLogsResponse

Retrieves a list of events that occurred during a specified time period in a space. You can use these events to audit user and system activity in a space.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_event_logs({
  space_name: "NameString", # required
  start_time: Time.now, # required
  end_time: Time.now, # required
  event_name: "String",
  next_token: "ListEventLogsRequestNextTokenString",
  max_results: 1,
})

Response structure


resp.next_token #=> String
resp.items #=> Array
resp.items[0].id #=> String
resp.items[0].event_name #=> String
resp.items[0].event_type #=> String
resp.items[0].event_category #=> String
resp.items[0].event_source #=> String
resp.items[0].event_time #=> Time
resp.items[0].operation_type #=> String, one of "READONLY", "MUTATION"
resp.items[0].user_identity.user_type #=> String, one of "USER", "AWS_ACCOUNT", "UNKNOWN"
resp.items[0].user_identity.principal_id #=> String
resp.items[0].user_identity.user_name #=> String
resp.items[0].user_identity. #=> String
resp.items[0].project_information.name #=> String
resp.items[0].project_information.project_id #=> String
resp.items[0].request_id #=> String
resp.items[0].request_payload.content_type #=> String
resp.items[0].request_payload.data #=> String
resp.items[0].response_payload.content_type #=> String
resp.items[0].response_payload.data #=> String
resp.items[0].error_code #=> String
resp.items[0].source_ip_address #=> String
resp.items[0].user_agent #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :space_name (required, String)

    The name of the space.

  • :start_time (required, Time, DateTime, Date, Integer, String)

    The date and time when you want to start retrieving events, in coordinated universal time (UTC) timestamp format as specified in RFC 3339.

  • :end_time (required, Time, DateTime, Date, Integer, String)

    The time after which you do not want any events retrieved, in coordinated universal time (UTC) timestamp format as specified in RFC 3339.

  • :event_name (String)

    The name of the event.

  • :next_token (String)

    A token returned from a call to this API to indicate the next batch of results to return, if any.

  • :max_results (Integer)

    The maximum number of results to show in a single call to this API. If the number of results is larger than the number you specified, the response will include a NextToken element, which you can use to obtain additional results.

Returns:

See Also:



1215
1216
1217
1218
# File 'gems/aws-sdk-codecatalyst/lib/aws-sdk-codecatalyst/client.rb', line 1215

def list_event_logs(params = {}, options = {})
  req = build_request(:list_event_logs, params)
  req.send_request(options)
end

#list_projects(params = {}) ⇒ Types::ListProjectsResponse

Retrieves a list of projects.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_projects({
  space_name: "NameString", # required
  next_token: "ListProjectsRequestNextTokenString",
  max_results: 1,
  filters: [
    {
      key: "hasAccessTo", # required, accepts hasAccessTo
      values: ["String"], # required
      comparison_operator: "EQ", # accepts EQ, GT, GE, LT, LE
    },
  ],
})

Response structure


resp.next_token #=> String
resp.items #=> Array
resp.items[0].name #=> String
resp.items[0].display_name #=> String
resp.items[0].description #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :space_name (required, String)

    The name of the space.

  • :next_token (String)

    A token returned from a call to this API to indicate the next batch of results to return, if any.

  • :max_results (Integer)

    The maximum number of results to show in a single call to this API. If the number of results is larger than the number you specified, the response will include a NextToken element, which you can use to obtain additional results.

  • :filters (Array<Types::ProjectListFilter>)

    Information about filters to apply to narrow the results returned in the list.

Returns:

See Also:



1273
1274
1275
1276
# File 'gems/aws-sdk-codecatalyst/lib/aws-sdk-codecatalyst/client.rb', line 1273

def list_projects(params = {}, options = {})
  req = build_request(:list_projects, params)
  req.send_request(options)
end

#list_source_repositories(params = {}) ⇒ Types::ListSourceRepositoriesResponse

Retrieves a list of source repositories in a project.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_source_repositories({
  space_name: "NameString", # required
  project_name: "NameString", # required
  next_token: "ListSourceRepositoriesRequestNextTokenString",
  max_results: 1,
})

Response structure


resp.items #=> Array
resp.items[0].id #=> String
resp.items[0].name #=> String
resp.items[0].description #=> String
resp.items[0].last_updated_time #=> Time
resp.items[0].created_time #=> Time
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :space_name (required, String)

    The name of the space.

  • :project_name (required, String)

    The name of the project in the space.

  • :next_token (String)

    A token returned from a call to this API to indicate the next batch of results to return, if any.

  • :max_results (Integer)

    The maximum number of results to show in a single call to this API. If the number of results is larger than the number you specified, the response will include a NextToken element, which you can use to obtain additional results.

Returns:

See Also:



1326
1327
1328
1329
# File 'gems/aws-sdk-codecatalyst/lib/aws-sdk-codecatalyst/client.rb', line 1326

def list_source_repositories(params = {}, options = {})
  req = build_request(:list_source_repositories, params)
  req.send_request(options)
end

#list_source_repository_branches(params = {}) ⇒ Types::ListSourceRepositoryBranchesResponse

Retrieves a list of branches in a specified source repository.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_source_repository_branches({
  space_name: "NameString", # required
  project_name: "NameString", # required
  source_repository_name: "SourceRepositoryNameString", # required
  next_token: "ListSourceRepositoryBranchesRequestNextTokenString",
  max_results: 1,
})

Response structure


resp.next_token #=> String
resp.items #=> Array
resp.items[0].ref #=> String
resp.items[0].name #=> String
resp.items[0].last_updated_time #=> Time
resp.items[0].head_commit_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :space_name (required, String)

    The name of the space.

  • :project_name (required, String)

    The name of the project in the space.

  • :source_repository_name (required, String)

    The name of the source repository.

  • :next_token (String)

    A token returned from a call to this API to indicate the next batch of results to return, if any.

  • :max_results (Integer)

    The maximum number of results to show in a single call to this API. If the number of results is larger than the number you specified, the response will include a NextToken element, which you can use to obtain additional results.

Returns:

See Also:



1382
1383
1384
1385
# File 'gems/aws-sdk-codecatalyst/lib/aws-sdk-codecatalyst/client.rb', line 1382

def list_source_repository_branches(params = {}, options = {})
  req = build_request(:list_source_repository_branches, params)
  req.send_request(options)
end

#list_spaces(params = {}) ⇒ Types::ListSpacesResponse

Retrieves a list of spaces.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_spaces({
  next_token: "ListSpacesRequestNextTokenString",
})

Response structure


resp.next_token #=> String
resp.items #=> Array
resp.items[0].name #=> String
resp.items[0].region_name #=> String
resp.items[0].display_name #=> String
resp.items[0].description #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :next_token (String)

    A token returned from a call to this API to indicate the next batch of results to return, if any.

Returns:

See Also:



1419
1420
1421
1422
# File 'gems/aws-sdk-codecatalyst/lib/aws-sdk-codecatalyst/client.rb', line 1419

def list_spaces(params = {}, options = {})
  req = build_request(:list_spaces, params)
  req.send_request(options)
end

#start_dev_environment(params = {}) ⇒ Types::StartDevEnvironmentResponse

Starts a specified Dev Environment and puts it into an active state.

Examples:

Request syntax with placeholder values


resp = client.start_dev_environment({
  space_name: "NameString", # required
  project_name: "NameString", # required
  id: "Uuid", # required
  ides: [
    {
      runtime: "IdeConfigurationRuntimeString",
      name: "IdeConfigurationNameString",
    },
  ],
  instance_type: "dev.standard1.small", # accepts dev.standard1.small, dev.standard1.medium, dev.standard1.large, dev.standard1.xlarge
  inactivity_timeout_minutes: 1,
})

Response structure


resp.space_name #=> String
resp.project_name #=> String
resp.id #=> String
resp.status #=> String, one of "PENDING", "RUNNING", "STARTING", "STOPPING", "STOPPED", "FAILED", "DELETING", "DELETED"

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :space_name (required, String)

    The name of the space.

  • :project_name (required, String)

    The name of the project in the space.

  • :id (required, String)

    The system-generated unique ID of the Dev Environment.

  • :ides (Array<Types::IdeConfiguration>)

    Information about the integrated development environment (IDE) configured for a Dev Environment.

  • :instance_type (String)

    The Amazon EC2 instace type to use for the Dev Environment.

  • :inactivity_timeout_minutes (Integer)

    The amount of time the Dev Environment will run without any activity detected before stopping, in minutes. Only whole integers are allowed. Dev Environments consume compute minutes when running.

Returns:

See Also:



1481
1482
1483
1484
# File 'gems/aws-sdk-codecatalyst/lib/aws-sdk-codecatalyst/client.rb', line 1481

def start_dev_environment(params = {}, options = {})
  req = build_request(:start_dev_environment, params)
  req.send_request(options)
end

#start_dev_environment_session(params = {}) ⇒ Types::StartDevEnvironmentSessionResponse

Starts a session for a specified Dev Environment.

Examples:

Request syntax with placeholder values


resp = client.start_dev_environment_session({
  space_name: "NameString", # required
  project_name: "NameString", # required
  id: "Uuid", # required
  session_configuration: { # required
    session_type: "SSM", # required, accepts SSM, SSH
    execute_command_session_configuration: {
      command: "ExecuteCommandSessionConfigurationCommandString", # required
      arguments: ["ExecuteCommandSessionConfigurationArgumentsMemberString"],
    },
  },
})

Response structure


resp.access_details.stream_url #=> String
resp.access_details.token_value #=> String
resp.session_id #=> String
resp.space_name #=> String
resp.project_name #=> String
resp.id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :space_name (required, String)

    The name of the space.

  • :project_name (required, String)

    The name of the project in the space.

  • :id (required, String)

    The system-generated unique ID of the Dev Environment.

  • :session_configuration (required, Types::DevEnvironmentSessionConfiguration)

    Information about the configuration of a Dev Environment session.

Returns:

See Also:



1536
1537
1538
1539
# File 'gems/aws-sdk-codecatalyst/lib/aws-sdk-codecatalyst/client.rb', line 1536

def start_dev_environment_session(params = {}, options = {})
  req = build_request(:start_dev_environment_session, params)
  req.send_request(options)
end

#stop_dev_environment(params = {}) ⇒ Types::StopDevEnvironmentResponse

Pauses a specified Dev Environment and places it in a non-running state. Stopped Dev Environments do not consume compute minutes.

Examples:

Request syntax with placeholder values


resp = client.stop_dev_environment({
  space_name: "NameString", # required
  project_name: "NameString", # required
  id: "Uuid", # required
})

Response structure


resp.space_name #=> String
resp.project_name #=> String
resp.id #=> String
resp.status #=> String, one of "PENDING", "RUNNING", "STARTING", "STOPPING", "STOPPED", "FAILED", "DELETING", "DELETED"

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :space_name (required, String)

    The name of the space.

  • :project_name (required, String)

    The name of the project in the space.

  • :id (required, String)

    The system-generated unique ID of the Dev Environment.

Returns:

See Also:



1579
1580
1581
1582
# File 'gems/aws-sdk-codecatalyst/lib/aws-sdk-codecatalyst/client.rb', line 1579

def stop_dev_environment(params = {}, options = {})
  req = build_request(:stop_dev_environment, params)
  req.send_request(options)
end

#stop_dev_environment_session(params = {}) ⇒ Types::StopDevEnvironmentSessionResponse

Stops a session for a specified Dev Environment.

Examples:

Request syntax with placeholder values


resp = client.stop_dev_environment_session({
  space_name: "NameString", # required
  project_name: "NameString", # required
  id: "Uuid", # required
  session_id: "StopDevEnvironmentSessionRequestSessionIdString", # required
})

Response structure


resp.space_name #=> String
resp.project_name #=> String
resp.id #=> String
resp.session_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :space_name (required, String)

    The name of the space.

  • :project_name (required, String)

    The name of the project in the space.

  • :id (required, String)

    The system-generated unique ID of the Dev Environment. To obtain this ID, use ListDevEnvironments.

  • :session_id (required, String)

    The system-generated unique ID of the Dev Environment session. This ID is returned by StartDevEnvironmentSession.

Returns:

See Also:



1627
1628
1629
1630
# File 'gems/aws-sdk-codecatalyst/lib/aws-sdk-codecatalyst/client.rb', line 1627

def stop_dev_environment_session(params = {}, options = {})
  req = build_request(:stop_dev_environment_session, params)
  req.send_request(options)
end

#update_dev_environment(params = {}) ⇒ Types::UpdateDevEnvironmentResponse

Changes one or more values for a Dev Environment. Updating certain values of the Dev Environment will cause a restart.

Examples:

Request syntax with placeholder values


resp = client.update_dev_environment({
  space_name: "NameString", # required
  project_name: "NameString", # required
  id: "Uuid", # required
  alias: "UpdateDevEnvironmentRequestAliasString",
  ides: [
    {
      runtime: "IdeConfigurationRuntimeString",
      name: "IdeConfigurationNameString",
    },
  ],
  instance_type: "dev.standard1.small", # accepts dev.standard1.small, dev.standard1.medium, dev.standard1.large, dev.standard1.xlarge
  inactivity_timeout_minutes: 1,
  client_token: "ClientToken",
})

Response structure


resp.id #=> String
resp.space_name #=> String
resp.project_name #=> String
resp.alias #=> String
resp.ides #=> Array
resp.ides[0].runtime #=> String
resp.ides[0].name #=> String
resp.instance_type #=> String, one of "dev.standard1.small", "dev.standard1.medium", "dev.standard1.large", "dev.standard1.xlarge"
resp.inactivity_timeout_minutes #=> Integer
resp.client_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :space_name (required, String)

    The name of the space.

  • :project_name (required, String)

    The name of the project in the space.

  • :id (required, String)

    The system-generated unique ID of the Dev Environment.

  • :alias (String)

    The user-specified alias for the Dev Environment. Changing this value will not cause a restart.

  • :ides (Array<Types::IdeConfiguration>)

    Information about the integrated development environment (IDE) configured for a Dev Environment.

  • :instance_type (String)

    The Amazon EC2 instace type to use for the Dev Environment.

    Changing this value will cause a restart of the Dev Environment if it is running.

  • :inactivity_timeout_minutes (Integer)

    The amount of time the Dev Environment will run without any activity detected before stopping, in minutes. Only whole integers are allowed. Dev Environments consume compute minutes when running.

    Changing this value will cause a restart of the Dev Environment if it is running.

  • :client_token (String)

    A user-specified idempotency token. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, the subsequent retries return the result from the original successful request and have no additional effect.

Returns:

See Also:



1723
1724
1725
1726
# File 'gems/aws-sdk-codecatalyst/lib/aws-sdk-codecatalyst/client.rb', line 1723

def update_dev_environment(params = {}, options = {})
  req = build_request(:update_dev_environment, params)
  req.send_request(options)
end

#verify_session(params = {}) ⇒ Types::VerifySessionResponse

Verifies whether the calling user has a valid Amazon CodeCatalyst login and session. If successful, this returns the ID of the user in Amazon CodeCatalyst.

Examples:

Response structure


resp.identity #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Returns:

See Also:



1744
1745
1746
1747
# File 'gems/aws-sdk-codecatalyst/lib/aws-sdk-codecatalyst/client.rb', line 1744

def verify_session(params = {}, options = {})
  req = build_request(:verify_session, params)
  req.send_request(options)
end