Beispiel #1
0
        public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems)
        {
            AmazonNeptuneConfig config = new AmazonNeptuneConfig();

            config.RegionEndpoint = region;
            ConfigureClient(config);
            AmazonNeptuneClient client = new AmazonNeptuneClient(creds, config);

            DescribeDBParameterGroupsResponse resp = new DescribeDBParameterGroupsResponse();

            do
            {
                DescribeDBParameterGroupsRequest req = new DescribeDBParameterGroupsRequest
                {
                    Marker = resp.Marker
                    ,
                    MaxRecords = maxItems
                };

                resp = client.DescribeDBParameterGroups(req);
                CheckError(resp.HttpStatusCode, "200");

                foreach (var obj in resp.DBParameterGroups)
                {
                    AddObject(obj);
                }
            }while (!string.IsNullOrEmpty(resp.Marker));
        }
        /// <summary>
        /// <para> Returns a list of DBParameterGroup descriptions. If a DBParameterGroupName is specified, the list will contain only the descriptions
        /// of the specified DBParameterGroup. </para>
        /// </summary>
        ///
        /// <param name="describeDBParameterGroupsRequest">Container for the necessary parameters to execute the DescribeDBParameterGroups service
        ///           method on AmazonRDS.</param>
        ///
        /// <returns>The response from the DescribeDBParameterGroups service method, as returned by AmazonRDS.</returns>
        ///
        /// <exception cref="DBParameterGroupNotFoundException"/>
        public DescribeDBParameterGroupsResponse DescribeDBParameterGroups(DescribeDBParameterGroupsRequest describeDBParameterGroupsRequest)
        {
            IRequest <DescribeDBParameterGroupsRequest> request  = new DescribeDBParameterGroupsRequestMarshaller().Marshall(describeDBParameterGroupsRequest);
            DescribeDBParameterGroupsResponse           response = Invoke <DescribeDBParameterGroupsRequest, DescribeDBParameterGroupsResponse> (request, this.signer, DescribeDBParameterGroupsResponseUnmarshaller.GetInstance());

            return(response);
        }
Beispiel #3
0
        private static IDictionary <string, string> ConvertDescribeDBParameterGroups(DescribeDBParameterGroupsRequest request)
        {
            IDictionary <string, string> dictionary = new Dictionary <string, string>();

            dictionary["Action"] = "DescribeDBParameterGroups";
            if (request.IsSetDBParameterGroupName())
            {
                dictionary["DBParameterGroupName"] = request.DBParameterGroupName;
            }
            if (request.IsSetMaxRecords())
            {
                dictionary["MaxRecords"] = request.MaxRecords.ToString();
            }
            if (request.IsSetMarker())
            {
                dictionary["Marker"] = request.Marker;
            }
            return(dictionary);
        }
Beispiel #4
0
 public DescribeDBParameterGroupsResponse DescribeDBParameterGroups(DescribeDBParameterGroupsRequest request)
 {
     return(this.Invoke <DescribeDBParameterGroupsResponse>(ConvertDescribeDBParameterGroups(request)));
 }